@playdrop/playdrop-cli 0.7.13 → 0.7.16
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/config/client-meta.json +1 -1
- package/node_modules/@playdrop/ai-client/dist/index.js +461 -444
- package/node_modules/@playdrop/ai-client/package.json +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +903 -882
- package/node_modules/@playdrop/api-client/dist/core/errors.js +69 -45
- package/node_modules/@playdrop/api-client/dist/core/request.js +188 -159
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +516 -491
- package/node_modules/@playdrop/api-client/dist/domains/ai.js +40 -14
- package/node_modules/@playdrop/api-client/dist/domains/apps.js +480 -462
- package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +439 -419
- package/node_modules/@playdrop/api-client/dist/domains/assets.js +696 -676
- package/node_modules/@playdrop/api-client/dist/domains/auth.js +346 -320
- package/node_modules/@playdrop/api-client/dist/domains/comments.js +124 -98
- package/node_modules/@playdrop/api-client/dist/domains/free-credits.js +91 -65
- package/node_modules/@playdrop/api-client/dist/domains/me.js +71 -45
- package/node_modules/@playdrop/api-client/dist/domains/payments.js +407 -386
- package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +144 -118
- package/node_modules/@playdrop/api-client/dist/domains/search.js +117 -104
- package/node_modules/@playdrop/api-client/dist/domains/tags.js +188 -162
- package/node_modules/@playdrop/api-client/dist/index.js +993 -552
- package/node_modules/@playdrop/api-client/package.json +1 -1
- package/node_modules/@playdrop/boxel-three/dist/src/animations.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/src/builders.js +341 -308
- package/node_modules/@playdrop/boxel-three/dist/src/context.js +55 -29
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +856 -858
- package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +267 -261
- package/node_modules/@playdrop/boxel-three/dist/src/index.js +64 -15
- package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +89 -63
- package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +81 -56
- package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +112 -86
- package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +45 -17
- package/node_modules/@playdrop/boxel-three/dist/src/scene.js +160 -136
- package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +582 -584
- package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +123 -97
- package/node_modules/@playdrop/boxel-three/dist/src/textures.js +207 -182
- package/node_modules/@playdrop/boxel-three/dist/src/types.js +15 -1
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +451 -425
- package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +109 -84
- package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +127 -106
- package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +73 -51
- package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +97 -79
- package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +29 -7
- package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +80 -60
- package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +41 -19
- package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +72 -50
- package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +84 -62
- package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +69 -47
- package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +129 -109
- package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +40 -18
- package/node_modules/@playdrop/boxel-three/package.json +1 -1
- package/node_modules/@playdrop/config/client-meta.json +1 -1
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/types/dist/api.js +289 -203
- package/node_modules/@playdrop/types/dist/app-capability-filters.js +112 -62
- package/node_modules/@playdrop/types/dist/app.js +91 -45
- package/node_modules/@playdrop/types/dist/asset-pack.js +37 -5
- package/node_modules/@playdrop/types/dist/asset-spec.js +170 -90
- package/node_modules/@playdrop/types/dist/asset.js +186 -108
- package/node_modules/@playdrop/types/dist/content-license.js +49 -15
- package/node_modules/@playdrop/types/dist/creator-public-image.js +60 -32
- package/node_modules/@playdrop/types/dist/ecs.js +102 -82
- package/node_modules/@playdrop/types/dist/engine-builtins.js +603 -573
- package/node_modules/@playdrop/types/dist/entity.js +63 -53
- package/node_modules/@playdrop/types/dist/graph.js +116 -80
- package/node_modules/@playdrop/types/dist/index.js +47 -20
- package/node_modules/@playdrop/types/dist/owned-assets.js +55 -33
- package/node_modules/@playdrop/types/dist/player-meta.js +151 -100
- package/node_modules/@playdrop/types/dist/realtime.js +27 -7
- package/node_modules/@playdrop/types/dist/version.js +182 -124
- package/node_modules/@playdrop/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,321 +1,347 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var auth_exports = {};
|
|
19
|
+
__export(auth_exports, {
|
|
20
|
+
buildAuthApiClientMethods: () => buildAuthApiClientMethods
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(auth_exports);
|
|
23
|
+
function buildAuthApiClientMethods(input) {
|
|
24
|
+
const { request, handleApiError } = input;
|
|
25
|
+
return {
|
|
26
|
+
async login(loginRequest) {
|
|
27
|
+
const response = await request({
|
|
28
|
+
method: "POST",
|
|
29
|
+
path: "/auth/login",
|
|
30
|
+
body: loginRequest
|
|
31
|
+
});
|
|
32
|
+
if (response.status !== 200) {
|
|
33
|
+
handleApiError(response, "login");
|
|
34
|
+
}
|
|
35
|
+
return response.body;
|
|
36
|
+
},
|
|
37
|
+
async loginWithApiKey(loginRequest) {
|
|
38
|
+
const response = await request({
|
|
39
|
+
method: "POST",
|
|
40
|
+
path: "/auth/api-key/login",
|
|
41
|
+
body: loginRequest
|
|
42
|
+
});
|
|
43
|
+
if (response.status !== 200) {
|
|
44
|
+
handleApiError(response, "login_with_api_key");
|
|
45
|
+
}
|
|
46
|
+
return response.body;
|
|
47
|
+
},
|
|
48
|
+
async startCliLogin() {
|
|
49
|
+
const response = await request({
|
|
50
|
+
method: "POST",
|
|
51
|
+
path: "/auth/cli/start"
|
|
52
|
+
});
|
|
53
|
+
if (response.status !== 200) {
|
|
54
|
+
handleApiError(response, "start_cli_login");
|
|
55
|
+
}
|
|
56
|
+
return response.body;
|
|
57
|
+
},
|
|
58
|
+
async pollCliLogin(pollRequest) {
|
|
59
|
+
const response = await request({
|
|
60
|
+
method: "POST",
|
|
61
|
+
path: "/auth/cli/poll",
|
|
62
|
+
body: pollRequest
|
|
63
|
+
});
|
|
64
|
+
if (response.status !== 200 && response.status !== 202) {
|
|
65
|
+
handleApiError(response, "poll_cli_login");
|
|
66
|
+
}
|
|
67
|
+
return response.body;
|
|
68
|
+
},
|
|
69
|
+
async fetchCliLoginStatus(requestId) {
|
|
70
|
+
const response = await request({
|
|
71
|
+
method: "GET",
|
|
72
|
+
path: `/auth/cli/status/${encodeURIComponent(requestId)}`
|
|
73
|
+
});
|
|
74
|
+
if (response.status !== 200 && response.status !== 410) {
|
|
75
|
+
handleApiError(response, "fetch_cli_login_status");
|
|
76
|
+
}
|
|
77
|
+
return response.body;
|
|
78
|
+
},
|
|
79
|
+
async approveCliLogin(approveRequest) {
|
|
80
|
+
const response = await request({
|
|
81
|
+
method: "POST",
|
|
82
|
+
path: "/auth/cli/approve",
|
|
83
|
+
body: approveRequest
|
|
84
|
+
});
|
|
85
|
+
if (response.status !== 200) {
|
|
86
|
+
handleApiError(response, "approve_cli_login");
|
|
87
|
+
}
|
|
88
|
+
return response.body;
|
|
89
|
+
},
|
|
90
|
+
async startCliWebLaunch(startRequest) {
|
|
91
|
+
const response = await request({
|
|
92
|
+
method: "POST",
|
|
93
|
+
path: "/auth/cli/web-launch",
|
|
94
|
+
body: startRequest
|
|
95
|
+
});
|
|
96
|
+
if (response.status !== 200) {
|
|
97
|
+
handleApiError(response, "start_cli_web_launch");
|
|
98
|
+
}
|
|
99
|
+
return response.body;
|
|
100
|
+
},
|
|
101
|
+
async register(registerRequest) {
|
|
102
|
+
const response = await request({
|
|
103
|
+
method: "POST",
|
|
104
|
+
path: "/auth/register",
|
|
105
|
+
body: registerRequest
|
|
106
|
+
});
|
|
107
|
+
if (response.status !== 201) {
|
|
108
|
+
handleApiError(response, "register");
|
|
109
|
+
}
|
|
110
|
+
return response.body;
|
|
111
|
+
},
|
|
112
|
+
async fetchStarterProfileAssets() {
|
|
113
|
+
const response = await request({
|
|
114
|
+
method: "GET",
|
|
115
|
+
path: "/auth/starter-profile-assets"
|
|
116
|
+
});
|
|
117
|
+
if (response.status !== 200) {
|
|
118
|
+
handleApiError(response, "fetch_starter_profile_assets");
|
|
119
|
+
}
|
|
120
|
+
return response.body;
|
|
121
|
+
},
|
|
122
|
+
async logout() {
|
|
123
|
+
const response = await request({
|
|
124
|
+
method: "POST",
|
|
125
|
+
path: "/auth/logout"
|
|
126
|
+
});
|
|
127
|
+
if (response.status !== 200) {
|
|
128
|
+
handleApiError(response, "logout");
|
|
129
|
+
}
|
|
130
|
+
return response.body;
|
|
131
|
+
},
|
|
132
|
+
async unlinkX() {
|
|
133
|
+
const response = await request({
|
|
134
|
+
method: "POST",
|
|
135
|
+
path: "/auth/x/unlink"
|
|
136
|
+
});
|
|
137
|
+
if (response.status !== 200) {
|
|
138
|
+
handleApiError(response, "unlink_x");
|
|
139
|
+
}
|
|
140
|
+
return response.body;
|
|
141
|
+
},
|
|
142
|
+
async unlinkGoogle() {
|
|
143
|
+
const response = await request({
|
|
144
|
+
method: "POST",
|
|
145
|
+
path: "/auth/google/unlink"
|
|
146
|
+
});
|
|
147
|
+
if (response.status !== 200) {
|
|
148
|
+
handleApiError(response, "unlink_google");
|
|
149
|
+
}
|
|
150
|
+
return response.body;
|
|
151
|
+
},
|
|
152
|
+
async createAppleOAuthLinkStart(startRequest) {
|
|
153
|
+
const response = await request({
|
|
154
|
+
method: "POST",
|
|
155
|
+
path: "/auth/oauth/apple-link-start",
|
|
156
|
+
body: startRequest
|
|
157
|
+
});
|
|
158
|
+
if (response.status !== 200) {
|
|
159
|
+
handleApiError(response, "create_apple_oauth_link_start");
|
|
160
|
+
}
|
|
161
|
+
return response.body;
|
|
162
|
+
},
|
|
163
|
+
async createAppleNativeChallenge() {
|
|
164
|
+
const response = await request({
|
|
165
|
+
method: "POST",
|
|
166
|
+
path: "/auth/apple/native/challenge"
|
|
167
|
+
});
|
|
168
|
+
if (response.status !== 200) {
|
|
169
|
+
handleApiError(response, "create_apple_native_challenge");
|
|
170
|
+
}
|
|
171
|
+
return response.body;
|
|
172
|
+
},
|
|
173
|
+
async exchangeAppleOAuthHandoff(exchangeRequest) {
|
|
174
|
+
const response = await request({
|
|
175
|
+
method: "POST",
|
|
176
|
+
path: "/auth/oauth/apple-handoff-exchange",
|
|
177
|
+
body: exchangeRequest
|
|
178
|
+
});
|
|
179
|
+
if (response.status !== 200) {
|
|
180
|
+
handleApiError(response, "exchange_apple_oauth_handoff");
|
|
181
|
+
}
|
|
182
|
+
return response.body;
|
|
183
|
+
},
|
|
184
|
+
async signInWithApple(signInRequest) {
|
|
185
|
+
const response = await request({
|
|
186
|
+
method: "POST",
|
|
187
|
+
path: "/auth/apple/sign-in",
|
|
188
|
+
body: signInRequest
|
|
189
|
+
});
|
|
190
|
+
if (response.status !== 200) {
|
|
191
|
+
handleApiError(response, "sign_in_with_apple");
|
|
192
|
+
}
|
|
193
|
+
return response.body;
|
|
194
|
+
},
|
|
195
|
+
async linkApple(linkRequest) {
|
|
196
|
+
const response = await request({
|
|
197
|
+
method: "POST",
|
|
198
|
+
path: "/auth/apple/link",
|
|
199
|
+
body: linkRequest
|
|
200
|
+
});
|
|
201
|
+
if (response.status !== 200) {
|
|
202
|
+
handleApiError(response, "link_apple");
|
|
203
|
+
}
|
|
204
|
+
return response.body;
|
|
205
|
+
},
|
|
206
|
+
async signInWithGoogleApple(signInRequest) {
|
|
207
|
+
const response = await request({
|
|
208
|
+
method: "POST",
|
|
209
|
+
path: "/auth/google/apple/sign-in",
|
|
210
|
+
body: signInRequest
|
|
211
|
+
});
|
|
212
|
+
if (response.status !== 200) {
|
|
213
|
+
handleApiError(response, "sign_in_with_google_apple");
|
|
214
|
+
}
|
|
215
|
+
return response.body;
|
|
216
|
+
},
|
|
217
|
+
async linkGoogleApple(linkRequest) {
|
|
218
|
+
const response = await request({
|
|
219
|
+
method: "POST",
|
|
220
|
+
path: "/auth/google/apple/link",
|
|
221
|
+
body: linkRequest
|
|
222
|
+
});
|
|
223
|
+
if (response.status !== 200) {
|
|
224
|
+
handleApiError(response, "link_google_apple");
|
|
225
|
+
}
|
|
226
|
+
return response.body;
|
|
227
|
+
},
|
|
228
|
+
async unlinkApple() {
|
|
229
|
+
const response = await request({
|
|
230
|
+
method: "POST",
|
|
231
|
+
path: "/auth/apple/unlink"
|
|
232
|
+
});
|
|
233
|
+
if (response.status !== 200) {
|
|
234
|
+
handleApiError(response, "unlink_apple");
|
|
235
|
+
}
|
|
236
|
+
return response.body;
|
|
237
|
+
},
|
|
238
|
+
async fetchGooglePendingSignup(token) {
|
|
239
|
+
const response = await request({
|
|
240
|
+
method: "GET",
|
|
241
|
+
path: `/auth/google/pending/${encodeURIComponent(token)}`
|
|
242
|
+
});
|
|
243
|
+
if (response.status !== 200) {
|
|
244
|
+
handleApiError(response, "fetch_google_pending_signup");
|
|
245
|
+
}
|
|
246
|
+
return response.body;
|
|
247
|
+
},
|
|
248
|
+
async checkUsernameAvailable(username) {
|
|
249
|
+
const response = await request({
|
|
250
|
+
method: "GET",
|
|
251
|
+
path: `/auth/username-available/${encodeURIComponent(username)}`
|
|
252
|
+
});
|
|
253
|
+
if (response.status !== 200) {
|
|
254
|
+
handleApiError(response, "check_username_available");
|
|
255
|
+
}
|
|
256
|
+
return response.body;
|
|
257
|
+
},
|
|
258
|
+
async completeGoogleSignup(signupRequest) {
|
|
259
|
+
const response = await request({
|
|
260
|
+
method: "POST",
|
|
261
|
+
path: "/auth/google/complete-signup",
|
|
262
|
+
body: signupRequest
|
|
263
|
+
});
|
|
264
|
+
if (response.status !== 201) {
|
|
265
|
+
handleApiError(response, "complete_google_signup");
|
|
266
|
+
}
|
|
267
|
+
return response.body;
|
|
268
|
+
},
|
|
269
|
+
async fetchXPendingSignup(token) {
|
|
270
|
+
const response = await request({
|
|
271
|
+
method: "GET",
|
|
272
|
+
path: `/auth/x/pending/${encodeURIComponent(token)}`
|
|
273
|
+
});
|
|
274
|
+
if (response.status !== 200) {
|
|
275
|
+
handleApiError(response, "fetch_x_pending_signup");
|
|
276
|
+
}
|
|
277
|
+
return response.body;
|
|
278
|
+
},
|
|
279
|
+
async fetchApplePendingSignup(token) {
|
|
280
|
+
const response = await request({
|
|
281
|
+
method: "GET",
|
|
282
|
+
path: `/auth/apple/pending/${encodeURIComponent(token)}`
|
|
283
|
+
});
|
|
284
|
+
if (response.status !== 200) {
|
|
285
|
+
handleApiError(response, "fetch_apple_pending_signup");
|
|
286
|
+
}
|
|
287
|
+
return response.body;
|
|
288
|
+
},
|
|
289
|
+
async completeXSignup(signupRequest) {
|
|
290
|
+
const response = await request({
|
|
291
|
+
method: "POST",
|
|
292
|
+
path: "/auth/x/complete-signup",
|
|
293
|
+
body: signupRequest
|
|
294
|
+
});
|
|
295
|
+
if (response.status !== 201) {
|
|
296
|
+
handleApiError(response, "complete_x_signup");
|
|
297
|
+
}
|
|
298
|
+
return response.body;
|
|
299
|
+
},
|
|
300
|
+
async completeAppleSignup(signupRequest) {
|
|
301
|
+
const response = await request({
|
|
302
|
+
method: "POST",
|
|
303
|
+
path: "/auth/apple/complete-signup",
|
|
304
|
+
body: signupRequest
|
|
305
|
+
});
|
|
306
|
+
if (response.status !== 201) {
|
|
307
|
+
handleApiError(response, "complete_apple_signup");
|
|
308
|
+
}
|
|
309
|
+
return response.body;
|
|
310
|
+
},
|
|
311
|
+
async exchangeGoogleOneTapCredential(oneTapRequest) {
|
|
312
|
+
const response = await request({
|
|
313
|
+
method: "POST",
|
|
314
|
+
path: "/auth/google/one-tap",
|
|
315
|
+
body: oneTapRequest
|
|
316
|
+
});
|
|
317
|
+
if (response.status !== 200) {
|
|
318
|
+
handleApiError(response, "exchange_google_one_tap_credential");
|
|
319
|
+
}
|
|
320
|
+
return response.body;
|
|
321
|
+
},
|
|
322
|
+
async fetchCliApiKeyStatus() {
|
|
323
|
+
const response = await request({
|
|
324
|
+
method: "GET",
|
|
325
|
+
path: "/me/api-key"
|
|
326
|
+
});
|
|
327
|
+
if (response.status !== 200) {
|
|
328
|
+
handleApiError(response, "fetch_cli_api_key_status");
|
|
329
|
+
}
|
|
330
|
+
return response.body;
|
|
331
|
+
},
|
|
332
|
+
async createCliApiKey() {
|
|
333
|
+
const response = await request({
|
|
334
|
+
method: "POST",
|
|
335
|
+
path: "/me/api-key"
|
|
336
|
+
});
|
|
337
|
+
if (response.status !== 200) {
|
|
338
|
+
handleApiError(response, "create_cli_api_key");
|
|
339
|
+
}
|
|
340
|
+
return response.body;
|
|
341
|
+
}
|
|
342
|
+
};
|
|
321
343
|
}
|
|
344
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
345
|
+
0 && (module.exports = {
|
|
346
|
+
buildAuthApiClientMethods
|
|
347
|
+
});
|