@linqapp/sdk 0.32.1 → 0.33.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 +19 -0
- package/README.md +82 -112
- package/client.d.mts +41 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +41 -5
- package/client.d.ts.map +1 -1
- package/client.js +38 -2
- package/client.js.map +1 -1
- package/client.mjs +38 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/available-number.d.mts +13 -1
- package/resources/available-number.d.mts.map +1 -1
- package/resources/available-number.d.ts +13 -1
- package/resources/available-number.d.ts.map +1 -1
- package/resources/available-number.js +2 -1
- package/resources/available-number.js.map +1 -1
- package/resources/available-number.mjs +2 -1
- package/resources/available-number.mjs.map +1 -1
- package/resources/chats/chats.d.mts +125 -64
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +125 -64
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js +59 -59
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs +59 -59
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/index.d.mts +2 -2
- package/resources/chats/index.d.mts.map +1 -1
- package/resources/chats/index.d.ts +2 -2
- package/resources/chats/index.d.ts.map +1 -1
- package/resources/chats/location.d.mts +25 -25
- package/resources/chats/location.d.mts.map +1 -1
- package/resources/chats/location.d.ts +25 -25
- package/resources/chats/location.d.ts.map +1 -1
- package/resources/chats/location.js +27 -27
- package/resources/chats/location.js.map +1 -1
- package/resources/chats/location.mjs +27 -27
- package/resources/chats/location.mjs.map +1 -1
- package/resources/chats/messages.d.mts +17 -17
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +17 -17
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +16 -16
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +16 -16
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/contact-card.d.mts +29 -28
- package/resources/contact-card.d.mts.map +1 -1
- package/resources/contact-card.d.ts +29 -28
- package/resources/contact-card.d.ts.map +1 -1
- package/resources/contact-card.js +23 -22
- package/resources/contact-card.js.map +1 -1
- package/resources/contact-card.mjs +23 -22
- package/resources/contact-card.mjs.map +1 -1
- package/resources/experiences.d.mts +91 -0
- package/resources/experiences.d.mts.map +1 -0
- package/resources/experiences.d.ts +91 -0
- package/resources/experiences.d.ts.map +1 -0
- package/resources/experiences.js +29 -0
- package/resources/experiences.js.map +1 -0
- package/resources/experiences.mjs +25 -0
- package/resources/experiences.mjs.map +1 -0
- package/resources/index.d.mts +7 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +71 -35
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +71 -35
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +41 -30
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +41 -30
- package/resources/messages.mjs.map +1 -1
- package/resources/payment-handles.d.mts +87 -0
- package/resources/payment-handles.d.mts.map +1 -0
- package/resources/payment-handles.d.ts +87 -0
- package/resources/payment-handles.d.ts.map +1 -0
- package/resources/payment-handles.js +76 -0
- package/resources/payment-handles.js.map +1 -0
- package/resources/payment-handles.mjs +72 -0
- package/resources/payment-handles.mjs.map +1 -0
- package/resources/payment-providers.d.mts +58 -0
- package/resources/payment-providers.d.mts.map +1 -0
- package/resources/payment-providers.d.ts +58 -0
- package/resources/payment-providers.d.ts.map +1 -0
- package/resources/payment-providers.js +45 -0
- package/resources/payment-providers.js.map +1 -0
- package/resources/payment-providers.mjs +41 -0
- package/resources/payment-providers.mjs.map +1 -0
- package/resources/payment-requests.d.mts +2 -2
- package/resources/payment-requests.d.ts +2 -2
- package/resources/payment-requests.js +2 -2
- package/resources/payment-requests.mjs +2 -2
- package/resources/payments.d.mts +116 -0
- package/resources/payments.d.mts.map +1 -0
- package/resources/payments.d.ts +116 -0
- package/resources/payments.d.ts.map +1 -0
- package/resources/payments.js +70 -0
- package/resources/payments.js.map +1 -0
- package/resources/payments.mjs +66 -0
- package/resources/payments.mjs.map +1 -0
- package/resources/phone-numbers.d.mts +11 -11
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +11 -11
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +13 -13
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +13 -13
- package/resources/phone-numbers.mjs.map +1 -1
- package/resources/webhook-subscriptions.d.mts +11 -11
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +11 -11
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +13 -13
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +13 -13
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +59 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +59 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +77 -6
- package/src/resources/available-number.ts +14 -1
- package/src/resources/chats/chats.ts +142 -79
- package/src/resources/chats/index.ts +2 -2
- package/src/resources/chats/location.ts +28 -28
- package/src/resources/chats/messages.ts +28 -28
- package/src/resources/contact-card.ts +36 -35
- package/src/resources/experiences.ts +118 -0
- package/src/resources/index.ts +22 -4
- package/src/resources/messages.ts +85 -47
- package/src/resources/payment-handles.ts +114 -0
- package/src/resources/payment-providers.ts +81 -0
- package/src/resources/payment-requests.ts +2 -2
- package/src/resources/payments.ts +163 -0
- package/src/resources/phone-numbers.ts +14 -14
- package/src/resources/webhook-subscriptions.ts +14 -14
- package/src/resources/webhooks.ts +61 -0
- 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
|
@@ -41,33 +41,6 @@ import { path } from "../../internal/utils/path.mjs";
|
|
|
41
41
|
* Messages conversation** with your number.
|
|
42
42
|
*/
|
|
43
43
|
export class Location extends APIResource {
|
|
44
|
-
/**
|
|
45
|
-
* Request a contact in a chat to share their location. They receive an iMessage
|
|
46
|
-
* prompt and must accept before any location is available; once they do, read
|
|
47
|
-
* their location coordinates with `GET /v3/chats/{chatId}/location`.
|
|
48
|
-
*
|
|
49
|
-
* The request is delivered asynchronously. The endpoint returns immediately with
|
|
50
|
-
* `{ "success": true, "message": "Location request sent" }` and does not return
|
|
51
|
-
* coordinates.
|
|
52
|
-
*
|
|
53
|
-
* Location requests only work in **1:1 iMessage chats** (Apple limitation):
|
|
54
|
-
*
|
|
55
|
-
* - Group chats (any service) return `409` with code `2016`
|
|
56
|
-
* (`GroupChatNotSupported`).
|
|
57
|
-
* - 1:1 SMS and RCS chats return `409` with code `2017`
|
|
58
|
-
* (`ChatServiceNotSupported`).
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* const locationRequestResponse =
|
|
63
|
-
* await client.chats.location.request(
|
|
64
|
-
* '975d0776-bd17-4273-8337-f346b4c661b0',
|
|
65
|
-
* );
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
request(chatID, options) {
|
|
69
|
-
return this._client.post(path `/v3/chats/${chatID}/location/request`, options);
|
|
70
|
-
}
|
|
71
44
|
/**
|
|
72
45
|
* Retrieve the current location for contacts sharing with you in a chat.
|
|
73
46
|
*
|
|
@@ -102,5 +75,32 @@ export class Location extends APIResource {
|
|
|
102
75
|
headers: buildHeaders([{ Accept: 'application/geo+json' }, options?.headers]),
|
|
103
76
|
});
|
|
104
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Request a contact in a chat to share their location. They receive an iMessage
|
|
80
|
+
* prompt and must accept before any location is available; once they do, read
|
|
81
|
+
* their location coordinates with `GET /v3/chats/{chatId}/location`.
|
|
82
|
+
*
|
|
83
|
+
* The request is delivered asynchronously. The endpoint returns immediately with
|
|
84
|
+
* `{ "success": true, "message": "Location request sent" }` and does not return
|
|
85
|
+
* coordinates.
|
|
86
|
+
*
|
|
87
|
+
* Location requests only work in **1:1 iMessage chats** (Apple limitation):
|
|
88
|
+
*
|
|
89
|
+
* - Group chats (any service) return `409` with code `2016`
|
|
90
|
+
* (`GroupChatNotSupported`).
|
|
91
|
+
* - 1:1 SMS and RCS chats return `409` with code `2017`
|
|
92
|
+
* (`ChatServiceNotSupported`).
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const locationRequestResponse =
|
|
97
|
+
* await client.chats.location.request(
|
|
98
|
+
* '975d0776-bd17-4273-8337-f346b4c661b0',
|
|
99
|
+
* );
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
request(chatID, options) {
|
|
103
|
+
return this._client.post(path `/v3/chats/${chatID}/location/request`, options);
|
|
104
|
+
}
|
|
105
105
|
}
|
|
106
106
|
//# sourceMappingURL=location.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.mjs","sourceRoot":"","sources":["../../src/resources/chats/location.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"location.mjs","sourceRoot":"","sources":["../../src/resources/chats/location.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,WAAW,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC9E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF"}
|
|
@@ -67,6 +67,20 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
67
67
|
* **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
|
|
68
68
|
*/
|
|
69
69
|
export declare class Messages extends APIResource {
|
|
70
|
+
/**
|
|
71
|
+
* Retrieve messages from a specific chat with pagination support.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* // Automatically fetches more pages as needed.
|
|
76
|
+
* for await (const message of client.chats.messages.list(
|
|
77
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
78
|
+
* )) {
|
|
79
|
+
* // ...
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, MessagesAPI.Message>;
|
|
70
84
|
/**
|
|
71
85
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
72
86
|
* chat ID and want to send additional messages to it.
|
|
@@ -124,20 +138,6 @@ export declare class Messages extends APIResource {
|
|
|
124
138
|
* ```
|
|
125
139
|
*/
|
|
126
140
|
send(chatID: string, body: MessageSendParams, options?: RequestOptions): APIPromise<MessageSendResponse>;
|
|
127
|
-
/**
|
|
128
|
-
* Retrieve messages from a specific chat with pagination support.
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```ts
|
|
132
|
-
* // Automatically fetches more pages as needed.
|
|
133
|
-
* for await (const message of client.chats.messages.list(
|
|
134
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
135
|
-
* )) {
|
|
136
|
-
* // ...
|
|
137
|
-
* }
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, MessagesAPI.Message>;
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* A message that was sent (used in CreateChat and SendMessage responses)
|
|
@@ -326,6 +326,8 @@ export interface MessageSendResponse {
|
|
|
326
326
|
*/
|
|
327
327
|
message: SentMessage;
|
|
328
328
|
}
|
|
329
|
+
export interface MessageListParams extends ListMessagesPaginationParams {
|
|
330
|
+
}
|
|
329
331
|
export interface MessageSendParams {
|
|
330
332
|
/**
|
|
331
333
|
* Message content container. Groups all message-related fields together,
|
|
@@ -339,10 +341,8 @@ export interface MessageSendParams {
|
|
|
339
341
|
*/
|
|
340
342
|
message: ChatsAPI.MessageContent;
|
|
341
343
|
}
|
|
342
|
-
export interface MessageListParams extends ListMessagesPaginationParams {
|
|
343
|
-
}
|
|
344
344
|
export declare namespace Messages {
|
|
345
|
-
export { type SentMessage as SentMessage, type MessageSendResponse as MessageSendResponse, type
|
|
345
|
+
export { type SentMessage as SentMessage, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
|
|
346
346
|
}
|
|
347
347
|
export { type MessagesListMessagesPagination };
|
|
348
348
|
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,WAAW,wBAAoB;AAC3C,OAAO,EAAE,8BAA8B,EAAE,wBAAoB;AAC7D,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAEL,KAAK,4BAA4B,EACjC,WAAW,EACZ,kCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,WAAW,wBAAoB;AAC3C,OAAO,EAAE,8BAA8B,EAAE,wBAAoB;AAC7D,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAEL,KAAK,4BAA4B,EACjC,WAAW,EACZ,kCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IAC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AM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,iBAAkB,SAAQ,4BAA4B;CAAG;AAE1E,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;OASG;IACH,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,8BAA8B,EAAE,CAAC"}
|
|
@@ -67,6 +67,20 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
67
67
|
* **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
|
|
68
68
|
*/
|
|
69
69
|
export declare class Messages extends APIResource {
|
|
70
|
+
/**
|
|
71
|
+
* Retrieve messages from a specific chat with pagination support.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* // Automatically fetches more pages as needed.
|
|
76
|
+
* for await (const message of client.chats.messages.list(
|
|
77
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
78
|
+
* )) {
|
|
79
|
+
* // ...
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, MessagesAPI.Message>;
|
|
70
84
|
/**
|
|
71
85
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
72
86
|
* chat ID and want to send additional messages to it.
|
|
@@ -124,20 +138,6 @@ export declare class Messages extends APIResource {
|
|
|
124
138
|
* ```
|
|
125
139
|
*/
|
|
126
140
|
send(chatID: string, body: MessageSendParams, options?: RequestOptions): APIPromise<MessageSendResponse>;
|
|
127
|
-
/**
|
|
128
|
-
* Retrieve messages from a specific chat with pagination support.
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```ts
|
|
132
|
-
* // Automatically fetches more pages as needed.
|
|
133
|
-
* for await (const message of client.chats.messages.list(
|
|
134
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
135
|
-
* )) {
|
|
136
|
-
* // ...
|
|
137
|
-
* }
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, MessagesAPI.Message>;
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* A message that was sent (used in CreateChat and SendMessage responses)
|
|
@@ -326,6 +326,8 @@ export interface MessageSendResponse {
|
|
|
326
326
|
*/
|
|
327
327
|
message: SentMessage;
|
|
328
328
|
}
|
|
329
|
+
export interface MessageListParams extends ListMessagesPaginationParams {
|
|
330
|
+
}
|
|
329
331
|
export interface MessageSendParams {
|
|
330
332
|
/**
|
|
331
333
|
* Message content container. Groups all message-related fields together,
|
|
@@ -339,10 +341,8 @@ export interface MessageSendParams {
|
|
|
339
341
|
*/
|
|
340
342
|
message: ChatsAPI.MessageContent;
|
|
341
343
|
}
|
|
342
|
-
export interface MessageListParams extends ListMessagesPaginationParams {
|
|
343
|
-
}
|
|
344
344
|
export declare namespace Messages {
|
|
345
|
-
export { type SentMessage as SentMessage, type MessageSendResponse as MessageSendResponse, type
|
|
345
|
+
export { type SentMessage as SentMessage, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
|
|
346
346
|
}
|
|
347
347
|
export { type MessagesListMessagesPagination };
|
|
348
348
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,WAAW,uBAAoB;AAC3C,OAAO,EAAE,8BAA8B,EAAE,uBAAoB;AAC7D,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAEL,KAAK,4BAA4B,EACjC,WAAW,EACZ,iCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,WAAW,uBAAoB;AAC3C,OAAO,EAAE,8BAA8B,EAAE,uBAAoB;AAC7D,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAEL,KAAK,4BAA4B,EACjC,WAAW,EACZ,iCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8BAA8B,EAAE,WAAW,CAAC,OAAO,CAAC;IAQnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,8BAA8B,EAAE,CAAC"}
|
|
@@ -66,6 +66,22 @@ const path_1 = require("../../internal/utils/path.js");
|
|
|
66
66
|
* **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
|
|
67
67
|
*/
|
|
68
68
|
class Messages extends resource_1.APIResource {
|
|
69
|
+
/**
|
|
70
|
+
* Retrieve messages from a specific chat with pagination support.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* // Automatically fetches more pages as needed.
|
|
75
|
+
* for await (const message of client.chats.messages.list(
|
|
76
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
77
|
+
* )) {
|
|
78
|
+
* // ...
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
list(chatID, query = {}, options) {
|
|
83
|
+
return this._client.getAPIList((0, path_1.path) `/v3/chats/${chatID}/messages`, (pagination_1.ListMessagesPagination), { query, ...options });
|
|
84
|
+
}
|
|
69
85
|
/**
|
|
70
86
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
71
87
|
* chat ID and want to send additional messages to it.
|
|
@@ -125,22 +141,6 @@ class Messages extends resource_1.APIResource {
|
|
|
125
141
|
send(chatID, body, options) {
|
|
126
142
|
return this._client.post((0, path_1.path) `/v3/chats/${chatID}/messages`, { body, ...options });
|
|
127
143
|
}
|
|
128
|
-
/**
|
|
129
|
-
* Retrieve messages from a specific chat with pagination support.
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```ts
|
|
133
|
-
* // Automatically fetches more pages as needed.
|
|
134
|
-
* for await (const message of client.chats.messages.list(
|
|
135
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
136
|
-
* )) {
|
|
137
|
-
* // ...
|
|
138
|
-
* }
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
list(chatID, query = {}, options) {
|
|
142
|
-
return this._client.getAPIList((0, path_1.path) `/v3/chats/${chatID}/messages`, (pagination_1.ListMessagesPagination), { query, ...options });
|
|
143
|
-
}
|
|
144
144
|
}
|
|
145
145
|
exports.Messages = Messages;
|
|
146
146
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,yDAI+B;AAE/B,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,yDAI+B;AAE/B,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,aAAa,MAAM,WAAW,EAClC,CAAA,mCAA2C,CAAA,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuDG;IACH,IAAI,CAAC,MAAc,EAAE,IAAuB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AArFD,4BAqFC"}
|
|
@@ -63,6 +63,22 @@ import { path } from "../../internal/utils/path.mjs";
|
|
|
63
63
|
* **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
|
|
64
64
|
*/
|
|
65
65
|
export class Messages extends APIResource {
|
|
66
|
+
/**
|
|
67
|
+
* Retrieve messages from a specific chat with pagination support.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* // Automatically fetches more pages as needed.
|
|
72
|
+
* for await (const message of client.chats.messages.list(
|
|
73
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
74
|
+
* )) {
|
|
75
|
+
* // ...
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
list(chatID, query = {}, options) {
|
|
80
|
+
return this._client.getAPIList(path `/v3/chats/${chatID}/messages`, (ListMessagesPagination), { query, ...options });
|
|
81
|
+
}
|
|
66
82
|
/**
|
|
67
83
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
68
84
|
* chat ID and want to send additional messages to it.
|
|
@@ -122,21 +138,5 @@ export class Messages extends APIResource {
|
|
|
122
138
|
send(chatID, body, options) {
|
|
123
139
|
return this._client.post(path `/v3/chats/${chatID}/messages`, { body, ...options });
|
|
124
140
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Retrieve messages from a specific chat with pagination support.
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```ts
|
|
130
|
-
* // Automatically fetches more pages as needed.
|
|
131
|
-
* for await (const message of client.chats.messages.list(
|
|
132
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
133
|
-
* )) {
|
|
134
|
-
* // ...
|
|
135
|
-
* }
|
|
136
|
-
* ```
|
|
137
|
-
*/
|
|
138
|
-
list(chatID, query = {}, options) {
|
|
139
|
-
return this._client.getAPIList(path `/v3/chats/${chatID}/messages`, (ListMessagesPagination), { query, ...options });
|
|
140
|
-
}
|
|
141
141
|
}
|
|
142
142
|
//# sourceMappingURL=messages.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD,OAAO,EACL,sBAAsB,GAGvB,kCAA8B;AAE/B,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD,OAAO,EACL,sBAAsB,GAGvB,kCAA8B;AAE/B,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,aAAa,MAAM,WAAW,EAClC,CAAA,sBAA2C,CAAA,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuDG;IACH,IAAI,CAAC,MAAc,EAAE,IAAuB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -11,26 +11,16 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
11
11
|
* **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
|
|
12
12
|
*/
|
|
13
13
|
export declare class ContactCard extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Returns the contact card for a specific phone number, or all contact cards for
|
|
16
|
-
* the authenticated partner if no `phone_number` is provided.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const contactCard = await client.contactCard.retrieve();
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
24
14
|
/**
|
|
25
15
|
* Creates a contact card for a phone number. This endpoint is intended for
|
|
26
16
|
* initial, one-time setup only.
|
|
27
17
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* `is_active` is `false`.
|
|
18
|
+
* If setup does not complete, the response is `500` (`2022`) — call this endpoint
|
|
19
|
+
* again.
|
|
31
20
|
*
|
|
32
|
-
* **Note:**
|
|
33
|
-
* `PATCH /v3/contact_card`
|
|
21
|
+
* **Note:** once a card is active, this endpoint returns `409` (`2014`) so an
|
|
22
|
+
* existing card is never overwritten by accident. Use `PATCH /v3/contact_card` to
|
|
23
|
+
* change it.
|
|
34
24
|
*
|
|
35
25
|
* @example
|
|
36
26
|
* ```ts
|
|
@@ -45,13 +35,24 @@ export declare class ContactCard extends APIResource {
|
|
|
45
35
|
*/
|
|
46
36
|
create(body: ContactCardCreateParams, options?: RequestOptions): APIPromise<SetContactCard>;
|
|
47
37
|
/**
|
|
48
|
-
*
|
|
38
|
+
* Returns the contact card for a specific phone number, or all contact cards for
|
|
39
|
+
* the authenticated partner if no `phone_number` is provided.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const contactCard = await client.contactCard.retrieve();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Partially updates the contact card for a phone number.
|
|
49
49
|
*
|
|
50
|
-
* Fetches the current
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* Fetches the current contact card and merges the provided fields. Only fields
|
|
51
|
+
* present in the request body are updated; omitted fields retain their existing
|
|
52
|
+
* values.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
54
|
+
* If the update does not complete, the response is `500` (`2022`) — call this
|
|
55
|
+
* endpoint again.
|
|
55
56
|
*
|
|
56
57
|
* @example
|
|
57
58
|
* ```ts
|
|
@@ -100,13 +101,6 @@ export declare namespace ContactCardRetrieveResponse {
|
|
|
100
101
|
last_name?: string;
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
export interface ContactCardRetrieveParams {
|
|
104
|
-
/**
|
|
105
|
-
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
106
|
-
* returned.
|
|
107
|
-
*/
|
|
108
|
-
phone_number?: string;
|
|
109
|
-
}
|
|
110
104
|
export interface ContactCardCreateParams {
|
|
111
105
|
/**
|
|
112
106
|
* First name for the contact card. Required.
|
|
@@ -125,6 +119,13 @@ export interface ContactCardCreateParams {
|
|
|
125
119
|
*/
|
|
126
120
|
last_name?: string;
|
|
127
121
|
}
|
|
122
|
+
export interface ContactCardRetrieveParams {
|
|
123
|
+
/**
|
|
124
|
+
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
125
|
+
* returned.
|
|
126
|
+
*/
|
|
127
|
+
phone_number?: string;
|
|
128
|
+
}
|
|
128
129
|
export interface ContactCardUpdateParams {
|
|
129
130
|
/**
|
|
130
131
|
* Query param: E.164 phone number of the contact card to update
|
|
@@ -144,6 +145,6 @@ export interface ContactCardUpdateParams {
|
|
|
144
145
|
last_name?: string;
|
|
145
146
|
}
|
|
146
147
|
export declare namespace ContactCard {
|
|
147
|
-
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type
|
|
148
|
+
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type ContactCardCreateParams as ContactCardCreateParams, type ContactCardRetrieveParams as ContactCardRetrieveParams, type ContactCardUpdateParams as ContactCardUpdateParams, };
|
|
148
149
|
}
|
|
149
150
|
//# sourceMappingURL=contact-card.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-card.d.mts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"contact-card.d.mts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;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OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -11,26 +11,16 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
11
11
|
* **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
|
|
12
12
|
*/
|
|
13
13
|
export declare class ContactCard extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Returns the contact card for a specific phone number, or all contact cards for
|
|
16
|
-
* the authenticated partner if no `phone_number` is provided.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const contactCard = await client.contactCard.retrieve();
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
24
14
|
/**
|
|
25
15
|
* Creates a contact card for a phone number. This endpoint is intended for
|
|
26
16
|
* initial, one-time setup only.
|
|
27
17
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* `is_active` is `false`.
|
|
18
|
+
* If setup does not complete, the response is `500` (`2022`) — call this endpoint
|
|
19
|
+
* again.
|
|
31
20
|
*
|
|
32
|
-
* **Note:**
|
|
33
|
-
* `PATCH /v3/contact_card`
|
|
21
|
+
* **Note:** once a card is active, this endpoint returns `409` (`2014`) so an
|
|
22
|
+
* existing card is never overwritten by accident. Use `PATCH /v3/contact_card` to
|
|
23
|
+
* change it.
|
|
34
24
|
*
|
|
35
25
|
* @example
|
|
36
26
|
* ```ts
|
|
@@ -45,13 +35,24 @@ export declare class ContactCard extends APIResource {
|
|
|
45
35
|
*/
|
|
46
36
|
create(body: ContactCardCreateParams, options?: RequestOptions): APIPromise<SetContactCard>;
|
|
47
37
|
/**
|
|
48
|
-
*
|
|
38
|
+
* Returns the contact card for a specific phone number, or all contact cards for
|
|
39
|
+
* the authenticated partner if no `phone_number` is provided.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const contactCard = await client.contactCard.retrieve();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Partially updates the contact card for a phone number.
|
|
49
49
|
*
|
|
50
|
-
* Fetches the current
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* Fetches the current contact card and merges the provided fields. Only fields
|
|
51
|
+
* present in the request body are updated; omitted fields retain their existing
|
|
52
|
+
* values.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
54
|
+
* If the update does not complete, the response is `500` (`2022`) — call this
|
|
55
|
+
* endpoint again.
|
|
55
56
|
*
|
|
56
57
|
* @example
|
|
57
58
|
* ```ts
|
|
@@ -100,13 +101,6 @@ export declare namespace ContactCardRetrieveResponse {
|
|
|
100
101
|
last_name?: string;
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
export interface ContactCardRetrieveParams {
|
|
104
|
-
/**
|
|
105
|
-
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
106
|
-
* returned.
|
|
107
|
-
*/
|
|
108
|
-
phone_number?: string;
|
|
109
|
-
}
|
|
110
104
|
export interface ContactCardCreateParams {
|
|
111
105
|
/**
|
|
112
106
|
* First name for the contact card. Required.
|
|
@@ -125,6 +119,13 @@ export interface ContactCardCreateParams {
|
|
|
125
119
|
*/
|
|
126
120
|
last_name?: string;
|
|
127
121
|
}
|
|
122
|
+
export interface ContactCardRetrieveParams {
|
|
123
|
+
/**
|
|
124
|
+
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
125
|
+
* returned.
|
|
126
|
+
*/
|
|
127
|
+
phone_number?: string;
|
|
128
|
+
}
|
|
128
129
|
export interface ContactCardUpdateParams {
|
|
129
130
|
/**
|
|
130
131
|
* Query param: E.164 phone number of the contact card to update
|
|
@@ -144,6 +145,6 @@ export interface ContactCardUpdateParams {
|
|
|
144
145
|
last_name?: string;
|
|
145
146
|
}
|
|
146
147
|
export declare namespace ContactCard {
|
|
147
|
-
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type
|
|
148
|
+
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type ContactCardCreateParams as ContactCardCreateParams, type ContactCardRetrieveParams as ContactCardRetrieveParams, type ContactCardUpdateParams as ContactCardUpdateParams, };
|
|
148
149
|
}
|
|
149
150
|
//# sourceMappingURL=contact-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-card.d.ts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"contact-card.d.ts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,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H,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -13,28 +13,16 @@ const resource_1 = require("../core/resource.js");
|
|
|
13
13
|
* **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
|
|
14
14
|
*/
|
|
15
15
|
class ContactCard extends resource_1.APIResource {
|
|
16
|
-
/**
|
|
17
|
-
* Returns the contact card for a specific phone number, or all contact cards for
|
|
18
|
-
* the authenticated partner if no `phone_number` is provided.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* const contactCard = await client.contactCard.retrieve();
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
retrieve(query = {}, options) {
|
|
26
|
-
return this._client.get('/v3/contact_card', { query, ...options });
|
|
27
|
-
}
|
|
28
16
|
/**
|
|
29
17
|
* Creates a contact card for a phone number. This endpoint is intended for
|
|
30
18
|
* initial, one-time setup only.
|
|
31
19
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* `is_active` is `false`.
|
|
20
|
+
* If setup does not complete, the response is `500` (`2022`) — call this endpoint
|
|
21
|
+
* again.
|
|
35
22
|
*
|
|
36
|
-
* **Note:**
|
|
37
|
-
* `PATCH /v3/contact_card`
|
|
23
|
+
* **Note:** once a card is active, this endpoint returns `409` (`2014`) so an
|
|
24
|
+
* existing card is never overwritten by accident. Use `PATCH /v3/contact_card` to
|
|
25
|
+
* change it.
|
|
38
26
|
*
|
|
39
27
|
* @example
|
|
40
28
|
* ```ts
|
|
@@ -51,13 +39,26 @@ class ContactCard extends resource_1.APIResource {
|
|
|
51
39
|
return this._client.post('/v3/contact_card', { body, ...options });
|
|
52
40
|
}
|
|
53
41
|
/**
|
|
54
|
-
*
|
|
42
|
+
* Returns the contact card for a specific phone number, or all contact cards for
|
|
43
|
+
* the authenticated partner if no `phone_number` is provided.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const contactCard = await client.contactCard.retrieve();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
retrieve(query = {}, options) {
|
|
51
|
+
return this._client.get('/v3/contact_card', { query, ...options });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Partially updates the contact card for a phone number.
|
|
55
55
|
*
|
|
56
|
-
* Fetches the current
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* Fetches the current contact card and merges the provided fields. Only fields
|
|
57
|
+
* present in the request body are updated; omitted fields retain their existing
|
|
58
|
+
* values.
|
|
59
59
|
*
|
|
60
|
-
*
|
|
60
|
+
* If the update does not complete, the response is `500` (`2022`) — call this
|
|
61
|
+
* endpoint again.
|
|
61
62
|
*
|
|
62
63
|
* @example
|
|
63
64
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-card.js","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;;;;;;;GAQG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"contact-card.js","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;;;;;;;GAQG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CACN,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,MAA+B,EAAE,OAAwB;QAC9D,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF;AApED,kCAoEC"}
|