@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.
Files changed (71) hide show
  1. package/config/client-meta.json +1 -1
  2. package/node_modules/@playdrop/ai-client/dist/index.js +461 -444
  3. package/node_modules/@playdrop/ai-client/package.json +1 -1
  4. package/node_modules/@playdrop/api-client/dist/client.js +903 -882
  5. package/node_modules/@playdrop/api-client/dist/core/errors.js +69 -45
  6. package/node_modules/@playdrop/api-client/dist/core/request.js +188 -159
  7. package/node_modules/@playdrop/api-client/dist/domains/admin.js +516 -491
  8. package/node_modules/@playdrop/api-client/dist/domains/ai.js +40 -14
  9. package/node_modules/@playdrop/api-client/dist/domains/apps.js +480 -462
  10. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +439 -419
  11. package/node_modules/@playdrop/api-client/dist/domains/assets.js +696 -676
  12. package/node_modules/@playdrop/api-client/dist/domains/auth.js +346 -320
  13. package/node_modules/@playdrop/api-client/dist/domains/comments.js +124 -98
  14. package/node_modules/@playdrop/api-client/dist/domains/free-credits.js +91 -65
  15. package/node_modules/@playdrop/api-client/dist/domains/me.js +71 -45
  16. package/node_modules/@playdrop/api-client/dist/domains/payments.js +407 -386
  17. package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +144 -118
  18. package/node_modules/@playdrop/api-client/dist/domains/search.js +117 -104
  19. package/node_modules/@playdrop/api-client/dist/domains/tags.js +188 -162
  20. package/node_modules/@playdrop/api-client/dist/index.js +993 -552
  21. package/node_modules/@playdrop/api-client/package.json +1 -1
  22. package/node_modules/@playdrop/boxel-three/dist/src/animations.js +84 -62
  23. package/node_modules/@playdrop/boxel-three/dist/src/builders.js +341 -308
  24. package/node_modules/@playdrop/boxel-three/dist/src/context.js +55 -29
  25. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +856 -858
  26. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +267 -261
  27. package/node_modules/@playdrop/boxel-three/dist/src/index.js +64 -15
  28. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +89 -63
  29. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +81 -56
  30. package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +112 -86
  31. package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +45 -17
  32. package/node_modules/@playdrop/boxel-three/dist/src/scene.js +160 -136
  33. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +582 -584
  34. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +123 -97
  35. package/node_modules/@playdrop/boxel-three/dist/src/textures.js +207 -182
  36. package/node_modules/@playdrop/boxel-three/dist/src/types.js +15 -1
  37. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +451 -425
  38. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +109 -84
  39. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +127 -106
  40. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +73 -51
  41. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +97 -79
  42. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +29 -7
  43. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +80 -60
  44. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +41 -19
  45. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +72 -50
  46. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +84 -62
  47. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +69 -47
  48. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +129 -109
  49. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +40 -18
  50. package/node_modules/@playdrop/boxel-three/package.json +1 -1
  51. package/node_modules/@playdrop/config/client-meta.json +1 -1
  52. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  53. package/node_modules/@playdrop/types/dist/api.js +289 -203
  54. package/node_modules/@playdrop/types/dist/app-capability-filters.js +112 -62
  55. package/node_modules/@playdrop/types/dist/app.js +91 -45
  56. package/node_modules/@playdrop/types/dist/asset-pack.js +37 -5
  57. package/node_modules/@playdrop/types/dist/asset-spec.js +170 -90
  58. package/node_modules/@playdrop/types/dist/asset.js +186 -108
  59. package/node_modules/@playdrop/types/dist/content-license.js +49 -15
  60. package/node_modules/@playdrop/types/dist/creator-public-image.js +60 -32
  61. package/node_modules/@playdrop/types/dist/ecs.js +102 -82
  62. package/node_modules/@playdrop/types/dist/engine-builtins.js +603 -573
  63. package/node_modules/@playdrop/types/dist/entity.js +63 -53
  64. package/node_modules/@playdrop/types/dist/graph.js +116 -80
  65. package/node_modules/@playdrop/types/dist/index.js +47 -20
  66. package/node_modules/@playdrop/types/dist/owned-assets.js +55 -33
  67. package/node_modules/@playdrop/types/dist/player-meta.js +151 -100
  68. package/node_modules/@playdrop/types/dist/realtime.js +27 -7
  69. package/node_modules/@playdrop/types/dist/version.js +182 -124
  70. package/node_modules/@playdrop/types/package.json +1 -1
  71. package/package.json +1 -1
@@ -1,223 +1,309 @@
1
- export const TAG_SLUG_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
2
- export const APP_MORE_COLLECTION_KEYS = [
3
- 'by-creator',
4
- 'similar',
5
- 'remixes',
6
- 'contains',
7
- 'uses',
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
- export const SEARCH_RESULT_KIND_VALUES = ['creator', 'app', 'asset', 'asset-spec', 'pack'];
10
- export const SEARCH_KIND_VALUES = ['all', ...SEARCH_RESULT_KIND_VALUES];
11
- export const SEARCH_MODE_VALUES = ['grouped', 'flat'];
12
- export const SEARCH_ASSET_TYPE_VALUES = ['image', 'video', 'audio', 'song', 'sfx', '3d'];
13
- export const SEARCH_SORT_VALUES = [
14
- 'relevance',
15
- 'views',
16
- 'recent',
17
- 'updated',
18
- 'used',
19
- 'newest',
20
- 'likes',
21
- 'downloads',
22
- 'remixes',
23
- 'comments',
24
- 'assets',
25
- 'apps',
26
- 'alpha',
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
- export const APP_LIST_SORT_VALUES = [
29
- 'newest',
30
- 'updated',
31
- 'views',
32
- 'likes',
33
- 'used',
86
+ const APP_LIST_SORT_VALUES = [
87
+ "newest",
88
+ "updated",
89
+ "views",
90
+ "likes",
91
+ "used"
34
92
  ];
35
- export const SAVED_ITEM_KIND_VALUES = ['APP', 'ASSET', 'PACK'];
36
- export const TAG_GROUP_SORT_VALUES = ["alpha", "popularity"];
37
- export function isValidTagSlug(value) {
38
- return typeof value === 'string' && TAG_SLUG_REGEX.test(value);
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
- export function normalizeTagSlug(value) {
41
- const normalized = value.trim().toLowerCase();
42
- if (!TAG_SLUG_REGEX.test(normalized)) {
43
- throw new Error(`invalid_tag_slug:${value}`);
44
- }
45
- return normalized;
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
- export const COLLECTION_SLUG_REGEX = TAG_SLUG_REGEX;
48
- export function isValidCollectionSlug(value) {
49
- return typeof value === 'string' && COLLECTION_SLUG_REGEX.test(value);
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
- export function normalizeCollectionSlug(value) {
52
- const normalized = value.trim().toLowerCase();
53
- if (!COLLECTION_SLUG_REGEX.test(normalized)) {
54
- throw new Error(`invalid_collection_slug:${value}`);
55
- }
56
- return normalized;
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
- export function parseTagRef(value) {
59
- if (typeof value !== 'string') {
60
- return null;
61
- }
62
- const trimmed = value.trim().toLowerCase();
63
- const parts = trimmed.split('/');
64
- if (parts.length !== 2) {
65
- return null;
66
- }
67
- const groupSlug = parts[0];
68
- const tagSlug = parts[1];
69
- if (!groupSlug || !tagSlug) {
70
- return null;
71
- }
72
- if (!TAG_SLUG_REGEX.test(groupSlug) || !TAG_SLUG_REGEX.test(tagSlug)) {
73
- return null;
74
- }
75
- return { groupSlug, tagSlug };
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
- export function normalizeTagRef(value) {
78
- const parsed = parseTagRef(value);
79
- if (!parsed) {
80
- throw new Error(`invalid_tag_ref:${value}`);
81
- }
82
- return `${parsed.groupSlug}/${parsed.tagSlug}`;
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
- export const ENGAGEMENT_EVENT_TYPE_VALUES = [
85
- 'VIEW',
86
- 'LAUNCH',
87
- 'PLAY',
88
- 'DOWNLOAD',
89
- 'LIKE',
90
- 'UNLIKE',
91
- 'DISLIKE',
92
- 'UNDISLIKE',
93
- 'SAVE',
94
- 'UNSAVE',
95
- 'FOLLOW',
96
- 'UNFOLLOW',
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
- export const ENGAGEMENT_TARGET_KIND_VALUES = ['CREATOR', 'APP', 'ASSET', 'PACK'];
99
- export const APP_LAUNCH_CONTEXT_VALUES = ['CARD', 'DETAIL', 'OTHER'];
100
- export const NOTIFICATION_EVENT_TYPE_VALUES = [
101
- 'NEW_CONTENT',
102
- 'UPDATED',
103
- 'CONTENT_COMMENT',
104
- 'CONTENT_REPLY',
105
- 'CONTENT_LIKE',
106
- 'NEW_FOLLOWER',
107
- 'ASSET_PURCHASED',
108
- 'PAYMENT_SUCCEEDED',
109
- 'PAYMENT_REFUNDED',
110
- 'ADMIN_ACTION',
111
- 'AI_JOB_SUCCEEDED',
112
- 'AI_JOB_FAILED',
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
- export const LIBRARY_CATEGORY_VALUES = [
115
- 'games',
116
- 'demos',
117
- 'tools',
118
- 'templates',
119
- 'images',
120
- 'music',
121
- 'sfx',
122
- 'videos',
123
- '3d',
124
- 'packs',
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
- export const LIBRARY_SORT_VALUES = ['saved_desc', 'alpha_asc'];
127
- export const FOLLOWING_SORT_VALUES = ['activity_desc', 'alpha_asc'];
128
- export const NOTIFICATION_STATUS_VALUES = ['all', 'unread'];
129
- export const NOTIFICATION_PREVIEW_KIND_VALUES = ['item', 'person', 'credit', 'account'];
130
- export const FOLLOWING_APP_SECTION_VALUES = ['games', 'demos', 'tools', 'templates'];
131
- export const FOLLOWING_FEED_SECTION_VALUES = [
132
- ...FOLLOWING_APP_SECTION_VALUES,
133
- 'images',
134
- 'music',
135
- 'sfx',
136
- 'speech',
137
- 'videos',
138
- '3d',
139
- 'packs',
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
- export const MODERATION_REPORT_REASON_CODE_VALUES = [
142
- 'SPAM',
143
- 'HARASSMENT',
144
- 'NSFW',
145
- 'COPYRIGHT',
146
- 'IMPERSONATION',
147
- 'OTHER',
199
+ const MODERATION_REPORT_REASON_CODE_VALUES = [
200
+ "SPAM",
201
+ "HARASSMENT",
202
+ "NSFW",
203
+ "COPYRIGHT",
204
+ "IMPERSONATION",
205
+ "OTHER"
148
206
  ];
149
- export const FREE_CREDIT_OBJECTIVE_VALUES = [
150
- 'WELCOME',
151
- 'PLAY_GAME',
152
- 'FOLLOW_CREATOR',
153
- 'INVITED',
154
- 'SHARE_CODE',
155
- 'ENABLE_PUSH',
156
- 'CREATE_SONG',
157
- 'CREATE_IMAGE',
158
- 'CREATE_3D',
159
- 'CLI_LOGIN',
160
- 'PUBLISH_GAME',
161
- 'BOOST_GAME',
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
- export const FREE_CREDIT_REWARD_STATUS_VALUES = ['INCOMPLETE', 'CLAIMABLE', 'CLAIMED'];
164
- export const HOME_GAMES_COLLECTION_IDS = {
165
- TOP_GAMES: 'top_games',
166
- MOST_LIKED_GAMES: 'most_liked_games',
167
- BOOSTED_GAMES: 'boosted_games',
168
- TOP_CREATORS: 'top_creators',
169
- FEATURED_GAMES: 'featured_games',
170
- NEW_GAMES: 'new_games',
171
- GAME_GENRES: 'game_genres',
172
- CONTINUE_PLAYING: 'continue_playing',
173
- FOLLOWING_CREATORS: 'following_creators',
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
- // Validation Helpers
177
- // ============================================================================
178
- export function isPaginationMeta(value) {
179
- if (typeof value !== 'object' || value === null) {
180
- return false;
181
- }
182
- const meta = value;
183
- const limit = meta['limit'];
184
- const offset = meta['offset'];
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
- // Client Error Types
197
- // ============================================================================
198
- export class UnsupportedClientError extends Error {
199
- code;
200
- details;
201
- constructor(code, message, details = null) {
202
- super(message);
203
- this.name = 'UnsupportedClientError';
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
- export const BOOST_SKU_VALUES = ['boost_1', 'boost_3', 'boost_7', 'boost_14', 'boost_31'];
209
- export const MUSIC_PROMPT_MAX_LENGTH = 4000;
210
- export class ApiError extends Error {
211
- status;
212
- code;
213
- details;
214
- constructor(message, status, code, details = null) {
215
- super(message);
216
- this.name = 'ApiError';
217
- this.status = status;
218
- this.details = details;
219
- if (code !== undefined) {
220
- this.code = code;
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
+ });