@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,223 +1,309 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 api_exports = {};
|
|
19
|
+
__export(api_exports, {
|
|
20
|
+
APP_LAUNCH_CONTEXT_VALUES: () => APP_LAUNCH_CONTEXT_VALUES,
|
|
21
|
+
APP_LIST_SORT_VALUES: () => APP_LIST_SORT_VALUES,
|
|
22
|
+
APP_MORE_COLLECTION_KEYS: () => APP_MORE_COLLECTION_KEYS,
|
|
23
|
+
ApiError: () => ApiError,
|
|
24
|
+
BOOST_SKU_VALUES: () => BOOST_SKU_VALUES,
|
|
25
|
+
COLLECTION_SLUG_REGEX: () => COLLECTION_SLUG_REGEX,
|
|
26
|
+
ENGAGEMENT_EVENT_TYPE_VALUES: () => ENGAGEMENT_EVENT_TYPE_VALUES,
|
|
27
|
+
ENGAGEMENT_TARGET_KIND_VALUES: () => ENGAGEMENT_TARGET_KIND_VALUES,
|
|
28
|
+
FOLLOWING_APP_SECTION_VALUES: () => FOLLOWING_APP_SECTION_VALUES,
|
|
29
|
+
FOLLOWING_FEED_SECTION_VALUES: () => FOLLOWING_FEED_SECTION_VALUES,
|
|
30
|
+
FOLLOWING_SORT_VALUES: () => FOLLOWING_SORT_VALUES,
|
|
31
|
+
FREE_CREDIT_OBJECTIVE_VALUES: () => FREE_CREDIT_OBJECTIVE_VALUES,
|
|
32
|
+
FREE_CREDIT_REWARD_STATUS_VALUES: () => FREE_CREDIT_REWARD_STATUS_VALUES,
|
|
33
|
+
HOME_GAMES_COLLECTION_IDS: () => HOME_GAMES_COLLECTION_IDS,
|
|
34
|
+
LIBRARY_CATEGORY_VALUES: () => LIBRARY_CATEGORY_VALUES,
|
|
35
|
+
LIBRARY_SORT_VALUES: () => LIBRARY_SORT_VALUES,
|
|
36
|
+
MODERATION_REPORT_REASON_CODE_VALUES: () => MODERATION_REPORT_REASON_CODE_VALUES,
|
|
37
|
+
MUSIC_PROMPT_MAX_LENGTH: () => MUSIC_PROMPT_MAX_LENGTH,
|
|
38
|
+
NOTIFICATION_EVENT_TYPE_VALUES: () => NOTIFICATION_EVENT_TYPE_VALUES,
|
|
39
|
+
NOTIFICATION_PREVIEW_KIND_VALUES: () => NOTIFICATION_PREVIEW_KIND_VALUES,
|
|
40
|
+
NOTIFICATION_STATUS_VALUES: () => NOTIFICATION_STATUS_VALUES,
|
|
41
|
+
SAVED_ITEM_KIND_VALUES: () => SAVED_ITEM_KIND_VALUES,
|
|
42
|
+
SEARCH_ASSET_TYPE_VALUES: () => SEARCH_ASSET_TYPE_VALUES,
|
|
43
|
+
SEARCH_KIND_VALUES: () => SEARCH_KIND_VALUES,
|
|
44
|
+
SEARCH_MODE_VALUES: () => SEARCH_MODE_VALUES,
|
|
45
|
+
SEARCH_RESULT_KIND_VALUES: () => SEARCH_RESULT_KIND_VALUES,
|
|
46
|
+
SEARCH_SORT_VALUES: () => SEARCH_SORT_VALUES,
|
|
47
|
+
TAG_GROUP_SORT_VALUES: () => TAG_GROUP_SORT_VALUES,
|
|
48
|
+
TAG_SLUG_REGEX: () => TAG_SLUG_REGEX,
|
|
49
|
+
UnsupportedClientError: () => UnsupportedClientError,
|
|
50
|
+
isPaginationMeta: () => isPaginationMeta,
|
|
51
|
+
isValidCollectionSlug: () => isValidCollectionSlug,
|
|
52
|
+
isValidTagSlug: () => isValidTagSlug,
|
|
53
|
+
normalizeCollectionSlug: () => normalizeCollectionSlug,
|
|
54
|
+
normalizeTagRef: () => normalizeTagRef,
|
|
55
|
+
normalizeTagSlug: () => normalizeTagSlug,
|
|
56
|
+
parseTagRef: () => parseTagRef
|
|
57
|
+
});
|
|
58
|
+
module.exports = __toCommonJS(api_exports);
|
|
59
|
+
const TAG_SLUG_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
60
|
+
const APP_MORE_COLLECTION_KEYS = [
|
|
61
|
+
"by-creator",
|
|
62
|
+
"similar",
|
|
63
|
+
"remixes",
|
|
64
|
+
"contains",
|
|
65
|
+
"uses"
|
|
8
66
|
];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
67
|
+
const SEARCH_RESULT_KIND_VALUES = ["creator", "app", "asset", "asset-spec", "pack"];
|
|
68
|
+
const SEARCH_KIND_VALUES = ["all", ...SEARCH_RESULT_KIND_VALUES];
|
|
69
|
+
const SEARCH_MODE_VALUES = ["grouped", "flat"];
|
|
70
|
+
const SEARCH_ASSET_TYPE_VALUES = ["image", "video", "audio", "song", "sfx", "3d"];
|
|
71
|
+
const SEARCH_SORT_VALUES = [
|
|
72
|
+
"relevance",
|
|
73
|
+
"views",
|
|
74
|
+
"recent",
|
|
75
|
+
"updated",
|
|
76
|
+
"used",
|
|
77
|
+
"newest",
|
|
78
|
+
"likes",
|
|
79
|
+
"downloads",
|
|
80
|
+
"remixes",
|
|
81
|
+
"comments",
|
|
82
|
+
"assets",
|
|
83
|
+
"apps",
|
|
84
|
+
"alpha"
|
|
27
85
|
];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
86
|
+
const APP_LIST_SORT_VALUES = [
|
|
87
|
+
"newest",
|
|
88
|
+
"updated",
|
|
89
|
+
"views",
|
|
90
|
+
"likes",
|
|
91
|
+
"used"
|
|
34
92
|
];
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
93
|
+
const SAVED_ITEM_KIND_VALUES = ["APP", "ASSET", "PACK"];
|
|
94
|
+
const TAG_GROUP_SORT_VALUES = ["alpha", "popularity"];
|
|
95
|
+
function isValidTagSlug(value) {
|
|
96
|
+
return typeof value === "string" && TAG_SLUG_REGEX.test(value);
|
|
39
97
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
98
|
+
function normalizeTagSlug(value) {
|
|
99
|
+
const normalized = value.trim().toLowerCase();
|
|
100
|
+
if (!TAG_SLUG_REGEX.test(normalized)) {
|
|
101
|
+
throw new Error(`invalid_tag_slug:${value}`);
|
|
102
|
+
}
|
|
103
|
+
return normalized;
|
|
46
104
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
105
|
+
const COLLECTION_SLUG_REGEX = TAG_SLUG_REGEX;
|
|
106
|
+
function isValidCollectionSlug(value) {
|
|
107
|
+
return typeof value === "string" && COLLECTION_SLUG_REGEX.test(value);
|
|
50
108
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
109
|
+
function normalizeCollectionSlug(value) {
|
|
110
|
+
const normalized = value.trim().toLowerCase();
|
|
111
|
+
if (!COLLECTION_SLUG_REGEX.test(normalized)) {
|
|
112
|
+
throw new Error(`invalid_collection_slug:${value}`);
|
|
113
|
+
}
|
|
114
|
+
return normalized;
|
|
57
115
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
116
|
+
function parseTagRef(value) {
|
|
117
|
+
if (typeof value !== "string") {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
const trimmed = value.trim().toLowerCase();
|
|
121
|
+
const parts = trimmed.split("/");
|
|
122
|
+
if (parts.length !== 2) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
const groupSlug = parts[0];
|
|
126
|
+
const tagSlug = parts[1];
|
|
127
|
+
if (!groupSlug || !tagSlug) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
if (!TAG_SLUG_REGEX.test(groupSlug) || !TAG_SLUG_REGEX.test(tagSlug)) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
return { groupSlug, tagSlug };
|
|
76
134
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
135
|
+
function normalizeTagRef(value) {
|
|
136
|
+
const parsed = parseTagRef(value);
|
|
137
|
+
if (!parsed) {
|
|
138
|
+
throw new Error(`invalid_tag_ref:${value}`);
|
|
139
|
+
}
|
|
140
|
+
return `${parsed.groupSlug}/${parsed.tagSlug}`;
|
|
83
141
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
142
|
+
const ENGAGEMENT_EVENT_TYPE_VALUES = [
|
|
143
|
+
"VIEW",
|
|
144
|
+
"LAUNCH",
|
|
145
|
+
"PLAY",
|
|
146
|
+
"DOWNLOAD",
|
|
147
|
+
"LIKE",
|
|
148
|
+
"UNLIKE",
|
|
149
|
+
"DISLIKE",
|
|
150
|
+
"UNDISLIKE",
|
|
151
|
+
"SAVE",
|
|
152
|
+
"UNSAVE",
|
|
153
|
+
"FOLLOW",
|
|
154
|
+
"UNFOLLOW"
|
|
97
155
|
];
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
156
|
+
const ENGAGEMENT_TARGET_KIND_VALUES = ["CREATOR", "APP", "ASSET", "PACK"];
|
|
157
|
+
const APP_LAUNCH_CONTEXT_VALUES = ["CARD", "DETAIL", "OTHER"];
|
|
158
|
+
const NOTIFICATION_EVENT_TYPE_VALUES = [
|
|
159
|
+
"NEW_CONTENT",
|
|
160
|
+
"UPDATED",
|
|
161
|
+
"CONTENT_COMMENT",
|
|
162
|
+
"CONTENT_REPLY",
|
|
163
|
+
"CONTENT_LIKE",
|
|
164
|
+
"NEW_FOLLOWER",
|
|
165
|
+
"ASSET_PURCHASED",
|
|
166
|
+
"PAYMENT_SUCCEEDED",
|
|
167
|
+
"PAYMENT_REFUNDED",
|
|
168
|
+
"ADMIN_ACTION",
|
|
169
|
+
"AI_JOB_SUCCEEDED",
|
|
170
|
+
"AI_JOB_FAILED"
|
|
113
171
|
];
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
172
|
+
const LIBRARY_CATEGORY_VALUES = [
|
|
173
|
+
"games",
|
|
174
|
+
"demos",
|
|
175
|
+
"tools",
|
|
176
|
+
"templates",
|
|
177
|
+
"images",
|
|
178
|
+
"music",
|
|
179
|
+
"sfx",
|
|
180
|
+
"videos",
|
|
181
|
+
"3d",
|
|
182
|
+
"packs"
|
|
125
183
|
];
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
184
|
+
const LIBRARY_SORT_VALUES = ["saved_desc", "alpha_asc"];
|
|
185
|
+
const FOLLOWING_SORT_VALUES = ["activity_desc", "alpha_asc"];
|
|
186
|
+
const NOTIFICATION_STATUS_VALUES = ["all", "unread"];
|
|
187
|
+
const NOTIFICATION_PREVIEW_KIND_VALUES = ["item", "person", "credit", "account"];
|
|
188
|
+
const FOLLOWING_APP_SECTION_VALUES = ["games", "demos", "tools", "templates"];
|
|
189
|
+
const FOLLOWING_FEED_SECTION_VALUES = [
|
|
190
|
+
...FOLLOWING_APP_SECTION_VALUES,
|
|
191
|
+
"images",
|
|
192
|
+
"music",
|
|
193
|
+
"sfx",
|
|
194
|
+
"speech",
|
|
195
|
+
"videos",
|
|
196
|
+
"3d",
|
|
197
|
+
"packs"
|
|
140
198
|
];
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
199
|
+
const MODERATION_REPORT_REASON_CODE_VALUES = [
|
|
200
|
+
"SPAM",
|
|
201
|
+
"HARASSMENT",
|
|
202
|
+
"NSFW",
|
|
203
|
+
"COPYRIGHT",
|
|
204
|
+
"IMPERSONATION",
|
|
205
|
+
"OTHER"
|
|
148
206
|
];
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
207
|
+
const FREE_CREDIT_OBJECTIVE_VALUES = [
|
|
208
|
+
"WELCOME",
|
|
209
|
+
"PLAY_GAME",
|
|
210
|
+
"FOLLOW_CREATOR",
|
|
211
|
+
"INVITED",
|
|
212
|
+
"SHARE_CODE",
|
|
213
|
+
"ENABLE_PUSH",
|
|
214
|
+
"CREATE_SONG",
|
|
215
|
+
"CREATE_IMAGE",
|
|
216
|
+
"CREATE_3D",
|
|
217
|
+
"CLI_LOGIN",
|
|
218
|
+
"PUBLISH_GAME",
|
|
219
|
+
"BOOST_GAME"
|
|
162
220
|
];
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
221
|
+
const FREE_CREDIT_REWARD_STATUS_VALUES = ["INCOMPLETE", "CLAIMABLE", "CLAIMED"];
|
|
222
|
+
const HOME_GAMES_COLLECTION_IDS = {
|
|
223
|
+
TOP_GAMES: "top_games",
|
|
224
|
+
MOST_LIKED_GAMES: "most_liked_games",
|
|
225
|
+
BOOSTED_GAMES: "boosted_games",
|
|
226
|
+
TOP_CREATORS: "top_creators",
|
|
227
|
+
FEATURED_GAMES: "featured_games",
|
|
228
|
+
NEW_GAMES: "new_games",
|
|
229
|
+
GAME_GENRES: "game_genres",
|
|
230
|
+
CONTINUE_PLAYING: "continue_playing",
|
|
231
|
+
FOLLOWING_CREATORS: "following_creators"
|
|
174
232
|
};
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
const count = meta['count'];
|
|
186
|
-
const hasMore = meta['hasMore'];
|
|
187
|
-
return (Number.isInteger(limit)
|
|
188
|
-
&& Number.isInteger(offset)
|
|
189
|
-
&& Number.isInteger(count)
|
|
190
|
-
&& limit >= 0
|
|
191
|
-
&& offset >= 0
|
|
192
|
-
&& count >= 0
|
|
193
|
-
&& typeof hasMore === 'boolean');
|
|
233
|
+
function isPaginationMeta(value) {
|
|
234
|
+
if (typeof value !== "object" || value === null) {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
const meta = value;
|
|
238
|
+
const limit = meta["limit"];
|
|
239
|
+
const offset = meta["offset"];
|
|
240
|
+
const count = meta["count"];
|
|
241
|
+
const hasMore = meta["hasMore"];
|
|
242
|
+
return Number.isInteger(limit) && Number.isInteger(offset) && Number.isInteger(count) && limit >= 0 && offset >= 0 && count >= 0 && typeof hasMore === "boolean";
|
|
194
243
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
this.code = code;
|
|
205
|
-
this.details = details;
|
|
206
|
-
}
|
|
244
|
+
class UnsupportedClientError extends Error {
|
|
245
|
+
code;
|
|
246
|
+
details;
|
|
247
|
+
constructor(code, message, details = null) {
|
|
248
|
+
super(message);
|
|
249
|
+
this.name = "UnsupportedClientError";
|
|
250
|
+
this.code = code;
|
|
251
|
+
this.details = details;
|
|
252
|
+
}
|
|
207
253
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
254
|
+
const BOOST_SKU_VALUES = ["boost_1", "boost_3", "boost_7", "boost_14", "boost_31"];
|
|
255
|
+
const MUSIC_PROMPT_MAX_LENGTH = 4e3;
|
|
256
|
+
class ApiError extends Error {
|
|
257
|
+
status;
|
|
258
|
+
code;
|
|
259
|
+
details;
|
|
260
|
+
constructor(message, status, code, details = null) {
|
|
261
|
+
super(message);
|
|
262
|
+
this.name = "ApiError";
|
|
263
|
+
this.status = status;
|
|
264
|
+
this.details = details;
|
|
265
|
+
if (code !== void 0) {
|
|
266
|
+
this.code = code;
|
|
222
267
|
}
|
|
268
|
+
}
|
|
223
269
|
}
|
|
270
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
271
|
+
0 && (module.exports = {
|
|
272
|
+
APP_LAUNCH_CONTEXT_VALUES,
|
|
273
|
+
APP_LIST_SORT_VALUES,
|
|
274
|
+
APP_MORE_COLLECTION_KEYS,
|
|
275
|
+
ApiError,
|
|
276
|
+
BOOST_SKU_VALUES,
|
|
277
|
+
COLLECTION_SLUG_REGEX,
|
|
278
|
+
ENGAGEMENT_EVENT_TYPE_VALUES,
|
|
279
|
+
ENGAGEMENT_TARGET_KIND_VALUES,
|
|
280
|
+
FOLLOWING_APP_SECTION_VALUES,
|
|
281
|
+
FOLLOWING_FEED_SECTION_VALUES,
|
|
282
|
+
FOLLOWING_SORT_VALUES,
|
|
283
|
+
FREE_CREDIT_OBJECTIVE_VALUES,
|
|
284
|
+
FREE_CREDIT_REWARD_STATUS_VALUES,
|
|
285
|
+
HOME_GAMES_COLLECTION_IDS,
|
|
286
|
+
LIBRARY_CATEGORY_VALUES,
|
|
287
|
+
LIBRARY_SORT_VALUES,
|
|
288
|
+
MODERATION_REPORT_REASON_CODE_VALUES,
|
|
289
|
+
MUSIC_PROMPT_MAX_LENGTH,
|
|
290
|
+
NOTIFICATION_EVENT_TYPE_VALUES,
|
|
291
|
+
NOTIFICATION_PREVIEW_KIND_VALUES,
|
|
292
|
+
NOTIFICATION_STATUS_VALUES,
|
|
293
|
+
SAVED_ITEM_KIND_VALUES,
|
|
294
|
+
SEARCH_ASSET_TYPE_VALUES,
|
|
295
|
+
SEARCH_KIND_VALUES,
|
|
296
|
+
SEARCH_MODE_VALUES,
|
|
297
|
+
SEARCH_RESULT_KIND_VALUES,
|
|
298
|
+
SEARCH_SORT_VALUES,
|
|
299
|
+
TAG_GROUP_SORT_VALUES,
|
|
300
|
+
TAG_SLUG_REGEX,
|
|
301
|
+
UnsupportedClientError,
|
|
302
|
+
isPaginationMeta,
|
|
303
|
+
isValidCollectionSlug,
|
|
304
|
+
isValidTagSlug,
|
|
305
|
+
normalizeCollectionSlug,
|
|
306
|
+
normalizeTagRef,
|
|
307
|
+
normalizeTagSlug,
|
|
308
|
+
parseTagRef
|
|
309
|
+
});
|