@sentdm/sentdm 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/client.d.mts +53 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -22
- package/client.d.ts.map +1 -1
- package/client.js +39 -8
- package/client.js.map +1 -1
- package/client.mjs +39 -8
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +606 -89
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +606 -89
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +21 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +21 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +335 -69
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +335 -69
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +15 -10
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +15 -10
- package/resources/conversations.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +132 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +132 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +3 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +3 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +212 -31
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +212 -31
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +11 -5
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +11 -5
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +45 -4
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +45 -4
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js +3 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs +3 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +579 -209
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +579 -209
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +33 -64
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +33 -64
- package/resources/profiles/campaigns.mjs.map +1 -1
- package/resources/profiles/index.d.mts +2 -2
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts +2 -2
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.js.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +2006 -499
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -499
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +97 -68
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +97 -68
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +497 -84
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +497 -84
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +6 -4
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +6 -4
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +449 -46
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +449 -46
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +11 -7
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +11 -7
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +934 -109
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +934 -109
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -8
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -8
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +90 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +26 -26
- package/src/resources/me.ts +151 -52
- package/src/resources/messages.ts +236 -31
- package/src/resources/numbers.ts +50 -4
- package/src/resources/profiles/campaigns.ts +706 -232
- package/src/resources/profiles/index.ts +6 -14
- package/src/resources/profiles/profiles.ts +2421 -637
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +519 -47
- package/src/resources/webhooks.ts +1170 -179
- 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
package/src/resources/users.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as UsersAPI from './users';
|
|
5
|
-
import * as WebhooksAPI from './webhooks';
|
|
6
4
|
import { APIPromise } from '../core/api-promise';
|
|
7
5
|
import { buildHeaders } from '../internal/headers';
|
|
8
6
|
import { RequestOptions } from '../internal/request-options';
|
|
9
7
|
import { path } from '../internal/utils/path';
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
|
-
*
|
|
10
|
+
* The people who can sign in to your organization, and what each may do.
|
|
11
|
+
*
|
|
12
|
+
* Users are dashboard access and nothing else — they do not send, and removing one does not affect traffic. An API key is not a user: it belongs to the organization or to a sender profile, so revoking a person's access leaves your integration running.
|
|
13
13
|
*/
|
|
14
14
|
export class Users extends APIResource {
|
|
15
15
|
/**
|
|
@@ -18,8 +18,8 @@ export class Users extends APIResource {
|
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* ```ts
|
|
21
|
-
* const
|
|
22
|
-
* '
|
|
21
|
+
* const user = await client.users.retrieve(
|
|
22
|
+
* '880e8400-e29b-41d4-a716-446655440003',
|
|
23
23
|
* );
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
@@ -27,7 +27,7 @@ export class Users extends APIResource {
|
|
|
27
27
|
userID: string,
|
|
28
28
|
params: UserRetrieveParams | null | undefined = {},
|
|
29
29
|
options?: RequestOptions,
|
|
30
|
-
): APIPromise<
|
|
30
|
+
): APIPromise<UserRetrieveResponse> {
|
|
31
31
|
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
32
32
|
return this._client.get(path`/v3/users/${userID}`, {
|
|
33
33
|
...options,
|
|
@@ -69,10 +69,10 @@ export class Users extends APIResource {
|
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* ```ts
|
|
72
|
-
* const
|
|
72
|
+
* const response = await client.users.invite();
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
invite(params: UserInviteParams, options?: RequestOptions): APIPromise<
|
|
75
|
+
invite(params: UserInviteParams, options?: RequestOptions): APIPromise<UserInviteResponse> {
|
|
76
76
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
77
77
|
return this._client.post('/v3/users', {
|
|
78
78
|
body,
|
|
@@ -93,7 +93,9 @@ export class Users extends APIResource {
|
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
95
|
* ```ts
|
|
96
|
-
* await client.users.remove(
|
|
96
|
+
* await client.users.remove(
|
|
97
|
+
* 'aa0e8400-e29b-41d4-a716-446655440005',
|
|
98
|
+
* );
|
|
97
99
|
* ```
|
|
98
100
|
*/
|
|
99
101
|
remove(userID: string, params: UserRemoveParams, options?: RequestOptions): APIPromise<void> {
|
|
@@ -114,8 +116,8 @@ export class Users extends APIResource {
|
|
|
114
116
|
*
|
|
115
117
|
* @example
|
|
116
118
|
* ```ts
|
|
117
|
-
* const
|
|
118
|
-
* '
|
|
119
|
+
* const response = await client.users.updateRole(
|
|
120
|
+
* 'aa0e8400-e29b-41d4-a716-446655440005',
|
|
119
121
|
* );
|
|
120
122
|
* ```
|
|
121
123
|
*/
|
|
@@ -123,7 +125,7 @@ export class Users extends APIResource {
|
|
|
123
125
|
userID: string,
|
|
124
126
|
params: UserUpdateRoleParams,
|
|
125
127
|
options?: RequestOptions,
|
|
126
|
-
): APIPromise<
|
|
128
|
+
): APIPromise<UserUpdateRoleResponse> {
|
|
127
129
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
128
130
|
return this._client.patch(path`/v3/users/${userID}`, {
|
|
129
131
|
body,
|
|
@@ -142,21 +144,21 @@ export class Users extends APIResource {
|
|
|
142
144
|
/**
|
|
143
145
|
* Standard API response envelope for all v3 endpoints
|
|
144
146
|
*/
|
|
145
|
-
export interface
|
|
147
|
+
export interface UserRetrieveResponse {
|
|
146
148
|
/**
|
|
147
149
|
* User response for v3 API
|
|
148
150
|
*/
|
|
149
|
-
data?:
|
|
151
|
+
data?: UserRetrieveResponse.Data | null;
|
|
150
152
|
|
|
151
153
|
/**
|
|
152
154
|
* Error information
|
|
153
155
|
*/
|
|
154
|
-
error?:
|
|
156
|
+
error?: UserRetrieveResponse.Error | null;
|
|
155
157
|
|
|
156
158
|
/**
|
|
157
159
|
* Request and response metadata
|
|
158
160
|
*/
|
|
159
|
-
meta?:
|
|
161
|
+
meta?: UserRetrieveResponse.Meta;
|
|
160
162
|
|
|
161
163
|
/**
|
|
162
164
|
* Indicates whether the request was successful
|
|
@@ -164,74 +166,452 @@ export interface APIResponseOfUser {
|
|
|
164
166
|
success?: boolean;
|
|
165
167
|
}
|
|
166
168
|
|
|
169
|
+
export namespace UserRetrieveResponse {
|
|
170
|
+
/**
|
|
171
|
+
* User response for v3 API
|
|
172
|
+
*/
|
|
173
|
+
export interface Data {
|
|
174
|
+
/**
|
|
175
|
+
* User unique identifier
|
|
176
|
+
*/
|
|
177
|
+
id?: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* When the user was added to the organization
|
|
181
|
+
*/
|
|
182
|
+
created_at?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
186
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
187
|
+
*/
|
|
188
|
+
customer_id?: string;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* User email address
|
|
192
|
+
*/
|
|
193
|
+
email?: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* When the user was invited
|
|
197
|
+
*/
|
|
198
|
+
invited_at?: string | null;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* When the user last logged in
|
|
202
|
+
*/
|
|
203
|
+
last_login_at?: string | null;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* User full name
|
|
207
|
+
*/
|
|
208
|
+
name?: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* User role in the organization: admin, billing, developer
|
|
212
|
+
*/
|
|
213
|
+
role?: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* User status: active, invited, suspended, rejected
|
|
217
|
+
*/
|
|
218
|
+
status?: string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* When the user record was last updated
|
|
222
|
+
*/
|
|
223
|
+
updated_at?: string | null;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Error information
|
|
228
|
+
*/
|
|
229
|
+
export interface Error {
|
|
230
|
+
/**
|
|
231
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
232
|
+
*/
|
|
233
|
+
code?: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Additional validation error details (field-level errors)
|
|
237
|
+
*/
|
|
238
|
+
details?: { [key: string]: Array<string> } | null;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* URL to documentation about this error
|
|
242
|
+
*/
|
|
243
|
+
doc_url?: string | null;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Human-readable error message
|
|
247
|
+
*/
|
|
248
|
+
message?: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Request and response metadata
|
|
253
|
+
*/
|
|
254
|
+
export interface Meta {
|
|
255
|
+
/**
|
|
256
|
+
* Unique identifier for this request (for tracing and support)
|
|
257
|
+
*/
|
|
258
|
+
request_id?: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Server timestamp when the response was generated
|
|
262
|
+
*/
|
|
263
|
+
timestamp?: string;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* API version used for this request
|
|
267
|
+
*/
|
|
268
|
+
version?: string;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
167
272
|
/**
|
|
168
|
-
*
|
|
273
|
+
* Standard API response envelope for all v3 endpoints
|
|
169
274
|
*/
|
|
170
|
-
export interface
|
|
275
|
+
export interface UserListResponse {
|
|
171
276
|
/**
|
|
172
|
-
*
|
|
277
|
+
* The users in the organization.
|
|
173
278
|
*/
|
|
174
|
-
|
|
279
|
+
data?: UserListResponse.Data | null;
|
|
175
280
|
|
|
176
281
|
/**
|
|
177
|
-
*
|
|
282
|
+
* Error information
|
|
178
283
|
*/
|
|
179
|
-
|
|
284
|
+
error?: UserListResponse.Error | null;
|
|
180
285
|
|
|
181
286
|
/**
|
|
182
|
-
*
|
|
287
|
+
* Request and response metadata
|
|
183
288
|
*/
|
|
184
|
-
|
|
289
|
+
meta?: UserListResponse.Meta;
|
|
185
290
|
|
|
186
291
|
/**
|
|
187
|
-
*
|
|
292
|
+
* Indicates whether the request was successful
|
|
188
293
|
*/
|
|
189
|
-
|
|
294
|
+
success?: boolean;
|
|
295
|
+
}
|
|
190
296
|
|
|
297
|
+
export namespace UserListResponse {
|
|
191
298
|
/**
|
|
192
|
-
*
|
|
299
|
+
* The users in the organization.
|
|
193
300
|
*/
|
|
194
|
-
|
|
301
|
+
export interface Data {
|
|
302
|
+
/**
|
|
303
|
+
* Pagination metadata for list responses
|
|
304
|
+
*/
|
|
305
|
+
pagination?: Data.Pagination;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* The users on this page.
|
|
309
|
+
*/
|
|
310
|
+
users?: Array<Data.User>;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export namespace Data {
|
|
314
|
+
/**
|
|
315
|
+
* Pagination metadata for list responses
|
|
316
|
+
*/
|
|
317
|
+
export interface Pagination {
|
|
318
|
+
/**
|
|
319
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
320
|
+
*/
|
|
321
|
+
cursors?: Pagination.Cursors | null;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Whether there are more pages after this one
|
|
325
|
+
*/
|
|
326
|
+
has_more?: boolean;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Current page number (1-indexed)
|
|
330
|
+
*/
|
|
331
|
+
page?: number;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Number of items per page
|
|
335
|
+
*/
|
|
336
|
+
page_size?: number;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Total number of items across all pages
|
|
340
|
+
*/
|
|
341
|
+
total_count?: number;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Total number of pages
|
|
345
|
+
*/
|
|
346
|
+
total_pages?: number;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export namespace Pagination {
|
|
350
|
+
/**
|
|
351
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
352
|
+
*/
|
|
353
|
+
export interface Cursors {
|
|
354
|
+
/**
|
|
355
|
+
* Cursor to fetch the next page.
|
|
356
|
+
*/
|
|
357
|
+
after?: string | null;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Cursor to fetch the previous page.
|
|
361
|
+
*/
|
|
362
|
+
before?: string | null;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* User response for v3 API
|
|
368
|
+
*/
|
|
369
|
+
export interface User {
|
|
370
|
+
/**
|
|
371
|
+
* User unique identifier
|
|
372
|
+
*/
|
|
373
|
+
id?: string;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* When the user was added to the organization
|
|
377
|
+
*/
|
|
378
|
+
created_at?: string;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
382
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
383
|
+
*/
|
|
384
|
+
customer_id?: string;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* User email address
|
|
388
|
+
*/
|
|
389
|
+
email?: string;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* When the user was invited
|
|
393
|
+
*/
|
|
394
|
+
invited_at?: string | null;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* When the user last logged in
|
|
398
|
+
*/
|
|
399
|
+
last_login_at?: string | null;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* User full name
|
|
403
|
+
*/
|
|
404
|
+
name?: string;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* User role in the organization: admin, billing, developer
|
|
408
|
+
*/
|
|
409
|
+
role?: string;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* User status: active, invited, suspended, rejected
|
|
413
|
+
*/
|
|
414
|
+
status?: string;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* When the user record was last updated
|
|
418
|
+
*/
|
|
419
|
+
updated_at?: string | null;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
195
422
|
|
|
196
423
|
/**
|
|
197
|
-
*
|
|
424
|
+
* Error information
|
|
198
425
|
*/
|
|
199
|
-
|
|
426
|
+
export interface Error {
|
|
427
|
+
/**
|
|
428
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
429
|
+
*/
|
|
430
|
+
code?: string;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Additional validation error details (field-level errors)
|
|
434
|
+
*/
|
|
435
|
+
details?: { [key: string]: Array<string> } | null;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* URL to documentation about this error
|
|
439
|
+
*/
|
|
440
|
+
doc_url?: string | null;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Human-readable error message
|
|
444
|
+
*/
|
|
445
|
+
message?: string;
|
|
446
|
+
}
|
|
200
447
|
|
|
201
448
|
/**
|
|
202
|
-
*
|
|
449
|
+
* Request and response metadata
|
|
203
450
|
*/
|
|
204
|
-
|
|
451
|
+
export interface Meta {
|
|
452
|
+
/**
|
|
453
|
+
* Unique identifier for this request (for tracing and support)
|
|
454
|
+
*/
|
|
455
|
+
request_id?: string;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Server timestamp when the response was generated
|
|
459
|
+
*/
|
|
460
|
+
timestamp?: string;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* API version used for this request
|
|
464
|
+
*/
|
|
465
|
+
version?: string;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Standard API response envelope for all v3 endpoints
|
|
471
|
+
*/
|
|
472
|
+
export interface UserInviteResponse {
|
|
473
|
+
/**
|
|
474
|
+
* User response for v3 API
|
|
475
|
+
*/
|
|
476
|
+
data?: UserInviteResponse.Data | null;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Error information
|
|
480
|
+
*/
|
|
481
|
+
error?: UserInviteResponse.Error | null;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Request and response metadata
|
|
485
|
+
*/
|
|
486
|
+
meta?: UserInviteResponse.Meta;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Indicates whether the request was successful
|
|
490
|
+
*/
|
|
491
|
+
success?: boolean;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export namespace UserInviteResponse {
|
|
495
|
+
/**
|
|
496
|
+
* User response for v3 API
|
|
497
|
+
*/
|
|
498
|
+
export interface Data {
|
|
499
|
+
/**
|
|
500
|
+
* User unique identifier
|
|
501
|
+
*/
|
|
502
|
+
id?: string;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* When the user was added to the organization
|
|
506
|
+
*/
|
|
507
|
+
created_at?: string;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
511
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
512
|
+
*/
|
|
513
|
+
customer_id?: string;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* User email address
|
|
517
|
+
*/
|
|
518
|
+
email?: string;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* When the user was invited
|
|
522
|
+
*/
|
|
523
|
+
invited_at?: string | null;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* When the user last logged in
|
|
527
|
+
*/
|
|
528
|
+
last_login_at?: string | null;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* User full name
|
|
532
|
+
*/
|
|
533
|
+
name?: string;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* User role in the organization: admin, billing, developer
|
|
537
|
+
*/
|
|
538
|
+
role?: string;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* User status: active, invited, suspended, rejected
|
|
542
|
+
*/
|
|
543
|
+
status?: string;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* When the user record was last updated
|
|
547
|
+
*/
|
|
548
|
+
updated_at?: string | null;
|
|
549
|
+
}
|
|
205
550
|
|
|
206
551
|
/**
|
|
207
|
-
*
|
|
552
|
+
* Error information
|
|
208
553
|
*/
|
|
209
|
-
|
|
554
|
+
export interface Error {
|
|
555
|
+
/**
|
|
556
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
557
|
+
*/
|
|
558
|
+
code?: string;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Additional validation error details (field-level errors)
|
|
562
|
+
*/
|
|
563
|
+
details?: { [key: string]: Array<string> } | null;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* URL to documentation about this error
|
|
567
|
+
*/
|
|
568
|
+
doc_url?: string | null;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Human-readable error message
|
|
572
|
+
*/
|
|
573
|
+
message?: string;
|
|
574
|
+
}
|
|
210
575
|
|
|
211
576
|
/**
|
|
212
|
-
*
|
|
577
|
+
* Request and response metadata
|
|
213
578
|
*/
|
|
214
|
-
|
|
579
|
+
export interface Meta {
|
|
580
|
+
/**
|
|
581
|
+
* Unique identifier for this request (for tracing and support)
|
|
582
|
+
*/
|
|
583
|
+
request_id?: string;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Server timestamp when the response was generated
|
|
587
|
+
*/
|
|
588
|
+
timestamp?: string;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* API version used for this request
|
|
592
|
+
*/
|
|
593
|
+
version?: string;
|
|
594
|
+
}
|
|
215
595
|
}
|
|
216
596
|
|
|
217
597
|
/**
|
|
218
598
|
* Standard API response envelope for all v3 endpoints
|
|
219
599
|
*/
|
|
220
|
-
export interface
|
|
600
|
+
export interface UserUpdateRoleResponse {
|
|
221
601
|
/**
|
|
222
|
-
*
|
|
602
|
+
* User response for v3 API
|
|
223
603
|
*/
|
|
224
|
-
data?:
|
|
604
|
+
data?: UserUpdateRoleResponse.Data | null;
|
|
225
605
|
|
|
226
606
|
/**
|
|
227
607
|
* Error information
|
|
228
608
|
*/
|
|
229
|
-
error?:
|
|
609
|
+
error?: UserUpdateRoleResponse.Error | null;
|
|
230
610
|
|
|
231
611
|
/**
|
|
232
612
|
* Request and response metadata
|
|
233
613
|
*/
|
|
234
|
-
meta?:
|
|
614
|
+
meta?: UserUpdateRoleResponse.Meta;
|
|
235
615
|
|
|
236
616
|
/**
|
|
237
617
|
* Indicates whether the request was successful
|
|
@@ -239,15 +619,106 @@ export interface UserListResponse {
|
|
|
239
619
|
success?: boolean;
|
|
240
620
|
}
|
|
241
621
|
|
|
242
|
-
export namespace
|
|
622
|
+
export namespace UserUpdateRoleResponse {
|
|
243
623
|
/**
|
|
244
|
-
*
|
|
624
|
+
* User response for v3 API
|
|
245
625
|
*/
|
|
246
626
|
export interface Data {
|
|
247
627
|
/**
|
|
248
|
-
*
|
|
628
|
+
* User unique identifier
|
|
629
|
+
*/
|
|
630
|
+
id?: string;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* When the user was added to the organization
|
|
634
|
+
*/
|
|
635
|
+
created_at?: string;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
639
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
640
|
+
*/
|
|
641
|
+
customer_id?: string;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* User email address
|
|
645
|
+
*/
|
|
646
|
+
email?: string;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* When the user was invited
|
|
650
|
+
*/
|
|
651
|
+
invited_at?: string | null;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* When the user last logged in
|
|
655
|
+
*/
|
|
656
|
+
last_login_at?: string | null;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* User full name
|
|
660
|
+
*/
|
|
661
|
+
name?: string;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* User role in the organization: admin, billing, developer
|
|
665
|
+
*/
|
|
666
|
+
role?: string;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* User status: active, invited, suspended, rejected
|
|
670
|
+
*/
|
|
671
|
+
status?: string;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* When the user record was last updated
|
|
675
|
+
*/
|
|
676
|
+
updated_at?: string | null;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Error information
|
|
681
|
+
*/
|
|
682
|
+
export interface Error {
|
|
683
|
+
/**
|
|
684
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
685
|
+
*/
|
|
686
|
+
code?: string;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Additional validation error details (field-level errors)
|
|
690
|
+
*/
|
|
691
|
+
details?: { [key: string]: Array<string> } | null;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* URL to documentation about this error
|
|
695
|
+
*/
|
|
696
|
+
doc_url?: string | null;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Human-readable error message
|
|
700
|
+
*/
|
|
701
|
+
message?: string;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Request and response metadata
|
|
706
|
+
*/
|
|
707
|
+
export interface Meta {
|
|
708
|
+
/**
|
|
709
|
+
* Unique identifier for this request (for tracing and support)
|
|
710
|
+
*/
|
|
711
|
+
request_id?: string;
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Server timestamp when the response was generated
|
|
715
|
+
*/
|
|
716
|
+
timestamp?: string;
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* API version used for this request
|
|
249
720
|
*/
|
|
250
|
-
|
|
721
|
+
version?: string;
|
|
251
722
|
}
|
|
252
723
|
}
|
|
253
724
|
|
|
@@ -348,9 +819,10 @@ export interface UserUpdateRoleParams {
|
|
|
348
819
|
|
|
349
820
|
export declare namespace Users {
|
|
350
821
|
export {
|
|
351
|
-
type
|
|
352
|
-
type UserResponse as UserResponse,
|
|
822
|
+
type UserRetrieveResponse as UserRetrieveResponse,
|
|
353
823
|
type UserListResponse as UserListResponse,
|
|
824
|
+
type UserInviteResponse as UserInviteResponse,
|
|
825
|
+
type UserUpdateRoleResponse as UserUpdateRoleResponse,
|
|
354
826
|
type UserRetrieveParams as UserRetrieveParams,
|
|
355
827
|
type UserListParams as UserListParams,
|
|
356
828
|
type UserInviteParams as UserInviteParams,
|