@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
|
@@ -25,65 +25,204 @@ export declare class Users extends APIResource {
|
|
|
25
25
|
* Create or update a user with the provided identification data. When you identify
|
|
26
26
|
* an existing user, the system merges the properties you specific with what is
|
|
27
27
|
* currently set on the user, updating only the fields included in your requests.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const user = await client.users.update('user_id', {
|
|
32
|
+
* channel_data: {
|
|
33
|
+
* '97c5837d-c65c-4d54-aa39-080eeb81c69d': {
|
|
34
|
+
* tokens: ['push_token_123'],
|
|
35
|
+
* },
|
|
36
|
+
* },
|
|
37
|
+
* email: 'ian.malcolm@chaos.theory',
|
|
38
|
+
* name: 'Dr. Ian Malcolm',
|
|
39
|
+
* preferences: {
|
|
40
|
+
* default: {
|
|
41
|
+
* channel_types: { email: true },
|
|
42
|
+
* workflows: {
|
|
43
|
+
* 'dinosaurs-loose': {
|
|
44
|
+
* channel_types: { email: true },
|
|
45
|
+
* },
|
|
46
|
+
* },
|
|
47
|
+
* },
|
|
48
|
+
* },
|
|
49
|
+
* timezone: 'America/New_York',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
28
52
|
*/
|
|
29
53
|
update(userID: string, body: UserUpdateParams, options?: RequestOptions): APIPromise<User>;
|
|
30
54
|
/**
|
|
31
55
|
* Retrieve a paginated list of users in the environment. Defaults to 50 users per
|
|
32
56
|
* page.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* // Automatically fetches more pages as needed.
|
|
61
|
+
* for await (const user of client.users.list()) {
|
|
62
|
+
* // ...
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
33
65
|
*/
|
|
34
66
|
list(query?: UserListParams | null | undefined, options?: RequestOptions): PagePromise<UsersEntriesCursor, User>;
|
|
35
67
|
/**
|
|
36
68
|
* Permanently delete a user and all associated data.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const user = await client.users.delete('user_id');
|
|
73
|
+
* ```
|
|
37
74
|
*/
|
|
38
75
|
delete(userID: string, options?: RequestOptions): APIPromise<string>;
|
|
39
76
|
/**
|
|
40
77
|
* Retrieve a specific user by their ID.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const user = await client.users.get('user_id');
|
|
82
|
+
* ```
|
|
41
83
|
*/
|
|
42
84
|
get(userID: string, options?: RequestOptions): APIPromise<User>;
|
|
43
85
|
/**
|
|
44
86
|
* Retrieves the channel data for a specific user and channel ID.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const channelData = await client.users.getChannelData(
|
|
91
|
+
* 'user_id',
|
|
92
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
45
95
|
*/
|
|
46
96
|
getChannelData(userID: string, channelID: string, options?: RequestOptions): APIPromise<ChannelDataAPI.ChannelData>;
|
|
47
97
|
/**
|
|
48
98
|
* Retrieves a specific preference set for a user identified by the preference set
|
|
49
99
|
* ID.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const preferenceSet = await client.users.getPreferences(
|
|
104
|
+
* 'user_id',
|
|
105
|
+
* 'default',
|
|
106
|
+
* );
|
|
107
|
+
* ```
|
|
50
108
|
*/
|
|
51
109
|
getPreferences(userID: string, id: string, query?: UserGetPreferencesParams | null | undefined, options?: RequestOptions): APIPromise<PreferencesAPI.PreferenceSet>;
|
|
52
110
|
/**
|
|
53
111
|
* Returns a paginated list of messages for a specific user. Allows filtering by
|
|
54
112
|
* message status and provides various sorting options. Messages outside the
|
|
55
113
|
* account's retention window will not be included in the results.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* // Automatically fetches more pages as needed.
|
|
118
|
+
* for await (const message of client.users.listMessages(
|
|
119
|
+
* 'user-123',
|
|
120
|
+
* )) {
|
|
121
|
+
* // ...
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
56
124
|
*/
|
|
57
125
|
listMessages(userID: string, query?: UserListMessagesParams | null | undefined, options?: RequestOptions): PagePromise<MessagesEntriesCursor, MessagesAPI.Message>;
|
|
58
126
|
/**
|
|
59
127
|
* Retrieves a list of all preference sets for a specific user.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const preferenceSets = await client.users.listPreferences(
|
|
132
|
+
* 'user_id',
|
|
133
|
+
* );
|
|
134
|
+
* ```
|
|
60
135
|
*/
|
|
61
136
|
listPreferences(userID: string, options?: RequestOptions): APIPromise<UserListPreferencesResponse>;
|
|
62
137
|
/**
|
|
63
138
|
* Returns a paginated list of schedules for a specific user, in descending order.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* // Automatically fetches more pages as needed.
|
|
143
|
+
* for await (const schedule of client.users.listSchedules(
|
|
144
|
+
* 'user_id',
|
|
145
|
+
* )) {
|
|
146
|
+
* // ...
|
|
147
|
+
* }
|
|
148
|
+
* ```
|
|
64
149
|
*/
|
|
65
150
|
listSchedules(userID: string, query?: UserListSchedulesParams | null | undefined, options?: RequestOptions): PagePromise<SchedulesEntriesCursor, SchedulesAPI.Schedule>;
|
|
66
151
|
/**
|
|
67
152
|
* Retrieves a paginated list of subscriptions for a specific user, in descending
|
|
68
153
|
* order.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```ts
|
|
157
|
+
* // Automatically fetches more pages as needed.
|
|
158
|
+
* for await (const subscription of client.users.listSubscriptions(
|
|
159
|
+
* 'user_id',
|
|
160
|
+
* )) {
|
|
161
|
+
* // ...
|
|
162
|
+
* }
|
|
163
|
+
* ```
|
|
69
164
|
*/
|
|
70
165
|
listSubscriptions(userID: string, query?: UserListSubscriptionsParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionsEntriesCursor, SubscriptionsAPI.Subscription>;
|
|
71
166
|
/**
|
|
72
167
|
* Merge two users together, where the user specified with the `from_user_id` param
|
|
73
168
|
* will be merged into the user specified by `user_id`.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const user = await client.users.merge('user_id', {
|
|
173
|
+
* from_user_id: 'user_1',
|
|
174
|
+
* });
|
|
175
|
+
* ```
|
|
74
176
|
*/
|
|
75
177
|
merge(userID: string, body: UserMergeParams, options?: RequestOptions): APIPromise<User>;
|
|
76
178
|
/**
|
|
77
179
|
* Updates or creates channel data for a specific user and channel ID.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```ts
|
|
183
|
+
* const channelData = await client.users.setChannelData(
|
|
184
|
+
* 'user_id',
|
|
185
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
186
|
+
* { data: { tokens: ['push_token_1'] } },
|
|
187
|
+
* );
|
|
188
|
+
* ```
|
|
78
189
|
*/
|
|
79
190
|
setChannelData(userID: string, channelID: string, body: UserSetChannelDataParams, options?: RequestOptions): APIPromise<ChannelDataAPI.ChannelData>;
|
|
80
191
|
/**
|
|
81
192
|
* Updates a complete preference set for a user. This is a destructive operation
|
|
82
193
|
* that will replace the existing preference set for the user.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```ts
|
|
197
|
+
* const preferenceSet = await client.users.setPreferences(
|
|
198
|
+
* 'user_id',
|
|
199
|
+
* 'default',
|
|
200
|
+
* {
|
|
201
|
+
* categories: {
|
|
202
|
+
* marketing: false,
|
|
203
|
+
* transactional: { channel_types: { email: false } },
|
|
204
|
+
* },
|
|
205
|
+
* channel_types: { email: true },
|
|
206
|
+
* workflows: {
|
|
207
|
+
* 'dinosaurs-loose': {
|
|
208
|
+
* channel_types: { email: false },
|
|
209
|
+
* },
|
|
210
|
+
* },
|
|
211
|
+
* },
|
|
212
|
+
* );
|
|
213
|
+
* ```
|
|
83
214
|
*/
|
|
84
215
|
setPreferences(userID: string, id: string, body: UserSetPreferencesParams, options?: RequestOptions): APIPromise<PreferencesAPI.PreferenceSet>;
|
|
85
216
|
/**
|
|
86
217
|
* Deletes channel data for a specific user and channel ID.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```ts
|
|
221
|
+
* const response = await client.users.unsetChannelData(
|
|
222
|
+
* 'user_id',
|
|
223
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
224
|
+
* );
|
|
225
|
+
* ```
|
|
87
226
|
*/
|
|
88
227
|
unsetChannelData(userID: string, channelID: string, options?: RequestOptions): APIPromise<string>;
|
|
89
228
|
}
|
|
@@ -119,7 +258,7 @@ export interface IdentifyUserRequest {
|
|
|
119
258
|
*/
|
|
120
259
|
name?: string | null;
|
|
121
260
|
/**
|
|
122
|
-
* The
|
|
261
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
123
262
|
* user (required for SMS channels).
|
|
124
263
|
*/
|
|
125
264
|
phone_number?: string | null;
|
|
@@ -128,10 +267,10 @@ export interface IdentifyUserRequest {
|
|
|
128
267
|
*/
|
|
129
268
|
preferences?: PreferencesAPI.InlinePreferenceSetRequest | null;
|
|
130
269
|
/**
|
|
131
|
-
* The timezone of the user. Must be a
|
|
132
|
-
* [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
133
|
-
* Used
|
|
134
|
-
* [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
270
|
+
* The timezone of the user. Must be a
|
|
271
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
272
|
+
* Used
|
|
273
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
135
274
|
*/
|
|
136
275
|
timezone?: string | null;
|
|
137
276
|
[k: string]: unknown;
|
|
@@ -147,6 +286,10 @@ export interface InlineIdentifyUserRequest {
|
|
|
147
286
|
* The ID for the user that you set when identifying them in Knock.
|
|
148
287
|
*/
|
|
149
288
|
id: string;
|
|
289
|
+
/**
|
|
290
|
+
* URL to the user's avatar image.
|
|
291
|
+
*/
|
|
292
|
+
avatar?: string | null;
|
|
150
293
|
/**
|
|
151
294
|
* A request to set channel data for a type of channel inline.
|
|
152
295
|
*/
|
|
@@ -155,10 +298,34 @@ export interface InlineIdentifyUserRequest {
|
|
|
155
298
|
* The creation date of the user from your system.
|
|
156
299
|
*/
|
|
157
300
|
created_at?: string | null;
|
|
301
|
+
/**
|
|
302
|
+
* The primary email address for the user.
|
|
303
|
+
*/
|
|
304
|
+
email?: string | null;
|
|
305
|
+
/**
|
|
306
|
+
* The locale of the user. Used for [message localization](/concepts/translations).
|
|
307
|
+
*/
|
|
308
|
+
locale?: string | null;
|
|
309
|
+
/**
|
|
310
|
+
* Display name of the user.
|
|
311
|
+
*/
|
|
312
|
+
name?: string | null;
|
|
313
|
+
/**
|
|
314
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
315
|
+
* user (required for SMS channels).
|
|
316
|
+
*/
|
|
317
|
+
phone_number?: string | null;
|
|
158
318
|
/**
|
|
159
319
|
* Inline set preferences for a recipient, where the key is the preference set id.
|
|
160
320
|
*/
|
|
161
321
|
preferences?: PreferencesAPI.InlinePreferenceSetRequest | null;
|
|
322
|
+
/**
|
|
323
|
+
* The timezone of the user. Must be a
|
|
324
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
325
|
+
* Used
|
|
326
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
327
|
+
*/
|
|
328
|
+
timezone?: string | null;
|
|
162
329
|
[k: string]: unknown;
|
|
163
330
|
}
|
|
164
331
|
/**
|
|
@@ -196,15 +363,15 @@ export interface User {
|
|
|
196
363
|
*/
|
|
197
364
|
name?: string | null;
|
|
198
365
|
/**
|
|
199
|
-
* The
|
|
366
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
200
367
|
* user (required for SMS channels).
|
|
201
368
|
*/
|
|
202
369
|
phone_number?: string | null;
|
|
203
370
|
/**
|
|
204
|
-
* The timezone of the user. Must be a
|
|
205
|
-
* [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
206
|
-
* Used
|
|
207
|
-
* [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
371
|
+
* The timezone of the user. Must be a
|
|
372
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
373
|
+
* Used
|
|
374
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
208
375
|
*/
|
|
209
376
|
timezone?: string | null;
|
|
210
377
|
[k: string]: unknown;
|
|
@@ -247,7 +414,7 @@ export interface UserUpdateParams {
|
|
|
247
414
|
*/
|
|
248
415
|
name?: string | null;
|
|
249
416
|
/**
|
|
250
|
-
* The
|
|
417
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
251
418
|
* user (required for SMS channels).
|
|
252
419
|
*/
|
|
253
420
|
phone_number?: string | null;
|
|
@@ -256,10 +423,10 @@ export interface UserUpdateParams {
|
|
|
256
423
|
*/
|
|
257
424
|
preferences?: PreferencesAPI.InlinePreferenceSetRequest | null;
|
|
258
425
|
/**
|
|
259
|
-
* The timezone of the user. Must be a
|
|
260
|
-
* [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
261
|
-
* Used
|
|
262
|
-
* [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
426
|
+
* The timezone of the user. Must be a
|
|
427
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
428
|
+
* Used
|
|
429
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
263
430
|
*/
|
|
264
431
|
timezone?: string | null;
|
|
265
432
|
[k: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,KAAK,WAAW;OAChB,EAAE,qBAAqB,EAAE;OACzB,KAAK,cAAc;OACnB,KAAK,cAAc;OACnB,KAAK,gBAAgB;OACrB,EAAE,0BAA0B,EAAE;OAC9B,KAAK,YAAY;OACjB,EAAE,sBAAsB,EAAE;OAC1B,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE;OACxE,KAAK,QAAQ;OACb,EACL,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,mCAAmC,EACnC,KAAK,EACN;OACM,KAAK,SAAS;OACd,EACL,qBAAqB,EACrB,uBAAuB,EACvB,gCAAgC,EAChC,kCAAkC,EAClC,kCAAkC,EAClC,oCAAoC,EACpC,4BAA4B,EAC5B,8BAA8B,EAC9B,MAAM,EACP;OACM,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,WAAW,EAAE;OACxD,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAC9D,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IAEpD
|
|
1
|
+
{"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,KAAK,WAAW;OAChB,EAAE,qBAAqB,EAAE;OACzB,KAAK,cAAc;OACnB,KAAK,cAAc;OACnB,KAAK,gBAAgB;OACrB,EAAE,0BAA0B,EAAE;OAC9B,KAAK,YAAY;OACjB,EAAE,sBAAsB,EAAE;OAC1B,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE;OACxE,KAAK,QAAQ;OACb,EACL,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,mCAAmC,EACnC,KAAK,EACN;OACM,KAAK,SAAS;OACd,EACL,qBAAqB,EACrB,uBAAuB,EACvB,gCAAgC,EAChC,kCAAkC,EAClC,kCAAkC,EAClC,oCAAoC,EACpC,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IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH;AAED,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,KAAK,0BAA0B,EAAE,CAAC"}
|
|
@@ -25,65 +25,204 @@ export declare class Users extends APIResource {
|
|
|
25
25
|
* Create or update a user with the provided identification data. When you identify
|
|
26
26
|
* an existing user, the system merges the properties you specific with what is
|
|
27
27
|
* currently set on the user, updating only the fields included in your requests.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const user = await client.users.update('user_id', {
|
|
32
|
+
* channel_data: {
|
|
33
|
+
* '97c5837d-c65c-4d54-aa39-080eeb81c69d': {
|
|
34
|
+
* tokens: ['push_token_123'],
|
|
35
|
+
* },
|
|
36
|
+
* },
|
|
37
|
+
* email: 'ian.malcolm@chaos.theory',
|
|
38
|
+
* name: 'Dr. Ian Malcolm',
|
|
39
|
+
* preferences: {
|
|
40
|
+
* default: {
|
|
41
|
+
* channel_types: { email: true },
|
|
42
|
+
* workflows: {
|
|
43
|
+
* 'dinosaurs-loose': {
|
|
44
|
+
* channel_types: { email: true },
|
|
45
|
+
* },
|
|
46
|
+
* },
|
|
47
|
+
* },
|
|
48
|
+
* },
|
|
49
|
+
* timezone: 'America/New_York',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
28
52
|
*/
|
|
29
53
|
update(userID: string, body: UserUpdateParams, options?: RequestOptions): APIPromise<User>;
|
|
30
54
|
/**
|
|
31
55
|
* Retrieve a paginated list of users in the environment. Defaults to 50 users per
|
|
32
56
|
* page.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* // Automatically fetches more pages as needed.
|
|
61
|
+
* for await (const user of client.users.list()) {
|
|
62
|
+
* // ...
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
33
65
|
*/
|
|
34
66
|
list(query?: UserListParams | null | undefined, options?: RequestOptions): PagePromise<UsersEntriesCursor, User>;
|
|
35
67
|
/**
|
|
36
68
|
* Permanently delete a user and all associated data.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const user = await client.users.delete('user_id');
|
|
73
|
+
* ```
|
|
37
74
|
*/
|
|
38
75
|
delete(userID: string, options?: RequestOptions): APIPromise<string>;
|
|
39
76
|
/**
|
|
40
77
|
* Retrieve a specific user by their ID.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* const user = await client.users.get('user_id');
|
|
82
|
+
* ```
|
|
41
83
|
*/
|
|
42
84
|
get(userID: string, options?: RequestOptions): APIPromise<User>;
|
|
43
85
|
/**
|
|
44
86
|
* Retrieves the channel data for a specific user and channel ID.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const channelData = await client.users.getChannelData(
|
|
91
|
+
* 'user_id',
|
|
92
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
45
95
|
*/
|
|
46
96
|
getChannelData(userID: string, channelID: string, options?: RequestOptions): APIPromise<ChannelDataAPI.ChannelData>;
|
|
47
97
|
/**
|
|
48
98
|
* Retrieves a specific preference set for a user identified by the preference set
|
|
49
99
|
* ID.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const preferenceSet = await client.users.getPreferences(
|
|
104
|
+
* 'user_id',
|
|
105
|
+
* 'default',
|
|
106
|
+
* );
|
|
107
|
+
* ```
|
|
50
108
|
*/
|
|
51
109
|
getPreferences(userID: string, id: string, query?: UserGetPreferencesParams | null | undefined, options?: RequestOptions): APIPromise<PreferencesAPI.PreferenceSet>;
|
|
52
110
|
/**
|
|
53
111
|
* Returns a paginated list of messages for a specific user. Allows filtering by
|
|
54
112
|
* message status and provides various sorting options. Messages outside the
|
|
55
113
|
* account's retention window will not be included in the results.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* // Automatically fetches more pages as needed.
|
|
118
|
+
* for await (const message of client.users.listMessages(
|
|
119
|
+
* 'user-123',
|
|
120
|
+
* )) {
|
|
121
|
+
* // ...
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
56
124
|
*/
|
|
57
125
|
listMessages(userID: string, query?: UserListMessagesParams | null | undefined, options?: RequestOptions): PagePromise<MessagesEntriesCursor, MessagesAPI.Message>;
|
|
58
126
|
/**
|
|
59
127
|
* Retrieves a list of all preference sets for a specific user.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const preferenceSets = await client.users.listPreferences(
|
|
132
|
+
* 'user_id',
|
|
133
|
+
* );
|
|
134
|
+
* ```
|
|
60
135
|
*/
|
|
61
136
|
listPreferences(userID: string, options?: RequestOptions): APIPromise<UserListPreferencesResponse>;
|
|
62
137
|
/**
|
|
63
138
|
* Returns a paginated list of schedules for a specific user, in descending order.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* // Automatically fetches more pages as needed.
|
|
143
|
+
* for await (const schedule of client.users.listSchedules(
|
|
144
|
+
* 'user_id',
|
|
145
|
+
* )) {
|
|
146
|
+
* // ...
|
|
147
|
+
* }
|
|
148
|
+
* ```
|
|
64
149
|
*/
|
|
65
150
|
listSchedules(userID: string, query?: UserListSchedulesParams | null | undefined, options?: RequestOptions): PagePromise<SchedulesEntriesCursor, SchedulesAPI.Schedule>;
|
|
66
151
|
/**
|
|
67
152
|
* Retrieves a paginated list of subscriptions for a specific user, in descending
|
|
68
153
|
* order.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```ts
|
|
157
|
+
* // Automatically fetches more pages as needed.
|
|
158
|
+
* for await (const subscription of client.users.listSubscriptions(
|
|
159
|
+
* 'user_id',
|
|
160
|
+
* )) {
|
|
161
|
+
* // ...
|
|
162
|
+
* }
|
|
163
|
+
* ```
|
|
69
164
|
*/
|
|
70
165
|
listSubscriptions(userID: string, query?: UserListSubscriptionsParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionsEntriesCursor, SubscriptionsAPI.Subscription>;
|
|
71
166
|
/**
|
|
72
167
|
* Merge two users together, where the user specified with the `from_user_id` param
|
|
73
168
|
* will be merged into the user specified by `user_id`.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const user = await client.users.merge('user_id', {
|
|
173
|
+
* from_user_id: 'user_1',
|
|
174
|
+
* });
|
|
175
|
+
* ```
|
|
74
176
|
*/
|
|
75
177
|
merge(userID: string, body: UserMergeParams, options?: RequestOptions): APIPromise<User>;
|
|
76
178
|
/**
|
|
77
179
|
* Updates or creates channel data for a specific user and channel ID.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```ts
|
|
183
|
+
* const channelData = await client.users.setChannelData(
|
|
184
|
+
* 'user_id',
|
|
185
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
186
|
+
* { data: { tokens: ['push_token_1'] } },
|
|
187
|
+
* );
|
|
188
|
+
* ```
|
|
78
189
|
*/
|
|
79
190
|
setChannelData(userID: string, channelID: string, body: UserSetChannelDataParams, options?: RequestOptions): APIPromise<ChannelDataAPI.ChannelData>;
|
|
80
191
|
/**
|
|
81
192
|
* Updates a complete preference set for a user. This is a destructive operation
|
|
82
193
|
* that will replace the existing preference set for the user.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```ts
|
|
197
|
+
* const preferenceSet = await client.users.setPreferences(
|
|
198
|
+
* 'user_id',
|
|
199
|
+
* 'default',
|
|
200
|
+
* {
|
|
201
|
+
* categories: {
|
|
202
|
+
* marketing: false,
|
|
203
|
+
* transactional: { channel_types: { email: false } },
|
|
204
|
+
* },
|
|
205
|
+
* channel_types: { email: true },
|
|
206
|
+
* workflows: {
|
|
207
|
+
* 'dinosaurs-loose': {
|
|
208
|
+
* channel_types: { email: false },
|
|
209
|
+
* },
|
|
210
|
+
* },
|
|
211
|
+
* },
|
|
212
|
+
* );
|
|
213
|
+
* ```
|
|
83
214
|
*/
|
|
84
215
|
setPreferences(userID: string, id: string, body: UserSetPreferencesParams, options?: RequestOptions): APIPromise<PreferencesAPI.PreferenceSet>;
|
|
85
216
|
/**
|
|
86
217
|
* Deletes channel data for a specific user and channel ID.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```ts
|
|
221
|
+
* const response = await client.users.unsetChannelData(
|
|
222
|
+
* 'user_id',
|
|
223
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
224
|
+
* );
|
|
225
|
+
* ```
|
|
87
226
|
*/
|
|
88
227
|
unsetChannelData(userID: string, channelID: string, options?: RequestOptions): APIPromise<string>;
|
|
89
228
|
}
|
|
@@ -119,7 +258,7 @@ export interface IdentifyUserRequest {
|
|
|
119
258
|
*/
|
|
120
259
|
name?: string | null;
|
|
121
260
|
/**
|
|
122
|
-
* The
|
|
261
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
123
262
|
* user (required for SMS channels).
|
|
124
263
|
*/
|
|
125
264
|
phone_number?: string | null;
|
|
@@ -128,10 +267,10 @@ export interface IdentifyUserRequest {
|
|
|
128
267
|
*/
|
|
129
268
|
preferences?: PreferencesAPI.InlinePreferenceSetRequest | null;
|
|
130
269
|
/**
|
|
131
|
-
* The timezone of the user. Must be a
|
|
132
|
-
* [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
133
|
-
* Used
|
|
134
|
-
* [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
270
|
+
* The timezone of the user. Must be a
|
|
271
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
272
|
+
* Used
|
|
273
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
135
274
|
*/
|
|
136
275
|
timezone?: string | null;
|
|
137
276
|
[k: string]: unknown;
|
|
@@ -147,6 +286,10 @@ export interface InlineIdentifyUserRequest {
|
|
|
147
286
|
* The ID for the user that you set when identifying them in Knock.
|
|
148
287
|
*/
|
|
149
288
|
id: string;
|
|
289
|
+
/**
|
|
290
|
+
* URL to the user's avatar image.
|
|
291
|
+
*/
|
|
292
|
+
avatar?: string | null;
|
|
150
293
|
/**
|
|
151
294
|
* A request to set channel data for a type of channel inline.
|
|
152
295
|
*/
|
|
@@ -155,10 +298,34 @@ export interface InlineIdentifyUserRequest {
|
|
|
155
298
|
* The creation date of the user from your system.
|
|
156
299
|
*/
|
|
157
300
|
created_at?: string | null;
|
|
301
|
+
/**
|
|
302
|
+
* The primary email address for the user.
|
|
303
|
+
*/
|
|
304
|
+
email?: string | null;
|
|
305
|
+
/**
|
|
306
|
+
* The locale of the user. Used for [message localization](/concepts/translations).
|
|
307
|
+
*/
|
|
308
|
+
locale?: string | null;
|
|
309
|
+
/**
|
|
310
|
+
* Display name of the user.
|
|
311
|
+
*/
|
|
312
|
+
name?: string | null;
|
|
313
|
+
/**
|
|
314
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
315
|
+
* user (required for SMS channels).
|
|
316
|
+
*/
|
|
317
|
+
phone_number?: string | null;
|
|
158
318
|
/**
|
|
159
319
|
* Inline set preferences for a recipient, where the key is the preference set id.
|
|
160
320
|
*/
|
|
161
321
|
preferences?: PreferencesAPI.InlinePreferenceSetRequest | null;
|
|
322
|
+
/**
|
|
323
|
+
* The timezone of the user. Must be a
|
|
324
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
325
|
+
* Used
|
|
326
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
327
|
+
*/
|
|
328
|
+
timezone?: string | null;
|
|
162
329
|
[k: string]: unknown;
|
|
163
330
|
}
|
|
164
331
|
/**
|
|
@@ -196,15 +363,15 @@ export interface User {
|
|
|
196
363
|
*/
|
|
197
364
|
name?: string | null;
|
|
198
365
|
/**
|
|
199
|
-
* The
|
|
366
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
200
367
|
* user (required for SMS channels).
|
|
201
368
|
*/
|
|
202
369
|
phone_number?: string | null;
|
|
203
370
|
/**
|
|
204
|
-
* The timezone of the user. Must be a
|
|
205
|
-
* [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
206
|
-
* Used
|
|
207
|
-
* [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
371
|
+
* The timezone of the user. Must be a
|
|
372
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
373
|
+
* Used
|
|
374
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
208
375
|
*/
|
|
209
376
|
timezone?: string | null;
|
|
210
377
|
[k: string]: unknown;
|
|
@@ -247,7 +414,7 @@ export interface UserUpdateParams {
|
|
|
247
414
|
*/
|
|
248
415
|
name?: string | null;
|
|
249
416
|
/**
|
|
250
|
-
* The
|
|
417
|
+
* The [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number of the
|
|
251
418
|
* user (required for SMS channels).
|
|
252
419
|
*/
|
|
253
420
|
phone_number?: string | null;
|
|
@@ -256,10 +423,10 @@ export interface UserUpdateParams {
|
|
|
256
423
|
*/
|
|
257
424
|
preferences?: PreferencesAPI.InlinePreferenceSetRequest | null;
|
|
258
425
|
/**
|
|
259
|
-
* The timezone of the user. Must be a
|
|
260
|
-
* [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
261
|
-
* Used
|
|
262
|
-
* [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
426
|
+
* The timezone of the user. Must be a
|
|
427
|
+
* valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
428
|
+
* Used
|
|
429
|
+
* for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
263
430
|
*/
|
|
264
431
|
timezone?: string | null;
|
|
265
432
|
[k: string]: unknown;
|