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
24 changes: 20 additions & 4 deletions .github/workflows/parse_typescript.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,14 @@ def parse(self, type, viam_resources, args):
}

returns = md(str(method.find('h4', class_="tsd-returns-title"))).replace("#### Returns ", "").strip().replace('\\', '')
return_description = md(str(method.find('h4', class_="tsd-returns-title").next_sibling)).strip()
return_description = ""
if method.find('h4', class_="tsd-returns-title").next_sibling:
if not method.find('h4', class_="tsd-returns-title").next_sibling.get('class'):
return_description = md(str(method.find('h4', class_="tsd-returns-title").next_sibling)).strip()
else:
return_description = None
else:
return_description = None

return_object = {
'return_description': return_description,
Expand All @@ -128,16 +135,25 @@ def parse(self, type, viam_resources, args):
if method.find('li', class_="tsd-description").find('div', class_="tsd-comment"):
method_description = method.find('li', class_="tsd-description").find('div', class_="tsd-comment").text.strip()

code_sample = ""
if method.find('div', class_='tsd-tag-example'):
code_sample_full = method.find('div', class_='tsd-tag-example').find('pre')
code_sample_full.find('button').decompose()
code_sample_draft = md(str(code_sample_full)).replace('```', "").strip()
code_sample = ""
for line in code_sample_draft.split('\n'):
code_sample = code_sample + line.rstrip() + "\n"

self.typescript_methods[type][resource][method_name] = {
'method_description': method_description,
'method_link': method.find('a', class_='tsd-anchor-icon')["href"],
'parameters': param_object,
'proto': '', # method_name ?
'return': return_object
}
# 'code_sample': "", # No code samples yet method.find('pre').text
# print(self.typescript_methods[type][resource][method_name])
# print()

if code_sample:
self.typescript_methods[type][resource][method_name]["code_sample"] = code_sample


return self.typescript_methods
3 changes: 2 additions & 1 deletion .github/workflows/sdk_protos_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ board,GetResourceName,No,get_resource_name,,getResourceName,
board,Close,No,close,Close,,

## Button
button,Push,No,,Push,,push
button,Push,No,push,Push,,push
button,DoCommand,No,,DoCommand,,doCommand
button,Close,No,,Close,,

Expand Down Expand Up @@ -393,6 +393,7 @@ app,DeleteKey,,delete_key,,,deleteKey
app,RotateKey,,rotate_key,,,rotateKey
app,ListKeys,,list_keys,,,listKeys
app,CreateKeyFromExistingKeyAuthorizations,,create_key_from_existing_key_authorizations,,,createKeyFromExistingKeyAuthorizations
app,GetAppContent,,,,,getAppContent

## Billing
billing,GetCurrentMonthUsage,,get_current_month_usage,,,getCurrentMonthUsage
Expand Down
1 change: 1 addition & 0 deletions static/include/app/apis/generated/app-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@
| [`RotateKey`](/dev/reference/apis/fleet/#rotatekey) | Rotate an API key. |
| [`ListKeys`](/dev/reference/apis/fleet/#listkeys) | List all keys for the {{< glossary_tooltip term_id="organization" text="organization" >}} that you are currently authenticated to. |
| [`CreateKeyFromExistingKeyAuthorizations`](/dev/reference/apis/fleet/#createkeyfromexistingkeyauthorizations) | Create a new API key with an existing key’s authorizations. |
| [`GetAppContent`](/dev/reference/apis/fleet/#getappcontent) | Retrieve the app content for an organization. |
25 changes: 23 additions & 2 deletions static/include/app/apis/generated/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/
**Parameters:**

- `organizationId` (string) (required): The ID of the organization to create the role under.
- `entityId` (string) (required): The ID of the entity the role belongs to (for example, a user ID).
- `entityId` (string) (required): The ID of the entity the role belongs to (for example a user ID).
- `role` (string) (required): The role to add ("owner" or "operator").
- `resourceType` (string) (required): The type of resource to create the role for ("robot",
"location", or "organization").
Expand Down Expand Up @@ -2516,7 +2516,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/
**Parameters:**

- `organizationId` (string) (required): The ID of the organization to remove the role from.
- `entityId` (string) (required): The ID of the entity the role belongs to (for example, a user ID).
- `entityId` (string) (required): The ID of the entity the role belongs to (for example a user ID).
- `role` (string) (required): The role to remove ("owner" or "operator").
- `resourceType` (string) (required): The type of resource to remove the role from ("robot",
"location", or "organization").
Expand Down Expand Up @@ -3447,3 +3447,24 @@ For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/

{{% /tab %}}
{{< /tabs >}}

### GetAppContent

Retrieve the app content for an organization.

{{< tabs >}}
{{% tab name="TypeScript" %}}

**Parameters:**

- `publicNamespace` (string) (required): The public namespace of the organization.
- `name` (string) (required): The name of the app.

**Returns:**

- (Promise<[GetAppContentResponse](https://ts.viam.dev/classes/appApi.GetAppContentResponse.html)>): The blob path and entrypoint of the app content.

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/AppClient.html#getappcontent).

{{% /tab %}}
{{< /tabs >}}
49 changes: 40 additions & 9 deletions static/include/app/apis/generated/billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,17 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `orgId` (string) (required)
- `orgId` (string) (required): The organization ID.

**Returns:**

- (Promise<GetCurrentMonthUsageResponse>): None.
- (Promise<GetCurrentMonthUsageResponse>)

**Example:**

```ts {class="line-numbers linkable-line-numbers"}
const usage = await billing.getCurrentMonthUsage('<organization-id>');
```

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/BillingClient.html#getcurrentmonthusage).

Expand Down Expand Up @@ -69,11 +75,19 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `orgId` (string) (required)
- `orgId` (string) (required): The organization ID.

**Returns:**

- (Promise<[GetOrgBillingInformationResponse](https://ts.viam.dev/classes/billingApi.GetOrgBillingInformationResponse.html)>): None.
- (Promise<[GetOrgBillingInformationResponse](https://ts.viam.dev/classes/billingApi.GetOrgBillingInformationResponse.html)>)

**Example:**

```ts {class="line-numbers linkable-line-numbers"}
const billingInfo = await billing.getOrgBillingInformation(
'<organization-id>'
);
```

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/BillingClient.html#getorgbillinginformation).

Expand Down Expand Up @@ -109,11 +123,19 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `orgId` (string) (required)
- `orgId` (string) (required): The organization ID.

**Returns:**

- (Promise<[GetInvoicesSummaryResponse](https://ts.viam.dev/classes/billingApi.GetInvoicesSummaryResponse.html)>): None.
- (Promise<[GetInvoicesSummaryResponse](https://ts.viam.dev/classes/billingApi.GetInvoicesSummaryResponse.html)>)

**Example:**

```ts {class="line-numbers linkable-line-numbers"}
const invoicesSummary = await billing.getInvoicesSummary(
'<organization-id>'
);
```

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/BillingClient.html#getinvoicessummary).

Expand Down Expand Up @@ -152,12 +174,21 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `id` (string) (required)
- `orgId` (string) (required)
- `id` (string) (required): The invoice ID.
- `orgId` (string) (required): The organization ID.

**Returns:**

- (Promise<Uint8Array>): None.
- (Promise<Uint8Array>)

**Example:**

```ts {class="line-numbers linkable-line-numbers"}
const invoicePdf = await billing.getInvoicePdf(
'<invoice-id>',
'<organization-id>'
);
```

For more information, see the [TypeScript SDK Docs](https://ts.viam.dev/classes/BillingClient.html#getinvoicepdf).

Expand Down
16 changes: 8 additions & 8 deletions static/include/app/apis/generated/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `ids` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required): The IDs of the requested binary data.
- `ids` (string) (required): The IDs of the requested binary data.

**Returns:**

Expand Down Expand Up @@ -964,7 +964,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `ids` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required): The IDs of the data to be deleted. Must be non-empty.
- `ids` (string) (required): The IDs of the data to be deleted. Must be non-empty.

**Returns:**

Expand Down Expand Up @@ -1065,7 +1065,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

- `tags` (string) (required): The list of tags to add to specified binary data. Must be
non-empty.
- `ids` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required): The IDs of the data to be tagged. Must be non-empty.
- `ids` (string) (required): The IDs of the data to be tagged. Must be non-empty.

**Returns:**

Expand Down Expand Up @@ -1262,7 +1262,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

- `tags` (string) (required): List of tags to remove from specified binary data. Must be
non-empty.
- `ids` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required): The IDs of the data to be edited. Must be non-empty.
- `ids` (string) (required): The IDs of the data to be edited. Must be non-empty.

**Returns:**

Expand Down Expand Up @@ -1531,7 +1531,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `id` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required)
- `binaryId` (string) (required): The ID of the image to add the bounding box to.
- `label` (string) (required): A label for the bounding box.
- `xMinNormalized` (number) (required): The min X value of the bounding box normalized from 0
to 1.
Expand Down Expand Up @@ -1628,7 +1628,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `binId` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required): The ID of the image to remove the bounding box from.
- `binId` (string) (required): The ID of the image to remove the bounding box from.
- `bboxId` (string) (required): The ID of the bounding box to remove.

**Returns:**
Expand Down Expand Up @@ -1962,7 +1962,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `ids` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required): The IDs of binary data to add to dataset.
- `ids` (string) (required): The IDs of binary data to add to dataset.
- `datasetId` (string) (required): The ID of the dataset to be added to.

**Returns:**
Expand Down Expand Up @@ -2062,7 +2062,7 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/

**Parameters:**

- `ids` ([BinaryID](https://ts.viam.dev/classes/BinaryID.html)) (required): The IDs of the binary data to remove from dataset.
- `ids` (string) (required): The IDs of the binary data to remove from dataset.
- `datasetId` (string) (required): The ID of the dataset to be removed from.

**Returns:**
Expand Down
4 changes: 2 additions & 2 deletions static/include/app/apis/generated/data_sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ _viam = await Viam.withApiKey(
DateTime(2025, 1, 15, 14, 45) // End time
);

final binaryDataId = await dataClient.binaryDataCaptureUpload(
final fileId = await dataClient.binaryDataCaptureUpload(
imageBytes,
"<YOUR-PART-ID>",
".png",
Expand Down Expand Up @@ -499,7 +499,7 @@ void _uploadData() async {
DateTime(2025, 1, 15, 14, 45) // End time
);

final binaryDataId = await dataClient.streamingDataCaptureUpload(
final fileId = await dataClient.streamingDataCaptureUpload(
video,
"<YOUR-PART-ID>",
".mp4", // Replace with your desired file format
Expand Down
Loading
Loading