@knocklabs/node 1.17.1 → 1.19.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 +36 -0
- package/README.md +3 -3
- package/client.d.mts +10 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -10
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +8 -17
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +8 -17
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.js +15 -7
- package/resources/audiences.js.map +1 -1
- package/resources/audiences.mjs +15 -7
- package/resources/audiences.mjs.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/objects/index.d.mts +1 -1
- package/resources/objects/index.d.mts.map +1 -1
- package/resources/objects/index.d.ts +1 -1
- package/resources/objects/index.d.ts.map +1 -1
- package/resources/objects/index.js.map +1 -1
- package/resources/objects/index.mjs.map +1 -1
- package/resources/objects/objects.d.mts +5 -16
- package/resources/objects/objects.d.mts.map +1 -1
- package/resources/objects/objects.d.ts +5 -16
- package/resources/objects/objects.d.ts.map +1 -1
- package/resources/objects/objects.js +11 -7
- package/resources/objects/objects.js.map +1 -1
- package/resources/objects/objects.mjs +11 -7
- package/resources/objects/objects.mjs.map +1 -1
- package/resources/tenants/bulk.d.mts +3 -2
- package/resources/tenants/bulk.d.mts.map +1 -1
- package/resources/tenants/bulk.d.ts +3 -2
- package/resources/tenants/bulk.d.ts.map +1 -1
- package/resources/tenants/bulk.js +3 -2
- package/resources/tenants/bulk.js.map +1 -1
- package/resources/tenants/bulk.mjs +3 -2
- package/resources/tenants/bulk.mjs.map +1 -1
- package/resources/tenants/index.d.mts +1 -1
- package/resources/tenants/index.d.mts.map +1 -1
- package/resources/tenants/index.d.ts +1 -1
- package/resources/tenants/index.d.ts.map +1 -1
- package/resources/tenants/index.js.map +1 -1
- package/resources/tenants/index.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +3 -7
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +3 -7
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +6 -2
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +6 -2
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/users/index.d.mts +1 -1
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/users.d.mts +5 -13
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +5 -13
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +11 -4
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +11 -4
- package/resources/users/users.mjs.map +1 -1
- package/resources/workflows.d.mts +3 -7
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +3 -7
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +7 -2
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +7 -2
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +0 -16
- package/src/resources/audiences.ts +18 -26
- package/src/resources/index.ts +0 -8
- package/src/resources/objects/index.ts +0 -2
- package/src/resources/objects/objects.ts +13 -24
- package/src/resources/tenants/bulk.ts +3 -2
- package/src/resources/tenants/index.ts +0 -1
- package/src/resources/tenants/tenants.ts +7 -9
- package/src/resources/users/index.ts +0 -2
- package/src/resources/users/users.ts +13 -18
- package/src/resources/workflows.ts +8 -9
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
type ItemsCursorParams,
|
|
22
22
|
PagePromise,
|
|
23
23
|
} from '../../core/pagination';
|
|
24
|
+
import { buildHeaders } from '../../internal/headers';
|
|
24
25
|
import { RequestOptions } from '../../internal/request-options';
|
|
25
26
|
import { path } from '../../internal/utils/path';
|
|
26
27
|
|
|
@@ -58,14 +59,14 @@ export class Objects extends APIResource {
|
|
|
58
59
|
*
|
|
59
60
|
* @example
|
|
60
61
|
* ```ts
|
|
61
|
-
*
|
|
62
|
-
* 'collection',
|
|
63
|
-
* 'id',
|
|
64
|
-
* );
|
|
62
|
+
* await client.objects.delete('collection', 'id');
|
|
65
63
|
* ```
|
|
66
64
|
*/
|
|
67
|
-
delete(collection: string, id: string, options?: RequestOptions): APIPromise<
|
|
68
|
-
return this._client.delete(path`/v1/objects/${collection}/${id}`,
|
|
65
|
+
delete(collection: string, id: string, options?: RequestOptions): APIPromise<void> {
|
|
66
|
+
return this._client.delete(path`/v1/objects/${collection}/${id}`, {
|
|
67
|
+
...options,
|
|
68
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
69
|
+
});
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
/**
|
|
@@ -394,7 +395,7 @@ export class Objects extends APIResource {
|
|
|
394
395
|
*
|
|
395
396
|
* @example
|
|
396
397
|
* ```ts
|
|
397
|
-
*
|
|
398
|
+
* await client.objects.unsetChannelData(
|
|
398
399
|
* 'collection',
|
|
399
400
|
* 'object_id',
|
|
400
401
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
@@ -406,11 +407,11 @@ export class Objects extends APIResource {
|
|
|
406
407
|
objectID: string,
|
|
407
408
|
channelID: string,
|
|
408
409
|
options?: RequestOptions,
|
|
409
|
-
): APIPromise<
|
|
410
|
-
return this._client.delete(
|
|
411
|
-
|
|
412
|
-
options,
|
|
413
|
-
);
|
|
410
|
+
): APIPromise<void> {
|
|
411
|
+
return this._client.delete(path`/v1/objects/${collection}/${objectID}/channel_data/${channelID}`, {
|
|
412
|
+
...options,
|
|
413
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
414
|
+
});
|
|
414
415
|
}
|
|
415
416
|
}
|
|
416
417
|
|
|
@@ -485,11 +486,6 @@ export interface Object {
|
|
|
485
486
|
properties?: { [key: string]: unknown };
|
|
486
487
|
}
|
|
487
488
|
|
|
488
|
-
/**
|
|
489
|
-
* A `204 No Content` response.
|
|
490
|
-
*/
|
|
491
|
-
export type ObjectDeleteResponse = string;
|
|
492
|
-
|
|
493
489
|
/**
|
|
494
490
|
* A response containing a list of subscriptions.
|
|
495
491
|
*/
|
|
@@ -505,11 +501,6 @@ export type ObjectDeleteSubscriptionsResponse = Array<SubscriptionsAPI.Subscript
|
|
|
505
501
|
*/
|
|
506
502
|
export type ObjectListPreferencesResponse = Array<PreferencesAPI.PreferenceSet>;
|
|
507
503
|
|
|
508
|
-
/**
|
|
509
|
-
* A `204 No Content` response.
|
|
510
|
-
*/
|
|
511
|
-
export type ObjectUnsetChannelDataResponse = string;
|
|
512
|
-
|
|
513
504
|
export interface ObjectListParams extends EntriesCursorParams {
|
|
514
505
|
/**
|
|
515
506
|
* Includes preferences of the objects in the response.
|
|
@@ -802,11 +793,9 @@ export declare namespace Objects {
|
|
|
802
793
|
export {
|
|
803
794
|
type InlineObjectRequest as InlineObjectRequest,
|
|
804
795
|
type Object as Object,
|
|
805
|
-
type ObjectDeleteResponse as ObjectDeleteResponse,
|
|
806
796
|
type ObjectAddSubscriptionsResponse as ObjectAddSubscriptionsResponse,
|
|
807
797
|
type ObjectDeleteSubscriptionsResponse as ObjectDeleteSubscriptionsResponse,
|
|
808
798
|
type ObjectListPreferencesResponse as ObjectListPreferencesResponse,
|
|
809
|
-
type ObjectUnsetChannelDataResponse as ObjectUnsetChannelDataResponse,
|
|
810
799
|
type ObjectsEntriesCursor as ObjectsEntriesCursor,
|
|
811
800
|
type ObjectListParams as ObjectListParams,
|
|
812
801
|
type ObjectAddSubscriptionsParams as ObjectAddSubscriptionsParams,
|
|
@@ -8,7 +8,8 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
8
8
|
|
|
9
9
|
export class Bulk extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Delete
|
|
11
|
+
* Delete up to 100 tenants at a time in a single operation. This operation cannot
|
|
12
|
+
* be undone.
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
14
15
|
* ```ts
|
|
@@ -23,7 +24,7 @@ export class Bulk extends APIResource {
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
|
-
* Set or update up to
|
|
27
|
+
* Set or update up to 100 tenants in a single operation.
|
|
27
28
|
*
|
|
28
29
|
* @example
|
|
29
30
|
* ```ts
|
|
@@ -7,6 +7,7 @@ import * as BulkAPI from './bulk';
|
|
|
7
7
|
import { Bulk, BulkDeleteParams, BulkSetParams } from './bulk';
|
|
8
8
|
import { APIPromise } from '../../core/api-promise';
|
|
9
9
|
import { EntriesCursor, type EntriesCursorParams, PagePromise } from '../../core/pagination';
|
|
10
|
+
import { buildHeaders } from '../../internal/headers';
|
|
10
11
|
import { RequestOptions } from '../../internal/request-options';
|
|
11
12
|
import { path } from '../../internal/utils/path';
|
|
12
13
|
|
|
@@ -36,11 +37,14 @@ export class Tenants extends APIResource {
|
|
|
36
37
|
*
|
|
37
38
|
* @example
|
|
38
39
|
* ```ts
|
|
39
|
-
*
|
|
40
|
+
* await client.tenants.delete('id');
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
42
|
-
delete(id: string, options?: RequestOptions): APIPromise<
|
|
43
|
-
return this._client.delete(path`/v1/tenants/${id}`,
|
|
43
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
44
|
+
return this._client.delete(path`/v1/tenants/${id}`, {
|
|
45
|
+
...options,
|
|
46
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
47
|
+
});
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
/**
|
|
@@ -236,11 +240,6 @@ export namespace TenantRequest {
|
|
|
236
240
|
}
|
|
237
241
|
}
|
|
238
242
|
|
|
239
|
-
/**
|
|
240
|
-
* A `204 No Content` response.
|
|
241
|
-
*/
|
|
242
|
-
export type TenantDeleteResponse = string;
|
|
243
|
-
|
|
244
243
|
export interface TenantListParams extends EntriesCursorParams {
|
|
245
244
|
/**
|
|
246
245
|
* Filter tenants by name.
|
|
@@ -320,7 +319,6 @@ export declare namespace Tenants {
|
|
|
320
319
|
type InlineTenantRequest as InlineTenantRequest,
|
|
321
320
|
type Tenant as Tenant,
|
|
322
321
|
type TenantRequest as TenantRequest,
|
|
323
|
-
type TenantDeleteResponse as TenantDeleteResponse,
|
|
324
322
|
type TenantsEntriesCursor as TenantsEntriesCursor,
|
|
325
323
|
type TenantListParams as TenantListParams,
|
|
326
324
|
type TenantSetParams as TenantSetParams,
|
|
@@ -24,9 +24,7 @@ export {
|
|
|
24
24
|
type IdentifyUserRequest,
|
|
25
25
|
type InlineIdentifyUserRequest,
|
|
26
26
|
type User,
|
|
27
|
-
type UserDeleteResponse,
|
|
28
27
|
type UserListPreferencesResponse,
|
|
29
|
-
type UserUnsetChannelDataResponse,
|
|
30
28
|
type UserUpdateParams,
|
|
31
29
|
type UserListParams,
|
|
32
30
|
type UserGetPreferencesParams,
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
type ItemsCursorParams,
|
|
42
42
|
PagePromise,
|
|
43
43
|
} from '../../core/pagination';
|
|
44
|
+
import { buildHeaders } from '../../internal/headers';
|
|
44
45
|
import { RequestOptions } from '../../internal/request-options';
|
|
45
46
|
import { path } from '../../internal/utils/path';
|
|
46
47
|
|
|
@@ -106,11 +107,14 @@ export class Users extends APIResource {
|
|
|
106
107
|
*
|
|
107
108
|
* @example
|
|
108
109
|
* ```ts
|
|
109
|
-
*
|
|
110
|
+
* await client.users.delete('user_id');
|
|
110
111
|
* ```
|
|
111
112
|
*/
|
|
112
|
-
delete(userID: string, options?: RequestOptions): APIPromise<
|
|
113
|
-
return this._client.delete(path`/v1/users/${userID}`,
|
|
113
|
+
delete(userID: string, options?: RequestOptions): APIPromise<void> {
|
|
114
|
+
return this._client.delete(path`/v1/users/${userID}`, {
|
|
115
|
+
...options,
|
|
116
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
117
|
+
});
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
/**
|
|
@@ -335,14 +339,17 @@ export class Users extends APIResource {
|
|
|
335
339
|
*
|
|
336
340
|
* @example
|
|
337
341
|
* ```ts
|
|
338
|
-
*
|
|
342
|
+
* await client.users.unsetChannelData(
|
|
339
343
|
* 'user_id',
|
|
340
344
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
341
345
|
* );
|
|
342
346
|
* ```
|
|
343
347
|
*/
|
|
344
|
-
unsetChannelData(userID: string, channelID: string, options?: RequestOptions): APIPromise<
|
|
345
|
-
return this._client.delete(path`/v1/users/${userID}/channel_data/${channelID}`,
|
|
348
|
+
unsetChannelData(userID: string, channelID: string, options?: RequestOptions): APIPromise<void> {
|
|
349
|
+
return this._client.delete(path`/v1/users/${userID}/channel_data/${channelID}`, {
|
|
350
|
+
...options,
|
|
351
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
352
|
+
});
|
|
346
353
|
}
|
|
347
354
|
}
|
|
348
355
|
|
|
@@ -532,21 +539,11 @@ export interface User {
|
|
|
532
539
|
[k: string]: unknown;
|
|
533
540
|
}
|
|
534
541
|
|
|
535
|
-
/**
|
|
536
|
-
* A `204 No Content` response.
|
|
537
|
-
*/
|
|
538
|
-
export type UserDeleteResponse = string;
|
|
539
|
-
|
|
540
542
|
/**
|
|
541
543
|
* A list of preference sets for the user.
|
|
542
544
|
*/
|
|
543
545
|
export type UserListPreferencesResponse = Array<PreferencesAPI.PreferenceSet>;
|
|
544
546
|
|
|
545
|
-
/**
|
|
546
|
-
* A `204 No Content` response.
|
|
547
|
-
*/
|
|
548
|
-
export type UserUnsetChannelDataResponse = string;
|
|
549
|
-
|
|
550
547
|
export interface UserUpdateParams {
|
|
551
548
|
/**
|
|
552
549
|
* A URL for the avatar of the user.
|
|
@@ -831,9 +828,7 @@ export declare namespace Users {
|
|
|
831
828
|
type IdentifyUserRequest as IdentifyUserRequest,
|
|
832
829
|
type InlineIdentifyUserRequest as InlineIdentifyUserRequest,
|
|
833
830
|
type User as User,
|
|
834
|
-
type UserDeleteResponse as UserDeleteResponse,
|
|
835
831
|
type UserListPreferencesResponse as UserListPreferencesResponse,
|
|
836
|
-
type UserUnsetChannelDataResponse as UserUnsetChannelDataResponse,
|
|
837
832
|
type UsersEntriesCursor as UsersEntriesCursor,
|
|
838
833
|
type UserUpdateParams as UserUpdateParams,
|
|
839
834
|
type UserListParams as UserListParams,
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import * as RecipientsAPI from './recipients/recipients';
|
|
5
5
|
import * as TenantsAPI from './tenants/tenants';
|
|
6
6
|
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { buildHeaders } from '../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../internal/request-options';
|
|
8
9
|
import { path } from '../internal/utils/path';
|
|
9
10
|
|
|
@@ -15,14 +16,18 @@ export class Workflows extends APIResource {
|
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* ```ts
|
|
18
|
-
*
|
|
19
|
+
* await client.workflows.cancel('key', {
|
|
19
20
|
* cancellation_key: 'cancel-workflow-123',
|
|
20
21
|
* recipients: ['jhammond'],
|
|
21
22
|
* });
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
cancel(key: string, body: WorkflowCancelParams, options?: RequestOptions): APIPromise<
|
|
25
|
-
return this._client.post(path`/v1/workflows/${key}/cancel`, {
|
|
25
|
+
cancel(key: string, body: WorkflowCancelParams, options?: RequestOptions): APIPromise<void> {
|
|
26
|
+
return this._client.post(path`/v1/workflows/${key}/cancel`, {
|
|
27
|
+
body,
|
|
28
|
+
...options,
|
|
29
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
30
|
+
});
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
/**
|
|
@@ -63,11 +68,6 @@ export class Workflows extends APIResource {
|
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
|
|
66
|
-
/**
|
|
67
|
-
* A `204 No Content` response.
|
|
68
|
-
*/
|
|
69
|
-
export type WorkflowCancelResponse = string;
|
|
70
|
-
|
|
71
71
|
/**
|
|
72
72
|
* The response from triggering a workflow.
|
|
73
73
|
*/
|
|
@@ -135,7 +135,6 @@ export interface WorkflowTriggerParams {
|
|
|
135
135
|
|
|
136
136
|
export declare namespace Workflows {
|
|
137
137
|
export {
|
|
138
|
-
type WorkflowCancelResponse as WorkflowCancelResponse,
|
|
139
138
|
type WorkflowTriggerResponse as WorkflowTriggerResponse,
|
|
140
139
|
type WorkflowCancelParams as WorkflowCancelParams,
|
|
141
140
|
type WorkflowTriggerParams as WorkflowTriggerParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.19.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.19.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|