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: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.0"
".": "0.6.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 31
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/triglit%2Ftriglit-a764b362cc7f0cc0e27f4288a948ae5f7495c073e0b05bf68fe7cff70bd4fd91.yml
openapi_spec_hash: fff16017770be5b1798130820585c72e
config_hash: a9236c7ca77fbb3b03a51c6f84b2c3a1
configured_endpoints: 32
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/triglit%2Ftriglit-e17deb50f80c7a9854d2f33b8ea044da9f7101a2e127c4c280b9eba7478364ca.yml
openapi_spec_hash: 982216941e9ab9908c8345cc15526603
config_hash: 6b917f828d9699c443f2a2592b9f586c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.6.0 (2025-11-23)

Full Changelog: [v0.5.0...v0.6.0](https://github.com/Triglit/typescript-sdk/compare/v0.5.0...v0.6.0)

### Features

* **api:** implementa endpoint de alterar status do workflow ([a6ea906](https://github.com/Triglit/typescript-sdk/commit/a6ea90669f3cac9a787f8cf580c6b2cc5f026ac3))

## 0.5.0 (2025-11-21)

Full Changelog: [v0.4.5...v0.5.0](https://github.com/Triglit/typescript-sdk/compare/v0.4.5...v0.5.0)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Methods:
- <code title="patch /v1/gateway/workflows/{workflowId}">client.workflows.<a href="./src/resources/workflows/workflows.ts">update</a>(workflowID, { ...params }) -> Workflow</code>
- <code title="get /v1/gateway/workflows">client.workflows.<a href="./src/resources/workflows/workflows.ts">list</a>({ ...params }) -> WorkflowsPageBased</code>
- <code title="delete /v1/gateway/workflows/{workflowId}">client.workflows.<a href="./src/resources/workflows/workflows.ts">delete</a>(workflowID) -> void</code>
- <code title="patch /v1/gateway/workflows/{workflowId}/toggle-status">client.workflows.<a href="./src/resources/workflows/workflows.ts">toggleStatus</a>(workflowID) -> Workflow</code>

## Versions

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "triglit",
"version": "0.5.0",
"version": "0.6.0",
"description": "The official TypeScript library for the Triglit API",
"author": "Triglit <suporte@triglit.com>",
"types": "dist/index.d.ts",
Expand Down
8 changes: 8 additions & 0 deletions src/resources/workflows/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ export class Workflows extends APIResource {
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
}

/**
* Toggles the active/inactive status of a workflow. If active, becomes inactive;
* if inactive, becomes active. Accepts both public and secret keys.
*/
toggleStatus(workflowID: string, options?: RequestOptions): APIPromise<Workflow> {
return this._client.patch(path`/v1/gateway/workflows/${workflowID}/toggle-status`, options);
}
}

export type WorkflowsPageBased = PageBased<Workflow>;
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.5.0'; // x-release-please-version
export const VERSION = '0.6.0'; // x-release-please-version
12 changes: 12 additions & 0 deletions tests/api-resources/workflows/workflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,16 @@ describe('resource workflows', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism tests are disabled
test.skip('toggleStatus', async () => {
const responsePromise = client.workflows.toggleStatus('wf_abc123def456');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
expect(response).not.toBeInstanceOf(Response);
const dataAndResponse = await responsePromise.withResponse();
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
});
Loading