@sentdm/sentdm 0.34.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 +8 -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 +206 -27
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +206 -27
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +5 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +5 -1
- 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 -508
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -508
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +98 -75
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +98 -75
- 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 +444 -43
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +444 -43
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +6 -4
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +6 -4
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +770 -169
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +770 -169
- 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 +78 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +20 -26
- package/src/resources/me.ts +151 -52
- package/src/resources/messages.ts +230 -27
- 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 -646
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +514 -44
- package/src/resources/webhooks.ts +1006 -283
- 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,7 +18,7 @@ export class Users extends APIResource {
|
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* ```ts
|
|
21
|
-
* const
|
|
21
|
+
* const user = await client.users.retrieve(
|
|
22
22
|
* '880e8400-e29b-41d4-a716-446655440003',
|
|
23
23
|
* );
|
|
24
24
|
* ```
|
|
@@ -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,
|
|
@@ -116,7 +116,7 @@ export class Users extends APIResource {
|
|
|
116
116
|
*
|
|
117
117
|
* @example
|
|
118
118
|
* ```ts
|
|
119
|
-
* const
|
|
119
|
+
* const response = await client.users.updateRole(
|
|
120
120
|
* 'aa0e8400-e29b-41d4-a716-446655440005',
|
|
121
121
|
* );
|
|
122
122
|
* ```
|
|
@@ -125,7 +125,7 @@ export class Users extends APIResource {
|
|
|
125
125
|
userID: string,
|
|
126
126
|
params: UserUpdateRoleParams,
|
|
127
127
|
options?: RequestOptions,
|
|
128
|
-
): APIPromise<
|
|
128
|
+
): APIPromise<UserUpdateRoleResponse> {
|
|
129
129
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
130
130
|
return this._client.patch(path`/v3/users/${userID}`, {
|
|
131
131
|
body,
|
|
@@ -144,21 +144,21 @@ export class Users extends APIResource {
|
|
|
144
144
|
/**
|
|
145
145
|
* Standard API response envelope for all v3 endpoints
|
|
146
146
|
*/
|
|
147
|
-
export interface
|
|
147
|
+
export interface UserRetrieveResponse {
|
|
148
148
|
/**
|
|
149
149
|
* User response for v3 API
|
|
150
150
|
*/
|
|
151
|
-
data?:
|
|
151
|
+
data?: UserRetrieveResponse.Data | null;
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Error information
|
|
155
155
|
*/
|
|
156
|
-
error?:
|
|
156
|
+
error?: UserRetrieveResponse.Error | null;
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* Request and response metadata
|
|
160
160
|
*/
|
|
161
|
-
meta?:
|
|
161
|
+
meta?: UserRetrieveResponse.Meta;
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
* Indicates whether the request was successful
|
|
@@ -166,74 +166,452 @@ export interface APIResponseOfUser {
|
|
|
166
166
|
success?: boolean;
|
|
167
167
|
}
|
|
168
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
|
+
|
|
169
272
|
/**
|
|
170
|
-
*
|
|
273
|
+
* Standard API response envelope for all v3 endpoints
|
|
171
274
|
*/
|
|
172
|
-
export interface
|
|
275
|
+
export interface UserListResponse {
|
|
173
276
|
/**
|
|
174
|
-
*
|
|
277
|
+
* The users in the organization.
|
|
175
278
|
*/
|
|
176
|
-
|
|
279
|
+
data?: UserListResponse.Data | null;
|
|
177
280
|
|
|
178
281
|
/**
|
|
179
|
-
*
|
|
282
|
+
* Error information
|
|
180
283
|
*/
|
|
181
|
-
|
|
284
|
+
error?: UserListResponse.Error | null;
|
|
182
285
|
|
|
183
286
|
/**
|
|
184
|
-
*
|
|
287
|
+
* Request and response metadata
|
|
185
288
|
*/
|
|
186
|
-
|
|
289
|
+
meta?: UserListResponse.Meta;
|
|
187
290
|
|
|
188
291
|
/**
|
|
189
|
-
*
|
|
292
|
+
* Indicates whether the request was successful
|
|
190
293
|
*/
|
|
191
|
-
|
|
294
|
+
success?: boolean;
|
|
295
|
+
}
|
|
192
296
|
|
|
297
|
+
export namespace UserListResponse {
|
|
193
298
|
/**
|
|
194
|
-
*
|
|
299
|
+
* The users in the organization.
|
|
195
300
|
*/
|
|
196
|
-
|
|
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
|
+
}
|
|
197
422
|
|
|
198
423
|
/**
|
|
199
|
-
*
|
|
424
|
+
* Error information
|
|
200
425
|
*/
|
|
201
|
-
|
|
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
|
+
}
|
|
202
447
|
|
|
203
448
|
/**
|
|
204
|
-
*
|
|
449
|
+
* Request and response metadata
|
|
205
450
|
*/
|
|
206
|
-
|
|
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;
|
|
207
482
|
|
|
208
483
|
/**
|
|
209
|
-
*
|
|
484
|
+
* Request and response metadata
|
|
210
485
|
*/
|
|
211
|
-
|
|
486
|
+
meta?: UserInviteResponse.Meta;
|
|
212
487
|
|
|
213
488
|
/**
|
|
214
|
-
*
|
|
489
|
+
* Indicates whether the request was successful
|
|
215
490
|
*/
|
|
216
|
-
|
|
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
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Error information
|
|
553
|
+
*/
|
|
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
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Request and response metadata
|
|
578
|
+
*/
|
|
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
|
+
}
|
|
217
595
|
}
|
|
218
596
|
|
|
219
597
|
/**
|
|
220
598
|
* Standard API response envelope for all v3 endpoints
|
|
221
599
|
*/
|
|
222
|
-
export interface
|
|
600
|
+
export interface UserUpdateRoleResponse {
|
|
223
601
|
/**
|
|
224
|
-
*
|
|
602
|
+
* User response for v3 API
|
|
225
603
|
*/
|
|
226
|
-
data?:
|
|
604
|
+
data?: UserUpdateRoleResponse.Data | null;
|
|
227
605
|
|
|
228
606
|
/**
|
|
229
607
|
* Error information
|
|
230
608
|
*/
|
|
231
|
-
error?:
|
|
609
|
+
error?: UserUpdateRoleResponse.Error | null;
|
|
232
610
|
|
|
233
611
|
/**
|
|
234
612
|
* Request and response metadata
|
|
235
613
|
*/
|
|
236
|
-
meta?:
|
|
614
|
+
meta?: UserUpdateRoleResponse.Meta;
|
|
237
615
|
|
|
238
616
|
/**
|
|
239
617
|
* Indicates whether the request was successful
|
|
@@ -241,15 +619,106 @@ export interface UserListResponse {
|
|
|
241
619
|
success?: boolean;
|
|
242
620
|
}
|
|
243
621
|
|
|
244
|
-
export namespace
|
|
622
|
+
export namespace UserUpdateRoleResponse {
|
|
245
623
|
/**
|
|
246
|
-
*
|
|
624
|
+
* User response for v3 API
|
|
247
625
|
*/
|
|
248
626
|
export interface Data {
|
|
249
627
|
/**
|
|
250
|
-
*
|
|
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
|
|
251
720
|
*/
|
|
252
|
-
|
|
721
|
+
version?: string;
|
|
253
722
|
}
|
|
254
723
|
}
|
|
255
724
|
|
|
@@ -350,9 +819,10 @@ export interface UserUpdateRoleParams {
|
|
|
350
819
|
|
|
351
820
|
export declare namespace Users {
|
|
352
821
|
export {
|
|
353
|
-
type
|
|
354
|
-
type UserResponse as UserResponse,
|
|
822
|
+
type UserRetrieveResponse as UserRetrieveResponse,
|
|
355
823
|
type UserListResponse as UserListResponse,
|
|
824
|
+
type UserInviteResponse as UserInviteResponse,
|
|
825
|
+
type UserUpdateRoleResponse as UserUpdateRoleResponse,
|
|
356
826
|
type UserRetrieveParams as UserRetrieveParams,
|
|
357
827
|
type UserListParams as UserListParams,
|
|
358
828
|
type UserInviteParams as UserInviteParams,
|