sendblue 3.9.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +2 -2
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +6 -4
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +6 -4
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts/contacts.d.mts +2 -2
- package/resources/contacts/contacts.d.ts +2 -2
- package/resources/groups.d.mts +7 -0
- package/resources/groups.d.mts.map +1 -1
- package/resources/groups.d.ts +7 -0
- package/resources/groups.d.ts.map +1 -1
- package/resources/messages.d.mts +47 -0
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +47 -0
- package/resources/messages.d.ts.map +1 -1
- package/resources/send-carousel.d.mts +7 -0
- package/resources/send-carousel.d.mts.map +1 -1
- package/resources/send-carousel.d.ts +7 -0
- package/resources/send-carousel.d.ts.map +1 -1
- package/resources/v2/index.d.mts +1 -0
- package/resources/v2/index.d.mts.map +1 -1
- package/resources/v2/index.d.ts +1 -0
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/index.js +3 -1
- package/resources/v2/index.js.map +1 -1
- package/resources/v2/index.mjs +1 -0
- package/resources/v2/index.mjs.map +1 -1
- package/resources/v2/seats.d.mts +136 -0
- package/resources/v2/seats.d.mts.map +1 -0
- package/resources/v2/seats.d.ts +136 -0
- package/resources/v2/seats.d.ts.map +1 -0
- package/resources/v2/seats.js +49 -0
- package/resources/v2/seats.js.map +1 -0
- package/resources/v2/seats.mjs +45 -0
- package/resources/v2/seats.mjs.map +1 -0
- package/resources/v2/v2.d.mts +4 -0
- package/resources/v2/v2.d.mts.map +1 -1
- package/resources/v2/v2.d.ts +4 -0
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.js +4 -0
- package/resources/v2/v2.js.map +1 -1
- package/resources/v2/v2.mjs +4 -0
- package/resources/v2/v2.mjs.map +1 -1
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +5 -3
- package/src/resources/contacts/contacts.ts +2 -2
- package/src/resources/groups.ts +8 -0
- package/src/resources/messages.ts +56 -0
- package/src/resources/send-carousel.ts +8 -0
- package/src/resources/v2/index.ts +8 -0
- package/src/resources/v2/seats.ts +182 -0
- package/src/resources/v2/v2.ts +20 -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
package/src/resources/groups.ts
CHANGED
|
@@ -94,6 +94,14 @@ export interface GroupSendMessageParams {
|
|
|
94
94
|
* Array of recipient phone numbers in E.164 format
|
|
95
95
|
*/
|
|
96
96
|
numbers?: Array<string>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Optional. Identifies the seat (user) sending the group message so it is
|
|
100
|
+
* attributed to a specific rep. Accepts either the seat UUID or the Firebase Auth
|
|
101
|
+
* subject. When provided, `sender_email` is auto-populated on the message record
|
|
102
|
+
* and webhook payloads. Returns 400 if the seat is not found.
|
|
103
|
+
*/
|
|
104
|
+
seat_id?: string;
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
export declare namespace Groups {
|
|
@@ -133,6 +133,12 @@ export interface MessageContent {
|
|
|
133
133
|
*/
|
|
134
134
|
message_handle?: string;
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
138
|
+
* send, or for dashboard-originated group messages.
|
|
139
|
+
*/
|
|
140
|
+
seat_id?: string | null;
|
|
141
|
+
|
|
136
142
|
send_style?:
|
|
137
143
|
| 'celebration'
|
|
138
144
|
| 'shooting_star'
|
|
@@ -148,6 +154,12 @@ export interface MessageContent {
|
|
|
148
154
|
| 'loud'
|
|
149
155
|
| 'slam';
|
|
150
156
|
|
|
157
|
+
/**
|
|
158
|
+
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
159
|
+
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
160
|
+
*/
|
|
161
|
+
sender_email?: string | null;
|
|
162
|
+
|
|
151
163
|
status?: 'QUEUED' | 'SENT' | 'DELIVERED' | 'ERROR' | 'RECEIVED';
|
|
152
164
|
|
|
153
165
|
/**
|
|
@@ -212,6 +224,12 @@ export interface MessageResponse {
|
|
|
212
224
|
*/
|
|
213
225
|
number?: string;
|
|
214
226
|
|
|
227
|
+
/**
|
|
228
|
+
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
229
|
+
* send, or for dashboard-originated group messages.
|
|
230
|
+
*/
|
|
231
|
+
seat_id?: string | null;
|
|
232
|
+
|
|
215
233
|
/**
|
|
216
234
|
* The iMessage expressive message style
|
|
217
235
|
*/
|
|
@@ -230,6 +248,12 @@ export interface MessageResponse {
|
|
|
230
248
|
| 'loud'
|
|
231
249
|
| 'slam';
|
|
232
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
253
|
+
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
254
|
+
*/
|
|
255
|
+
sender_email?: string | null;
|
|
256
|
+
|
|
233
257
|
status?: 'QUEUED' | 'SENT' | 'DELIVERED' | 'ERROR';
|
|
234
258
|
}
|
|
235
259
|
|
|
@@ -333,6 +357,12 @@ export namespace MessageRetrieveResponse {
|
|
|
333
357
|
*/
|
|
334
358
|
plan?: string;
|
|
335
359
|
|
|
360
|
+
/**
|
|
361
|
+
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
362
|
+
* send, or for dashboard-originated group messages.
|
|
363
|
+
*/
|
|
364
|
+
seat_id?: string | null;
|
|
365
|
+
|
|
336
366
|
/**
|
|
337
367
|
* The iMessage expressive message style
|
|
338
368
|
*/
|
|
@@ -356,6 +386,12 @@ export namespace MessageRetrieveResponse {
|
|
|
356
386
|
*/
|
|
357
387
|
sendblue_number?: string | null;
|
|
358
388
|
|
|
389
|
+
/**
|
|
390
|
+
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
391
|
+
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
392
|
+
*/
|
|
393
|
+
sender_email?: string | null;
|
|
394
|
+
|
|
359
395
|
/**
|
|
360
396
|
* The messaging service used
|
|
361
397
|
*/
|
|
@@ -487,6 +523,12 @@ export namespace MessageListResponse {
|
|
|
487
523
|
*/
|
|
488
524
|
plan?: string;
|
|
489
525
|
|
|
526
|
+
/**
|
|
527
|
+
* UUID of the seat that sent the message. Present when `seat_id` was provided on
|
|
528
|
+
* send, or for dashboard-originated group messages.
|
|
529
|
+
*/
|
|
530
|
+
seat_id?: string | null;
|
|
531
|
+
|
|
490
532
|
/**
|
|
491
533
|
* The iMessage expressive message style
|
|
492
534
|
*/
|
|
@@ -510,6 +552,12 @@ export namespace MessageListResponse {
|
|
|
510
552
|
*/
|
|
511
553
|
sendblue_number?: string | null;
|
|
512
554
|
|
|
555
|
+
/**
|
|
556
|
+
* Email of the seat (user) that sent the message. Auto-populated when a `seat_id`
|
|
557
|
+
* is provided on send. `null` for messages sent without a `seat_id`.
|
|
558
|
+
*/
|
|
559
|
+
sender_email?: string | null;
|
|
560
|
+
|
|
513
561
|
/**
|
|
514
562
|
* The messaging service used
|
|
515
563
|
*/
|
|
@@ -718,6 +766,14 @@ export interface MessageSendParams {
|
|
|
718
766
|
*/
|
|
719
767
|
media_url?: string;
|
|
720
768
|
|
|
769
|
+
/**
|
|
770
|
+
* Optional. Identifies the seat (user) sending the message so the message is
|
|
771
|
+
* attributed to a specific rep. Accepts either the seat UUID or the Firebase Auth
|
|
772
|
+
* subject. When provided, `sender_email` is auto-populated on the message record
|
|
773
|
+
* and webhook payloads. Returns 400 if the seat is not found.
|
|
774
|
+
*/
|
|
775
|
+
seat_id?: string;
|
|
776
|
+
|
|
721
777
|
/**
|
|
722
778
|
* The iMessage expressive message style
|
|
723
779
|
*/
|
|
@@ -85,6 +85,14 @@ export interface SendCarouselSendParams {
|
|
|
85
85
|
*/
|
|
86
86
|
metadata?: unknown;
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Optional. Identifies the seat (user) sending the carousel so it is attributed to
|
|
90
|
+
* a specific rep. Accepts either the seat UUID or the Firebase Auth subject. When
|
|
91
|
+
* provided, `sender_email` is auto-populated on the message record and webhook
|
|
92
|
+
* payloads. Returns 400 if the seat is not found.
|
|
93
|
+
*/
|
|
94
|
+
seat_id?: string;
|
|
95
|
+
|
|
88
96
|
/**
|
|
89
97
|
* The iMessage expressive message style
|
|
90
98
|
*/
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Seats,
|
|
5
|
+
type SeatRetrieveResponse,
|
|
6
|
+
type SeatListResponse,
|
|
7
|
+
type SeatCountResponse,
|
|
8
|
+
type SeatListParams,
|
|
9
|
+
type SeatCountParams,
|
|
10
|
+
} from './seats';
|
|
3
11
|
export { Totp, type TotpGetCodeResponse } from './totp/index';
|
|
4
12
|
export { V2 } from './v2';
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Operations for retrieving seats (users) on the account, used for attribution via `seat_id`
|
|
10
|
+
*/
|
|
11
|
+
export class Seats extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve a single seat by either its UUID or its Firebase Auth subject. Both
|
|
14
|
+
* identifiers resolve to the same seat.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const seat = await client.v2.seats.retrieve('seat_id');
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
retrieve(seatID: string, options?: RequestOptions): APIPromise<SeatRetrieveResponse> {
|
|
22
|
+
return this._client.get(path`/api/v2/seats/${seatID}`, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve a list of seats (users) for the authenticated company. Use the returned
|
|
27
|
+
* `seat_id` values when sending messages with the `seat_id` parameter to attribute
|
|
28
|
+
* activity to a specific rep.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const seats = await client.v2.seats.list();
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
list(
|
|
36
|
+
query: SeatListParams | null | undefined = {},
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<SeatListResponse> {
|
|
39
|
+
return this._client.get('/api/v2/seats', { query, ...options });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns the number of seats for the authenticated company.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response = await client.v2.seats.count();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
count(
|
|
51
|
+
query: SeatCountParams | null | undefined = {},
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): APIPromise<SeatCountResponse> {
|
|
54
|
+
return this._client.get('/api/v2/seats/count', { query, ...options });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface SeatRetrieveResponse {
|
|
59
|
+
seat?: SeatRetrieveResponse.Seat;
|
|
60
|
+
|
|
61
|
+
status?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace SeatRetrieveResponse {
|
|
65
|
+
export interface Seat {
|
|
66
|
+
/**
|
|
67
|
+
* Account name the seat belongs to
|
|
68
|
+
*/
|
|
69
|
+
account?: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* When the seat was created
|
|
73
|
+
*/
|
|
74
|
+
created_at?: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Email address of the seat user
|
|
78
|
+
*/
|
|
79
|
+
email?: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* First name
|
|
83
|
+
*/
|
|
84
|
+
first_name?: string | null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Optional phone number used to forward calls
|
|
88
|
+
*/
|
|
89
|
+
forwarding_number?: string | null;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Last name
|
|
93
|
+
*/
|
|
94
|
+
last_name?: string | null;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Primary identifier for the seat. Pass this on the send endpoints' `seat_id`
|
|
98
|
+
* parameter.
|
|
99
|
+
*/
|
|
100
|
+
seat_id?: string;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type SeatListResponse = Array<SeatListResponse.SeatListResponseItem>;
|
|
105
|
+
|
|
106
|
+
export namespace SeatListResponse {
|
|
107
|
+
export interface SeatListResponseItem {
|
|
108
|
+
/**
|
|
109
|
+
* Account name the seat belongs to
|
|
110
|
+
*/
|
|
111
|
+
account?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* When the seat was created
|
|
115
|
+
*/
|
|
116
|
+
created_at?: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Email address of the seat user
|
|
120
|
+
*/
|
|
121
|
+
email?: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* First name
|
|
125
|
+
*/
|
|
126
|
+
first_name?: string | null;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Optional phone number used to forward calls
|
|
130
|
+
*/
|
|
131
|
+
forwarding_number?: string | null;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Last name
|
|
135
|
+
*/
|
|
136
|
+
last_name?: string | null;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Primary identifier for the seat. Pass this on the send endpoints' `seat_id`
|
|
140
|
+
* parameter.
|
|
141
|
+
*/
|
|
142
|
+
seat_id?: string;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface SeatCountResponse {
|
|
147
|
+
count?: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface SeatListParams {
|
|
151
|
+
/**
|
|
152
|
+
* Optional exact-match filter on seat email
|
|
153
|
+
*/
|
|
154
|
+
email?: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Maximum number of seats to return
|
|
158
|
+
*/
|
|
159
|
+
limit?: number;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Number of seats to skip
|
|
163
|
+
*/
|
|
164
|
+
offset?: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface SeatCountParams {
|
|
168
|
+
/**
|
|
169
|
+
* Optional exact-match filter on seat email
|
|
170
|
+
*/
|
|
171
|
+
email?: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export declare namespace Seats {
|
|
175
|
+
export {
|
|
176
|
+
type SeatRetrieveResponse as SeatRetrieveResponse,
|
|
177
|
+
type SeatListResponse as SeatListResponse,
|
|
178
|
+
type SeatCountResponse as SeatCountResponse,
|
|
179
|
+
type SeatListParams as SeatListParams,
|
|
180
|
+
type SeatCountParams as SeatCountParams,
|
|
181
|
+
};
|
|
182
|
+
}
|
package/src/resources/v2/v2.ts
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as SeatsAPI from './seats';
|
|
5
|
+
import {
|
|
6
|
+
SeatCountParams,
|
|
7
|
+
SeatCountResponse,
|
|
8
|
+
SeatListParams,
|
|
9
|
+
SeatListResponse,
|
|
10
|
+
SeatRetrieveResponse,
|
|
11
|
+
Seats,
|
|
12
|
+
} from './seats';
|
|
4
13
|
import * as TotpAPI from './totp/totp';
|
|
5
14
|
import { Totp, TotpGetCodeResponse } from './totp/totp';
|
|
6
15
|
|
|
7
16
|
export class V2 extends APIResource {
|
|
8
17
|
totp: TotpAPI.Totp = new TotpAPI.Totp(this._client);
|
|
18
|
+
seats: SeatsAPI.Seats = new SeatsAPI.Seats(this._client);
|
|
9
19
|
}
|
|
10
20
|
|
|
11
21
|
V2.Totp = Totp;
|
|
22
|
+
V2.Seats = Seats;
|
|
12
23
|
|
|
13
24
|
export declare namespace V2 {
|
|
14
25
|
export { Totp as Totp, type TotpGetCodeResponse as TotpGetCodeResponse };
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
Seats as Seats,
|
|
29
|
+
type SeatRetrieveResponse as SeatRetrieveResponse,
|
|
30
|
+
type SeatListResponse as SeatListResponse,
|
|
31
|
+
type SeatCountResponse as SeatCountResponse,
|
|
32
|
+
type SeatListParams as SeatListParams,
|
|
33
|
+
type SeatCountParams as SeatCountParams,
|
|
34
|
+
};
|
|
15
35
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '3.9.
|
|
1
|
+
export const VERSION = '3.9.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.9.
|
|
1
|
+
export declare const VERSION = "3.9.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.9.
|
|
1
|
+
export declare const VERSION = "3.9.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.9.
|
|
1
|
+
export const VERSION = '3.9.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|