Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/update_protos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
- name: Update api
run: |
echo ${{ github.event.client_payload.tag }} > api_version.lock
sudo chown -R testbot .
sudo -u testbot bash -lc 'make update-buf'

- name: Add + Commit + Open PR
uses: peter-evans/create-pull-request@v6
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ update-buf: $(node_modules)

.PHONY: build-buf
build-buf: $(node_modules) clean-buf
$(buf) generate $$(./scripts/get-buf-lock-version.js buf.build/googleapis/googleapis)
$(buf) generate buf.build/googleapis/googleapis
$(buf) generate buf.build/viamrobotics/api:$$(cat api_version.lock) --path common,component,robot,service,app,provisioning,tagger,stream
$(buf) generate $$(./scripts/get-buf-lock-version.js buf.build/viamrobotics/goutils)
$(buf) generate buf.build/viamrobotics/goutils

# js targets

Expand Down
2 changes: 1 addition & 1 deletion api_version.lock
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.345
v0.1.347
6 changes: 3 additions & 3 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: v1
version: v2
managed:
enabled: true
plugins:
- plugin: buf.build/connectrpc/es:v1.5.0
- remote: buf.build/connectrpc/es:v1.5.0
out: src/gen
- plugin: buf.build/bufbuild/es:v1.10.0
- remote: buf.build/bufbuild/es:v1.10.0
out: src/gen
18 changes: 0 additions & 18 deletions buf.lock

This file was deleted.

11 changes: 0 additions & 11 deletions buf.yaml

This file was deleted.

18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
},
"homepage": "https://github.com/viamrobotics/viam-typescript-sdk#readme",
"dependencies": {
"exponential-backoff": "^3.1.1",
"@bufbuild/protobuf": "^1.10.0",
"@connectrpc/connect": "^1.5.0",
"@connectrpc/connect-web": "^1.5.0"
"@connectrpc/connect": "^1.6.0",
"@connectrpc/connect-web": "^1.6.0",
"exponential-backoff": "^3.1.1"
},
"devDependencies": {
"@bufbuild/buf": "^1.15.0-1",
Expand Down
39 changes: 0 additions & 39 deletions scripts/get-buf-lock-version.js

This file was deleted.

30 changes: 30 additions & 0 deletions src/app/billing-client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import {
GetInvoicePdfResponse,
GetInvoicesSummaryResponse,
PaymentMethodType,
ResourceUsageCosts,
ResourceUsageCostsBySource,
SourceType,
UsageCost,
UsageCostType,
} from '../gen/app/v1/billing_pb';
import {
BillingClient,
Expand Down Expand Up @@ -38,6 +43,17 @@ const testMonthUsage: GetCurrentMonthUsageResponse = {
binaryDataCloudStorageUsageCost: 9,
otherCloudStorageUsageCost: 10,
perMachineUsageCost: 11,
subtotal: 12,
resourceUsageCostsBySource: [
new ResourceUsageCostsBySource({
sourceType: SourceType.ORG,
resourceUsageCosts: new ResourceUsageCosts({
usageCosts: [
new UsageCost({ resourceType: UsageCostType.UNSPECIFIED, cost: 13 }),
],
}),
}),
],
startDate: testStartDate,
endDate: testEndDate,
start: new Date(SECONDS * 1000 + NANOS / 1_000_000),
Expand Down Expand Up @@ -81,6 +97,20 @@ describe('BillingClient tests', () => {
binaryDataCloudStorageUsageCost: 9,
otherCloudStorageUsageCost: 10,
perMachineUsageCost: 11,
subtotal: 12,
resourceUsageCostsBySource: [
new ResourceUsageCostsBySource({
sourceType: SourceType.ORG,
resourceUsageCosts: new ResourceUsageCosts({
usageCosts: [
new UsageCost({
resourceType: UsageCostType.UNSPECIFIED,
cost: 13,
}),
],
}),
}),
],
startDate: testStartDate,
endDate: testEndDate,
} as GetCurrentMonthUsageResponse;
Expand Down