@viceme-ai/sdk 0.3.0 → 0.6.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/README.md +158 -44
- package/dist/browser-events.d.ts +52 -0
- package/dist/browser-events.d.ts.map +1 -0
- package/dist/capability-mount.d.ts +15 -0
- package/dist/capability-mount.d.ts.map +1 -0
- package/dist/chunks/build-endpoints-NrDmg6jf.js +12 -0
- package/dist/chunks/build-endpoints-NrDmg6jf.js.map +1 -0
- package/dist/chunks/{client-DKsaEtwq.js → client-w9vih8Ng.js} +386 -349
- package/dist/chunks/client-w9vih8Ng.js.map +1 -0
- package/dist/chunks/{version-C3KVoLNb.js → errors-C7DfLKcF.js} +14 -25
- package/dist/chunks/errors-C7DfLKcF.js.map +1 -0
- package/dist/chunks/validation-patAYhXC.js +43 -0
- package/dist/chunks/validation-patAYhXC.js.map +1 -0
- package/dist/chunks/version-uPTHb89K.js +6 -0
- package/dist/chunks/version-uPTHb89K.js.map +1 -0
- package/dist/core/build-endpoints.d.ts +2 -0
- package/dist/core/build-endpoints.d.ts.map +1 -1
- package/dist/core/capabilities.d.ts +4 -2
- package/dist/core/capabilities.d.ts.map +1 -1
- package/dist/core/client.d.ts +4 -2
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/config.d.ts +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/lifecycle.d.ts +2 -4
- package/dist/core/lifecycle.d.ts.map +1 -1
- package/dist/core/presentation.d.ts +7 -2
- package/dist/core/presentation.d.ts.map +1 -1
- package/dist/danmaku/index.d.ts +1 -0
- package/dist/danmaku/index.d.ts.map +1 -1
- package/dist/danmaku/mount.d.ts +1 -1
- package/dist/danmaku/mount.d.ts.map +1 -1
- package/dist/danmaku.js +128 -121
- package/dist/danmaku.js.map +1 -1
- package/dist/generated/public-contract.d.ts +124 -373
- package/dist/generated/public-contract.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -21
- package/dist/index.js.map +1 -1
- package/dist/loader/attributes.d.ts +3 -2
- package/dist/loader/attributes.d.ts.map +1 -1
- package/dist/loader/auto-loader.d.ts +1 -1
- package/dist/loader/auto-loader.d.ts.map +1 -1
- package/dist/loader/events.d.ts +1 -44
- package/dist/loader/events.d.ts.map +1 -1
- package/dist/loader/registry.d.ts +2 -1
- package/dist/loader/registry.d.ts.map +1 -1
- package/dist/manifest.json +60 -35
- package/dist/session/session.d.ts +7 -6
- package/dist/session/session.d.ts.map +1 -1
- package/dist/testing/test-adapter.d.ts +1 -1
- package/dist/testing/test-adapter.d.ts.map +1 -1
- package/dist/testing.js +18 -17
- package/dist/testing.js.map +1 -1
- package/dist/tip/headless.d.ts +4 -0
- package/dist/tip/headless.d.ts.map +1 -0
- package/dist/tip/index.d.ts +67 -0
- package/dist/tip/index.d.ts.map +1 -0
- package/dist/tip/mount.d.ts +5 -0
- package/dist/tip/mount.d.ts.map +1 -0
- package/dist/tip/testing.d.ts +9 -0
- package/dist/tip/testing.d.ts.map +1 -0
- package/dist/tip/testing.js +43 -0
- package/dist/tip/testing.js.map +1 -0
- package/dist/tip/validation.d.ts +7 -0
- package/dist/tip/validation.d.ts.map +1 -0
- package/dist/tip.js +472 -0
- package/dist/tip.js.map +1 -0
- package/dist/transport/transport.d.ts +3 -1
- package/dist/transport/transport.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/viceme.min.js +5 -22
- package/dist/viceme.min.js.map +1 -1
- package/package.json +12 -7
- package/dist/bootstrap.min.js +0 -2
- package/dist/bootstrap.min.js.map +0 -1
- package/dist/chunks/client-DKsaEtwq.js.map +0 -1
- package/dist/chunks/version-C3KVoLNb.js.map +0 -1
- package/dist/loader/bootstrap.d.ts +0 -1
- package/dist/loader/bootstrap.d.ts.map +0 -1
- package/dist/loader/mount-handle.d.ts +0 -25
- package/dist/loader/mount-handle.d.ts.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GENERATED FILE — DO NOT EDIT.
|
|
3
3
|
*
|
|
4
4
|
* Generated from contracts/public-capabilities.openapi.json
|
|
5
|
-
* (contractVersion
|
|
5
|
+
* (contractVersion 1.1.0, sha256 f0401296acb1aa2e…)
|
|
6
6
|
* by scripts/generate-contracts.mjs. Regenerate with `pnpm contracts:generate`.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not make direct changes to the file.
|
|
11
11
|
*/
|
|
12
12
|
export interface paths {
|
|
13
|
-
"/v1/public/
|
|
13
|
+
"/v1/public/work-sdk/sessions": {
|
|
14
14
|
parameters: {
|
|
15
15
|
query?: never;
|
|
16
16
|
header?: never;
|
|
@@ -19,98 +19,30 @@ export interface paths {
|
|
|
19
19
|
};
|
|
20
20
|
get?: never;
|
|
21
21
|
put?: never;
|
|
22
|
-
|
|
23
|
-
* Establish a public visitor session for a Work
|
|
24
|
-
* @description Binds a short-lived capability token to the Work, the caller Origin, the enabled capability set, and an expiry. The workKey locates the Work; it is never an authorization credential. CORS accepts any browser Origin with credentials disabled; no creator-managed Origin allowlist is required.
|
|
25
|
-
*/
|
|
26
|
-
post: operations["createWorkSession"];
|
|
22
|
+
post: operations["createWebsiteAccessSession"];
|
|
27
23
|
delete?: never;
|
|
28
24
|
options?: never;
|
|
29
25
|
head?: never;
|
|
30
26
|
patch?: never;
|
|
31
27
|
trace?: never;
|
|
32
28
|
};
|
|
33
|
-
"/v1/public/
|
|
29
|
+
"/v1/public/work-sdk/follow": {
|
|
34
30
|
parameters: {
|
|
35
31
|
query?: never;
|
|
36
32
|
header?: never;
|
|
37
33
|
path?: never;
|
|
38
34
|
cookie?: never;
|
|
39
35
|
};
|
|
40
|
-
get
|
|
41
|
-
put
|
|
42
|
-
post: operations["authorizeWechat"];
|
|
43
|
-
delete?: never;
|
|
44
|
-
options?: never;
|
|
45
|
-
head?: never;
|
|
46
|
-
patch?: never;
|
|
47
|
-
trace?: never;
|
|
48
|
-
};
|
|
49
|
-
"/v1/public/v1/auth/exchange": {
|
|
50
|
-
parameters: {
|
|
51
|
-
query?: never;
|
|
52
|
-
header?: never;
|
|
53
|
-
path?: never;
|
|
54
|
-
cookie?: never;
|
|
55
|
-
};
|
|
56
|
-
get?: never;
|
|
57
|
-
put?: never;
|
|
58
|
-
post: operations["exchangeWechatCode"];
|
|
59
|
-
delete?: never;
|
|
60
|
-
options?: never;
|
|
61
|
-
head?: never;
|
|
62
|
-
patch?: never;
|
|
63
|
-
trace?: never;
|
|
64
|
-
};
|
|
65
|
-
"/v1/public/v1/auth/resume-codes": {
|
|
66
|
-
parameters: {
|
|
67
|
-
query?: never;
|
|
68
|
-
header?: never;
|
|
69
|
-
path?: never;
|
|
70
|
-
cookie?: never;
|
|
71
|
-
};
|
|
72
|
-
get?: never;
|
|
73
|
-
put?: never;
|
|
74
|
-
post: operations["createAuthResumeCode"];
|
|
75
|
-
delete?: never;
|
|
76
|
-
options?: never;
|
|
77
|
-
head?: never;
|
|
78
|
-
patch?: never;
|
|
79
|
-
trace?: never;
|
|
80
|
-
};
|
|
81
|
-
"/v1/public/v1/auth/resume": {
|
|
82
|
-
parameters: {
|
|
83
|
-
query?: never;
|
|
84
|
-
header?: never;
|
|
85
|
-
path?: never;
|
|
86
|
-
cookie?: never;
|
|
87
|
-
};
|
|
88
|
-
get?: never;
|
|
89
|
-
put?: never;
|
|
90
|
-
post: operations["resumeAuthenticatedSession"];
|
|
91
|
-
delete?: never;
|
|
92
|
-
options?: never;
|
|
93
|
-
head?: never;
|
|
94
|
-
patch?: never;
|
|
95
|
-
trace?: never;
|
|
96
|
-
};
|
|
97
|
-
"/v1/public/v1/follow": {
|
|
98
|
-
parameters: {
|
|
99
|
-
query?: never;
|
|
100
|
-
header?: never;
|
|
101
|
-
path?: never;
|
|
102
|
-
cookie?: never;
|
|
103
|
-
};
|
|
104
|
-
get: operations["getFollowState"];
|
|
105
|
-
put: operations["followWorkOwner"];
|
|
36
|
+
get: operations["getWebsiteFollowState"];
|
|
37
|
+
put: operations["followWebsiteCreator"];
|
|
106
38
|
post?: never;
|
|
107
|
-
delete
|
|
39
|
+
delete?: never;
|
|
108
40
|
options?: never;
|
|
109
41
|
head?: never;
|
|
110
42
|
patch?: never;
|
|
111
43
|
trace?: never;
|
|
112
44
|
};
|
|
113
|
-
"/v1/public/
|
|
45
|
+
"/v1/public/work-sdk/access/check": {
|
|
114
46
|
parameters: {
|
|
115
47
|
query?: never;
|
|
116
48
|
header?: never;
|
|
@@ -119,25 +51,21 @@ export interface paths {
|
|
|
119
51
|
};
|
|
120
52
|
get?: never;
|
|
121
53
|
put?: never;
|
|
122
|
-
post: operations["
|
|
54
|
+
post: operations["checkWebsiteAccess"];
|
|
123
55
|
delete?: never;
|
|
124
56
|
options?: never;
|
|
125
57
|
head?: never;
|
|
126
58
|
patch?: never;
|
|
127
59
|
trace?: never;
|
|
128
60
|
};
|
|
129
|
-
"/v1/public/
|
|
61
|
+
"/v1/public/work-sdk/access/features": {
|
|
130
62
|
parameters: {
|
|
131
63
|
query?: never;
|
|
132
64
|
header?: never;
|
|
133
65
|
path?: never;
|
|
134
66
|
cookie?: never;
|
|
135
67
|
};
|
|
136
|
-
|
|
137
|
-
* List active feature presentation
|
|
138
|
-
* @description Returns server-authoritative titles and current prices for host-native access entry points. It does not alter access, checkout, or payment state.
|
|
139
|
-
*/
|
|
140
|
-
get: operations["listAccessFeatures"];
|
|
68
|
+
get: operations["getWebsiteAccessFeatures"];
|
|
141
69
|
put?: never;
|
|
142
70
|
post?: never;
|
|
143
71
|
delete?: never;
|
|
@@ -146,7 +74,7 @@ export interface paths {
|
|
|
146
74
|
patch?: never;
|
|
147
75
|
trace?: never;
|
|
148
76
|
};
|
|
149
|
-
"/v1/public/
|
|
77
|
+
"/v1/public/work-sdk/checkout": {
|
|
150
78
|
parameters: {
|
|
151
79
|
query?: never;
|
|
152
80
|
header?: never;
|
|
@@ -155,41 +83,40 @@ export interface paths {
|
|
|
155
83
|
};
|
|
156
84
|
get?: never;
|
|
157
85
|
put?: never;
|
|
158
|
-
post: operations["
|
|
86
|
+
post: operations["createWebsiteAccessCheckout"];
|
|
159
87
|
delete?: never;
|
|
160
88
|
options?: never;
|
|
161
89
|
head?: never;
|
|
162
90
|
patch?: never;
|
|
163
91
|
trace?: never;
|
|
164
92
|
};
|
|
165
|
-
"/v1/
|
|
93
|
+
"/v1/danmaku/messages": {
|
|
166
94
|
parameters: {
|
|
167
95
|
query?: never;
|
|
168
96
|
header?: never;
|
|
169
97
|
path?: never;
|
|
170
98
|
cookie?: never;
|
|
171
99
|
};
|
|
172
|
-
get
|
|
100
|
+
get: operations["listDanmakuMessages"];
|
|
173
101
|
put?: never;
|
|
174
|
-
post: operations["
|
|
102
|
+
post: operations["createDanmakuMessage"];
|
|
175
103
|
delete?: never;
|
|
176
104
|
options?: never;
|
|
177
105
|
head?: never;
|
|
178
106
|
patch?: never;
|
|
179
107
|
trace?: never;
|
|
180
108
|
};
|
|
181
|
-
"/v1/
|
|
109
|
+
"/v1/work-sdk/{workKey}/tip-config": {
|
|
182
110
|
parameters: {
|
|
183
111
|
query?: never;
|
|
184
112
|
header?: never;
|
|
185
113
|
path?: never;
|
|
186
114
|
cookie?: never;
|
|
187
115
|
};
|
|
188
|
-
/**
|
|
189
|
-
get: operations["
|
|
116
|
+
/** Read public Tip configuration for one Work */
|
|
117
|
+
get: operations["getTipConfig"];
|
|
190
118
|
put?: never;
|
|
191
|
-
|
|
192
|
-
post: operations["createDanmakuMessage"];
|
|
119
|
+
post?: never;
|
|
193
120
|
delete?: never;
|
|
194
121
|
options?: never;
|
|
195
122
|
head?: never;
|
|
@@ -200,79 +127,32 @@ export interface paths {
|
|
|
200
127
|
export type webhooks = Record<string, never>;
|
|
201
128
|
export interface components {
|
|
202
129
|
schemas: {
|
|
203
|
-
/** @description Public opaque
|
|
130
|
+
/** @description Public opaque test or live Work key. */
|
|
204
131
|
WorkKey: string;
|
|
205
|
-
/** @description Enabled capability name for the work. */
|
|
206
|
-
CapabilityName: string;
|
|
207
132
|
CreateWorkSessionRequest: {
|
|
208
133
|
workKey: components["schemas"]["WorkKey"];
|
|
209
134
|
};
|
|
210
|
-
WorkDescriptor: {
|
|
211
|
-
key: components["schemas"]["WorkKey"];
|
|
212
|
-
capabilities: components["schemas"]["CapabilityName"][];
|
|
213
|
-
} & {
|
|
214
|
-
[key: string]: unknown;
|
|
215
|
-
};
|
|
216
|
-
/** @description Unknown additional fields are allowed and ignored by the SDK (forward compatibility). */
|
|
217
135
|
WorkSession: {
|
|
218
|
-
|
|
219
|
-
/** @description Short-lived capability token; memory-only in the SDK. */
|
|
220
|
-
token?: string;
|
|
221
|
-
/** @description Epoch milliseconds when the token expires. */
|
|
222
|
-
expiresAt?: number;
|
|
223
|
-
} & {
|
|
224
|
-
[key: string]: unknown;
|
|
225
|
-
};
|
|
226
|
-
WorkUser: {
|
|
227
|
-
subject: string;
|
|
228
|
-
nickname: string | null;
|
|
229
|
-
/** Format: uri */
|
|
230
|
-
avatarUrl: string | null;
|
|
231
|
-
};
|
|
232
|
-
AuthAuthorizeRequest: {
|
|
233
|
-
channel: string;
|
|
234
|
-
/** @enum {string} */
|
|
235
|
-
clientType?: "h5" | "pc";
|
|
236
|
-
/** @enum {string} */
|
|
237
|
-
locale: "zh-CN" | "en-US";
|
|
238
|
-
};
|
|
239
|
-
AuthAuthorizeResponse: {
|
|
240
|
-
/** Format: uri */
|
|
241
|
-
authorizationUrl: string;
|
|
242
|
-
/** Format: uri */
|
|
243
|
-
completionOrigin: string;
|
|
244
|
-
};
|
|
245
|
-
AuthExchangeRequest: {
|
|
246
|
-
code: string;
|
|
247
|
-
codeVerifier: string;
|
|
248
|
-
};
|
|
249
|
-
AuthExchangeResponse: {
|
|
136
|
+
workKey: components["schemas"]["WorkKey"];
|
|
250
137
|
token: string;
|
|
251
|
-
expiresAt: number;
|
|
252
|
-
user: components["schemas"]["WorkUser"];
|
|
253
|
-
};
|
|
254
|
-
AuthResumeCodeResponse: {
|
|
255
|
-
code: string;
|
|
256
|
-
expiresAt: number;
|
|
257
|
-
};
|
|
258
|
-
AuthResumeRequest: {
|
|
259
|
-
code: string;
|
|
260
|
-
};
|
|
261
|
-
FollowState: {
|
|
262
|
-
following: boolean;
|
|
263
138
|
/** Format: date-time */
|
|
264
|
-
|
|
265
|
-
|
|
139
|
+
expiresAt: string;
|
|
140
|
+
capabilities: ("danmaku" | "tip" | "access" | "follow" | "checkout")[];
|
|
266
141
|
};
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
|
|
142
|
+
Creator: {
|
|
143
|
+
/** Format: uuid */
|
|
144
|
+
id: string;
|
|
270
145
|
displayName: string;
|
|
271
146
|
/** Format: uri */
|
|
272
147
|
avatarUrl: string | null;
|
|
273
148
|
description: string | null;
|
|
274
|
-
|
|
275
|
-
|
|
149
|
+
publishedWorkCount: number;
|
|
150
|
+
};
|
|
151
|
+
FollowState: {
|
|
152
|
+
following: boolean;
|
|
153
|
+
/** Format: date-time */
|
|
154
|
+
followedAt: string | null;
|
|
155
|
+
creator: components["schemas"]["Creator"];
|
|
276
156
|
};
|
|
277
157
|
AccessCheckRequest: {
|
|
278
158
|
featureKeys: string[];
|
|
@@ -280,7 +160,7 @@ export interface components {
|
|
|
280
160
|
AccessDecision: {
|
|
281
161
|
allowed: boolean;
|
|
282
162
|
/** @enum {string} */
|
|
283
|
-
reason: "
|
|
163
|
+
reason: "PUBLIC" | "OWNER" | "FOLLOWING" | "ENTITLED" | "AUTH_REQUIRED" | "FOLLOW_REQUIRED" | "PURCHASE_REQUIRED" | "FEATURE_NOT_FOUND" | "FEATURE_DISABLED";
|
|
284
164
|
/** @enum {string|null} */
|
|
285
165
|
nextAction: "SIGN_IN" | "FOLLOW" | "CHECKOUT" | null;
|
|
286
166
|
};
|
|
@@ -291,16 +171,14 @@ export interface components {
|
|
|
291
171
|
};
|
|
292
172
|
AccessFeaturePrice: {
|
|
293
173
|
amountCents: number;
|
|
294
|
-
/** @
|
|
174
|
+
/** @constant */
|
|
295
175
|
currency: "CNY";
|
|
296
176
|
};
|
|
297
177
|
AccessFeaturePresentation: {
|
|
298
178
|
featureKey: string;
|
|
299
179
|
title: string;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
type: "PUBLIC" | "FOLLOW_OWNER" | "WORK_ENTITLEMENT";
|
|
303
|
-
};
|
|
180
|
+
/** @enum {string} */
|
|
181
|
+
policyType: "PUBLIC" | "FOLLOW_OWNER" | "WORK_ENTITLEMENT";
|
|
304
182
|
price: components["schemas"]["AccessFeaturePrice"] | null;
|
|
305
183
|
};
|
|
306
184
|
AccessFeaturesResponse: {
|
|
@@ -313,32 +191,49 @@ export interface components {
|
|
|
313
191
|
* @enum {string}
|
|
314
192
|
*/
|
|
315
193
|
locale: "zh-CN" | "en-US";
|
|
316
|
-
channel: string;
|
|
317
194
|
};
|
|
318
195
|
CheckoutResponse: {
|
|
319
196
|
/** Format: uri */
|
|
320
197
|
checkoutUrl: string;
|
|
321
198
|
alreadyOwned: boolean;
|
|
322
|
-
/** Format: uri */
|
|
323
|
-
completionOrigin: string;
|
|
324
|
-
};
|
|
325
|
-
CheckoutBootstrapRequest: {
|
|
326
|
-
code: string;
|
|
327
|
-
};
|
|
328
|
-
CheckoutBootstrapResponse: {
|
|
329
|
-
token: string;
|
|
330
199
|
/** Format: date-time */
|
|
331
|
-
expiresAt: string;
|
|
332
|
-
|
|
200
|
+
expiresAt: string | null;
|
|
201
|
+
};
|
|
202
|
+
/** @enum {string} */
|
|
203
|
+
TipEnvironment: "SANDBOX" | "PRODUCTION";
|
|
204
|
+
/** @enum {string} */
|
|
205
|
+
TipCurrency: "CNY";
|
|
206
|
+
/** @enum {string} */
|
|
207
|
+
TipProvider: "WECHAT_PAY" | "ALIPAY";
|
|
208
|
+
TipWork: {
|
|
209
|
+
/** Format: uuid */
|
|
210
|
+
id: string;
|
|
211
|
+
title: string;
|
|
333
212
|
};
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
213
|
+
TipAmount: {
|
|
214
|
+
/** @enum {integer} */
|
|
215
|
+
minCents: 100;
|
|
216
|
+
/** @enum {integer} */
|
|
217
|
+
maxCents: 20000;
|
|
218
|
+
/** @enum {integer} */
|
|
219
|
+
stepCents: 1;
|
|
220
|
+
};
|
|
221
|
+
TipConfig: {
|
|
222
|
+
work: components["schemas"]["TipWork"];
|
|
223
|
+
workKey: components["schemas"]["WorkKey"];
|
|
224
|
+
environment: components["schemas"]["TipEnvironment"];
|
|
225
|
+
currency: components["schemas"]["TipCurrency"];
|
|
226
|
+
amount: components["schemas"]["TipAmount"];
|
|
227
|
+
providers: components["schemas"]["TipProvider"][];
|
|
228
|
+
};
|
|
229
|
+
TipConfigCredentialsError: {
|
|
230
|
+
/** @constant */
|
|
231
|
+
statusCode: 400;
|
|
232
|
+
/** @constant */
|
|
233
|
+
code: "TIP_CONFIG_CREDENTIALS_NOT_ALLOWED";
|
|
338
234
|
message: string;
|
|
339
235
|
requestId: string;
|
|
340
236
|
};
|
|
341
|
-
/** @description Opaque page-position anchor derived by the external SDK. */
|
|
342
237
|
DanmakuAnchorKey: string;
|
|
343
238
|
DanmakuCursor: string;
|
|
344
239
|
DanmakuMessage: {
|
|
@@ -351,18 +246,23 @@ export interface components {
|
|
|
351
246
|
createdAt: string;
|
|
352
247
|
};
|
|
353
248
|
DanmakuMessagesResponse: {
|
|
354
|
-
|
|
249
|
+
messages: components["schemas"]["DanmakuMessage"][];
|
|
355
250
|
nextCursor: components["schemas"]["DanmakuCursor"] | null;
|
|
356
|
-
total: number;
|
|
357
251
|
};
|
|
358
252
|
CreateDanmakuMessageRequest: {
|
|
359
253
|
workKey: components["schemas"]["WorkKey"];
|
|
360
254
|
content: string;
|
|
361
255
|
anchorKey?: components["schemas"]["DanmakuAnchorKey"];
|
|
362
256
|
};
|
|
257
|
+
ErrorBody: {
|
|
258
|
+
statusCode: number;
|
|
259
|
+
code: string;
|
|
260
|
+
message: string;
|
|
261
|
+
requestId: string;
|
|
262
|
+
};
|
|
363
263
|
};
|
|
364
264
|
responses: {
|
|
365
|
-
/** @description Public
|
|
265
|
+
/** @description Public API error */
|
|
366
266
|
PublicError: {
|
|
367
267
|
headers: {
|
|
368
268
|
[name: string]: unknown;
|
|
@@ -371,26 +271,17 @@ export interface components {
|
|
|
371
271
|
"application/json": components["schemas"]["ErrorBody"];
|
|
372
272
|
};
|
|
373
273
|
};
|
|
374
|
-
/** @description
|
|
375
|
-
|
|
376
|
-
headers: {
|
|
377
|
-
[name: string]: unknown;
|
|
378
|
-
};
|
|
379
|
-
content: {
|
|
380
|
-
"application/json": components["schemas"]["ErrorBody"];
|
|
381
|
-
};
|
|
382
|
-
};
|
|
383
|
-
/** @description Unknown, private, or disabled work. */
|
|
384
|
-
WorkNotFound: {
|
|
274
|
+
/** @description Tip configuration requests must not include Cookie or Authorization credentials. */
|
|
275
|
+
TipConfigCredentialsNotAllowed: {
|
|
385
276
|
headers: {
|
|
386
277
|
[name: string]: unknown;
|
|
387
278
|
};
|
|
388
279
|
content: {
|
|
389
|
-
"application/json": components["schemas"]["
|
|
280
|
+
"application/json": components["schemas"]["TipConfigCredentialsError"];
|
|
390
281
|
};
|
|
391
282
|
};
|
|
392
|
-
/** @description
|
|
393
|
-
|
|
283
|
+
/** @description Unknown Work or Tip is unavailable for this Work or region. */
|
|
284
|
+
TipUnavailable: {
|
|
394
285
|
headers: {
|
|
395
286
|
[name: string]: unknown;
|
|
396
287
|
};
|
|
@@ -398,7 +289,7 @@ export interface components {
|
|
|
398
289
|
"application/json": components["schemas"]["ErrorBody"];
|
|
399
290
|
};
|
|
400
291
|
};
|
|
401
|
-
/** @description
|
|
292
|
+
/** @description Unexpected Shop error. */
|
|
402
293
|
InternalError: {
|
|
403
294
|
headers: {
|
|
404
295
|
[name: string]: unknown;
|
|
@@ -407,15 +298,6 @@ export interface components {
|
|
|
407
298
|
"application/json": components["schemas"]["ErrorBody"];
|
|
408
299
|
};
|
|
409
300
|
};
|
|
410
|
-
/** @description Invalid query or body. */
|
|
411
|
-
BadRequest: {
|
|
412
|
-
headers: {
|
|
413
|
-
[name: string]: unknown;
|
|
414
|
-
};
|
|
415
|
-
content: {
|
|
416
|
-
"application/json": components["schemas"]["ErrorBody"];
|
|
417
|
-
};
|
|
418
|
-
};
|
|
419
301
|
};
|
|
420
302
|
parameters: never;
|
|
421
303
|
requestBodies: never;
|
|
@@ -424,7 +306,7 @@ export interface components {
|
|
|
424
306
|
}
|
|
425
307
|
export type $defs = Record<string, never>;
|
|
426
308
|
export interface operations {
|
|
427
|
-
|
|
309
|
+
createWebsiteAccessSession: {
|
|
428
310
|
parameters: {
|
|
429
311
|
query?: never;
|
|
430
312
|
header?: never;
|
|
@@ -437,76 +319,40 @@ export interface operations {
|
|
|
437
319
|
};
|
|
438
320
|
};
|
|
439
321
|
responses: {
|
|
440
|
-
/** @description Session established
|
|
322
|
+
/** @description Session established */
|
|
441
323
|
201: {
|
|
442
324
|
headers: {
|
|
443
|
-
/** @description Server request id for support correlation. */
|
|
444
|
-
"x-request-id"?: string;
|
|
445
325
|
[name: string]: unknown;
|
|
446
326
|
};
|
|
447
327
|
content: {
|
|
448
328
|
"application/json": components["schemas"]["WorkSession"];
|
|
449
329
|
};
|
|
450
330
|
};
|
|
451
|
-
400: components["responses"]["ValidationError"];
|
|
452
|
-
404: components["responses"]["WorkNotFound"];
|
|
453
|
-
429: components["responses"]["RateLimited"];
|
|
454
|
-
"5xx": components["responses"]["InternalError"];
|
|
455
|
-
};
|
|
456
|
-
};
|
|
457
|
-
authorizeWechat: {
|
|
458
|
-
parameters: {
|
|
459
|
-
query?: never;
|
|
460
|
-
header?: never;
|
|
461
|
-
path?: never;
|
|
462
|
-
cookie?: never;
|
|
463
|
-
};
|
|
464
|
-
requestBody: {
|
|
465
|
-
content: {
|
|
466
|
-
"application/json": components["schemas"]["AuthAuthorizeRequest"];
|
|
467
|
-
};
|
|
468
|
-
};
|
|
469
|
-
responses: {
|
|
470
|
-
/** @description Hosted WeChat authorization URL. */
|
|
471
|
-
200: {
|
|
472
|
-
headers: {
|
|
473
|
-
[name: string]: unknown;
|
|
474
|
-
};
|
|
475
|
-
content: {
|
|
476
|
-
"application/json": components["schemas"]["AuthAuthorizeResponse"];
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
331
|
"4xx": components["responses"]["PublicError"];
|
|
480
|
-
"5xx": components["responses"]["InternalError"];
|
|
481
332
|
};
|
|
482
333
|
};
|
|
483
|
-
|
|
334
|
+
getWebsiteFollowState: {
|
|
484
335
|
parameters: {
|
|
485
336
|
query?: never;
|
|
486
337
|
header?: never;
|
|
487
338
|
path?: never;
|
|
488
339
|
cookie?: never;
|
|
489
340
|
};
|
|
490
|
-
requestBody
|
|
491
|
-
content: {
|
|
492
|
-
"application/json": components["schemas"]["AuthExchangeRequest"];
|
|
493
|
-
};
|
|
494
|
-
};
|
|
341
|
+
requestBody?: never;
|
|
495
342
|
responses: {
|
|
496
|
-
/** @description
|
|
343
|
+
/** @description Follow state */
|
|
497
344
|
200: {
|
|
498
345
|
headers: {
|
|
499
346
|
[name: string]: unknown;
|
|
500
347
|
};
|
|
501
348
|
content: {
|
|
502
|
-
"application/json": components["schemas"]["
|
|
349
|
+
"application/json": components["schemas"]["FollowState"];
|
|
503
350
|
};
|
|
504
351
|
};
|
|
505
352
|
"4xx": components["responses"]["PublicError"];
|
|
506
|
-
"5xx": components["responses"]["InternalError"];
|
|
507
353
|
};
|
|
508
354
|
};
|
|
509
|
-
|
|
355
|
+
followWebsiteCreator: {
|
|
510
356
|
parameters: {
|
|
511
357
|
query?: never;
|
|
512
358
|
header?: never;
|
|
@@ -515,19 +361,19 @@ export interface operations {
|
|
|
515
361
|
};
|
|
516
362
|
requestBody?: never;
|
|
517
363
|
responses: {
|
|
518
|
-
/** @description
|
|
364
|
+
/** @description Creator followed */
|
|
519
365
|
200: {
|
|
520
366
|
headers: {
|
|
521
367
|
[name: string]: unknown;
|
|
522
368
|
};
|
|
523
369
|
content: {
|
|
524
|
-
"application/json": components["schemas"]["
|
|
370
|
+
"application/json": components["schemas"]["FollowState"];
|
|
525
371
|
};
|
|
526
372
|
};
|
|
527
373
|
"4xx": components["responses"]["PublicError"];
|
|
528
374
|
};
|
|
529
375
|
};
|
|
530
|
-
|
|
376
|
+
checkWebsiteAccess: {
|
|
531
377
|
parameters: {
|
|
532
378
|
query?: never;
|
|
533
379
|
header?: never;
|
|
@@ -536,65 +382,23 @@ export interface operations {
|
|
|
536
382
|
};
|
|
537
383
|
requestBody: {
|
|
538
384
|
content: {
|
|
539
|
-
"application/json": components["schemas"]["
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
responses: {
|
|
543
|
-
/** @description Restored authenticated work session. */
|
|
544
|
-
200: {
|
|
545
|
-
headers: {
|
|
546
|
-
[name: string]: unknown;
|
|
547
|
-
};
|
|
548
|
-
content: {
|
|
549
|
-
"application/json": components["schemas"]["AuthExchangeResponse"];
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
|
-
"4xx": components["responses"]["PublicError"];
|
|
553
|
-
};
|
|
554
|
-
};
|
|
555
|
-
getFollowState: {
|
|
556
|
-
parameters: {
|
|
557
|
-
query?: never;
|
|
558
|
-
header?: never;
|
|
559
|
-
path?: never;
|
|
560
|
-
cookie?: never;
|
|
561
|
-
};
|
|
562
|
-
requestBody?: never;
|
|
563
|
-
responses: {
|
|
564
|
-
/** @description Current follow state. */
|
|
565
|
-
200: {
|
|
566
|
-
headers: {
|
|
567
|
-
[name: string]: unknown;
|
|
568
|
-
};
|
|
569
|
-
content: {
|
|
570
|
-
"application/json": components["schemas"]["FollowState"];
|
|
571
|
-
};
|
|
385
|
+
"application/json": components["schemas"]["AccessCheckRequest"];
|
|
572
386
|
};
|
|
573
|
-
"4xx": components["responses"]["PublicError"];
|
|
574
387
|
};
|
|
575
|
-
};
|
|
576
|
-
followWorkOwner: {
|
|
577
|
-
parameters: {
|
|
578
|
-
query?: never;
|
|
579
|
-
header?: never;
|
|
580
|
-
path?: never;
|
|
581
|
-
cookie?: never;
|
|
582
|
-
};
|
|
583
|
-
requestBody?: never;
|
|
584
388
|
responses: {
|
|
585
|
-
/** @description
|
|
389
|
+
/** @description Access decisions */
|
|
586
390
|
200: {
|
|
587
391
|
headers: {
|
|
588
392
|
[name: string]: unknown;
|
|
589
393
|
};
|
|
590
394
|
content: {
|
|
591
|
-
"application/json": components["schemas"]["
|
|
395
|
+
"application/json": components["schemas"]["AccessCheckResponse"];
|
|
592
396
|
};
|
|
593
397
|
};
|
|
594
398
|
"4xx": components["responses"]["PublicError"];
|
|
595
399
|
};
|
|
596
400
|
};
|
|
597
|
-
|
|
401
|
+
getWebsiteAccessFeatures: {
|
|
598
402
|
parameters: {
|
|
599
403
|
query?: never;
|
|
600
404
|
header?: never;
|
|
@@ -603,19 +407,19 @@ export interface operations {
|
|
|
603
407
|
};
|
|
604
408
|
requestBody?: never;
|
|
605
409
|
responses: {
|
|
606
|
-
/** @description
|
|
410
|
+
/** @description Server-authoritative feature presentation */
|
|
607
411
|
200: {
|
|
608
412
|
headers: {
|
|
609
413
|
[name: string]: unknown;
|
|
610
414
|
};
|
|
611
415
|
content: {
|
|
612
|
-
"application/json": components["schemas"]["
|
|
416
|
+
"application/json": components["schemas"]["AccessFeaturesResponse"];
|
|
613
417
|
};
|
|
614
418
|
};
|
|
615
419
|
"4xx": components["responses"]["PublicError"];
|
|
616
420
|
};
|
|
617
421
|
};
|
|
618
|
-
|
|
422
|
+
createWebsiteAccessCheckout: {
|
|
619
423
|
parameters: {
|
|
620
424
|
query?: never;
|
|
621
425
|
header?: never;
|
|
@@ -624,44 +428,48 @@ export interface operations {
|
|
|
624
428
|
};
|
|
625
429
|
requestBody: {
|
|
626
430
|
content: {
|
|
627
|
-
"application/json": components["schemas"]["
|
|
431
|
+
"application/json": components["schemas"]["CheckoutRequest"];
|
|
628
432
|
};
|
|
629
433
|
};
|
|
630
434
|
responses: {
|
|
631
|
-
/** @description
|
|
435
|
+
/** @description Hosted checkout */
|
|
632
436
|
200: {
|
|
633
437
|
headers: {
|
|
634
438
|
[name: string]: unknown;
|
|
635
439
|
};
|
|
636
440
|
content: {
|
|
637
|
-
"application/json": components["schemas"]["
|
|
441
|
+
"application/json": components["schemas"]["CheckoutResponse"];
|
|
638
442
|
};
|
|
639
443
|
};
|
|
640
444
|
"4xx": components["responses"]["PublicError"];
|
|
641
445
|
};
|
|
642
446
|
};
|
|
643
|
-
|
|
447
|
+
listDanmakuMessages: {
|
|
644
448
|
parameters: {
|
|
645
|
-
query
|
|
449
|
+
query: {
|
|
450
|
+
workKey: components["schemas"]["WorkKey"];
|
|
451
|
+
anchorKey?: components["schemas"]["DanmakuAnchorKey"];
|
|
452
|
+
cursor?: components["schemas"]["DanmakuCursor"];
|
|
453
|
+
};
|
|
646
454
|
header?: never;
|
|
647
455
|
path?: never;
|
|
648
456
|
cookie?: never;
|
|
649
457
|
};
|
|
650
458
|
requestBody?: never;
|
|
651
459
|
responses: {
|
|
652
|
-
/** @description
|
|
460
|
+
/** @description Messages */
|
|
653
461
|
200: {
|
|
654
462
|
headers: {
|
|
655
463
|
[name: string]: unknown;
|
|
656
464
|
};
|
|
657
465
|
content: {
|
|
658
|
-
"application/json": components["schemas"]["
|
|
466
|
+
"application/json": components["schemas"]["DanmakuMessagesResponse"];
|
|
659
467
|
};
|
|
660
468
|
};
|
|
661
469
|
"4xx": components["responses"]["PublicError"];
|
|
662
470
|
};
|
|
663
471
|
};
|
|
664
|
-
|
|
472
|
+
createDanmakuMessage: {
|
|
665
473
|
parameters: {
|
|
666
474
|
query?: never;
|
|
667
475
|
header?: never;
|
|
@@ -670,101 +478,44 @@ export interface operations {
|
|
|
670
478
|
};
|
|
671
479
|
requestBody: {
|
|
672
480
|
content: {
|
|
673
|
-
"application/json": components["schemas"]["
|
|
481
|
+
"application/json": components["schemas"]["CreateDanmakuMessageRequest"];
|
|
674
482
|
};
|
|
675
483
|
};
|
|
676
484
|
responses: {
|
|
677
|
-
/** @description
|
|
678
|
-
|
|
485
|
+
/** @description Message created */
|
|
486
|
+
201: {
|
|
679
487
|
headers: {
|
|
680
488
|
[name: string]: unknown;
|
|
681
489
|
};
|
|
682
490
|
content: {
|
|
683
|
-
"application/json": components["schemas"]["
|
|
491
|
+
"application/json": components["schemas"]["DanmakuMessage"];
|
|
684
492
|
};
|
|
685
493
|
};
|
|
686
494
|
"4xx": components["responses"]["PublicError"];
|
|
687
|
-
"5xx": components["responses"]["InternalError"];
|
|
688
495
|
};
|
|
689
496
|
};
|
|
690
|
-
|
|
497
|
+
getTipConfig: {
|
|
691
498
|
parameters: {
|
|
692
499
|
query?: never;
|
|
693
500
|
header?: never;
|
|
694
|
-
path
|
|
695
|
-
cookie?: never;
|
|
696
|
-
};
|
|
697
|
-
requestBody: {
|
|
698
|
-
content: {
|
|
699
|
-
"application/json": components["schemas"]["CheckoutBootstrapRequest"];
|
|
700
|
-
};
|
|
701
|
-
};
|
|
702
|
-
responses: {
|
|
703
|
-
/** @description Memory-only bearer session for the embedded checkout. */
|
|
704
|
-
200: {
|
|
705
|
-
headers: {
|
|
706
|
-
[name: string]: unknown;
|
|
707
|
-
};
|
|
708
|
-
content: {
|
|
709
|
-
"application/json": components["schemas"]["CheckoutBootstrapResponse"];
|
|
710
|
-
};
|
|
711
|
-
};
|
|
712
|
-
"4xx": components["responses"]["PublicError"];
|
|
713
|
-
};
|
|
714
|
-
};
|
|
715
|
-
listDanmakuMessages: {
|
|
716
|
-
parameters: {
|
|
717
|
-
query: {
|
|
501
|
+
path: {
|
|
718
502
|
workKey: components["schemas"]["WorkKey"];
|
|
719
|
-
anchorKey?: components["schemas"]["DanmakuAnchorKey"];
|
|
720
|
-
cursor?: components["schemas"]["DanmakuCursor"];
|
|
721
|
-
limit?: number;
|
|
722
503
|
};
|
|
723
|
-
header?: never;
|
|
724
|
-
path?: never;
|
|
725
504
|
cookie?: never;
|
|
726
505
|
};
|
|
727
506
|
requestBody?: never;
|
|
728
507
|
responses: {
|
|
729
|
-
/** @description
|
|
508
|
+
/** @description Sanitized public Tip configuration. */
|
|
730
509
|
200: {
|
|
731
510
|
headers: {
|
|
732
511
|
[name: string]: unknown;
|
|
733
512
|
};
|
|
734
513
|
content: {
|
|
735
|
-
"application/json": components["schemas"]["
|
|
736
|
-
};
|
|
737
|
-
};
|
|
738
|
-
400: components["responses"]["BadRequest"];
|
|
739
|
-
404: components["responses"]["WorkNotFound"];
|
|
740
|
-
500: components["responses"]["InternalError"];
|
|
741
|
-
};
|
|
742
|
-
};
|
|
743
|
-
createDanmakuMessage: {
|
|
744
|
-
parameters: {
|
|
745
|
-
query?: never;
|
|
746
|
-
header?: never;
|
|
747
|
-
path?: never;
|
|
748
|
-
cookie?: never;
|
|
749
|
-
};
|
|
750
|
-
requestBody: {
|
|
751
|
-
content: {
|
|
752
|
-
"application/json": components["schemas"]["CreateDanmakuMessageRequest"];
|
|
753
|
-
};
|
|
754
|
-
};
|
|
755
|
-
responses: {
|
|
756
|
-
/** @description Message created. */
|
|
757
|
-
201: {
|
|
758
|
-
headers: {
|
|
759
|
-
[name: string]: unknown;
|
|
760
|
-
};
|
|
761
|
-
content: {
|
|
762
|
-
"application/json": components["schemas"]["DanmakuMessage"];
|
|
514
|
+
"application/json": components["schemas"]["TipConfig"];
|
|
763
515
|
};
|
|
764
516
|
};
|
|
765
|
-
400: components["responses"]["
|
|
766
|
-
404: components["responses"]["
|
|
767
|
-
429: components["responses"]["RateLimited"];
|
|
517
|
+
400: components["responses"]["TipConfigCredentialsNotAllowed"];
|
|
518
|
+
404: components["responses"]["TipUnavailable"];
|
|
768
519
|
500: components["responses"]["InternalError"];
|
|
769
520
|
};
|
|
770
521
|
};
|