@wildix/xbees-users-client 4.3.3-wms28830.1 → 4.4.0-stage.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.
Files changed (57) hide show
  1. package/dist-cjs/Users.js +17 -7
  2. package/dist-cjs/auth/httpAuthSchemeProvider.js +35 -16
  3. package/dist-cjs/commands/ApplyAccountWorkspaceChangesCommand.js +20 -0
  4. package/dist-cjs/commands/{LinkIdentityCommand.js → ApplyIdentityRemovalCommand.js} +6 -6
  5. package/dist-cjs/commands/ConfirmIdentityChallengeCommand.js +20 -0
  6. package/dist-cjs/commands/{VerifyIdentityCommand.js → ListAccountEmailChangesCommand.js} +6 -6
  7. package/dist-cjs/commands/ResendIdentityChallengeCodeCommand.js +20 -0
  8. package/dist-cjs/commands/{UnlinkIdentityCommand.js → StartIdentityChallengeCommand.js} +6 -6
  9. package/dist-cjs/commands/index.js +6 -3
  10. package/dist-cjs/index.js +1 -0
  11. package/dist-cjs/models/enums.js +88 -5
  12. package/dist-cjs/models/errors.js +144 -24
  13. package/dist-cjs/pagination/Interfaces.js +2 -0
  14. package/dist-cjs/pagination/ListAccountEmailChangesPaginator.js +7 -0
  15. package/dist-cjs/pagination/index.js +5 -0
  16. package/dist-cjs/schemas/schemas_0.js +431 -151
  17. package/dist-es/Users.js +17 -7
  18. package/dist-es/auth/httpAuthSchemeProvider.js +35 -16
  19. package/dist-es/commands/ApplyAccountWorkspaceChangesCommand.js +16 -0
  20. package/dist-es/commands/{UnlinkIdentityCommand.js → ApplyIdentityRemovalCommand.js} +5 -5
  21. package/dist-es/commands/ConfirmIdentityChallengeCommand.js +16 -0
  22. package/dist-es/commands/{LinkIdentityCommand.js → ListAccountEmailChangesCommand.js} +5 -5
  23. package/dist-es/commands/ResendIdentityChallengeCodeCommand.js +16 -0
  24. package/dist-es/commands/{VerifyIdentityCommand.js → StartIdentityChallengeCommand.js} +5 -5
  25. package/dist-es/commands/index.js +6 -3
  26. package/dist-es/index.js +1 -0
  27. package/dist-es/models/enums.js +87 -4
  28. package/dist-es/models/errors.js +132 -20
  29. package/dist-es/pagination/Interfaces.js +1 -0
  30. package/dist-es/pagination/ListAccountEmailChangesPaginator.js +4 -0
  31. package/dist-es/pagination/index.js +2 -0
  32. package/dist-es/schemas/schemas_0.js +427 -147
  33. package/dist-types/Users.d.ts +46 -18
  34. package/dist-types/UsersClient.d.ts +8 -5
  35. package/dist-types/commands/ApplyAccountWorkspaceChangesCommand.d.ts +193 -0
  36. package/dist-types/commands/ApplyIdentityRemovalCommand.d.ts +93 -0
  37. package/dist-types/commands/ConfirmIdentityChallengeCommand.d.ts +138 -0
  38. package/dist-types/commands/ListAccountEmailChangesCommand.d.ts +101 -0
  39. package/dist-types/commands/ListIdentitiesCommand.d.ts +4 -2
  40. package/dist-types/commands/QueryUserCommand.d.ts +1 -1
  41. package/dist-types/commands/QueryUsersCommand.d.ts +1 -1
  42. package/dist-types/commands/ResendIdentityChallengeCodeCommand.d.ts +96 -0
  43. package/dist-types/commands/StartIdentityChallengeCommand.d.ts +139 -0
  44. package/dist-types/commands/UpdateAccountCommand.d.ts +2 -1
  45. package/dist-types/commands/index.d.ts +6 -3
  46. package/dist-types/index.d.ts +1 -0
  47. package/dist-types/models/enums.d.ts +344 -8
  48. package/dist-types/models/errors.d.ts +158 -17
  49. package/dist-types/models/models_0.d.ts +659 -69
  50. package/dist-types/pagination/Interfaces.d.ts +8 -0
  51. package/dist-types/pagination/ListAccountEmailChangesPaginator.d.ts +7 -0
  52. package/dist-types/pagination/index.d.ts +2 -0
  53. package/dist-types/schemas/schemas_0.d.ts +40 -9
  54. package/package.json +5 -5
  55. package/dist-types/commands/LinkIdentityCommand.d.ts +0 -89
  56. package/dist-types/commands/UnlinkIdentityCommand.d.ts +0 -85
  57. package/dist-types/commands/VerifyIdentityCommand.d.ts +0 -90
@@ -1,5 +1,5 @@
1
1
  import type { DocumentType as __DocumentType } from "@smithy/types";
2
- import type { AppType, BotAccess, BotCapabilityToolPipelineType, BotIntegrationType, BotLlmEmbeddedToolType, BotLlmFunctionIntegrationMethod, BotLlmToolType, BotSessionTimeoutMinutes, GetPbxColleaguesDir, PbxColleagueRole, PbxColleaguesQueryField, PbxColleaguesSearchStrategy, PbxLicenseType, SearchStrategy, SearchThresholdValue, WorkspaceType } from "./enums";
2
+ import type { AccountEmailChangeStatus, AccountWorkspaceChangeOperation, AccountWorkspaceCheckCode, AccountWorkspaceEffectName, AccountWorkspaceEffectStatus, AccountWorkspaceRowEntity, AccountWorkspaceWriteKind, AppType, BotAccess, BotCapabilityToolPipelineType, BotIntegrationType, BotLlmEmbeddedToolType, BotLlmFunctionIntegrationMethod, BotLlmToolType, BotSessionTimeoutMinutes, GetPbxColleaguesDir, IdentityChallengeOperation, IdentityChallengeStep, IdentityType, PbxColleagueRole, PbxColleaguesQueryField, PbxColleaguesSearchStrategy, PbxLicenseType, SearchStrategy, SearchThresholdValue, WorkspaceType } from "./enums";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -100,12 +100,12 @@ export interface PbxColleague {
100
100
  */
101
101
  export interface UserToInvite {
102
102
  /**
103
- * The email address of the invited user. If no user exists with the specified email and "colleague" flag is provided, the system will retrieve the colleague's details from the PBX.
103
+ * The email address of the invited user. If no user exists with the specified email and "colleague" flag is provided, the system will retrieve the colleague's details from the PBX. A phone-user address (`\{digits\}@phone.wildix.com`) invites the user who signs in via SMS with that number: the user is created before their first sign-in, without a phone, and is never the SMS/WhatsApp contact of the number.
104
104
  * @public
105
105
  */
106
106
  email?: string | undefined;
107
107
  /**
108
- * The phone number of the invited user. This phone number is used to create or find the user if an email address is not provided. On Messenger and Instagram it is not a phone number at all: the caller passes the channel's own customer id, the Page Scoped ID on Messenger, so the identity key stays the one the supplier reports. On RCS it is the person's phone number. A phone number allows up to 17 digits and a Page Scoped ID is 17, so there is no headroom left, and the Instagram scoped id has to be checked against the same limit. A WhatsApp user who hides the number is invited by the BSUID exactly as Meta spells it (see InviteePhone).
108
+ * The phone number of the invited SMS/WhatsApp contact: an external customer who never signs in. This phone number is used to create or find the contact if an email address is not provided; it never finds the user who signs in via SMS with that number. On Messenger and Instagram it is not a phone number at all: the caller passes the channel's own customer id, the Page Scoped ID on Messenger, so the identity key stays the one the supplier reports. On RCS it is the person's phone number. A phone number allows up to 17 digits and a Page Scoped ID is 17, so there is no headroom left, and the Instagram scoped id has to be checked against the same limit. A WhatsApp user who hides the number is invited by the BSUID exactly as Meta spells it (see InviteePhone).
109
109
  * @public
110
110
  */
111
111
  phone?: string | undefined;
@@ -190,11 +190,337 @@ export interface Account {
190
190
  */
191
191
  defaultWorkspace?: string | undefined;
192
192
  /**
193
- * The identity value (email address or phone number in E.164).
193
+ * The address of the primary sign-in method, the one confirmation codes go to.
194
194
  * @public
195
195
  */
196
196
  primaryIdentity?: string | undefined;
197
197
  }
198
+ /**
199
+ * One execution of the change-email state machine.
200
+ * @public
201
+ */
202
+ export interface AccountEmailChange {
203
+ /**
204
+ * ARN of the execution (the `sfnArn` ChangeUserEmail returned).
205
+ * @public
206
+ */
207
+ executionArn: string;
208
+ /**
209
+ * Status of the execution.
210
+ * @public
211
+ */
212
+ status: AccountEmailChangeStatus;
213
+ /**
214
+ * When the execution started, ISO-8601 UTC (e.g. `2026-05-07T05:35:00.000Z`).
215
+ * @public
216
+ */
217
+ startedAt: string;
218
+ /**
219
+ * When the execution stopped, ISO-8601 UTC. Absent while it runs.
220
+ * @public
221
+ */
222
+ stoppedAt?: string | undefined;
223
+ /**
224
+ * The email the user had (`oldData.email` of the execution input).
225
+ * @public
226
+ */
227
+ oldEmail: string;
228
+ /**
229
+ * The email the user changes to (`newData.email` of the execution input).
230
+ * @public
231
+ */
232
+ newEmail: string;
233
+ /**
234
+ * The company of the old email (`oldData.companyId`), when the input holds it.
235
+ * @public
236
+ */
237
+ oldCompanyId?: string | undefined;
238
+ /**
239
+ * The company of the new email (`newData.companyId`), when the input holds it.
240
+ * @public
241
+ */
242
+ newCompanyId?: string | undefined;
243
+ }
244
+ /**
245
+ * One change to the workspaces of an account.
246
+ * @public
247
+ */
248
+ export interface AccountWorkspaceChange {
249
+ /**
250
+ * The account the change acts on: for attach the destination account (it receives the workspace), for detach the account that loses it, for makeDefault the account whose default changes.
251
+ * @public
252
+ */
253
+ accountId: string;
254
+ /**
255
+ * What the change does.
256
+ * @public
257
+ */
258
+ op: AccountWorkspaceChangeOperation;
259
+ /**
260
+ * The workspace the change is about.
261
+ * @public
262
+ */
263
+ workspaceId: string;
264
+ /**
265
+ * attach only (refused for detach and makeDefault): the account the workspace is taken from (usually an orphaned account of the same person). Required when the workspace is a member of another account; omit it to attach a workspace that has no membership in any account (`workspace_has_account` otherwise). Must differ from `accountId`.
266
+ * @public
267
+ */
268
+ fromAccountId?: string | undefined;
269
+ }
270
+ /**
271
+ * The console operator on whose behalf the change is made.
272
+ * @public
273
+ */
274
+ export interface AccountWorkspaceChangeOperator {
275
+ /**
276
+ * Email of the operator.
277
+ * @public
278
+ */
279
+ email: string;
280
+ /**
281
+ * Identifier of the operator in the caller's identity provider.
282
+ * @public
283
+ */
284
+ id?: string | undefined;
285
+ /**
286
+ * Display name of the operator.
287
+ * @public
288
+ */
289
+ name?: string | undefined;
290
+ }
291
+ /**
292
+ * The key of an `XBeesUsers` row.
293
+ * @public
294
+ */
295
+ export interface AccountWorkspaceRowKey {
296
+ /**
297
+ * Partition key of the row.
298
+ * @public
299
+ */
300
+ pk: string;
301
+ /**
302
+ * Sort key of the row.
303
+ * @public
304
+ */
305
+ sk: string;
306
+ }
307
+ /**
308
+ * A finding of the plan's checks.
309
+ * @public
310
+ */
311
+ export interface AccountWorkspaceCheck {
312
+ /**
313
+ * What was found.
314
+ * @public
315
+ */
316
+ code: AccountWorkspaceCheckCode;
317
+ /**
318
+ * true when the change cannot be applied as long as this check is raised.
319
+ * @public
320
+ */
321
+ blocking: boolean;
322
+ /**
323
+ * The row the check is about, when it is about one (always for `conflict` and `expected_incomplete`).
324
+ * @public
325
+ */
326
+ row?: AccountWorkspaceRowKey | undefined;
327
+ /**
328
+ * For `conflict`: the attribute whose stored value differs from `expected`. Absent when a row expected absent now exists or a row expected present is gone: then only `row` names the conflict.
329
+ * @public
330
+ */
331
+ field?: string | undefined;
332
+ /**
333
+ * The account the check is about, when it is about one.
334
+ * @public
335
+ */
336
+ accountId?: string | undefined;
337
+ /**
338
+ * The workspace the check is about, when it is about one.
339
+ * @public
340
+ */
341
+ workspaceId?: string | undefined;
342
+ /**
343
+ * Human-readable explanation, for the operator.
344
+ * @public
345
+ */
346
+ message: string;
347
+ }
348
+ /**
349
+ * One side effect and its outcome.
350
+ * @public
351
+ */
352
+ export interface AccountWorkspaceEffect {
353
+ /**
354
+ * Which side effect.
355
+ * @public
356
+ */
357
+ name: AccountWorkspaceEffectName;
358
+ /**
359
+ * Its outcome.
360
+ * @public
361
+ */
362
+ status: AccountWorkspaceEffectStatus;
363
+ /**
364
+ * What it was applied to: the Cognito username, the workspace id or the account id.
365
+ * @public
366
+ */
367
+ target?: string | undefined;
368
+ /**
369
+ * Details: the error of a failure, the reason of a skip.
370
+ * @public
371
+ */
372
+ detail?: string | undefined;
373
+ }
374
+ /**
375
+ * A row as the caller read it: the condition the transaction checks before writing. Without `fields` the row is expected absent.
376
+ * @public
377
+ */
378
+ export interface AccountWorkspaceExpectedRow {
379
+ /**
380
+ * Partition key of the row.
381
+ * @public
382
+ */
383
+ pk: string;
384
+ /**
385
+ * Sort key of the row.
386
+ * @public
387
+ */
388
+ sk: string;
389
+ /**
390
+ * Omitted: the row is expected absent. Present (1 to 50 entries): the row is expected to exist, with the attributes the caller read, each a string, boolean, number or `null` (`\{attr: null\}`: the row exists and the attribute is absent). The owner compares every listed field with the stored row (an absent row must not exist). At least: membership rows `active` and `type`; `Settings` rows `defaultWorkspace`; `Pbx` and `Stream` rows the fields the caller shows (e.g. Pbx `company`, `domain`, `serial`; Stream `email`). Never `lastUsedAt` (a sign-in is not a conflict) and never Pbx credentials (`sipPassword`, `xmppPassword`): such fields, objects or lists answer ValidationException.
391
+ * @public
392
+ */
393
+ fields?: Record<string, __DocumentType | null> | undefined;
394
+ }
395
+ /**
396
+ * The PBX link a workspace holds, without credentials.
397
+ * @public
398
+ */
399
+ export interface AccountWorkspacePbxLink {
400
+ /**
401
+ * The company (tenant) of the PBX.
402
+ * @public
403
+ */
404
+ companyId: string;
405
+ /**
406
+ * The PBX domain.
407
+ * @public
408
+ */
409
+ domain: string;
410
+ /**
411
+ * The serial number of the PBX.
412
+ * @public
413
+ */
414
+ serial: string;
415
+ /**
416
+ * The id of the user on the PBX.
417
+ * @public
418
+ */
419
+ pbxUserId?: string | undefined;
420
+ /**
421
+ * The extension of the user on the PBX.
422
+ * @public
423
+ */
424
+ extension?: string | undefined;
425
+ }
426
+ /**
427
+ * A workspace of an account after the change.
428
+ * @public
429
+ */
430
+ export interface AccountWorkspaceState {
431
+ /**
432
+ * The workspace (Stream user id).
433
+ * @public
434
+ */
435
+ id: string;
436
+ /**
437
+ * The membership type after the change.
438
+ * @public
439
+ */
440
+ type?: WorkspaceType | undefined;
441
+ /**
442
+ * Whether the membership is active.
443
+ * @public
444
+ */
445
+ active: boolean;
446
+ /**
447
+ * Whether it is the account's default workspace (the one sign-in opens).
448
+ * @public
449
+ */
450
+ isDefault: boolean;
451
+ /**
452
+ * The company of the workspace, if any.
453
+ * @public
454
+ */
455
+ companyId?: string | undefined;
456
+ /**
457
+ * The PBX link the workspace holds after the change. Absent when it holds none.
458
+ * @public
459
+ */
460
+ pbxLink?: AccountWorkspacePbxLink | undefined;
461
+ /**
462
+ * true when the change creates this workspace: the new personal workspace of an orphaned account left with no active workspace.
463
+ * @public
464
+ */
465
+ created?: boolean | undefined;
466
+ }
467
+ /**
468
+ * A touched account and its workspaces after the change.
469
+ * @public
470
+ */
471
+ export interface AccountWorkspacesState {
472
+ /**
473
+ * The account (any account touched by the changes).
474
+ * @public
475
+ */
476
+ accountId: string;
477
+ /**
478
+ * The default workspace after the change. Absent when the account is left without one (a blocking `no_default` for a login account).
479
+ * @public
480
+ */
481
+ defaultWorkspace?: string | undefined;
482
+ /**
483
+ * Every workspace membership of the account after the change.
484
+ * @public
485
+ */
486
+ workspaces: AccountWorkspaceState[];
487
+ }
488
+ /**
489
+ * One row write of the change.
490
+ * @public
491
+ */
492
+ export interface AccountWorkspaceWrite {
493
+ /**
494
+ * Partition key of the row.
495
+ * @public
496
+ */
497
+ pk: string;
498
+ /**
499
+ * Sort key of the row.
500
+ * @public
501
+ */
502
+ sk: string;
503
+ /**
504
+ * How the row is written.
505
+ * @public
506
+ */
507
+ kind: AccountWorkspaceWriteKind;
508
+ /**
509
+ * What kind of row it is.
510
+ * @public
511
+ */
512
+ entity: AccountWorkspaceRowEntity;
513
+ /**
514
+ * The row, or the changed attributes, before the write (see `kind`). Pbx credentials (`sipPassword`, `xmppPassword`) are never returned, wherever they sit in the row: a Pbx row restored from this value lacks them and needs a re-link or refresh from the PBX.
515
+ * @public
516
+ */
517
+ before?: Record<string, __DocumentType | null> | undefined;
518
+ /**
519
+ * The row, or the changed attributes, after the write (see `kind`). In a dry run, timestamps the write sets (e.g. `domainLinkedAt`) are those of the dry run; keep the backup from the apply output. Pbx credentials are never returned.
520
+ * @public
521
+ */
522
+ after?: Record<string, __DocumentType | null> | undefined;
523
+ }
198
524
  /**
199
525
  * @public
200
526
  */
@@ -235,6 +561,81 @@ export declare namespace AnonymousEntryContext {
235
561
  _: (name: string, value: any) => T;
236
562
  }
237
563
  }
564
+ /**
565
+ * @public
566
+ */
567
+ export interface ApplyAccountWorkspaceChangesInput {
568
+ /**
569
+ * The changes of the whole draft, across accounts, evaluated together as one plan (their order does not matter); an unknown `accountId` of a change answers AccountNotFoundException, in a dry run too, while an unknown `fromAccountId` is the refusal `workspace_not_in_source_account`. Malformed lists answer ValidationException in both modes: `fromAccountId` present on detach/makeDefault, `fromAccountId` equal to `accountId`, more than one attach/detach of the same workspace on the same account (an attach with `fromAccountId` counts for its destination and for its source account), more than one makeDefault for the same account, detach and makeDefault of the same workspace in the same account, more than one attach of the same workspace in the whole list, a workspace detached from one account and attached to another in the same call other than as one attach with `fromAccountId` set to the account it leaves. A workspace may be detached from two accounts in one call. attach and makeDefault of the same workspace in the same account are allowed: the workspace is moved in and becomes the default.
570
+ * @public
571
+ */
572
+ changes: AccountWorkspaceChange[];
573
+ /**
574
+ * The rows the caller read, with the values it read, for every row the changes touch: the membership rows (`Account#<acc>/Workspace#<ws>`) and the `Settings` rows (`defaultWorkspace`) of every account touched, that is every `accountId` and every `fromAccountId` of the changes (for an attach without `fromAccountId` the destination membership row of the workspace, sent without `fields`: expected absent), and the `Pbx` and `Stream` rows (`Workspace#<ws>/Pbx`, `Workspace#<ws>/Stream`) of the touched workspaces, including the workspace the PBX link leaves. Rows the owner creates with a new id (an orphaned account's new personal workspace) and `PbxUser#…` link-history rows are not part of it. Stream Console passes the `observed` rows of its board read through unchanged.
575
+ * @public
576
+ */
577
+ expected: AccountWorkspaceExpectedRow[];
578
+ /**
579
+ * true: preview, writes nothing and always answers 200 with the checks, blocking ones included. false: apply, re-runs every check and throws the typed error of the first blocking one, writing nothing; otherwise writes and runs the side effects.
580
+ * @public
581
+ */
582
+ dryRun: boolean;
583
+ /**
584
+ * The console operator who requests the change. Recorded with the change in the owner's logs.
585
+ * @public
586
+ */
587
+ operator: AccountWorkspaceChangeOperator;
588
+ /**
589
+ * Why the change is made, 10 to 2000 characters. Recorded with the change in the owner's logs; the caller keeps it in its own audit entry.
590
+ * @public
591
+ */
592
+ reason: string;
593
+ }
594
+ /**
595
+ * @public
596
+ */
597
+ export interface ApplyAccountWorkspaceChangesOutput {
598
+ /**
599
+ * The row writes of the change: planned (dry run) or done (apply), in the order of the transaction. Enough to show a diff and to keep a backup; how to build the inverse plan and what a restored Pbx row lacks: see the Inverse and backup paragraph of the operation documentation.
600
+ * @public
601
+ */
602
+ writes: AccountWorkspaceWrite[];
603
+ /**
604
+ * The workspaces after the change of every account touched (every `accountId` and every `fromAccountId` of the changes), every `accountId`, then every `fromAccountId`, each account once, in order of first appearance in `changes` (first appearance within each group).
605
+ * @public
606
+ */
607
+ after: AccountWorkspacesState[];
608
+ /**
609
+ * Every check the plan raised. In a dry run blocking checks are listed here instead of being thrown; after an apply only non-blocking checks can be present.
610
+ * @public
611
+ */
612
+ checks: AccountWorkspaceCheck[];
613
+ /**
614
+ * The post-commit side effects with their outcome. Always empty in a dry run.
615
+ * @public
616
+ */
617
+ effects: AccountWorkspaceEffect[];
618
+ }
619
+ /**
620
+ * @public
621
+ */
622
+ export interface ApplyIdentityRemovalInput {
623
+ /**
624
+ * The unique identifier of the account.
625
+ * @public
626
+ */
627
+ accountId: string;
628
+ /**
629
+ * The `remove` challenge returned by `StartIdentityChallenge`, at `step: readyToApply`.
630
+ * @public
631
+ */
632
+ challengeId: string;
633
+ }
634
+ /**
635
+ * @public
636
+ */
637
+ export interface ApplyIdentityRemovalOutput {
638
+ }
238
639
  /**
239
640
  * @public
240
641
  */
@@ -1203,6 +1604,125 @@ export interface ChangeUserEmailInput {
1203
1604
  export interface ChangeUserEmailOutput {
1204
1605
  sfnArn: string;
1205
1606
  }
1607
+ /**
1608
+ * @public
1609
+ */
1610
+ export interface ConfirmIdentityChallengeInput {
1611
+ /**
1612
+ * The unique identifier of the account.
1613
+ * @public
1614
+ */
1615
+ accountId: string;
1616
+ /**
1617
+ * The challenge returned by `StartIdentityChallenge`.
1618
+ * @public
1619
+ */
1620
+ challengeId: string;
1621
+ /**
1622
+ * The code of the current step, as the user entered it.
1623
+ * @public
1624
+ */
1625
+ code: string;
1626
+ }
1627
+ /**
1628
+ * A company workspace the account loses access to when the address is removed: the removed address is its last link to that PBX user.
1629
+ * @public
1630
+ */
1631
+ export interface IdentityRemovalLostWorkspace {
1632
+ /**
1633
+ * The workspace that becomes inactive after the removal.
1634
+ * @public
1635
+ */
1636
+ workspaceId: string;
1637
+ /**
1638
+ * The name of the company of the workspace, for the warning text.
1639
+ * @public
1640
+ */
1641
+ companyName: string;
1642
+ }
1643
+ /**
1644
+ * What removing the address will do, for the removal dialog. Computed when the challenge starts.
1645
+ * @public
1646
+ */
1647
+ export interface IdentityRemovalDryRun {
1648
+ /**
1649
+ * True when the session that makes the request signed in with the address being removed: the removal signs it out, and the app should sign out right after `ApplyIdentityRemoval`.
1650
+ * @public
1651
+ */
1652
+ endsThisSession: boolean;
1653
+ /**
1654
+ * Company workspaces for which the address is the last link of the account; empty when there are none.
1655
+ * @public
1656
+ */
1657
+ lostWorkspaces: IdentityRemovalLostWorkspace[];
1658
+ /**
1659
+ * True when devices are signed in with the address being removed; they will be signed out.
1660
+ * @public
1661
+ */
1662
+ signsOutDevices: boolean;
1663
+ }
1664
+ /**
1665
+ * A sign-in method (identity) of the account.
1666
+ * @public
1667
+ */
1668
+ export interface Identity {
1669
+ /**
1670
+ * The identity value: an email in lower case or a phone number in E.164.
1671
+ * @public
1672
+ */
1673
+ identity: string;
1674
+ /**
1675
+ * The unique identifier of the account.
1676
+ * @public
1677
+ */
1678
+ account: string;
1679
+ /**
1680
+ * The kind of the sign-in method.
1681
+ * @public
1682
+ */
1683
+ type: IdentityType;
1684
+ /**
1685
+ * True when the address has been confirmed with a code and can be used to sign in. False for an address being added (pending): it cannot sign in, gets nothing but its own verification code and is not reserved, so it disappears when another account verifies it first.
1686
+ * @public
1687
+ */
1688
+ verified: boolean;
1689
+ /**
1690
+ * True for the primary sign-in method of the account, the one confirmation codes go to. Exactly one identity of the account is primary, and it is always verified.
1691
+ * @public
1692
+ */
1693
+ primary: boolean;
1694
+ }
1695
+ /**
1696
+ * The state of an identity challenge, returned by `StartIdentityChallenge` and `ConfirmIdentityChallenge`.
1697
+ * @public
1698
+ */
1699
+ export interface ConfirmIdentityChallengeOutput {
1700
+ /**
1701
+ * The identifier to pass to `ConfirmIdentityChallenge`, `ResendIdentityChallengeCode` and `ApplyIdentityRemoval`.
1702
+ * @public
1703
+ */
1704
+ challengeId: string;
1705
+ /**
1706
+ * Where the challenge stands after this call.
1707
+ * @public
1708
+ */
1709
+ step: IdentityChallengeStep;
1710
+ /**
1711
+ * Seconds until `ResendIdentityChallengeCode` may send the code of this step again. Present when this call sent a code (`step` is `primaryCode` or `targetCode`).
1712
+ * @public
1713
+ */
1714
+ resendAfter?: number | undefined;
1715
+ /**
1716
+ * What the removal will do. Present on every response of a `remove` challenge.
1717
+ * @public
1718
+ */
1719
+ dryRun?: IdentityRemovalDryRun | undefined;
1720
+ /**
1721
+ * The identity as it is now. Present when `step` is `done`.
1722
+ * @public
1723
+ */
1724
+ identity?: Identity | undefined;
1725
+ }
1206
1726
  /**
1207
1727
  * @public
1208
1728
  */
@@ -1495,24 +2015,20 @@ export interface GetUserPbxLinkSuggestionV1Output {
1495
2015
  suggestion?: UserPbxLinkSuggestion | undefined;
1496
2016
  }
1497
2017
  /**
2018
+ * The address an identity challenge is about.
1498
2019
  * @public
1499
2020
  */
1500
- export interface Identity {
2021
+ export interface IdentityTarget {
1501
2022
  /**
1502
- * The identity value (email address or phone number in E.164)
1503
- * @public
1504
- */
1505
- identity: string;
1506
- /**
1507
- * The unique identifier of the account.
2023
+ * The kind of the address.
1508
2024
  * @public
1509
2025
  */
1510
- account: string;
2026
+ type: IdentityType;
1511
2027
  /**
1512
- * Indicates if the identity is verified.
2028
+ * The address. The service normalizes it before any check: an email is lower-cased; a phone number is brought to E.164 and must be in a country SMS sign-in allows. For `verify`, `makePrimary` and `remove` it must match the `identity` of an identity of the account as `ListIdentities` returns it.
1513
2029
  * @public
1514
2030
  */
1515
- verified?: boolean | undefined;
2031
+ value: string;
1516
2032
  }
1517
2033
  /**
1518
2034
  * @public
@@ -1569,27 +2085,37 @@ export interface InviteOutput {
1569
2085
  /**
1570
2086
  * @public
1571
2087
  */
1572
- export interface LinkIdentityInput {
2088
+ export interface ListAccountEmailChangesInput {
1573
2089
  /**
1574
- * The unique identifier of the account.
2090
+ * The emails to look for, 1 to 20: an execution matches when its old or its new email is one of them. A phone identity is looked up by its sign-in address `<E.164 without +>@phone.wildix.com`.
1575
2091
  * @public
1576
2092
  */
1577
- accountId: string;
2093
+ emails: string[];
1578
2094
  /**
1579
- * The identity value: email address or phone number in E.164.
2095
+ * Maximum number of executions in the page, from 1 to 50. Defaults to 20.
1580
2096
  * @public
1581
2097
  */
1582
- identity: string;
2098
+ limit?: number | undefined;
2099
+ /**
2100
+ * Opaque token from the previous page's `nextToken`. Valid only with the same `emails`.
2101
+ * @public
2102
+ */
2103
+ nextToken?: string | undefined;
1583
2104
  }
1584
2105
  /**
1585
2106
  * @public
1586
2107
  */
1587
- export interface LinkIdentityOutput {
2108
+ export interface ListAccountEmailChangesOutput {
2109
+ /**
2110
+ * The matching executions of this page, newest first by `startedAt`.
2111
+ * @public
2112
+ */
2113
+ executions: AccountEmailChange[];
1588
2114
  /**
1589
- * The identity in pending state. OTP has been sent; call VerifyIdentity to complete.
2115
+ * Token for the next page. Absent when there are no more executions to examine.
1590
2116
  * @public
1591
2117
  */
1592
- identity: Identity;
2118
+ nextToken?: string | undefined;
1593
2119
  }
1594
2120
  /**
1595
2121
  * @public
@@ -1630,6 +2156,10 @@ export interface ListIdentitiesInput {
1630
2156
  * @public
1631
2157
  */
1632
2158
  export interface ListIdentitiesOutput {
2159
+ /**
2160
+ * The verified and pending sign-in methods of the account.
2161
+ * @public
2162
+ */
1633
2163
  identities: Identity[];
1634
2164
  }
1635
2165
  /**
@@ -1768,7 +2298,7 @@ export interface QueryColleaguesInput {
1768
2298
  company?: string | undefined;
1769
2299
  query?: QueryColleaguesParameters | undefined;
1770
2300
  /**
1771
- * If enabled, the system will automatically invite users for colleagues returned from the PBX if they haven't logged in yet.
2301
+ * If enabled, the system will automatically invite users for colleagues returned from the PBX if they haven't logged in yet. A colleague without an email is the user of the phone-user address (`\{digits\}@phone.wildix.com`) of their mobile, which must be in E.164; a colleague with neither gets no user.
1772
2302
  * @public
1773
2303
  */
1774
2304
  invite?: boolean | undefined;
@@ -1827,7 +2357,7 @@ export declare namespace UserQuery {
1827
2357
  $unknown?: never;
1828
2358
  }
1829
2359
  /**
1830
- * The email address of the user.
2360
+ * The email address of the user. A phone-user address (`\{digits\}@phone.wildix.com`) finds the user who signs in via SMS with that number.
1831
2361
  * @public
1832
2362
  */
1833
2363
  interface EmailMember {
@@ -1837,7 +2367,7 @@ export declare namespace UserQuery {
1837
2367
  $unknown?: never;
1838
2368
  }
1839
2369
  /**
1840
- * The phone number of the user.
2370
+ * The phone number of an SMS/WhatsApp contact: an external customer reached in SMS, WhatsApp or Messenger channels, who never signs in. It never finds the user who signs in via SMS with that number; query that user by the phone-user address in `email`.
1841
2371
  * @public
1842
2372
  */
1843
2373
  interface PhoneMember {
@@ -1910,6 +2440,36 @@ export interface QueryUsersOutput {
1910
2440
  */
1911
2441
  users: User[];
1912
2442
  }
2443
+ /**
2444
+ * @public
2445
+ */
2446
+ export interface ResendIdentityChallengeCodeInput {
2447
+ /**
2448
+ * The unique identifier of the account.
2449
+ * @public
2450
+ */
2451
+ accountId: string;
2452
+ /**
2453
+ * The challenge returned by `StartIdentityChallenge`.
2454
+ * @public
2455
+ */
2456
+ challengeId: string;
2457
+ }
2458
+ /**
2459
+ * @public
2460
+ */
2461
+ export interface ResendIdentityChallengeCodeOutput {
2462
+ /**
2463
+ * The step the new code is for: `primaryCode` or `targetCode`.
2464
+ * @public
2465
+ */
2466
+ step: IdentityChallengeStep;
2467
+ /**
2468
+ * Seconds until the code may be sent again.
2469
+ * @public
2470
+ */
2471
+ resendAfter: number;
2472
+ }
1913
2473
  /**
1914
2474
  * @public
1915
2475
  */
@@ -1958,26 +2518,86 @@ export interface ResetUserChatHistoryOutput {
1958
2518
  /**
1959
2519
  * @public
1960
2520
  */
1961
- export interface ToggleTranscriptionEmailNotificationsSubscriptionInput {
1962
- unsubscribeToken: string;
2521
+ export interface StartIdentityChallengeInput {
1963
2522
  /**
1964
- * A flag that indicates whether the system should send email notifications about AI transcription.
2523
+ * The unique identifier of the account.
1965
2524
  * @public
1966
2525
  */
1967
- subscribe: boolean;
2526
+ accountId: string;
2527
+ /**
2528
+ * The change to make.
2529
+ * @public
2530
+ */
2531
+ operation: IdentityChallengeOperation;
2532
+ /**
2533
+ * The address the change is about.
2534
+ * @public
2535
+ */
2536
+ target: IdentityTarget;
2537
+ /**
2538
+ * Cloudflare Turnstile token, as in SMS sign-in. Required when a code goes to a phone target: `add` of a phone number and `verify` of a pending phone number. A missing token or one Cloudflare rejects gives `ValidationException`; Turnstile unreachable or timing out gives `ServiceUnavailableException`.
2539
+ * @public
2540
+ */
2541
+ captchaToken?: string | undefined;
2542
+ /**
2543
+ * The user agreed to receive one-time codes by SMS from Wildix, Inc. Required (true) for a US or Canadian number in `add` and `verify`; a missing consent gives `ValidationException`.
2544
+ * @public
2545
+ */
2546
+ smsConsent?: boolean | undefined;
2547
+ /**
2548
+ * The user accepted the Terms of Service and the Privacy Policy. Required (true) for a US or Canadian number in `add` and `verify`; a missing consent gives `ValidationException`.
2549
+ * @public
2550
+ */
2551
+ termsAccepted?: boolean | undefined;
2552
+ /**
2553
+ * The app's current locale, used for the letters and SMS with codes of this challenge. English when absent or not supported.
2554
+ * @public
2555
+ */
2556
+ language?: string | undefined;
2557
+ /**
2558
+ * The app the user is in. Picks the brand of the code SMS and email. When absent (S2S callers), x-bees.
2559
+ * @public
2560
+ */
2561
+ appType?: AppType | undefined;
1968
2562
  }
1969
2563
  /**
2564
+ * The state of an identity challenge, returned by `StartIdentityChallenge` and `ConfirmIdentityChallenge`.
1970
2565
  * @public
1971
2566
  */
1972
- export interface ToggleTranscriptionEmailNotificationsSubscriptionOutput {
2567
+ export interface StartIdentityChallengeOutput {
2568
+ /**
2569
+ * The identifier to pass to `ConfirmIdentityChallenge`, `ResendIdentityChallengeCode` and `ApplyIdentityRemoval`.
2570
+ * @public
2571
+ */
2572
+ challengeId: string;
2573
+ /**
2574
+ * Where the challenge stands after this call.
2575
+ * @public
2576
+ */
2577
+ step: IdentityChallengeStep;
2578
+ /**
2579
+ * Seconds until `ResendIdentityChallengeCode` may send the code of this step again. Present when this call sent a code (`step` is `primaryCode` or `targetCode`).
2580
+ * @public
2581
+ */
2582
+ resendAfter?: number | undefined;
2583
+ /**
2584
+ * What the removal will do. Present on every response of a `remove` challenge.
2585
+ * @public
2586
+ */
2587
+ dryRun?: IdentityRemovalDryRun | undefined;
2588
+ /**
2589
+ * The identity as it is now. Present when `step` is `done`.
2590
+ * @public
2591
+ */
2592
+ identity?: Identity | undefined;
1973
2593
  }
1974
2594
  /**
1975
2595
  * @public
1976
2596
  */
1977
- export interface ToggleUnreadEmailNotificationsSubscriptionInput {
2597
+ export interface ToggleTranscriptionEmailNotificationsSubscriptionInput {
1978
2598
  unsubscribeToken: string;
1979
2599
  /**
1980
- * A flag that indicates whether the system should send email notifications about unread messages.
2600
+ * A flag that indicates whether the system should send email notifications about AI transcription.
1981
2601
  * @public
1982
2602
  */
1983
2603
  subscribe: boolean;
@@ -1985,27 +2605,23 @@ export interface ToggleUnreadEmailNotificationsSubscriptionInput {
1985
2605
  /**
1986
2606
  * @public
1987
2607
  */
1988
- export interface ToggleUnreadEmailNotificationsSubscriptionOutput {
2608
+ export interface ToggleTranscriptionEmailNotificationsSubscriptionOutput {
1989
2609
  }
1990
2610
  /**
1991
2611
  * @public
1992
2612
  */
1993
- export interface UnlinkIdentityInput {
1994
- /**
1995
- * The unique identifier of the account.
1996
- * @public
1997
- */
1998
- accountId: string;
2613
+ export interface ToggleUnreadEmailNotificationsSubscriptionInput {
2614
+ unsubscribeToken: string;
1999
2615
  /**
2000
- * The identity value (email or phone) to remove.
2616
+ * A flag that indicates whether the system should send email notifications about unread messages.
2001
2617
  * @public
2002
2618
  */
2003
- identity: string;
2619
+ subscribe: boolean;
2004
2620
  }
2005
2621
  /**
2006
2622
  * @public
2007
2623
  */
2008
- export interface UnlinkIdentityOutput {
2624
+ export interface ToggleUnreadEmailNotificationsSubscriptionOutput {
2009
2625
  }
2010
2626
  /**
2011
2627
  * @public
@@ -2042,7 +2658,7 @@ export interface UpdateAccountInput {
2042
2658
  */
2043
2659
  defaultWorkspace?: string | undefined;
2044
2660
  /**
2045
- * The identity value (email or phone) to set as primary.
2661
+ * The verified identity of the account (email or phone) to set as primary. Accepted only from s2s (service-to-service) callers, such as the support tool that recovers a lost primary; a request with an x-bees token that sets it gets `ForbiddenException`. Users change the primary with a `makePrimary` identity challenge.
2046
2662
  * @public
2047
2663
  */
2048
2664
  primaryIdentity?: string | undefined;
@@ -2244,29 +2860,3 @@ export interface VerifyBotSecretKeyV1Output {
2244
2860
  id: string;
2245
2861
  name?: string | undefined;
2246
2862
  }
2247
- /**
2248
- * @public
2249
- */
2250
- export interface VerifyIdentityInput {
2251
- /**
2252
- * The unique identifier of the account.
2253
- * @public
2254
- */
2255
- accountId: string;
2256
- /**
2257
- * The identity value that was added (email or phone).
2258
- * @public
2259
- */
2260
- identity: string;
2261
- /**
2262
- * OTP sent to the new identity to prove ownership.
2263
- * @public
2264
- */
2265
- otp: string;
2266
- }
2267
- /**
2268
- * @public
2269
- */
2270
- export interface VerifyIdentityOutput {
2271
- identity: Identity;
2272
- }