@lorikeetai/node-sdk 0.13.2 → 0.14.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 +40 -0
- package/README.md +17 -32
- package/core.d.ts +7 -4
- package/core.d.ts.map +1 -1
- package/core.js +16 -9
- package/core.js.map +1 -1
- package/core.mjs +16 -9
- package/core.mjs.map +1 -1
- package/index.d.mts +21 -3
- package/index.d.ts +21 -3
- package/index.d.ts.map +1 -1
- package/index.js +35 -7
- package/index.js.map +1 -1
- package/index.mjs +36 -8
- package/index.mjs.map +1 -1
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +279 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/package.json +1 -5
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/conversation/chat.d.ts +19 -164
- package/resources/conversation/chat.d.ts.map +1 -1
- package/resources/conversation/chat.js.map +1 -1
- package/resources/conversation/chat.mjs.map +1 -1
- package/resources/conversation/conversation.d.ts +116 -0
- package/resources/conversation/conversation.d.ts.map +1 -1
- package/resources/conversation/conversation.js +36 -0
- package/resources/conversation/conversation.js.map +1 -1
- package/resources/conversation/conversation.mjs +36 -0
- package/resources/conversation/conversation.mjs.map +1 -1
- package/resources/conversation/email.d.ts +19 -164
- package/resources/conversation/email.d.ts.map +1 -1
- package/resources/conversation/email.js.map +1 -1
- package/resources/conversation/email.mjs.map +1 -1
- package/resources/conversation/index.d.ts +1 -1
- package/resources/conversation/index.d.ts.map +1 -1
- package/resources/conversation/index.js.map +1 -1
- package/resources/conversation/index.mjs +1 -1
- package/resources/conversation/index.mjs.map +1 -1
- package/resources/customer/customer.d.ts +296 -0
- package/resources/customer/customer.d.ts.map +1 -0
- package/resources/customer/customer.js +79 -0
- package/resources/customer/customer.js.map +1 -0
- package/resources/customer/customer.mjs +52 -0
- package/resources/customer/customer.mjs.map +1 -0
- package/resources/customer/index.d.ts +3 -0
- package/resources/customer/index.d.ts.map +1 -0
- package/resources/customer/index.js +9 -0
- package/resources/customer/index.js.map +1 -0
- package/resources/customer/index.mjs +4 -0
- package/resources/customer/index.mjs.map +1 -0
- package/resources/customer/profile.d.ts +71 -0
- package/resources/customer/profile.d.ts.map +1 -0
- package/resources/customer/profile.js +21 -0
- package/resources/customer/profile.js.map +1 -0
- package/resources/customer/profile.mjs +17 -0
- package/resources/customer/profile.mjs.map +1 -0
- package/resources/customer.d.ts +1 -291
- package/resources/customer.d.ts.map +1 -1
- package/resources/customer.js +15 -45
- package/resources/customer.js.map +1 -1
- package/resources/customer.mjs +1 -43
- package/resources/customer.mjs.map +1 -1
- package/resources/file.d.ts +7 -0
- package/resources/file.d.ts.map +1 -0
- package/resources/file.js +21 -0
- package/resources/file.js.map +1 -0
- package/resources/file.mjs +17 -0
- package/resources/file.mjs.map +1 -0
- package/resources/index.d.ts +6 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- package/resources/index.mjs.map +1 -1
- package/resources/ingest.d.ts +2 -0
- package/resources/ingest.d.ts.map +1 -1
- package/resources/ingest.js +9 -0
- package/resources/ingest.js.map +1 -1
- package/resources/ingest.mjs +9 -0
- package/resources/ingest.mjs.map +1 -1
- package/resources/oauth/authorization.d.ts +6 -0
- package/resources/oauth/authorization.d.ts.map +1 -0
- package/resources/oauth/authorization.js +15 -0
- package/resources/oauth/authorization.js.map +1 -0
- package/resources/oauth/authorization.mjs +11 -0
- package/resources/oauth/authorization.mjs.map +1 -0
- package/resources/oauth/index.d.ts +3 -0
- package/resources/oauth/index.d.ts.map +1 -0
- package/resources/oauth/index.js +9 -0
- package/resources/oauth/index.js.map +1 -0
- package/resources/oauth/index.mjs +4 -0
- package/resources/oauth/index.mjs.map +1 -0
- package/resources/oauth/oauth.d.ts +24 -0
- package/resources/oauth/oauth.d.ts.map +1 -0
- package/resources/oauth/oauth.js +65 -0
- package/resources/oauth/oauth.js.map +1 -0
- package/resources/oauth/oauth.mjs +38 -0
- package/resources/oauth/oauth.mjs.map +1 -0
- package/resources/oauth.d.ts +2 -0
- package/resources/oauth.d.ts.map +1 -0
- package/resources/oauth.js +19 -0
- package/resources/oauth.js.map +1 -0
- package/resources/oauth.mjs +3 -0
- package/resources/oauth.mjs.map +1 -0
- package/resources/suggestion.d.ts +7 -0
- package/resources/suggestion.d.ts.map +1 -0
- package/resources/suggestion.js +21 -0
- package/resources/suggestion.js.map +1 -0
- package/resources/suggestion.mjs +17 -0
- package/resources/suggestion.mjs.map +1 -0
- package/resources/ticket.d.ts +14 -0
- package/resources/ticket.d.ts.map +1 -0
- package/resources/ticket.js +16 -0
- package/resources/ticket.js.map +1 -0
- package/resources/ticket.mjs +12 -0
- package/resources/ticket.mjs.map +1 -0
- package/resources/top-level.d.ts +2 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/resources/webhooks.d.ts +6 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +15 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +11 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources/workflow.d.ts +1 -0
- package/resources/workflow.d.ts.map +1 -1
- package/resources/workflow.js +3 -0
- package/resources/workflow.js.map +1 -1
- package/resources/workflow.mjs +3 -0
- package/resources/workflow.mjs.map +1 -1
- package/src/core.ts +17 -8
- package/src/index.ts +77 -10
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/resource.ts +1 -1
- package/src/resources/conversation/chat.ts +21 -217
- package/src/resources/conversation/conversation.ts +175 -0
- package/src/resources/conversation/email.ts +21 -217
- package/src/resources/conversation/index.ts +10 -1
- package/src/resources/customer/customer.ts +386 -0
- package/src/resources/customer/index.ts +13 -0
- package/src/resources/customer/profile.ts +89 -0
- package/src/resources/customer.ts +1 -372
- package/src/resources/file.ts +20 -0
- package/src/resources/index.ts +15 -2
- package/src/resources/ingest.ts +17 -0
- package/src/resources/oauth/authorization.ts +13 -0
- package/src/resources/oauth/index.ts +4 -0
- package/src/resources/oauth/oauth.ts +63 -0
- package/src/resources/oauth.ts +3 -0
- package/src/resources/suggestion.ts +20 -0
- package/src/resources/ticket.ts +30 -0
- package/src/resources/top-level.ts +3 -0
- package/src/resources/webhooks.ts +13 -0
- package/src/resources/workflow.ts +4 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
import * as ProfileAPI from './profile';
|
|
6
|
+
import { Profile, ProfileSyncParams, ProfileSyncResponse } from './profile';
|
|
7
|
+
|
|
8
|
+
export class Customer extends APIResource {
|
|
9
|
+
profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const customer = await client.customer.create();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
create(body: CustomerCreateParams, options?: Core.RequestOptions): Core.APIPromise<CustomerCreateResponse> {
|
|
18
|
+
return this._client.post('/v1/customer', { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const customer = await client.customer.update(
|
|
25
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
update(
|
|
30
|
+
id: string,
|
|
31
|
+
body: CustomerUpdateParams,
|
|
32
|
+
options?: Core.RequestOptions,
|
|
33
|
+
): Core.APIPromise<CustomerUpdateResponse> {
|
|
34
|
+
return this._client.put(`/v1/customer/${id}`, { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const customer = await client.customer.get(
|
|
41
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
get(id: string, options?: Core.RequestOptions): Core.APIPromise<CustomerGetResponse> {
|
|
46
|
+
return this._client.get(`/v1/customer/${id}`, options);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const response = await client.customer.token();
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
token(body: CustomerTokenParams, options?: Core.RequestOptions): Core.APIPromise<string> {
|
|
56
|
+
return this._client.post('/v1/customer/token', { body, ...options });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface CustomerCreateResponse {
|
|
61
|
+
/**
|
|
62
|
+
* The id of the customer in the subscriber system
|
|
63
|
+
*/
|
|
64
|
+
id: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The timestamp of the when the customer was created in our system
|
|
68
|
+
*/
|
|
69
|
+
createdAt: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The URL of the customer avatar
|
|
73
|
+
*/
|
|
74
|
+
avatarUrl?: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The display name of the customer
|
|
78
|
+
*/
|
|
79
|
+
displayName?: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The email of the customer
|
|
83
|
+
*/
|
|
84
|
+
email?: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The first name of the customer
|
|
88
|
+
*/
|
|
89
|
+
firstName?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The last name of the customer
|
|
93
|
+
*/
|
|
94
|
+
lastName?: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
98
|
+
* stable and unique
|
|
99
|
+
*/
|
|
100
|
+
remoteId?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
104
|
+
* example a cookie
|
|
105
|
+
*/
|
|
106
|
+
subscriberCustomerId?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
110
|
+
* JWT
|
|
111
|
+
*/
|
|
112
|
+
subscriberToken?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface CustomerUpdateResponse {
|
|
116
|
+
/**
|
|
117
|
+
* The id of the customer in the subscriber system
|
|
118
|
+
*/
|
|
119
|
+
id: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The timestamp of the when the customer was created in our system
|
|
123
|
+
*/
|
|
124
|
+
createdAt: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The URL of the customer avatar
|
|
128
|
+
*/
|
|
129
|
+
avatarUrl?: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The display name of the customer
|
|
133
|
+
*/
|
|
134
|
+
displayName?: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The email of the customer
|
|
138
|
+
*/
|
|
139
|
+
email?: string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The first name of the customer
|
|
143
|
+
*/
|
|
144
|
+
firstName?: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The last name of the customer
|
|
148
|
+
*/
|
|
149
|
+
lastName?: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
153
|
+
* stable and unique
|
|
154
|
+
*/
|
|
155
|
+
remoteId?: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
159
|
+
* example a cookie
|
|
160
|
+
*/
|
|
161
|
+
subscriberCustomerId?: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
165
|
+
* JWT
|
|
166
|
+
*/
|
|
167
|
+
subscriberToken?: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface CustomerGetResponse {
|
|
171
|
+
/**
|
|
172
|
+
* The id of the customer in the subscriber system
|
|
173
|
+
*/
|
|
174
|
+
id: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The timestamp of the when the customer was created in our system
|
|
178
|
+
*/
|
|
179
|
+
createdAt: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The URL of the customer avatar
|
|
183
|
+
*/
|
|
184
|
+
avatarUrl?: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The display name of the customer
|
|
188
|
+
*/
|
|
189
|
+
displayName?: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The email of the customer
|
|
193
|
+
*/
|
|
194
|
+
email?: string;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The first name of the customer
|
|
198
|
+
*/
|
|
199
|
+
firstName?: string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The last name of the customer
|
|
203
|
+
*/
|
|
204
|
+
lastName?: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
208
|
+
* stable and unique
|
|
209
|
+
*/
|
|
210
|
+
remoteId?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
214
|
+
* example a cookie
|
|
215
|
+
*/
|
|
216
|
+
subscriberCustomerId?: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
220
|
+
* JWT
|
|
221
|
+
*/
|
|
222
|
+
subscriberToken?: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type CustomerTokenResponse = string;
|
|
226
|
+
|
|
227
|
+
export interface CustomerCreateParams {
|
|
228
|
+
/**
|
|
229
|
+
* The URL of the customer avatar
|
|
230
|
+
*/
|
|
231
|
+
avatarUrl?: string;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The display name of the customer
|
|
235
|
+
*/
|
|
236
|
+
displayName?: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* The email of the customer
|
|
240
|
+
*/
|
|
241
|
+
email?: string;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The first name of the customer
|
|
245
|
+
*/
|
|
246
|
+
firstName?: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* The last name of the customer
|
|
250
|
+
*/
|
|
251
|
+
lastName?: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
255
|
+
* stable and unique
|
|
256
|
+
*/
|
|
257
|
+
remoteId?: string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
261
|
+
* example a cookie
|
|
262
|
+
*/
|
|
263
|
+
subscriberCustomerId?: string;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
267
|
+
* JWT
|
|
268
|
+
*/
|
|
269
|
+
subscriberToken?: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface CustomerUpdateParams {
|
|
273
|
+
/**
|
|
274
|
+
* The URL of the customer avatar
|
|
275
|
+
*/
|
|
276
|
+
avatarUrl?: string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The display name of the customer
|
|
280
|
+
*/
|
|
281
|
+
displayName?: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The email of the customer
|
|
285
|
+
*/
|
|
286
|
+
email?: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* The first name of the customer
|
|
290
|
+
*/
|
|
291
|
+
firstName?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* The last name of the customer
|
|
295
|
+
*/
|
|
296
|
+
lastName?: string;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
300
|
+
* stable and unique
|
|
301
|
+
*/
|
|
302
|
+
remoteId?: string;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
306
|
+
* example a cookie
|
|
307
|
+
*/
|
|
308
|
+
subscriberCustomerId?: string;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
312
|
+
* JWT
|
|
313
|
+
*/
|
|
314
|
+
subscriberToken?: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface CustomerTokenParams {
|
|
318
|
+
/**
|
|
319
|
+
* The URL of the customer avatar
|
|
320
|
+
*/
|
|
321
|
+
avatarUrl?: string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* The display name of the customer
|
|
325
|
+
*/
|
|
326
|
+
displayName?: string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The email of the customer
|
|
330
|
+
*/
|
|
331
|
+
email?: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* The expiry of the conversation initialization token, if not provided it will be
|
|
335
|
+
* set to 1 hour
|
|
336
|
+
*/
|
|
337
|
+
expiry?: string;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* The first name of the customer
|
|
341
|
+
*/
|
|
342
|
+
firstName?: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The last name of the customer
|
|
346
|
+
*/
|
|
347
|
+
lastName?: string;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
351
|
+
* stable and unique
|
|
352
|
+
*/
|
|
353
|
+
remoteId?: string;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
357
|
+
* example a cookie
|
|
358
|
+
*/
|
|
359
|
+
subscriberCustomerId?: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
363
|
+
* JWT
|
|
364
|
+
*/
|
|
365
|
+
subscriberToken?: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
Customer.Profile = Profile;
|
|
369
|
+
|
|
370
|
+
export declare namespace Customer {
|
|
371
|
+
export {
|
|
372
|
+
type CustomerCreateResponse as CustomerCreateResponse,
|
|
373
|
+
type CustomerUpdateResponse as CustomerUpdateResponse,
|
|
374
|
+
type CustomerGetResponse as CustomerGetResponse,
|
|
375
|
+
type CustomerTokenResponse as CustomerTokenResponse,
|
|
376
|
+
type CustomerCreateParams as CustomerCreateParams,
|
|
377
|
+
type CustomerUpdateParams as CustomerUpdateParams,
|
|
378
|
+
type CustomerTokenParams as CustomerTokenParams,
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
export {
|
|
382
|
+
Profile as Profile,
|
|
383
|
+
type ProfileSyncResponse as ProfileSyncResponse,
|
|
384
|
+
type ProfileSyncParams as ProfileSyncParams,
|
|
385
|
+
};
|
|
386
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Customer,
|
|
5
|
+
type CustomerCreateResponse,
|
|
6
|
+
type CustomerUpdateResponse,
|
|
7
|
+
type CustomerGetResponse,
|
|
8
|
+
type CustomerTokenResponse,
|
|
9
|
+
type CustomerCreateParams,
|
|
10
|
+
type CustomerUpdateParams,
|
|
11
|
+
type CustomerTokenParams,
|
|
12
|
+
} from './customer';
|
|
13
|
+
export { Profile, type ProfileSyncResponse, type ProfileSyncParams } from './profile';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class Profile extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const response = await client.customer.profile.sync(
|
|
11
|
+
* '123e4567-e89b-12d3-a456-426614174000',
|
|
12
|
+
* { data: { foo: 'string' } },
|
|
13
|
+
* );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
sync(
|
|
17
|
+
id: string,
|
|
18
|
+
body: ProfileSyncParams,
|
|
19
|
+
options?: Core.RequestOptions,
|
|
20
|
+
): Core.APIPromise<ProfileSyncResponse> {
|
|
21
|
+
return this._client.put(`/v1/customer/profile/${id}`, { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ProfileSyncResponse {
|
|
26
|
+
/**
|
|
27
|
+
* The id of the customer in the subscriber system
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The timestamp of the when the customer was created in our system
|
|
33
|
+
*/
|
|
34
|
+
createdAt: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The URL of the customer avatar
|
|
38
|
+
*/
|
|
39
|
+
avatarUrl?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The display name of the customer
|
|
43
|
+
*/
|
|
44
|
+
displayName?: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The email of the customer
|
|
48
|
+
*/
|
|
49
|
+
email?: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The first name of the customer
|
|
53
|
+
*/
|
|
54
|
+
firstName?: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The last name of the customer
|
|
58
|
+
*/
|
|
59
|
+
lastName?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The id of the customer in the ticketing system. For the SDK this needs to be
|
|
63
|
+
* stable and unique
|
|
64
|
+
*/
|
|
65
|
+
remoteId?: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The id of the customer in your own primary database or a unique identifier, for
|
|
69
|
+
* example a cookie
|
|
70
|
+
*/
|
|
71
|
+
subscriberCustomerId?: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* A token that can be used to authenticate the customer in the your system, like a
|
|
75
|
+
* JWT
|
|
76
|
+
*/
|
|
77
|
+
subscriberToken?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ProfileSyncParams {
|
|
81
|
+
/**
|
|
82
|
+
* The profile data to update - should be provided as key value object
|
|
83
|
+
*/
|
|
84
|
+
data: { [key: string]: string | boolean | number | unknown | Array<unknown> };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare namespace Profile {
|
|
88
|
+
export { type ProfileSyncResponse as ProfileSyncResponse, type ProfileSyncParams as ProfileSyncParams };
|
|
89
|
+
}
|