sendblue 3.8.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 +31 -0
- package/README.md +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +11 -0
- package/client.js.map +1 -1
- package/client.mjs +11 -0
- package/client.mjs.map +1 -1
- 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/client.ts +12 -0
- 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
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
1
|
+
export const VERSION = '3.9.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|