@knocklabs/node 1.32.0 → 1.34.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 +83 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +20 -1
- package/client.js.map +1 -1
- package/client.mjs +20 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.d.mts +1 -6
- package/internal/utils/query.d.mts.map +1 -1
- package/internal/utils/query.d.ts +1 -6
- package/internal/utils/query.d.ts.map +1 -1
- package/internal/utils/query.js +7 -28
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs +5 -26
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/index.d.mts.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/stringifyQuery.d.mts +19 -0
- package/lib/stringifyQuery.d.mts.map +1 -0
- package/lib/stringifyQuery.d.ts +19 -0
- package/lib/stringifyQuery.d.ts.map +1 -0
- package/lib/stringifyQuery.js +43 -0
- package/lib/stringifyQuery.js.map +1 -0
- package/lib/stringifyQuery.mjs +39 -0
- package/lib/stringifyQuery.mjs.map +1 -0
- package/lib/tokenSigner.d.mts.map +1 -1
- package/lib/tokenSigner.d.ts.map +1 -1
- package/lib/tokenSigner.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.mjs.map +1 -1
- package/resources/bulk-operations.d.mts.map +1 -1
- package/resources/bulk-operations.d.ts.map +1 -1
- package/resources/bulk-operations.mjs.map +1 -1
- package/resources/channels/bulk.d.mts.map +1 -1
- package/resources/channels/bulk.d.ts.map +1 -1
- package/resources/channels/bulk.mjs.map +1 -1
- package/resources/channels/channels.d.mts.map +1 -1
- package/resources/channels/channels.d.ts.map +1 -1
- package/resources/channels/channels.mjs.map +1 -1
- package/resources/channels/index.d.mts.map +1 -1
- package/resources/channels/index.d.ts.map +1 -1
- package/resources/channels/index.mjs.map +1 -1
- package/resources/channels.d.mts.map +1 -1
- package/resources/channels.d.ts.map +1 -1
- package/resources/channels.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/integrations/census.d.mts.map +1 -1
- package/resources/integrations/census.d.ts.map +1 -1
- package/resources/integrations/census.mjs.map +1 -1
- package/resources/integrations/hightouch.d.mts.map +1 -1
- package/resources/integrations/hightouch.d.ts.map +1 -1
- package/resources/integrations/hightouch.mjs.map +1 -1
- package/resources/integrations/index.d.mts.map +1 -1
- package/resources/integrations/index.d.ts.map +1 -1
- package/resources/integrations/index.mjs.map +1 -1
- package/resources/integrations/integrations.d.mts.map +1 -1
- package/resources/integrations/integrations.d.ts.map +1 -1
- package/resources/integrations/integrations.mjs.map +1 -1
- package/resources/integrations.d.mts.map +1 -1
- package/resources/integrations.d.ts.map +1 -1
- package/resources/integrations.mjs.map +1 -1
- package/resources/messages/batch.d.mts.map +1 -1
- package/resources/messages/batch.d.ts.map +1 -1
- package/resources/messages/batch.mjs.map +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +20 -1
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +20 -1
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/objects/bulk.d.mts.map +1 -1
- package/resources/objects/bulk.d.ts.map +1 -1
- package/resources/objects/bulk.mjs.map +1 -1
- package/resources/objects/index.d.mts.map +1 -1
- package/resources/objects/index.d.ts.map +1 -1
- package/resources/objects/index.mjs.map +1 -1
- package/resources/objects/objects.d.mts.map +1 -1
- package/resources/objects/objects.d.ts.map +1 -1
- package/resources/objects/objects.mjs.map +1 -1
- package/resources/objects.d.mts.map +1 -1
- package/resources/objects.d.ts.map +1 -1
- package/resources/objects.mjs.map +1 -1
- package/resources/providers/index.d.mts.map +1 -1
- package/resources/providers/index.d.ts.map +1 -1
- package/resources/providers/index.mjs.map +1 -1
- package/resources/providers/ms-teams.d.mts +4 -0
- package/resources/providers/ms-teams.d.mts.map +1 -1
- package/resources/providers/ms-teams.d.ts +4 -0
- package/resources/providers/ms-teams.d.ts.map +1 -1
- package/resources/providers/ms-teams.mjs.map +1 -1
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/providers/slack.d.mts.map +1 -1
- package/resources/providers/slack.d.ts.map +1 -1
- package/resources/providers/slack.mjs.map +1 -1
- package/resources/providers.d.mts.map +1 -1
- package/resources/providers.d.ts.map +1 -1
- package/resources/providers.mjs.map +1 -1
- package/resources/recipients/channel-data.d.mts +13 -2
- package/resources/recipients/channel-data.d.mts.map +1 -1
- package/resources/recipients/channel-data.d.ts +13 -2
- package/resources/recipients/channel-data.d.ts.map +1 -1
- package/resources/recipients/channel-data.mjs.map +1 -1
- package/resources/recipients/index.d.mts.map +1 -1
- package/resources/recipients/index.d.ts.map +1 -1
- package/resources/recipients/index.mjs.map +1 -1
- package/resources/recipients/preferences.d.mts.map +1 -1
- package/resources/recipients/preferences.d.ts.map +1 -1
- package/resources/recipients/preferences.mjs.map +1 -1
- package/resources/recipients/recipients.d.mts.map +1 -1
- package/resources/recipients/recipients.d.ts.map +1 -1
- package/resources/recipients/recipients.mjs.map +1 -1
- package/resources/recipients/subscriptions.d.mts.map +1 -1
- package/resources/recipients/subscriptions.d.ts.map +1 -1
- package/resources/recipients/subscriptions.mjs.map +1 -1
- package/resources/recipients.d.mts.map +1 -1
- package/resources/recipients.d.ts.map +1 -1
- package/resources/recipients.mjs.map +1 -1
- package/resources/schedules/bulk.d.mts.map +1 -1
- package/resources/schedules/bulk.d.ts.map +1 -1
- package/resources/schedules/bulk.mjs.map +1 -1
- package/resources/schedules/index.d.mts.map +1 -1
- package/resources/schedules/index.d.ts.map +1 -1
- package/resources/schedules/index.mjs.map +1 -1
- package/resources/schedules/schedules.d.mts.map +1 -1
- package/resources/schedules/schedules.d.ts.map +1 -1
- package/resources/schedules/schedules.mjs.map +1 -1
- package/resources/schedules.d.mts.map +1 -1
- package/resources/schedules.d.ts.map +1 -1
- package/resources/schedules.mjs.map +1 -1
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/tenants/bulk.d.mts.map +1 -1
- package/resources/tenants/bulk.d.ts.map +1 -1
- package/resources/tenants/bulk.mjs.map +1 -1
- package/resources/tenants/index.d.mts.map +1 -1
- package/resources/tenants/index.d.ts.map +1 -1
- package/resources/tenants/index.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +36 -0
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +36 -0
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/tenants.d.mts.map +1 -1
- package/resources/tenants.d.ts.map +1 -1
- package/resources/tenants.mjs.map +1 -1
- package/resources/users/bulk.d.mts +88 -3
- package/resources/users/bulk.d.mts.map +1 -1
- package/resources/users/bulk.d.ts +88 -3
- package/resources/users/bulk.d.ts.map +1 -1
- package/resources/users/bulk.js +1 -1
- package/resources/users/bulk.js.map +1 -1
- package/resources/users/bulk.mjs +1 -1
- package/resources/users/bulk.mjs.map +1 -1
- package/resources/users/feeds.d.mts.map +1 -1
- package/resources/users/feeds.d.ts.map +1 -1
- package/resources/users/feeds.mjs.map +1 -1
- package/resources/users/guides.d.mts.map +1 -1
- package/resources/users/guides.d.ts.map +1 -1
- package/resources/users/guides.mjs.map +1 -1
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/workflow-recipient-runs.d.mts.map +1 -1
- package/resources/workflow-recipient-runs.d.ts.map +1 -1
- package/resources/workflow-recipient-runs.mjs.map +1 -1
- package/resources/workflows.d.mts +33 -10
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +33 -10
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +1 -0
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +1 -0
- package/resources/workflows.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +21 -1
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/internal/utils/query.ts +5 -29
- package/src/lib/stringifyQuery.ts +41 -0
- package/src/resources/messages/messages.ts +33 -11
- package/src/resources/providers/ms-teams.ts +5 -0
- package/src/resources/recipients/channel-data.ts +14 -2
- package/src/resources/shared.ts +1 -0
- package/src/resources/tenants/tenants.ts +44 -0
- package/src/resources/users/bulk.ts +90 -3
- package/src/resources/workflows.ts +36 -10
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-recipient-runs.d.ts","sourceRoot":"","sources":["../src/resources/workflow-recipient-runs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-recipient-runs.d.ts","sourceRoot":"","sources":["../src/resources/workflow-recipient-runs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,aAAa,mCAAgC;AACzD,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,WAAW,EAAE,8BAA2B;AACtF,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;OAUG;IACH,I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MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-recipient-runs.mjs","sourceRoot":"","sources":["../src/resources/workflow-recipient-runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"workflow-recipient-runs.mjs","sourceRoot":"","sources":["../src/resources/workflow-recipient-runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,WAAW,EAAuC,+BAA2B;AAEtF,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,6BAA6B,EAAE,CAAA,WAAiC,CAAA,EAAE;YAC/F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
|
@@ -46,6 +46,7 @@ export declare class Workflows extends APIResource {
|
|
|
46
46
|
* severity: 'critical',
|
|
47
47
|
* system_status: 'fences_failing',
|
|
48
48
|
* },
|
|
49
|
+
* settings: { sandbox_mode: true, skip_delay: true },
|
|
49
50
|
* tenant: 'ingen_isla_nublar',
|
|
50
51
|
* });
|
|
51
52
|
* ```
|
|
@@ -64,11 +65,11 @@ export interface WorkflowTriggerResponse {
|
|
|
64
65
|
}
|
|
65
66
|
export interface WorkflowCancelParams {
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
68
|
+
* A key that is used to reference a specific workflow trigger request when issuing
|
|
69
|
+
* a [workflow cancellation](/send-notifications/canceling-workflows) request. Must
|
|
70
|
+
* be provided while triggering a workflow in order to enable subsequent
|
|
71
|
+
* cancellation. Should be unique across trigger requests to avoid unintentional
|
|
72
|
+
* cancellations.
|
|
72
73
|
*/
|
|
73
74
|
cancellation_key: string;
|
|
74
75
|
/**
|
|
@@ -90,11 +91,11 @@ export interface WorkflowTriggerParams {
|
|
|
90
91
|
*/
|
|
91
92
|
actor?: RecipientsAPI.RecipientRequest | null;
|
|
92
93
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
94
|
+
* A key that is used to reference a specific workflow trigger request when issuing
|
|
95
|
+
* a [workflow cancellation](/send-notifications/canceling-workflows) request. Must
|
|
96
|
+
* be provided while triggering a workflow in order to enable subsequent
|
|
97
|
+
* cancellation. Should be unique across trigger requests to avoid unintentional
|
|
98
|
+
* cancellations.
|
|
98
99
|
*/
|
|
99
100
|
cancellation_key?: string | null;
|
|
100
101
|
/**
|
|
@@ -106,11 +107,33 @@ export interface WorkflowTriggerParams {
|
|
|
106
107
|
data?: {
|
|
107
108
|
[key: string]: unknown;
|
|
108
109
|
} | null;
|
|
110
|
+
/**
|
|
111
|
+
* Optional settings that control how this workflow trigger is executed.
|
|
112
|
+
*/
|
|
113
|
+
settings?: WorkflowTriggerParams.Settings | null;
|
|
109
114
|
/**
|
|
110
115
|
* An request to set a tenant inline.
|
|
111
116
|
*/
|
|
112
117
|
tenant?: TenantsAPI.InlineTenantRequest | null;
|
|
113
118
|
}
|
|
119
|
+
export declare namespace WorkflowTriggerParams {
|
|
120
|
+
/**
|
|
121
|
+
* Optional settings that control how this workflow trigger is executed.
|
|
122
|
+
*/
|
|
123
|
+
interface Settings {
|
|
124
|
+
/**
|
|
125
|
+
* When set to true, overrides the sandbox mode for all channels in this workflow
|
|
126
|
+
* run, messages are not delivered to the underlying providers. If false or not
|
|
127
|
+
* set, the workflow delivers messages normally.
|
|
128
|
+
*/
|
|
129
|
+
sandbox_mode?: boolean | null;
|
|
130
|
+
/**
|
|
131
|
+
* When set to true, skips all delay steps in the workflow for this trigger
|
|
132
|
+
* request. If false or not set, delay steps execute normally.
|
|
133
|
+
*/
|
|
134
|
+
skip_delay?: boolean | null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
114
137
|
export declare namespace Workflows {
|
|
115
138
|
export { type WorkflowTriggerResponse as WorkflowTriggerResponse, type WorkflowCancelParams as WorkflowCancelParams, type WorkflowTriggerParams as WorkflowTriggerParams, };
|
|
116
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.mts","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflows.d.mts","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,aAAa,oCAAgC;AACzD,OAAO,KAAK,UAAU,8BAA0B;AAChD,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,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AAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
package/resources/workflows.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare class Workflows extends APIResource {
|
|
|
46
46
|
* severity: 'critical',
|
|
47
47
|
* system_status: 'fences_failing',
|
|
48
48
|
* },
|
|
49
|
+
* settings: { sandbox_mode: true, skip_delay: true },
|
|
49
50
|
* tenant: 'ingen_isla_nublar',
|
|
50
51
|
* });
|
|
51
52
|
* ```
|
|
@@ -64,11 +65,11 @@ export interface WorkflowTriggerResponse {
|
|
|
64
65
|
}
|
|
65
66
|
export interface WorkflowCancelParams {
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
68
|
+
* A key that is used to reference a specific workflow trigger request when issuing
|
|
69
|
+
* a [workflow cancellation](/send-notifications/canceling-workflows) request. Must
|
|
70
|
+
* be provided while triggering a workflow in order to enable subsequent
|
|
71
|
+
* cancellation. Should be unique across trigger requests to avoid unintentional
|
|
72
|
+
* cancellations.
|
|
72
73
|
*/
|
|
73
74
|
cancellation_key: string;
|
|
74
75
|
/**
|
|
@@ -90,11 +91,11 @@ export interface WorkflowTriggerParams {
|
|
|
90
91
|
*/
|
|
91
92
|
actor?: RecipientsAPI.RecipientRequest | null;
|
|
92
93
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
94
|
+
* A key that is used to reference a specific workflow trigger request when issuing
|
|
95
|
+
* a [workflow cancellation](/send-notifications/canceling-workflows) request. Must
|
|
96
|
+
* be provided while triggering a workflow in order to enable subsequent
|
|
97
|
+
* cancellation. Should be unique across trigger requests to avoid unintentional
|
|
98
|
+
* cancellations.
|
|
98
99
|
*/
|
|
99
100
|
cancellation_key?: string | null;
|
|
100
101
|
/**
|
|
@@ -106,11 +107,33 @@ export interface WorkflowTriggerParams {
|
|
|
106
107
|
data?: {
|
|
107
108
|
[key: string]: unknown;
|
|
108
109
|
} | null;
|
|
110
|
+
/**
|
|
111
|
+
* Optional settings that control how this workflow trigger is executed.
|
|
112
|
+
*/
|
|
113
|
+
settings?: WorkflowTriggerParams.Settings | null;
|
|
109
114
|
/**
|
|
110
115
|
* An request to set a tenant inline.
|
|
111
116
|
*/
|
|
112
117
|
tenant?: TenantsAPI.InlineTenantRequest | null;
|
|
113
118
|
}
|
|
119
|
+
export declare namespace WorkflowTriggerParams {
|
|
120
|
+
/**
|
|
121
|
+
* Optional settings that control how this workflow trigger is executed.
|
|
122
|
+
*/
|
|
123
|
+
interface Settings {
|
|
124
|
+
/**
|
|
125
|
+
* When set to true, overrides the sandbox mode for all channels in this workflow
|
|
126
|
+
* run, messages are not delivered to the underlying providers. If false or not
|
|
127
|
+
* set, the workflow delivers messages normally.
|
|
128
|
+
*/
|
|
129
|
+
sandbox_mode?: boolean | null;
|
|
130
|
+
/**
|
|
131
|
+
* When set to true, skips all delay steps in the workflow for this trigger
|
|
132
|
+
* request. If false or not set, delay steps execute normally.
|
|
133
|
+
*/
|
|
134
|
+
skip_delay?: boolean | null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
114
137
|
export declare namespace Workflows {
|
|
115
138
|
export { type WorkflowTriggerResponse as WorkflowTriggerResponse, type WorkflowCancelParams as WorkflowCancelParams, type WorkflowTriggerParams as WorkflowTriggerParams, };
|
|
116
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,aAAa,mCA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CAAC,mBAAmB,GAAG,IAAI,CAAC;CAChD;AAED,yBAAiB,qBAAqB,CAAC;IACrC;;OAEG;IACH,UAAiB,QAAQ;QACvB;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAE9B;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KAC7B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
package/resources/workflows.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAW,EAAE,IAA0B,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,GAAG,SAAS,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAW,EAAE,IAA0B,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,GAAG,SAAS,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,OAAO,CACL,GAAW,EACX,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA3DD,8BA2DC"}
|
package/resources/workflows.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.mjs","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"workflows.mjs","sourceRoot":"","sources":["../src/resources/workflows.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,GAAW,EAAE,IAA0B,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,GAAG,SAAS,EAAE;YAC1D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,OAAO,CACL,GAAW,EACX,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,iBAAiB,GAAG,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
package/resources.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
|
package/resources.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,qCAAkC"}
|
package/resources.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
|
package/src/client.ts
CHANGED
|
@@ -294,6 +294,18 @@ export class Knock {
|
|
|
294
294
|
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
295
295
|
this.#encoder = Opts.FallbackEncoder;
|
|
296
296
|
|
|
297
|
+
const customHeadersEnv = readEnv('KNOCK_CUSTOM_HEADERS');
|
|
298
|
+
if (customHeadersEnv) {
|
|
299
|
+
const parsed: Record<string, string> = {};
|
|
300
|
+
for (const line of customHeadersEnv.split('\n')) {
|
|
301
|
+
const colon = line.indexOf(':');
|
|
302
|
+
if (colon >= 0) {
|
|
303
|
+
parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
|
|
307
|
+
}
|
|
308
|
+
|
|
297
309
|
this._options = options;
|
|
298
310
|
this.idempotencyHeader = 'Idempotency-Key';
|
|
299
311
|
|
|
@@ -808,11 +820,19 @@ export class Knock {
|
|
|
808
820
|
return () => controller.abort();
|
|
809
821
|
}
|
|
810
822
|
|
|
811
|
-
private buildBody({ options
|
|
823
|
+
private buildBody({ options }: { options: FinalRequestOptions }): {
|
|
812
824
|
bodyHeaders: HeadersLike;
|
|
813
825
|
body: BodyInit | undefined;
|
|
814
826
|
} {
|
|
827
|
+
const { body, headers: rawHeaders } = options;
|
|
815
828
|
if (!body) {
|
|
829
|
+
// A resource method always passes a `body` key when its operation defines a
|
|
830
|
+
// request body, even if the caller omitted an optional body param. Keep the
|
|
831
|
+
// content-type for those, and only elide it for operations with no body at
|
|
832
|
+
// all (e.g. GET/DELETE).
|
|
833
|
+
if (body == null && 'body' in options) {
|
|
834
|
+
return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
|
|
835
|
+
}
|
|
816
836
|
return { bodyHeaders: undefined, body: undefined };
|
|
817
837
|
}
|
|
818
838
|
const headers = buildHeaders([rawHeaders]);
|
package/src/internal/types.ts
CHANGED
|
@@ -40,7 +40,6 @@ type OverloadedParameters<T> =
|
|
|
40
40
|
: T extends (...args: infer A) => unknown ? A
|
|
41
41
|
: never;
|
|
42
42
|
|
|
43
|
-
/* eslint-disable */
|
|
44
43
|
/**
|
|
45
44
|
* These imports attempt to get types from a parent package's dependencies.
|
|
46
45
|
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
@@ -63,19 +62,18 @@ type OverloadedParameters<T> =
|
|
|
63
62
|
*
|
|
64
63
|
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
65
64
|
*/
|
|
66
|
-
/** @ts-ignore For users with \@types/node */
|
|
65
|
+
/** @ts-ignore For users with \@types/node */ /* prettier-ignore */
|
|
67
66
|
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
68
|
-
/** @ts-ignore For users with undici */
|
|
67
|
+
/** @ts-ignore For users with undici */ /* prettier-ignore */
|
|
69
68
|
type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
70
|
-
/** @ts-ignore For users with \@types/bun */
|
|
69
|
+
/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */
|
|
71
70
|
type BunRequestInit = globalThis.FetchRequestInit;
|
|
72
|
-
/** @ts-ignore For users with node-fetch@2 */
|
|
71
|
+
/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */
|
|
73
72
|
type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
74
|
-
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
|
|
73
|
+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */
|
|
75
74
|
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
76
|
-
/** @ts-ignore For users who use Deno */
|
|
75
|
+
/** @ts-ignore For users who use Deno */ /* prettier-ignore */
|
|
77
76
|
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
78
|
-
/* eslint-enable */
|
|
79
77
|
|
|
80
78
|
type RequestInits =
|
|
81
79
|
| NotAny<UndiciTypesRequestInit>
|
|
@@ -107,6 +107,8 @@ export const formatRequestDetails = (details: {
|
|
|
107
107
|
name,
|
|
108
108
|
(
|
|
109
109
|
name.toLowerCase() === 'authorization' ||
|
|
110
|
+
name.toLowerCase() === 'api-key' ||
|
|
111
|
+
name.toLowerCase() === 'x-api-key' ||
|
|
110
112
|
name.toLowerCase() === 'cookie' ||
|
|
111
113
|
name.toLowerCase() === 'set-cookie'
|
|
112
114
|
) ?
|
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* 2. Arrays of objects → 'indices' format: `objects[0][id]=1&objects[0][collection]=teams`
|
|
9
|
-
*/
|
|
10
|
-
export function stringifyQuery(query: object | Record<string, unknown>): string {
|
|
11
|
-
const record = query as Record<string, unknown>;
|
|
12
|
-
const objectArrays: Record<string, unknown> = {};
|
|
13
|
-
const otherParams: Record<string, unknown> = {};
|
|
14
|
-
|
|
15
|
-
for (const key in record) {
|
|
16
|
-
const value = record[key];
|
|
17
|
-
if (Array.isArray(value) && value.length > 0 && typeof value[0] === 'object' && value[0] !== null) {
|
|
18
|
-
objectArrays[key] = value;
|
|
19
|
-
} else {
|
|
20
|
-
otherParams[key] = value;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const otherParamsString = qs.stringify(otherParams, { arrayFormat: 'brackets' });
|
|
25
|
-
const objectArraysString = qs.stringify(objectArrays, { arrayFormat: 'indices' });
|
|
26
|
-
|
|
27
|
-
if (otherParamsString && objectArraysString) {
|
|
28
|
-
return `${otherParamsString}&${objectArraysString}`;
|
|
29
|
-
}
|
|
30
|
-
return otherParamsString || objectArraysString;
|
|
31
|
-
}
|
|
3
|
+
// NOTE: The custom query-string serialization lives in `src/lib/stringifyQuery.ts`,
|
|
4
|
+
// which the Stainless generator never modifies. This file only re-exports it so the
|
|
5
|
+
// generated client (and the generated tests that import from here) pick it up. If a
|
|
6
|
+
// regeneration overwrites this file, re-add this one-line re-export. See KNO-9922.
|
|
7
|
+
export { stringifyQuery } from '../../lib/stringifyQuery';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as qs from '../internal/qs/stringify';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Stringify query parameters with smart array handling:
|
|
5
|
+
*
|
|
6
|
+
* 1. Simple arrays (primitives) → 'brackets' format: `tags[]=tag1&tags[]=tag2`
|
|
7
|
+
* 2. Arrays of objects → 'indices' format: `objects[0][id]=1&objects[0][collection]=teams`
|
|
8
|
+
*
|
|
9
|
+
* The Knock API (Phoenix) expects object-array query params in indexed form
|
|
10
|
+
* (`objects[0][id]`), which Plug decodes into a keyed list. Primitive arrays must
|
|
11
|
+
* stay in bracket form (`include[]`) — indexed primitives (`include[0]`) get
|
|
12
|
+
* misparsed as a map `{ "0": ... }` and cause 422s. `qs` only supports a single
|
|
13
|
+
* global `arrayFormat`, so we partition the params and serialize each group with
|
|
14
|
+
* the format it needs.
|
|
15
|
+
*
|
|
16
|
+
* This lives in `src/lib/`, which the Stainless generator never modifies (see
|
|
17
|
+
* CONTRIBUTING.md), so the behavior survives regeneration of the generated query
|
|
18
|
+
* util. See KNO-9922.
|
|
19
|
+
*/
|
|
20
|
+
export function stringifyQuery(query: object | Record<string, unknown>): string {
|
|
21
|
+
const record = query as Record<string, unknown>;
|
|
22
|
+
const objectArrays: Record<string, unknown> = {};
|
|
23
|
+
const otherParams: Record<string, unknown> = {};
|
|
24
|
+
|
|
25
|
+
for (const key in record) {
|
|
26
|
+
const value = record[key];
|
|
27
|
+
if (Array.isArray(value) && value.length > 0 && typeof value[0] === 'object' && value[0] !== null) {
|
|
28
|
+
objectArrays[key] = value;
|
|
29
|
+
} else {
|
|
30
|
+
otherParams[key] = value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const otherParamsString = qs.stringify(otherParams, { arrayFormat: 'brackets' });
|
|
35
|
+
const objectArraysString = qs.stringify(objectArrays, { arrayFormat: 'indices' });
|
|
36
|
+
|
|
37
|
+
if (otherParamsString && objectArraysString) {
|
|
38
|
+
return `${otherParamsString}&${objectArraysString}`;
|
|
39
|
+
}
|
|
40
|
+
return otherParamsString || objectArraysString;
|
|
41
|
+
}
|
|
@@ -423,6 +423,12 @@ export interface Message {
|
|
|
423
423
|
*/
|
|
424
424
|
read_at?: string | null;
|
|
425
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Recipient contact information captured at email send time. Null for non-email
|
|
428
|
+
* channels.
|
|
429
|
+
*/
|
|
430
|
+
recipient_snapshot?: Message.RecipientSnapshot | null;
|
|
431
|
+
|
|
426
432
|
/**
|
|
427
433
|
* Timestamp when the message was scheduled to be sent.
|
|
428
434
|
*/
|
|
@@ -529,6 +535,22 @@ export namespace Message {
|
|
|
529
535
|
*/
|
|
530
536
|
name?: string | null;
|
|
531
537
|
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Recipient contact information captured at email send time. Null for non-email
|
|
541
|
+
* channels.
|
|
542
|
+
*/
|
|
543
|
+
export interface RecipientSnapshot {
|
|
544
|
+
/**
|
|
545
|
+
* The email address the message was delivered to
|
|
546
|
+
*/
|
|
547
|
+
email?: string;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* The recipient name at send time
|
|
551
|
+
*/
|
|
552
|
+
name?: string | null;
|
|
553
|
+
}
|
|
532
554
|
}
|
|
533
555
|
|
|
534
556
|
/**
|
|
@@ -659,22 +681,22 @@ export interface MessageEvent {
|
|
|
659
681
|
* The type of event that occurred.
|
|
660
682
|
*/
|
|
661
683
|
type:
|
|
662
|
-
| 'message.
|
|
663
|
-
| 'message.
|
|
684
|
+
| 'message.read'
|
|
685
|
+
| 'message.sent'
|
|
686
|
+
| 'message.seen'
|
|
664
687
|
| 'message.created'
|
|
688
|
+
| 'message.queued'
|
|
665
689
|
| 'message.delivered'
|
|
690
|
+
| 'message.bounced'
|
|
691
|
+
| 'message.undelivered'
|
|
692
|
+
| 'message.not_sent'
|
|
666
693
|
| 'message.delivery_attempted'
|
|
667
|
-
| 'message.
|
|
694
|
+
| 'message.archived'
|
|
668
695
|
| 'message.link_clicked'
|
|
669
|
-
| 'message.
|
|
670
|
-
| 'message.
|
|
671
|
-
| 'message.read'
|
|
672
|
-
| 'message.seen'
|
|
673
|
-
| 'message.sent'
|
|
674
|
-
| 'message.unarchived'
|
|
675
|
-
| 'message.undelivered'
|
|
696
|
+
| 'message.interacted'
|
|
697
|
+
| 'message.unseen'
|
|
676
698
|
| 'message.unread'
|
|
677
|
-
| 'message.
|
|
699
|
+
| 'message.unarchived';
|
|
678
700
|
|
|
679
701
|
/**
|
|
680
702
|
* The data associated with the message event. Only present for some event types.
|
|
@@ -128,6 +128,11 @@ export namespace MsTeamCheckAuthResponse {
|
|
|
128
128
|
*/
|
|
129
129
|
ok: boolean;
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* The Microsoft Teams tenant ID for the connected tenant.
|
|
133
|
+
*/
|
|
134
|
+
ms_teams_tenant_id?: string | null;
|
|
135
|
+
|
|
131
136
|
/**
|
|
132
137
|
* The reason for the Microsoft Teams connection if it is not valid.
|
|
133
138
|
*/
|
|
@@ -414,9 +414,21 @@ export namespace SlackChannelData {
|
|
|
414
414
|
*/
|
|
415
415
|
export interface SlackIncomingWebhookConnection {
|
|
416
416
|
/**
|
|
417
|
-
*
|
|
417
|
+
* A Slack connection incoming webhook.
|
|
418
418
|
*/
|
|
419
|
-
|
|
419
|
+
incoming_webhook: SlackIncomingWebhookConnection.IncomingWebhook;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export namespace SlackIncomingWebhookConnection {
|
|
423
|
+
/**
|
|
424
|
+
* A Slack connection incoming webhook.
|
|
425
|
+
*/
|
|
426
|
+
export interface IncomingWebhook {
|
|
427
|
+
/**
|
|
428
|
+
* The URL of the incoming webhook for a Slack connection.
|
|
429
|
+
*/
|
|
430
|
+
url: string;
|
|
431
|
+
}
|
|
420
432
|
}
|
|
421
433
|
|
|
422
434
|
/**
|
package/src/resources/shared.ts
CHANGED
|
@@ -152,6 +152,28 @@ export namespace Tenant {
|
|
|
152
152
|
* The branding for the tenant.
|
|
153
153
|
*/
|
|
154
154
|
export interface Branding {
|
|
155
|
+
/**
|
|
156
|
+
* The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
|
|
157
|
+
*/
|
|
158
|
+
dark_icon_url?: string | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
|
|
162
|
+
*/
|
|
163
|
+
dark_logo_url?: string | null;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The primary color for the tenant in dark mode, provided as a hex value. Defaults
|
|
167
|
+
* to `#FFFFFF`.
|
|
168
|
+
*/
|
|
169
|
+
dark_primary_color?: string | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The primary color contrast for the tenant in dark mode, provided as a hex value.
|
|
173
|
+
* Defaults to `#000000`.
|
|
174
|
+
*/
|
|
175
|
+
dark_primary_color_contrast?: string | null;
|
|
176
|
+
|
|
155
177
|
/**
|
|
156
178
|
* The icon URL for the tenant. Must point to a valid image with an image MIME
|
|
157
179
|
* type.
|
|
@@ -233,6 +255,28 @@ export namespace TenantRequest {
|
|
|
233
255
|
* The branding for the tenant.
|
|
234
256
|
*/
|
|
235
257
|
export interface Branding {
|
|
258
|
+
/**
|
|
259
|
+
* The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
|
|
260
|
+
*/
|
|
261
|
+
dark_icon_url?: string | null;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
|
|
265
|
+
*/
|
|
266
|
+
dark_logo_url?: string | null;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The primary color for the tenant in dark mode, provided as a hex value. Defaults
|
|
270
|
+
* to `#FFFFFF`.
|
|
271
|
+
*/
|
|
272
|
+
dark_primary_color?: string | null;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The primary color contrast for the tenant in dark mode, provided as a hex value.
|
|
276
|
+
* Defaults to `#000000`.
|
|
277
|
+
*/
|
|
278
|
+
dark_primary_color_contrast?: string | null;
|
|
279
|
+
|
|
236
280
|
/**
|
|
237
281
|
* The icon URL for the tenant. Must point to a valid image with an image MIME
|
|
238
282
|
* type.
|