@trycourier/courier 7.11.0 → 7.19.1
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 +114 -0
- package/README.md +1 -0
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +15 -1
- package/client.js.map +1 -1
- package/client.mjs +15 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +5 -2
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +5 -2
- package/resources/audiences.d.ts.map +1 -1
- package/resources/brands.d.mts +35 -2
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +35 -2
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +34 -1
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +34 -1
- package/resources/brands.mjs.map +1 -1
- package/resources/digests/digests.d.mts +94 -0
- package/resources/digests/digests.d.mts.map +1 -0
- package/resources/digests/digests.d.ts +94 -0
- package/resources/digests/digests.d.ts.map +1 -0
- package/resources/digests/digests.js +17 -0
- package/resources/digests/digests.js.map +1 -0
- package/resources/digests/digests.mjs +12 -0
- package/resources/digests/digests.mjs.map +1 -0
- package/resources/digests/index.d.mts +3 -0
- package/resources/digests/index.d.mts.map +1 -0
- package/resources/digests/index.d.ts +3 -0
- package/resources/digests/index.d.ts.map +1 -0
- package/resources/digests/index.js +9 -0
- package/resources/digests/index.js.map +1 -0
- package/resources/digests/index.mjs +4 -0
- package/resources/digests/index.mjs.map +1 -0
- package/resources/digests/schedules.d.mts +32 -0
- package/resources/digests/schedules.d.mts.map +1 -0
- package/resources/digests/schedules.d.ts +32 -0
- package/resources/digests/schedules.d.ts.map +1 -0
- package/resources/digests/schedules.js +29 -0
- package/resources/digests/schedules.js.map +1 -0
- package/resources/digests/schedules.mjs +25 -0
- package/resources/digests/schedules.mjs.map +1 -0
- package/resources/digests.d.mts +2 -0
- package/resources/digests.d.mts.map +1 -0
- package/resources/digests.d.ts +2 -0
- package/resources/digests.d.ts.map +1 -0
- package/resources/digests.js +6 -0
- package/resources/digests.js.map +1 -0
- package/resources/digests.mjs +3 -0
- package/resources/digests.mjs.map +1 -0
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/journeys/index.d.mts +2 -2
- package/resources/journeys/index.d.mts.map +1 -1
- package/resources/journeys/index.d.ts +2 -2
- package/resources/journeys/index.d.ts.map +1 -1
- package/resources/journeys/index.js.map +1 -1
- package/resources/journeys/index.mjs.map +1 -1
- package/resources/journeys/journeys.d.mts +198 -7
- package/resources/journeys/journeys.d.mts.map +1 -1
- package/resources/journeys/journeys.d.ts +198 -7
- package/resources/journeys/journeys.d.ts.map +1 -1
- package/resources/journeys/journeys.js +18 -0
- package/resources/journeys/journeys.js.map +1 -1
- package/resources/journeys/journeys.mjs +18 -0
- package/resources/journeys/journeys.mjs.map +1 -1
- package/resources/journeys/templates.d.mts +120 -1
- package/resources/journeys/templates.d.mts.map +1 -1
- package/resources/journeys/templates.d.ts +120 -1
- package/resources/journeys/templates.d.ts.map +1 -1
- package/resources/journeys/templates.js +71 -0
- package/resources/journeys/templates.js.map +1 -1
- package/resources/journeys/templates.mjs +71 -0
- package/resources/journeys/templates.mjs.map +1 -1
- package/resources/messages.d.mts +16 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +16 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +10 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +10 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +3 -3
- package/resources/notifications/checks.d.ts +3 -3
- package/resources/notifications/checks.js +3 -3
- package/resources/notifications/checks.mjs +3 -3
- package/resources/shared.d.mts +6 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +6 -0
- package/resources/shared.d.ts.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/preferences.d.mts +211 -1
- package/resources/users/preferences.d.mts.map +1 -1
- package/resources/users/preferences.d.ts +211 -1
- package/resources/users/preferences.d.ts.map +1 -1
- package/resources/users/preferences.js +105 -0
- package/resources/users/preferences.js.map +1 -1
- package/resources/users/preferences.mjs +105 -0
- package/resources/users/preferences.mjs.map +1 -1
- package/resources/users/users.d.mts +2 -2
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +2 -2
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/workspace-preferences/index.d.mts +3 -0
- package/resources/workspace-preferences/index.d.mts.map +1 -0
- package/resources/workspace-preferences/index.d.ts +3 -0
- package/resources/workspace-preferences/index.d.ts.map +1 -0
- package/resources/workspace-preferences/index.js +9 -0
- package/resources/workspace-preferences/index.js.map +1 -0
- package/resources/workspace-preferences/index.mjs +4 -0
- package/resources/workspace-preferences/index.mjs.map +1 -0
- package/resources/workspace-preferences/topics.d.mts +168 -0
- package/resources/workspace-preferences/topics.d.mts.map +1 -0
- package/resources/workspace-preferences/topics.d.ts +168 -0
- package/resources/workspace-preferences/topics.d.ts.map +1 -0
- package/resources/workspace-preferences/topics.js +103 -0
- package/resources/workspace-preferences/topics.js.map +1 -0
- package/resources/workspace-preferences/topics.mjs +99 -0
- package/resources/workspace-preferences/topics.mjs.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.d.mts +410 -0
- package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.d.ts +410 -0
- package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.js +104 -0
- package/resources/workspace-preferences/workspace-preferences.js.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.mjs +99 -0
- package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -0
- package/resources/workspace-preferences.d.mts +2 -0
- package/resources/workspace-preferences.d.mts.map +1 -0
- package/resources/workspace-preferences.d.ts +2 -0
- package/resources/workspace-preferences.d.ts.map +1 -0
- package/resources/workspace-preferences.js +6 -0
- package/resources/workspace-preferences.js.map +1 -0
- package/resources/workspace-preferences.mjs +3 -0
- package/resources/workspace-preferences.mjs.map +1 -0
- package/src/client.ts +71 -1
- package/src/resources/audiences.ts +5 -2
- package/src/resources/brands.ts +36 -3
- package/src/resources/digests/digests.ts +120 -0
- package/src/resources/digests/index.ts +9 -0
- package/src/resources/digests/schedules.ts +51 -0
- package/src/resources/digests.ts +3 -0
- package/src/resources/index.ts +28 -0
- package/src/resources/journeys/index.ts +8 -0
- package/src/resources/journeys/journeys.ts +246 -4
- package/src/resources/journeys/templates.ts +168 -0
- package/src/resources/messages.ts +20 -0
- package/src/resources/notifications/checks.ts +3 -3
- package/src/resources/shared.ts +7 -0
- package/src/resources/users/index.ts +6 -0
- package/src/resources/users/preferences.ts +269 -0
- package/src/resources/users/users.ts +12 -0
- package/src/resources/workspace-preferences/index.ts +25 -0
- package/src/resources/workspace-preferences/topics.ts +229 -0
- package/src/resources/workspace-preferences/workspace-preferences.ts +534 -0
- package/src/resources/workspace-preferences.ts +3 -0
- 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
|
@@ -14,6 +14,97 @@ export declare class Preferences extends APIResource {
|
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
16
|
retrieve(userID: string, query?: PreferenceRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<PreferenceRetrieveResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Replace a user's complete set of preference overrides in a single request. The
|
|
19
|
+
* topics in the request body become the recipient's entire set of overrides:
|
|
20
|
+
* listed topics are created or updated, and every existing override that is not
|
|
21
|
+
* included in the body is reset to its topic default. Submitting an empty `topics`
|
|
22
|
+
* array is a valid clear-all that resets every existing override.
|
|
23
|
+
*
|
|
24
|
+
* This operation is validation-atomic (all-or-nothing): structural validation
|
|
25
|
+
* fails fast with a single `400`, and if any topic is semantically invalid (an
|
|
26
|
+
* unknown topic, a `REQUIRED` topic that cannot be opted out, or a custom routing
|
|
27
|
+
* request that is not available on the workspace's plan) the request returns a
|
|
28
|
+
* single `400` aggregating every failure in `errors` and writes nothing. On
|
|
29
|
+
* success it returns `200` with `items` (the complete resulting override set) and
|
|
30
|
+
* `deleted` (the ids of the overrides that were reset to default).
|
|
31
|
+
*
|
|
32
|
+
* Every `topic_id` in the response — in `items`, `deleted`, and any `errors` — is
|
|
33
|
+
* returned in Courier's canonical topic id form, regardless of the form supplied
|
|
34
|
+
* in the request.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const response = await client.users.preferences.bulkReplace(
|
|
39
|
+
* 'user_id',
|
|
40
|
+
* {
|
|
41
|
+
* topics: [
|
|
42
|
+
* {
|
|
43
|
+
* topic_id: '74Q4QGFBEX481DP6JRPMV751H4XT',
|
|
44
|
+
* status: 'OPTED_IN',
|
|
45
|
+
* has_custom_routing: true,
|
|
46
|
+
* custom_routing: ['inbox', 'email'],
|
|
47
|
+
* },
|
|
48
|
+
* ],
|
|
49
|
+
* },
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
bulkReplace(userID: string, params: PreferenceBulkReplaceParams, options?: RequestOptions): APIPromise<PreferenceBulkReplaceResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Additively create or update a user's preferences for one or more subscription
|
|
56
|
+
* topics in a single request. Only the topics included in the request body are
|
|
57
|
+
* created or updated; any existing overrides for topics not listed are left
|
|
58
|
+
* untouched.
|
|
59
|
+
*
|
|
60
|
+
* Structural validation of the request body fails fast with a single `400`. Beyond
|
|
61
|
+
* that, each topic is processed independently (partial-success, not
|
|
62
|
+
* all-or-nothing): valid topics are written and returned in `items`, while topics
|
|
63
|
+
* that cannot be applied are collected in `errors` with a per-topic `reason` (for
|
|
64
|
+
* example an unknown topic, a `REQUIRED` topic that cannot be opted out, a custom
|
|
65
|
+
* routing request that is not available on the workspace's plan, or a write
|
|
66
|
+
* failure). The request therefore returns `200` with both lists whenever the body
|
|
67
|
+
* is structurally valid.
|
|
68
|
+
*
|
|
69
|
+
* Every `topic_id` in the response — in both `items` and `errors` — is returned in
|
|
70
|
+
* Courier's canonical topic id form, regardless of the form supplied in the
|
|
71
|
+
* request.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const response = await client.users.preferences.bulkUpdate(
|
|
76
|
+
* 'user_id',
|
|
77
|
+
* {
|
|
78
|
+
* topics: [
|
|
79
|
+
* {
|
|
80
|
+
* topic_id: '74Q4QGFBEX481DP6JRPMV751H4XT',
|
|
81
|
+
* status: 'OPTED_IN',
|
|
82
|
+
* has_custom_routing: true,
|
|
83
|
+
* custom_routing: ['inbox', 'email'],
|
|
84
|
+
* },
|
|
85
|
+
* {
|
|
86
|
+
* topic_id: '5Q4QGFBEX481DP6JRPMV751H4YU',
|
|
87
|
+
* status: 'OPTED_OUT',
|
|
88
|
+
* },
|
|
89
|
+
* ],
|
|
90
|
+
* },
|
|
91
|
+
* );
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
bulkUpdate(userID: string, params: PreferenceBulkUpdateParams, options?: RequestOptions): APIPromise<PreferenceBulkUpdateResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* Remove a user's preferences for a specific subscription topic, resetting the
|
|
97
|
+
* topic to its effective default. This operation is idempotent: deleting a
|
|
98
|
+
* preference that does not exist succeeds with no error.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* await client.users.preferences.deleteTopic('topic_id', {
|
|
103
|
+
* user_id: 'user_id',
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
deleteTopic(topicID: string, params: PreferenceDeleteTopicParams, options?: RequestOptions): APIPromise<void>;
|
|
17
108
|
/**
|
|
18
109
|
* Fetch user preferences for a specific subscription topic.
|
|
19
110
|
*
|
|
@@ -47,6 +138,19 @@ export declare class Preferences extends APIResource {
|
|
|
47
138
|
*/
|
|
48
139
|
updateOrCreateTopic(topicID: string, params: PreferenceUpdateOrCreateTopicParams, options?: RequestOptions): APIPromise<PreferenceUpdateOrCreateTopicResponse>;
|
|
49
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* A single topic override echoed in a bulk preference response.
|
|
143
|
+
*/
|
|
144
|
+
export interface BulkPreferenceTopic {
|
|
145
|
+
custom_routing: Array<Shared.ChannelClassification>;
|
|
146
|
+
has_custom_routing: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* The applied subscription status. Echoes the requested value, so it is always
|
|
149
|
+
* OPTED_IN or OPTED_OUT.
|
|
150
|
+
*/
|
|
151
|
+
status: 'OPTED_IN' | 'OPTED_OUT';
|
|
152
|
+
topic_id: string;
|
|
153
|
+
}
|
|
50
154
|
export interface TopicPreference {
|
|
51
155
|
default_status: Shared.PreferenceStatus;
|
|
52
156
|
status: Shared.PreferenceStatus;
|
|
@@ -68,6 +172,38 @@ export interface PreferenceRetrieveResponse {
|
|
|
68
172
|
*/
|
|
69
173
|
paging: Shared.Paging;
|
|
70
174
|
}
|
|
175
|
+
export interface PreferenceBulkReplaceResponse {
|
|
176
|
+
/**
|
|
177
|
+
* The ids of the overrides that were reset to their topic default.
|
|
178
|
+
*/
|
|
179
|
+
deleted: Array<string>;
|
|
180
|
+
/**
|
|
181
|
+
* The complete resulting set of topic overrides for the user.
|
|
182
|
+
*/
|
|
183
|
+
items: Array<BulkPreferenceTopic>;
|
|
184
|
+
}
|
|
185
|
+
export interface PreferenceBulkUpdateResponse {
|
|
186
|
+
/**
|
|
187
|
+
* The topics that could not be applied, each with a reason.
|
|
188
|
+
*/
|
|
189
|
+
errors: Array<PreferenceBulkUpdateResponse.Error>;
|
|
190
|
+
/**
|
|
191
|
+
* The topics that were successfully created or updated.
|
|
192
|
+
*/
|
|
193
|
+
items: Array<BulkPreferenceTopic>;
|
|
194
|
+
}
|
|
195
|
+
export declare namespace PreferenceBulkUpdateResponse {
|
|
196
|
+
/**
|
|
197
|
+
* A single topic that could not be applied in a bulk preference request.
|
|
198
|
+
*/
|
|
199
|
+
interface Error {
|
|
200
|
+
/**
|
|
201
|
+
* A human-readable explanation of why the topic could not be applied.
|
|
202
|
+
*/
|
|
203
|
+
reason: string;
|
|
204
|
+
topic_id: string;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
71
207
|
export interface PreferenceRetrieveTopicResponse {
|
|
72
208
|
topic: TopicPreference;
|
|
73
209
|
}
|
|
@@ -80,6 +216,80 @@ export interface PreferenceRetrieveParams {
|
|
|
80
216
|
*/
|
|
81
217
|
tenant_id?: string | null;
|
|
82
218
|
}
|
|
219
|
+
export interface PreferenceBulkReplaceParams {
|
|
220
|
+
/**
|
|
221
|
+
* Body param: The complete set of topic overrides for the user. Up to 50 topics
|
|
222
|
+
* may be provided. Any existing override not listed here is reset to its topic
|
|
223
|
+
* default; an empty array resets every existing override.
|
|
224
|
+
*/
|
|
225
|
+
topics: Array<PreferenceBulkReplaceParams.Topic>;
|
|
226
|
+
/**
|
|
227
|
+
* Query param: Replace the preferences of a user for this specific tenant context.
|
|
228
|
+
*/
|
|
229
|
+
tenant_id?: string | null;
|
|
230
|
+
}
|
|
231
|
+
export declare namespace PreferenceBulkReplaceParams {
|
|
232
|
+
interface Topic {
|
|
233
|
+
/**
|
|
234
|
+
* The subscription status to apply for this topic.
|
|
235
|
+
*/
|
|
236
|
+
status: 'OPTED_IN' | 'OPTED_OUT';
|
|
237
|
+
/**
|
|
238
|
+
* A unique identifier associated with a subscription topic.
|
|
239
|
+
*/
|
|
240
|
+
topic_id: string;
|
|
241
|
+
/**
|
|
242
|
+
* The channels a user has chosen to receive notifications through for this topic.
|
|
243
|
+
*/
|
|
244
|
+
custom_routing?: Array<Shared.ChannelClassification>;
|
|
245
|
+
/**
|
|
246
|
+
* Whether the recipient has chosen specific delivery channels for this topic.
|
|
247
|
+
*/
|
|
248
|
+
has_custom_routing?: boolean;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
export interface PreferenceBulkUpdateParams {
|
|
252
|
+
/**
|
|
253
|
+
* Body param: The topics to create or update. Between 1 and 50 topics may be
|
|
254
|
+
* provided in a single request.
|
|
255
|
+
*/
|
|
256
|
+
topics: Array<PreferenceBulkUpdateParams.Topic>;
|
|
257
|
+
/**
|
|
258
|
+
* Query param: Update the preferences of a user for this specific tenant context.
|
|
259
|
+
*/
|
|
260
|
+
tenant_id?: string | null;
|
|
261
|
+
}
|
|
262
|
+
export declare namespace PreferenceBulkUpdateParams {
|
|
263
|
+
interface Topic {
|
|
264
|
+
/**
|
|
265
|
+
* The subscription status to apply for this topic.
|
|
266
|
+
*/
|
|
267
|
+
status: 'OPTED_IN' | 'OPTED_OUT';
|
|
268
|
+
/**
|
|
269
|
+
* A unique identifier associated with a subscription topic.
|
|
270
|
+
*/
|
|
271
|
+
topic_id: string;
|
|
272
|
+
/**
|
|
273
|
+
* The channels a user has chosen to receive notifications through for this topic.
|
|
274
|
+
*/
|
|
275
|
+
custom_routing?: Array<Shared.ChannelClassification>;
|
|
276
|
+
/**
|
|
277
|
+
* Whether the recipient has chosen specific delivery channels for this topic.
|
|
278
|
+
*/
|
|
279
|
+
has_custom_routing?: boolean;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
export interface PreferenceDeleteTopicParams {
|
|
283
|
+
/**
|
|
284
|
+
* Path param: A unique identifier associated with the user whose preferences you
|
|
285
|
+
* wish to delete.
|
|
286
|
+
*/
|
|
287
|
+
user_id: string;
|
|
288
|
+
/**
|
|
289
|
+
* Query param: Delete the preferences of a user for this specific tenant context.
|
|
290
|
+
*/
|
|
291
|
+
tenant_id?: string | null;
|
|
292
|
+
}
|
|
83
293
|
export interface PreferenceRetrieveTopicParams {
|
|
84
294
|
/**
|
|
85
295
|
* Path param: A unique identifier associated with the user whose preferences you
|
|
@@ -117,6 +327,6 @@ export declare namespace PreferenceUpdateOrCreateTopicParams {
|
|
|
117
327
|
}
|
|
118
328
|
}
|
|
119
329
|
export declare namespace Preferences {
|
|
120
|
-
export { type TopicPreference as TopicPreference, type PreferenceRetrieveResponse as PreferenceRetrieveResponse, type PreferenceRetrieveTopicResponse as PreferenceRetrieveTopicResponse, type PreferenceUpdateOrCreateTopicResponse as PreferenceUpdateOrCreateTopicResponse, type PreferenceRetrieveParams as PreferenceRetrieveParams, type PreferenceRetrieveTopicParams as PreferenceRetrieveTopicParams, type PreferenceUpdateOrCreateTopicParams as PreferenceUpdateOrCreateTopicParams, };
|
|
330
|
+
export { type BulkPreferenceTopic as BulkPreferenceTopic, type TopicPreference as TopicPreference, type PreferenceRetrieveResponse as PreferenceRetrieveResponse, type PreferenceBulkReplaceResponse as PreferenceBulkReplaceResponse, type PreferenceBulkUpdateResponse as PreferenceBulkUpdateResponse, type PreferenceRetrieveTopicResponse as PreferenceRetrieveTopicResponse, type PreferenceUpdateOrCreateTopicResponse as PreferenceUpdateOrCreateTopicResponse, type PreferenceRetrieveParams as PreferenceRetrieveParams, type PreferenceBulkReplaceParams as PreferenceBulkReplaceParams, type PreferenceBulkUpdateParams as PreferenceBulkUpdateParams, type PreferenceDeleteTopicParams as PreferenceDeleteTopicParams, type PreferenceRetrieveTopicParams as PreferenceRetrieveTopicParams, type PreferenceUpdateOrCreateTopicParams as PreferenceUpdateOrCreateTopicParams, };
|
|
121
331
|
}
|
|
122
332
|
//# sourceMappingURL=preferences.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;OASG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;IAIzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,UAAU,CACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAK3C;;;;;;;;;;;OAWG;IACH,WAAW,CACT,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IASnB;;;;;;;;;;OAUG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,6BA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,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;CACH"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Preferences = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../internal/headers.js");
|
|
6
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
7
8
|
class Preferences extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
@@ -18,6 +19,110 @@ class Preferences extends resource_1.APIResource {
|
|
|
18
19
|
retrieve(userID, query = {}, options) {
|
|
19
20
|
return this._client.get((0, path_1.path) `/users/${userID}/preferences`, { query, ...options });
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Replace a user's complete set of preference overrides in a single request. The
|
|
24
|
+
* topics in the request body become the recipient's entire set of overrides:
|
|
25
|
+
* listed topics are created or updated, and every existing override that is not
|
|
26
|
+
* included in the body is reset to its topic default. Submitting an empty `topics`
|
|
27
|
+
* array is a valid clear-all that resets every existing override.
|
|
28
|
+
*
|
|
29
|
+
* This operation is validation-atomic (all-or-nothing): structural validation
|
|
30
|
+
* fails fast with a single `400`, and if any topic is semantically invalid (an
|
|
31
|
+
* unknown topic, a `REQUIRED` topic that cannot be opted out, or a custom routing
|
|
32
|
+
* request that is not available on the workspace's plan) the request returns a
|
|
33
|
+
* single `400` aggregating every failure in `errors` and writes nothing. On
|
|
34
|
+
* success it returns `200` with `items` (the complete resulting override set) and
|
|
35
|
+
* `deleted` (the ids of the overrides that were reset to default).
|
|
36
|
+
*
|
|
37
|
+
* Every `topic_id` in the response — in `items`, `deleted`, and any `errors` — is
|
|
38
|
+
* returned in Courier's canonical topic id form, regardless of the form supplied
|
|
39
|
+
* in the request.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const response = await client.users.preferences.bulkReplace(
|
|
44
|
+
* 'user_id',
|
|
45
|
+
* {
|
|
46
|
+
* topics: [
|
|
47
|
+
* {
|
|
48
|
+
* topic_id: '74Q4QGFBEX481DP6JRPMV751H4XT',
|
|
49
|
+
* status: 'OPTED_IN',
|
|
50
|
+
* has_custom_routing: true,
|
|
51
|
+
* custom_routing: ['inbox', 'email'],
|
|
52
|
+
* },
|
|
53
|
+
* ],
|
|
54
|
+
* },
|
|
55
|
+
* );
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
bulkReplace(userID, params, options) {
|
|
59
|
+
const { tenant_id, ...body } = params;
|
|
60
|
+
return this._client.put((0, path_1.path) `/users/${userID}/preferences`, { query: { tenant_id }, body, ...options });
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Additively create or update a user's preferences for one or more subscription
|
|
64
|
+
* topics in a single request. Only the topics included in the request body are
|
|
65
|
+
* created or updated; any existing overrides for topics not listed are left
|
|
66
|
+
* untouched.
|
|
67
|
+
*
|
|
68
|
+
* Structural validation of the request body fails fast with a single `400`. Beyond
|
|
69
|
+
* that, each topic is processed independently (partial-success, not
|
|
70
|
+
* all-or-nothing): valid topics are written and returned in `items`, while topics
|
|
71
|
+
* that cannot be applied are collected in `errors` with a per-topic `reason` (for
|
|
72
|
+
* example an unknown topic, a `REQUIRED` topic that cannot be opted out, a custom
|
|
73
|
+
* routing request that is not available on the workspace's plan, or a write
|
|
74
|
+
* failure). The request therefore returns `200` with both lists whenever the body
|
|
75
|
+
* is structurally valid.
|
|
76
|
+
*
|
|
77
|
+
* Every `topic_id` in the response — in both `items` and `errors` — is returned in
|
|
78
|
+
* Courier's canonical topic id form, regardless of the form supplied in the
|
|
79
|
+
* request.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* const response = await client.users.preferences.bulkUpdate(
|
|
84
|
+
* 'user_id',
|
|
85
|
+
* {
|
|
86
|
+
* topics: [
|
|
87
|
+
* {
|
|
88
|
+
* topic_id: '74Q4QGFBEX481DP6JRPMV751H4XT',
|
|
89
|
+
* status: 'OPTED_IN',
|
|
90
|
+
* has_custom_routing: true,
|
|
91
|
+
* custom_routing: ['inbox', 'email'],
|
|
92
|
+
* },
|
|
93
|
+
* {
|
|
94
|
+
* topic_id: '5Q4QGFBEX481DP6JRPMV751H4YU',
|
|
95
|
+
* status: 'OPTED_OUT',
|
|
96
|
+
* },
|
|
97
|
+
* ],
|
|
98
|
+
* },
|
|
99
|
+
* );
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
bulkUpdate(userID, params, options) {
|
|
103
|
+
const { tenant_id, ...body } = params;
|
|
104
|
+
return this._client.post((0, path_1.path) `/users/${userID}/preferences`, { query: { tenant_id }, body, ...options });
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Remove a user's preferences for a specific subscription topic, resetting the
|
|
108
|
+
* topic to its effective default. This operation is idempotent: deleting a
|
|
109
|
+
* preference that does not exist succeeds with no error.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* await client.users.preferences.deleteTopic('topic_id', {
|
|
114
|
+
* user_id: 'user_id',
|
|
115
|
+
* });
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
deleteTopic(topicID, params, options) {
|
|
119
|
+
const { user_id, tenant_id } = params;
|
|
120
|
+
return this._client.delete((0, path_1.path) `/users/${user_id}/preferences/${topicID}`, {
|
|
121
|
+
query: { tenant_id },
|
|
122
|
+
...options,
|
|
123
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
21
126
|
/**
|
|
22
127
|
* Fetch user preferences for a specific subscription topic.
|
|
23
128
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;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,SAAS,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,gBAAgB,OAAO,EAAE,EAAE;YACzE,KAAK,EAAE,EAAE,SAAS,EAAE;YACpB,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;;;;;;;;;;OAUG;IACH,aAAa,CACX,OAAe,EACf,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,gBAAgB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAAmB,CACjB,OAAe,EACf,MAA2C,EAC3C,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,gBAAgB,OAAO,EAAE,EAAE;YACtE,KAAK,EAAE,EAAE,SAAS,EAAE;YACpB,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA7LD,kCA6LC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
3
4
|
import { path } from "../../internal/utils/path.mjs";
|
|
4
5
|
export class Preferences extends APIResource {
|
|
5
6
|
/**
|
|
@@ -15,6 +16,110 @@ export class Preferences extends APIResource {
|
|
|
15
16
|
retrieve(userID, query = {}, options) {
|
|
16
17
|
return this._client.get(path `/users/${userID}/preferences`, { query, ...options });
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Replace a user's complete set of preference overrides in a single request. The
|
|
21
|
+
* topics in the request body become the recipient's entire set of overrides:
|
|
22
|
+
* listed topics are created or updated, and every existing override that is not
|
|
23
|
+
* included in the body is reset to its topic default. Submitting an empty `topics`
|
|
24
|
+
* array is a valid clear-all that resets every existing override.
|
|
25
|
+
*
|
|
26
|
+
* This operation is validation-atomic (all-or-nothing): structural validation
|
|
27
|
+
* fails fast with a single `400`, and if any topic is semantically invalid (an
|
|
28
|
+
* unknown topic, a `REQUIRED` topic that cannot be opted out, or a custom routing
|
|
29
|
+
* request that is not available on the workspace's plan) the request returns a
|
|
30
|
+
* single `400` aggregating every failure in `errors` and writes nothing. On
|
|
31
|
+
* success it returns `200` with `items` (the complete resulting override set) and
|
|
32
|
+
* `deleted` (the ids of the overrides that were reset to default).
|
|
33
|
+
*
|
|
34
|
+
* Every `topic_id` in the response — in `items`, `deleted`, and any `errors` — is
|
|
35
|
+
* returned in Courier's canonical topic id form, regardless of the form supplied
|
|
36
|
+
* in the request.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const response = await client.users.preferences.bulkReplace(
|
|
41
|
+
* 'user_id',
|
|
42
|
+
* {
|
|
43
|
+
* topics: [
|
|
44
|
+
* {
|
|
45
|
+
* topic_id: '74Q4QGFBEX481DP6JRPMV751H4XT',
|
|
46
|
+
* status: 'OPTED_IN',
|
|
47
|
+
* has_custom_routing: true,
|
|
48
|
+
* custom_routing: ['inbox', 'email'],
|
|
49
|
+
* },
|
|
50
|
+
* ],
|
|
51
|
+
* },
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
bulkReplace(userID, params, options) {
|
|
56
|
+
const { tenant_id, ...body } = params;
|
|
57
|
+
return this._client.put(path `/users/${userID}/preferences`, { query: { tenant_id }, body, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Additively create or update a user's preferences for one or more subscription
|
|
61
|
+
* topics in a single request. Only the topics included in the request body are
|
|
62
|
+
* created or updated; any existing overrides for topics not listed are left
|
|
63
|
+
* untouched.
|
|
64
|
+
*
|
|
65
|
+
* Structural validation of the request body fails fast with a single `400`. Beyond
|
|
66
|
+
* that, each topic is processed independently (partial-success, not
|
|
67
|
+
* all-or-nothing): valid topics are written and returned in `items`, while topics
|
|
68
|
+
* that cannot be applied are collected in `errors` with a per-topic `reason` (for
|
|
69
|
+
* example an unknown topic, a `REQUIRED` topic that cannot be opted out, a custom
|
|
70
|
+
* routing request that is not available on the workspace's plan, or a write
|
|
71
|
+
* failure). The request therefore returns `200` with both lists whenever the body
|
|
72
|
+
* is structurally valid.
|
|
73
|
+
*
|
|
74
|
+
* Every `topic_id` in the response — in both `items` and `errors` — is returned in
|
|
75
|
+
* Courier's canonical topic id form, regardless of the form supplied in the
|
|
76
|
+
* request.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const response = await client.users.preferences.bulkUpdate(
|
|
81
|
+
* 'user_id',
|
|
82
|
+
* {
|
|
83
|
+
* topics: [
|
|
84
|
+
* {
|
|
85
|
+
* topic_id: '74Q4QGFBEX481DP6JRPMV751H4XT',
|
|
86
|
+
* status: 'OPTED_IN',
|
|
87
|
+
* has_custom_routing: true,
|
|
88
|
+
* custom_routing: ['inbox', 'email'],
|
|
89
|
+
* },
|
|
90
|
+
* {
|
|
91
|
+
* topic_id: '5Q4QGFBEX481DP6JRPMV751H4YU',
|
|
92
|
+
* status: 'OPTED_OUT',
|
|
93
|
+
* },
|
|
94
|
+
* ],
|
|
95
|
+
* },
|
|
96
|
+
* );
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
bulkUpdate(userID, params, options) {
|
|
100
|
+
const { tenant_id, ...body } = params;
|
|
101
|
+
return this._client.post(path `/users/${userID}/preferences`, { query: { tenant_id }, body, ...options });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Remove a user's preferences for a specific subscription topic, resetting the
|
|
105
|
+
* topic to its effective default. This operation is idempotent: deleting a
|
|
106
|
+
* preference that does not exist succeeds with no error.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* await client.users.preferences.deleteTopic('topic_id', {
|
|
111
|
+
* user_id: 'user_id',
|
|
112
|
+
* });
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
deleteTopic(topicID, params, options) {
|
|
116
|
+
const { user_id, tenant_id } = params;
|
|
117
|
+
return this._client.delete(path `/users/${user_id}/preferences/${topicID}`, {
|
|
118
|
+
query: { tenant_id },
|
|
119
|
+
...options,
|
|
120
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
18
123
|
/**
|
|
19
124
|
* Fetch user preferences for a specific subscription topic.
|
|
20
125
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.mjs","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;
|
|
1
|
+
{"version":3,"file":"preferences.mjs","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;OASG;IACH,QAAQ,CACN,MAAc,EACd,QAAqD,EAAE,EACvD,OAAwB;QAExB,O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C,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,aAAa,CACX,OAAe,EACf,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,gBAAgB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAAmB,CACjB,OAAe,EACf,MAA2C,EAC3C,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,gBAAgB,OAAO,EAAE,EAAE;YACtE,KAAK,EAAE,EAAE,SAAS,EAAE;YACpB,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as PreferencesAPI from "./preferences.mjs";
|
|
3
|
-
import { PreferenceRetrieveParams, PreferenceRetrieveResponse, PreferenceRetrieveTopicParams, PreferenceRetrieveTopicResponse, PreferenceUpdateOrCreateTopicParams, PreferenceUpdateOrCreateTopicResponse, Preferences, TopicPreference } from "./preferences.mjs";
|
|
3
|
+
import { BulkPreferenceTopic, PreferenceBulkReplaceParams, PreferenceBulkReplaceResponse, PreferenceBulkUpdateParams, PreferenceBulkUpdateResponse, PreferenceDeleteTopicParams, PreferenceRetrieveParams, PreferenceRetrieveResponse, PreferenceRetrieveTopicParams, PreferenceRetrieveTopicResponse, PreferenceUpdateOrCreateTopicParams, PreferenceUpdateOrCreateTopicResponse, Preferences, TopicPreference } from "./preferences.mjs";
|
|
4
4
|
import * as TenantsAPI from "./tenants.mjs";
|
|
5
5
|
import { TenantAddMultipleParams, TenantAddSingleParams, TenantListParams, TenantListResponse, TenantRemoveSingleParams, Tenants } from "./tenants.mjs";
|
|
6
6
|
import * as TokensAPI from "./tokens.mjs";
|
|
@@ -11,7 +11,7 @@ export declare class Users extends APIResource {
|
|
|
11
11
|
tokens: TokensAPI.Tokens;
|
|
12
12
|
}
|
|
13
13
|
export declare namespace Users {
|
|
14
|
-
export { Preferences as Preferences, type TopicPreference as TopicPreference, type PreferenceRetrieveResponse as PreferenceRetrieveResponse, type PreferenceRetrieveTopicResponse as PreferenceRetrieveTopicResponse, type PreferenceUpdateOrCreateTopicResponse as PreferenceUpdateOrCreateTopicResponse, type PreferenceRetrieveParams as PreferenceRetrieveParams, type PreferenceRetrieveTopicParams as PreferenceRetrieveTopicParams, type PreferenceUpdateOrCreateTopicParams as PreferenceUpdateOrCreateTopicParams, };
|
|
14
|
+
export { Preferences as Preferences, type BulkPreferenceTopic as BulkPreferenceTopic, type TopicPreference as TopicPreference, type PreferenceRetrieveResponse as PreferenceRetrieveResponse, type PreferenceBulkReplaceResponse as PreferenceBulkReplaceResponse, type PreferenceBulkUpdateResponse as PreferenceBulkUpdateResponse, type PreferenceRetrieveTopicResponse as PreferenceRetrieveTopicResponse, type PreferenceUpdateOrCreateTopicResponse as PreferenceUpdateOrCreateTopicResponse, type PreferenceRetrieveParams as PreferenceRetrieveParams, type PreferenceBulkReplaceParams as PreferenceBulkReplaceParams, type PreferenceBulkUpdateParams as PreferenceBulkUpdateParams, type PreferenceDeleteTopicParams as PreferenceDeleteTopicParams, type PreferenceRetrieveTopicParams as PreferenceRetrieveTopicParams, type PreferenceUpdateOrCreateTopicParams as PreferenceUpdateOrCreateTopicParams, };
|
|
15
15
|
export { Tenants as Tenants, type TenantListResponse as TenantListResponse, type TenantListParams as TenantListParams, type TenantAddMultipleParams as TenantAddMultipleParams, type TenantAddSingleParams as TenantAddSingleParams, type TenantRemoveSingleParams as TenantRemoveSingleParams, };
|
|
16
16
|
export { Tokens as Tokens, type UserToken as UserToken, type TokenRetrieveResponse as TokenRetrieveResponse, type TokenListResponse as TokenListResponse, type TokenRetrieveParams as TokenRetrieveParams, type TokenUpdateParams as TokenUpdateParams, type TokenDeleteParams as TokenDeleteParams, type TokenAddSingleParams as TokenAddSingleParams, };
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.mts","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,qCAAqC,EACrC,WAAW,EACX,eAAe,EAChB,0BAAsB;AACvB,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,OAAO,EACR,sBAAkB;AACnB,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,EACN,SAAS,EACV,qBAAiB;AAElB,qBAAa,KAAM,SAAQ,WAAW;IACpC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IACnE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;CAC/D;AAMD,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF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BAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as PreferencesAPI from "./preferences.js";
|
|
3
|
-
import { PreferenceRetrieveParams, PreferenceRetrieveResponse, PreferenceRetrieveTopicParams, PreferenceRetrieveTopicResponse, PreferenceUpdateOrCreateTopicParams, PreferenceUpdateOrCreateTopicResponse, Preferences, TopicPreference } from "./preferences.js";
|
|
3
|
+
import { BulkPreferenceTopic, PreferenceBulkReplaceParams, PreferenceBulkReplaceResponse, PreferenceBulkUpdateParams, PreferenceBulkUpdateResponse, PreferenceDeleteTopicParams, PreferenceRetrieveParams, PreferenceRetrieveResponse, PreferenceRetrieveTopicParams, PreferenceRetrieveTopicResponse, PreferenceUpdateOrCreateTopicParams, PreferenceUpdateOrCreateTopicResponse, Preferences, TopicPreference } from "./preferences.js";
|
|
4
4
|
import * as TenantsAPI from "./tenants.js";
|
|
5
5
|
import { TenantAddMultipleParams, TenantAddSingleParams, TenantListParams, TenantListResponse, TenantRemoveSingleParams, Tenants } from "./tenants.js";
|
|
6
6
|
import * as TokensAPI from "./tokens.js";
|
|
@@ -11,7 +11,7 @@ export declare class Users extends APIResource {
|
|
|
11
11
|
tokens: TokensAPI.Tokens;
|
|
12
12
|
}
|
|
13
13
|
export declare namespace Users {
|
|
14
|
-
export { Preferences as Preferences, type TopicPreference as TopicPreference, type PreferenceRetrieveResponse as PreferenceRetrieveResponse, type PreferenceRetrieveTopicResponse as PreferenceRetrieveTopicResponse, type PreferenceUpdateOrCreateTopicResponse as PreferenceUpdateOrCreateTopicResponse, type PreferenceRetrieveParams as PreferenceRetrieveParams, type PreferenceRetrieveTopicParams as PreferenceRetrieveTopicParams, type PreferenceUpdateOrCreateTopicParams as PreferenceUpdateOrCreateTopicParams, };
|
|
14
|
+
export { Preferences as Preferences, type BulkPreferenceTopic as BulkPreferenceTopic, type TopicPreference as TopicPreference, type PreferenceRetrieveResponse as PreferenceRetrieveResponse, type PreferenceBulkReplaceResponse as PreferenceBulkReplaceResponse, type PreferenceBulkUpdateResponse as PreferenceBulkUpdateResponse, type PreferenceRetrieveTopicResponse as PreferenceRetrieveTopicResponse, type PreferenceUpdateOrCreateTopicResponse as PreferenceUpdateOrCreateTopicResponse, type PreferenceRetrieveParams as PreferenceRetrieveParams, type PreferenceBulkReplaceParams as PreferenceBulkReplaceParams, type PreferenceBulkUpdateParams as PreferenceBulkUpdateParams, type PreferenceDeleteTopicParams as PreferenceDeleteTopicParams, type PreferenceRetrieveTopicParams as PreferenceRetrieveTopicParams, type PreferenceUpdateOrCreateTopicParams as PreferenceUpdateOrCreateTopicParams, };
|
|
15
15
|
export { Tenants as Tenants, type TenantListResponse as TenantListResponse, type TenantListParams as TenantListParams, type TenantAddMultipleParams as TenantAddMultipleParams, type TenantAddSingleParams as TenantAddSingleParams, type TenantRemoveSingleParams as TenantRemoveSingleParams, };
|
|
16
16
|
export { Tokens as Tokens, type UserToken as UserToken, type TokenRetrieveResponse as TokenRetrieveResponse, type TokenListResponse as TokenListResponse, type TokenRetrieveParams as TokenRetrieveParams, type TokenUpdateParams as TokenUpdateParams, type TokenDeleteParams as TokenDeleteParams, type TokenAddSingleParams as TokenAddSingleParams, };
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,cAAc,yBAAsB;AAChD,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,qCAAqC,EACrC,WAAW,EACX,eAAe,EAChB,yBAAsB;AACvB,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EACL,uBAAuB,E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BAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,cAAc,yBAAsB;AAChD,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,qCAAqC,EACrC,WAAW,EACX,eAAe,EAChB,yBAAsB;AACvB,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,OAAO,EACR,qBAAkB;AACnB,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,EACN,SAAS,EACV,oBAAiB;AAElB,qBAAa,KAAM,SAAQ,WAAW;IACpC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IACnE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;CAC/D;AAMD,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,yEAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,yEAAgD;AAChD,kDAeuB;AACvB,iEAAwC;AACxC,0CAOmB;AACnB,+DAAsC;AACtC,wCASkB;AAElB,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CAAA;AAJD,sBAIC;AAED,KAAK,CAAC,WAAW,GAAG,yBAAW,CAAC;AAChC,KAAK,CAAC,OAAO,GAAG,iBAAO,CAAC;AACxB,KAAK,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/users/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EAaL,WAAW,GAEZ,0BAAsB;AACvB,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAML,OAAO,GACR,sBAAkB;AACnB,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAOL,MAAM,GAEP,qBAAiB;AAElB,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CAAA;AAED,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;AAChC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AACxB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Topics, type TopicCreateParams, type TopicRetrieveParams, type TopicArchiveParams, type TopicReplaceParams, } from "./topics.mjs";
|
|
2
|
+
export { WorkspacePreferences, type PublishPreferencesRequest, type PublishPreferencesResponse, type WorkspacePreferenceCreateRequest, type WorkspacePreferenceGetResponse, type WorkspacePreferenceListResponse, type WorkspacePreferenceReplaceRequest, type WorkspacePreferenceTopicCreateRequest, type WorkspacePreferenceTopicGetResponse, type WorkspacePreferenceTopicListResponse, type WorkspacePreferenceTopicReplaceRequest, type WorkspacePreferenceCreateParams, type WorkspacePreferencePublishParams, type WorkspacePreferenceReplaceParams, } from "./workspace-preferences.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,qBAAiB;AAClB,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,oCAAgC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Topics, type TopicCreateParams, type TopicRetrieveParams, type TopicArchiveParams, type TopicReplaceParams, } from "./topics.js";
|
|
2
|
+
export { WorkspacePreferences, type PublishPreferencesRequest, type PublishPreferencesResponse, type WorkspacePreferenceCreateRequest, type WorkspacePreferenceGetResponse, type WorkspacePreferenceListResponse, type WorkspacePreferenceReplaceRequest, type WorkspacePreferenceTopicCreateRequest, type WorkspacePreferenceTopicGetResponse, type WorkspacePreferenceTopicListResponse, type WorkspacePreferenceTopicReplaceRequest, type WorkspacePreferenceCreateParams, type WorkspacePreferencePublishParams, type WorkspacePreferenceReplaceParams, } from "./workspace-preferences.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,oBAAiB;AAClB,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,mCAAgC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.WorkspacePreferences = exports.Topics = void 0;
|
|
5
|
+
var topics_1 = require("./topics.js");
|
|
6
|
+
Object.defineProperty(exports, "Topics", { enumerable: true, get: function () { return topics_1.Topics; } });
|
|
7
|
+
var workspace_preferences_1 = require("./workspace-preferences.js");
|
|
8
|
+
Object.defineProperty(exports, "WorkspacePreferences", { enumerable: true, get: function () { return workspace_preferences_1.WorkspacePreferences; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/workspace-preferences/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,oEAeiC;AAd/B,6HAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/workspace-preferences/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,MAAM,GAKP,qBAAiB;AAClB,OAAO,EACL,oBAAoB,GAcrB,oCAAgC"}
|