@knocklabs/node 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +1 -1
- package/api-promise.js +2 -15
- package/api-promise.js.map +1 -1
- package/client.d.mts +4 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -1
- package/client.d.ts.map +1 -1
- package/client.js +27 -44
- package/client.js.map +1 -1
- package/client.mjs +18 -12
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +0 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +0 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +4 -14
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +1 -11
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +0 -1
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +0 -1
- package/core/error.d.ts.map +1 -1
- package/core/error.js.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts +0 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +0 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +3 -13
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +1 -11
- package/core/pagination.mjs.map +1 -1
- package/error.js +2 -15
- package/error.js.map +1 -1
- package/internal/builtin-types.d.mts +0 -2
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts +0 -2
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +2 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts +0 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts +0 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +1 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts +0 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +0 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +1 -2
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/stringify.js +1 -2
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.js +9 -9
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts +0 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.js +5 -6
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts +0 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +0 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +4 -4
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +3 -2
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +0 -1
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +0 -1
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +1 -3
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +1 -3
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +16 -6
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +12 -3
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +1 -1
- package/internal/utils/bytes.d.mts.map +1 -1
- package/internal/utils/bytes.d.ts +1 -1
- package/internal/utils/bytes.d.ts.map +1 -1
- package/internal/utils/bytes.js +3 -4
- package/internal/utils/bytes.js.map +1 -1
- package/internal/utils/bytes.mjs.map +1 -1
- package/internal/utils/env.d.mts.map +1 -1
- package/internal/utils/env.d.ts.map +1 -1
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/log.d.mts +0 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +0 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +2 -2
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/sleep.d.mts.map +1 -1
- package/internal/utils/sleep.d.ts.map +1 -1
- package/internal/utils/uuid.d.mts +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +1 -2
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +1 -2
- package/internal/utils/uuid.mjs.map +1 -1
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.js +7 -20
- package/internal/utils.js.map +1 -1
- package/lib/index.js +3 -16
- package/lib/index.js.map +1 -1
- package/lib/tokenSigner.js +5 -28
- package/lib/tokenSigner.js.map +1 -1
- package/lib/tokenSigner.mjs.map +1 -1
- package/lib/userTokens.js +1 -1
- package/lib/userTokens.js.map +1 -1
- package/package.json +2 -6
- package/pagination.js +2 -15
- package/pagination.js.map +1 -1
- package/resource.js +2 -15
- package/resource.js.map +1 -1
- package/resources/audiences.d.mts +37 -0
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +37 -0
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.js +25 -0
- package/resources/audiences.js.map +1 -1
- package/resources/audiences.mjs +25 -0
- package/resources/audiences.mjs.map +1 -1
- package/resources/bulk-operations.d.mts +7 -0
- package/resources/bulk-operations.d.mts.map +1 -1
- package/resources/bulk-operations.d.ts +7 -0
- package/resources/bulk-operations.d.ts.map +1 -1
- package/resources/bulk-operations.js +7 -0
- package/resources/bulk-operations.js.map +1 -1
- package/resources/bulk-operations.mjs +7 -0
- package/resources/bulk-operations.mjs.map +1 -1
- package/resources/channels/bulk.d.mts +21 -0
- package/resources/channels/bulk.d.mts.map +1 -1
- package/resources/channels/bulk.d.ts +21 -0
- package/resources/channels/bulk.d.ts.map +1 -1
- package/resources/channels/bulk.js +21 -0
- package/resources/channels/bulk.js.map +1 -1
- package/resources/channels/bulk.mjs +21 -0
- package/resources/channels/bulk.mjs.map +1 -1
- package/resources/channels/channels.js +2 -24
- package/resources/channels/channels.js.map +1 -1
- package/resources/channels.js +2 -15
- package/resources/channels.js.map +1 -1
- package/resources/integrations/integrations.js +3 -25
- package/resources/integrations/integrations.js.map +1 -1
- package/resources/integrations.js +2 -15
- package/resources/integrations.js.map +1 -1
- package/resources/messages/batch.d.mts +76 -0
- package/resources/messages/batch.d.mts.map +1 -1
- package/resources/messages/batch.d.ts +76 -0
- package/resources/messages/batch.d.ts.map +1 -1
- package/resources/messages/batch.js +76 -0
- package/resources/messages/batch.js.map +1 -1
- package/resources/messages/batch.mjs +76 -0
- package/resources/messages/batch.mjs.map +1 -1
- package/resources/messages/index.d.mts +0 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +0 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js +1 -3
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs +0 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +101 -4
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +101 -4
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +103 -28
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +101 -4
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/messages.js +2 -15
- package/resources/messages.js.map +1 -1
- package/resources/objects/bulk.d.mts +49 -0
- package/resources/objects/bulk.d.mts.map +1 -1
- package/resources/objects/bulk.d.ts +49 -0
- package/resources/objects/bulk.d.ts.map +1 -1
- package/resources/objects/bulk.js +49 -0
- package/resources/objects/bulk.js.map +1 -1
- package/resources/objects/bulk.mjs +49 -0
- package/resources/objects/bulk.mjs.map +1 -1
- package/resources/objects/objects.d.mts +179 -5
- package/resources/objects/objects.d.mts.map +1 -1
- package/resources/objects/objects.d.ts +179 -5
- package/resources/objects/objects.d.ts.map +1 -1
- package/resources/objects/objects.js +173 -24
- package/resources/objects/objects.js.map +1 -1
- package/resources/objects/objects.mjs +171 -0
- package/resources/objects/objects.mjs.map +1 -1
- package/resources/objects.js +2 -15
- package/resources/objects.js.map +1 -1
- package/resources/providers/ms-teams.d.mts +40 -0
- package/resources/providers/ms-teams.d.mts.map +1 -1
- package/resources/providers/ms-teams.d.ts +40 -0
- package/resources/providers/ms-teams.d.ts.map +1 -1
- package/resources/providers/ms-teams.js +40 -0
- package/resources/providers/ms-teams.js.map +1 -1
- package/resources/providers/ms-teams.mjs +40 -0
- package/resources/providers/ms-teams.mjs.map +1 -1
- package/resources/providers/providers.js +3 -25
- package/resources/providers/providers.js.map +1 -1
- package/resources/providers/slack.d.mts +27 -0
- package/resources/providers/slack.d.mts.map +1 -1
- package/resources/providers/slack.d.ts +27 -0
- package/resources/providers/slack.d.ts.map +1 -1
- package/resources/providers/slack.js +27 -0
- package/resources/providers/slack.js.map +1 -1
- package/resources/providers/slack.mjs +27 -0
- package/resources/providers/slack.mjs.map +1 -1
- package/resources/providers.js +2 -15
- package/resources/providers.js.map +1 -1
- package/resources/recipients/channel-data.d.mts +1 -1
- package/resources/recipients/channel-data.d.mts.map +1 -1
- package/resources/recipients/channel-data.d.ts +1 -1
- package/resources/recipients/channel-data.d.ts.map +1 -1
- package/resources/recipients/recipients.js +4 -26
- package/resources/recipients/recipients.js.map +1 -1
- package/resources/recipients.js +2 -15
- package/resources/recipients.js.map +1 -1
- package/resources/schedules/bulk.d.mts +30 -0
- package/resources/schedules/bulk.d.mts.map +1 -1
- package/resources/schedules/bulk.d.ts +30 -0
- package/resources/schedules/bulk.d.ts.map +1 -1
- package/resources/schedules/bulk.js +30 -0
- package/resources/schedules/bulk.js.map +1 -1
- package/resources/schedules/bulk.mjs +30 -0
- package/resources/schedules/bulk.mjs.map +1 -1
- package/resources/schedules/schedules.d.mts +75 -2
- package/resources/schedules/schedules.d.mts.map +1 -1
- package/resources/schedules/schedules.d.ts +75 -2
- package/resources/schedules/schedules.d.ts.map +1 -1
- package/resources/schedules/schedules.js +76 -24
- package/resources/schedules/schedules.js.map +1 -1
- package/resources/schedules/schedules.mjs +74 -0
- package/resources/schedules/schedules.mjs.map +1 -1
- package/resources/schedules.js +2 -15
- package/resources/schedules.js.map +1 -1
- package/resources/tenants/bulk.d.mts +14 -0
- package/resources/tenants/bulk.d.mts.map +1 -1
- package/resources/tenants/bulk.d.ts +14 -0
- package/resources/tenants/bulk.d.ts.map +1 -1
- package/resources/tenants/bulk.js +14 -0
- package/resources/tenants/bulk.js.map +1 -1
- package/resources/tenants/bulk.mjs +14 -0
- package/resources/tenants/bulk.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +33 -0
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +33 -0
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +35 -24
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +33 -0
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/tenants.js +2 -15
- package/resources/tenants.js.map +1 -1
- package/resources/users/bulk.d.mts +41 -0
- package/resources/users/bulk.d.mts.map +1 -1
- package/resources/users/bulk.d.ts +41 -0
- package/resources/users/bulk.d.ts.map +1 -1
- package/resources/users/bulk.js +41 -0
- package/resources/users/bulk.js.map +1 -1
- package/resources/users/bulk.mjs +41 -0
- package/resources/users/bulk.mjs.map +1 -1
- package/resources/users/feeds.d.mts +19 -0
- package/resources/users/feeds.d.mts.map +1 -1
- package/resources/users/feeds.d.ts +19 -0
- package/resources/users/feeds.d.ts.map +1 -1
- package/resources/users/feeds.js +19 -0
- package/resources/users/feeds.js.map +1 -1
- package/resources/users/feeds.mjs +19 -0
- package/resources/users/feeds.mjs.map +1 -1
- package/resources/users/guides.d.mts +68 -0
- package/resources/users/guides.d.mts.map +1 -1
- package/resources/users/guides.d.ts +68 -0
- package/resources/users/guides.d.ts.map +1 -1
- package/resources/users/guides.js +68 -0
- package/resources/users/guides.js.map +1 -1
- package/resources/users/guides.mjs +68 -0
- package/resources/users/guides.mjs.map +1 -1
- package/resources/users/users.d.mts +182 -15
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +182 -15
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +143 -26
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +139 -0
- package/resources/users/users.mjs.map +1 -1
- package/resources/users.js +2 -15
- package/resources/users.js.map +1 -1
- package/resources/workflows.d.mts +30 -0
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +30 -0
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +30 -0
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +30 -0
- package/resources/workflows.mjs.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/client.ts +17 -0
- package/src/internal/headers.ts +1 -1
- package/src/internal/to-file.ts +4 -2
- package/src/internal/uploads.ts +16 -4
- package/src/internal/utils/uuid.ts +1 -3
- package/src/resources/audiences.ts +37 -0
- package/src/resources/bulk-operations.ts +7 -0
- package/src/resources/channels/bulk.ts +21 -0
- package/src/resources/messages/batch.ts +76 -0
- package/src/resources/messages/index.ts +0 -1
- package/src/resources/messages/messages.ts +101 -6
- package/src/resources/objects/bulk.ts +49 -0
- package/src/resources/objects/objects.ts +179 -5
- package/src/resources/providers/ms-teams.ts +40 -0
- package/src/resources/providers/slack.ts +27 -0
- package/src/resources/recipients/channel-data.ts +4 -1
- package/src/resources/schedules/bulk.ts +30 -0
- package/src/resources/schedules/schedules.ts +75 -2
- package/src/resources/tenants/bulk.ts +14 -0
- package/src/resources/tenants/tenants.ts +33 -0
- package/src/resources/users/bulk.ts +41 -0
- package/src/resources/users/feeds.ts +19 -0
- package/src/resources/users/guides.ts +68 -0
- package/src/resources/users/users.ts +188 -15
- package/src/resources/workflows.ts +30 -0
- package/src/version.ts +1 -1
- package/uploads.js +2 -15
- package/uploads.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/internal/shims/crypto.d.mts +0 -13
- package/internal/shims/crypto.d.mts.map +0 -1
- package/internal/shims/crypto.d.ts +0 -13
- package/internal/shims/crypto.d.ts.map +0 -1
- package/internal/shims/crypto.js +0 -13
- package/internal/shims/crypto.js.map +0 -1
- package/internal/shims/crypto.mjs +0 -9
- package/internal/shims/crypto.mjs.map +0 -1
- package/internal/shims/file.d.mts +0 -23
- package/internal/shims/file.d.mts.map +0 -1
- package/internal/shims/file.d.ts +0 -23
- package/internal/shims/file.d.ts.map +0 -1
- package/internal/shims/file.js +0 -16
- package/internal/shims/file.js.map +0 -1
- package/internal/shims/file.mjs +0 -12
- package/internal/shims/file.mjs.map +0 -1
- package/internal/shims/getBuiltinModule.d.mts +0 -11
- package/internal/shims/getBuiltinModule.d.mts.map +0 -1
- package/internal/shims/getBuiltinModule.d.ts +0 -11
- package/internal/shims/getBuiltinModule.d.ts.map +0 -1
- package/internal/shims/getBuiltinModule.js +0 -71
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -67
- package/internal/shims/getBuiltinModule.mjs.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.js +0 -5
- package/internal/shims/nullGetBuiltinModule.js.map +0 -1
- package/internal/shims/nullGetBuiltinModule.mjs +0 -2
- package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
- package/resources/messages/activities.d.mts +0 -22
- package/resources/messages/activities.d.mts.map +0 -1
- package/resources/messages/activities.d.ts +0 -22
- package/resources/messages/activities.d.ts.map +0 -1
- package/resources/messages/activities.js +0 -17
- package/resources/messages/activities.js.map +0 -1
- package/resources/messages/activities.mjs +0 -13
- package/resources/messages/activities.mjs.map +0 -1
- package/src/internal/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -66
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
- package/src/resources/messages/activities.ts +0 -38
|
@@ -12,6 +12,16 @@ export class Objects extends APIResource {
|
|
|
12
12
|
/**
|
|
13
13
|
* Returns a paginated list of objects from the specified collection. Optionally
|
|
14
14
|
* includes preference data for the objects.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Automatically fetches more pages as needed.
|
|
19
|
+
* for await (const object of client.objects.list(
|
|
20
|
+
* 'collection',
|
|
21
|
+
* )) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
15
25
|
*/
|
|
16
26
|
list(collection, query = {}, options) {
|
|
17
27
|
return this._client.getAPIList(path `/v1/objects/${collection}`, (EntriesCursor), {
|
|
@@ -22,6 +32,14 @@ export class Objects extends APIResource {
|
|
|
22
32
|
/**
|
|
23
33
|
* Permanently removes an object from the specified collection. This operation
|
|
24
34
|
* cannot be undone.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const object = await client.objects.delete(
|
|
39
|
+
* 'collection',
|
|
40
|
+
* 'id',
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
25
43
|
*/
|
|
26
44
|
delete(collection, id, options) {
|
|
27
45
|
return this._client.delete(path `/v1/objects/${collection}/${id}`, options);
|
|
@@ -31,6 +49,18 @@ export class Objects extends APIResource {
|
|
|
31
49
|
* updated. This endpoint also handles
|
|
32
50
|
* [inline identifications](/managing-recipients/identifying-recipients#inline-identifying-recipients)
|
|
33
51
|
* for the `recipient`.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const subscriptions = await client.objects.addSubscriptions(
|
|
56
|
+
* 'collection',
|
|
57
|
+
* 'object_id',
|
|
58
|
+
* {
|
|
59
|
+
* recipients: ['user_1', 'user_2'],
|
|
60
|
+
* properties: { key: 'value' },
|
|
61
|
+
* },
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
34
64
|
*/
|
|
35
65
|
addSubscriptions(collection, objectID, body, options) {
|
|
36
66
|
return this._client.post(path `/v1/objects/${collection}/${objectID}/subscriptions`, { body, ...options });
|
|
@@ -38,6 +68,16 @@ export class Objects extends APIResource {
|
|
|
38
68
|
/**
|
|
39
69
|
* Delete subscriptions for the specified recipients from an object. Returns the
|
|
40
70
|
* list of deleted subscriptions.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const subscriptions =
|
|
75
|
+
* await client.objects.deleteSubscriptions(
|
|
76
|
+
* 'collection',
|
|
77
|
+
* 'object_id',
|
|
78
|
+
* { recipients: ['user_123'] },
|
|
79
|
+
* );
|
|
80
|
+
* ```
|
|
41
81
|
*/
|
|
42
82
|
deleteSubscriptions(collection, objectID, body, options) {
|
|
43
83
|
return this._client.delete(path `/v1/objects/${collection}/${objectID}/subscriptions`, {
|
|
@@ -48,18 +88,41 @@ export class Objects extends APIResource {
|
|
|
48
88
|
/**
|
|
49
89
|
* Retrieves a specific object by its ID from the specified collection. Returns the
|
|
50
90
|
* object with all its properties.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const object = await client.objects.get('collection', 'id');
|
|
95
|
+
* ```
|
|
51
96
|
*/
|
|
52
97
|
get(collection, id, options) {
|
|
53
98
|
return this._client.get(path `/v1/objects/${collection}/${id}`, options);
|
|
54
99
|
}
|
|
55
100
|
/**
|
|
56
101
|
* Returns the channel data for the specified object and channel.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const channelData = await client.objects.getChannelData(
|
|
106
|
+
* 'collection',
|
|
107
|
+
* 'object_id',
|
|
108
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
109
|
+
* );
|
|
110
|
+
* ```
|
|
57
111
|
*/
|
|
58
112
|
getChannelData(collection, objectID, channelID, options) {
|
|
59
113
|
return this._client.get(path `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, options);
|
|
60
114
|
}
|
|
61
115
|
/**
|
|
62
116
|
* Returns the preference set for the specified object and preference set `id`.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* const preferenceSet = await client.objects.getPreferences(
|
|
121
|
+
* 'collection',
|
|
122
|
+
* 'object_id',
|
|
123
|
+
* 'default',
|
|
124
|
+
* );
|
|
125
|
+
* ```
|
|
63
126
|
*/
|
|
64
127
|
getPreferences(collection, objectID, id, options) {
|
|
65
128
|
return this._client.get(path `/v1/objects/${collection}/${objectID}/preferences/${id}`, options);
|
|
@@ -68,18 +131,48 @@ export class Objects extends APIResource {
|
|
|
68
131
|
* Returns a paginated list of messages for a specific object in the given
|
|
69
132
|
* collection. Allows filtering by message status and provides various sorting
|
|
70
133
|
* options.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
|
+
* // Automatically fetches more pages as needed.
|
|
138
|
+
* for await (const message of client.objects.listMessages(
|
|
139
|
+
* 'projects',
|
|
140
|
+
* 'project-123',
|
|
141
|
+
* )) {
|
|
142
|
+
* // ...
|
|
143
|
+
* }
|
|
144
|
+
* ```
|
|
71
145
|
*/
|
|
72
146
|
listMessages(collection, id, query = {}, options) {
|
|
73
147
|
return this._client.getAPIList(path `/v1/objects/${collection}/${id}/messages`, (EntriesCursor), { query, ...options });
|
|
74
148
|
}
|
|
75
149
|
/**
|
|
76
150
|
* Returns a paginated list of preference sets for the specified object.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const preferenceSets = await client.objects.listPreferences(
|
|
155
|
+
* 'collection',
|
|
156
|
+
* 'object_id',
|
|
157
|
+
* );
|
|
158
|
+
* ```
|
|
77
159
|
*/
|
|
78
160
|
listPreferences(collection, objectID, options) {
|
|
79
161
|
return this._client.get(path `/v1/objects/${collection}/${objectID}/preferences`, options);
|
|
80
162
|
}
|
|
81
163
|
/**
|
|
82
164
|
* Returns a paginated list of schedules for an object.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```ts
|
|
168
|
+
* // Automatically fetches more pages as needed.
|
|
169
|
+
* for await (const schedule of client.objects.listSchedules(
|
|
170
|
+
* 'collection',
|
|
171
|
+
* 'id',
|
|
172
|
+
* )) {
|
|
173
|
+
* // ...
|
|
174
|
+
* }
|
|
175
|
+
* ```
|
|
83
176
|
*/
|
|
84
177
|
listSchedules(collection, id, query = {}, options) {
|
|
85
178
|
return this._client.getAPIList(path `/v1/objects/${collection}/${id}/schedules`, (EntriesCursor), { query, ...options });
|
|
@@ -88,6 +181,17 @@ export class Objects extends APIResource {
|
|
|
88
181
|
* List subscriptions for an object. Either list the recipients that subscribe to
|
|
89
182
|
* the provided object, or list the objects that the provided object is subscribed
|
|
90
183
|
* to. Determined by the `mode` query parameter.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* // Automatically fetches more pages as needed.
|
|
188
|
+
* for await (const subscription of client.objects.listSubscriptions(
|
|
189
|
+
* 'collection',
|
|
190
|
+
* 'object_id',
|
|
191
|
+
* )) {
|
|
192
|
+
* // ...
|
|
193
|
+
* }
|
|
194
|
+
* ```
|
|
91
195
|
*/
|
|
92
196
|
listSubscriptions(collection, objectID, query = {}, options) {
|
|
93
197
|
return this._client.getAPIList(path `/v1/objects/${collection}/${objectID}/subscriptions`, (EntriesCursor), { query, ...options });
|
|
@@ -96,6 +200,33 @@ export class Objects extends APIResource {
|
|
|
96
200
|
* Creates a new object or updates an existing one in the specified collection.
|
|
97
201
|
* This operation is used to identify objects with their properties, as well as
|
|
98
202
|
* optional preferences and channel data.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* const object = await client.objects.set(
|
|
207
|
+
* 'collection',
|
|
208
|
+
* 'id',
|
|
209
|
+
* {
|
|
210
|
+
* channel_data: {
|
|
211
|
+
* '97c5837d-c65c-4d54-aa39-080eeb81c69d': {
|
|
212
|
+
* tokens: ['push_token_123'],
|
|
213
|
+
* },
|
|
214
|
+
* },
|
|
215
|
+
* locale: 'en-US',
|
|
216
|
+
* preferences: {
|
|
217
|
+
* default: {
|
|
218
|
+
* channel_types: { email: true },
|
|
219
|
+
* workflows: {
|
|
220
|
+
* 'dinosaurs-loose': {
|
|
221
|
+
* channel_types: { email: true },
|
|
222
|
+
* },
|
|
223
|
+
* },
|
|
224
|
+
* },
|
|
225
|
+
* },
|
|
226
|
+
* timezone: 'America/New_York',
|
|
227
|
+
* },
|
|
228
|
+
* );
|
|
229
|
+
* ```
|
|
99
230
|
*/
|
|
100
231
|
set(collection, id, body, options) {
|
|
101
232
|
return this._client.put(path `/v1/objects/${collection}/${id}`, { body, ...options });
|
|
@@ -104,6 +235,16 @@ export class Objects extends APIResource {
|
|
|
104
235
|
* Sets the channel data for the specified object and channel. If no object exists
|
|
105
236
|
* in the current environment for the given `collection` and `object_id`, Knock
|
|
106
237
|
* will create the object as part of this request.
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```ts
|
|
241
|
+
* const channelData = await client.objects.setChannelData(
|
|
242
|
+
* 'collection',
|
|
243
|
+
* 'object_id',
|
|
244
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
245
|
+
* { data: { tokens: ['push_token_1'] } },
|
|
246
|
+
* );
|
|
247
|
+
* ```
|
|
107
248
|
*/
|
|
108
249
|
setChannelData(collection, objectID, channelID, body, options) {
|
|
109
250
|
return this._client.put(path `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, {
|
|
@@ -118,6 +259,27 @@ export class Objects extends APIResource {
|
|
|
118
259
|
* `:object_id`, Knock will create the object as part of this request. The
|
|
119
260
|
* preference set `:id` can be either `default` or a `tenant.id`. Learn more about
|
|
120
261
|
* [per-tenant preferences](/preferences/tenant-preferences).
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```ts
|
|
265
|
+
* const preferenceSet = await client.objects.setPreferences(
|
|
266
|
+
* 'collection',
|
|
267
|
+
* 'object_id',
|
|
268
|
+
* 'default',
|
|
269
|
+
* {
|
|
270
|
+
* categories: {
|
|
271
|
+
* marketing: false,
|
|
272
|
+
* transactional: { channel_types: { email: false } },
|
|
273
|
+
* },
|
|
274
|
+
* channel_types: { email: true },
|
|
275
|
+
* workflows: {
|
|
276
|
+
* 'dinosaurs-loose': {
|
|
277
|
+
* channel_types: { email: false },
|
|
278
|
+
* },
|
|
279
|
+
* },
|
|
280
|
+
* },
|
|
281
|
+
* );
|
|
282
|
+
* ```
|
|
121
283
|
*/
|
|
122
284
|
setPreferences(collection, objectID, id, body, options) {
|
|
123
285
|
return this._client.put(path `/v1/objects/${collection}/${objectID}/preferences/${id}`, {
|
|
@@ -127,6 +289,15 @@ export class Objects extends APIResource {
|
|
|
127
289
|
}
|
|
128
290
|
/**
|
|
129
291
|
* Unsets the channel data for the specified object and channel.
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```ts
|
|
295
|
+
* const response = await client.objects.unsetChannelData(
|
|
296
|
+
* 'collection',
|
|
297
|
+
* 'object_id',
|
|
298
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
299
|
+
* );
|
|
300
|
+
* ```
|
|
130
301
|
*/
|
|
131
302
|
unsetChannelData(collection, objectID, channelID, options) {
|
|
132
303
|
return this._client.delete(path `/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.mjs","sourceRoot":"","sources":["../../src/resources/objects/objects.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,KAAK,OAAO;OACZ,EAAE,IAAI,EAA+D;OASrE,EAAE,aAAa,EAAyC;OAExD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"objects.mjs","sourceRoot":"","sources":["../../src/resources/objects/objects.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,KAAK,OAAO;OACZ,EAAE,IAAI,EAA+D;OASrE,EAAE,aAAa,EAAyC;OAExD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAgYtD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ACR,CAAC;IACJ,CAAC;CACF;AAwWD,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC"}
|
package/resources/objects.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./objects/index.js"), exports);
|
|
19
6
|
//# sourceMappingURL=objects.js.map
|
package/resources/objects.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../src/resources/objects.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../src/resources/objects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"}
|
|
@@ -6,20 +6,60 @@ export declare class MsTeams extends APIResource {
|
|
|
6
6
|
/**
|
|
7
7
|
* Check if a connection to Microsoft Teams has been authorized for a given
|
|
8
8
|
* Microsoft Teams tenant object.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.providers.msTeams.checkAuth(
|
|
13
|
+
* 'channel_id',
|
|
14
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
checkAuth(channelID: string, query: MsTeamCheckAuthParams, options?: RequestOptions): APIPromise<MsTeamCheckAuthResponse>;
|
|
11
19
|
/**
|
|
12
20
|
* List the Microsoft Teams channels within a team. By default, archived and
|
|
13
21
|
* private channels are excluded from the results.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response =
|
|
26
|
+
* await client.providers.msTeams.listChannels(
|
|
27
|
+
* 'channel_id',
|
|
28
|
+
* {
|
|
29
|
+
* ms_teams_tenant_object: 'ms_teams_tenant_object',
|
|
30
|
+
* team_id: 'team_id',
|
|
31
|
+
* },
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
14
34
|
*/
|
|
15
35
|
listChannels(channelID: string, query: MsTeamListChannelsParams, options?: RequestOptions): APIPromise<MsTeamListChannelsResponse>;
|
|
16
36
|
/**
|
|
17
37
|
* Get a list of teams belonging to the Microsoft Entra tenant. By default,
|
|
18
38
|
* archived and private channels are excluded from the results.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Automatically fetches more pages as needed.
|
|
43
|
+
* for await (const msTeamListTeamsResponse of client.providers.msTeams.listTeams(
|
|
44
|
+
* 'channel_id',
|
|
45
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
46
|
+
* )) {
|
|
47
|
+
* // ...
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
19
50
|
*/
|
|
20
51
|
listTeams(channelID: string, query: MsTeamListTeamsParams, options?: RequestOptions): PagePromise<MsTeamListTeamsResponsesMsTeamsPagination, MsTeamListTeamsResponse>;
|
|
21
52
|
/**
|
|
22
53
|
* Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response =
|
|
58
|
+
* await client.providers.msTeams.revokeAccess(
|
|
59
|
+
* 'channel_id',
|
|
60
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
23
63
|
*/
|
|
24
64
|
revokeAccess(channelID: string, params: MsTeamRevokeAccessParams, options?: RequestOptions): APIPromise<MsTeamRevokeAccessResponse>;
|
|
25
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms-teams.d.mts","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,WAAW,EAAE;OAChE,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"ms-teams.d.mts","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,WAAW,EAAE;OAChE,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,SAAS,CACP,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,qBAAqB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAItC;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CACV,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,wBAAwB,EAC/B,OAAO,CAAC,EAAE,cAA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AuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -6,20 +6,60 @@ export declare class MsTeams extends APIResource {
|
|
|
6
6
|
/**
|
|
7
7
|
* Check if a connection to Microsoft Teams has been authorized for a given
|
|
8
8
|
* Microsoft Teams tenant object.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.providers.msTeams.checkAuth(
|
|
13
|
+
* 'channel_id',
|
|
14
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
checkAuth(channelID: string, query: MsTeamCheckAuthParams, options?: RequestOptions): APIPromise<MsTeamCheckAuthResponse>;
|
|
11
19
|
/**
|
|
12
20
|
* List the Microsoft Teams channels within a team. By default, archived and
|
|
13
21
|
* private channels are excluded from the results.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response =
|
|
26
|
+
* await client.providers.msTeams.listChannels(
|
|
27
|
+
* 'channel_id',
|
|
28
|
+
* {
|
|
29
|
+
* ms_teams_tenant_object: 'ms_teams_tenant_object',
|
|
30
|
+
* team_id: 'team_id',
|
|
31
|
+
* },
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
14
34
|
*/
|
|
15
35
|
listChannels(channelID: string, query: MsTeamListChannelsParams, options?: RequestOptions): APIPromise<MsTeamListChannelsResponse>;
|
|
16
36
|
/**
|
|
17
37
|
* Get a list of teams belonging to the Microsoft Entra tenant. By default,
|
|
18
38
|
* archived and private channels are excluded from the results.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Automatically fetches more pages as needed.
|
|
43
|
+
* for await (const msTeamListTeamsResponse of client.providers.msTeams.listTeams(
|
|
44
|
+
* 'channel_id',
|
|
45
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
46
|
+
* )) {
|
|
47
|
+
* // ...
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
19
50
|
*/
|
|
20
51
|
listTeams(channelID: string, query: MsTeamListTeamsParams, options?: RequestOptions): PagePromise<MsTeamListTeamsResponsesMsTeamsPagination, MsTeamListTeamsResponse>;
|
|
21
52
|
/**
|
|
22
53
|
* Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response =
|
|
58
|
+
* await client.providers.msTeams.revokeAccess(
|
|
59
|
+
* 'channel_id',
|
|
60
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
23
63
|
*/
|
|
24
64
|
revokeAccess(channelID: string, params: MsTeamRevokeAccessParams, options?: RequestOptions): APIPromise<MsTeamRevokeAccessResponse>;
|
|
25
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms-teams.d.ts","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,WAAW,EAAE;OAChE,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"ms-teams.d.ts","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,iBAAiB,EAAE,KAAK,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,CAAC,EAAE,MAAM,CAAC;QAEjB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -9,6 +9,14 @@ class MsTeams extends resource_1.APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Check if a connection to Microsoft Teams has been authorized for a given
|
|
11
11
|
* Microsoft Teams tenant object.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.providers.msTeams.checkAuth(
|
|
16
|
+
* 'channel_id',
|
|
17
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
checkAuth(channelID, query, options) {
|
|
14
22
|
return this._client.get((0, path_1.path) `/v1/providers/ms-teams/${channelID}/auth_check`, { query, ...options });
|
|
@@ -16,6 +24,18 @@ class MsTeams extends resource_1.APIResource {
|
|
|
16
24
|
/**
|
|
17
25
|
* List the Microsoft Teams channels within a team. By default, archived and
|
|
18
26
|
* private channels are excluded from the results.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const response =
|
|
31
|
+
* await client.providers.msTeams.listChannels(
|
|
32
|
+
* 'channel_id',
|
|
33
|
+
* {
|
|
34
|
+
* ms_teams_tenant_object: 'ms_teams_tenant_object',
|
|
35
|
+
* team_id: 'team_id',
|
|
36
|
+
* },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
19
39
|
*/
|
|
20
40
|
listChannels(channelID, query, options) {
|
|
21
41
|
return this._client.get((0, path_1.path) `/v1/providers/ms-teams/${channelID}/channels`, { query, ...options });
|
|
@@ -23,12 +43,32 @@ class MsTeams extends resource_1.APIResource {
|
|
|
23
43
|
/**
|
|
24
44
|
* Get a list of teams belonging to the Microsoft Entra tenant. By default,
|
|
25
45
|
* archived and private channels are excluded from the results.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* // Automatically fetches more pages as needed.
|
|
50
|
+
* for await (const msTeamListTeamsResponse of client.providers.msTeams.listTeams(
|
|
51
|
+
* 'channel_id',
|
|
52
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
53
|
+
* )) {
|
|
54
|
+
* // ...
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
26
57
|
*/
|
|
27
58
|
listTeams(channelID, query, options) {
|
|
28
59
|
return this._client.getAPIList((0, path_1.path) `/v1/providers/ms-teams/${channelID}/teams`, (pagination_1.MsTeamsPagination), { query, ...options });
|
|
29
60
|
}
|
|
30
61
|
/**
|
|
31
62
|
* Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const response =
|
|
67
|
+
* await client.providers.msTeams.revokeAccess(
|
|
68
|
+
* 'channel_id',
|
|
69
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
32
72
|
*/
|
|
33
73
|
revokeAccess(channelID, params, options) {
|
|
34
74
|
const { ms_teams_tenant_object } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms-teams.js","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAqG;AAErG,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"ms-teams.js","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAqG;AAErG,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;OAWG;IACH,SAAS,CACP,SAAiB,EACjB,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,SAAS,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CACV,SAAiB,EACjB,KAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,SAAS,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,SAAS,CACP,SAAiB,EACjB,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,0BAA0B,SAAS,QAAQ,EAC/C,CAAA,8BAA0C,CAAA,EAC1C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACH,YAAY,CACV,SAAiB,EACjB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,SAAS,gBAAgB,EAAE;YAC/E,KAAK,EAAE,EAAE,sBAAsB,EAAE;YACjC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA/FD,0BA+FC"}
|
|
@@ -6,6 +6,14 @@ export class MsTeams extends APIResource {
|
|
|
6
6
|
/**
|
|
7
7
|
* Check if a connection to Microsoft Teams has been authorized for a given
|
|
8
8
|
* Microsoft Teams tenant object.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.providers.msTeams.checkAuth(
|
|
13
|
+
* 'channel_id',
|
|
14
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
checkAuth(channelID, query, options) {
|
|
11
19
|
return this._client.get(path `/v1/providers/ms-teams/${channelID}/auth_check`, { query, ...options });
|
|
@@ -13,6 +21,18 @@ export class MsTeams extends APIResource {
|
|
|
13
21
|
/**
|
|
14
22
|
* List the Microsoft Teams channels within a team. By default, archived and
|
|
15
23
|
* private channels are excluded from the results.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const response =
|
|
28
|
+
* await client.providers.msTeams.listChannels(
|
|
29
|
+
* 'channel_id',
|
|
30
|
+
* {
|
|
31
|
+
* ms_teams_tenant_object: 'ms_teams_tenant_object',
|
|
32
|
+
* team_id: 'team_id',
|
|
33
|
+
* },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
16
36
|
*/
|
|
17
37
|
listChannels(channelID, query, options) {
|
|
18
38
|
return this._client.get(path `/v1/providers/ms-teams/${channelID}/channels`, { query, ...options });
|
|
@@ -20,12 +40,32 @@ export class MsTeams extends APIResource {
|
|
|
20
40
|
/**
|
|
21
41
|
* Get a list of teams belonging to the Microsoft Entra tenant. By default,
|
|
22
42
|
* archived and private channels are excluded from the results.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* // Automatically fetches more pages as needed.
|
|
47
|
+
* for await (const msTeamListTeamsResponse of client.providers.msTeams.listTeams(
|
|
48
|
+
* 'channel_id',
|
|
49
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
50
|
+
* )) {
|
|
51
|
+
* // ...
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
23
54
|
*/
|
|
24
55
|
listTeams(channelID, query, options) {
|
|
25
56
|
return this._client.getAPIList(path `/v1/providers/ms-teams/${channelID}/teams`, (MsTeamsPagination), { query, ...options });
|
|
26
57
|
}
|
|
27
58
|
/**
|
|
28
59
|
* Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const response =
|
|
64
|
+
* await client.providers.msTeams.revokeAccess(
|
|
65
|
+
* 'channel_id',
|
|
66
|
+
* { ms_teams_tenant_object: 'ms_teams_tenant_object' },
|
|
67
|
+
* );
|
|
68
|
+
* ```
|
|
29
69
|
*/
|
|
30
70
|
revokeAccess(channelID, params, options) {
|
|
31
71
|
const { ms_teams_tenant_object } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms-teams.mjs","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,iBAAiB,EAA6C;OAEhE,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"ms-teams.mjs","sourceRoot":"","sources":["../../src/resources/providers/ms-teams.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,iBAAiB,EAA6C;OAEhE,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,SAAS,CACP,SAAiB,EACjB,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,SAAS,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CACV,SAAiB,EACjB,KAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,SAAS,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,SAAS,CACP,SAAiB,EACjB,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,0BAA0B,SAAS,QAAQ,EAC/C,CAAA,iBAA0C,CAAA,EAC1C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACH,YAAY,CACV,SAAiB,EACjB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,SAAS,gBAAgB,EAAE;YAC/E,KAAK,EAAE,EAAE,sBAAsB,EAAE;YACjC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
4
|
exports.Providers = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
28
6
|
const resource_1 = require("../../core/resource.js");
|
|
29
|
-
const MsTeamsAPI = __importStar(require("./ms-teams.js"));
|
|
7
|
+
const MsTeamsAPI = tslib_1.__importStar(require("./ms-teams.js"));
|
|
30
8
|
const ms_teams_1 = require("./ms-teams.js");
|
|
31
|
-
const SlackAPI = __importStar(require("./slack.js"));
|
|
9
|
+
const SlackAPI = tslib_1.__importStar(require("./slack.js"));
|
|
32
10
|
const slack_1 = require("./slack.js");
|
|
33
11
|
class Providers extends resource_1.APIResource {
|
|
34
12
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../src/resources/providers/providers.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../src/resources/providers/providers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,kEAAyC;AACzC,4CAWoB;AACpB,6DAAoC;AACpC,sCASiB;AAEjB,MAAa,SAAU,SAAQ,sBAAW;IAA1C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAHD,8BAGC;AAED,SAAS,CAAC,KAAK,GAAG,aAAK,CAAC;AACxB,SAAS,CAAC,OAAO,GAAG,kBAAO,CAAC"}
|