@inkbox/sdk 0.3.1 → 0.4.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/README.md +30 -25
- package/dist/agent_identity.d.ts +28 -31
- package/dist/agent_identity.d.ts.map +1 -1
- package/dist/agent_identity.js +34 -58
- package/dist/agent_identity.js.map +1 -1
- package/dist/api_keys/resources/apiKeys.d.ts +39 -0
- package/dist/api_keys/resources/apiKeys.d.ts.map +1 -0
- package/dist/api_keys/resources/apiKeys.js +38 -0
- package/dist/api_keys/resources/apiKeys.js.map +1 -0
- package/dist/api_keys/types.d.ts +68 -0
- package/dist/api_keys/types.d.ts.map +1 -0
- package/dist/api_keys/types.js +30 -0
- package/dist/api_keys/types.js.map +1 -0
- package/dist/identities/exceptions.d.ts +35 -0
- package/dist/identities/exceptions.d.ts.map +1 -0
- package/dist/identities/exceptions.js +49 -0
- package/dist/identities/exceptions.js.map +1 -0
- package/dist/identities/resources/identities.d.ts +36 -25
- package/dist/identities/resources/identities.d.ts.map +1 -1
- package/dist/identities/resources/identities.js +61 -31
- package/dist/identities/resources/identities.js.map +1 -1
- package/dist/identities/types.d.ts +38 -12
- package/dist/identities/types.d.ts.map +1 -1
- package/dist/identities/types.js +13 -3
- package/dist/identities/types.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/inkbox.d.ts +22 -9
- package/dist/inkbox.d.ts.map +1 -1
- package/dist/inkbox.js +38 -27
- package/dist/inkbox.js.map +1 -1
- package/dist/mail/resources/mailboxes.d.ts +4 -28
- package/dist/mail/resources/mailboxes.d.ts.map +1 -1
- package/dist/mail/resources/mailboxes.js +4 -37
- package/dist/mail/resources/mailboxes.js.map +1 -1
- package/dist/mail/types.d.ts +4 -7
- package/dist/mail/types.d.ts.map +1 -1
- package/dist/mail/types.js +0 -1
- package/dist/mail/types.js.map +1 -1
- package/dist/phone/types.d.ts +6 -0
- package/dist/phone/types.d.ts.map +1 -1
- package/dist/phone/types.js +1 -0
- package/dist/phone/types.js.map +1 -1
- package/dist/tunnels/_reserved_names.d.ts +22 -0
- package/dist/tunnels/_reserved_names.d.ts.map +1 -0
- package/dist/tunnels/_reserved_names.js +149 -0
- package/dist/tunnels/_reserved_names.js.map +1 -0
- package/dist/tunnels/_validation.d.ts +16 -1
- package/dist/tunnels/_validation.d.ts.map +1 -1
- package/dist/tunnels/_validation.js +33 -8
- package/dist/tunnels/_validation.js.map +1 -1
- package/dist/tunnels/client/_protocol.d.ts +1 -1
- package/dist/tunnels/client/_protocol.js +1 -1
- package/dist/tunnels/client/_protocol.js.map +1 -1
- package/dist/tunnels/client/_runtime.d.ts +3 -2
- package/dist/tunnels/client/_runtime.d.ts.map +1 -1
- package/dist/tunnels/client/_runtime.js +7 -7
- package/dist/tunnels/client/_runtime.js.map +1 -1
- package/dist/tunnels/client/_state.d.ts +0 -13
- package/dist/tunnels/client/_state.d.ts.map +1 -1
- package/dist/tunnels/client/_state.js +0 -27
- package/dist/tunnels/client/_state.js.map +1 -1
- package/dist/tunnels/client/index.d.ts +13 -13
- package/dist/tunnels/client/index.d.ts.map +1 -1
- package/dist/tunnels/client/index.js +20 -65
- package/dist/tunnels/client/index.js.map +1 -1
- package/dist/tunnels/exceptions.d.ts +8 -6
- package/dist/tunnels/exceptions.d.ts.map +1 -1
- package/dist/tunnels/exceptions.js +12 -26
- package/dist/tunnels/exceptions.js.map +1 -1
- package/dist/tunnels/resources/tunnels.d.ts +9 -38
- package/dist/tunnels/resources/tunnels.d.ts.map +1 -1
- package/dist/tunnels/resources/tunnels.js +10 -92
- package/dist/tunnels/resources/tunnels.js.map +1 -1
- package/dist/tunnels/types.d.ts +17 -33
- package/dist/tunnels/types.d.ts.map +1 -1
- package/dist/tunnels/types.js +13 -23
- package/dist/tunnels/types.js.map +1 -1
- package/package.json +1 -1
- package/protocol/tunnel_protocol_constants.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox-identities/exceptions.ts
|
|
3
|
+
*
|
|
4
|
+
* Typed exceptions for the identities surface.
|
|
5
|
+
*/
|
|
6
|
+
import { InkboxAPIError, type InkboxAPIErrorDetail } from "../_http.js";
|
|
7
|
+
/** Which namespace blocked the handle on a 409 from create / rename. */
|
|
8
|
+
export type BlockingNamespace = "identities" | "tunnels" | "mail" | null;
|
|
9
|
+
/**
|
|
10
|
+
* Raised by `identities.create()` / `identities.update()` (and the
|
|
11
|
+
* `inkbox.createIdentity` / `identity.update` wrappers) when the
|
|
12
|
+
* requested agent_handle collides with the global handle namespace.
|
|
13
|
+
*
|
|
14
|
+
* The unified namespace check runs across identities, tunnels, and the
|
|
15
|
+
* platform-mailbox local part; `blockingNamespace` reports which side
|
|
16
|
+
* rejected so callers can render an appropriate message.
|
|
17
|
+
*/
|
|
18
|
+
export declare class HandleUnavailableError extends InkboxAPIError {
|
|
19
|
+
readonly blockingNamespace: BlockingNamespace;
|
|
20
|
+
constructor(statusCode: number, detail: InkboxAPIErrorDetail, blockingNamespace: BlockingNamespace);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Inspect a 409 error detail for a `blocking_namespace` field. Returns
|
|
24
|
+
* the parsed value when present, else `null`. (Servers running 1.0+ set
|
|
25
|
+
* this on every `agent_handle_unavailable` 409 from identity-create or
|
|
26
|
+
* identity-rename.)
|
|
27
|
+
*/
|
|
28
|
+
export declare function readBlockingNamespace(detail: InkboxAPIErrorDetail): BlockingNamespace;
|
|
29
|
+
/**
|
|
30
|
+
* If `err` is a 409 collision error from the identities endpoints,
|
|
31
|
+
* return a `HandleUnavailableError`; otherwise return the original
|
|
32
|
+
* error untouched so it propagates as-is.
|
|
33
|
+
*/
|
|
34
|
+
export declare function mapIdentityConflictError(err: InkboxAPIError): Error;
|
|
35
|
+
//# sourceMappingURL=exceptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptions.d.ts","sourceRoot":"","sources":["../../src/identities/exceptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExE,wEAAwE;AACxE,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;AAEzE;;;;;;;;GAQG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;IACxD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;gBAG5C,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,oBAAoB,EAC5B,iBAAiB,EAAE,iBAAiB;CAMvC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,oBAAoB,GAAG,iBAAiB,CAMrF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,cAAc,GAAG,KAAK,CASnE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox-identities/exceptions.ts
|
|
3
|
+
*
|
|
4
|
+
* Typed exceptions for the identities surface.
|
|
5
|
+
*/
|
|
6
|
+
import { InkboxAPIError } from "../_http.js";
|
|
7
|
+
/**
|
|
8
|
+
* Raised by `identities.create()` / `identities.update()` (and the
|
|
9
|
+
* `inkbox.createIdentity` / `identity.update` wrappers) when the
|
|
10
|
+
* requested agent_handle collides with the global handle namespace.
|
|
11
|
+
*
|
|
12
|
+
* The unified namespace check runs across identities, tunnels, and the
|
|
13
|
+
* platform-mailbox local part; `blockingNamespace` reports which side
|
|
14
|
+
* rejected so callers can render an appropriate message.
|
|
15
|
+
*/
|
|
16
|
+
export class HandleUnavailableError extends InkboxAPIError {
|
|
17
|
+
blockingNamespace;
|
|
18
|
+
constructor(statusCode, detail, blockingNamespace) {
|
|
19
|
+
super(statusCode, detail);
|
|
20
|
+
this.name = "HandleUnavailableError";
|
|
21
|
+
this.blockingNamespace = blockingNamespace;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Inspect a 409 error detail for a `blocking_namespace` field. Returns
|
|
26
|
+
* the parsed value when present, else `null`. (Servers running 1.0+ set
|
|
27
|
+
* this on every `agent_handle_unavailable` 409 from identity-create or
|
|
28
|
+
* identity-rename.)
|
|
29
|
+
*/
|
|
30
|
+
export function readBlockingNamespace(detail) {
|
|
31
|
+
if (detail && typeof detail === "object" && !Array.isArray(detail)) {
|
|
32
|
+
const v = detail["blocking_namespace"];
|
|
33
|
+
if (v === "identities" || v === "tunnels" || v === "mail")
|
|
34
|
+
return v;
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* If `err` is a 409 collision error from the identities endpoints,
|
|
40
|
+
* return a `HandleUnavailableError`; otherwise return the original
|
|
41
|
+
* error untouched so it propagates as-is.
|
|
42
|
+
*/
|
|
43
|
+
export function mapIdentityConflictError(err) {
|
|
44
|
+
if (err.statusCode === 409) {
|
|
45
|
+
return new HandleUnavailableError(err.statusCode, err.detail, readBlockingNamespace(err.detail));
|
|
46
|
+
}
|
|
47
|
+
return err;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=exceptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../src/identities/exceptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAA6B,MAAM,aAAa,CAAC;AAKxE;;;;;;;;GAQG;AACH,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IAC/C,iBAAiB,CAAoB;IAE9C,YACE,UAAkB,EAClB,MAA4B,EAC5B,iBAAoC;QAEpC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAA4B;IAChE,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnE,MAAM,CAAC,GAAI,MAAkC,CAAC,oBAAoB,CAAC,CAAC;QACpE,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,MAAM;YAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,GAAmB;IAC1D,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;QAC3B,OAAO,IAAI,sBAAsB,CAC/B,GAAG,CAAC,UAAU,EACd,GAAG,CAAC,MAAM,EACV,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,70 +1,81 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* inkbox-identities/resources/identities.ts
|
|
3
3
|
*
|
|
4
|
-
* Identity
|
|
4
|
+
* Identity create / list / get / update / delete, plus phone-number
|
|
5
|
+
* assign / unlink. Mailbox and tunnel are provisioned atomically by
|
|
6
|
+
* `create()` and removed by `delete()` (cascade); there is no
|
|
7
|
+
* standalone mailbox or tunnel create / link surface.
|
|
5
8
|
*/
|
|
6
9
|
import { HttpTransport } from "../../_http.js";
|
|
7
|
-
import { AgentIdentitySummary, IdentityMailboxCreateOptions, IdentityPhoneNumberCreateOptions, _AgentIdentityData } from "../types.js";
|
|
10
|
+
import { AgentIdentitySummary, IdentityMailboxCreateOptions, IdentityPhoneNumberCreateOptions, IdentityTunnelCreateOptions, _AgentIdentityData } from "../types.js";
|
|
8
11
|
export declare class IdentitiesResource {
|
|
9
12
|
private readonly http;
|
|
10
13
|
constructor(http: HttpTransport);
|
|
11
14
|
/**
|
|
12
|
-
* Create a new agent identity.
|
|
15
|
+
* Create a new agent identity. Atomically provisions the identity's
|
|
16
|
+
* mailbox and tunnel; both are returned nested on the response.
|
|
13
17
|
*
|
|
14
|
-
* @param options.agentHandle - Unique handle for this identity
|
|
15
|
-
* (
|
|
16
|
-
*
|
|
18
|
+
* @param options.agentHandle - Unique handle for this identity, globally
|
|
19
|
+
* unique across all orgs (the handle shares its namespace with tunnel
|
|
20
|
+
* names). May be passed with or without a leading `@`.
|
|
21
|
+
* @param options.displayName - Human-readable identity name. Defaults
|
|
22
|
+
* server-side to `agentHandle`.
|
|
23
|
+
* @param options.description - Free-form org-internal description.
|
|
24
|
+
* `null` leaves the column null; omit to defer to server default.
|
|
25
|
+
* @param options.mailbox - Optional nested mailbox spec. Mailbox is
|
|
26
|
+
* always provisioned; this just lets the caller customize.
|
|
27
|
+
* @param options.tunnel - Optional nested tunnel spec (tlsMode only).
|
|
28
|
+
* Tunnel is always provisioned; defaults to edge TLS.
|
|
17
29
|
* @param options.phoneNumber - Optional phone-number provisioning payload.
|
|
18
30
|
* @param options.vaultSecretIds - Optional vault secret selection to attach to the identity.
|
|
19
31
|
*/
|
|
20
32
|
create(options: {
|
|
21
33
|
agentHandle: string;
|
|
34
|
+
displayName?: string;
|
|
35
|
+
description?: string | null;
|
|
22
36
|
mailbox?: IdentityMailboxCreateOptions;
|
|
37
|
+
tunnel?: IdentityTunnelCreateOptions;
|
|
23
38
|
phoneNumber?: IdentityPhoneNumberCreateOptions;
|
|
24
39
|
vaultSecretIds?: string | string[] | "*" | "all";
|
|
25
|
-
}): Promise<
|
|
40
|
+
}): Promise<_AgentIdentityData>;
|
|
26
41
|
/** List all identities for your organisation. */
|
|
27
42
|
list(): Promise<AgentIdentitySummary[]>;
|
|
28
43
|
/**
|
|
29
|
-
* Get an identity with its linked channels (mailbox, phone number).
|
|
44
|
+
* Get an identity with its linked channels (mailbox, phone number, tunnel).
|
|
30
45
|
*
|
|
31
46
|
* @param agentHandle - Handle of the identity to fetch.
|
|
32
47
|
*/
|
|
33
48
|
get(agentHandle: string): Promise<_AgentIdentityData>;
|
|
34
49
|
/**
|
|
35
|
-
* Update an identity's handle.
|
|
50
|
+
* Update an identity's handle, display name, description, and/or status.
|
|
36
51
|
*
|
|
37
52
|
* Only provided fields are applied; omitted fields are left unchanged.
|
|
53
|
+
* For `displayName` and `description`, explicit `null` clears the value
|
|
54
|
+
* (sets the row column to NULL); omitting the key leaves it untouched.
|
|
38
55
|
*
|
|
39
56
|
* @param agentHandle - Current handle of the identity to update.
|
|
40
57
|
* @param options.newHandle - New handle value.
|
|
58
|
+
* @param options.displayName - New display name, or `null` to clear.
|
|
59
|
+
* @param options.description - New description, or `null` to clear.
|
|
60
|
+
* @param options.status - `"active"` or `"paused"`. Call `delete()` to
|
|
61
|
+
* remove an identity; `"deleted"` is rejected here.
|
|
41
62
|
*/
|
|
42
63
|
update(agentHandle: string, options: {
|
|
43
64
|
newHandle?: string;
|
|
65
|
+
displayName?: string | null;
|
|
66
|
+
description?: string | null;
|
|
67
|
+
status?: "active" | "paused";
|
|
44
68
|
}): Promise<AgentIdentitySummary>;
|
|
45
69
|
/**
|
|
46
70
|
* Delete an identity.
|
|
47
71
|
*
|
|
48
|
-
*
|
|
72
|
+
* Cascades: flips the linked mailbox to `deleted`, force-finalizes the
|
|
73
|
+
* linked tunnel to `deleted`, revokes any identity-scoped API keys, and
|
|
74
|
+
* unassigns (but does not delete) any linked phone number.
|
|
49
75
|
*
|
|
50
76
|
* @param agentHandle - Handle of the identity to delete.
|
|
51
77
|
*/
|
|
52
78
|
delete(agentHandle: string): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Assign a mailbox to an identity.
|
|
55
|
-
*
|
|
56
|
-
* @param agentHandle - Handle of the identity.
|
|
57
|
-
* @param options.mailboxId - UUID of the mailbox to assign.
|
|
58
|
-
*/
|
|
59
|
-
assignMailbox(agentHandle: string, options: {
|
|
60
|
-
mailboxId: string;
|
|
61
|
-
}): Promise<_AgentIdentityData>;
|
|
62
|
-
/**
|
|
63
|
-
* Unlink the mailbox from an identity (does not delete the mailbox).
|
|
64
|
-
*
|
|
65
|
-
* @param agentHandle - Handle of the identity.
|
|
66
|
-
*/
|
|
67
|
-
unlinkMailbox(agentHandle: string): Promise<void>;
|
|
68
79
|
/**
|
|
69
80
|
* Assign a phone number to an identity.
|
|
70
81
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.d.ts","sourceRoot":"","sources":["../../../src/identities/resources/identities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"identities.d.ts","sourceRoot":"","sources":["../../../src/identities/resources/identities.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,gCAAgC,EAChC,2BAA2B,EAC3B,kBAAkB,EASnB,MAAM,aAAa,CAAC;AAErB,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,aAAa;IAEhD;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CAAC,OAAO,EAAE;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,OAAO,CAAC,EAAE,4BAA4B,CAAC;QACvC,MAAM,CAAC,EAAE,2BAA2B,CAAC;QACrC,WAAW,CAAC,EAAE,gCAAgC,CAAC;QAC/C,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC;KAClD,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAiB/B,iDAAiD;IAC3C,IAAI,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAK7C;;;;OAIG;IACG,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAK3D;;;;;;;;;;;;;OAaG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;KAC9B,GACA,OAAO,CAAC,oBAAoB,CAAC;IAehC;;;;;;;;OAQG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD;;;;;OAKG;IACG,iBAAiB,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,GACjC,OAAO,CAAC,kBAAkB,CAAC;IAQ9B;;;;OAIG;IACG,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5D"}
|
|
@@ -1,33 +1,60 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* inkbox-identities/resources/identities.ts
|
|
3
3
|
*
|
|
4
|
-
* Identity
|
|
4
|
+
* Identity create / list / get / update / delete, plus phone-number
|
|
5
|
+
* assign / unlink. Mailbox and tunnel are provisioned atomically by
|
|
6
|
+
* `create()` and removed by `delete()` (cascade); there is no
|
|
7
|
+
* standalone mailbox or tunnel create / link surface.
|
|
5
8
|
*/
|
|
6
|
-
import {
|
|
9
|
+
import { InkboxAPIError } from "../../_http.js";
|
|
10
|
+
import { mapIdentityConflictError } from "../exceptions.js";
|
|
11
|
+
import { identityMailboxCreateOptionsToWire, identityPhoneNumberCreateOptionsToWire, identityTunnelCreateOptionsToWire, parseAgentIdentitySummary, parseAgentIdentityData, vaultSecretIdsToWire, } from "../types.js";
|
|
7
12
|
export class IdentitiesResource {
|
|
8
13
|
http;
|
|
9
14
|
constructor(http) {
|
|
10
15
|
this.http = http;
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
|
-
* Create a new agent identity.
|
|
18
|
+
* Create a new agent identity. Atomically provisions the identity's
|
|
19
|
+
* mailbox and tunnel; both are returned nested on the response.
|
|
14
20
|
*
|
|
15
|
-
* @param options.agentHandle - Unique handle for this identity
|
|
16
|
-
* (
|
|
17
|
-
*
|
|
21
|
+
* @param options.agentHandle - Unique handle for this identity, globally
|
|
22
|
+
* unique across all orgs (the handle shares its namespace with tunnel
|
|
23
|
+
* names). May be passed with or without a leading `@`.
|
|
24
|
+
* @param options.displayName - Human-readable identity name. Defaults
|
|
25
|
+
* server-side to `agentHandle`.
|
|
26
|
+
* @param options.description - Free-form org-internal description.
|
|
27
|
+
* `null` leaves the column null; omit to defer to server default.
|
|
28
|
+
* @param options.mailbox - Optional nested mailbox spec. Mailbox is
|
|
29
|
+
* always provisioned; this just lets the caller customize.
|
|
30
|
+
* @param options.tunnel - Optional nested tunnel spec (tlsMode only).
|
|
31
|
+
* Tunnel is always provisioned; defaults to edge TLS.
|
|
18
32
|
* @param options.phoneNumber - Optional phone-number provisioning payload.
|
|
19
33
|
* @param options.vaultSecretIds - Optional vault secret selection to attach to the identity.
|
|
20
34
|
*/
|
|
21
35
|
async create(options) {
|
|
22
36
|
const body = { agent_handle: options.agentHandle };
|
|
37
|
+
if (options.displayName !== undefined)
|
|
38
|
+
body["display_name"] = options.displayName;
|
|
39
|
+
if (options.description !== undefined)
|
|
40
|
+
body["description"] = options.description;
|
|
23
41
|
if (options.mailbox !== undefined)
|
|
24
42
|
body["mailbox"] = identityMailboxCreateOptionsToWire(options.mailbox);
|
|
43
|
+
if (options.tunnel !== undefined)
|
|
44
|
+
body["tunnel"] = identityTunnelCreateOptionsToWire(options.tunnel);
|
|
25
45
|
if (options.phoneNumber !== undefined)
|
|
26
46
|
body["phone_number"] = identityPhoneNumberCreateOptionsToWire(options.phoneNumber);
|
|
27
47
|
if (options.vaultSecretIds !== undefined)
|
|
28
48
|
body["vault_secret_ids"] = vaultSecretIdsToWire(options.vaultSecretIds);
|
|
29
|
-
|
|
30
|
-
|
|
49
|
+
try {
|
|
50
|
+
const data = await this.http.post("/", body);
|
|
51
|
+
return parseAgentIdentityData(data);
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
if (err instanceof InkboxAPIError)
|
|
55
|
+
throw mapIdentityConflictError(err);
|
|
56
|
+
throw err;
|
|
57
|
+
}
|
|
31
58
|
}
|
|
32
59
|
/** List all identities for your organisation. */
|
|
33
60
|
async list() {
|
|
@@ -35,7 +62,7 @@ export class IdentitiesResource {
|
|
|
35
62
|
return data.map(parseAgentIdentitySummary);
|
|
36
63
|
}
|
|
37
64
|
/**
|
|
38
|
-
* Get an identity with its linked channels (mailbox, phone number).
|
|
65
|
+
* Get an identity with its linked channels (mailbox, phone number, tunnel).
|
|
39
66
|
*
|
|
40
67
|
* @param agentHandle - Handle of the identity to fetch.
|
|
41
68
|
*/
|
|
@@ -44,48 +71,51 @@ export class IdentitiesResource {
|
|
|
44
71
|
return parseAgentIdentityData(data);
|
|
45
72
|
}
|
|
46
73
|
/**
|
|
47
|
-
* Update an identity's handle.
|
|
74
|
+
* Update an identity's handle, display name, description, and/or status.
|
|
48
75
|
*
|
|
49
76
|
* Only provided fields are applied; omitted fields are left unchanged.
|
|
77
|
+
* For `displayName` and `description`, explicit `null` clears the value
|
|
78
|
+
* (sets the row column to NULL); omitting the key leaves it untouched.
|
|
50
79
|
*
|
|
51
80
|
* @param agentHandle - Current handle of the identity to update.
|
|
52
81
|
* @param options.newHandle - New handle value.
|
|
82
|
+
* @param options.displayName - New display name, or `null` to clear.
|
|
83
|
+
* @param options.description - New description, or `null` to clear.
|
|
84
|
+
* @param options.status - `"active"` or `"paused"`. Call `delete()` to
|
|
85
|
+
* remove an identity; `"deleted"` is rejected here.
|
|
53
86
|
*/
|
|
54
87
|
async update(agentHandle, options) {
|
|
55
88
|
const body = {};
|
|
56
89
|
if (options.newHandle !== undefined)
|
|
57
90
|
body["agent_handle"] = options.newHandle;
|
|
58
|
-
|
|
59
|
-
|
|
91
|
+
if (options.displayName !== undefined)
|
|
92
|
+
body["display_name"] = options.displayName;
|
|
93
|
+
if (options.description !== undefined)
|
|
94
|
+
body["description"] = options.description;
|
|
95
|
+
if (options.status !== undefined)
|
|
96
|
+
body["status"] = options.status;
|
|
97
|
+
try {
|
|
98
|
+
const data = await this.http.patch(`/${agentHandle}`, body);
|
|
99
|
+
return parseAgentIdentitySummary(data);
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
if (err instanceof InkboxAPIError)
|
|
103
|
+
throw mapIdentityConflictError(err);
|
|
104
|
+
throw err;
|
|
105
|
+
}
|
|
60
106
|
}
|
|
61
107
|
/**
|
|
62
108
|
* Delete an identity.
|
|
63
109
|
*
|
|
64
|
-
*
|
|
110
|
+
* Cascades: flips the linked mailbox to `deleted`, force-finalizes the
|
|
111
|
+
* linked tunnel to `deleted`, revokes any identity-scoped API keys, and
|
|
112
|
+
* unassigns (but does not delete) any linked phone number.
|
|
65
113
|
*
|
|
66
114
|
* @param agentHandle - Handle of the identity to delete.
|
|
67
115
|
*/
|
|
68
116
|
async delete(agentHandle) {
|
|
69
117
|
await this.http.delete(`/${agentHandle}`);
|
|
70
118
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Assign a mailbox to an identity.
|
|
73
|
-
*
|
|
74
|
-
* @param agentHandle - Handle of the identity.
|
|
75
|
-
* @param options.mailboxId - UUID of the mailbox to assign.
|
|
76
|
-
*/
|
|
77
|
-
async assignMailbox(agentHandle, options) {
|
|
78
|
-
const data = await this.http.post(`/${agentHandle}/mailbox`, { mailbox_id: options.mailboxId });
|
|
79
|
-
return parseAgentIdentityData(data);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Unlink the mailbox from an identity (does not delete the mailbox).
|
|
83
|
-
*
|
|
84
|
-
* @param agentHandle - Handle of the identity.
|
|
85
|
-
*/
|
|
86
|
-
async unlinkMailbox(agentHandle) {
|
|
87
|
-
await this.http.delete(`/${agentHandle}/mailbox`);
|
|
88
|
-
}
|
|
89
119
|
/**
|
|
90
120
|
* Assign a phone number to an identity.
|
|
91
121
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.js","sourceRoot":"","sources":["../../../src/identities/resources/identities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"identities.js","sourceRoot":"","sources":["../../../src/identities/resources/identities.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAiB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAQL,kCAAkC,EAClC,sCAAsC,EACtC,iCAAiC,EACjC,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,kBAAkB;IACA;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,MAAM,CAAC,OAQZ;QACC,MAAM,IAAI,GAA4B,EAAE,YAAY,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;QAC5E,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QAClF,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QACjF,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,SAAS,CAAC,GAAG,kCAAkC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACzG,IAAI,OAAO,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Ae,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { FilterMode, FilterModeChangeNotice, RawFilterModeChangeNotice } from "../mail/types.js";
|
|
5
5
|
import { SmsStatus } from "../phone/types.js";
|
|
6
|
+
import type { RawTunnel, TLSMode, Tunnel } from "../tunnels/types.js";
|
|
6
7
|
export interface IdentityMailboxCreateOptions {
|
|
7
|
-
displayName?: string;
|
|
8
8
|
emailLocalPart?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Optional sending-domain selector by **bare domain name** (not an id).
|
|
@@ -22,18 +22,27 @@ export interface IdentityPhoneNumberCreateOptions {
|
|
|
22
22
|
incomingCallWebhookUrl?: string;
|
|
23
23
|
incomingTextWebhookUrl?: string;
|
|
24
24
|
}
|
|
25
|
+
export interface IdentityTunnelCreateOptions {
|
|
26
|
+
tlsMode?: TLSMode | "edge" | "passthrough";
|
|
27
|
+
}
|
|
25
28
|
export interface CreateIdentityOptions {
|
|
26
|
-
|
|
29
|
+
/** Identity-level human-readable name. Defaults server-side to `agentHandle`. */
|
|
27
30
|
displayName?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Free-form org-internal description. Pass a string to set, `null` to
|
|
33
|
+
* leave the column null. Never surfaces in outbound mail / public payloads.
|
|
34
|
+
*/
|
|
35
|
+
description?: string | null;
|
|
28
36
|
emailLocalPart?: string;
|
|
29
37
|
/**
|
|
30
38
|
* Optional sending-domain selector by **bare domain name**. Presence
|
|
31
|
-
* (including explicit `null`)
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* bind to that domain.
|
|
39
|
+
* (including explicit `null`) configures the mailbox's sending domain.
|
|
40
|
+
* Omit to inherit the org's default, `null` to force the platform default,
|
|
41
|
+
* or a verified domain name to bind to that domain.
|
|
35
42
|
*/
|
|
36
43
|
sendingDomain?: string | null;
|
|
44
|
+
/** Optional nested tunnel spec. Server defaults to edge TLS if omitted. */
|
|
45
|
+
tunnel?: IdentityTunnelCreateOptions;
|
|
37
46
|
phoneNumber?: IdentityPhoneNumberCreateOptions;
|
|
38
47
|
vaultSecretIds?: string | string[] | "*" | "all";
|
|
39
48
|
}
|
|
@@ -45,11 +54,12 @@ export interface IdentityMailbox {
|
|
|
45
54
|
* Either the platform default or a verified custom domain.
|
|
46
55
|
*/
|
|
47
56
|
sendingDomain: string;
|
|
48
|
-
|
|
57
|
+
/** HTTPS webhook URL for mail events, or `null` if not configured. */
|
|
58
|
+
webhookUrl: string | null;
|
|
49
59
|
filterMode: FilterMode;
|
|
50
60
|
/**
|
|
51
|
-
* UUID of the owning agent identity
|
|
52
|
-
*
|
|
61
|
+
* UUID of the owning agent identity. Non-null for live customer
|
|
62
|
+
* mailboxes (1:1 invariant); null only on deleted rows and system mailboxes.
|
|
53
63
|
*/
|
|
54
64
|
agentIdentityId: string | null;
|
|
55
65
|
createdAt: Date;
|
|
@@ -71,8 +81,14 @@ export interface IdentityPhoneNumber {
|
|
|
71
81
|
/** "auto_accept" | "auto_reject" | "webhook" */
|
|
72
82
|
incomingCallAction: string;
|
|
73
83
|
clientWebsocketUrl: string | null;
|
|
84
|
+
incomingCallWebhookUrl: string | null;
|
|
74
85
|
incomingTextWebhookUrl: string | null;
|
|
75
86
|
filterMode: FilterMode;
|
|
87
|
+
/**
|
|
88
|
+
* 2-letter US state abbreviation for LOCAL numbers (e.g. `"NY"`);
|
|
89
|
+
* `null` for TOLL_FREE.
|
|
90
|
+
*/
|
|
91
|
+
state: string | null;
|
|
76
92
|
/**
|
|
77
93
|
* UUID of the owning agent identity, or `null` if standalone. On the
|
|
78
94
|
* embedded variant this always equals the owning identity's ID.
|
|
@@ -82,11 +98,13 @@ export interface IdentityPhoneNumber {
|
|
|
82
98
|
updatedAt: Date;
|
|
83
99
|
filterModeChangeNotice: FilterModeChangeNotice | null;
|
|
84
100
|
}
|
|
85
|
-
/** Lightweight identity returned by list
|
|
101
|
+
/** Lightweight identity returned by list endpoints. */
|
|
86
102
|
export interface AgentIdentitySummary {
|
|
87
103
|
id: string;
|
|
88
104
|
organizationId: string;
|
|
89
105
|
agentHandle: string;
|
|
106
|
+
displayName: string | null;
|
|
107
|
+
description: string | null;
|
|
90
108
|
/** Email address assigned at creation time. Always trust this value — do not derive it from `agentHandle`. */
|
|
91
109
|
emailAddress: string | null;
|
|
92
110
|
createdAt: Date;
|
|
@@ -94,16 +112,18 @@ export interface AgentIdentitySummary {
|
|
|
94
112
|
}
|
|
95
113
|
/** @internal Full identity data with channels — users interact with AgentIdentity (the class) instead. */
|
|
96
114
|
export interface _AgentIdentityData extends AgentIdentitySummary {
|
|
97
|
-
/** Mailbox assigned to this identity
|
|
115
|
+
/** Mailbox assigned to this identity. Non-null for live identities (1:1 invariant); null only on deleted rows. */
|
|
98
116
|
mailbox: IdentityMailbox | null;
|
|
99
117
|
/** Phone number assigned to this identity, or null if unlinked. */
|
|
100
118
|
phoneNumber: IdentityPhoneNumber | null;
|
|
119
|
+
/** Tunnel assigned to this identity. Non-null for live identities (1:1 invariant); null only on deleted rows. */
|
|
120
|
+
tunnel: Tunnel | null;
|
|
101
121
|
}
|
|
102
122
|
export interface RawIdentityMailbox {
|
|
103
123
|
id: string;
|
|
104
124
|
email_address: string;
|
|
105
125
|
sending_domain?: string;
|
|
106
|
-
|
|
126
|
+
webhook_url?: string | null;
|
|
107
127
|
filter_mode?: string;
|
|
108
128
|
agent_identity_id?: string | null;
|
|
109
129
|
filter_mode_change_notice?: RawFilterModeChangeNotice | null;
|
|
@@ -121,8 +141,10 @@ export interface RawIdentityPhoneNumber {
|
|
|
121
141
|
sms_ready_at?: string | null;
|
|
122
142
|
incoming_call_action: string;
|
|
123
143
|
client_websocket_url: string | null;
|
|
144
|
+
incoming_call_webhook_url?: string | null;
|
|
124
145
|
incoming_text_webhook_url: string | null;
|
|
125
146
|
filter_mode?: string;
|
|
147
|
+
state?: string | null;
|
|
126
148
|
agent_identity_id?: string | null;
|
|
127
149
|
filter_mode_change_notice?: RawFilterModeChangeNotice | null;
|
|
128
150
|
created_at: string;
|
|
@@ -132,6 +154,8 @@ export interface RawAgentIdentitySummary {
|
|
|
132
154
|
id: string;
|
|
133
155
|
organization_id: string;
|
|
134
156
|
agent_handle: string;
|
|
157
|
+
display_name: string | null;
|
|
158
|
+
description: string | null;
|
|
135
159
|
email_address: string | null;
|
|
136
160
|
created_at: string;
|
|
137
161
|
updated_at: string;
|
|
@@ -139,12 +163,14 @@ export interface RawAgentIdentitySummary {
|
|
|
139
163
|
export interface RawAgentIdentityData extends RawAgentIdentitySummary {
|
|
140
164
|
mailbox: RawIdentityMailbox | null;
|
|
141
165
|
phone_number: RawIdentityPhoneNumber | null;
|
|
166
|
+
tunnel: RawTunnel | null;
|
|
142
167
|
}
|
|
143
168
|
export declare function parseIdentityMailbox(r: RawIdentityMailbox): IdentityMailbox;
|
|
144
169
|
export declare function parseIdentityPhoneNumber(r: RawIdentityPhoneNumber): IdentityPhoneNumber;
|
|
145
170
|
export declare function parseAgentIdentitySummary(r: RawAgentIdentitySummary): AgentIdentitySummary;
|
|
146
171
|
export declare function parseAgentIdentityData(r: RawAgentIdentityData): _AgentIdentityData;
|
|
147
172
|
export declare function identityMailboxCreateOptionsToWire(options: IdentityMailboxCreateOptions): Record<string, unknown>;
|
|
173
|
+
export declare function identityTunnelCreateOptionsToWire(options: IdentityTunnelCreateOptions): Record<string, unknown>;
|
|
148
174
|
export declare function identityPhoneNumberCreateOptionsToWire(options: IdentityPhoneNumberCreateOptions): Record<string, unknown>;
|
|
149
175
|
export declare function vaultSecretIdsToWire(value: string | string[] | "*" | "all" | undefined): string | string[] | "*" | "all" | undefined;
|
|
150
176
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/identities/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,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,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,4BAA4B,GACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKzB;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,2BAA2B,GACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIzB;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,gCAAgC,GACxC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBzB;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,SAAS,GACjD,MAAM,GAAG,MAAM,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,SAAS,CAE7C"}
|
package/dist/identities/types.js
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { FilterMode as FilterModeEnum, parseFilterModeChangeNotice, } from "../mail/types.js";
|
|
5
5
|
import { SmsStatus } from "../phone/types.js";
|
|
6
|
+
import { parseTunnel } from "../tunnels/types.js";
|
|
6
7
|
// ---- parsers ----
|
|
7
8
|
export function parseIdentityMailbox(r) {
|
|
8
9
|
return {
|
|
9
10
|
id: r.id,
|
|
10
11
|
emailAddress: r.email_address,
|
|
11
12
|
sendingDomain: r.sending_domain ?? r.email_address.split("@")[1] ?? "",
|
|
12
|
-
|
|
13
|
+
webhookUrl: r.webhook_url ?? null,
|
|
13
14
|
filterMode: r.filter_mode ?? FilterModeEnum.BLACKLIST,
|
|
14
15
|
agentIdentityId: r.agent_identity_id ?? null,
|
|
15
16
|
createdAt: new Date(r.created_at),
|
|
@@ -31,8 +32,10 @@ export function parseIdentityPhoneNumber(r) {
|
|
|
31
32
|
smsReadyAt: r.sms_ready_at ? new Date(r.sms_ready_at) : null,
|
|
32
33
|
incomingCallAction: r.incoming_call_action,
|
|
33
34
|
clientWebsocketUrl: r.client_websocket_url,
|
|
35
|
+
incomingCallWebhookUrl: r.incoming_call_webhook_url ?? null,
|
|
34
36
|
incomingTextWebhookUrl: r.incoming_text_webhook_url ?? null,
|
|
35
37
|
filterMode: r.filter_mode ?? FilterModeEnum.BLACKLIST,
|
|
38
|
+
state: r.state ?? null,
|
|
36
39
|
agentIdentityId: r.agent_identity_id ?? null,
|
|
37
40
|
createdAt: new Date(r.created_at),
|
|
38
41
|
updatedAt: new Date(r.updated_at),
|
|
@@ -46,6 +49,8 @@ export function parseAgentIdentitySummary(r) {
|
|
|
46
49
|
id: r.id,
|
|
47
50
|
organizationId: r.organization_id,
|
|
48
51
|
agentHandle: r.agent_handle,
|
|
52
|
+
displayName: r.display_name ?? null,
|
|
53
|
+
description: r.description ?? null,
|
|
49
54
|
emailAddress: r.email_address,
|
|
50
55
|
createdAt: new Date(r.created_at),
|
|
51
56
|
updatedAt: new Date(r.updated_at),
|
|
@@ -56,18 +61,23 @@ export function parseAgentIdentityData(r) {
|
|
|
56
61
|
...parseAgentIdentitySummary(r),
|
|
57
62
|
mailbox: r.mailbox ? parseIdentityMailbox(r.mailbox) : null,
|
|
58
63
|
phoneNumber: r.phone_number ? parseIdentityPhoneNumber(r.phone_number) : null,
|
|
64
|
+
tunnel: r.tunnel ? parseTunnel(r.tunnel) : null,
|
|
59
65
|
};
|
|
60
66
|
}
|
|
61
67
|
export function identityMailboxCreateOptionsToWire(options) {
|
|
62
68
|
const body = {};
|
|
63
|
-
if (options.displayName !== undefined)
|
|
64
|
-
body["display_name"] = options.displayName;
|
|
65
69
|
if (options.emailLocalPart !== undefined)
|
|
66
70
|
body["email_local_part"] = options.emailLocalPart;
|
|
67
71
|
if ("sendingDomain" in options)
|
|
68
72
|
body["sending_domain"] = options.sendingDomain;
|
|
69
73
|
return body;
|
|
70
74
|
}
|
|
75
|
+
export function identityTunnelCreateOptionsToWire(options) {
|
|
76
|
+
const body = {};
|
|
77
|
+
if (options.tlsMode !== undefined)
|
|
78
|
+
body["tls_mode"] = options.tlsMode;
|
|
79
|
+
return body;
|
|
80
|
+
}
|
|
71
81
|
export function identityPhoneNumberCreateOptionsToWire(options) {
|
|
72
82
|
if (options.type === "toll_free" && options.state !== undefined) {
|
|
73
83
|
throw new Error("state is only supported for local phone numbers");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/identities/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/identities/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAiLlD,oBAAoB;AAEpB,MAAM,UAAU,oBAAoB,CAAC,CAAqB;IACxD,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,YAAY,EAAE,CAAC,CAAC,aAAa;QAC7B,aAAa,EAAE,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;QACtE,UAAU,EAAE,CAAC,CAAC,WAAW,IAAI,IAAI;QACjC,UAAU,EAAG,CAAC,CAAC,WAA0B,IAAI,cAAc,CAAC,SAAS;QACrE,eAAe,EAAE,CAAC,CAAC,iBAAiB,IAAI,IAAI;QAC5C,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;QACjC,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;QACjC,sBAAsB,EAAE,CAAC,CAAC,yBAAyB;YACjD,CAAC,CAAC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