@stable_sea/sdk 0.2.11 → 0.2.12
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/README.md +36 -0
- package/dist/gen/session-schema.d.ts +1027 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/session-client.d.ts +10 -0
- package/dist/session-client.js +12 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -53,6 +53,42 @@ keys and rotations reuse that data.
|
|
|
53
53
|
WTGXX supports standard and instant settlement. FLTTX supports standard
|
|
54
54
|
settlement; instant orders are refused in both production and sandbox.
|
|
55
55
|
|
|
56
|
+
## Member notifications and support
|
|
57
|
+
|
|
58
|
+
Use `createStableSeaSessionClient` for personal notifications, preferences and
|
|
59
|
+
business support messages. It uses an existing signed-in business session,
|
|
60
|
+
not a Live or Test API key. Use `https://api.stablesea.com`; the isolated
|
|
61
|
+
Test-key Sandbox does not serve member sessions.
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { createStableSeaSessionClient } from "@stable_sea/sdk";
|
|
65
|
+
|
|
66
|
+
// authenticatedFetch is your transport retaining the existing sign-in cookies.
|
|
67
|
+
const member = createStableSeaSessionClient({
|
|
68
|
+
baseUrl: "https://api.stablesea.com",
|
|
69
|
+
fetch: authenticatedFetch,
|
|
70
|
+
});
|
|
71
|
+
const feed = await member.GET("/notifications/member_notifications");
|
|
72
|
+
if (feed.error) throw new Error("Could not read notifications");
|
|
73
|
+
console.log(feed.data.data);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Node.js fetch does not retain cookies automatically. Supply your authenticated
|
|
77
|
+
transport; the client does not implement login, refresh or automatic retries.
|
|
78
|
+
Existing login MFA, business membership, locks and permissions remain in force.
|
|
79
|
+
Member requests do not use the dated financial API contract header.
|
|
80
|
+
|
|
81
|
+
Member writes use `member.POST`, with each native operation's retry behavior.
|
|
82
|
+
They have no financial `mutation()` helper or idempotency-key replay. After an
|
|
83
|
+
uncertain message send, match the returned `id` in the thread against the
|
|
84
|
+
`message_id` you sent before resending;
|
|
85
|
+
repeated sends can repeat notifications. Contact submissions must not retry
|
|
86
|
+
automatically. See the [member guide](https://docs.stablesea.com/api/#member-sessions)
|
|
87
|
+
for sign-in, session lifecycle and attachment retrieval, and the
|
|
88
|
+
[member reference](https://docs.stablesea.com/api/member-reference/) for fields.
|
|
89
|
+
Generated types are exported as `SessionPaths`, `SessionOperations` and
|
|
90
|
+
`SessionComponents`; internal operator and excluded product operations are omitted.
|
|
91
|
+
|
|
56
92
|
## Idempotent writes
|
|
57
93
|
|
|
58
94
|
Create one mutation handle for one logical write. Its `POST` method always sends
|
|
@@ -0,0 +1,1027 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/compliance/documents/{id}": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Retrieve a document
|
|
16
|
+
* @description Returns a document owned by your current business, including its filename, media type and base64-encoded content. Use the document ID from a message attachment. Missing documents and documents owned by another business return 404.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["compliance.documents.download"];
|
|
19
|
+
put?: never;
|
|
20
|
+
post?: never;
|
|
21
|
+
delete?: never;
|
|
22
|
+
options?: never;
|
|
23
|
+
head?: never;
|
|
24
|
+
patch?: never;
|
|
25
|
+
trace?: never;
|
|
26
|
+
};
|
|
27
|
+
"/compliance/messages": {
|
|
28
|
+
parameters: {
|
|
29
|
+
query?: never;
|
|
30
|
+
header?: never;
|
|
31
|
+
path?: never;
|
|
32
|
+
cookie?: never;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* List business messages
|
|
36
|
+
* @description Returns the current business’s support and compliance messages, newest first. Message text is base64-encoded in `content_text_b64`. Retrieve attachments using their `document_id`. Pass `next_cursor` as `cursor` to read older messages; a cursor is valid only for the business that issued it.
|
|
37
|
+
*/
|
|
38
|
+
get: operations["compliance.messages.list"];
|
|
39
|
+
put?: never;
|
|
40
|
+
/**
|
|
41
|
+
* Send a business message
|
|
42
|
+
* @description Sends a support or compliance message as the signed-in member of the current business. Supply a new `message_id` for each message. After an uncertain response, check the message list for that ID before retrying. Repeated sends can repeat support notifications; this operation does not provide idempotency-key replay. Optional `content_docs` carry base64-encoded attachments. A successful response acknowledges storage; it does not confirm that support has read the message.
|
|
43
|
+
*/
|
|
44
|
+
post: operations["compliance.messages.send"];
|
|
45
|
+
delete?: never;
|
|
46
|
+
options?: never;
|
|
47
|
+
head?: never;
|
|
48
|
+
patch?: never;
|
|
49
|
+
trace?: never;
|
|
50
|
+
};
|
|
51
|
+
"/compliance/messages/read": {
|
|
52
|
+
parameters: {
|
|
53
|
+
query?: never;
|
|
54
|
+
header?: never;
|
|
55
|
+
path?: never;
|
|
56
|
+
cookie?: never;
|
|
57
|
+
};
|
|
58
|
+
get?: never;
|
|
59
|
+
put?: never;
|
|
60
|
+
/**
|
|
61
|
+
* Mark business messages read
|
|
62
|
+
* @description Marks the current business thread read for the signed-in member through its latest message. Messages arriving later remain unread. Other members’ read state is unchanged.
|
|
63
|
+
*/
|
|
64
|
+
post: operations["compliance.messages.read"];
|
|
65
|
+
delete?: never;
|
|
66
|
+
options?: never;
|
|
67
|
+
head?: never;
|
|
68
|
+
patch?: never;
|
|
69
|
+
trace?: never;
|
|
70
|
+
};
|
|
71
|
+
"/compliance/messages/unread": {
|
|
72
|
+
parameters: {
|
|
73
|
+
query?: never;
|
|
74
|
+
header?: never;
|
|
75
|
+
path?: never;
|
|
76
|
+
cookie?: never;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Count your unread business messages
|
|
80
|
+
* @description Counts messages from other people in the current business thread since you last marked it read. Your own messages do not increase the count.
|
|
81
|
+
*/
|
|
82
|
+
get: operations["compliance.messages.unread.get"];
|
|
83
|
+
put?: never;
|
|
84
|
+
post?: never;
|
|
85
|
+
delete?: never;
|
|
86
|
+
options?: never;
|
|
87
|
+
head?: never;
|
|
88
|
+
patch?: never;
|
|
89
|
+
trace?: never;
|
|
90
|
+
};
|
|
91
|
+
"/misc/contact_us": {
|
|
92
|
+
parameters: {
|
|
93
|
+
query?: never;
|
|
94
|
+
header?: never;
|
|
95
|
+
path?: never;
|
|
96
|
+
cookie?: never;
|
|
97
|
+
};
|
|
98
|
+
get?: never;
|
|
99
|
+
put?: never;
|
|
100
|
+
/**
|
|
101
|
+
* Contact support
|
|
102
|
+
* @description Records your contact request and sends it to support. Requires a signed-in business session. This submission has no idempotency key: do not automatically retry an uncertain response, because it can send another email.
|
|
103
|
+
*/
|
|
104
|
+
post: operations["misc.contact.submit"];
|
|
105
|
+
delete?: never;
|
|
106
|
+
options?: never;
|
|
107
|
+
head?: never;
|
|
108
|
+
patch?: never;
|
|
109
|
+
trace?: never;
|
|
110
|
+
};
|
|
111
|
+
"/notifications/member_notifications": {
|
|
112
|
+
parameters: {
|
|
113
|
+
query?: never;
|
|
114
|
+
header?: never;
|
|
115
|
+
path?: never;
|
|
116
|
+
cookie?: never;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* List your notifications
|
|
120
|
+
* @description Returns your supported notifications for the current business, newest first. Use next_cursor for the following page. Includes registered notification types except QuickBooks. Requires a signed-in business session; account and member locks still apply.
|
|
121
|
+
*/
|
|
122
|
+
get: operations["notifications.member_notifications.list"];
|
|
123
|
+
put?: never;
|
|
124
|
+
post?: never;
|
|
125
|
+
delete?: never;
|
|
126
|
+
options?: never;
|
|
127
|
+
head?: never;
|
|
128
|
+
patch?: never;
|
|
129
|
+
trace?: never;
|
|
130
|
+
};
|
|
131
|
+
"/notifications/member_notifications/mark_seen": {
|
|
132
|
+
parameters: {
|
|
133
|
+
query?: never;
|
|
134
|
+
header?: never;
|
|
135
|
+
path?: never;
|
|
136
|
+
cookie?: never;
|
|
137
|
+
};
|
|
138
|
+
get?: never;
|
|
139
|
+
put?: never;
|
|
140
|
+
/**
|
|
141
|
+
* Mark your feed seen
|
|
142
|
+
* @description Marks supported notifications seen for your current business. Other businesses, people and excluded product categories are unchanged. Requires a signed-in business session.
|
|
143
|
+
*/
|
|
144
|
+
post: operations["notifications.member_notifications.mark_seen"];
|
|
145
|
+
delete?: never;
|
|
146
|
+
options?: never;
|
|
147
|
+
head?: never;
|
|
148
|
+
patch?: never;
|
|
149
|
+
trace?: never;
|
|
150
|
+
};
|
|
151
|
+
"/notifications/member_notifications/unseen": {
|
|
152
|
+
parameters: {
|
|
153
|
+
query?: never;
|
|
154
|
+
header?: never;
|
|
155
|
+
path?: never;
|
|
156
|
+
cookie?: never;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Count your unseen notifications
|
|
160
|
+
* @description Counts unseen, unarchived notifications in your supported feed for the current business. Requires a signed-in business session.
|
|
161
|
+
*/
|
|
162
|
+
get: operations["notifications.member_notifications.unseen"];
|
|
163
|
+
put?: never;
|
|
164
|
+
post?: never;
|
|
165
|
+
delete?: never;
|
|
166
|
+
options?: never;
|
|
167
|
+
head?: never;
|
|
168
|
+
patch?: never;
|
|
169
|
+
trace?: never;
|
|
170
|
+
};
|
|
171
|
+
"/notifications/member_notifications/{id}": {
|
|
172
|
+
parameters: {
|
|
173
|
+
query?: never;
|
|
174
|
+
header?: never;
|
|
175
|
+
path?: never;
|
|
176
|
+
cookie?: never;
|
|
177
|
+
};
|
|
178
|
+
get?: never;
|
|
179
|
+
put?: never;
|
|
180
|
+
/**
|
|
181
|
+
* Update a notification
|
|
182
|
+
* @description Marks one of your notifications seen, archived or restored and returns its updated state. Send seen=true or an archived flag; omitted fields stay unchanged. Notifications outside your current business or supported feed return 404. Requires a signed-in business session.
|
|
183
|
+
*/
|
|
184
|
+
post: operations["notifications.member_notifications.update"];
|
|
185
|
+
delete?: never;
|
|
186
|
+
options?: never;
|
|
187
|
+
head?: never;
|
|
188
|
+
patch?: never;
|
|
189
|
+
trace?: never;
|
|
190
|
+
};
|
|
191
|
+
"/notifications/member_preferences": {
|
|
192
|
+
parameters: {
|
|
193
|
+
query?: never;
|
|
194
|
+
header?: never;
|
|
195
|
+
path?: never;
|
|
196
|
+
cookie?: never;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Get your notification preferences
|
|
200
|
+
* @description Returns your supported email and desktop preferences for the current business. Security and other mandatory notices cannot be disabled. Requires a signed-in business session.
|
|
201
|
+
*/
|
|
202
|
+
get: operations["notifications.member_preferences.get"];
|
|
203
|
+
put?: never;
|
|
204
|
+
/**
|
|
205
|
+
* Update your notification preferences
|
|
206
|
+
* @description Updates your supplied email or desktop preferences for the current business and returns the supported preference list. Omitted channels stay unchanged. Mandatory notices and unsupported categories cannot be changed. Requires a signed-in business session.
|
|
207
|
+
*/
|
|
208
|
+
post: operations["notifications.member_preferences.update"];
|
|
209
|
+
delete?: never;
|
|
210
|
+
options?: never;
|
|
211
|
+
head?: never;
|
|
212
|
+
patch?: never;
|
|
213
|
+
trace?: never;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
export type webhooks = Record<string, never>;
|
|
217
|
+
export interface components {
|
|
218
|
+
schemas: {
|
|
219
|
+
DocumentsDownloadB64Output: {
|
|
220
|
+
content_b64?: string;
|
|
221
|
+
filename?: string;
|
|
222
|
+
mime_type?: string;
|
|
223
|
+
};
|
|
224
|
+
HttputilAPIError: {
|
|
225
|
+
error?: components["schemas"]["HttputilAPIErrorBody"];
|
|
226
|
+
};
|
|
227
|
+
HttputilAPIErrorBody: {
|
|
228
|
+
/** @description Legal values/transitions on an illegal-transition conflict. */
|
|
229
|
+
allowed?: string[];
|
|
230
|
+
/** @description Credential ID issued by a duplicate credential-mint request. */
|
|
231
|
+
api_client_id?: string;
|
|
232
|
+
/** @description Stable machine-readable error code when supplied; use error.type for uncoded errors. */
|
|
233
|
+
code?: string;
|
|
234
|
+
/** @description Per-field validation breakdown. */
|
|
235
|
+
errors?: components["schemas"]["HttputilAPIFieldError"][];
|
|
236
|
+
/** @description Human-readable explanation. Use code or type for programmatic handling. */
|
|
237
|
+
message?: string;
|
|
238
|
+
/** @description RFC 6901 JSON Pointer to the first offending field, on a validation error or a coded error about one field. */
|
|
239
|
+
param?: string;
|
|
240
|
+
/** @description Correlates with the Request-Id response header. */
|
|
241
|
+
request_id?: string;
|
|
242
|
+
/**
|
|
243
|
+
* @description Error class. One of a closed enum.
|
|
244
|
+
* @enum {string}
|
|
245
|
+
*/
|
|
246
|
+
type?: "invalid_request_error" | "authentication_error" | "permission_error" | "idempotency_error" | "rate_limit_error" | "api_error";
|
|
247
|
+
};
|
|
248
|
+
HttputilAPIFieldError: {
|
|
249
|
+
/** @description Field-level error code. */
|
|
250
|
+
code?: string;
|
|
251
|
+
/** @description Human-readable detail for this field. */
|
|
252
|
+
detail?: string;
|
|
253
|
+
/** @description RFC 6901 JSON Pointer to the offending field. */
|
|
254
|
+
pointer?: string;
|
|
255
|
+
};
|
|
256
|
+
Page_MessagesView: {
|
|
257
|
+
data: components["schemas"]["MessagesView"][] | null;
|
|
258
|
+
has_more: boolean;
|
|
259
|
+
next_cursor: string | null;
|
|
260
|
+
total_count?: number | null;
|
|
261
|
+
};
|
|
262
|
+
MessagesView: {
|
|
263
|
+
content_doc_ids?: string[];
|
|
264
|
+
content_docs?: components["schemas"]["MessagesContentDoc"][];
|
|
265
|
+
content_text_b64?: string;
|
|
266
|
+
created_by?: string;
|
|
267
|
+
/** Format: date-time */
|
|
268
|
+
created_ts?: string;
|
|
269
|
+
group_id?: string;
|
|
270
|
+
id?: string;
|
|
271
|
+
};
|
|
272
|
+
MessagesContentDoc: {
|
|
273
|
+
document_id?: string;
|
|
274
|
+
file_name?: string;
|
|
275
|
+
/** Format: int64 */
|
|
276
|
+
file_size?: number;
|
|
277
|
+
file_type?: string;
|
|
278
|
+
};
|
|
279
|
+
MessagesSendBusinessInput: {
|
|
280
|
+
body?: string;
|
|
281
|
+
content_docs?: components["schemas"]["MessagesSendInputContent"][];
|
|
282
|
+
message_id: string;
|
|
283
|
+
};
|
|
284
|
+
MessagesSendInputContent: {
|
|
285
|
+
document_id: string;
|
|
286
|
+
file_contents_b64: string;
|
|
287
|
+
file_name: string;
|
|
288
|
+
/** Format: int64 */
|
|
289
|
+
file_size?: number;
|
|
290
|
+
file_type?: string;
|
|
291
|
+
};
|
|
292
|
+
MessagesAck: {
|
|
293
|
+
ok?: boolean;
|
|
294
|
+
};
|
|
295
|
+
MessagesUnreadCountOutput: {
|
|
296
|
+
/** Format: int64 */
|
|
297
|
+
count?: number;
|
|
298
|
+
};
|
|
299
|
+
MiscContactUsInput: {
|
|
300
|
+
email?: string;
|
|
301
|
+
message?: string;
|
|
302
|
+
name?: string;
|
|
303
|
+
subject?: string;
|
|
304
|
+
};
|
|
305
|
+
MiscAck: {
|
|
306
|
+
ok?: boolean;
|
|
307
|
+
};
|
|
308
|
+
Page_InappNotificationView: {
|
|
309
|
+
data: components["schemas"]["InappNotificationView"][] | null;
|
|
310
|
+
has_more: boolean;
|
|
311
|
+
next_cursor: string | null;
|
|
312
|
+
total_count?: number | null;
|
|
313
|
+
};
|
|
314
|
+
InappNotificationView: {
|
|
315
|
+
amount_display?: string;
|
|
316
|
+
archived?: boolean;
|
|
317
|
+
body?: string;
|
|
318
|
+
/** Format: date-time */
|
|
319
|
+
created_ts?: string;
|
|
320
|
+
group_id?: string;
|
|
321
|
+
id?: string;
|
|
322
|
+
individual_id?: string;
|
|
323
|
+
link?: string;
|
|
324
|
+
notification_type?: string;
|
|
325
|
+
seen?: boolean;
|
|
326
|
+
title?: string;
|
|
327
|
+
};
|
|
328
|
+
InappAck: {
|
|
329
|
+
ok?: boolean;
|
|
330
|
+
};
|
|
331
|
+
InappUnseenCountOutput: {
|
|
332
|
+
/** Format: int64 */
|
|
333
|
+
count?: number;
|
|
334
|
+
};
|
|
335
|
+
InappMemberUpdateInput: {
|
|
336
|
+
/** @description Set to true to archive or false to restore. Omission preserves its state. */
|
|
337
|
+
archived?: boolean;
|
|
338
|
+
/** @description Set to true to mark the notification seen. Omission preserves its state. */
|
|
339
|
+
seen?: boolean;
|
|
340
|
+
};
|
|
341
|
+
PreferencesGetPreferencesOutput: {
|
|
342
|
+
data?: components["schemas"]["PreferencesView"][] | null;
|
|
343
|
+
};
|
|
344
|
+
PreferencesView: {
|
|
345
|
+
channels?: components["schemas"]["PreferencesChannelStates"];
|
|
346
|
+
type?: string;
|
|
347
|
+
};
|
|
348
|
+
PreferencesChannelStates: {
|
|
349
|
+
desktop?: boolean;
|
|
350
|
+
email?: boolean;
|
|
351
|
+
};
|
|
352
|
+
PreferencesSetPreferencesInput: {
|
|
353
|
+
preferences: components["schemas"]["PreferencesTypePreferenceUpdate"][] | null;
|
|
354
|
+
};
|
|
355
|
+
PreferencesTypePreferenceUpdate: {
|
|
356
|
+
channels?: components["schemas"]["PreferencesChannelUpdate"];
|
|
357
|
+
type: string;
|
|
358
|
+
};
|
|
359
|
+
PreferencesChannelUpdate: {
|
|
360
|
+
desktop?: boolean | null;
|
|
361
|
+
email?: boolean | null;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
responses: never;
|
|
365
|
+
parameters: never;
|
|
366
|
+
requestBodies: never;
|
|
367
|
+
headers: never;
|
|
368
|
+
pathItems: never;
|
|
369
|
+
}
|
|
370
|
+
export type $defs = Record<string, never>;
|
|
371
|
+
export interface operations {
|
|
372
|
+
"compliance.documents.download": {
|
|
373
|
+
parameters: {
|
|
374
|
+
query?: never;
|
|
375
|
+
header?: never;
|
|
376
|
+
path: {
|
|
377
|
+
id: string;
|
|
378
|
+
};
|
|
379
|
+
cookie?: never;
|
|
380
|
+
};
|
|
381
|
+
requestBody?: never;
|
|
382
|
+
responses: {
|
|
383
|
+
/** @description OK */
|
|
384
|
+
200: {
|
|
385
|
+
headers: {
|
|
386
|
+
[name: string]: unknown;
|
|
387
|
+
};
|
|
388
|
+
content: {
|
|
389
|
+
"application/json": components["schemas"]["DocumentsDownloadB64Output"];
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
/** @description Unauthorized */
|
|
393
|
+
401: {
|
|
394
|
+
headers: {
|
|
395
|
+
[name: string]: unknown;
|
|
396
|
+
};
|
|
397
|
+
content: {
|
|
398
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
/** @description Forbidden */
|
|
402
|
+
403: {
|
|
403
|
+
headers: {
|
|
404
|
+
[name: string]: unknown;
|
|
405
|
+
};
|
|
406
|
+
content: {
|
|
407
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
/** @description Not Found */
|
|
411
|
+
404: {
|
|
412
|
+
headers: {
|
|
413
|
+
[name: string]: unknown;
|
|
414
|
+
};
|
|
415
|
+
content: {
|
|
416
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
/** @description Error response. */
|
|
420
|
+
default: {
|
|
421
|
+
headers: {
|
|
422
|
+
[name: string]: unknown;
|
|
423
|
+
};
|
|
424
|
+
content: {
|
|
425
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
"compliance.messages.list": {
|
|
431
|
+
parameters: {
|
|
432
|
+
query?: {
|
|
433
|
+
limit?: number;
|
|
434
|
+
cursor?: string;
|
|
435
|
+
};
|
|
436
|
+
header?: never;
|
|
437
|
+
path?: never;
|
|
438
|
+
cookie?: never;
|
|
439
|
+
};
|
|
440
|
+
requestBody?: never;
|
|
441
|
+
responses: {
|
|
442
|
+
/** @description OK */
|
|
443
|
+
200: {
|
|
444
|
+
headers: {
|
|
445
|
+
[name: string]: unknown;
|
|
446
|
+
};
|
|
447
|
+
content: {
|
|
448
|
+
"application/json": components["schemas"]["Page_MessagesView"];
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
/** @description Bad Request */
|
|
452
|
+
400: {
|
|
453
|
+
headers: {
|
|
454
|
+
[name: string]: unknown;
|
|
455
|
+
};
|
|
456
|
+
content: {
|
|
457
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
/** @description Unauthorized */
|
|
461
|
+
401: {
|
|
462
|
+
headers: {
|
|
463
|
+
[name: string]: unknown;
|
|
464
|
+
};
|
|
465
|
+
content: {
|
|
466
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
/** @description Forbidden */
|
|
470
|
+
403: {
|
|
471
|
+
headers: {
|
|
472
|
+
[name: string]: unknown;
|
|
473
|
+
};
|
|
474
|
+
content: {
|
|
475
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
/** @description Error response. */
|
|
479
|
+
default: {
|
|
480
|
+
headers: {
|
|
481
|
+
[name: string]: unknown;
|
|
482
|
+
};
|
|
483
|
+
content: {
|
|
484
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
"compliance.messages.send": {
|
|
490
|
+
parameters: {
|
|
491
|
+
query?: never;
|
|
492
|
+
header?: never;
|
|
493
|
+
path?: never;
|
|
494
|
+
cookie?: never;
|
|
495
|
+
};
|
|
496
|
+
requestBody?: {
|
|
497
|
+
content: {
|
|
498
|
+
"application/json": components["schemas"]["MessagesSendBusinessInput"];
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
responses: {
|
|
502
|
+
/** @description OK */
|
|
503
|
+
200: {
|
|
504
|
+
headers: {
|
|
505
|
+
[name: string]: unknown;
|
|
506
|
+
};
|
|
507
|
+
content: {
|
|
508
|
+
"application/json": components["schemas"]["MessagesAck"];
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
/** @description Bad Request */
|
|
512
|
+
400: {
|
|
513
|
+
headers: {
|
|
514
|
+
[name: string]: unknown;
|
|
515
|
+
};
|
|
516
|
+
content: {
|
|
517
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
/** @description Unauthorized */
|
|
521
|
+
401: {
|
|
522
|
+
headers: {
|
|
523
|
+
[name: string]: unknown;
|
|
524
|
+
};
|
|
525
|
+
content: {
|
|
526
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
/** @description Forbidden */
|
|
530
|
+
403: {
|
|
531
|
+
headers: {
|
|
532
|
+
[name: string]: unknown;
|
|
533
|
+
};
|
|
534
|
+
content: {
|
|
535
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
/** @description Error response. */
|
|
539
|
+
default: {
|
|
540
|
+
headers: {
|
|
541
|
+
[name: string]: unknown;
|
|
542
|
+
};
|
|
543
|
+
content: {
|
|
544
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
"compliance.messages.read": {
|
|
550
|
+
parameters: {
|
|
551
|
+
query?: never;
|
|
552
|
+
header?: never;
|
|
553
|
+
path?: never;
|
|
554
|
+
cookie?: never;
|
|
555
|
+
};
|
|
556
|
+
requestBody?: never;
|
|
557
|
+
responses: {
|
|
558
|
+
/** @description OK */
|
|
559
|
+
200: {
|
|
560
|
+
headers: {
|
|
561
|
+
[name: string]: unknown;
|
|
562
|
+
};
|
|
563
|
+
content: {
|
|
564
|
+
"application/json": components["schemas"]["MessagesAck"];
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
/** @description Bad Request */
|
|
568
|
+
400: {
|
|
569
|
+
headers: {
|
|
570
|
+
[name: string]: unknown;
|
|
571
|
+
};
|
|
572
|
+
content: {
|
|
573
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
/** @description Unauthorized */
|
|
577
|
+
401: {
|
|
578
|
+
headers: {
|
|
579
|
+
[name: string]: unknown;
|
|
580
|
+
};
|
|
581
|
+
content: {
|
|
582
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
/** @description Forbidden */
|
|
586
|
+
403: {
|
|
587
|
+
headers: {
|
|
588
|
+
[name: string]: unknown;
|
|
589
|
+
};
|
|
590
|
+
content: {
|
|
591
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
/** @description Error response. */
|
|
595
|
+
default: {
|
|
596
|
+
headers: {
|
|
597
|
+
[name: string]: unknown;
|
|
598
|
+
};
|
|
599
|
+
content: {
|
|
600
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
"compliance.messages.unread.get": {
|
|
606
|
+
parameters: {
|
|
607
|
+
query?: never;
|
|
608
|
+
header?: never;
|
|
609
|
+
path?: never;
|
|
610
|
+
cookie?: never;
|
|
611
|
+
};
|
|
612
|
+
requestBody?: never;
|
|
613
|
+
responses: {
|
|
614
|
+
/** @description OK */
|
|
615
|
+
200: {
|
|
616
|
+
headers: {
|
|
617
|
+
[name: string]: unknown;
|
|
618
|
+
};
|
|
619
|
+
content: {
|
|
620
|
+
"application/json": components["schemas"]["MessagesUnreadCountOutput"];
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
/** @description Bad Request */
|
|
624
|
+
400: {
|
|
625
|
+
headers: {
|
|
626
|
+
[name: string]: unknown;
|
|
627
|
+
};
|
|
628
|
+
content: {
|
|
629
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
/** @description Unauthorized */
|
|
633
|
+
401: {
|
|
634
|
+
headers: {
|
|
635
|
+
[name: string]: unknown;
|
|
636
|
+
};
|
|
637
|
+
content: {
|
|
638
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
/** @description Forbidden */
|
|
642
|
+
403: {
|
|
643
|
+
headers: {
|
|
644
|
+
[name: string]: unknown;
|
|
645
|
+
};
|
|
646
|
+
content: {
|
|
647
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
/** @description Error response. */
|
|
651
|
+
default: {
|
|
652
|
+
headers: {
|
|
653
|
+
[name: string]: unknown;
|
|
654
|
+
};
|
|
655
|
+
content: {
|
|
656
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
"misc.contact.submit": {
|
|
662
|
+
parameters: {
|
|
663
|
+
query?: never;
|
|
664
|
+
header?: never;
|
|
665
|
+
path?: never;
|
|
666
|
+
cookie?: never;
|
|
667
|
+
};
|
|
668
|
+
requestBody?: {
|
|
669
|
+
content: {
|
|
670
|
+
"application/json": components["schemas"]["MiscContactUsInput"];
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
responses: {
|
|
674
|
+
/** @description OK */
|
|
675
|
+
200: {
|
|
676
|
+
headers: {
|
|
677
|
+
[name: string]: unknown;
|
|
678
|
+
};
|
|
679
|
+
content: {
|
|
680
|
+
"application/json": components["schemas"]["MiscAck"];
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
/** @description Error response. */
|
|
684
|
+
default: {
|
|
685
|
+
headers: {
|
|
686
|
+
[name: string]: unknown;
|
|
687
|
+
};
|
|
688
|
+
content: {
|
|
689
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
"notifications.member_notifications.list": {
|
|
695
|
+
parameters: {
|
|
696
|
+
query?: {
|
|
697
|
+
limit?: number;
|
|
698
|
+
cursor?: string;
|
|
699
|
+
seen?: boolean;
|
|
700
|
+
archived?: boolean;
|
|
701
|
+
};
|
|
702
|
+
header?: never;
|
|
703
|
+
path?: never;
|
|
704
|
+
cookie?: never;
|
|
705
|
+
};
|
|
706
|
+
requestBody?: never;
|
|
707
|
+
responses: {
|
|
708
|
+
/** @description OK */
|
|
709
|
+
200: {
|
|
710
|
+
headers: {
|
|
711
|
+
[name: string]: unknown;
|
|
712
|
+
};
|
|
713
|
+
content: {
|
|
714
|
+
"application/json": components["schemas"]["Page_InappNotificationView"];
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
/** @description Bad Request */
|
|
718
|
+
400: {
|
|
719
|
+
headers: {
|
|
720
|
+
[name: string]: unknown;
|
|
721
|
+
};
|
|
722
|
+
content: {
|
|
723
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
/** @description Unauthorized */
|
|
727
|
+
401: {
|
|
728
|
+
headers: {
|
|
729
|
+
[name: string]: unknown;
|
|
730
|
+
};
|
|
731
|
+
content: {
|
|
732
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
/** @description Forbidden */
|
|
736
|
+
403: {
|
|
737
|
+
headers: {
|
|
738
|
+
[name: string]: unknown;
|
|
739
|
+
};
|
|
740
|
+
content: {
|
|
741
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
742
|
+
};
|
|
743
|
+
};
|
|
744
|
+
/** @description Error response. */
|
|
745
|
+
default: {
|
|
746
|
+
headers: {
|
|
747
|
+
[name: string]: unknown;
|
|
748
|
+
};
|
|
749
|
+
content: {
|
|
750
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
"notifications.member_notifications.mark_seen": {
|
|
756
|
+
parameters: {
|
|
757
|
+
query?: never;
|
|
758
|
+
header?: never;
|
|
759
|
+
path?: never;
|
|
760
|
+
cookie?: never;
|
|
761
|
+
};
|
|
762
|
+
requestBody?: never;
|
|
763
|
+
responses: {
|
|
764
|
+
/** @description OK */
|
|
765
|
+
200: {
|
|
766
|
+
headers: {
|
|
767
|
+
[name: string]: unknown;
|
|
768
|
+
};
|
|
769
|
+
content: {
|
|
770
|
+
"application/json": components["schemas"]["InappAck"];
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
/** @description Unauthorized */
|
|
774
|
+
401: {
|
|
775
|
+
headers: {
|
|
776
|
+
[name: string]: unknown;
|
|
777
|
+
};
|
|
778
|
+
content: {
|
|
779
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
/** @description Forbidden */
|
|
783
|
+
403: {
|
|
784
|
+
headers: {
|
|
785
|
+
[name: string]: unknown;
|
|
786
|
+
};
|
|
787
|
+
content: {
|
|
788
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
/** @description Error response. */
|
|
792
|
+
default: {
|
|
793
|
+
headers: {
|
|
794
|
+
[name: string]: unknown;
|
|
795
|
+
};
|
|
796
|
+
content: {
|
|
797
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
798
|
+
};
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
"notifications.member_notifications.unseen": {
|
|
803
|
+
parameters: {
|
|
804
|
+
query?: never;
|
|
805
|
+
header?: never;
|
|
806
|
+
path?: never;
|
|
807
|
+
cookie?: never;
|
|
808
|
+
};
|
|
809
|
+
requestBody?: never;
|
|
810
|
+
responses: {
|
|
811
|
+
/** @description OK */
|
|
812
|
+
200: {
|
|
813
|
+
headers: {
|
|
814
|
+
[name: string]: unknown;
|
|
815
|
+
};
|
|
816
|
+
content: {
|
|
817
|
+
"application/json": components["schemas"]["InappUnseenCountOutput"];
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
/** @description Unauthorized */
|
|
821
|
+
401: {
|
|
822
|
+
headers: {
|
|
823
|
+
[name: string]: unknown;
|
|
824
|
+
};
|
|
825
|
+
content: {
|
|
826
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
/** @description Forbidden */
|
|
830
|
+
403: {
|
|
831
|
+
headers: {
|
|
832
|
+
[name: string]: unknown;
|
|
833
|
+
};
|
|
834
|
+
content: {
|
|
835
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
/** @description Error response. */
|
|
839
|
+
default: {
|
|
840
|
+
headers: {
|
|
841
|
+
[name: string]: unknown;
|
|
842
|
+
};
|
|
843
|
+
content: {
|
|
844
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
"notifications.member_notifications.update": {
|
|
850
|
+
parameters: {
|
|
851
|
+
query?: never;
|
|
852
|
+
header?: never;
|
|
853
|
+
path: {
|
|
854
|
+
id: string;
|
|
855
|
+
};
|
|
856
|
+
cookie?: never;
|
|
857
|
+
};
|
|
858
|
+
requestBody?: {
|
|
859
|
+
content: {
|
|
860
|
+
"application/json": components["schemas"]["InappMemberUpdateInput"];
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
responses: {
|
|
864
|
+
/** @description OK */
|
|
865
|
+
200: {
|
|
866
|
+
headers: {
|
|
867
|
+
[name: string]: unknown;
|
|
868
|
+
};
|
|
869
|
+
content: {
|
|
870
|
+
"application/json": components["schemas"]["InappNotificationView"];
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
/** @description Bad Request */
|
|
874
|
+
400: {
|
|
875
|
+
headers: {
|
|
876
|
+
[name: string]: unknown;
|
|
877
|
+
};
|
|
878
|
+
content: {
|
|
879
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
/** @description Unauthorized */
|
|
883
|
+
401: {
|
|
884
|
+
headers: {
|
|
885
|
+
[name: string]: unknown;
|
|
886
|
+
};
|
|
887
|
+
content: {
|
|
888
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
/** @description Forbidden */
|
|
892
|
+
403: {
|
|
893
|
+
headers: {
|
|
894
|
+
[name: string]: unknown;
|
|
895
|
+
};
|
|
896
|
+
content: {
|
|
897
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
/** @description Not Found */
|
|
901
|
+
404: {
|
|
902
|
+
headers: {
|
|
903
|
+
[name: string]: unknown;
|
|
904
|
+
};
|
|
905
|
+
content: {
|
|
906
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
/** @description Error response. */
|
|
910
|
+
default: {
|
|
911
|
+
headers: {
|
|
912
|
+
[name: string]: unknown;
|
|
913
|
+
};
|
|
914
|
+
content: {
|
|
915
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
"notifications.member_preferences.get": {
|
|
921
|
+
parameters: {
|
|
922
|
+
query?: never;
|
|
923
|
+
header?: never;
|
|
924
|
+
path?: never;
|
|
925
|
+
cookie?: never;
|
|
926
|
+
};
|
|
927
|
+
requestBody?: never;
|
|
928
|
+
responses: {
|
|
929
|
+
/** @description OK */
|
|
930
|
+
200: {
|
|
931
|
+
headers: {
|
|
932
|
+
[name: string]: unknown;
|
|
933
|
+
};
|
|
934
|
+
content: {
|
|
935
|
+
"application/json": components["schemas"]["PreferencesGetPreferencesOutput"];
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
/** @description Unauthorized */
|
|
939
|
+
401: {
|
|
940
|
+
headers: {
|
|
941
|
+
[name: string]: unknown;
|
|
942
|
+
};
|
|
943
|
+
content: {
|
|
944
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
/** @description Forbidden */
|
|
948
|
+
403: {
|
|
949
|
+
headers: {
|
|
950
|
+
[name: string]: unknown;
|
|
951
|
+
};
|
|
952
|
+
content: {
|
|
953
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
/** @description Error response. */
|
|
957
|
+
default: {
|
|
958
|
+
headers: {
|
|
959
|
+
[name: string]: unknown;
|
|
960
|
+
};
|
|
961
|
+
content: {
|
|
962
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
"notifications.member_preferences.update": {
|
|
968
|
+
parameters: {
|
|
969
|
+
query?: never;
|
|
970
|
+
header?: never;
|
|
971
|
+
path?: never;
|
|
972
|
+
cookie?: never;
|
|
973
|
+
};
|
|
974
|
+
requestBody?: {
|
|
975
|
+
content: {
|
|
976
|
+
"application/json": components["schemas"]["PreferencesSetPreferencesInput"];
|
|
977
|
+
};
|
|
978
|
+
};
|
|
979
|
+
responses: {
|
|
980
|
+
/** @description OK */
|
|
981
|
+
200: {
|
|
982
|
+
headers: {
|
|
983
|
+
[name: string]: unknown;
|
|
984
|
+
};
|
|
985
|
+
content: {
|
|
986
|
+
"application/json": components["schemas"]["PreferencesGetPreferencesOutput"];
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
/** @description Bad Request */
|
|
990
|
+
400: {
|
|
991
|
+
headers: {
|
|
992
|
+
[name: string]: unknown;
|
|
993
|
+
};
|
|
994
|
+
content: {
|
|
995
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
/** @description Unauthorized */
|
|
999
|
+
401: {
|
|
1000
|
+
headers: {
|
|
1001
|
+
[name: string]: unknown;
|
|
1002
|
+
};
|
|
1003
|
+
content: {
|
|
1004
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
1007
|
+
/** @description Forbidden */
|
|
1008
|
+
403: {
|
|
1009
|
+
headers: {
|
|
1010
|
+
[name: string]: unknown;
|
|
1011
|
+
};
|
|
1012
|
+
content: {
|
|
1013
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
/** @description Error response. */
|
|
1017
|
+
default: {
|
|
1018
|
+
headers: {
|
|
1019
|
+
[name: string]: unknown;
|
|
1020
|
+
};
|
|
1021
|
+
content: {
|
|
1022
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export { createStableSeaClient, type StableSeaClient, type StableSeaMutation, ty
|
|
|
2
2
|
export type { StableSeaClientOptions } from "./client.js";
|
|
3
3
|
export type { components, operations, paths } from "./gen/schema.js";
|
|
4
4
|
export { verifyWebhookSignature, type VerifyWebhookSignatureOptions, } from "./webhooks.js";
|
|
5
|
+
export { createStableSeaSessionClient, type StableSeaSessionClient, type StableSeaSessionClientOptions, } from "./session-client.js";
|
|
6
|
+
export type { components as SessionComponents, operations as SessionOperations, paths as SessionPaths, } from "./gen/session-schema.js";
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import createClient, { type ClientOptions } from "openapi-fetch";
|
|
2
|
+
import type { paths } from "./gen/session-schema.js";
|
|
3
|
+
export interface StableSeaSessionClientOptions {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
deviceId?: string;
|
|
6
|
+
fetch?: ClientOptions["fetch"];
|
|
7
|
+
}
|
|
8
|
+
export type StableSeaSessionClient = ReturnType<typeof createClient<paths>>;
|
|
9
|
+
/** Customer member operations use an existing user session, never an API key. */
|
|
10
|
+
export declare function createStableSeaSessionClient(options: StableSeaSessionClientOptions): StableSeaSessionClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import createClient, {} from "openapi-fetch";
|
|
2
|
+
/** Customer member operations use an existing user session, never an API key. */
|
|
3
|
+
export function createStableSeaSessionClient(options) {
|
|
4
|
+
if (!options.baseUrl)
|
|
5
|
+
throw new Error("baseUrl is required");
|
|
6
|
+
return createClient({
|
|
7
|
+
baseUrl: options.baseUrl,
|
|
8
|
+
credentials: "include",
|
|
9
|
+
fetch: options.fetch,
|
|
10
|
+
headers: options.deviceId ? { "X-Device-Id": options.deviceId } : undefined,
|
|
11
|
+
});
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stable_sea/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"repository": "git+https://github.com/StableSea/monorepo.git",
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && mkdir -p dist/gen && cp
|
|
24
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && mkdir -p dist/gen && cp src/gen/schema.d.ts src/gen/session-schema.d.ts dist/gen/",
|
|
25
25
|
"generate": "bash scripts/generate.sh",
|
|
26
26
|
"prepack": "npm run build",
|
|
27
27
|
"test": "npm run build && npm run test:unit && npm run test:consumer",
|