From 2048a84ada13831beeb378d9b938bedf2f78eba4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 18:29:08 +0000 Subject: [PATCH 01/33] chore(internal): update `actions/checkout` version --- .github/workflows/ci.yml | 6 +++--- .github/workflows/publish-npm.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df5ddea3..7f0da117 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/knock-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v4 @@ -41,7 +41,7 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v4 @@ -74,7 +74,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/knock-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v4 diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 2bc6cebe..77e01310 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v3 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index a58a54b5..85238b69 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'knocklabs/knock-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check release environment run: | From bf382c0bf162077e7c28b65551085f461f8592c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 21:18:23 +0000 Subject: [PATCH 02/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/shared.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 55110a2d..8f8211f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-138601849c510c1e1c96af745bc2a4c4099a6e69054b454ba69e61082fb60f31.yml -openapi_spec_hash: 4858bf3005cfe4a73eaa5cdc8a4ac939 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-0c621c06484c8d9a82e2cc70d2984dce46fa82f86185bce773c0bc265df77139.yml +openapi_spec_hash: 8670b393e28985dc4e93a16597690025 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 206181be..c4e65725 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -26,7 +26,7 @@ export interface Condition { | 'contains_all' | 'is_timestamp' | 'is_not_timestamp' - | 'is_timestamp_after' + | 'is_timestamp_on_or_after' | 'is_timestamp_before' | 'is_timestamp_between' | 'is_audience_member' From 8fecb721112dee9e4b106d42f297c174a4271361 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 16:51:13 +0000 Subject: [PATCH 03/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/shared.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8f8211f8..55110a2d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-0c621c06484c8d9a82e2cc70d2984dce46fa82f86185bce773c0bc265df77139.yml -openapi_spec_hash: 8670b393e28985dc4e93a16597690025 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-138601849c510c1e1c96af745bc2a4c4099a6e69054b454ba69e61082fb60f31.yml +openapi_spec_hash: 4858bf3005cfe4a73eaa5cdc8a4ac939 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/shared.ts b/src/resources/shared.ts index c4e65725..206181be 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -26,7 +26,7 @@ export interface Condition { | 'contains_all' | 'is_timestamp' | 'is_not_timestamp' - | 'is_timestamp_on_or_after' + | 'is_timestamp_after' | 'is_timestamp_before' | 'is_timestamp_between' | 'is_audience_member' From 10316df12a84166f5b2933be7a5aa73f9e43cec6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 23:36:47 +0000 Subject: [PATCH 04/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/shared.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 55110a2d..075cb58e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-138601849c510c1e1c96af745bc2a4c4099a6e69054b454ba69e61082fb60f31.yml -openapi_spec_hash: 4858bf3005cfe4a73eaa5cdc8a4ac939 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5d586855fa3ef8505e3cf0c86ea7903a7f5609853c3697c6a110c88e1c3344c1.yml +openapi_spec_hash: 1afe31150fa4b2ed126b0d809513fc0a config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 206181be..cd252bdc 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -26,8 +26,10 @@ export interface Condition { | 'contains_all' | 'is_timestamp' | 'is_not_timestamp' - | 'is_timestamp_after' + | 'is_timestamp_on_or_after' | 'is_timestamp_before' + | 'is_timestamp_on_or_after_date' + | 'is_timestamp_before_date' | 'is_timestamp_between' | 'is_audience_member' | 'is_not_audience_member'; From 026e8466fb87b4f879755f222ad526ba8db956e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 20:40:01 +0000 Subject: [PATCH 05/33] feat(api): api update --- .stats.yml | 4 +- src/resources/audiences.ts | 46 ++---- tests/api-resources/audiences.test.ts | 212 +++++++++++++++++++++++++- 3 files changed, 226 insertions(+), 36 deletions(-) diff --git a/.stats.yml b/.stats.yml index 075cb58e..87f7c8d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5d586855fa3ef8505e3cf0c86ea7903a7f5609853c3697c6a110c88e1c3344c1.yml -openapi_spec_hash: 1afe31150fa4b2ed126b0d809513fc0a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-1847c4ab086e290a4e3a698f3bc55605fa5c24cbdef663a51a8b84d260312491.yml +openapi_spec_hash: 6ecef3ce2fc44f77781c835fefe1aa82 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/audiences.ts b/src/resources/audiences.ts index a47df76a..a1daae46 100644 --- a/src/resources/audiences.ts +++ b/src/resources/audiences.ts @@ -18,7 +18,11 @@ export class Audiences extends APIResource { * members: [ * { * tenant: 'ingen_isla_nublar', - * user: { id: 'dr_sattler' }, + * user: { + * email: 'ellie@ingen.net', + * id: 'dr_sattler', + * name: 'Dr. Ellie Sattler', + * }, * }, * ], * }); @@ -50,7 +54,7 @@ export class Audiences extends APIResource { * @example * ```ts * await client.audiences.removeMembers('key', { - * members: [{ user: {} }], + * members: [{ user: { id: 'dr_sattler' } }], * }); * ``` */ @@ -123,27 +127,18 @@ export namespace AudienceAddMembersParams { */ export interface Member { /** - * An object containing the user's ID. + * A set of parameters to inline-identify a user with. Inline identifying the user + * will ensure that the user is available before the request is executed in Knock. + * It will perform an upsert for the user you're supplying, replacing any + * properties specified. */ - user: Member.User; + user: UsersAPI.InlineIdentifyUserRequest; /** * The unique identifier for the tenant. */ tenant?: string | null; } - - export namespace Member { - /** - * An object containing the user's ID. - */ - export interface User { - /** - * The unique identifier of the user. - */ - id?: string; - } - } } export interface AudienceRemoveMembersParams { @@ -159,27 +154,18 @@ export namespace AudienceRemoveMembersParams { */ export interface Member { /** - * An object containing the user's ID. + * A set of parameters to inline-identify a user with. Inline identifying the user + * will ensure that the user is available before the request is executed in Knock. + * It will perform an upsert for the user you're supplying, replacing any + * properties specified. */ - user: Member.User; + user: UsersAPI.InlineIdentifyUserRequest; /** * The unique identifier for the tenant. */ tenant?: string | null; } - - export namespace Member { - /** - * An object containing the user's ID. - */ - export interface User { - /** - * The unique identifier of the user. - */ - id?: string; - } - } } export declare namespace Audiences { diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts index 89b120d5..34b1cf21 100644 --- a/tests/api-resources/audiences.test.ts +++ b/tests/api-resources/audiences.test.ts @@ -10,7 +10,7 @@ const client = new Knock({ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('addMembers: only required params', async () => { - const responsePromise = client.audiences.addMembers('key', { members: [{ user: {} }] }); + const responsePromise = client.audiences.addMembers('key', { members: [{ user: { id: 'dr_sattler' } }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,7 +25,108 @@ describe('resource audiences', () => { const response = await client.audiences.addMembers('key', { members: [ { - user: { id: 'dr_sattler' }, + user: { + id: 'dr_sattler', + avatar: 'avatar', + channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, + created_at: '2019-12-27T18:11:19.117Z', + email: 'ellie@ingen.net', + locale: 'locale', + name: 'Dr. Ellie Sattler', + phone_number: 'phone_number', + preferences: { + default: { + __persistence_strategy__: 'merge', + categories: { + marketing: false, + transactional: { + channel_types: { + chat: true, + email: false, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { + '2f641633-95d3-4555-9222-9f1eb7888a80': { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, + }, + commercial_subscribed: true, + workflows: { + 'dinosaurs-loose': { + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + }, + }, + timezone: 'America/New_York', + }, tenant: 'ingen_isla_nublar', }, ], @@ -46,7 +147,9 @@ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('removeMembers: only required params', async () => { - const responsePromise = client.audiences.removeMembers('key', { members: [{ user: {} }] }); + const responsePromise = client.audiences.removeMembers('key', { + members: [{ user: { id: 'dr_sattler' } }], + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -61,7 +164,108 @@ describe('resource audiences', () => { const response = await client.audiences.removeMembers('key', { members: [ { - user: { id: 'dr_sattler' }, + user: { + id: 'dr_sattler', + avatar: 'avatar', + channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, + created_at: '2019-12-27T18:11:19.117Z', + email: 'ellie@ingen.net', + locale: 'locale', + name: 'Dr. Ellie Sattler', + phone_number: 'phone_number', + preferences: { + default: { + __persistence_strategy__: 'merge', + categories: { + marketing: false, + transactional: { + channel_types: { + chat: true, + email: false, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { + '2f641633-95d3-4555-9222-9f1eb7888a80': { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, + }, + commercial_subscribed: true, + workflows: { + 'dinosaurs-loose': { + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + }, + }, + timezone: 'America/New_York', + }, tenant: 'ingen_isla_nublar', }, ], From d3c6eed42a83abd3e529c299edf4fa61b67ed58a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 18:07:41 +0000 Subject: [PATCH 06/33] chore(ci): upgrade `actions/github-script` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f0da117..d0deb840 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: - name: Get GitHub OIDC Token if: github.repository == 'stainless-sdks/knock-typescript' id: github-oidc - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); From 35bdbf0694f7f29d5b5e4ad38d18d9a5fcec2f94 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 19:31:19 +0000 Subject: [PATCH 07/33] feat(api): api update --- .stats.yml | 4 +- src/resources/audiences.ts | 46 ++++-- tests/api-resources/audiences.test.ts | 212 +------------------------- 3 files changed, 36 insertions(+), 226 deletions(-) diff --git a/.stats.yml b/.stats.yml index 87f7c8d6..075cb58e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-1847c4ab086e290a4e3a698f3bc55605fa5c24cbdef663a51a8b84d260312491.yml -openapi_spec_hash: 6ecef3ce2fc44f77781c835fefe1aa82 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5d586855fa3ef8505e3cf0c86ea7903a7f5609853c3697c6a110c88e1c3344c1.yml +openapi_spec_hash: 1afe31150fa4b2ed126b0d809513fc0a config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/audiences.ts b/src/resources/audiences.ts index a1daae46..a47df76a 100644 --- a/src/resources/audiences.ts +++ b/src/resources/audiences.ts @@ -18,11 +18,7 @@ export class Audiences extends APIResource { * members: [ * { * tenant: 'ingen_isla_nublar', - * user: { - * email: 'ellie@ingen.net', - * id: 'dr_sattler', - * name: 'Dr. Ellie Sattler', - * }, + * user: { id: 'dr_sattler' }, * }, * ], * }); @@ -54,7 +50,7 @@ export class Audiences extends APIResource { * @example * ```ts * await client.audiences.removeMembers('key', { - * members: [{ user: { id: 'dr_sattler' } }], + * members: [{ user: {} }], * }); * ``` */ @@ -127,18 +123,27 @@ export namespace AudienceAddMembersParams { */ export interface Member { /** - * A set of parameters to inline-identify a user with. Inline identifying the user - * will ensure that the user is available before the request is executed in Knock. - * It will perform an upsert for the user you're supplying, replacing any - * properties specified. + * An object containing the user's ID. */ - user: UsersAPI.InlineIdentifyUserRequest; + user: Member.User; /** * The unique identifier for the tenant. */ tenant?: string | null; } + + export namespace Member { + /** + * An object containing the user's ID. + */ + export interface User { + /** + * The unique identifier of the user. + */ + id?: string; + } + } } export interface AudienceRemoveMembersParams { @@ -154,18 +159,27 @@ export namespace AudienceRemoveMembersParams { */ export interface Member { /** - * A set of parameters to inline-identify a user with. Inline identifying the user - * will ensure that the user is available before the request is executed in Knock. - * It will perform an upsert for the user you're supplying, replacing any - * properties specified. + * An object containing the user's ID. */ - user: UsersAPI.InlineIdentifyUserRequest; + user: Member.User; /** * The unique identifier for the tenant. */ tenant?: string | null; } + + export namespace Member { + /** + * An object containing the user's ID. + */ + export interface User { + /** + * The unique identifier of the user. + */ + id?: string; + } + } } export declare namespace Audiences { diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts index 34b1cf21..89b120d5 100644 --- a/tests/api-resources/audiences.test.ts +++ b/tests/api-resources/audiences.test.ts @@ -10,7 +10,7 @@ const client = new Knock({ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('addMembers: only required params', async () => { - const responsePromise = client.audiences.addMembers('key', { members: [{ user: { id: 'dr_sattler' } }] }); + const responsePromise = client.audiences.addMembers('key', { members: [{ user: {} }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,108 +25,7 @@ describe('resource audiences', () => { const response = await client.audiences.addMembers('key', { members: [ { - user: { - id: 'dr_sattler', - avatar: 'avatar', - channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, - created_at: '2019-12-27T18:11:19.117Z', - email: 'ellie@ingen.net', - locale: 'locale', - name: 'Dr. Ellie Sattler', - phone_number: 'phone_number', - preferences: { - default: { - __persistence_strategy__: 'merge', - categories: { - marketing: false, - transactional: { - channel_types: { - chat: true, - email: false, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { - '2f641633-95d3-4555-9222-9f1eb7888a80': { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, - }, - commercial_subscribed: true, - workflows: { - 'dinosaurs-loose': { - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - }, - }, - timezone: 'America/New_York', - }, + user: { id: 'dr_sattler' }, tenant: 'ingen_isla_nublar', }, ], @@ -147,9 +46,7 @@ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('removeMembers: only required params', async () => { - const responsePromise = client.audiences.removeMembers('key', { - members: [{ user: { id: 'dr_sattler' } }], - }); + const responsePromise = client.audiences.removeMembers('key', { members: [{ user: {} }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -164,108 +61,7 @@ describe('resource audiences', () => { const response = await client.audiences.removeMembers('key', { members: [ { - user: { - id: 'dr_sattler', - avatar: 'avatar', - channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, - created_at: '2019-12-27T18:11:19.117Z', - email: 'ellie@ingen.net', - locale: 'locale', - name: 'Dr. Ellie Sattler', - phone_number: 'phone_number', - preferences: { - default: { - __persistence_strategy__: 'merge', - categories: { - marketing: false, - transactional: { - channel_types: { - chat: true, - email: false, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { - '2f641633-95d3-4555-9222-9f1eb7888a80': { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, - }, - commercial_subscribed: true, - workflows: { - 'dinosaurs-loose': { - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - }, - }, - timezone: 'America/New_York', - }, + user: { id: 'dr_sattler' }, tenant: 'ingen_isla_nublar', }, ], From 9aa302a18b8ce1b77a6d07c418e328640084bf04 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 20:03:30 +0000 Subject: [PATCH 08/33] feat(api): api update --- .stats.yml | 4 +- src/resources/audiences.ts | 46 ++---- tests/api-resources/audiences.test.ts | 212 +++++++++++++++++++++++++- 3 files changed, 226 insertions(+), 36 deletions(-) diff --git a/.stats.yml b/.stats.yml index 075cb58e..87f7c8d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5d586855fa3ef8505e3cf0c86ea7903a7f5609853c3697c6a110c88e1c3344c1.yml -openapi_spec_hash: 1afe31150fa4b2ed126b0d809513fc0a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-1847c4ab086e290a4e3a698f3bc55605fa5c24cbdef663a51a8b84d260312491.yml +openapi_spec_hash: 6ecef3ce2fc44f77781c835fefe1aa82 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/audiences.ts b/src/resources/audiences.ts index a47df76a..a1daae46 100644 --- a/src/resources/audiences.ts +++ b/src/resources/audiences.ts @@ -18,7 +18,11 @@ export class Audiences extends APIResource { * members: [ * { * tenant: 'ingen_isla_nublar', - * user: { id: 'dr_sattler' }, + * user: { + * email: 'ellie@ingen.net', + * id: 'dr_sattler', + * name: 'Dr. Ellie Sattler', + * }, * }, * ], * }); @@ -50,7 +54,7 @@ export class Audiences extends APIResource { * @example * ```ts * await client.audiences.removeMembers('key', { - * members: [{ user: {} }], + * members: [{ user: { id: 'dr_sattler' } }], * }); * ``` */ @@ -123,27 +127,18 @@ export namespace AudienceAddMembersParams { */ export interface Member { /** - * An object containing the user's ID. + * A set of parameters to inline-identify a user with. Inline identifying the user + * will ensure that the user is available before the request is executed in Knock. + * It will perform an upsert for the user you're supplying, replacing any + * properties specified. */ - user: Member.User; + user: UsersAPI.InlineIdentifyUserRequest; /** * The unique identifier for the tenant. */ tenant?: string | null; } - - export namespace Member { - /** - * An object containing the user's ID. - */ - export interface User { - /** - * The unique identifier of the user. - */ - id?: string; - } - } } export interface AudienceRemoveMembersParams { @@ -159,27 +154,18 @@ export namespace AudienceRemoveMembersParams { */ export interface Member { /** - * An object containing the user's ID. + * A set of parameters to inline-identify a user with. Inline identifying the user + * will ensure that the user is available before the request is executed in Knock. + * It will perform an upsert for the user you're supplying, replacing any + * properties specified. */ - user: Member.User; + user: UsersAPI.InlineIdentifyUserRequest; /** * The unique identifier for the tenant. */ tenant?: string | null; } - - export namespace Member { - /** - * An object containing the user's ID. - */ - export interface User { - /** - * The unique identifier of the user. - */ - id?: string; - } - } } export declare namespace Audiences { diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts index 89b120d5..34b1cf21 100644 --- a/tests/api-resources/audiences.test.ts +++ b/tests/api-resources/audiences.test.ts @@ -10,7 +10,7 @@ const client = new Knock({ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('addMembers: only required params', async () => { - const responsePromise = client.audiences.addMembers('key', { members: [{ user: {} }] }); + const responsePromise = client.audiences.addMembers('key', { members: [{ user: { id: 'dr_sattler' } }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,7 +25,108 @@ describe('resource audiences', () => { const response = await client.audiences.addMembers('key', { members: [ { - user: { id: 'dr_sattler' }, + user: { + id: 'dr_sattler', + avatar: 'avatar', + channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, + created_at: '2019-12-27T18:11:19.117Z', + email: 'ellie@ingen.net', + locale: 'locale', + name: 'Dr. Ellie Sattler', + phone_number: 'phone_number', + preferences: { + default: { + __persistence_strategy__: 'merge', + categories: { + marketing: false, + transactional: { + channel_types: { + chat: true, + email: false, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { + '2f641633-95d3-4555-9222-9f1eb7888a80': { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, + }, + commercial_subscribed: true, + workflows: { + 'dinosaurs-loose': { + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + }, + }, + timezone: 'America/New_York', + }, tenant: 'ingen_isla_nublar', }, ], @@ -46,7 +147,9 @@ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('removeMembers: only required params', async () => { - const responsePromise = client.audiences.removeMembers('key', { members: [{ user: {} }] }); + const responsePromise = client.audiences.removeMembers('key', { + members: [{ user: { id: 'dr_sattler' } }], + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -61,7 +164,108 @@ describe('resource audiences', () => { const response = await client.audiences.removeMembers('key', { members: [ { - user: { id: 'dr_sattler' }, + user: { + id: 'dr_sattler', + avatar: 'avatar', + channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, + created_at: '2019-12-27T18:11:19.117Z', + email: 'ellie@ingen.net', + locale: 'locale', + name: 'Dr. Ellie Sattler', + phone_number: 'phone_number', + preferences: { + default: { + __persistence_strategy__: 'merge', + categories: { + marketing: false, + transactional: { + channel_types: { + chat: true, + email: false, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { + '2f641633-95d3-4555-9222-9f1eb7888a80': { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, + }, + commercial_subscribed: true, + workflows: { + 'dinosaurs-loose': { + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + }, + }, + timezone: 'America/New_York', + }, tenant: 'ingen_isla_nublar', }, ], From 4ef00687d3d26bd308a9e4f4540492c4f6bbe3c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 17:57:12 +0000 Subject: [PATCH 09/33] feat(api): api update --- .stats.yml | 4 +- src/resources/audiences.ts | 46 ++++-- tests/api-resources/audiences.test.ts | 212 +------------------------- 3 files changed, 36 insertions(+), 226 deletions(-) diff --git a/.stats.yml b/.stats.yml index 87f7c8d6..075cb58e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-1847c4ab086e290a4e3a698f3bc55605fa5c24cbdef663a51a8b84d260312491.yml -openapi_spec_hash: 6ecef3ce2fc44f77781c835fefe1aa82 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5d586855fa3ef8505e3cf0c86ea7903a7f5609853c3697c6a110c88e1c3344c1.yml +openapi_spec_hash: 1afe31150fa4b2ed126b0d809513fc0a config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/audiences.ts b/src/resources/audiences.ts index a1daae46..a47df76a 100644 --- a/src/resources/audiences.ts +++ b/src/resources/audiences.ts @@ -18,11 +18,7 @@ export class Audiences extends APIResource { * members: [ * { * tenant: 'ingen_isla_nublar', - * user: { - * email: 'ellie@ingen.net', - * id: 'dr_sattler', - * name: 'Dr. Ellie Sattler', - * }, + * user: { id: 'dr_sattler' }, * }, * ], * }); @@ -54,7 +50,7 @@ export class Audiences extends APIResource { * @example * ```ts * await client.audiences.removeMembers('key', { - * members: [{ user: { id: 'dr_sattler' } }], + * members: [{ user: {} }], * }); * ``` */ @@ -127,18 +123,27 @@ export namespace AudienceAddMembersParams { */ export interface Member { /** - * A set of parameters to inline-identify a user with. Inline identifying the user - * will ensure that the user is available before the request is executed in Knock. - * It will perform an upsert for the user you're supplying, replacing any - * properties specified. + * An object containing the user's ID. */ - user: UsersAPI.InlineIdentifyUserRequest; + user: Member.User; /** * The unique identifier for the tenant. */ tenant?: string | null; } + + export namespace Member { + /** + * An object containing the user's ID. + */ + export interface User { + /** + * The unique identifier of the user. + */ + id?: string; + } + } } export interface AudienceRemoveMembersParams { @@ -154,18 +159,27 @@ export namespace AudienceRemoveMembersParams { */ export interface Member { /** - * A set of parameters to inline-identify a user with. Inline identifying the user - * will ensure that the user is available before the request is executed in Knock. - * It will perform an upsert for the user you're supplying, replacing any - * properties specified. + * An object containing the user's ID. */ - user: UsersAPI.InlineIdentifyUserRequest; + user: Member.User; /** * The unique identifier for the tenant. */ tenant?: string | null; } + + export namespace Member { + /** + * An object containing the user's ID. + */ + export interface User { + /** + * The unique identifier of the user. + */ + id?: string; + } + } } export declare namespace Audiences { diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts index 34b1cf21..89b120d5 100644 --- a/tests/api-resources/audiences.test.ts +++ b/tests/api-resources/audiences.test.ts @@ -10,7 +10,7 @@ const client = new Knock({ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('addMembers: only required params', async () => { - const responsePromise = client.audiences.addMembers('key', { members: [{ user: { id: 'dr_sattler' } }] }); + const responsePromise = client.audiences.addMembers('key', { members: [{ user: {} }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,108 +25,7 @@ describe('resource audiences', () => { const response = await client.audiences.addMembers('key', { members: [ { - user: { - id: 'dr_sattler', - avatar: 'avatar', - channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, - created_at: '2019-12-27T18:11:19.117Z', - email: 'ellie@ingen.net', - locale: 'locale', - name: 'Dr. Ellie Sattler', - phone_number: 'phone_number', - preferences: { - default: { - __persistence_strategy__: 'merge', - categories: { - marketing: false, - transactional: { - channel_types: { - chat: true, - email: false, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { - '2f641633-95d3-4555-9222-9f1eb7888a80': { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, - }, - commercial_subscribed: true, - workflows: { - 'dinosaurs-loose': { - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - }, - }, - timezone: 'America/New_York', - }, + user: { id: 'dr_sattler' }, tenant: 'ingen_isla_nublar', }, ], @@ -147,9 +46,7 @@ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('removeMembers: only required params', async () => { - const responsePromise = client.audiences.removeMembers('key', { - members: [{ user: { id: 'dr_sattler' } }], - }); + const responsePromise = client.audiences.removeMembers('key', { members: [{ user: {} }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -164,108 +61,7 @@ describe('resource audiences', () => { const response = await client.audiences.removeMembers('key', { members: [ { - user: { - id: 'dr_sattler', - avatar: 'avatar', - channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, - created_at: '2019-12-27T18:11:19.117Z', - email: 'ellie@ingen.net', - locale: 'locale', - name: 'Dr. Ellie Sattler', - phone_number: 'phone_number', - preferences: { - default: { - __persistence_strategy__: 'merge', - categories: { - marketing: false, - transactional: { - channel_types: { - chat: true, - email: false, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { - '2f641633-95d3-4555-9222-9f1eb7888a80': { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, - }, - commercial_subscribed: true, - workflows: { - 'dinosaurs-loose': { - channel_types: { - chat: true, - email: true, - http: true, - in_app_feed: true, - push: true, - sms: { - conditions: [ - { - argument: 'US', - operator: 'equal_to', - variable: 'recipient.country_code', - }, - ], - }, - }, - channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, - conditions: [ - { - argument: 'frog_genome', - operator: 'contains', - variable: 'specimen.dna_sequence', - }, - ], - }, - }, - }, - }, - timezone: 'America/New_York', - }, + user: { id: 'dr_sattler' }, tenant: 'ingen_isla_nublar', }, ], From 510da5211c4d52dc3ff9aedc0a95a1ce689bd1dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:58:47 +0000 Subject: [PATCH 10/33] feat(api): api update --- .stats.yml | 4 +- src/resources/audiences.ts | 46 ++---- src/resources/users/feeds.ts | 3 + tests/api-resources/audiences.test.ts | 212 +++++++++++++++++++++++++- 4 files changed, 229 insertions(+), 36 deletions(-) diff --git a/.stats.yml b/.stats.yml index 075cb58e..f7645e98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-5d586855fa3ef8505e3cf0c86ea7903a7f5609853c3697c6a110c88e1c3344c1.yml -openapi_spec_hash: 1afe31150fa4b2ed126b0d809513fc0a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-051fb64fc98086ac7435196316e0aee760dce287ac9e44eed11ea243893498c9.yml +openapi_spec_hash: c3cea367a962be6faea1e8fba430ed3c config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/audiences.ts b/src/resources/audiences.ts index a47df76a..a1daae46 100644 --- a/src/resources/audiences.ts +++ b/src/resources/audiences.ts @@ -18,7 +18,11 @@ export class Audiences extends APIResource { * members: [ * { * tenant: 'ingen_isla_nublar', - * user: { id: 'dr_sattler' }, + * user: { + * email: 'ellie@ingen.net', + * id: 'dr_sattler', + * name: 'Dr. Ellie Sattler', + * }, * }, * ], * }); @@ -50,7 +54,7 @@ export class Audiences extends APIResource { * @example * ```ts * await client.audiences.removeMembers('key', { - * members: [{ user: {} }], + * members: [{ user: { id: 'dr_sattler' } }], * }); * ``` */ @@ -123,27 +127,18 @@ export namespace AudienceAddMembersParams { */ export interface Member { /** - * An object containing the user's ID. + * A set of parameters to inline-identify a user with. Inline identifying the user + * will ensure that the user is available before the request is executed in Knock. + * It will perform an upsert for the user you're supplying, replacing any + * properties specified. */ - user: Member.User; + user: UsersAPI.InlineIdentifyUserRequest; /** * The unique identifier for the tenant. */ tenant?: string | null; } - - export namespace Member { - /** - * An object containing the user's ID. - */ - export interface User { - /** - * The unique identifier of the user. - */ - id?: string; - } - } } export interface AudienceRemoveMembersParams { @@ -159,27 +154,18 @@ export namespace AudienceRemoveMembersParams { */ export interface Member { /** - * An object containing the user's ID. + * A set of parameters to inline-identify a user with. Inline identifying the user + * will ensure that the user is available before the request is executed in Knock. + * It will perform an upsert for the user you're supplying, replacing any + * properties specified. */ - user: Member.User; + user: UsersAPI.InlineIdentifyUserRequest; /** * The unique identifier for the tenant. */ tenant?: string | null; } - - export namespace Member { - /** - * An object containing the user's ID. - */ - export interface User { - /** - * The unique identifier of the user. - */ - id?: string; - } - } } export declare namespace Audiences { diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 9787a311..5f781f0f 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -39,6 +39,9 @@ export class Feeds extends APIResource { * along with a user token. * - This endpoint’s rate limit is always scoped per-user and per-environment. This * is true even for requests made without a signed user token. + * - Any [attachments](/integrations/email/attachments) present in trigger data are + * automatically excluded from both the `data` and `activities` fields of + * `UserInAppFeedResponse`. * * @example * ```ts diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts index 89b120d5..34b1cf21 100644 --- a/tests/api-resources/audiences.test.ts +++ b/tests/api-resources/audiences.test.ts @@ -10,7 +10,7 @@ const client = new Knock({ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('addMembers: only required params', async () => { - const responsePromise = client.audiences.addMembers('key', { members: [{ user: {} }] }); + const responsePromise = client.audiences.addMembers('key', { members: [{ user: { id: 'dr_sattler' } }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,7 +25,108 @@ describe('resource audiences', () => { const response = await client.audiences.addMembers('key', { members: [ { - user: { id: 'dr_sattler' }, + user: { + id: 'dr_sattler', + avatar: 'avatar', + channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, + created_at: '2019-12-27T18:11:19.117Z', + email: 'ellie@ingen.net', + locale: 'locale', + name: 'Dr. Ellie Sattler', + phone_number: 'phone_number', + preferences: { + default: { + __persistence_strategy__: 'merge', + categories: { + marketing: false, + transactional: { + channel_types: { + chat: true, + email: false, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { + '2f641633-95d3-4555-9222-9f1eb7888a80': { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, + }, + commercial_subscribed: true, + workflows: { + 'dinosaurs-loose': { + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + }, + }, + timezone: 'America/New_York', + }, tenant: 'ingen_isla_nublar', }, ], @@ -46,7 +147,9 @@ describe('resource audiences', () => { // Prism doesn't support callbacks yet test.skip('removeMembers: only required params', async () => { - const responsePromise = client.audiences.removeMembers('key', { members: [{ user: {} }] }); + const responsePromise = client.audiences.removeMembers('key', { + members: [{ user: { id: 'dr_sattler' } }], + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -61,7 +164,108 @@ describe('resource audiences', () => { const response = await client.audiences.removeMembers('key', { members: [ { - user: { id: 'dr_sattler' }, + user: { + id: 'dr_sattler', + avatar: 'avatar', + channel_data: { '97c5837d-c65c-4d54-aa39-080eeb81c69d': { tokens: ['push_token_123'] } }, + created_at: '2019-12-27T18:11:19.117Z', + email: 'ellie@ingen.net', + locale: 'locale', + name: 'Dr. Ellie Sattler', + phone_number: 'phone_number', + preferences: { + default: { + __persistence_strategy__: 'merge', + categories: { + marketing: false, + transactional: { + channel_types: { + chat: true, + email: false, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { + '2f641633-95d3-4555-9222-9f1eb7888a80': { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true, + }, + commercial_subscribed: true, + workflows: { + 'dinosaurs-loose': { + channel_types: { + chat: true, + email: true, + http: true, + in_app_feed: true, + push: true, + sms: { + conditions: [ + { + argument: 'US', + operator: 'equal_to', + variable: 'recipient.country_code', + }, + ], + }, + }, + channels: { 'aef6e715-df82-4ab6-b61e-b743e249f7b6': true }, + conditions: [ + { + argument: 'frog_genome', + operator: 'contains', + variable: 'specimen.dna_sequence', + }, + ], + }, + }, + }, + }, + timezone: 'America/New_York', + }, tenant: 'ingen_isla_nublar', }, ], From 77ebc623dcba86c33fd0685bf622fb372be47b91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:21:09 +0000 Subject: [PATCH 11/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/users/feeds.ts | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index f7645e98..87f7c8d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-051fb64fc98086ac7435196316e0aee760dce287ac9e44eed11ea243893498c9.yml -openapi_spec_hash: c3cea367a962be6faea1e8fba430ed3c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-1847c4ab086e290a4e3a698f3bc55605fa5c24cbdef663a51a8b84d260312491.yml +openapi_spec_hash: 6ecef3ce2fc44f77781c835fefe1aa82 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 5f781f0f..9787a311 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -39,9 +39,6 @@ export class Feeds extends APIResource { * along with a user token. * - This endpoint’s rate limit is always scoped per-user and per-environment. This * is true even for requests made without a signed user token. - * - Any [attachments](/integrations/email/attachments) present in trigger data are - * automatically excluded from both the `data` and `activities` fields of - * `UserInAppFeedResponse`. * * @example * ```ts From 5def577b5e605cdd62e2d8e98d98543fc936e0b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:22:04 +0000 Subject: [PATCH 12/33] chore(internal): codegen related update --- .github/workflows/release-doctor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 85238b69..e23c9cba 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -19,4 +19,3 @@ jobs: bash ./bin/check-release-environment env: NPM_TOKEN: ${{ secrets.KNOCK_NPM_TOKEN || secrets.NPM_TOKEN }} - From 8ff53b4798307b7d4a3feb5febdb3bfb3c039c43 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 21:46:04 +0000 Subject: [PATCH 13/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/users/feeds.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 87f7c8d6..f7645e98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-1847c4ab086e290a4e3a698f3bc55605fa5c24cbdef663a51a8b84d260312491.yml -openapi_spec_hash: 6ecef3ce2fc44f77781c835fefe1aa82 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-051fb64fc98086ac7435196316e0aee760dce287ac9e44eed11ea243893498c9.yml +openapi_spec_hash: c3cea367a962be6faea1e8fba430ed3c config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 9787a311..5f781f0f 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -39,6 +39,9 @@ export class Feeds extends APIResource { * along with a user token. * - This endpoint’s rate limit is always scoped per-user and per-environment. This * is true even for requests made without a signed user token. + * - Any [attachments](/integrations/email/attachments) present in trigger data are + * automatically excluded from both the `data` and `activities` fields of + * `UserInAppFeedResponse`. * * @example * ```ts From b6121912872235644a76d4f5df5c260c41fc2b74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 19:29:25 +0000 Subject: [PATCH 14/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/users/guides.ts | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index f7645e98..65a6aaf6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-051fb64fc98086ac7435196316e0aee760dce287ac9e44eed11ea243893498c9.yml -openapi_spec_hash: c3cea367a962be6faea1e8fba430ed3c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-6458a8bd2021d6d33af7b8b477bd0bdef7270dd2f78fa7891048d519f0d65b22.yml +openapi_spec_hash: 37319ec82d920729dab3ab05ff75f4fc config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/users/guides.ts b/src/resources/users/guides.ts index db955583..29f08f58 100644 --- a/src/resources/users/guides.ts +++ b/src/resources/users/guides.ts @@ -223,6 +223,11 @@ export namespace GuideGetChannelResponse { * The pathname pattern to match (supports wildcards like /\*) */ pathname?: string; + + /** + * The search query params to match + */ + search?: string; } export interface ActivationURLRule { @@ -232,7 +237,7 @@ export namespace GuideGetChannelResponse { argument?: string; /** - * The directive for the URL pattern ('allow' or 'block') + * The directive for the URL rule ('allow' or 'block') */ directive?: string; From c4707a23b196e3af7f6878f5ca0651d11999f73f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 22:23:46 +0000 Subject: [PATCH 15/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/users/feeds.ts | 7 +++++++ tests/api-resources/users/feeds.test.ts | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 65a6aaf6..2bf56627 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-6458a8bd2021d6d33af7b8b477bd0bdef7270dd2f78fa7891048d519f0d65b22.yml -openapi_spec_hash: 37319ec82d920729dab3ab05ff75f4fc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-4b4fbdc099ed979179d6bd7ddca62288d6ccfebc6df8cabd9fb9b99431c60670.yml +openapi_spec_hash: 3a56e00132d1b0a5a4d5968466ac374b config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 5f781f0f..031d27e9 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -289,6 +289,13 @@ export interface FeedListItemsParams extends EntriesCursorParams { */ archived?: 'exclude' | 'include' | 'only'; + /** + * Comma-separated list of field paths to exclude from the response. Use dot + * notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels + * deep. + */ + exclude?: string; + /** * Whether the feed items have a tenant. */ diff --git a/tests/api-resources/users/feeds.test.ts b/tests/api-resources/users/feeds.test.ts index fcdf2df9..65b0a255 100644 --- a/tests/api-resources/users/feeds.test.ts +++ b/tests/api-resources/users/feeds.test.ts @@ -43,6 +43,7 @@ describe('resource feeds', () => { after: 'after', archived: 'exclude', before: 'before', + exclude: 'exclude', has_tenant: true, locale: 'locale', page_size: 0, From d8cb36276de54fa1328b5b8bcae66ba5b3ce1aad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 12:31:55 +0000 Subject: [PATCH 16/33] fix(client): avoid memory leak with abort signals --- src/client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index c34f0d2e..f2f1ad2b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -653,9 +653,10 @@ export class Knock { controller: AbortController, ): Promise { const { signal, method, ...options } = init || {}; - if (signal) signal.addEventListener('abort', () => controller.abort()); + const abort = controller.abort.bind(controller); + if (signal) signal.addEventListener('abort', abort, { once: true }); - const timeout = setTimeout(() => controller.abort(), ms); + const timeout = setTimeout(abort, ms); const isReadableBody = ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || From 5feca1ec81e627f3ffadcd5ae4a406bdb2e80a65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 16:28:19 +0000 Subject: [PATCH 17/33] chore(client): do not parse responses with empty content-length --- src/internal/parse.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/internal/parse.ts b/src/internal/parse.ts index f7a89ef0..c143db9b 100644 --- a/src/internal/parse.ts +++ b/src/internal/parse.ts @@ -29,6 +29,12 @@ export async function defaultParseResponse(client: Knock, props: APIResponseP const mediaType = contentType?.split(';')[0]?.trim(); const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json'); if (isJSON) { + const contentLength = response.headers.get('content-length'); + if (contentLength === '0') { + // if there is no content we can't do anything + return undefined as T; + } + const json = await response.json(); return json as T; } From dfcbdc952b7e7d2ad619cd1bbf1e0e8eb445c18a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:04:46 +0000 Subject: [PATCH 18/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/users/feeds.ts | 8 ++++++++ tests/api-resources/users/feeds.test.ts | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2bf56627..4c6f37f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-4b4fbdc099ed979179d6bd7ddca62288d6ccfebc6df8cabd9fb9b99431c60670.yml -openapi_spec_hash: 3a56e00132d1b0a5a4d5968466ac374b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-0589ea6ca13a0fbe7429a487ffa74028f1a0652b4f43b6d2d354566f792397b5.yml +openapi_spec_hash: 73a82f83717db9b9522dc27309ed01c6 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 031d27e9..4ca8b7a7 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -309,6 +309,14 @@ export interface FeedListItemsParams extends EntriesCursorParams { */ locale?: string; + /** + * The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + * `rich`. When `mode` is `compact`, feed items will not have `activities` and + * `total_activities` fields, and the `data` field will not include nested arrays + * and objects. + */ + mode?: 'compact' | 'rich'; + /** * The workflow key associated with the message in the feed. */ diff --git a/tests/api-resources/users/feeds.test.ts b/tests/api-resources/users/feeds.test.ts index 65b0a255..4c9571f5 100644 --- a/tests/api-resources/users/feeds.test.ts +++ b/tests/api-resources/users/feeds.test.ts @@ -46,6 +46,7 @@ describe('resource feeds', () => { exclude: 'exclude', has_tenant: true, locale: 'locale', + mode: 'compact', page_size: 0, source: 'source', status: 'unread', From 79f1bfe1cfdd25fda0ddc823c9dffa6f07fa08b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:20:01 +0000 Subject: [PATCH 19/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/users/feeds.ts | 8 -------- tests/api-resources/users/feeds.test.ts | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4c6f37f8..2bf56627 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-0589ea6ca13a0fbe7429a487ffa74028f1a0652b4f43b6d2d354566f792397b5.yml -openapi_spec_hash: 73a82f83717db9b9522dc27309ed01c6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-4b4fbdc099ed979179d6bd7ddca62288d6ccfebc6df8cabd9fb9b99431c60670.yml +openapi_spec_hash: 3a56e00132d1b0a5a4d5968466ac374b config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 4ca8b7a7..031d27e9 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -309,14 +309,6 @@ export interface FeedListItemsParams extends EntriesCursorParams { */ locale?: string; - /** - * The mode to render the feed items in. Can be `compact` or `rich`. Defaults to - * `rich`. When `mode` is `compact`, feed items will not have `activities` and - * `total_activities` fields, and the `data` field will not include nested arrays - * and objects. - */ - mode?: 'compact' | 'rich'; - /** * The workflow key associated with the message in the feed. */ diff --git a/tests/api-resources/users/feeds.test.ts b/tests/api-resources/users/feeds.test.ts index 4c9571f5..65b0a255 100644 --- a/tests/api-resources/users/feeds.test.ts +++ b/tests/api-resources/users/feeds.test.ts @@ -46,7 +46,6 @@ describe('resource feeds', () => { exclude: 'exclude', has_tenant: true, locale: 'locale', - mode: 'compact', page_size: 0, source: 'source', status: 'unread', From dbc9d1a37f329b417592bcda6d5b79f5f9f705cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 18:39:45 +0000 Subject: [PATCH 20/33] chore(client): restructure abort controller binding --- src/client.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index f2f1ad2b..4071a835 100644 --- a/src/client.ts +++ b/src/client.ts @@ -653,7 +653,7 @@ export class Knock { controller: AbortController, ): Promise { const { signal, method, ...options } = init || {}; - const abort = controller.abort.bind(controller); + const abort = this._makeAbort(controller); if (signal) signal.addEventListener('abort', abort, { once: true }); const timeout = setTimeout(abort, ms); @@ -679,6 +679,7 @@ export class Knock { return await this.fetch.call(undefined, url, fetchOptions); } finally { clearTimeout(timeout); + if (signal) signal.removeEventListener('abort', abort); } } @@ -824,6 +825,12 @@ export class Knock { return headers.values; } + private _makeAbort(controller: AbortController) { + // note: we can't just inline this method inside `fetchWithTimeout()` because then the closure + // would capture all request options, and cause a memory leak. + return () => controller.abort(); + } + private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { bodyHeaders: HeadersLike; body: BodyInit | undefined; From dfe3e705d5a5c9ab74c1885f6b7ed8f563b3662b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 14:09:47 +0000 Subject: [PATCH 21/33] fix(client): avoid removing abort listener too early --- src/client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 4071a835..be315eaa 100644 --- a/src/client.ts +++ b/src/client.ts @@ -679,7 +679,6 @@ export class Knock { return await this.fetch.call(undefined, url, fetchOptions); } finally { clearTimeout(timeout); - if (signal) signal.removeEventListener('abort', abort); } } From 311a889981ab8f3531e41633039106ce421f0f7c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 14:19:50 +0000 Subject: [PATCH 22/33] chore(internal): fix pagination internals not accepting option promises --- src/client.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index be315eaa..2b1f2898 100644 --- a/src/client.ts +++ b/src/client.ts @@ -630,9 +630,14 @@ export class Knock { getAPIList = Pagination.AbstractPage>( path: string, Page: new (...args: any[]) => PageClass, - opts?: RequestOptions, + opts?: PromiseOrValue, ): Pagination.PagePromise { - return this.requestAPIList(Page, { method: 'get', path, ...opts }); + return this.requestAPIList( + Page, + opts && 'then' in opts ? + opts.then((opts) => ({ method: 'get', path, ...opts })) + : { method: 'get', path, ...opts }, + ); } requestAPIList< @@ -640,7 +645,7 @@ export class Knock { PageClass extends Pagination.AbstractPage = Pagination.AbstractPage, >( Page: new (...args: ConstructorParameters) => PageClass, - options: FinalRequestOptions, + options: PromiseOrValue, ): Pagination.PagePromise { const request = this.makeRequest(options, null, undefined); return new Pagination.PagePromise(this as any as Knock, request, Page); From 2b49b60b0aaabfcebdc6aae066f3b40c2af13809 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:29:59 +0000 Subject: [PATCH 23/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/audiences.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2bf56627..8d6478c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-4b4fbdc099ed979179d6bd7ddca62288d6ccfebc6df8cabd9fb9b99431c60670.yml -openapi_spec_hash: 3a56e00132d1b0a5a4d5968466ac374b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-7f69baccdc6a43ebd1e5ed9c6f44b36e3b663c693b51e2a5881b0a8a32a5e7e8.yml +openapi_spec_hash: c0b2a527baa164aff76415567cdbf59f config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/audiences.ts b/src/resources/audiences.ts index a1daae46..dddf0d2e 100644 --- a/src/resources/audiences.ts +++ b/src/resources/audiences.ts @@ -116,7 +116,7 @@ export interface AudienceListMembersResponse { export interface AudienceAddMembersParams { /** - * A list of audience members to add. Limited to 1,000 members per request. + * A list of audience members to add. You can add up to 1,000 members per request. */ members: Array; } @@ -143,7 +143,8 @@ export namespace AudienceAddMembersParams { export interface AudienceRemoveMembersParams { /** - * A list of audience members to remove. + * A list of audience members to remove. You can remove up to 1,000 members per + * request. */ members: Array; } From 4bbd1e147c3c2c4a0003e255f365a7de6fd3670d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 14:53:31 +0000 Subject: [PATCH 24/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/messages/messages.ts | 8 ++++---- src/resources/objects/objects.ts | 8 ++++---- src/resources/users/feeds.ts | 26 +++++++++++++++++++++++++ src/resources/users/users.ts | 8 ++++---- tests/api-resources/users/feeds.test.ts | 6 ++++++ 6 files changed, 46 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8d6478c7..57d3087e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-7f69baccdc6a43ebd1e5ed9c6f44b36e3b663c693b51e2a5881b0a8a32a5e7e8.yml -openapi_spec_hash: c0b2a527baa164aff76415567cdbf59f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-c1c937429e6b60a25c3ad976c84a44177277e1ba231f27d5d2a0145a99a20175.yml +openapi_spec_hash: 2779bd135259a3b477efb9e72251237b config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/messages/messages.ts b/src/resources/messages/messages.ts index 44677eaa..6fe655a8 100644 --- a/src/resources/messages/messages.ts +++ b/src/resources/messages/messages.ts @@ -1031,22 +1031,22 @@ export interface MessageListParams extends ItemsCursorParams { export namespace MessageListParams { export interface InsertedAt { /** - * Limits the results to messages inserted after the given date. + * Limits the results to items inserted after the given date. */ gt?: string; /** - * Limits the results to messages inserted after or on the given date. + * Limits the results to items inserted after or on the given date. */ gte?: string; /** - * Limits the results to messages inserted before the given date. + * Limits the results to items inserted before the given date. */ lt?: string; /** - * Limits the results to messages inserted before or on the given date. + * Limits the results to items inserted before or on the given date. */ lte?: string; } diff --git a/src/resources/objects/objects.ts b/src/resources/objects/objects.ts index a03b6877..4a51b44e 100644 --- a/src/resources/objects/objects.ts +++ b/src/resources/objects/objects.ts @@ -609,22 +609,22 @@ export interface ObjectListMessagesParams extends ItemsCursorParams { export namespace ObjectListMessagesParams { export interface InsertedAt { /** - * Limits the results to messages inserted after the given date. + * Limits the results to items inserted after the given date. */ gt?: string; /** - * Limits the results to messages inserted after or on the given date. + * Limits the results to items inserted after or on the given date. */ gte?: string; /** - * Limits the results to messages inserted before the given date. + * Limits the results to items inserted before the given date. */ lt?: string; /** - * Limits the results to messages inserted before or on the given date. + * Limits the results to items inserted before or on the given date. */ lte?: string; } diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 031d27e9..85e8cb48 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -301,6 +301,8 @@ export interface FeedListItemsParams extends EntriesCursorParams { */ has_tenant?: boolean; + inserted_at?: FeedListItemsParams.InsertedAt; + /** * The locale to render the feed items in. Must be in the IETF 5646 format (e.g. * `en-US`). When not provided, will default to the locale that the feed items were @@ -335,6 +337,30 @@ export interface FeedListItemsParams extends EntriesCursorParams { workflow_categories?: Array; } +export namespace FeedListItemsParams { + export interface InsertedAt { + /** + * Limits the results to items inserted after the given date. + */ + gt?: string; + + /** + * Limits the results to items inserted after or on the given date. + */ + gte?: string; + + /** + * Limits the results to items inserted before the given date. + */ + lt?: string; + + /** + * Limits the results to items inserted before or on the given date. + */ + lte?: string; + } +} + export declare namespace Feeds { export { type FeedGetSettingsResponse as FeedGetSettingsResponse, diff --git a/src/resources/users/users.ts b/src/resources/users/users.ts index a524881c..9f13d44e 100644 --- a/src/resources/users/users.ts +++ b/src/resources/users/users.ts @@ -691,22 +691,22 @@ export interface UserListMessagesParams extends ItemsCursorParams { export namespace UserListMessagesParams { export interface InsertedAt { /** - * Limits the results to messages inserted after the given date. + * Limits the results to items inserted after the given date. */ gt?: string; /** - * Limits the results to messages inserted after or on the given date. + * Limits the results to items inserted after or on the given date. */ gte?: string; /** - * Limits the results to messages inserted before the given date. + * Limits the results to items inserted before the given date. */ lt?: string; /** - * Limits the results to messages inserted before or on the given date. + * Limits the results to items inserted before or on the given date. */ lte?: string; } diff --git a/tests/api-resources/users/feeds.test.ts b/tests/api-resources/users/feeds.test.ts index 65b0a255..f37314b6 100644 --- a/tests/api-resources/users/feeds.test.ts +++ b/tests/api-resources/users/feeds.test.ts @@ -45,6 +45,12 @@ describe('resource feeds', () => { before: 'before', exclude: 'exclude', has_tenant: true, + inserted_at: { + gt: 'gt', + gte: 'gte', + lt: 'lt', + lte: 'lte', + }, locale: 'locale', page_size: 0, source: 'source', From 45054dfc1940893305dbf902f8d0b83ad4f57aa4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 15:47:01 +0000 Subject: [PATCH 25/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/users/feeds.ts | 8 ++++++++ tests/api-resources/users/feeds.test.ts | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 57d3087e..da73acdf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-c1c937429e6b60a25c3ad976c84a44177277e1ba231f27d5d2a0145a99a20175.yml -openapi_spec_hash: 2779bd135259a3b477efb9e72251237b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-27184418cc06dab3a5bb109116c85fa740df9a140150d2eb9f4c73389905b8fb.yml +openapi_spec_hash: 2aad0a6198ffa00d400bce3b8e41d2e5 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/users/feeds.ts b/src/resources/users/feeds.ts index 85e8cb48..df45bbbf 100644 --- a/src/resources/users/feeds.ts +++ b/src/resources/users/feeds.ts @@ -311,6 +311,14 @@ export interface FeedListItemsParams extends EntriesCursorParams { */ locale?: string; + /** + * The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + * `rich`. When `mode` is `compact`, feed items will not have `activities` and + * `total_activities` fields; the `data` field will not include nested arrays and + * objects; and the `actors` field will only have up to one actor. + */ + mode?: 'compact' | 'rich'; + /** * The workflow key associated with the message in the feed. */ diff --git a/tests/api-resources/users/feeds.test.ts b/tests/api-resources/users/feeds.test.ts index f37314b6..6170f48e 100644 --- a/tests/api-resources/users/feeds.test.ts +++ b/tests/api-resources/users/feeds.test.ts @@ -52,6 +52,7 @@ describe('resource feeds', () => { lte: 'lte', }, locale: 'locale', + mode: 'compact', page_size: 0, source: 'source', status: 'unread', From 666d1b444d89c58b59e30dd59b53d9e38497dc42 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:08:32 +0000 Subject: [PATCH 26/33] chore(internal): avoid type checking errors with ts-reset --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 2b1f2898..26372983 100644 --- a/src/client.ts +++ b/src/client.ts @@ -593,7 +593,7 @@ export class Knock { loggerFor(this).info(`${responseInfo} - ${retryMessage}`); const errText = await response.text().catch((err: any) => castToError(err).message); - const errJSON = safeJSON(errText); + const errJSON = safeJSON(errText) as any; const errMessage = errJSON ? undefined : errText; loggerFor(this).debug( From d70cd83026b494bfce38bf9733c9dc30190ad7eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:39:48 +0000 Subject: [PATCH 27/33] chore(internal/client): fix form-urlencoded requests --- src/client.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client.ts b/src/client.ts index 26372983..86184abd 100644 --- a/src/client.ts +++ b/src/client.ts @@ -867,6 +867,14 @@ export class Knock { (Symbol.iterator in body && 'next' in body && typeof body.next === 'function')) ) { return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable) }; + } else if ( + typeof body === 'object' && + headers.values.get('content-type') === 'application/x-www-form-urlencoded' + ) { + return { + bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' }, + body: this.stringifyQuery(body as Record), + }; } else { return this.#encoder({ body, headers }); } From ed982d39a49d9e088e1e9d14e49f363ce7845e72 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 21:31:53 +0000 Subject: [PATCH 28/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/shared.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index da73acdf..c3949d8a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-27184418cc06dab3a5bb109116c85fa740df9a140150d2eb9f4c73389905b8fb.yml -openapi_spec_hash: 2aad0a6198ffa00d400bce3b8e41d2e5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-88a102445653d194816bad7019132156dc95e5c2cb21d6b2df7b09c039ed842a.yml +openapi_spec_hash: 068a3c3953e86191a84af8bd07778b25 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/shared.ts b/src/resources/shared.ts index cd252bdc..062f98d5 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -23,6 +23,8 @@ export interface Condition { | 'not_contains' | 'empty' | 'not_empty' + | 'exists' + | 'not_exists' | 'contains_all' | 'is_timestamp' | 'is_not_timestamp' From 8cf1cb904850e248e85fe6fcf0dc5716c49b43db Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 20:52:53 +0000 Subject: [PATCH 29/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/shared.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c3949d8a..da73acdf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-88a102445653d194816bad7019132156dc95e5c2cb21d6b2df7b09c039ed842a.yml -openapi_spec_hash: 068a3c3953e86191a84af8bd07778b25 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-27184418cc06dab3a5bb109116c85fa740df9a140150d2eb9f4c73389905b8fb.yml +openapi_spec_hash: 2aad0a6198ffa00d400bce3b8e41d2e5 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 062f98d5..cd252bdc 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -23,8 +23,6 @@ export interface Condition { | 'not_contains' | 'empty' | 'not_empty' - | 'exists' - | 'not_exists' | 'contains_all' | 'is_timestamp' | 'is_not_timestamp' From f8e68be9c029ad400225d6df05e33a26a78cb22e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:33:03 +0000 Subject: [PATCH 30/33] chore: update mock server docs --- CONTRIBUTING.md | 2 +- tests/api-resources/audiences.test.ts | 10 ++--- tests/api-resources/bulk-operations.test.ts | 2 +- tests/api-resources/channels/bulk.test.ts | 2 +- .../api-resources/integrations/census.test.ts | 4 +- .../integrations/hightouch.test.ts | 4 +- tests/api-resources/messages/batch.test.ts | 32 +++++++------- tests/api-resources/messages/messages.test.ts | 36 +++++++-------- tests/api-resources/objects/bulk.test.ts | 16 +++---- tests/api-resources/objects/objects.test.ts | 44 +++++++++---------- .../api-resources/providers/ms-teams.test.ts | 16 +++---- tests/api-resources/providers/slack.test.ts | 12 ++--- tests/api-resources/schedules/bulk.test.ts | 4 +- .../api-resources/schedules/schedules.test.ts | 16 +++---- tests/api-resources/tenants/bulk.test.ts | 8 ++-- tests/api-resources/tenants/tenants.test.ts | 12 ++--- tests/api-resources/users/bulk.test.ts | 12 ++--- tests/api-resources/users/feeds.test.ts | 6 +-- tests/api-resources/users/guides.test.ts | 16 +++---- tests/api-resources/users/users.test.ts | 42 +++++++++--------- tests/api-resources/workflows.test.ts | 8 ++-- 21 files changed, 152 insertions(+), 152 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43068c3e..f48ccd95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,7 @@ $ pnpm link -—global @knocklabs/node Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. ```sh -$ npx prism mock path/to/your/openapi.yml +$ ./scripts/mock ``` ```sh diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts index 34b1cf21..31ac3df5 100644 --- a/tests/api-resources/audiences.test.ts +++ b/tests/api-resources/audiences.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource audiences', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('addMembers: only required params', async () => { const responsePromise = client.audiences.addMembers('key', { members: [{ user: { id: 'dr_sattler' } }] }); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource audiences', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('addMembers: required and optional params', async () => { const response = await client.audiences.addMembers('key', { members: [ @@ -133,7 +133,7 @@ describe('resource audiences', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listMembers', async () => { const responsePromise = client.audiences.listMembers('key'); const rawResponse = await responsePromise.asResponse(); @@ -145,7 +145,7 @@ describe('resource audiences', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('removeMembers: only required params', async () => { const responsePromise = client.audiences.removeMembers('key', { members: [{ user: { id: 'dr_sattler' } }], @@ -159,7 +159,7 @@ describe('resource audiences', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('removeMembers: required and optional params', async () => { const response = await client.audiences.removeMembers('key', { members: [ diff --git a/tests/api-resources/bulk-operations.test.ts b/tests/api-resources/bulk-operations.test.ts index 7ddc5b66..b1223bff 100644 --- a/tests/api-resources/bulk-operations.test.ts +++ b/tests/api-resources/bulk-operations.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource bulkOperations', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('get', async () => { const responsePromise = client.bulkOperations.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/channels/bulk.test.ts b/tests/api-resources/channels/bulk.test.ts index 5d755403..1ae1ad19 100644 --- a/tests/api-resources/channels/bulk.test.ts +++ b/tests/api-resources/channels/bulk.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource bulk', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('updateMessageStatus', async () => { const responsePromise = client.channels.bulk.updateMessageStatus( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', diff --git a/tests/api-resources/integrations/census.test.ts b/tests/api-resources/integrations/census.test.ts index d58f776d..e1cfb8d6 100644 --- a/tests/api-resources/integrations/census.test.ts +++ b/tests/api-resources/integrations/census.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource census', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('customDestination: only required params', async () => { const responsePromise = client.integrations.census.customDestination({ id: 'id', @@ -24,7 +24,7 @@ describe('resource census', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('customDestination: required and optional params', async () => { const response = await client.integrations.census.customDestination({ id: 'id', diff --git a/tests/api-resources/integrations/hightouch.test.ts b/tests/api-resources/integrations/hightouch.test.ts index f7880d4f..b122fd52 100644 --- a/tests/api-resources/integrations/hightouch.test.ts +++ b/tests/api-resources/integrations/hightouch.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource hightouch', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('embeddedDestination: only required params', async () => { const responsePromise = client.integrations.hightouch.embeddedDestination({ id: 'id', @@ -24,7 +24,7 @@ describe('resource hightouch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('embeddedDestination: required and optional params', async () => { const response = await client.integrations.hightouch.embeddedDestination({ id: 'id', diff --git a/tests/api-resources/messages/batch.test.ts b/tests/api-resources/messages/batch.test.ts index a6cf14a9..6c2ea339 100644 --- a/tests/api-resources/messages/batch.test.ts +++ b/tests/api-resources/messages/batch.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource batch', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('archive: only required params', async () => { const responsePromise = client.messages.batch.archive({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], @@ -22,14 +22,14 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('archive: required and optional params', async () => { const response = await client.messages.batch.archive({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getContent: only required params', async () => { const responsePromise = client.messages.batch.getContent({ message_ids: ['string'] }); const rawResponse = await responsePromise.asResponse(); @@ -41,12 +41,12 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getContent: required and optional params', async () => { const response = await client.messages.batch.getContent({ message_ids: ['string'] }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsInteracted: only required params', async () => { const responsePromise = client.messages.batch.markAsInteracted({ message_ids: ['1jNaXzB2RZX3LY8wVQnfCKyPnv7'], @@ -60,7 +60,7 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsInteracted: required and optional params', async () => { const response = await client.messages.batch.markAsInteracted({ message_ids: ['1jNaXzB2RZX3LY8wVQnfCKyPnv7'], @@ -68,7 +68,7 @@ describe('resource batch', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsRead: only required params', async () => { const responsePromise = client.messages.batch.markAsRead({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], @@ -82,14 +82,14 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsRead: required and optional params', async () => { const response = await client.messages.batch.markAsRead({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsSeen: only required params', async () => { const responsePromise = client.messages.batch.markAsSeen({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], @@ -103,14 +103,14 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsSeen: required and optional params', async () => { const response = await client.messages.batch.markAsSeen({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsUnread: only required params', async () => { const responsePromise = client.messages.batch.markAsUnread({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], @@ -124,14 +124,14 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsUnread: required and optional params', async () => { const response = await client.messages.batch.markAsUnread({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsUnseen: only required params', async () => { const responsePromise = client.messages.batch.markAsUnseen({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], @@ -145,14 +145,14 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsUnseen: required and optional params', async () => { const response = await client.messages.batch.markAsUnseen({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('unarchive: only required params', async () => { const responsePromise = client.messages.batch.unarchive({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], @@ -166,7 +166,7 @@ describe('resource batch', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('unarchive: required and optional params', async () => { const response = await client.messages.batch.unarchive({ message_ids: ['2w3YUpTTOxuDvZFji8OMsKrG176', '2w3YVRbPXMIh8Zq6oBFcVDA5xes'], diff --git a/tests/api-resources/messages/messages.test.ts b/tests/api-resources/messages/messages.test.ts index 53c95805..d3745495 100644 --- a/tests/api-resources/messages/messages.test.ts +++ b/tests/api-resources/messages/messages.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource messages', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list', async () => { const responsePromise = client.messages.list(); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -51,7 +51,7 @@ describe('resource messages', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('archive', async () => { const responsePromise = client.messages.archive('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); @@ -63,7 +63,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('get', async () => { const responsePromise = client.messages.get('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); @@ -75,7 +75,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getContent', async () => { const responsePromise = client.messages.getContent('message_id'); const rawResponse = await responsePromise.asResponse(); @@ -87,7 +87,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listActivities', async () => { const responsePromise = client.messages.listActivities('message_id'); const rawResponse = await responsePromise.asResponse(); @@ -99,7 +99,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listActivities: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -116,7 +116,7 @@ describe('resource messages', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listDeliveryLogs', async () => { const responsePromise = client.messages.listDeliveryLogs('message_id'); const rawResponse = await responsePromise.asResponse(); @@ -128,7 +128,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listDeliveryLogs: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -144,7 +144,7 @@ describe('resource messages', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listEvents', async () => { const responsePromise = client.messages.listEvents('message_id'); const rawResponse = await responsePromise.asResponse(); @@ -156,7 +156,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listEvents: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -172,7 +172,7 @@ describe('resource messages', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsInteracted', async () => { const responsePromise = client.messages.markAsInteracted('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); @@ -184,7 +184,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsInteracted: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -196,7 +196,7 @@ describe('resource messages', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsRead', async () => { const responsePromise = client.messages.markAsRead('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); @@ -208,7 +208,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsSeen', async () => { const responsePromise = client.messages.markAsSeen('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); @@ -220,7 +220,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsUnread', async () => { const responsePromise = client.messages.markAsUnread('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); @@ -232,7 +232,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markAsUnseen', async () => { const responsePromise = client.messages.markAsUnseen('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); @@ -244,7 +244,7 @@ describe('resource messages', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('unarchive', async () => { const responsePromise = client.messages.unarchive('1jNaXzB2RZX3LY8wVQnfCKyPnv7'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/objects/bulk.test.ts b/tests/api-resources/objects/bulk.test.ts index 2aca2512..4b6cf5a5 100644 --- a/tests/api-resources/objects/bulk.test.ts +++ b/tests/api-resources/objects/bulk.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource bulk', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: only required params', async () => { const responsePromise = client.objects.bulk.delete('collection', { object_ids: ['obj_123', 'obj_456', 'obj_789'], @@ -22,14 +22,14 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: required and optional params', async () => { const response = await client.objects.bulk.delete('collection', { object_ids: ['obj_123', 'obj_456', 'obj_789'], }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('addSubscriptions: only required params', async () => { const responsePromise = client.objects.bulk.addSubscriptions('projects', { subscriptions: [{ id: 'project-1', recipients: [{ id: 'user_1' }] }], @@ -43,7 +43,7 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('addSubscriptions: required and optional params', async () => { const response = await client.objects.bulk.addSubscriptions('projects', { subscriptions: [ @@ -159,7 +159,7 @@ describe('resource bulk', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('deleteSubscriptions: only required params', async () => { const responsePromise = client.objects.bulk.deleteSubscriptions('projects', { subscriptions: [ @@ -176,7 +176,7 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('deleteSubscriptions: required and optional params', async () => { const response = await client.objects.bulk.deleteSubscriptions('projects', { subscriptions: [ @@ -189,7 +189,7 @@ describe('resource bulk', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('set: only required params', async () => { const responsePromise = client.objects.bulk.set('collection', { objects: [{ id: 'project_1' }] }); const rawResponse = await responsePromise.asResponse(); @@ -201,7 +201,7 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('set: required and optional params', async () => { const response = await client.objects.bulk.set('collection', { objects: [ diff --git a/tests/api-resources/objects/objects.test.ts b/tests/api-resources/objects/objects.test.ts index 13befeb4..f8ac6d3a 100644 --- a/tests/api-resources/objects/objects.test.ts +++ b/tests/api-resources/objects/objects.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource objects', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list', async () => { const responsePromise = client.objects.list('collection'); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -37,7 +37,7 @@ describe('resource objects', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete', async () => { const responsePromise = client.objects.delete('collection', 'id'); const rawResponse = await responsePromise.asResponse(); @@ -49,7 +49,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('addSubscriptions: only required params', async () => { const responsePromise = client.objects.addSubscriptions('collection', 'object_id', { recipients: ['user_1', 'user_2'], @@ -63,7 +63,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('addSubscriptions: required and optional params', async () => { const response = await client.objects.addSubscriptions('collection', 'object_id', { recipients: ['user_1', 'user_2'], @@ -71,7 +71,7 @@ describe('resource objects', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('deleteSubscriptions: only required params', async () => { const responsePromise = client.objects.deleteSubscriptions('collection', 'object_id', { recipients: ['user_123'], @@ -85,14 +85,14 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('deleteSubscriptions: required and optional params', async () => { const response = await client.objects.deleteSubscriptions('collection', 'object_id', { recipients: ['user_123'], }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('get', async () => { const responsePromise = client.objects.get('collection', 'id'); const rawResponse = await responsePromise.asResponse(); @@ -104,7 +104,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getChannelData', async () => { const responsePromise = client.objects.getChannelData( 'collection', @@ -120,7 +120,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getPreferences', async () => { const responsePromise = client.objects.getPreferences('collection', 'object_id', 'default'); const rawResponse = await responsePromise.asResponse(); @@ -132,7 +132,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listMessages', async () => { const responsePromise = client.objects.listMessages('projects', 'project-123'); const rawResponse = await responsePromise.asResponse(); @@ -144,7 +144,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listMessages: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -177,7 +177,7 @@ describe('resource objects', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listPreferences', async () => { const responsePromise = client.objects.listPreferences('collection', 'object_id'); const rawResponse = await responsePromise.asResponse(); @@ -189,7 +189,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSchedules', async () => { const responsePromise = client.objects.listSchedules('collection', 'id'); const rawResponse = await responsePromise.asResponse(); @@ -201,7 +201,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSchedules: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -220,7 +220,7 @@ describe('resource objects', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSubscriptions', async () => { const responsePromise = client.objects.listSubscriptions('collection', 'object_id'); const rawResponse = await responsePromise.asResponse(); @@ -232,7 +232,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSubscriptions: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -253,7 +253,7 @@ describe('resource objects', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('set', async () => { const responsePromise = client.objects.set('collection', 'id', {}); const rawResponse = await responsePromise.asResponse(); @@ -265,7 +265,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setChannelData: only required params', async () => { const responsePromise = client.objects.setChannelData( 'collection', @@ -282,7 +282,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setChannelData: required and optional params', async () => { const response = await client.objects.setChannelData( 'collection', @@ -292,7 +292,7 @@ describe('resource objects', () => { ); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setPreferences', async () => { const responsePromise = client.objects.setPreferences('collection', 'object_id', 'default', {}); const rawResponse = await responsePromise.asResponse(); @@ -304,7 +304,7 @@ describe('resource objects', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('unsetChannelData', async () => { const responsePromise = client.objects.unsetChannelData( 'collection', diff --git a/tests/api-resources/providers/ms-teams.test.ts b/tests/api-resources/providers/ms-teams.test.ts index ff2f4a53..321446ce 100644 --- a/tests/api-resources/providers/ms-teams.test.ts +++ b/tests/api-resources/providers/ms-teams.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource msTeams', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('checkAuth: only required params', async () => { const responsePromise = client.providers.msTeams.checkAuth('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', @@ -22,14 +22,14 @@ describe('resource msTeams', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('checkAuth: required and optional params', async () => { const response = await client.providers.msTeams.checkAuth('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listChannels: only required params', async () => { const responsePromise = client.providers.msTeams.listChannels('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', @@ -44,7 +44,7 @@ describe('resource msTeams', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listChannels: required and optional params', async () => { const response = await client.providers.msTeams.listChannels('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', @@ -53,7 +53,7 @@ describe('resource msTeams', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listTeams: only required params', async () => { const responsePromise = client.providers.msTeams.listTeams('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', @@ -67,7 +67,7 @@ describe('resource msTeams', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listTeams: required and optional params', async () => { const response = await client.providers.msTeams.listTeams('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', @@ -80,7 +80,7 @@ describe('resource msTeams', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('revokeAccess: only required params', async () => { const responsePromise = client.providers.msTeams.revokeAccess('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', @@ -94,7 +94,7 @@ describe('resource msTeams', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('revokeAccess: required and optional params', async () => { const response = await client.providers.msTeams.revokeAccess('channel_id', { ms_teams_tenant_object: 'ms_teams_tenant_object', diff --git a/tests/api-resources/providers/slack.test.ts b/tests/api-resources/providers/slack.test.ts index 52032b9a..57c86ec8 100644 --- a/tests/api-resources/providers/slack.test.ts +++ b/tests/api-resources/providers/slack.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource slack', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('checkAuth: only required params', async () => { const responsePromise = client.providers.slack.checkAuth('channel_id', { access_token_object: 'access_token_object', @@ -22,14 +22,14 @@ describe('resource slack', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('checkAuth: required and optional params', async () => { const response = await client.providers.slack.checkAuth('channel_id', { access_token_object: 'access_token_object', }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listChannels: only required params', async () => { const responsePromise = client.providers.slack.listChannels('channel_id', { access_token_object: 'access_token_object', @@ -43,7 +43,7 @@ describe('resource slack', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listChannels: required and optional params', async () => { const response = await client.providers.slack.listChannels('channel_id', { access_token_object: 'access_token_object', @@ -57,7 +57,7 @@ describe('resource slack', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('revokeAccess: only required params', async () => { const responsePromise = client.providers.slack.revokeAccess('channel_id', { access_token_object: 'access_token_object', @@ -71,7 +71,7 @@ describe('resource slack', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('revokeAccess: required and optional params', async () => { const response = await client.providers.slack.revokeAccess('channel_id', { access_token_object: 'access_token_object', diff --git a/tests/api-resources/schedules/bulk.test.ts b/tests/api-resources/schedules/bulk.test.ts index b23dd879..834fc9a9 100644 --- a/tests/api-resources/schedules/bulk.test.ts +++ b/tests/api-resources/schedules/bulk.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource bulk', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('create: only required params', async () => { const responsePromise = client.schedules.bulk.create({ schedules: [{ workflow: 'comment-created' }, { workflow: 'comment-created' }], @@ -22,7 +22,7 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('create: required and optional params', async () => { const response = await client.schedules.bulk.create({ schedules: [ diff --git a/tests/api-resources/schedules/schedules.test.ts b/tests/api-resources/schedules/schedules.test.ts index defcb328..942e5c31 100644 --- a/tests/api-resources/schedules/schedules.test.ts +++ b/tests/api-resources/schedules/schedules.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource schedules', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('create: only required params', async () => { const responsePromise = client.schedules.create({ recipients: ['user_123'], @@ -23,7 +23,7 @@ describe('resource schedules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('create: required and optional params', async () => { const response = await client.schedules.create({ recipients: ['user_123'], @@ -148,7 +148,7 @@ describe('resource schedules', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('update: only required params', async () => { const responsePromise = client.schedules.update({ schedule_ids: ['123e4567-e89b-12d3-a456-426614174000'], @@ -162,7 +162,7 @@ describe('resource schedules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('update: required and optional params', async () => { const response = await client.schedules.update({ schedule_ids: ['123e4567-e89b-12d3-a456-426614174000'], @@ -185,7 +185,7 @@ describe('resource schedules', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list: only required params', async () => { const responsePromise = client.schedules.list({ workflow: 'workflow' }); const rawResponse = await responsePromise.asResponse(); @@ -197,7 +197,7 @@ describe('resource schedules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list: required and optional params', async () => { const response = await client.schedules.list({ workflow: 'workflow', @@ -209,7 +209,7 @@ describe('resource schedules', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: only required params', async () => { const responsePromise = client.schedules.delete({ schedule_ids: ['123e4567-e89b-12d3-a456-426614174000'], @@ -223,7 +223,7 @@ describe('resource schedules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: required and optional params', async () => { const response = await client.schedules.delete({ schedule_ids: ['123e4567-e89b-12d3-a456-426614174000'], diff --git a/tests/api-resources/tenants/bulk.test.ts b/tests/api-resources/tenants/bulk.test.ts index 1de68772..91a228f4 100644 --- a/tests/api-resources/tenants/bulk.test.ts +++ b/tests/api-resources/tenants/bulk.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource bulk', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: only required params', async () => { const responsePromise = client.tenants.bulk.delete({ tenant_ids: ['string'] }); const rawResponse = await responsePromise.asResponse(); @@ -20,12 +20,12 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: required and optional params', async () => { const response = await client.tenants.bulk.delete({ tenant_ids: ['string'] }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('set: only required params', async () => { const responsePromise = client.tenants.bulk.set({ tenants: [{ id: 'tenant_1' }] }); const rawResponse = await responsePromise.asResponse(); @@ -37,7 +37,7 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('set: required and optional params', async () => { const response = await client.tenants.bulk.set({ tenants: [ diff --git a/tests/api-resources/tenants/tenants.test.ts b/tests/api-resources/tenants/tenants.test.ts index b7ee1759..b5fa9666 100644 --- a/tests/api-resources/tenants/tenants.test.ts +++ b/tests/api-resources/tenants/tenants.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource tenants', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list', async () => { const responsePromise = client.tenants.list(); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource tenants', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -37,7 +37,7 @@ describe('resource tenants', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete', async () => { const responsePromise = client.tenants.delete('id'); const rawResponse = await responsePromise.asResponse(); @@ -49,7 +49,7 @@ describe('resource tenants', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('get', async () => { const responsePromise = client.tenants.get('id'); const rawResponse = await responsePromise.asResponse(); @@ -61,7 +61,7 @@ describe('resource tenants', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('get: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -73,7 +73,7 @@ describe('resource tenants', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('set', async () => { const responsePromise = client.tenants.set('id', {}); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/users/bulk.test.ts b/tests/api-resources/users/bulk.test.ts index 870c5635..29c12a00 100644 --- a/tests/api-resources/users/bulk.test.ts +++ b/tests/api-resources/users/bulk.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource bulk', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: only required params', async () => { const responsePromise = client.users.bulk.delete({ user_ids: ['user_1', 'user_2'] }); const rawResponse = await responsePromise.asResponse(); @@ -20,12 +20,12 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete: required and optional params', async () => { const response = await client.users.bulk.delete({ user_ids: ['user_1', 'user_2'] }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('identify: only required params', async () => { const responsePromise = client.users.bulk.identify({ users: [{ id: 'user_1' }] }); const rawResponse = await responsePromise.asResponse(); @@ -37,7 +37,7 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('identify: required and optional params', async () => { const response = await client.users.bulk.identify({ users: [ @@ -147,7 +147,7 @@ describe('resource bulk', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setPreferences: only required params', async () => { const responsePromise = client.users.bulk.setPreferences({ preferences: {}, @@ -162,7 +162,7 @@ describe('resource bulk', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setPreferences: required and optional params', async () => { const response = await client.users.bulk.setPreferences({ preferences: { diff --git a/tests/api-resources/users/feeds.test.ts b/tests/api-resources/users/feeds.test.ts index 6170f48e..eceda1af 100644 --- a/tests/api-resources/users/feeds.test.ts +++ b/tests/api-resources/users/feeds.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource feeds', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getSettings', async () => { const responsePromise = client.users.feeds.getSettings('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource feeds', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listItems', async () => { const responsePromise = client.users.feeds.listItems('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); const rawResponse = await responsePromise.asResponse(); @@ -32,7 +32,7 @@ describe('resource feeds', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listItems: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( diff --git a/tests/api-resources/users/guides.test.ts b/tests/api-resources/users/guides.test.ts index ce25e9a2..b25fe604 100644 --- a/tests/api-resources/users/guides.test.ts +++ b/tests/api-resources/users/guides.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource guides', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getChannel', async () => { const responsePromise = client.users.guides.getChannel('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource guides', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getChannel: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -37,7 +37,7 @@ describe('resource guides', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markMessageAsArchived: only required params', async () => { const responsePromise = client.users.guides.markMessageAsArchived('user_id', 'message_id', { channel_id: '123e4567-e89b-12d3-a456-426614174000', @@ -54,7 +54,7 @@ describe('resource guides', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markMessageAsArchived: required and optional params', async () => { const response = await client.users.guides.markMessageAsArchived('user_id', 'message_id', { channel_id: '123e4567-e89b-12d3-a456-426614174000', @@ -77,7 +77,7 @@ describe('resource guides', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markMessageAsInteracted: only required params', async () => { const responsePromise = client.users.guides.markMessageAsInteracted('user_id', 'message_id', { channel_id: '123e4567-e89b-12d3-a456-426614174000', @@ -94,7 +94,7 @@ describe('resource guides', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markMessageAsInteracted: required and optional params', async () => { const response = await client.users.guides.markMessageAsInteracted('user_id', 'message_id', { channel_id: '123e4567-e89b-12d3-a456-426614174000', @@ -117,7 +117,7 @@ describe('resource guides', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markMessageAsSeen: only required params', async () => { const responsePromise = client.users.guides.markMessageAsSeen('user_id', 'message_id', { channel_id: '123e4567-e89b-12d3-a456-426614174000', @@ -134,7 +134,7 @@ describe('resource guides', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('markMessageAsSeen: required and optional params', async () => { const response = await client.users.guides.markMessageAsSeen('user_id', 'message_id', { channel_id: '123e4567-e89b-12d3-a456-426614174000', diff --git a/tests/api-resources/users/users.test.ts b/tests/api-resources/users/users.test.ts index 2f8da0ed..3db90478 100644 --- a/tests/api-resources/users/users.test.ts +++ b/tests/api-resources/users/users.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource users', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('update', async () => { const responsePromise = client.users.update('user_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list', async () => { const responsePromise = client.users.list(); const rawResponse = await responsePromise.asResponse(); @@ -32,7 +32,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -48,7 +48,7 @@ describe('resource users', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('delete', async () => { const responsePromise = client.users.delete('user_id'); const rawResponse = await responsePromise.asResponse(); @@ -60,7 +60,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('get', async () => { const responsePromise = client.users.get('user_id'); const rawResponse = await responsePromise.asResponse(); @@ -72,7 +72,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getChannelData', async () => { const responsePromise = client.users.getChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); const rawResponse = await responsePromise.asResponse(); @@ -84,7 +84,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getPreferences', async () => { const responsePromise = client.users.getPreferences('user_id', 'default'); const rawResponse = await responsePromise.asResponse(); @@ -96,7 +96,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('getPreferences: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -109,7 +109,7 @@ describe('resource users', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listMessages', async () => { const responsePromise = client.users.listMessages('user-123'); const rawResponse = await responsePromise.asResponse(); @@ -121,7 +121,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listMessages: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -153,7 +153,7 @@ describe('resource users', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listPreferences', async () => { const responsePromise = client.users.listPreferences('user_id'); const rawResponse = await responsePromise.asResponse(); @@ -165,7 +165,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSchedules', async () => { const responsePromise = client.users.listSchedules('user_id'); const rawResponse = await responsePromise.asResponse(); @@ -177,7 +177,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSchedules: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -195,7 +195,7 @@ describe('resource users', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSubscriptions', async () => { const responsePromise = client.users.listSubscriptions('user_id'); const rawResponse = await responsePromise.asResponse(); @@ -207,7 +207,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('listSubscriptions: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -225,7 +225,7 @@ describe('resource users', () => { ).rejects.toThrow(Knock.NotFoundError); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('merge: only required params', async () => { const responsePromise = client.users.merge('user_id', { from_user_id: 'user_1' }); const rawResponse = await responsePromise.asResponse(); @@ -237,12 +237,12 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('merge: required and optional params', async () => { const response = await client.users.merge('user_id', { from_user_id: 'user_1' }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setChannelData: only required params', async () => { const responsePromise = client.users.setChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { data: { tokens: ['push_token_1'] }, @@ -256,14 +256,14 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setChannelData: required and optional params', async () => { const response = await client.users.setChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { data: { tokens: ['push_token_1'] }, }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('setPreferences', async () => { const responsePromise = client.users.setPreferences('user_id', 'default', {}); const rawResponse = await responsePromise.asResponse(); @@ -275,7 +275,7 @@ describe('resource users', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('unsetChannelData', async () => { const responsePromise = client.users.unsetChannelData('user_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/workflows.test.ts b/tests/api-resources/workflows.test.ts index 8f849f02..b8285956 100644 --- a/tests/api-resources/workflows.test.ts +++ b/tests/api-resources/workflows.test.ts @@ -8,7 +8,7 @@ const client = new Knock({ }); describe('resource workflows', () => { - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('cancel: only required params', async () => { const responsePromise = client.workflows.cancel('key', { cancellation_key: 'cancel-workflow-123' }); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +20,7 @@ describe('resource workflows', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('cancel: required and optional params', async () => { const response = await client.workflows.cancel('key', { cancellation_key: 'cancel-workflow-123', @@ -28,7 +28,7 @@ describe('resource workflows', () => { }); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('trigger: only required params', async () => { const responsePromise = client.workflows.trigger('key', { recipients: ['dr_grant', 'dr_sattler', 'dr_malcolm'], @@ -42,7 +42,7 @@ describe('resource workflows', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism doesn't support callbacks yet + // Mock server doesn't support callbacks yet test.skip('trigger: required and optional params', async () => { const response = await client.workflows.trigger('key', { recipients: ['dr_grant', 'dr_sattler', 'dr_malcolm'], From f1a0849dfe21babc2c872e59f5f06a8a40bc77d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:05:15 +0000 Subject: [PATCH 31/33] feat(api): api update --- .stats.yml | 4 ++-- src/resources/audiences.ts | 12 ++++++++++-- src/resources/shared.ts | 2 ++ tests/api-resources/audiences.test.ts | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index da73acdf..7a06e222 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-27184418cc06dab3a5bb109116c85fa740df9a140150d2eb9f4c73389905b8fb.yml -openapi_spec_hash: 2aad0a6198ffa00d400bce3b8e41d2e5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-b0b2bad50557aa0fe95d42cd97c6b45e8c45f6f257950048545faafafc851a17.yml +openapi_spec_hash: 4e26fcff8efa06e31f3b2bfc191a7006 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/src/resources/audiences.ts b/src/resources/audiences.ts index dddf0d2e..9658aa44 100644 --- a/src/resources/audiences.ts +++ b/src/resources/audiences.ts @@ -28,8 +28,10 @@ export class Audiences extends APIResource { * }); * ``` */ - addMembers(key: string, body: AudienceAddMembersParams, options?: RequestOptions): APIPromise { + addMembers(key: string, params: AudienceAddMembersParams, options?: RequestOptions): APIPromise { + const { create_audience, ...body } = params; return this._client.post(path`/v1/audiences/${key}/members`, { + query: { create_audience }, body, ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), @@ -116,9 +118,15 @@ export interface AudienceListMembersResponse { export interface AudienceAddMembersParams { /** - * A list of audience members to add. You can add up to 1,000 members per request. + * Body param: A list of audience members to add. You can add up to 1,000 members + * per request. */ members: Array; + + /** + * Query param: Create the audience if it does not exist. + */ + create_audience?: boolean; } export namespace AudienceAddMembersParams { diff --git a/src/resources/shared.ts b/src/resources/shared.ts index cd252bdc..062f98d5 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -23,6 +23,8 @@ export interface Condition { | 'not_contains' | 'empty' | 'not_empty' + | 'exists' + | 'not_exists' | 'contains_all' | 'is_timestamp' | 'is_not_timestamp' diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts index 31ac3df5..23938987 100644 --- a/tests/api-resources/audiences.test.ts +++ b/tests/api-resources/audiences.test.ts @@ -130,6 +130,7 @@ describe('resource audiences', () => { tenant: 'ingen_isla_nublar', }, ], + create_audience: true, }); }); From 439d2ebd0f3416446b496cb423ee1b12a1ddc5ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:33:09 +0000 Subject: [PATCH 32/33] fix(docs/contributing): correct pnpm link command --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f48ccd95..4431dd90 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,7 @@ $ yarn link @knocklabs/node # With pnpm $ pnpm link --global $ cd ../my-package -$ pnpm link -—global @knocklabs/node +$ pnpm link --global @knocklabs/node ``` ## Running tests From 70aae96d10dd438d626220940fd15fcd54b3c06f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:33:41 +0000 Subject: [PATCH 33/33] release: 1.29.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 47 +++++++++++++++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bac4ebcf..6103afc2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.28.0" + ".": "1.29.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 81a8a2b8..19d2c555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,52 @@ # Changelog +## 1.29.0 (2026-02-23) + +Full Changelog: [v1.28.0...v1.29.0](https://github.com/knocklabs/knock-node/compare/v1.28.0...v1.29.0) + +### Features + +* **api:** api update ([f1a0849](https://github.com/knocklabs/knock-node/commit/f1a0849dfe21babc2c872e59f5f06a8a40bc77d6)) +* **api:** api update ([8cf1cb9](https://github.com/knocklabs/knock-node/commit/8cf1cb904850e248e85fe6fcf0dc5716c49b43db)) +* **api:** api update ([ed982d3](https://github.com/knocklabs/knock-node/commit/ed982d39a49d9e088e1e9d14e49f363ce7845e72)) +* **api:** api update ([45054df](https://github.com/knocklabs/knock-node/commit/45054dfc1940893305dbf902f8d0b83ad4f57aa4)) +* **api:** api update ([4bbd1e1](https://github.com/knocklabs/knock-node/commit/4bbd1e147c3c2c4a0003e255f365a7de6fd3670d)) +* **api:** api update ([2b49b60](https://github.com/knocklabs/knock-node/commit/2b49b60b0aaabfcebdc6aae066f3b40c2af13809)) +* **api:** api update ([79f1bfe](https://github.com/knocklabs/knock-node/commit/79f1bfe1cfdd25fda0ddc823c9dffa6f07fa08b9)) +* **api:** api update ([dfcbdc9](https://github.com/knocklabs/knock-node/commit/dfcbdc952b7e7d2ad619cd1bbf1e0e8eb445c18a)) +* **api:** api update ([c4707a2](https://github.com/knocklabs/knock-node/commit/c4707a23b196e3af7f6878f5ca0651d11999f73f)) +* **api:** api update ([b612191](https://github.com/knocklabs/knock-node/commit/b6121912872235644a76d4f5df5c260c41fc2b74)) +* **api:** api update ([8ff53b4](https://github.com/knocklabs/knock-node/commit/8ff53b4798307b7d4a3feb5febdb3bfb3c039c43)) +* **api:** api update ([77ebc62](https://github.com/knocklabs/knock-node/commit/77ebc623dcba86c33fd0685bf622fb372be47b91)) +* **api:** api update ([510da52](https://github.com/knocklabs/knock-node/commit/510da5211c4d52dc3ff9aedc0a95a1ce689bd1dd)) +* **api:** api update ([4ef0068](https://github.com/knocklabs/knock-node/commit/4ef00687d3d26bd308a9e4f4540492c4f6bbe3c7)) +* **api:** api update ([9aa302a](https://github.com/knocklabs/knock-node/commit/9aa302a18b8ce1b77a6d07c418e328640084bf04)) +* **api:** api update ([35bdbf0](https://github.com/knocklabs/knock-node/commit/35bdbf0694f7f29d5b5e4ad38d18d9a5fcec2f94)) +* **api:** api update ([026e846](https://github.com/knocklabs/knock-node/commit/026e8466fb87b4f879755f222ad526ba8db956e8)) +* **api:** api update ([10316df](https://github.com/knocklabs/knock-node/commit/10316df12a84166f5b2933be7a5aa73f9e43cec6)) +* **api:** api update ([8fecb72](https://github.com/knocklabs/knock-node/commit/8fecb721112dee9e4b106d42f297c174a4271361)) +* **api:** api update ([bf382c0](https://github.com/knocklabs/knock-node/commit/bf382c0bf162077e7c28b65551085f461f8592c0)) + + +### Bug Fixes + +* **client:** avoid memory leak with abort signals ([d8cb362](https://github.com/knocklabs/knock-node/commit/d8cb36276de54fa1328b5b8bcae66ba5b3ce1aad)) +* **client:** avoid removing abort listener too early ([dfe3e70](https://github.com/knocklabs/knock-node/commit/dfe3e705d5a5c9ab74c1885f6b7ed8f563b3662b)) +* **docs/contributing:** correct pnpm link command ([439d2eb](https://github.com/knocklabs/knock-node/commit/439d2ebd0f3416446b496cb423ee1b12a1ddc5ff)) + + +### Chores + +* **ci:** upgrade `actions/github-script` ([d3c6eed](https://github.com/knocklabs/knock-node/commit/d3c6eed42a83abd3e529c299edf4fa61b67ed58a)) +* **client:** do not parse responses with empty content-length ([5feca1e](https://github.com/knocklabs/knock-node/commit/5feca1ec81e627f3ffadcd5ae4a406bdb2e80a65)) +* **client:** restructure abort controller binding ([dbc9d1a](https://github.com/knocklabs/knock-node/commit/dbc9d1a37f329b417592bcda6d5b79f5f9f705cc)) +* **internal/client:** fix form-urlencoded requests ([d70cd83](https://github.com/knocklabs/knock-node/commit/d70cd83026b494bfce38bf9733c9dc30190ad7eb)) +* **internal:** avoid type checking errors with ts-reset ([666d1b4](https://github.com/knocklabs/knock-node/commit/666d1b444d89c58b59e30dd59b53d9e38497dc42)) +* **internal:** codegen related update ([5def577](https://github.com/knocklabs/knock-node/commit/5def577b5e605cdd62e2d8e98d98543fc936e0b9)) +* **internal:** fix pagination internals not accepting option promises ([311a889](https://github.com/knocklabs/knock-node/commit/311a889981ab8f3531e41633039106ce421f0f7c)) +* **internal:** update `actions/checkout` version ([2048a84](https://github.com/knocklabs/knock-node/commit/2048a84ada13831beeb378d9b938bedf2f78eba4)) +* update mock server docs ([f8e68be](https://github.com/knocklabs/knock-node/commit/f8e68be9c029ad400225d6df05e33a26a78cb22e)) + ## 1.28.0 (2026-01-15) Full Changelog: [v1.27.0...v1.28.0](https://github.com/knocklabs/knock-node/compare/v1.27.0...v1.28.0) diff --git a/package.json b/package.json index 4f2948a4..ca25dc10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@knocklabs/node", - "version": "1.28.0", + "version": "1.29.0", "description": "The official TypeScript library for the Knock API", "author": "Knock ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index df29c98c..ec0d2ee2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '1.28.0'; // x-release-please-version +export const VERSION = '1.29.0'; // x-release-please-version