telnyx 6.7.0 → 6.8.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 +50 -0
- package/client.d.mts +10 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -0
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/assistants/assistants.d.mts +5 -5
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +5 -5
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/chat.d.mts +6 -0
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +6 -0
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +6 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/messaging-10dlc/brand/brand.d.mts +1 -1
- package/resources/messaging-10dlc/brand/brand.d.mts.map +1 -1
- package/resources/messaging-10dlc/brand/brand.d.ts +1 -1
- package/resources/messaging-10dlc/brand/brand.d.ts.map +1 -1
- package/resources/messaging-10dlc/brand/brand.js.map +1 -1
- package/resources/messaging-10dlc/brand/brand.mjs.map +1 -1
- package/resources/shared.d.mts +25 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +25 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/sim-cards/actions.d.mts +39 -115
- package/resources/sim-cards/actions.d.mts.map +1 -1
- package/resources/sim-cards/actions.d.ts +39 -115
- package/resources/sim-cards/actions.d.ts.map +1 -1
- package/resources/sim-cards/index.d.mts +1 -1
- package/resources/sim-cards/index.d.mts.map +1 -1
- package/resources/sim-cards/index.d.ts +1 -1
- package/resources/sim-cards/index.d.ts.map +1 -1
- package/resources/sim-cards/index.js.map +1 -1
- package/resources/sim-cards/index.mjs.map +1 -1
- package/resources/sim-cards/sim-cards.d.mts +2 -2
- package/resources/sim-cards/sim-cards.d.mts.map +1 -1
- package/resources/sim-cards/sim-cards.d.ts +2 -2
- package/resources/sim-cards/sim-cards.d.ts.map +1 -1
- package/resources/sim-cards/sim-cards.js.map +1 -1
- package/resources/sim-cards/sim-cards.mjs.map +1 -1
- package/resources/text-to-speech/internal-base.d.mts +3 -3
- package/resources/text-to-speech/internal-base.d.ts +3 -3
- package/resources/text-to-speech/internal-base.js +1 -1
- package/resources/text-to-speech/internal-base.js.map +1 -1
- package/resources/text-to-speech/internal-base.mjs +1 -1
- package/resources/text-to-speech/internal-base.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +5 -3
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +5 -3
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/whatsapp/business-accounts/business-accounts.d.mts +132 -0
- package/resources/whatsapp/business-accounts/business-accounts.d.mts.map +1 -0
- package/resources/whatsapp/business-accounts/business-accounts.d.ts +132 -0
- package/resources/whatsapp/business-accounts/business-accounts.d.ts.map +1 -0
- package/resources/whatsapp/business-accounts/business-accounts.js +67 -0
- package/resources/whatsapp/business-accounts/business-accounts.js.map +1 -0
- package/resources/whatsapp/business-accounts/business-accounts.mjs +62 -0
- package/resources/whatsapp/business-accounts/business-accounts.mjs.map +1 -0
- package/resources/whatsapp/business-accounts/index.d.mts +4 -0
- package/resources/whatsapp/business-accounts/index.d.mts.map +1 -0
- package/resources/whatsapp/business-accounts/index.d.ts +4 -0
- package/resources/whatsapp/business-accounts/index.d.ts.map +1 -0
- package/resources/whatsapp/business-accounts/index.js +11 -0
- package/resources/whatsapp/business-accounts/index.js.map +1 -0
- package/resources/whatsapp/business-accounts/index.mjs +5 -0
- package/resources/whatsapp/business-accounts/index.mjs.map +1 -0
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts +76 -0
- package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -0
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts +76 -0
- package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -0
- package/resources/whatsapp/business-accounts/phone-numbers.js +49 -0
- package/resources/whatsapp/business-accounts/phone-numbers.js.map +1 -0
- package/resources/whatsapp/business-accounts/phone-numbers.mjs +45 -0
- package/resources/whatsapp/business-accounts/phone-numbers.mjs.map +1 -0
- package/resources/whatsapp/business-accounts/settings.d.mts +85 -0
- package/resources/whatsapp/business-accounts/settings.d.mts.map +1 -0
- package/resources/whatsapp/business-accounts/settings.d.ts +85 -0
- package/resources/whatsapp/business-accounts/settings.d.ts.map +1 -0
- package/resources/whatsapp/business-accounts/settings.js +41 -0
- package/resources/whatsapp/business-accounts/settings.js.map +1 -0
- package/resources/whatsapp/business-accounts/settings.mjs +37 -0
- package/resources/whatsapp/business-accounts/settings.mjs.map +1 -0
- package/resources/whatsapp/business-accounts.d.mts +2 -0
- package/resources/whatsapp/business-accounts.d.mts.map +1 -0
- package/resources/whatsapp/business-accounts.d.ts +2 -0
- package/resources/whatsapp/business-accounts.d.ts.map +1 -0
- package/resources/whatsapp/business-accounts.js +6 -0
- package/resources/whatsapp/business-accounts.js.map +1 -0
- package/resources/whatsapp/business-accounts.mjs +3 -0
- package/resources/whatsapp/business-accounts.mjs.map +1 -0
- package/resources/whatsapp/index.d.mts +5 -0
- package/resources/whatsapp/index.d.mts.map +1 -0
- package/resources/whatsapp/index.d.ts +5 -0
- package/resources/whatsapp/index.d.ts.map +1 -0
- package/resources/whatsapp/index.js +13 -0
- package/resources/whatsapp/index.js.map +1 -0
- package/resources/whatsapp/index.mjs +6 -0
- package/resources/whatsapp/index.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-settings.d.mts +58 -0
- package/resources/whatsapp/phone-numbers/calling-settings.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-settings.d.ts +58 -0
- package/resources/whatsapp/phone-numbers/calling-settings.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-settings.js +45 -0
- package/resources/whatsapp/phone-numbers/calling-settings.js.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-settings.mjs +41 -0
- package/resources/whatsapp/phone-numbers/calling-settings.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/index.d.mts +4 -0
- package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/index.d.ts +4 -0
- package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/index.js +11 -0
- package/resources/whatsapp/phone-numbers/index.js.map +1 -0
- package/resources/whatsapp/phone-numbers/index.mjs +5 -0
- package/resources/whatsapp/phone-numbers/index.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +101 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +101 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.js +89 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs +84 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/index.d.mts +3 -0
- package/resources/whatsapp/phone-numbers/profile/index.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/index.d.ts +3 -0
- package/resources/whatsapp/phone-numbers/profile/index.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/index.js +9 -0
- package/resources/whatsapp/phone-numbers/profile/index.js.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/index.mjs +4 -0
- package/resources/whatsapp/phone-numbers/profile/index.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/photo.d.mts +47 -0
- package/resources/whatsapp/phone-numbers/profile/photo.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/photo.d.ts +47 -0
- package/resources/whatsapp/phone-numbers/profile/photo.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/photo.js +46 -0
- package/resources/whatsapp/phone-numbers/profile/photo.js.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/photo.mjs +42 -0
- package/resources/whatsapp/phone-numbers/profile/photo.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/profile.d.mts +73 -0
- package/resources/whatsapp/phone-numbers/profile/profile.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/profile.d.ts +73 -0
- package/resources/whatsapp/phone-numbers/profile/profile.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/profile.js +49 -0
- package/resources/whatsapp/phone-numbers/profile/profile.js.map +1 -0
- package/resources/whatsapp/phone-numbers/profile/profile.mjs +44 -0
- package/resources/whatsapp/phone-numbers/profile/profile.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/profile.d.mts +2 -0
- package/resources/whatsapp/phone-numbers/profile.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile.d.ts +2 -0
- package/resources/whatsapp/phone-numbers/profile.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/profile.js +6 -0
- package/resources/whatsapp/phone-numbers/profile.js.map +1 -0
- package/resources/whatsapp/phone-numbers/profile.mjs +3 -0
- package/resources/whatsapp/phone-numbers/profile.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers.d.mts +2 -0
- package/resources/whatsapp/phone-numbers.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers.d.ts +2 -0
- package/resources/whatsapp/phone-numbers.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers.js +6 -0
- package/resources/whatsapp/phone-numbers.js.map +1 -0
- package/resources/whatsapp/phone-numbers.mjs +3 -0
- package/resources/whatsapp/phone-numbers.mjs.map +1 -0
- package/resources/whatsapp/templates.d.mts +73 -0
- package/resources/whatsapp/templates.d.mts.map +1 -0
- package/resources/whatsapp/templates.d.ts +73 -0
- package/resources/whatsapp/templates.d.ts.map +1 -0
- package/resources/whatsapp/templates.js +44 -0
- package/resources/whatsapp/templates.js.map +1 -0
- package/resources/whatsapp/templates.mjs +40 -0
- package/resources/whatsapp/templates.mjs.map +1 -0
- package/resources/whatsapp/whatsapp.d.mts +18 -0
- package/resources/whatsapp/whatsapp.d.mts.map +1 -0
- package/resources/whatsapp/whatsapp.d.ts +18 -0
- package/resources/whatsapp/whatsapp.d.ts.map +1 -0
- package/resources/whatsapp/whatsapp.js +25 -0
- package/resources/whatsapp/whatsapp.js.map +1 -0
- package/resources/whatsapp/whatsapp.mjs +20 -0
- package/resources/whatsapp/whatsapp.mjs.map +1 -0
- package/resources/whatsapp-message-templates.d.mts +37 -0
- package/resources/whatsapp-message-templates.d.mts.map +1 -0
- package/resources/whatsapp-message-templates.d.ts +37 -0
- package/resources/whatsapp-message-templates.d.ts.map +1 -0
- package/resources/whatsapp-message-templates.js +35 -0
- package/resources/whatsapp-message-templates.js.map +1 -0
- package/resources/whatsapp-message-templates.mjs +31 -0
- package/resources/whatsapp-message-templates.mjs.map +1 -0
- package/resources/whatsapp.d.mts +2 -0
- package/resources/whatsapp.d.mts.map +1 -0
- package/resources/whatsapp.d.ts +2 -0
- package/resources/whatsapp.d.ts.map +1 -0
- package/resources/whatsapp.js +6 -0
- package/resources/whatsapp.js.map +1 -0
- package/resources/whatsapp.mjs +3 -0
- package/resources/whatsapp.mjs.map +1 -0
- package/src/client.ts +24 -0
- package/src/resources/ai/assistants/assistants.ts +5 -5
- package/src/resources/ai/chat.ts +7 -0
- package/src/resources/index.ts +7 -0
- package/src/resources/messaging-10dlc/brand/brand.ts +17 -11
- package/src/resources/shared.ts +37 -0
- package/src/resources/sim-cards/actions.ts +43 -126
- package/src/resources/sim-cards/index.ts +1 -0
- package/src/resources/sim-cards/sim-cards.ts +2 -0
- package/src/resources/text-to-speech/internal-base.ts +4 -4
- package/src/resources/text-to-speech/text-to-speech.ts +3 -3
- package/src/resources/whatsapp/business-accounts/business-accounts.ts +217 -0
- package/src/resources/whatsapp/business-accounts/index.ts +23 -0
- package/src/resources/whatsapp/business-accounts/phone-numbers.ts +127 -0
- package/src/resources/whatsapp/business-accounts/settings.ts +116 -0
- package/src/resources/whatsapp/business-accounts.ts +3 -0
- package/src/resources/whatsapp/index.ts +24 -0
- package/src/resources/whatsapp/phone-numbers/calling-settings.ts +86 -0
- package/src/resources/whatsapp/phone-numbers/index.ts +24 -0
- package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +193 -0
- package/src/resources/whatsapp/phone-numbers/profile/index.ts +10 -0
- package/src/resources/whatsapp/phone-numbers/profile/photo.ts +70 -0
- package/src/resources/whatsapp/phone-numbers/profile/profile.ts +121 -0
- package/src/resources/whatsapp/phone-numbers/profile.ts +3 -0
- package/src/resources/whatsapp/phone-numbers.ts +3 -0
- package/src/resources/whatsapp/templates.ts +101 -0
- package/src/resources/whatsapp/whatsapp.ts +60 -0
- package/src/resources/whatsapp-message-templates.ts +63 -0
- package/src/resources/whatsapp.ts +3 -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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as CallingSettingsAPI from "./calling-settings.js";
|
|
3
|
+
import { CallingSettingRetrieveResponse, CallingSettingUpdateParams, CallingSettingUpdateResponse, CallingSettings, WhatsappCallingSettingsData } from "./calling-settings.js";
|
|
4
|
+
import * as ProfileAPI from "./profile/profile.js";
|
|
5
|
+
import { Profile, ProfileRetrieveResponse, ProfileUpdateParams, ProfileUpdateResponse, WhatsappProfileData } from "./profile/profile.js";
|
|
6
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
7
|
+
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../../../core/pagination.js";
|
|
8
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
9
|
+
/**
|
|
10
|
+
* Manage Whatsapp phone numbers
|
|
11
|
+
*/
|
|
12
|
+
export declare class PhoneNumbers extends APIResource {
|
|
13
|
+
callingSettings: CallingSettingsAPI.CallingSettings;
|
|
14
|
+
profile: ProfileAPI.Profile;
|
|
15
|
+
/**
|
|
16
|
+
* List Whatsapp phone numbers
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Automatically fetches more pages as needed.
|
|
21
|
+
* for await (const phoneNumberListResponse of client.whatsapp.phoneNumbers.list()) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(query?: PhoneNumberListParams | null | undefined, options?: RequestOptions): PagePromise<PhoneNumberListResponsesDefaultFlatPagination, PhoneNumberListResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Delete a Whatsapp phone number
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* await client.whatsapp.phoneNumbers.delete('phone_number');
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
delete(phoneNumber: string, options?: RequestOptions): APIPromise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Resend verification code
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* await client.whatsapp.phoneNumbers.resendVerification(
|
|
42
|
+
* 'phone_number',
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
resendVerification(phoneNumber: string, body: PhoneNumberResendVerificationParams, options?: RequestOptions): APIPromise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Submit verification code for a phone number
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* await client.whatsapp.phoneNumbers.verify('phone_number', {
|
|
53
|
+
* code: 'code',
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
verify(phoneNumber: string, body: PhoneNumberVerifyParams, options?: RequestOptions): APIPromise<void>;
|
|
58
|
+
}
|
|
59
|
+
export type PhoneNumberListResponsesDefaultFlatPagination = DefaultFlatPagination<PhoneNumberListResponse>;
|
|
60
|
+
export interface PhoneNumberListResponse {
|
|
61
|
+
calling_enabled?: boolean;
|
|
62
|
+
created_at?: string;
|
|
63
|
+
display_name?: string;
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Phone number in E164 format
|
|
67
|
+
*/
|
|
68
|
+
phone_number?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Whatsapp phone number ID
|
|
71
|
+
*/
|
|
72
|
+
phone_number_id?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Whatsapp quality rating
|
|
75
|
+
*/
|
|
76
|
+
quality_rating?: string;
|
|
77
|
+
record_type?: string;
|
|
78
|
+
status?: string;
|
|
79
|
+
/**
|
|
80
|
+
* User ID
|
|
81
|
+
*/
|
|
82
|
+
user_id?: string;
|
|
83
|
+
/**
|
|
84
|
+
* WABA ID of Whatsapp business account
|
|
85
|
+
*/
|
|
86
|
+
waba_id?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface PhoneNumberListParams extends DefaultFlatPaginationParams {
|
|
89
|
+
}
|
|
90
|
+
export interface PhoneNumberResendVerificationParams {
|
|
91
|
+
verification_method?: 'sms' | 'voice';
|
|
92
|
+
}
|
|
93
|
+
export interface PhoneNumberVerifyParams {
|
|
94
|
+
code: string;
|
|
95
|
+
}
|
|
96
|
+
export declare namespace PhoneNumbers {
|
|
97
|
+
export { type PhoneNumberListResponse as PhoneNumberListResponse, type PhoneNumberListResponsesDefaultFlatPagination as PhoneNumberListResponsesDefaultFlatPagination, type PhoneNumberListParams as PhoneNumberListParams, type PhoneNumberResendVerificationParams as PhoneNumberResendVerificationParams, type PhoneNumberVerifyParams as PhoneNumberVerifyParams, };
|
|
98
|
+
export { CallingSettings as CallingSettings, type WhatsappCallingSettingsData as WhatsappCallingSettingsData, type CallingSettingRetrieveResponse as CallingSettingRetrieveResponse, type CallingSettingUpdateResponse as CallingSettingUpdateResponse, type CallingSettingUpdateParams as CallingSettingUpdateParams, };
|
|
99
|
+
export { Profile as Profile, type WhatsappProfileData as WhatsappProfileData, type ProfileRetrieveResponse as ProfileRetrieveResponse, type ProfileUpdateResponse as ProfileUpdateResponse, type ProfileUpdateParams as ProfileUpdateParams, };
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=phone-numbers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-numbers.d.ts","sourceRoot":"","sources":["../../../src/resources/whatsapp/phone-numbers/phone-numbers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,kBAAkB;OACvB,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,eAAe,EACf,2BAA2B,EAC5B;OACM,KAAK,UAAU;OACf,EACL,OAAO,EACP,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACpB;OACM,EAAE,UAAU,EAAE;OACd,EACL,qBAAqB,EACrB,KAAK,2BAA2B,EAChC,WAAW,EACZ;OAEM,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,eAAe,EAAE,kBAAkB,CAAC,eAAe,CAAwD;IAC3G,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,6CAA6C,EAAE,uBAAuB,CAAC;IAQtF;;;;;;;OAOG;IACH,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ACvD,KAAK,6CAA6C,IAAI,6CAA6C,EACnG,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;IAEF,OAAO,EACL,eAAe,IAAI,eAAe,EAClC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PhoneNumbers = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const CallingSettingsAPI = tslib_1.__importStar(require("./calling-settings.js"));
|
|
8
|
+
const calling_settings_1 = require("./calling-settings.js");
|
|
9
|
+
const ProfileAPI = tslib_1.__importStar(require("./profile/profile.js"));
|
|
10
|
+
const profile_1 = require("./profile/profile.js");
|
|
11
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
12
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
13
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
14
|
+
/**
|
|
15
|
+
* Manage Whatsapp phone numbers
|
|
16
|
+
*/
|
|
17
|
+
class PhoneNumbers extends resource_1.APIResource {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.callingSettings = new CallingSettingsAPI.CallingSettings(this._client);
|
|
21
|
+
this.profile = new ProfileAPI.Profile(this._client);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* List Whatsapp phone numbers
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* // Automatically fetches more pages as needed.
|
|
29
|
+
* for await (const phoneNumberListResponse of client.whatsapp.phoneNumbers.list()) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(query = {}, options) {
|
|
35
|
+
return this._client.getAPIList('/v2/whatsapp/phone_numbers', (pagination_1.DefaultFlatPagination), { query, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Delete a Whatsapp phone number
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* await client.whatsapp.phoneNumbers.delete('phone_number');
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
delete(phoneNumber, options) {
|
|
46
|
+
return this._client.delete((0, path_1.path) `/v2/whatsapp/phone_numbers/${phoneNumber}`, {
|
|
47
|
+
...options,
|
|
48
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Resend verification code
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* await client.whatsapp.phoneNumbers.resendVerification(
|
|
57
|
+
* 'phone_number',
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
resendVerification(phoneNumber, body, options) {
|
|
62
|
+
return this._client.post((0, path_1.path) `/v2/whatsapp/phone_numbers/${phoneNumber}/resend_verification`, {
|
|
63
|
+
body,
|
|
64
|
+
...options,
|
|
65
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Submit verification code for a phone number
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* await client.whatsapp.phoneNumbers.verify('phone_number', {
|
|
74
|
+
* code: 'code',
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
verify(phoneNumber, body, options) {
|
|
79
|
+
return this._client.post((0, path_1.path) `/v2/whatsapp/phone_numbers/${phoneNumber}/verify`, {
|
|
80
|
+
body,
|
|
81
|
+
...options,
|
|
82
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.PhoneNumbers = PhoneNumbers;
|
|
87
|
+
PhoneNumbers.CallingSettings = calling_settings_1.CallingSettings;
|
|
88
|
+
PhoneNumbers.Profile = profile_1.Profile;
|
|
89
|
+
//# sourceMappingURL=phone-numbers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-numbers.js","sourceRoot":"","sources":["../../../src/resources/whatsapp/phone-numbers/phone-numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,kFAAyD;AACzD,4DAM4B;AAC5B,yEAAgD;AAChD,kDAM2B;AAE3B,4DAIkC;AAClC,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,oBAAe,GAAuC,IAAI,kBAAkB,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3G,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA8ErE,CAAC;IA5EC;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CA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 +1,84 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import * as CallingSettingsAPI from "./calling-settings.mjs";
|
|
4
|
+
import { CallingSettings, } from "./calling-settings.mjs";
|
|
5
|
+
import * as ProfileAPI from "./profile/profile.mjs";
|
|
6
|
+
import { Profile, } from "./profile/profile.mjs";
|
|
7
|
+
import { DefaultFlatPagination, } from "../../../core/pagination.mjs";
|
|
8
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
9
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
10
|
+
/**
|
|
11
|
+
* Manage Whatsapp phone numbers
|
|
12
|
+
*/
|
|
13
|
+
export class PhoneNumbers extends APIResource {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.callingSettings = new CallingSettingsAPI.CallingSettings(this._client);
|
|
17
|
+
this.profile = new ProfileAPI.Profile(this._client);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List Whatsapp phone numbers
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* // Automatically fetches more pages as needed.
|
|
25
|
+
* for await (const phoneNumberListResponse of client.whatsapp.phoneNumbers.list()) {
|
|
26
|
+
* // ...
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
list(query = {}, options) {
|
|
31
|
+
return this._client.getAPIList('/v2/whatsapp/phone_numbers', (DefaultFlatPagination), { query, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Delete a Whatsapp phone number
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* await client.whatsapp.phoneNumbers.delete('phone_number');
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
delete(phoneNumber, options) {
|
|
42
|
+
return this._client.delete(path `/v2/whatsapp/phone_numbers/${phoneNumber}`, {
|
|
43
|
+
...options,
|
|
44
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resend verification code
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* await client.whatsapp.phoneNumbers.resendVerification(
|
|
53
|
+
* 'phone_number',
|
|
54
|
+
* );
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
resendVerification(phoneNumber, body, options) {
|
|
58
|
+
return this._client.post(path `/v2/whatsapp/phone_numbers/${phoneNumber}/resend_verification`, {
|
|
59
|
+
body,
|
|
60
|
+
...options,
|
|
61
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Submit verification code for a phone number
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* await client.whatsapp.phoneNumbers.verify('phone_number', {
|
|
70
|
+
* code: 'code',
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
verify(phoneNumber, body, options) {
|
|
75
|
+
return this._client.post(path `/v2/whatsapp/phone_numbers/${phoneNumber}/verify`, {
|
|
76
|
+
body,
|
|
77
|
+
...options,
|
|
78
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
PhoneNumbers.CallingSettings = CallingSettings;
|
|
83
|
+
PhoneNumbers.Profile = Profile;
|
|
84
|
+
//# sourceMappingURL=phone-numbers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-numbers.mjs","sourceRoot":"","sources":["../../../src/resources/whatsapp/phone-numbers/phone-numbers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EA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IACL,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,WAAmB,EAAE,IAA6B,EAAE,OAAwB;QACjF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,8BAA8B,WAAW,SAAS,EAAE;YAC/E,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAqDD,YAAY,CAAC,eAAe,GAAG,eAAe,CAAC;AAC/C,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Photo, type PhotoUploadResponse, type PhotoUploadParams } from "./photo.mjs";
|
|
2
|
+
export { Profile, type WhatsappProfileData, type ProfileRetrieveResponse, type ProfileUpdateResponse, type ProfileUpdateParams, } from "./profile.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/index.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE;OAC3D,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Photo, type PhotoUploadResponse, type PhotoUploadParams } from "./photo.js";
|
|
2
|
+
export { Profile, type WhatsappProfileData, type ProfileRetrieveResponse, type ProfileUpdateResponse, type ProfileUpdateParams, } from "./profile.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/index.ts"],"names":[],"mappings":"OAEO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE;OAC3D,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Profile = exports.Photo = void 0;
|
|
5
|
+
var photo_1 = require("./photo.js");
|
|
6
|
+
Object.defineProperty(exports, "Photo", { enumerable: true, get: function () { return photo_1.Photo; } });
|
|
7
|
+
var profile_1 = require("./profile.js");
|
|
8
|
+
Object.defineProperty(exports, "Profile", { enumerable: true, get: function () { return profile_1.Profile; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAAkF;AAAzE,8FAAA,KAAK,OAAA;AACd,wCAMmB;AALjB,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,KAAK,EAAoD;OAC3D,EACL,OAAO,GAKR"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
2
|
+
import * as ProfileAPI from "./profile.mjs";
|
|
3
|
+
import { APIPromise } from "../../../../core/api-promise.mjs";
|
|
4
|
+
import { type Uploadable } from "../../../../core/uploads.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Manage Whatsapp phone numbers
|
|
8
|
+
*/
|
|
9
|
+
export declare class Photo extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Delete Whatsapp profile photo
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* await client.whatsapp.phoneNumbers.profile.photo.delete(
|
|
16
|
+
* 'phone_number',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
delete(phoneNumber: string, options?: RequestOptions): APIPromise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Upload Whatsapp profile photo
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response =
|
|
27
|
+
* await client.whatsapp.phoneNumbers.profile.photo.upload(
|
|
28
|
+
* 'phone_number',
|
|
29
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
upload(phoneNumber: string, body: PhotoUploadParams, options?: RequestOptions): APIPromise<PhotoUploadResponse>;
|
|
34
|
+
}
|
|
35
|
+
export interface PhotoUploadResponse {
|
|
36
|
+
data?: ProfileAPI.WhatsappProfileData;
|
|
37
|
+
}
|
|
38
|
+
export interface PhotoUploadParams {
|
|
39
|
+
/**
|
|
40
|
+
* Image file (JPEG recommended, max 10 MB)
|
|
41
|
+
*/
|
|
42
|
+
file: Uploadable;
|
|
43
|
+
}
|
|
44
|
+
export declare namespace Photo {
|
|
45
|
+
export { type PhotoUploadResponse as PhotoUploadResponse, type PhotoUploadParams as PhotoUploadParams };
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=photo.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photo.d.mts","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/photo.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOvE;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAMnC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.js";
|
|
2
|
+
import * as ProfileAPI from "./profile.js";
|
|
3
|
+
import { APIPromise } from "../../../../core/api-promise.js";
|
|
4
|
+
import { type Uploadable } from "../../../../core/uploads.js";
|
|
5
|
+
import { RequestOptions } from "../../../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Manage Whatsapp phone numbers
|
|
8
|
+
*/
|
|
9
|
+
export declare class Photo extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Delete Whatsapp profile photo
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* await client.whatsapp.phoneNumbers.profile.photo.delete(
|
|
16
|
+
* 'phone_number',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
delete(phoneNumber: string, options?: RequestOptions): APIPromise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Upload Whatsapp profile photo
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response =
|
|
27
|
+
* await client.whatsapp.phoneNumbers.profile.photo.upload(
|
|
28
|
+
* 'phone_number',
|
|
29
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
upload(phoneNumber: string, body: PhotoUploadParams, options?: RequestOptions): APIPromise<PhotoUploadResponse>;
|
|
34
|
+
}
|
|
35
|
+
export interface PhotoUploadResponse {
|
|
36
|
+
data?: ProfileAPI.WhatsappProfileData;
|
|
37
|
+
}
|
|
38
|
+
export interface PhotoUploadParams {
|
|
39
|
+
/**
|
|
40
|
+
* Image file (JPEG recommended, max 10 MB)
|
|
41
|
+
*/
|
|
42
|
+
file: Uploadable;
|
|
43
|
+
}
|
|
44
|
+
export declare namespace Photo {
|
|
45
|
+
export { type PhotoUploadResponse as PhotoUploadResponse, type PhotoUploadParams as PhotoUploadParams };
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=photo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photo.d.ts","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/photo.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOvE;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAMnC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Photo = void 0;
|
|
5
|
+
const resource_1 = require("../../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../../internal/headers.js");
|
|
7
|
+
const uploads_1 = require("../../../../internal/uploads.js");
|
|
8
|
+
const path_1 = require("../../../../internal/utils/path.js");
|
|
9
|
+
/**
|
|
10
|
+
* Manage Whatsapp phone numbers
|
|
11
|
+
*/
|
|
12
|
+
class Photo extends resource_1.APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Delete Whatsapp profile photo
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* await client.whatsapp.phoneNumbers.profile.photo.delete(
|
|
19
|
+
* 'phone_number',
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
delete(phoneNumber, options) {
|
|
24
|
+
return this._client.delete((0, path_1.path) `/v2/whatsapp/phone_numbers/${phoneNumber}/profile/photo`, {
|
|
25
|
+
...options,
|
|
26
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Upload Whatsapp profile photo
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const response =
|
|
35
|
+
* await client.whatsapp.phoneNumbers.profile.photo.upload(
|
|
36
|
+
* 'phone_number',
|
|
37
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
upload(phoneNumber, body, options) {
|
|
42
|
+
return this._client.post((0, path_1.path) `/v2/whatsapp/phone_numbers/${phoneNumber}/profile/photo`, (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Photo = Photo;
|
|
46
|
+
//# sourceMappingURL=photo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photo.js","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/photo.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAwD;AAIxD,6DAA4D;AAE5D,6DAA2E;AAC3E,6DAAuD;AAEvD;;GAEG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,8BAA8B,WAAW,gBAAgB,EAAE;YACxF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAmB,EACnB,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,8BAA8B,WAAW,gBAAgB,EAC7D,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF;AAxCD,sBAwCC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../../internal/headers.mjs";
|
|
4
|
+
import { multipartFormRequestOptions } from "../../../../internal/uploads.mjs";
|
|
5
|
+
import { path } from "../../../../internal/utils/path.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Manage Whatsapp phone numbers
|
|
8
|
+
*/
|
|
9
|
+
export class Photo extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Delete Whatsapp profile photo
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* await client.whatsapp.phoneNumbers.profile.photo.delete(
|
|
16
|
+
* 'phone_number',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
delete(phoneNumber, options) {
|
|
21
|
+
return this._client.delete(path `/v2/whatsapp/phone_numbers/${phoneNumber}/profile/photo`, {
|
|
22
|
+
...options,
|
|
23
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Upload Whatsapp profile photo
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response =
|
|
32
|
+
* await client.whatsapp.phoneNumbers.profile.photo.upload(
|
|
33
|
+
* 'phone_number',
|
|
34
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
upload(phoneNumber, body, options) {
|
|
39
|
+
return this._client.post(path `/v2/whatsapp/phone_numbers/${phoneNumber}/profile/photo`, multipartFormRequestOptions({ body, ...options }, this._client));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=photo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"photo.mjs","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/photo.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,8BAA8B,WAAW,gBAAgB,EAAE;YACxF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAmB,EACnB,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,8BAA8B,WAAW,gBAAgB,EAC7D,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
2
|
+
import * as PhotoAPI from "./photo.mjs";
|
|
3
|
+
import { Photo, PhotoUploadParams, PhotoUploadResponse } from "./photo.mjs";
|
|
4
|
+
import { APIPromise } from "../../../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Manage Whatsapp phone numbers
|
|
8
|
+
*/
|
|
9
|
+
export declare class Profile extends APIResource {
|
|
10
|
+
photo: PhotoAPI.Photo;
|
|
11
|
+
/**
|
|
12
|
+
* Get phone number business profile
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const profile =
|
|
17
|
+
* await client.whatsapp.phoneNumbers.profile.retrieve(
|
|
18
|
+
* 'phone_number',
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
retrieve(phoneNumber: string, options?: RequestOptions): APIPromise<ProfileRetrieveResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Update phone number business profile
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const profile =
|
|
29
|
+
* await client.whatsapp.phoneNumbers.profile.update(
|
|
30
|
+
* 'phone_number',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
update(phoneNumber: string, body: ProfileUpdateParams, options?: RequestOptions): APIPromise<ProfileUpdateResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface WhatsappProfileData {
|
|
37
|
+
id?: string;
|
|
38
|
+
about?: string;
|
|
39
|
+
address?: string;
|
|
40
|
+
category?: string;
|
|
41
|
+
created_at?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
display_name?: string;
|
|
44
|
+
email?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whatsapp phone number ID
|
|
47
|
+
*/
|
|
48
|
+
phone_number_id?: string;
|
|
49
|
+
profile_photo_url?: string;
|
|
50
|
+
record_type?: string;
|
|
51
|
+
updated_at?: string;
|
|
52
|
+
website?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ProfileRetrieveResponse {
|
|
55
|
+
data?: WhatsappProfileData;
|
|
56
|
+
}
|
|
57
|
+
export interface ProfileUpdateResponse {
|
|
58
|
+
data?: WhatsappProfileData;
|
|
59
|
+
}
|
|
60
|
+
export interface ProfileUpdateParams {
|
|
61
|
+
about?: string;
|
|
62
|
+
address?: string;
|
|
63
|
+
category?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
display_name?: string;
|
|
66
|
+
email?: string;
|
|
67
|
+
website?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare namespace Profile {
|
|
70
|
+
export { type WhatsappProfileData as WhatsappProfileData, type ProfileRetrieveResponse as ProfileRetrieveResponse, type ProfileUpdateResponse as ProfileUpdateResponse, type ProfileUpdateParams as ProfileUpdateParams, };
|
|
71
|
+
export { Photo as Photo, type PhotoUploadResponse as PhotoUploadResponse, type PhotoUploadParams as PhotoUploadParams, };
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=profile.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.mts","sourceRoot":"","sources":["../../../../src/resources/whatsapp/phone-numbers/profile/profile.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE;OACjD,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI5F;;;;;;;;;;OAUG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;CAGrC;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,KAAK,CAAC,EAAE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