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.
Files changed (72) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts.map +1 -1
  5. package/client.js +11 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +11 -0
  8. package/client.mjs.map +1 -1
  9. package/internal/types.d.mts +6 -6
  10. package/internal/types.d.mts.map +1 -1
  11. package/internal/types.d.ts +6 -6
  12. package/internal/types.d.ts.map +1 -1
  13. package/internal/utils/log.d.mts.map +1 -1
  14. package/internal/utils/log.d.ts.map +1 -1
  15. package/internal/utils/log.js +6 -4
  16. package/internal/utils/log.js.map +1 -1
  17. package/internal/utils/log.mjs +6 -4
  18. package/internal/utils/log.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/contacts/contacts.d.mts +2 -2
  21. package/resources/contacts/contacts.d.ts +2 -2
  22. package/resources/groups.d.mts +7 -0
  23. package/resources/groups.d.mts.map +1 -1
  24. package/resources/groups.d.ts +7 -0
  25. package/resources/groups.d.ts.map +1 -1
  26. package/resources/messages.d.mts +47 -0
  27. package/resources/messages.d.mts.map +1 -1
  28. package/resources/messages.d.ts +47 -0
  29. package/resources/messages.d.ts.map +1 -1
  30. package/resources/send-carousel.d.mts +7 -0
  31. package/resources/send-carousel.d.mts.map +1 -1
  32. package/resources/send-carousel.d.ts +7 -0
  33. package/resources/send-carousel.d.ts.map +1 -1
  34. package/resources/v2/index.d.mts +1 -0
  35. package/resources/v2/index.d.mts.map +1 -1
  36. package/resources/v2/index.d.ts +1 -0
  37. package/resources/v2/index.d.ts.map +1 -1
  38. package/resources/v2/index.js +3 -1
  39. package/resources/v2/index.js.map +1 -1
  40. package/resources/v2/index.mjs +1 -0
  41. package/resources/v2/index.mjs.map +1 -1
  42. package/resources/v2/seats.d.mts +136 -0
  43. package/resources/v2/seats.d.mts.map +1 -0
  44. package/resources/v2/seats.d.ts +136 -0
  45. package/resources/v2/seats.d.ts.map +1 -0
  46. package/resources/v2/seats.js +49 -0
  47. package/resources/v2/seats.js.map +1 -0
  48. package/resources/v2/seats.mjs +45 -0
  49. package/resources/v2/seats.mjs.map +1 -0
  50. package/resources/v2/v2.d.mts +4 -0
  51. package/resources/v2/v2.d.mts.map +1 -1
  52. package/resources/v2/v2.d.ts +4 -0
  53. package/resources/v2/v2.d.ts.map +1 -1
  54. package/resources/v2/v2.js +4 -0
  55. package/resources/v2/v2.js.map +1 -1
  56. package/resources/v2/v2.mjs +4 -0
  57. package/resources/v2/v2.mjs.map +1 -1
  58. package/src/client.ts +12 -0
  59. package/src/internal/types.ts +6 -8
  60. package/src/internal/utils/log.ts +5 -3
  61. package/src/resources/contacts/contacts.ts +2 -2
  62. package/src/resources/groups.ts +8 -0
  63. package/src/resources/messages.ts +56 -0
  64. package/src/resources/send-carousel.ts +8 -0
  65. package/src/resources/v2/index.ts +8 -0
  66. package/src/resources/v2/seats.ts +182 -0
  67. package/src/resources/v2/v2.ts +20 -0
  68. package/src/version.ts +1 -1
  69. package/version.d.mts +1 -1
  70. package/version.d.ts +1 -1
  71. package/version.js +1 -1
  72. 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
+ }
@@ -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.8.0'; // x-release-please-version
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.8.0";
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.8.0";
1
+ export declare const VERSION = "3.9.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '3.8.0'; // x-release-please-version
4
+ exports.VERSION = '3.9.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.8.0'; // x-release-please-version
1
+ export const VERSION = '3.9.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map