@sentdm/sentdm 0.34.0 → 0.36.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 +15 -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 +165 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +165 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -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 +791 -190
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +791 -190
- 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 +186 -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 +964 -241
- 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/resources/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { Contacts, type
|
|
2
|
-
export { Conversations, type
|
|
3
|
-
export { Me, type
|
|
1
|
+
export { Contacts, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactRetrieveMessageSummaryResponse, type ContactCreateParams, type ContactRetrieveParams, type ContactUpdateParams, type ContactListParams, type ContactDeleteParams, type ContactRetrieveMessageSummaryParams, } from "./contacts.js";
|
|
2
|
+
export { Conversations, type ConversationListResponse, type ConversationListMessagesResponse, type ConversationListParams, type ConversationListMessagesParams, } from "./conversations.js";
|
|
3
|
+
export { Me, type MeRetrieveResponse, type MeRetrieveParams } from "./me.js";
|
|
4
4
|
export { Messages, type MessageRetrieveActivitiesResponse, type MessageRetrieveStatusResponse, type MessageSendResponse, type MessageRetrieveActivitiesParams, type MessageRetrieveStatusParams, type MessageSendParams, } from "./messages.js";
|
|
5
5
|
export { Numbers, type NumberLookupResponse, type NumberLookupParams } from "./numbers.js";
|
|
6
|
-
export { Profiles, type
|
|
7
|
-
export { Templates, type
|
|
8
|
-
export { Users, type
|
|
9
|
-
export { Webhooks, type
|
|
6
|
+
export { Profiles, type DestinationCountry, type TcrBrandRelationship, type TcrVertical, type ProfileCreateResponse, type ProfileRetrieveResponse, type ProfileUpdateResponse, type ProfileListResponse, type ProfileCompleteResponse, type ProfileCreateParams, type ProfileRetrieveParams, type ProfileUpdateParams, type ProfileListParams, type ProfileDeleteParams, type ProfileCompleteParams, } from "./profiles/profiles.js";
|
|
7
|
+
export { Templates, type AuthenticationConfig, type TemplateBody, type TemplateBodyContent, type TemplateButton, type TemplateButtonProps, type TemplateDefinition, type TemplateFooter, type TemplateHeader, type TemplateVariable, type TemplateCreateResponse, type TemplateRetrieveResponse, type TemplateUpdateResponse, type TemplateListResponse, type TemplateCreateParams, type TemplateRetrieveParams, type TemplateUpdateParams, type TemplateListParams, type TemplateDeleteParams, } from "./templates.js";
|
|
8
|
+
export { Users, type UserRetrieveResponse, type UserListResponse, type UserInviteResponse, type UserUpdateRoleResponse, type UserRetrieveParams, type UserListParams, type UserInviteParams, type UserRemoveParams, type UserUpdateRoleParams, } from "./users.js";
|
|
9
|
+
export { Webhooks, type InboundMessageEvent, type InboundMessageEventPayload, type MessageEvent, type MessageEventPayload, type TemplateEvent, type TemplateEventPayload, type WebhookCreateResponse, type WebhookRetrieveResponse, type WebhookUpdateResponse, type WebhookListResponse, type WebhookListEventTypesResponse, type WebhookListEventsResponse, type WebhookRotateSecretResponse, type WebhookTestResponse, type WebhookToggleStatusResponse, type WebhookCreateParams, type WebhookRetrieveParams, type WebhookUpdateParams, type WebhookListParams, type WebhookDeleteParams, type WebhookListEventTypesParams, type WebhookListEventsParams, type WebhookRotateSecretParams, type WebhookTestParams, type WebhookToggleStatusParams, } from "./webhooks.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,
|
|
1
|
+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,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,uBAAoB;AACrB,OAAO,EACL,KAAK,EACL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,mBAAgB;AACjB,OAAO,EACL,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,sBAAmB"}
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAaoB;AAZlB,oGAAA,QAAQ,OAAA;AAaV,oDAMyB;AALvB,8GAAA,aAAa,OAAA;AAMf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAaoB;AAZlB,oGAAA,QAAQ,OAAA;AAaV,oDAMyB;AALvB,8GAAA,aAAa,OAAA;AAMf,8BAA0E;AAAjE,wFAAA,EAAE,OAAA;AACX,0CAQoB;AAPlB,oGAAA,QAAQ,OAAA;AAQV,wCAAwF;AAA/E,kGAAA,OAAO,OAAA;AAChB,mDAgB6B;AAf3B,oGAAA,QAAQ,OAAA;AAgBV,4CAoBqB;AAnBnB,sGAAA,SAAS,OAAA;AAoBX,oCAWiB;AAVf,8FAAA,KAAK,OAAA;AAWP,0CA2BoB;AA1BlB,oGAAA,QAAQ,OAAA"}
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,QAAQ,GAYT,uBAAmB;AACpB,OAAO,EACL,aAAa,GAKd,4BAAwB;AACzB,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,QAAQ,GAYT,uBAAmB;AACpB,OAAO,EACL,aAAa,GAKd,4BAAwB;AACzB,OAAO,EAAE,EAAE,EAAkD,iBAAa;AAC1E,OAAO,EACL,QAAQ,GAOT,uBAAmB;AACpB,OAAO,EAAE,OAAO,EAAsD,sBAAkB;AACxF,OAAO,EACL,QAAQ,GAeT,gCAA4B;AAC7B,OAAO,EACL,SAAS,GAmBV,wBAAoB;AACrB,OAAO,EACL,KAAK,GAUN,oBAAgB;AACjB,OAAO,EACL,QAAQ,GA0BT,uBAAmB"}
|
package/resources/me.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as MeAPI from "./me.mjs";
|
|
3
|
-
import * as WebhooksAPI from "./webhooks.mjs";
|
|
4
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Who the current key is.
|
|
6
|
+
*
|
|
7
|
+
* `GET /v3/me` answers with the account the key authenticates as, which is the quickest way to tell a live key from a test one, an organization key from a sender profile's, and to confirm `x-profile-id` resolved to the profile you meant.
|
|
8
8
|
*/
|
|
9
9
|
export declare class Me extends APIResource {
|
|
10
10
|
/**
|
|
@@ -23,42 +23,20 @@ export declare class Me extends APIResource {
|
|
|
23
23
|
* **Channels:** The `channels` object always includes `sms`, `whatsapp`, and
|
|
24
24
|
* `rcs`. Each channel has a `configured` boolean. Configured channels expose
|
|
25
25
|
* additional details such as `phone_number`.
|
|
26
|
+
*
|
|
27
|
+
* **Sending number:** `sending_phone_number` is the account's US SMS sender. It is
|
|
28
|
+
* intentionally the same value as `channels.sms.phone_number` — the two are kept
|
|
29
|
+
* in step, and it is published under both names because `sending_phone_number` is
|
|
30
|
+
* what this value is called on `GET /v3/profiles`. Read either. One difference:
|
|
31
|
+
* `sending_phone_number` is always present, including as `null`, while
|
|
32
|
+
* `channels.sms.phone_number` is omitted when there is no sender.
|
|
33
|
+
*
|
|
34
|
+
* `sending_phone_number_profile_id` names the account that holds that number in
|
|
35
|
+
* inventory — normally this account, and a different one where a number is shared.
|
|
36
|
+
* Both are `null` when the account has no US SMS sender.
|
|
26
37
|
*/
|
|
27
38
|
retrieve(params?: MeRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<MeRetrieveResponse>;
|
|
28
39
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Profile configuration settings
|
|
31
|
-
*/
|
|
32
|
-
export interface ProfileSettings {
|
|
33
|
-
/**
|
|
34
|
-
* Whether contacts are shared across profiles in the organization
|
|
35
|
-
*/
|
|
36
|
-
allow_contact_sharing?: boolean | null;
|
|
37
|
-
/**
|
|
38
|
-
* Whether templates are shared across profiles in the organization
|
|
39
|
-
*/
|
|
40
|
-
allow_template_sharing?: boolean | null;
|
|
41
|
-
/**
|
|
42
|
-
* Billing model: profile, organization, or profile_and_organization
|
|
43
|
-
*/
|
|
44
|
-
billing_model?: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Whether this profile inherits contacts from the organization
|
|
47
|
-
*/
|
|
48
|
-
inherit_contacts?: boolean | null;
|
|
49
|
-
/**
|
|
50
|
-
* Whether this profile inherits TCR brand from the organization
|
|
51
|
-
*/
|
|
52
|
-
inherit_tcr_brand?: boolean | null;
|
|
53
|
-
/**
|
|
54
|
-
* Whether this profile inherits TCR campaign from the organization
|
|
55
|
-
*/
|
|
56
|
-
inherit_tcr_campaign?: boolean | null;
|
|
57
|
-
/**
|
|
58
|
-
* Whether this profile inherits templates from the organization
|
|
59
|
-
*/
|
|
60
|
-
inherit_templates?: boolean | null;
|
|
61
|
-
}
|
|
62
40
|
/**
|
|
63
41
|
* Standard API response envelope for all v3 endpoints
|
|
64
42
|
*/
|
|
@@ -72,11 +50,11 @@ export interface MeRetrieveResponse {
|
|
|
72
50
|
/**
|
|
73
51
|
* Error information
|
|
74
52
|
*/
|
|
75
|
-
error?:
|
|
53
|
+
error?: MeRetrieveResponse.Error | null;
|
|
76
54
|
/**
|
|
77
55
|
* Request and response metadata
|
|
78
56
|
*/
|
|
79
|
-
meta?:
|
|
57
|
+
meta?: MeRetrieveResponse.Meta;
|
|
80
58
|
/**
|
|
81
59
|
* Indicates whether the request was successful
|
|
82
60
|
*/
|
|
@@ -127,10 +105,32 @@ export declare namespace MeRetrieveResponse {
|
|
|
127
105
|
* types)
|
|
128
106
|
*/
|
|
129
107
|
profiles?: Array<Data.Profile>;
|
|
108
|
+
/**
|
|
109
|
+
* The SMS sender this account sends from in the United States, in E.164 form. Null
|
|
110
|
+
* when the account has no US SMS sender.
|
|
111
|
+
*
|
|
112
|
+
* The same value as channels.sms.phone_number, published under both names on
|
|
113
|
+
* purpose: sending_phone_number is what this value is already called on GET
|
|
114
|
+
* /v3/profiles, so the same key answers the same question whichever of the two
|
|
115
|
+
* endpoints you ask. Neither name is preferred over the other and neither is
|
|
116
|
+
* deprecated.
|
|
117
|
+
*
|
|
118
|
+
* The same value, not the same presence: this key is always written, including as
|
|
119
|
+
* null, whereas channels.sms.phone_number is left out entirely when there is no
|
|
120
|
+
* sender.
|
|
121
|
+
*/
|
|
122
|
+
sending_phone_number?: string | null;
|
|
123
|
+
/**
|
|
124
|
+
* The account that holds sending_phone_number in number inventory: normally this
|
|
125
|
+
* account itself, and a different account when the number is held elsewhere. Null
|
|
126
|
+
* when there is no US sender, or when the sender is not a number drawn from
|
|
127
|
+
* inventory — an alphanumeric sender ID or a short code.
|
|
128
|
+
*/
|
|
129
|
+
sending_phone_number_profile_id?: string | null;
|
|
130
130
|
/**
|
|
131
131
|
* Profile configuration settings
|
|
132
132
|
*/
|
|
133
|
-
settings?:
|
|
133
|
+
settings?: Data.Settings | null;
|
|
134
134
|
/**
|
|
135
135
|
* Short name / abbreviation (only for profile type)
|
|
136
136
|
*/
|
|
@@ -244,7 +244,7 @@ export declare namespace MeRetrieveResponse {
|
|
|
244
244
|
/**
|
|
245
245
|
* Profile configuration settings
|
|
246
246
|
*/
|
|
247
|
-
settings?:
|
|
247
|
+
settings?: Profile.Settings;
|
|
248
248
|
/**
|
|
249
249
|
* Profile short name (abbreviation)
|
|
250
250
|
*/
|
|
@@ -254,6 +254,130 @@ export declare namespace MeRetrieveResponse {
|
|
|
254
254
|
*/
|
|
255
255
|
status?: string | null;
|
|
256
256
|
}
|
|
257
|
+
namespace Profile {
|
|
258
|
+
/**
|
|
259
|
+
* Profile configuration settings
|
|
260
|
+
*/
|
|
261
|
+
interface Settings {
|
|
262
|
+
/**
|
|
263
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
264
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
265
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
266
|
+
*/
|
|
267
|
+
allow_contact_sharing?: boolean | null;
|
|
268
|
+
/**
|
|
269
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
270
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
271
|
+
* deserializing; it carries no information.
|
|
272
|
+
*/
|
|
273
|
+
allow_template_sharing?: boolean | null;
|
|
274
|
+
/**
|
|
275
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
276
|
+
*/
|
|
277
|
+
billing_model?: string | null;
|
|
278
|
+
/**
|
|
279
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
280
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
281
|
+
* deserializing; it carries no information.
|
|
282
|
+
*/
|
|
283
|
+
inherit_contacts?: boolean | null;
|
|
284
|
+
/**
|
|
285
|
+
* Whether this profile inherits TCR brand from the organization
|
|
286
|
+
*/
|
|
287
|
+
inherit_tcr_brand?: boolean | null;
|
|
288
|
+
/**
|
|
289
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
290
|
+
*/
|
|
291
|
+
inherit_tcr_campaign?: boolean | null;
|
|
292
|
+
/**
|
|
293
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
294
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
295
|
+
* deserializing; it carries no information.
|
|
296
|
+
*/
|
|
297
|
+
inherit_templates?: boolean | null;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Profile configuration settings
|
|
302
|
+
*/
|
|
303
|
+
interface Settings {
|
|
304
|
+
/**
|
|
305
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
306
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
307
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
308
|
+
*/
|
|
309
|
+
allow_contact_sharing?: boolean | null;
|
|
310
|
+
/**
|
|
311
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
312
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
313
|
+
* deserializing; it carries no information.
|
|
314
|
+
*/
|
|
315
|
+
allow_template_sharing?: boolean | null;
|
|
316
|
+
/**
|
|
317
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
318
|
+
*/
|
|
319
|
+
billing_model?: string | null;
|
|
320
|
+
/**
|
|
321
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
322
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
323
|
+
* deserializing; it carries no information.
|
|
324
|
+
*/
|
|
325
|
+
inherit_contacts?: boolean | null;
|
|
326
|
+
/**
|
|
327
|
+
* Whether this profile inherits TCR brand from the organization
|
|
328
|
+
*/
|
|
329
|
+
inherit_tcr_brand?: boolean | null;
|
|
330
|
+
/**
|
|
331
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
332
|
+
*/
|
|
333
|
+
inherit_tcr_campaign?: boolean | null;
|
|
334
|
+
/**
|
|
335
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
336
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
337
|
+
* deserializing; it carries no information.
|
|
338
|
+
*/
|
|
339
|
+
inherit_templates?: boolean | null;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Error information
|
|
344
|
+
*/
|
|
345
|
+
interface Error {
|
|
346
|
+
/**
|
|
347
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
348
|
+
*/
|
|
349
|
+
code?: string;
|
|
350
|
+
/**
|
|
351
|
+
* Additional validation error details (field-level errors)
|
|
352
|
+
*/
|
|
353
|
+
details?: {
|
|
354
|
+
[key: string]: Array<string>;
|
|
355
|
+
} | null;
|
|
356
|
+
/**
|
|
357
|
+
* URL to documentation about this error
|
|
358
|
+
*/
|
|
359
|
+
doc_url?: string | null;
|
|
360
|
+
/**
|
|
361
|
+
* Human-readable error message
|
|
362
|
+
*/
|
|
363
|
+
message?: string;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Request and response metadata
|
|
367
|
+
*/
|
|
368
|
+
interface Meta {
|
|
369
|
+
/**
|
|
370
|
+
* Unique identifier for this request (for tracing and support)
|
|
371
|
+
*/
|
|
372
|
+
request_id?: string;
|
|
373
|
+
/**
|
|
374
|
+
* Server timestamp when the response was generated
|
|
375
|
+
*/
|
|
376
|
+
timestamp?: string;
|
|
377
|
+
/**
|
|
378
|
+
* API version used for this request
|
|
379
|
+
*/
|
|
380
|
+
version?: string;
|
|
257
381
|
}
|
|
258
382
|
}
|
|
259
383
|
export interface MeRetrieveParams {
|
|
@@ -264,6 +388,6 @@ export interface MeRetrieveParams {
|
|
|
264
388
|
'x-profile-id'?: string;
|
|
265
389
|
}
|
|
266
390
|
export declare namespace Me {
|
|
267
|
-
export { type
|
|
391
|
+
export { type MeRetrieveResponse as MeRetrieveResponse, type MeRetrieveParams as MeRetrieveParams };
|
|
268
392
|
}
|
|
269
393
|
//# sourceMappingURL=me.d.mts.map
|
package/resources/me.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"me.d.mts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"me.d.mts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;;GAIG;AACH,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CACN,MAAM,GAAE,gBAAgB,GAA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,GAAG,IAAI,CAAC;YAEtC;;;;eAIG;YACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;SACpC;KACF;IAED;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,OAAO,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;SAAE,GAAG,IAAI,CAAC;QAElD;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAExB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAED;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}
|
package/resources/me.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as MeAPI from "./me.js";
|
|
3
|
-
import * as WebhooksAPI from "./webhooks.js";
|
|
4
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
5
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Who the current key is.
|
|
6
|
+
*
|
|
7
|
+
* `GET /v3/me` answers with the account the key authenticates as, which is the quickest way to tell a live key from a test one, an organization key from a sender profile's, and to confirm `x-profile-id` resolved to the profile you meant.
|
|
8
8
|
*/
|
|
9
9
|
export declare class Me extends APIResource {
|
|
10
10
|
/**
|
|
@@ -23,42 +23,20 @@ export declare class Me extends APIResource {
|
|
|
23
23
|
* **Channels:** The `channels` object always includes `sms`, `whatsapp`, and
|
|
24
24
|
* `rcs`. Each channel has a `configured` boolean. Configured channels expose
|
|
25
25
|
* additional details such as `phone_number`.
|
|
26
|
+
*
|
|
27
|
+
* **Sending number:** `sending_phone_number` is the account's US SMS sender. It is
|
|
28
|
+
* intentionally the same value as `channels.sms.phone_number` — the two are kept
|
|
29
|
+
* in step, and it is published under both names because `sending_phone_number` is
|
|
30
|
+
* what this value is called on `GET /v3/profiles`. Read either. One difference:
|
|
31
|
+
* `sending_phone_number` is always present, including as `null`, while
|
|
32
|
+
* `channels.sms.phone_number` is omitted when there is no sender.
|
|
33
|
+
*
|
|
34
|
+
* `sending_phone_number_profile_id` names the account that holds that number in
|
|
35
|
+
* inventory — normally this account, and a different one where a number is shared.
|
|
36
|
+
* Both are `null` when the account has no US SMS sender.
|
|
26
37
|
*/
|
|
27
38
|
retrieve(params?: MeRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<MeRetrieveResponse>;
|
|
28
39
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Profile configuration settings
|
|
31
|
-
*/
|
|
32
|
-
export interface ProfileSettings {
|
|
33
|
-
/**
|
|
34
|
-
* Whether contacts are shared across profiles in the organization
|
|
35
|
-
*/
|
|
36
|
-
allow_contact_sharing?: boolean | null;
|
|
37
|
-
/**
|
|
38
|
-
* Whether templates are shared across profiles in the organization
|
|
39
|
-
*/
|
|
40
|
-
allow_template_sharing?: boolean | null;
|
|
41
|
-
/**
|
|
42
|
-
* Billing model: profile, organization, or profile_and_organization
|
|
43
|
-
*/
|
|
44
|
-
billing_model?: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Whether this profile inherits contacts from the organization
|
|
47
|
-
*/
|
|
48
|
-
inherit_contacts?: boolean | null;
|
|
49
|
-
/**
|
|
50
|
-
* Whether this profile inherits TCR brand from the organization
|
|
51
|
-
*/
|
|
52
|
-
inherit_tcr_brand?: boolean | null;
|
|
53
|
-
/**
|
|
54
|
-
* Whether this profile inherits TCR campaign from the organization
|
|
55
|
-
*/
|
|
56
|
-
inherit_tcr_campaign?: boolean | null;
|
|
57
|
-
/**
|
|
58
|
-
* Whether this profile inherits templates from the organization
|
|
59
|
-
*/
|
|
60
|
-
inherit_templates?: boolean | null;
|
|
61
|
-
}
|
|
62
40
|
/**
|
|
63
41
|
* Standard API response envelope for all v3 endpoints
|
|
64
42
|
*/
|
|
@@ -72,11 +50,11 @@ export interface MeRetrieveResponse {
|
|
|
72
50
|
/**
|
|
73
51
|
* Error information
|
|
74
52
|
*/
|
|
75
|
-
error?:
|
|
53
|
+
error?: MeRetrieveResponse.Error | null;
|
|
76
54
|
/**
|
|
77
55
|
* Request and response metadata
|
|
78
56
|
*/
|
|
79
|
-
meta?:
|
|
57
|
+
meta?: MeRetrieveResponse.Meta;
|
|
80
58
|
/**
|
|
81
59
|
* Indicates whether the request was successful
|
|
82
60
|
*/
|
|
@@ -127,10 +105,32 @@ export declare namespace MeRetrieveResponse {
|
|
|
127
105
|
* types)
|
|
128
106
|
*/
|
|
129
107
|
profiles?: Array<Data.Profile>;
|
|
108
|
+
/**
|
|
109
|
+
* The SMS sender this account sends from in the United States, in E.164 form. Null
|
|
110
|
+
* when the account has no US SMS sender.
|
|
111
|
+
*
|
|
112
|
+
* The same value as channels.sms.phone_number, published under both names on
|
|
113
|
+
* purpose: sending_phone_number is what this value is already called on GET
|
|
114
|
+
* /v3/profiles, so the same key answers the same question whichever of the two
|
|
115
|
+
* endpoints you ask. Neither name is preferred over the other and neither is
|
|
116
|
+
* deprecated.
|
|
117
|
+
*
|
|
118
|
+
* The same value, not the same presence: this key is always written, including as
|
|
119
|
+
* null, whereas channels.sms.phone_number is left out entirely when there is no
|
|
120
|
+
* sender.
|
|
121
|
+
*/
|
|
122
|
+
sending_phone_number?: string | null;
|
|
123
|
+
/**
|
|
124
|
+
* The account that holds sending_phone_number in number inventory: normally this
|
|
125
|
+
* account itself, and a different account when the number is held elsewhere. Null
|
|
126
|
+
* when there is no US sender, or when the sender is not a number drawn from
|
|
127
|
+
* inventory — an alphanumeric sender ID or a short code.
|
|
128
|
+
*/
|
|
129
|
+
sending_phone_number_profile_id?: string | null;
|
|
130
130
|
/**
|
|
131
131
|
* Profile configuration settings
|
|
132
132
|
*/
|
|
133
|
-
settings?:
|
|
133
|
+
settings?: Data.Settings | null;
|
|
134
134
|
/**
|
|
135
135
|
* Short name / abbreviation (only for profile type)
|
|
136
136
|
*/
|
|
@@ -244,7 +244,7 @@ export declare namespace MeRetrieveResponse {
|
|
|
244
244
|
/**
|
|
245
245
|
* Profile configuration settings
|
|
246
246
|
*/
|
|
247
|
-
settings?:
|
|
247
|
+
settings?: Profile.Settings;
|
|
248
248
|
/**
|
|
249
249
|
* Profile short name (abbreviation)
|
|
250
250
|
*/
|
|
@@ -254,6 +254,130 @@ export declare namespace MeRetrieveResponse {
|
|
|
254
254
|
*/
|
|
255
255
|
status?: string | null;
|
|
256
256
|
}
|
|
257
|
+
namespace Profile {
|
|
258
|
+
/**
|
|
259
|
+
* Profile configuration settings
|
|
260
|
+
*/
|
|
261
|
+
interface Settings {
|
|
262
|
+
/**
|
|
263
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
264
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
265
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
266
|
+
*/
|
|
267
|
+
allow_contact_sharing?: boolean | null;
|
|
268
|
+
/**
|
|
269
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
270
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
271
|
+
* deserializing; it carries no information.
|
|
272
|
+
*/
|
|
273
|
+
allow_template_sharing?: boolean | null;
|
|
274
|
+
/**
|
|
275
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
276
|
+
*/
|
|
277
|
+
billing_model?: string | null;
|
|
278
|
+
/**
|
|
279
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
280
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
281
|
+
* deserializing; it carries no information.
|
|
282
|
+
*/
|
|
283
|
+
inherit_contacts?: boolean | null;
|
|
284
|
+
/**
|
|
285
|
+
* Whether this profile inherits TCR brand from the organization
|
|
286
|
+
*/
|
|
287
|
+
inherit_tcr_brand?: boolean | null;
|
|
288
|
+
/**
|
|
289
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
290
|
+
*/
|
|
291
|
+
inherit_tcr_campaign?: boolean | null;
|
|
292
|
+
/**
|
|
293
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
294
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
295
|
+
* deserializing; it carries no information.
|
|
296
|
+
*/
|
|
297
|
+
inherit_templates?: boolean | null;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Profile configuration settings
|
|
302
|
+
*/
|
|
303
|
+
interface Settings {
|
|
304
|
+
/**
|
|
305
|
+
* @deprecated Always false. A profile no longer shares contacts with sibling
|
|
306
|
+
* profiles — it sees only what it owns. Retained so existing v3 clients reading
|
|
307
|
+
* allow_contact_sharing keep deserializing; it carries no information.
|
|
308
|
+
*/
|
|
309
|
+
allow_contact_sharing?: boolean | null;
|
|
310
|
+
/**
|
|
311
|
+
* @deprecated Always false. A profile no longer shares templates with sibling
|
|
312
|
+
* profiles. Retained so existing v3 clients reading allow_template_sharing keep
|
|
313
|
+
* deserializing; it carries no information.
|
|
314
|
+
*/
|
|
315
|
+
allow_template_sharing?: boolean | null;
|
|
316
|
+
/**
|
|
317
|
+
* Billing model: profile, organization, or profile_and_organization
|
|
318
|
+
*/
|
|
319
|
+
billing_model?: string | null;
|
|
320
|
+
/**
|
|
321
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
322
|
+
* contacts. Retained so existing v3 clients reading inherit_contacts keep
|
|
323
|
+
* deserializing; it carries no information.
|
|
324
|
+
*/
|
|
325
|
+
inherit_contacts?: boolean | null;
|
|
326
|
+
/**
|
|
327
|
+
* Whether this profile inherits TCR brand from the organization
|
|
328
|
+
*/
|
|
329
|
+
inherit_tcr_brand?: boolean | null;
|
|
330
|
+
/**
|
|
331
|
+
* Whether this profile inherits TCR campaign from the organization
|
|
332
|
+
*/
|
|
333
|
+
inherit_tcr_campaign?: boolean | null;
|
|
334
|
+
/**
|
|
335
|
+
* @deprecated Always false. A profile no longer inherits its organization's
|
|
336
|
+
* templates. Retained so existing v3 clients reading inherit_templates keep
|
|
337
|
+
* deserializing; it carries no information.
|
|
338
|
+
*/
|
|
339
|
+
inherit_templates?: boolean | null;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Error information
|
|
344
|
+
*/
|
|
345
|
+
interface Error {
|
|
346
|
+
/**
|
|
347
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
348
|
+
*/
|
|
349
|
+
code?: string;
|
|
350
|
+
/**
|
|
351
|
+
* Additional validation error details (field-level errors)
|
|
352
|
+
*/
|
|
353
|
+
details?: {
|
|
354
|
+
[key: string]: Array<string>;
|
|
355
|
+
} | null;
|
|
356
|
+
/**
|
|
357
|
+
* URL to documentation about this error
|
|
358
|
+
*/
|
|
359
|
+
doc_url?: string | null;
|
|
360
|
+
/**
|
|
361
|
+
* Human-readable error message
|
|
362
|
+
*/
|
|
363
|
+
message?: string;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Request and response metadata
|
|
367
|
+
*/
|
|
368
|
+
interface Meta {
|
|
369
|
+
/**
|
|
370
|
+
* Unique identifier for this request (for tracing and support)
|
|
371
|
+
*/
|
|
372
|
+
request_id?: string;
|
|
373
|
+
/**
|
|
374
|
+
* Server timestamp when the response was generated
|
|
375
|
+
*/
|
|
376
|
+
timestamp?: string;
|
|
377
|
+
/**
|
|
378
|
+
* API version used for this request
|
|
379
|
+
*/
|
|
380
|
+
version?: string;
|
|
257
381
|
}
|
|
258
382
|
}
|
|
259
383
|
export interface MeRetrieveParams {
|
|
@@ -264,6 +388,6 @@ export interface MeRetrieveParams {
|
|
|
264
388
|
'x-profile-id'?: string;
|
|
265
389
|
}
|
|
266
390
|
export declare namespace Me {
|
|
267
|
-
export { type
|
|
391
|
+
export { type MeRetrieveResponse as MeRetrieveResponse, type MeRetrieveParams as MeRetrieveParams };
|
|
268
392
|
}
|
|
269
393
|
//# sourceMappingURL=me.d.ts.map
|
package/resources/me.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;GAIG;AACH,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CACN,MAAM,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAUlC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC,IAAI,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC;IAE/B;;OAEG;IACH,OAAO,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WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAED;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}
|
package/resources/me.js
CHANGED
|
@@ -5,7 +5,9 @@ exports.Me = void 0;
|
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const headers_1 = require("../internal/headers.js");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Who the current key is.
|
|
9
|
+
*
|
|
10
|
+
* `GET /v3/me` answers with the account the key authenticates as, which is the quickest way to tell a live key from a test one, an organization key from a sender profile's, and to confirm `x-profile-id` resolved to the profile you meant.
|
|
9
11
|
*/
|
|
10
12
|
class Me extends resource_1.APIResource {
|
|
11
13
|
/**
|
|
@@ -24,6 +26,17 @@ class Me extends resource_1.APIResource {
|
|
|
24
26
|
* **Channels:** The `channels` object always includes `sms`, `whatsapp`, and
|
|
25
27
|
* `rcs`. Each channel has a `configured` boolean. Configured channels expose
|
|
26
28
|
* additional details such as `phone_number`.
|
|
29
|
+
*
|
|
30
|
+
* **Sending number:** `sending_phone_number` is the account's US SMS sender. It is
|
|
31
|
+
* intentionally the same value as `channels.sms.phone_number` — the two are kept
|
|
32
|
+
* in step, and it is published under both names because `sending_phone_number` is
|
|
33
|
+
* what this value is called on `GET /v3/profiles`. Read either. One difference:
|
|
34
|
+
* `sending_phone_number` is always present, including as `null`, while
|
|
35
|
+
* `channels.sms.phone_number` is omitted when there is no sender.
|
|
36
|
+
*
|
|
37
|
+
* `sending_phone_number_profile_id` names the account that holds that number in
|
|
38
|
+
* inventory — normally this account, and a different one where a number is shared.
|
|
39
|
+
* Both are `null` when the account has no US SMS sender.
|
|
27
40
|
*/
|
|
28
41
|
retrieve(params = {}, options) {
|
|
29
42
|
const { 'x-profile-id': xProfileID } = params ?? {};
|
package/resources/me.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"me.js","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"me.js","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAGnD;;;;GAIG;AACH,MAAa,EAAG,SAAQ,sBAAW;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CACN,SAA8C,EAAE,EAChD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE;YAChC,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA1CD,gBA0CC"}
|