@zavudev/sdk 0.22.0 → 0.23.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 +8 -0
- package/package.json +1 -1
- package/resources/contacts.d.mts +88 -11
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +88 -11
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +1 -1
- package/resources/contacts.mjs +1 -1
- package/src/resources/contacts.ts +107 -10
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.23.0 (2026-01-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.22.0...v0.23.0](https://github.com/zavudev/sdk-typescript/compare/v0.22.0...v0.23.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([ba0d465](https://github.com/zavudev/sdk-typescript/commit/ba0d46537614eacc625b55f7d6436c5f3a7ef3ee))
|
|
10
|
+
|
|
3
11
|
## 0.22.0 (2026-01-17)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.21.0...v0.22.0](https://github.com/zavudev/sdk-typescript/compare/v0.21.0...v0.22.0)
|
package/package.json
CHANGED
package/resources/contacts.d.mts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class Contacts extends APIResource {
|
|
|
12
12
|
*/
|
|
13
13
|
update(contactID: string, body: ContactUpdateParams, options?: RequestOptions): APIPromise<Contact>;
|
|
14
14
|
/**
|
|
15
|
-
* List contacts
|
|
15
|
+
* List contacts with their communication channels.
|
|
16
16
|
*/
|
|
17
17
|
list(query?: ContactListParams | null | undefined, options?: RequestOptions): PagePromise<ContactsCursor, Contact>;
|
|
18
18
|
/**
|
|
@@ -24,31 +24,108 @@ export type ContactsCursor = Cursor<Contact>;
|
|
|
24
24
|
export interface Contact {
|
|
25
25
|
id: string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* List of available messaging channels for this contact.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
availableChannels: Array<string>;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
metadata: {
|
|
32
|
+
[key: string]: string;
|
|
33
|
+
};
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Whether this contact has been verified.
|
|
36
|
+
*/
|
|
37
|
+
verified: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* All communication channels for this contact.
|
|
32
40
|
*/
|
|
33
|
-
|
|
41
|
+
channels?: Array<Contact.Channel>;
|
|
34
42
|
countryCode?: string;
|
|
35
|
-
createdAt?: string;
|
|
36
43
|
/**
|
|
37
44
|
* Preferred channel for this contact.
|
|
38
45
|
*/
|
|
39
46
|
defaultChannel?: 'sms' | 'whatsapp' | 'telegram' | 'email';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Display name for the contact.
|
|
49
|
+
*/
|
|
50
|
+
displayName?: string;
|
|
51
|
+
/**
|
|
52
|
+
* DEPRECATED: Use primaryPhone instead. Primary phone number in E.164 format.
|
|
53
|
+
*/
|
|
54
|
+
phoneNumber?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Primary email address.
|
|
57
|
+
*/
|
|
58
|
+
primaryEmail?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Primary phone number in E.164 format.
|
|
61
|
+
*/
|
|
62
|
+
primaryPhone?: string;
|
|
43
63
|
/**
|
|
44
64
|
* Contact's WhatsApp profile name. Only available for WhatsApp contacts.
|
|
45
65
|
*/
|
|
46
66
|
profileName?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* ID of a contact suggested for merging.
|
|
69
|
+
*/
|
|
70
|
+
suggestedMergeWith?: string;
|
|
47
71
|
updatedAt?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare namespace Contact {
|
|
48
74
|
/**
|
|
49
|
-
*
|
|
75
|
+
* A communication channel for a contact.
|
|
50
76
|
*/
|
|
51
|
-
|
|
77
|
+
interface Channel {
|
|
78
|
+
id: string;
|
|
79
|
+
/**
|
|
80
|
+
* Channel type.
|
|
81
|
+
*/
|
|
82
|
+
channel: 'sms' | 'whatsapp' | 'email' | 'telegram';
|
|
83
|
+
createdAt: string;
|
|
84
|
+
/**
|
|
85
|
+
* Channel identifier (phone number or email address).
|
|
86
|
+
*/
|
|
87
|
+
identifier: string;
|
|
88
|
+
/**
|
|
89
|
+
* Whether this is the primary channel for its type.
|
|
90
|
+
*/
|
|
91
|
+
isPrimary: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this channel has been verified.
|
|
94
|
+
*/
|
|
95
|
+
verified: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* ISO country code for phone numbers.
|
|
98
|
+
*/
|
|
99
|
+
countryCode?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Optional label for the channel.
|
|
102
|
+
*/
|
|
103
|
+
label?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Last time a message was received on this channel.
|
|
106
|
+
*/
|
|
107
|
+
lastInboundAt?: string;
|
|
108
|
+
metadata?: {
|
|
109
|
+
[key: string]: string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Delivery metrics for this channel.
|
|
113
|
+
*/
|
|
114
|
+
metrics?: Channel.Metrics;
|
|
115
|
+
updatedAt?: string;
|
|
116
|
+
}
|
|
117
|
+
namespace Channel {
|
|
118
|
+
/**
|
|
119
|
+
* Delivery metrics for this channel.
|
|
120
|
+
*/
|
|
121
|
+
interface Metrics {
|
|
122
|
+
avgDeliveryTimeMs?: number;
|
|
123
|
+
failureCount?: number;
|
|
124
|
+
lastSuccessAt?: string;
|
|
125
|
+
successCount?: number;
|
|
126
|
+
totalAttempts?: number;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
52
129
|
}
|
|
53
130
|
export interface ContactUpdateParams {
|
|
54
131
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.mts","sourceRoot":"","sources":["../src/resources/contacts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAI1E;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAInG;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC;IAIvC;;OAEG;IACH,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAGpF;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAE7C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"contacts.d.mts","sourceRoot":"","sources":["../src/resources/contacts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,M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E,CAAC;CACtC;AAED,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/contacts.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class Contacts extends APIResource {
|
|
|
12
12
|
*/
|
|
13
13
|
update(contactID: string, body: ContactUpdateParams, options?: RequestOptions): APIPromise<Contact>;
|
|
14
14
|
/**
|
|
15
|
-
* List contacts
|
|
15
|
+
* List contacts with their communication channels.
|
|
16
16
|
*/
|
|
17
17
|
list(query?: ContactListParams | null | undefined, options?: RequestOptions): PagePromise<ContactsCursor, Contact>;
|
|
18
18
|
/**
|
|
@@ -24,31 +24,108 @@ export type ContactsCursor = Cursor<Contact>;
|
|
|
24
24
|
export interface Contact {
|
|
25
25
|
id: string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* List of available messaging channels for this contact.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
availableChannels: Array<string>;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
metadata: {
|
|
32
|
+
[key: string]: string;
|
|
33
|
+
};
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Whether this contact has been verified.
|
|
36
|
+
*/
|
|
37
|
+
verified: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* All communication channels for this contact.
|
|
32
40
|
*/
|
|
33
|
-
|
|
41
|
+
channels?: Array<Contact.Channel>;
|
|
34
42
|
countryCode?: string;
|
|
35
|
-
createdAt?: string;
|
|
36
43
|
/**
|
|
37
44
|
* Preferred channel for this contact.
|
|
38
45
|
*/
|
|
39
46
|
defaultChannel?: 'sms' | 'whatsapp' | 'telegram' | 'email';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Display name for the contact.
|
|
49
|
+
*/
|
|
50
|
+
displayName?: string;
|
|
51
|
+
/**
|
|
52
|
+
* DEPRECATED: Use primaryPhone instead. Primary phone number in E.164 format.
|
|
53
|
+
*/
|
|
54
|
+
phoneNumber?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Primary email address.
|
|
57
|
+
*/
|
|
58
|
+
primaryEmail?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Primary phone number in E.164 format.
|
|
61
|
+
*/
|
|
62
|
+
primaryPhone?: string;
|
|
43
63
|
/**
|
|
44
64
|
* Contact's WhatsApp profile name. Only available for WhatsApp contacts.
|
|
45
65
|
*/
|
|
46
66
|
profileName?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* ID of a contact suggested for merging.
|
|
69
|
+
*/
|
|
70
|
+
suggestedMergeWith?: string;
|
|
47
71
|
updatedAt?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare namespace Contact {
|
|
48
74
|
/**
|
|
49
|
-
*
|
|
75
|
+
* A communication channel for a contact.
|
|
50
76
|
*/
|
|
51
|
-
|
|
77
|
+
interface Channel {
|
|
78
|
+
id: string;
|
|
79
|
+
/**
|
|
80
|
+
* Channel type.
|
|
81
|
+
*/
|
|
82
|
+
channel: 'sms' | 'whatsapp' | 'email' | 'telegram';
|
|
83
|
+
createdAt: string;
|
|
84
|
+
/**
|
|
85
|
+
* Channel identifier (phone number or email address).
|
|
86
|
+
*/
|
|
87
|
+
identifier: string;
|
|
88
|
+
/**
|
|
89
|
+
* Whether this is the primary channel for its type.
|
|
90
|
+
*/
|
|
91
|
+
isPrimary: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this channel has been verified.
|
|
94
|
+
*/
|
|
95
|
+
verified: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* ISO country code for phone numbers.
|
|
98
|
+
*/
|
|
99
|
+
countryCode?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Optional label for the channel.
|
|
102
|
+
*/
|
|
103
|
+
label?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Last time a message was received on this channel.
|
|
106
|
+
*/
|
|
107
|
+
lastInboundAt?: string;
|
|
108
|
+
metadata?: {
|
|
109
|
+
[key: string]: string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Delivery metrics for this channel.
|
|
113
|
+
*/
|
|
114
|
+
metrics?: Channel.Metrics;
|
|
115
|
+
updatedAt?: string;
|
|
116
|
+
}
|
|
117
|
+
namespace Channel {
|
|
118
|
+
/**
|
|
119
|
+
* Delivery metrics for this channel.
|
|
120
|
+
*/
|
|
121
|
+
interface Metrics {
|
|
122
|
+
avgDeliveryTimeMs?: number;
|
|
123
|
+
failureCount?: number;
|
|
124
|
+
lastSuccessAt?: string;
|
|
125
|
+
successCount?: number;
|
|
126
|
+
totalAttempts?: number;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
52
129
|
}
|
|
53
130
|
export interface ContactUpdateParams {
|
|
54
131
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../src/resources/contacts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAI1E;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAInG;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,iB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Q,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QAErC;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;QAE1B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,OAAO,CAAC;QACvB;;WAEG;QACH,UAAiB,OAAO;YACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;YAE3B,YAAY,CAAC,EAAE,MAAM,CAAC;YAEtB,aAAa,CAAC,EAAE,MAAM,CAAC;YAEvB,YAAY,CAAC,EAAE,MAAM,CAAC;YAEtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;IAElE,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/contacts.js
CHANGED
|
@@ -19,7 +19,7 @@ class Contacts extends resource_1.APIResource {
|
|
|
19
19
|
return this._client.patch((0, path_1.path) `/v1/contacts/${contactID}`, { body, ...options });
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* List contacts
|
|
22
|
+
* List contacts with their communication channels.
|
|
23
23
|
*/
|
|
24
24
|
list(query = {}, options) {
|
|
25
25
|
return this._client.getAPIList('/v1/contacts', (pagination_1.Cursor), { query, ...options });
|
package/resources/contacts.mjs
CHANGED
|
@@ -16,7 +16,7 @@ export class Contacts extends APIResource {
|
|
|
16
16
|
return this._client.patch(path `/v1/contacts/${contactID}`, { body, ...options });
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* List contacts
|
|
19
|
+
* List contacts with their communication channels.
|
|
20
20
|
*/
|
|
21
21
|
list(query = {}, options) {
|
|
22
22
|
return this._client.getAPIList('/v1/contacts', (Cursor), { query, ...options });
|
|
@@ -22,7 +22,7 @@ export class Contacts extends APIResource {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* List contacts
|
|
25
|
+
* List contacts with their communication channels.
|
|
26
26
|
*/
|
|
27
27
|
list(
|
|
28
28
|
query: ContactListParams | null | undefined = {},
|
|
@@ -45,37 +45,134 @@ export interface Contact {
|
|
|
45
45
|
id: string;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* List of available messaging channels for this contact.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
availableChannels: Array<string>;
|
|
51
|
+
|
|
52
|
+
createdAt: string;
|
|
53
|
+
|
|
54
|
+
metadata: { [key: string]: string };
|
|
51
55
|
|
|
52
56
|
/**
|
|
53
|
-
*
|
|
57
|
+
* Whether this contact has been verified.
|
|
54
58
|
*/
|
|
55
|
-
|
|
59
|
+
verified: boolean;
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
/**
|
|
62
|
+
* All communication channels for this contact.
|
|
63
|
+
*/
|
|
64
|
+
channels?: Array<Contact.Channel>;
|
|
58
65
|
|
|
59
|
-
|
|
66
|
+
countryCode?: string;
|
|
60
67
|
|
|
61
68
|
/**
|
|
62
69
|
* Preferred channel for this contact.
|
|
63
70
|
*/
|
|
64
71
|
defaultChannel?: 'sms' | 'whatsapp' | 'telegram' | 'email';
|
|
65
72
|
|
|
66
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Display name for the contact.
|
|
75
|
+
*/
|
|
76
|
+
displayName?: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* DEPRECATED: Use primaryPhone instead. Primary phone number in E.164 format.
|
|
80
|
+
*/
|
|
81
|
+
phoneNumber?: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Primary email address.
|
|
85
|
+
*/
|
|
86
|
+
primaryEmail?: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Primary phone number in E.164 format.
|
|
90
|
+
*/
|
|
91
|
+
primaryPhone?: string;
|
|
67
92
|
|
|
68
93
|
/**
|
|
69
94
|
* Contact's WhatsApp profile name. Only available for WhatsApp contacts.
|
|
70
95
|
*/
|
|
71
96
|
profileName?: string | null;
|
|
72
97
|
|
|
98
|
+
/**
|
|
99
|
+
* ID of a contact suggested for merging.
|
|
100
|
+
*/
|
|
101
|
+
suggestedMergeWith?: string;
|
|
102
|
+
|
|
73
103
|
updatedAt?: string;
|
|
104
|
+
}
|
|
74
105
|
|
|
106
|
+
export namespace Contact {
|
|
75
107
|
/**
|
|
76
|
-
*
|
|
108
|
+
* A communication channel for a contact.
|
|
77
109
|
*/
|
|
78
|
-
|
|
110
|
+
export interface Channel {
|
|
111
|
+
id: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Channel type.
|
|
115
|
+
*/
|
|
116
|
+
channel: 'sms' | 'whatsapp' | 'email' | 'telegram';
|
|
117
|
+
|
|
118
|
+
createdAt: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Channel identifier (phone number or email address).
|
|
122
|
+
*/
|
|
123
|
+
identifier: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Whether this is the primary channel for its type.
|
|
127
|
+
*/
|
|
128
|
+
isPrimary: boolean;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Whether this channel has been verified.
|
|
132
|
+
*/
|
|
133
|
+
verified: boolean;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* ISO country code for phone numbers.
|
|
137
|
+
*/
|
|
138
|
+
countryCode?: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Optional label for the channel.
|
|
142
|
+
*/
|
|
143
|
+
label?: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Last time a message was received on this channel.
|
|
147
|
+
*/
|
|
148
|
+
lastInboundAt?: string;
|
|
149
|
+
|
|
150
|
+
metadata?: { [key: string]: string };
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Delivery metrics for this channel.
|
|
154
|
+
*/
|
|
155
|
+
metrics?: Channel.Metrics;
|
|
156
|
+
|
|
157
|
+
updatedAt?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export namespace Channel {
|
|
161
|
+
/**
|
|
162
|
+
* Delivery metrics for this channel.
|
|
163
|
+
*/
|
|
164
|
+
export interface Metrics {
|
|
165
|
+
avgDeliveryTimeMs?: number;
|
|
166
|
+
|
|
167
|
+
failureCount?: number;
|
|
168
|
+
|
|
169
|
+
lastSuccessAt?: string;
|
|
170
|
+
|
|
171
|
+
successCount?: number;
|
|
172
|
+
|
|
173
|
+
totalAttempts?: number;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
79
176
|
}
|
|
80
177
|
|
|
81
178
|
export interface ContactUpdateParams {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.23.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.23.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.23.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.23.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|