@trycourier/courier 7.25.0 → 7.25.2
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 +20 -0
- package/README.md +0 -3
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +46 -0
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +46 -0
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.js +46 -0
- package/resources/audiences.js.map +1 -1
- package/resources/audiences.mjs +46 -0
- package/resources/audiences.mjs.map +1 -1
- package/resources/automations/invoke.d.mts +5 -1
- package/resources/automations/invoke.d.mts.map +1 -1
- package/resources/automations/invoke.d.ts +5 -1
- package/resources/automations/invoke.d.ts.map +1 -1
- package/resources/automations/invoke.js +5 -1
- package/resources/automations/invoke.js.map +1 -1
- package/resources/automations/invoke.mjs +5 -1
- package/resources/automations/invoke.mjs.map +1 -1
- package/resources/brands.d.mts +4 -1
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +4 -1
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +4 -1
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +4 -1
- package/resources/brands.mjs.map +1 -1
- package/resources/bulk.d.mts +199 -0
- package/resources/bulk.d.mts.map +1 -0
- package/resources/bulk.d.ts +199 -0
- package/resources/bulk.d.ts.map +1 -0
- package/resources/bulk.js +102 -0
- package/resources/bulk.js.map +1 -0
- package/resources/bulk.mjs +98 -0
- package/resources/bulk.mjs.map +1 -0
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/lists/lists.d.mts +3 -1
- package/resources/lists/lists.d.mts.map +1 -1
- package/resources/lists/lists.d.ts +3 -1
- package/resources/lists/lists.d.ts.map +1 -1
- package/resources/lists/lists.js +3 -1
- package/resources/lists/lists.js.map +1 -1
- package/resources/lists/lists.mjs +3 -1
- package/resources/lists/lists.mjs.map +1 -1
- package/resources/lists/subscriptions.d.mts +13 -2
- package/resources/lists/subscriptions.d.mts.map +1 -1
- package/resources/lists/subscriptions.d.ts +13 -2
- package/resources/lists/subscriptions.d.ts.map +1 -1
- package/resources/lists/subscriptions.js +13 -2
- package/resources/lists/subscriptions.js.map +1 -1
- package/resources/lists/subscriptions.mjs +13 -2
- package/resources/lists/subscriptions.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +2 -2
- package/resources/notifications/checks.d.ts +2 -2
- package/resources/notifications/checks.js +2 -2
- package/resources/notifications/checks.mjs +2 -2
- package/resources/profiles/lists.d.mts +1 -1
- package/resources/profiles/lists.d.ts +1 -1
- package/resources/profiles/lists.js +1 -1
- package/resources/profiles/lists.mjs +1 -1
- package/resources/profiles/profiles.d.mts +12 -5
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +12 -5
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +12 -5
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +12 -5
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/providers/providers.d.mts +6 -2
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts +6 -2
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.js +6 -2
- package/resources/providers/providers.js.map +1 -1
- package/resources/providers/providers.mjs +6 -2
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/send.d.mts +2 -1
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts +2 -1
- package/resources/send.d.ts.map +1 -1
- package/resources/send.js +2 -1
- package/resources/send.js.map +1 -1
- package/resources/send.mjs +2 -1
- package/resources/send.mjs.map +1 -1
- package/resources/tenants/templates/templates.d.mts +7 -1
- package/resources/tenants/templates/templates.d.mts.map +1 -1
- package/resources/tenants/templates/templates.d.ts +7 -1
- package/resources/tenants/templates/templates.d.ts.map +1 -1
- package/resources/tenants/templates/templates.js +7 -1
- package/resources/tenants/templates/templates.js.map +1 -1
- package/resources/tenants/templates/templates.mjs +7 -1
- package/resources/tenants/templates/templates.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +3 -1
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +3 -1
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +3 -1
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +3 -1
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/translations.d.mts +16 -0
- package/resources/translations.d.mts.map +1 -1
- package/resources/translations.d.ts +16 -0
- package/resources/translations.d.ts.map +1 -1
- package/resources/translations.js +16 -0
- package/resources/translations.js.map +1 -1
- package/resources/translations.mjs +16 -0
- package/resources/translations.mjs.map +1 -1
- package/resources/users/tenants.d.mts +5 -1
- package/resources/users/tenants.d.mts.map +1 -1
- package/resources/users/tenants.d.ts +5 -1
- package/resources/users/tenants.d.ts.map +1 -1
- package/resources/users/tenants.js +5 -1
- package/resources/users/tenants.js.map +1 -1
- package/resources/users/tenants.mjs +5 -1
- package/resources/users/tenants.mjs.map +1 -1
- package/resources/users/tokens.d.mts +8 -1
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts +8 -1
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.js +8 -1
- package/resources/users/tokens.js.map +1 -1
- package/resources/users/tokens.mjs +8 -1
- package/resources/users/tokens.mjs.map +1 -1
- package/resources/workspace-preferences/topics.d.mts +5 -2
- package/resources/workspace-preferences/topics.d.mts.map +1 -1
- package/resources/workspace-preferences/topics.d.ts +5 -2
- package/resources/workspace-preferences/topics.d.ts.map +1 -1
- package/resources/workspace-preferences/topics.js +5 -2
- package/resources/workspace-preferences/topics.js.map +1 -1
- package/resources/workspace-preferences/topics.mjs +5 -2
- package/resources/workspace-preferences/topics.mjs.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.mts +8 -2
- package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.ts +8 -2
- package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.js +8 -2
- package/resources/workspace-preferences/workspace-preferences.js.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.mjs +8 -2
- package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -1
- package/src/client.ts +25 -0
- package/src/resources/audiences.ts +46 -0
- package/src/resources/automations/invoke.ts +5 -1
- package/src/resources/brands.ts +4 -1
- package/src/resources/bulk.ts +254 -0
- package/src/resources/index.ts +11 -0
- package/src/resources/lists/lists.ts +3 -1
- package/src/resources/lists/subscriptions.ts +13 -2
- package/src/resources/notifications/checks.ts +2 -2
- package/src/resources/profiles/lists.ts +1 -1
- package/src/resources/profiles/profiles.ts +12 -5
- package/src/resources/providers/providers.ts +6 -2
- package/src/resources/send.ts +2 -1
- package/src/resources/tenants/templates/templates.ts +7 -1
- package/src/resources/tenants/tenants.ts +3 -1
- package/src/resources/translations.ts +16 -0
- package/src/resources/users/tenants.ts +5 -1
- package/src/resources/users/tokens.ts +8 -1
- package/src/resources/workspace-preferences/topics.ts +5 -2
- package/src/resources/workspace-preferences/workspace-preferences.ts +8 -2
- 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
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as BulkAPI from "./bulk.mjs";
|
|
3
|
+
import * as Shared from "./shared.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
|
+
export declare class Bulk extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Ingest user data into a Bulk Job.
|
|
9
|
+
*
|
|
10
|
+
* **Important**: For email-based bulk jobs, each user must include `profile.email`
|
|
11
|
+
* for provider routing to work correctly. The `to.email` field is not sufficient
|
|
12
|
+
* for email provider routing.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* await client.bulk.addUsers('job_id', {
|
|
17
|
+
* users: [
|
|
18
|
+
* {
|
|
19
|
+
* recipient: 'user_abc',
|
|
20
|
+
* profile: { email: 'jdoe@example.com' },
|
|
21
|
+
* data: { name: 'Jane' },
|
|
22
|
+
* },
|
|
23
|
+
* ],
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
addUsers(jobID: string, body: BulkAddUsersParams, options?: RequestOptions): APIPromise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new bulk job for sending messages to multiple recipients.
|
|
30
|
+
*
|
|
31
|
+
* **Required**: `message.event` (event ID or notification ID)
|
|
32
|
+
*
|
|
33
|
+
* **Optional (V2 format)**: `message.template` (notification ID) or
|
|
34
|
+
* `message.content` (Elemental content) can be provided to override the
|
|
35
|
+
* notification associated with the event.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const response = await client.bulk.createJob({
|
|
40
|
+
* message: {
|
|
41
|
+
* event: 'welcome-series',
|
|
42
|
+
* brand: 'bnd_01kx4mrd0pfzw8wt7pn7p2fzag',
|
|
43
|
+
* data: { campaign: 'spring-2024' },
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
createJob(body: BulkCreateJobParams, options?: RequestOptions): APIPromise<BulkCreateJobResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns the users ingested into a bulk job with paging, each carrying the status
|
|
51
|
+
* Courier recorded for it and the id of the message it produced.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const response = await client.bulk.listUsers('job_id');
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
listUsers(jobID: string, query?: BulkListUsersParams | null | undefined, options?: RequestOptions): APIPromise<BulkListUsersResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Returns a bulk job's message definition, its status — CREATED, PROCESSING,
|
|
61
|
+
* COMPLETED, or ERROR — and running counts of users received, messages enqueued,
|
|
62
|
+
* and failures. Poll it to follow a job through to completion.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const response = await client.bulk.retrieveJob('job_id');
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
retrieveJob(jobID: string, options?: RequestOptions): APIPromise<BulkRetrieveJobResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Starts processing a bulk job, sending to every user ingested into it. Returns
|
|
72
|
+
* 204 immediately; the job runs asynchronously, so poll the job to watch its
|
|
73
|
+
* status and counts.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* await client.bulk.runJob('job_id');
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
runJob(jobID: string, options?: RequestOptions): APIPromise<void>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Bulk message definition. Supports two formats:
|
|
84
|
+
*
|
|
85
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
86
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
87
|
+
* content) in addition to `event`
|
|
88
|
+
*/
|
|
89
|
+
export interface InboundBulkMessage {
|
|
90
|
+
/**
|
|
91
|
+
* Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
|
|
92
|
+
* "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
|
|
93
|
+
* mapped to a notification.
|
|
94
|
+
*/
|
|
95
|
+
event: string;
|
|
96
|
+
brand?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Elemental content (optional, for V2 format). When provided, this will be used
|
|
99
|
+
* instead of the notification associated with the `event` field.
|
|
100
|
+
*/
|
|
101
|
+
content?: Shared.ElementalContentSugar | Shared.ElementalContent | null;
|
|
102
|
+
data?: {
|
|
103
|
+
[key: string]: unknown;
|
|
104
|
+
} | null;
|
|
105
|
+
locale?: {
|
|
106
|
+
[key: string]: {
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
} | null;
|
|
110
|
+
override?: {
|
|
111
|
+
[key: string]: unknown;
|
|
112
|
+
} | null;
|
|
113
|
+
/**
|
|
114
|
+
* Notification ID or template ID (optional, for V2 format). When provided, this
|
|
115
|
+
* will be used instead of the notification associated with the `event` field.
|
|
116
|
+
*/
|
|
117
|
+
template?: string | null;
|
|
118
|
+
}
|
|
119
|
+
export interface InboundBulkMessageUser {
|
|
120
|
+
/**
|
|
121
|
+
* User-specific data that will be merged with message.data
|
|
122
|
+
*/
|
|
123
|
+
data?: unknown;
|
|
124
|
+
preferences?: Shared.RecipientPreferences | null;
|
|
125
|
+
/**
|
|
126
|
+
* User profile information. For email-based bulk jobs, `profile.email` is required
|
|
127
|
+
* for provider routing to determine if the message can be delivered. The email
|
|
128
|
+
* address should be provided here rather than in `to.email`.
|
|
129
|
+
*/
|
|
130
|
+
profile?: {
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
} | null;
|
|
133
|
+
/**
|
|
134
|
+
* User ID (legacy field, use profile or to.user_id instead)
|
|
135
|
+
*/
|
|
136
|
+
recipient?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Optional recipient information. Note: For email provider routing, use
|
|
139
|
+
* `profile.email` instead of `to.email`. The `to` field is primarily used for
|
|
140
|
+
* recipient identification and data merging.
|
|
141
|
+
*/
|
|
142
|
+
to?: Shared.UserRecipient | null;
|
|
143
|
+
}
|
|
144
|
+
export interface BulkCreateJobResponse {
|
|
145
|
+
jobId: string;
|
|
146
|
+
}
|
|
147
|
+
export interface BulkListUsersResponse {
|
|
148
|
+
items: Array<BulkListUsersResponse.Item>;
|
|
149
|
+
paging: Shared.Paging;
|
|
150
|
+
}
|
|
151
|
+
export declare namespace BulkListUsersResponse {
|
|
152
|
+
interface Item extends BulkAPI.InboundBulkMessageUser {
|
|
153
|
+
status: 'PENDING' | 'ENQUEUED' | 'ERROR';
|
|
154
|
+
messageId?: string | null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export interface BulkRetrieveJobResponse {
|
|
158
|
+
job: BulkRetrieveJobResponse.Job;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace BulkRetrieveJobResponse {
|
|
161
|
+
interface Job {
|
|
162
|
+
/**
|
|
163
|
+
* Bulk message definition. Supports two formats:
|
|
164
|
+
*
|
|
165
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
166
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
167
|
+
* content) in addition to `event`
|
|
168
|
+
*/
|
|
169
|
+
definition: BulkAPI.InboundBulkMessage;
|
|
170
|
+
enqueued: number;
|
|
171
|
+
failures: number;
|
|
172
|
+
received: number;
|
|
173
|
+
status: 'CREATED' | 'PROCESSING' | 'COMPLETED' | 'ERROR';
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
export interface BulkAddUsersParams {
|
|
177
|
+
users: Array<InboundBulkMessageUser>;
|
|
178
|
+
}
|
|
179
|
+
export interface BulkCreateJobParams {
|
|
180
|
+
/**
|
|
181
|
+
* Bulk message definition. Supports two formats:
|
|
182
|
+
*
|
|
183
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
184
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
185
|
+
* content) in addition to `event`
|
|
186
|
+
*/
|
|
187
|
+
message: InboundBulkMessage;
|
|
188
|
+
}
|
|
189
|
+
export interface BulkListUsersParams {
|
|
190
|
+
/**
|
|
191
|
+
* A unique identifier that allows for fetching the next set of users added to the
|
|
192
|
+
* bulk job
|
|
193
|
+
*/
|
|
194
|
+
cursor?: string | null;
|
|
195
|
+
}
|
|
196
|
+
export declare namespace Bulk {
|
|
197
|
+
export { type InboundBulkMessage as InboundBulkMessage, type InboundBulkMessageUser as InboundBulkMessageUser, type BulkCreateJobResponse as BulkCreateJobResponse, type BulkListUsersResponse as BulkListUsersResponse, type BulkRetrieveJobResponse as BulkRetrieveJobResponse, type BulkAddUsersParams as BulkAddUsersParams, type BulkCreateJobParams as BulkCreateJobParams, type BulkListUsersParams as BulkListUsersParams, };
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=bulk.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk.d.mts","sourceRoot":"","sources":["../src/resources/bulk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ7F;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjG;;;;;;;;OAQG;IACH,SAAS,CACP,KAAK,EAAE,M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,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as BulkAPI from "./bulk.js";
|
|
3
|
+
import * as Shared from "./shared.js";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
6
|
+
export declare class Bulk extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Ingest user data into a Bulk Job.
|
|
9
|
+
*
|
|
10
|
+
* **Important**: For email-based bulk jobs, each user must include `profile.email`
|
|
11
|
+
* for provider routing to work correctly. The `to.email` field is not sufficient
|
|
12
|
+
* for email provider routing.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* await client.bulk.addUsers('job_id', {
|
|
17
|
+
* users: [
|
|
18
|
+
* {
|
|
19
|
+
* recipient: 'user_abc',
|
|
20
|
+
* profile: { email: 'jdoe@example.com' },
|
|
21
|
+
* data: { name: 'Jane' },
|
|
22
|
+
* },
|
|
23
|
+
* ],
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
addUsers(jobID: string, body: BulkAddUsersParams, options?: RequestOptions): APIPromise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new bulk job for sending messages to multiple recipients.
|
|
30
|
+
*
|
|
31
|
+
* **Required**: `message.event` (event ID or notification ID)
|
|
32
|
+
*
|
|
33
|
+
* **Optional (V2 format)**: `message.template` (notification ID) or
|
|
34
|
+
* `message.content` (Elemental content) can be provided to override the
|
|
35
|
+
* notification associated with the event.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const response = await client.bulk.createJob({
|
|
40
|
+
* message: {
|
|
41
|
+
* event: 'welcome-series',
|
|
42
|
+
* brand: 'bnd_01kx4mrd0pfzw8wt7pn7p2fzag',
|
|
43
|
+
* data: { campaign: 'spring-2024' },
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
createJob(body: BulkCreateJobParams, options?: RequestOptions): APIPromise<BulkCreateJobResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns the users ingested into a bulk job with paging, each carrying the status
|
|
51
|
+
* Courier recorded for it and the id of the message it produced.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const response = await client.bulk.listUsers('job_id');
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
listUsers(jobID: string, query?: BulkListUsersParams | null | undefined, options?: RequestOptions): APIPromise<BulkListUsersResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Returns a bulk job's message definition, its status — CREATED, PROCESSING,
|
|
61
|
+
* COMPLETED, or ERROR — and running counts of users received, messages enqueued,
|
|
62
|
+
* and failures. Poll it to follow a job through to completion.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const response = await client.bulk.retrieveJob('job_id');
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
retrieveJob(jobID: string, options?: RequestOptions): APIPromise<BulkRetrieveJobResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Starts processing a bulk job, sending to every user ingested into it. Returns
|
|
72
|
+
* 204 immediately; the job runs asynchronously, so poll the job to watch its
|
|
73
|
+
* status and counts.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* await client.bulk.runJob('job_id');
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
runJob(jobID: string, options?: RequestOptions): APIPromise<void>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Bulk message definition. Supports two formats:
|
|
84
|
+
*
|
|
85
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
86
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
87
|
+
* content) in addition to `event`
|
|
88
|
+
*/
|
|
89
|
+
export interface InboundBulkMessage {
|
|
90
|
+
/**
|
|
91
|
+
* Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
|
|
92
|
+
* "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
|
|
93
|
+
* mapped to a notification.
|
|
94
|
+
*/
|
|
95
|
+
event: string;
|
|
96
|
+
brand?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Elemental content (optional, for V2 format). When provided, this will be used
|
|
99
|
+
* instead of the notification associated with the `event` field.
|
|
100
|
+
*/
|
|
101
|
+
content?: Shared.ElementalContentSugar | Shared.ElementalContent | null;
|
|
102
|
+
data?: {
|
|
103
|
+
[key: string]: unknown;
|
|
104
|
+
} | null;
|
|
105
|
+
locale?: {
|
|
106
|
+
[key: string]: {
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
} | null;
|
|
110
|
+
override?: {
|
|
111
|
+
[key: string]: unknown;
|
|
112
|
+
} | null;
|
|
113
|
+
/**
|
|
114
|
+
* Notification ID or template ID (optional, for V2 format). When provided, this
|
|
115
|
+
* will be used instead of the notification associated with the `event` field.
|
|
116
|
+
*/
|
|
117
|
+
template?: string | null;
|
|
118
|
+
}
|
|
119
|
+
export interface InboundBulkMessageUser {
|
|
120
|
+
/**
|
|
121
|
+
* User-specific data that will be merged with message.data
|
|
122
|
+
*/
|
|
123
|
+
data?: unknown;
|
|
124
|
+
preferences?: Shared.RecipientPreferences | null;
|
|
125
|
+
/**
|
|
126
|
+
* User profile information. For email-based bulk jobs, `profile.email` is required
|
|
127
|
+
* for provider routing to determine if the message can be delivered. The email
|
|
128
|
+
* address should be provided here rather than in `to.email`.
|
|
129
|
+
*/
|
|
130
|
+
profile?: {
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
} | null;
|
|
133
|
+
/**
|
|
134
|
+
* User ID (legacy field, use profile or to.user_id instead)
|
|
135
|
+
*/
|
|
136
|
+
recipient?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Optional recipient information. Note: For email provider routing, use
|
|
139
|
+
* `profile.email` instead of `to.email`. The `to` field is primarily used for
|
|
140
|
+
* recipient identification and data merging.
|
|
141
|
+
*/
|
|
142
|
+
to?: Shared.UserRecipient | null;
|
|
143
|
+
}
|
|
144
|
+
export interface BulkCreateJobResponse {
|
|
145
|
+
jobId: string;
|
|
146
|
+
}
|
|
147
|
+
export interface BulkListUsersResponse {
|
|
148
|
+
items: Array<BulkListUsersResponse.Item>;
|
|
149
|
+
paging: Shared.Paging;
|
|
150
|
+
}
|
|
151
|
+
export declare namespace BulkListUsersResponse {
|
|
152
|
+
interface Item extends BulkAPI.InboundBulkMessageUser {
|
|
153
|
+
status: 'PENDING' | 'ENQUEUED' | 'ERROR';
|
|
154
|
+
messageId?: string | null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export interface BulkRetrieveJobResponse {
|
|
158
|
+
job: BulkRetrieveJobResponse.Job;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace BulkRetrieveJobResponse {
|
|
161
|
+
interface Job {
|
|
162
|
+
/**
|
|
163
|
+
* Bulk message definition. Supports two formats:
|
|
164
|
+
*
|
|
165
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
166
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
167
|
+
* content) in addition to `event`
|
|
168
|
+
*/
|
|
169
|
+
definition: BulkAPI.InboundBulkMessage;
|
|
170
|
+
enqueued: number;
|
|
171
|
+
failures: number;
|
|
172
|
+
received: number;
|
|
173
|
+
status: 'CREATED' | 'PROCESSING' | 'COMPLETED' | 'ERROR';
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
export interface BulkAddUsersParams {
|
|
177
|
+
users: Array<InboundBulkMessageUser>;
|
|
178
|
+
}
|
|
179
|
+
export interface BulkCreateJobParams {
|
|
180
|
+
/**
|
|
181
|
+
* Bulk message definition. Supports two formats:
|
|
182
|
+
*
|
|
183
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
184
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
185
|
+
* content) in addition to `event`
|
|
186
|
+
*/
|
|
187
|
+
message: InboundBulkMessage;
|
|
188
|
+
}
|
|
189
|
+
export interface BulkListUsersParams {
|
|
190
|
+
/**
|
|
191
|
+
* A unique identifier that allows for fetching the next set of users added to the
|
|
192
|
+
* bulk job
|
|
193
|
+
*/
|
|
194
|
+
cursor?: string | null;
|
|
195
|
+
}
|
|
196
|
+
export declare namespace Bulk {
|
|
197
|
+
export { type InboundBulkMessage as InboundBulkMessage, type InboundBulkMessageUser as InboundBulkMessageUser, type BulkCreateJobResponse as BulkCreateJobResponse, type BulkListUsersResponse as BulkListUsersResponse, type BulkRetrieveJobResponse as BulkRetrieveJobResponse, type BulkAddUsersParams as BulkAddUsersParams, type BulkCreateJobParams as BulkCreateJobParams, type BulkListUsersParams as BulkListUsersParams, };
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=bulk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk.d.ts","sourceRoot":"","sources":["../src/resources/bulk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,OAAO,kBAAe;AAClC,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,E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AEjB,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;KAC1D;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Bulk = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class Bulk extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Ingest user data into a Bulk Job.
|
|
11
|
+
*
|
|
12
|
+
* **Important**: For email-based bulk jobs, each user must include `profile.email`
|
|
13
|
+
* for provider routing to work correctly. The `to.email` field is not sufficient
|
|
14
|
+
* for email provider routing.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* await client.bulk.addUsers('job_id', {
|
|
19
|
+
* users: [
|
|
20
|
+
* {
|
|
21
|
+
* recipient: 'user_abc',
|
|
22
|
+
* profile: { email: 'jdoe@example.com' },
|
|
23
|
+
* data: { name: 'Jane' },
|
|
24
|
+
* },
|
|
25
|
+
* ],
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
addUsers(jobID, body, options) {
|
|
30
|
+
return this._client.post((0, path_1.path) `/bulk/${jobID}`, {
|
|
31
|
+
body,
|
|
32
|
+
...options,
|
|
33
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new bulk job for sending messages to multiple recipients.
|
|
38
|
+
*
|
|
39
|
+
* **Required**: `message.event` (event ID or notification ID)
|
|
40
|
+
*
|
|
41
|
+
* **Optional (V2 format)**: `message.template` (notification ID) or
|
|
42
|
+
* `message.content` (Elemental content) can be provided to override the
|
|
43
|
+
* notification associated with the event.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response = await client.bulk.createJob({
|
|
48
|
+
* message: {
|
|
49
|
+
* event: 'welcome-series',
|
|
50
|
+
* brand: 'bnd_01kx4mrd0pfzw8wt7pn7p2fzag',
|
|
51
|
+
* data: { campaign: 'spring-2024' },
|
|
52
|
+
* },
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
createJob(body, options) {
|
|
57
|
+
return this._client.post('/bulk', { body, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the users ingested into a bulk job with paging, each carrying the status
|
|
61
|
+
* Courier recorded for it and the id of the message it produced.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const response = await client.bulk.listUsers('job_id');
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
listUsers(jobID, query = {}, options) {
|
|
69
|
+
return this._client.get((0, path_1.path) `/bulk/${jobID}/users`, { query, ...options });
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns a bulk job's message definition, its status — CREATED, PROCESSING,
|
|
73
|
+
* COMPLETED, or ERROR — and running counts of users received, messages enqueued,
|
|
74
|
+
* and failures. Poll it to follow a job through to completion.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const response = await client.bulk.retrieveJob('job_id');
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
retrieveJob(jobID, options) {
|
|
82
|
+
return this._client.get((0, path_1.path) `/bulk/${jobID}`, options);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Starts processing a bulk job, sending to every user ingested into it. Returns
|
|
86
|
+
* 204 immediately; the job runs asynchronously, so poll the job to watch its
|
|
87
|
+
* status and counts.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* await client.bulk.runJob('job_id');
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
runJob(jobID, options) {
|
|
95
|
+
return this._client.post((0, path_1.path) `/bulk/${jobID}/run`, {
|
|
96
|
+
...options,
|
|
97
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.Bulk = Bulk;
|
|
102
|
+
//# sourceMappingURL=bulk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk.js","sourceRoot":"","sources":["../src/resources/bulk.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,KAAa,EAA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
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class Bulk extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Ingest user data into a Bulk Job.
|
|
8
|
+
*
|
|
9
|
+
* **Important**: For email-based bulk jobs, each user must include `profile.email`
|
|
10
|
+
* for provider routing to work correctly. The `to.email` field is not sufficient
|
|
11
|
+
* for email provider routing.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* await client.bulk.addUsers('job_id', {
|
|
16
|
+
* users: [
|
|
17
|
+
* {
|
|
18
|
+
* recipient: 'user_abc',
|
|
19
|
+
* profile: { email: 'jdoe@example.com' },
|
|
20
|
+
* data: { name: 'Jane' },
|
|
21
|
+
* },
|
|
22
|
+
* ],
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
addUsers(jobID, body, options) {
|
|
27
|
+
return this._client.post(path `/bulk/${jobID}`, {
|
|
28
|
+
body,
|
|
29
|
+
...options,
|
|
30
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new bulk job for sending messages to multiple recipients.
|
|
35
|
+
*
|
|
36
|
+
* **Required**: `message.event` (event ID or notification ID)
|
|
37
|
+
*
|
|
38
|
+
* **Optional (V2 format)**: `message.template` (notification ID) or
|
|
39
|
+
* `message.content` (Elemental content) can be provided to override the
|
|
40
|
+
* notification associated with the event.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const response = await client.bulk.createJob({
|
|
45
|
+
* message: {
|
|
46
|
+
* event: 'welcome-series',
|
|
47
|
+
* brand: 'bnd_01kx4mrd0pfzw8wt7pn7p2fzag',
|
|
48
|
+
* data: { campaign: 'spring-2024' },
|
|
49
|
+
* },
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
createJob(body, options) {
|
|
54
|
+
return this._client.post('/bulk', { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns the users ingested into a bulk job with paging, each carrying the status
|
|
58
|
+
* Courier recorded for it and the id of the message it produced.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const response = await client.bulk.listUsers('job_id');
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
listUsers(jobID, query = {}, options) {
|
|
66
|
+
return this._client.get(path `/bulk/${jobID}/users`, { query, ...options });
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns a bulk job's message definition, its status — CREATED, PROCESSING,
|
|
70
|
+
* COMPLETED, or ERROR — and running counts of users received, messages enqueued,
|
|
71
|
+
* and failures. Poll it to follow a job through to completion.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const response = await client.bulk.retrieveJob('job_id');
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
retrieveJob(jobID, options) {
|
|
79
|
+
return this._client.get(path `/bulk/${jobID}`, options);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Starts processing a bulk job, sending to every user ingested into it. Returns
|
|
83
|
+
* 204 immediately; the job runs asynchronously, so poll the job to watch its
|
|
84
|
+
* status and counts.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* await client.bulk.runJob('job_id');
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
runJob(jobID, options) {
|
|
92
|
+
return this._client.post(path `/bulk/${jobID}/run`, {
|
|
93
|
+
...options,
|
|
94
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers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EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAa,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,SAAS,KAAK,MAAM,EAAE;YACjD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ export { Auth, type AuthIssueTokenResponse, type AuthIssueTokenParams } from "./
|
|
|
5
5
|
export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations/automations.mjs";
|
|
6
6
|
export { Brands, type Brand, type BrandColors, type BrandSettings, type BrandSettingsEmail, type BrandSettingsInApp, type BrandSnippet, type BrandSnippets, type BrandTemplate, type EmailFooter, type EmailHead, type EmailHeader, type Icons, type Logo, type WidgetBackground, type BrandListResponse, type BrandCreateParams, type BrandUpdateParams, type BrandListParams, } from "./brands.mjs";
|
|
7
7
|
export { Broadcasts, type Broadcast, type BroadcastListResponse, type BroadcastSchedule, type CreateBroadcastRequest, type ScheduleBroadcastRequest, type SendBroadcastRequest, type UpdateBroadcastRequest, type BroadcastCreateParams, type BroadcastUpdateParams, type BroadcastListParams, type BroadcastPutContentParams, type BroadcastRetrieveContentParams, type BroadcastScheduleParams, type BroadcastSendParams, } from "./broadcasts.mjs";
|
|
8
|
+
export { Bulk, type InboundBulkMessage, type InboundBulkMessageUser, type BulkCreateJobResponse, type BulkListUsersResponse, type BulkRetrieveJobResponse, type BulkAddUsersParams, type BulkCreateJobParams, type BulkListUsersParams, } from "./bulk.mjs";
|
|
8
9
|
export { Digests, type DigestCategory, type DigestInstance, type DigestInstanceListResponse, } from "./digests/digests.mjs";
|
|
9
10
|
export { Inbound, type InboundTrackEventResponse, type InboundTrackEventParams } from "./inbound.mjs";
|
|
10
11
|
export { Journeys, type CancelJourneyRequest, type CancelJourneyResponse, type CreateJourneyRequest, type Journey, type JourneyAINode, type JourneyAPIInvokeTriggerNode, type JourneyConditionAtom, type JourneyConditionGroup, type JourneyConditionNestedGroup, type JourneyConditionsField, type JourneyDelayDurationNode, type JourneyDelayUntilNode, type JourneyExitNode, type JourneyExperiment, type JourneyExperimentVariant, type JourneyFetchGetDeleteNode, type JourneyFetchPostPutNode, type JourneyMergeStrategy, type JourneyNode, type JourneyPublishRequest, type JourneyResponse, type JourneySegmentTriggerNode, type JourneySendNode, type JourneyState, type JourneyTemplateCreateRequest, type JourneyTemplateGetResponse, type JourneyTemplateListResponse, type JourneyTemplatePublishRequest, type JourneyTemplateReplaceRequest, type JourneyTemplateSummary, type JourneyThrottleDynamicNode, type JourneyThrottleStaticNode, type JourneyVersionItem, type JourneyVersionsListResponse, type JourneysInvokeRequest, type JourneysInvokeResponse, type JourneysListResponse, type JourneyCreateParams, type JourneyRetrieveParams, type JourneyListParams, type JourneyCancelParams, type JourneyInvokeParams, type JourneyPublishParams, type JourneyReplaceParams, } from "./journeys/journeys.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,6BAAyB;AACzB,OAAO,EACL,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,GAC/B,wBAAoB;AACrB,OAAO,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B,2BAAuB;AACxB,OAAO,EAAE,IAAI,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,mBAAe;AACtF,OAAO,EACL,WAA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K,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,sCAAsC,EAC3C,KAAK,4BAA4B,GAClC,iCAA6B;AAC9B,OAAO,EAAE,IAAI,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,mBAAe;AAChF,OAAO,EACL,OAAO,EACP,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,8BAA0B;AAC3B,OAAO,EACL,YAAY,EACZ,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,GAC7B,2BAAuB;AACxB,OAAO,EAAE,KAAK,EAAE,0BAAsB;AACtC,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,qCAAqC,EAC1C,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EACzC,KAAK,sCAAsC,EAC3C,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,GACtC,0DAAsD"}
|
package/resources/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { Auth, type AuthIssueTokenResponse, type AuthIssueTokenParams } from "./
|
|
|
5
5
|
export { Automations, type AutomationInvokeResponse, type AutomationTemplate, type AutomationTemplateListResponse, type AutomationListParams, } from "./automations/automations.js";
|
|
6
6
|
export { Brands, type Brand, type BrandColors, type BrandSettings, type BrandSettingsEmail, type BrandSettingsInApp, type BrandSnippet, type BrandSnippets, type BrandTemplate, type EmailFooter, type EmailHead, type EmailHeader, type Icons, type Logo, type WidgetBackground, type BrandListResponse, type BrandCreateParams, type BrandUpdateParams, type BrandListParams, } from "./brands.js";
|
|
7
7
|
export { Broadcasts, type Broadcast, type BroadcastListResponse, type BroadcastSchedule, type CreateBroadcastRequest, type ScheduleBroadcastRequest, type SendBroadcastRequest, type UpdateBroadcastRequest, type BroadcastCreateParams, type BroadcastUpdateParams, type BroadcastListParams, type BroadcastPutContentParams, type BroadcastRetrieveContentParams, type BroadcastScheduleParams, type BroadcastSendParams, } from "./broadcasts.js";
|
|
8
|
+
export { Bulk, type InboundBulkMessage, type InboundBulkMessageUser, type BulkCreateJobResponse, type BulkListUsersResponse, type BulkRetrieveJobResponse, type BulkAddUsersParams, type BulkCreateJobParams, type BulkListUsersParams, } from "./bulk.js";
|
|
8
9
|
export { Digests, type DigestCategory, type DigestInstance, type DigestInstanceListResponse, } from "./digests/digests.js";
|
|
9
10
|
export { Inbound, type InboundTrackEventResponse, type InboundTrackEventParams } from "./inbound.js";
|
|
10
11
|
export { Journeys, type CancelJourneyRequest, type CancelJourneyResponse, type CreateJourneyRequest, type Journey, type JourneyAINode, type JourneyAPIInvokeTriggerNode, type JourneyConditionAtom, type JourneyConditionGroup, type JourneyConditionNestedGroup, type JourneyConditionsField, type JourneyDelayDurationNode, type JourneyDelayUntilNode, type JourneyExitNode, type JourneyExperiment, type JourneyExperimentVariant, type JourneyFetchGetDeleteNode, type JourneyFetchPostPutNode, type JourneyMergeStrategy, type JourneyNode, type JourneyPublishRequest, type JourneyResponse, type JourneySegmentTriggerNode, type JourneySendNode, type JourneyState, type JourneyTemplateCreateRequest, type JourneyTemplateGetResponse, type JourneyTemplateListResponse, type JourneyTemplatePublishRequest, type JourneyTemplateReplaceRequest, type JourneyTemplateSummary, type JourneyThrottleDynamicNode, type JourneyThrottleStaticNode, type JourneyVersionItem, type JourneyVersionsListResponse, type JourneysInvokeRequest, type JourneysInvokeResponse, type JourneysListResponse, type JourneyCreateParams, type JourneyRetrieveParams, type JourneyListParams, type JourneyCancelParams, type JourneyInvokeParams, type JourneyPublishParams, type JourneyReplaceParams, } from "./journeys/journeys.js";
|