@playdrop/playdrop-cli 0.7.15 → 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/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,750 +1,1191 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 dist_exports = {};
|
|
19
|
+
__export(dist_exports, {
|
|
20
|
+
APP_SURFACE_VALUES: () => import_types2.APP_SURFACE_VALUES,
|
|
21
|
+
APP_TYPE_DEFAULT_DISPLAY: () => import_types2.APP_TYPE_DEFAULT_DISPLAY,
|
|
22
|
+
APP_TYPE_VALUES: () => import_types2.APP_TYPE_VALUES,
|
|
23
|
+
ApiError: () => import_types3.ApiError,
|
|
24
|
+
DEFAULT_APP_SURFACE_TARGETS: () => import_types2.DEFAULT_APP_SURFACE_TARGETS,
|
|
25
|
+
DEFAULT_APP_TYPE: () => import_types2.DEFAULT_APP_TYPE,
|
|
26
|
+
UnsupportedClientError: () => import_types3.UnsupportedClientError,
|
|
27
|
+
activateAppBoost: () => activateAppBoost,
|
|
28
|
+
apiFetch: () => apiFetch,
|
|
29
|
+
approveCliLogin: () => approveCliLogin,
|
|
30
|
+
attemptMe: () => attemptMe,
|
|
31
|
+
blockCreator: () => blockCreator,
|
|
32
|
+
cancelAppIapReceipt: () => cancelAppIapReceipt,
|
|
33
|
+
cancelIapReceipt: () => cancelIapReceipt,
|
|
34
|
+
changePassword: () => changePassword,
|
|
35
|
+
checkUsernameAvailable: () => checkUsernameAvailable,
|
|
36
|
+
claimFreeCreditReward: () => claimFreeCreditReward,
|
|
37
|
+
claimNextAdminAppVersionReview: () => claimNextAdminAppVersionReview,
|
|
38
|
+
completeAppleSignup: () => completeAppleSignup,
|
|
39
|
+
completeGoogleSignup: () => completeGoogleSignup,
|
|
40
|
+
completeXSignup: () => completeXSignup,
|
|
41
|
+
configureWebClientRuntime: () => configureWebClientRuntime,
|
|
42
|
+
consumeAppIapReceipt: () => consumeAppIapReceipt,
|
|
43
|
+
createAdminGameCollection: () => createAdminGameCollection,
|
|
44
|
+
createApiClient: () => import_client.createApiClient,
|
|
45
|
+
createAppleNativeChallenge: () => createAppleNativeChallenge,
|
|
46
|
+
createAppleOAuthLinkStart: () => createAppleOAuthLinkStart,
|
|
47
|
+
createCliApiKey: () => createCliApiKey,
|
|
48
|
+
createContentComment: () => createContentComment,
|
|
49
|
+
createCreditPackCheckoutSession: () => createCreditPackCheckoutSession,
|
|
50
|
+
deleteAccount: () => deleteAccount,
|
|
51
|
+
deleteAdminGameCollection: () => deleteAdminGameCollection,
|
|
52
|
+
deleteApp: () => deleteApp,
|
|
53
|
+
deleteAppVersion: () => deleteAppVersion,
|
|
54
|
+
deleteApplePushDevice: () => deleteApplePushDevice,
|
|
55
|
+
deleteAsset: () => deleteAsset,
|
|
56
|
+
deleteAssetPack: () => deleteAssetPack,
|
|
57
|
+
deleteAssetPackVersion: () => deleteAssetPackVersion,
|
|
58
|
+
deleteAssetVersion: () => deleteAssetVersion,
|
|
59
|
+
deleteContentComment: () => deleteContentComment,
|
|
60
|
+
deleteWebPushSubscription: () => deleteWebPushSubscription,
|
|
61
|
+
dislikeContentComment: () => dislikeContentComment,
|
|
62
|
+
dislikeItem: () => dislikeItem,
|
|
63
|
+
downloadAppSource: () => downloadAppSource,
|
|
64
|
+
downloadAssetFile: () => downloadAssetFile,
|
|
65
|
+
downloadAssetPack: () => downloadAssetPack,
|
|
66
|
+
downloadAssetPackSource: () => downloadAssetPackSource,
|
|
67
|
+
downloadAssetSource: () => downloadAssetSource,
|
|
68
|
+
exchangeAppleOAuthHandoff: () => exchangeAppleOAuthHandoff,
|
|
69
|
+
exchangeGoogleOneTapCredential: () => exchangeGoogleOneTapCredential,
|
|
70
|
+
exportPrivacyData: () => exportPrivacyData,
|
|
71
|
+
fetchAdminAiGeneration: () => fetchAdminAiGeneration,
|
|
72
|
+
fetchAdminAppPlayerMeta: () => fetchAdminAppPlayerMeta,
|
|
73
|
+
fetchAdminAppPlayerMetaUser: () => fetchAdminAppPlayerMetaUser,
|
|
74
|
+
fetchAdminAppVersionReviews: () => fetchAdminAppVersionReviews,
|
|
75
|
+
fetchAdminApps: () => fetchAdminApps,
|
|
76
|
+
fetchAdminGameCollection: () => fetchAdminGameCollection,
|
|
77
|
+
fetchAdminGameCollections: () => fetchAdminGameCollections,
|
|
78
|
+
fetchAiGeneration: () => fetchAiGeneration,
|
|
79
|
+
fetchAppBoostHistory: () => fetchAppBoostHistory,
|
|
80
|
+
fetchAppBoostReport: () => fetchAppBoostReport,
|
|
81
|
+
fetchAppBoostStatus: () => fetchAppBoostStatus,
|
|
82
|
+
fetchAppBySlug: () => fetchAppBySlug,
|
|
83
|
+
fetchAppDetail: () => fetchAppDetail,
|
|
84
|
+
fetchAppIapReceipts: () => fetchAppIapReceipts,
|
|
85
|
+
fetchAppMoreCollectionPage: () => fetchAppMoreCollectionPage,
|
|
86
|
+
fetchAppMoreCollections: () => fetchAppMoreCollections,
|
|
87
|
+
fetchAppRelated: () => fetchAppRelated,
|
|
88
|
+
fetchAppRuntimeAssets: () => fetchAppRuntimeAssets,
|
|
89
|
+
fetchApplePendingSignup: () => fetchApplePendingSignup,
|
|
90
|
+
fetchApplePushDeviceStatus: () => fetchApplePushDeviceStatus,
|
|
91
|
+
fetchApps: () => fetchApps,
|
|
92
|
+
fetchAppsByCreator: () => fetchAppsByCreator,
|
|
93
|
+
fetchAppsByCreatorPage: () => fetchAppsByCreatorPage,
|
|
94
|
+
fetchAppsByType: () => fetchAppsByType,
|
|
95
|
+
fetchAppsByTypePage: () => fetchAppsByTypePage,
|
|
96
|
+
fetchAppsPage: () => fetchAppsPage,
|
|
97
|
+
fetchAssetBySlug: () => fetchAssetBySlug,
|
|
98
|
+
fetchAssetPackBySlug: () => fetchAssetPackBySlug,
|
|
99
|
+
fetchAssetPackRelated: () => fetchAssetPackRelated,
|
|
100
|
+
fetchAssetRelated: () => fetchAssetRelated,
|
|
101
|
+
fetchBoostBalance: () => fetchBoostBalance,
|
|
102
|
+
fetchCliApiKeyStatus: () => fetchCliApiKeyStatus,
|
|
103
|
+
fetchCliLoginStatus: () => fetchCliLoginStatus,
|
|
104
|
+
fetchContentComments: () => fetchContentComments,
|
|
105
|
+
fetchCreatorEarnings: () => fetchCreatorEarnings,
|
|
106
|
+
fetchCreditPackCheckoutStatus: () => fetchCreditPackCheckoutStatus,
|
|
107
|
+
fetchCreditTransactions: () => fetchCreditTransactions,
|
|
108
|
+
fetchFollowingCreators: () => fetchFollowingCreators,
|
|
109
|
+
fetchFollowingFeed: () => fetchFollowingFeed,
|
|
110
|
+
fetchFreeCredits: () => fetchFreeCredits,
|
|
111
|
+
fetchGooglePendingSignup: () => fetchGooglePendingSignup,
|
|
112
|
+
fetchHome: () => fetchHome,
|
|
113
|
+
fetchHomeGamesCollectionPage: () => fetchHomeGamesCollectionPage,
|
|
114
|
+
fetchIapReceipts: () => fetchIapReceipts,
|
|
115
|
+
fetchInvitePreview: () => fetchInvitePreview,
|
|
116
|
+
fetchLibrary: () => fetchLibrary,
|
|
117
|
+
fetchMyAchievements: () => fetchMyAchievements,
|
|
118
|
+
fetchMyApps: () => fetchMyApps,
|
|
119
|
+
fetchMyAppsPage: () => fetchMyAppsPage,
|
|
120
|
+
fetchMyInviteCode: () => fetchMyInviteCode,
|
|
121
|
+
fetchMyLeaderboards: () => fetchMyLeaderboards,
|
|
122
|
+
fetchNotifications: () => fetchNotifications,
|
|
123
|
+
fetchOwnedProfileAssets: () => fetchOwnedProfileAssets,
|
|
124
|
+
fetchPublicFreeCredits: () => fetchPublicFreeCredits,
|
|
125
|
+
fetchPublicShop: () => fetchPublicShop,
|
|
126
|
+
fetchShop: () => fetchShop,
|
|
127
|
+
fetchStarterProfileAssets: () => fetchStarterProfileAssets,
|
|
128
|
+
fetchTag: () => fetchTag,
|
|
129
|
+
fetchTagDirectory: () => fetchTagDirectory,
|
|
130
|
+
fetchTagGroup: () => fetchTagGroup,
|
|
131
|
+
fetchTags: () => fetchTags,
|
|
132
|
+
fetchUserById: () => fetchUserById,
|
|
133
|
+
fetchUserByUsername: () => fetchUserByUsername,
|
|
134
|
+
fetchWebPushConfig: () => fetchWebPushConfig,
|
|
135
|
+
fetchWebPushSubscriptionStatus: () => fetchWebPushSubscriptionStatus,
|
|
136
|
+
fetchXPendingSignup: () => fetchXPendingSignup,
|
|
137
|
+
followCreator: () => followCreator,
|
|
138
|
+
getAchievement: () => getAchievement,
|
|
139
|
+
getAppVersion: () => getAppVersion,
|
|
140
|
+
getClientVersionLabel: () => getClientVersionLabel,
|
|
141
|
+
getLeaderboard: () => getLeaderboard,
|
|
142
|
+
getRuntimeState: () => getRuntimeState,
|
|
143
|
+
grantAppIapReceipt: () => grantAppIapReceipt,
|
|
144
|
+
likeContentComment: () => likeContentComment,
|
|
145
|
+
likeItem: () => likeItem,
|
|
146
|
+
linkApple: () => linkApple,
|
|
147
|
+
linkGoogleApple: () => linkGoogleApple,
|
|
148
|
+
listAchievements: () => listAchievements,
|
|
149
|
+
listAppVersions: () => listAppVersions,
|
|
150
|
+
listAssetCategories: () => listAssetCategories,
|
|
151
|
+
listAssetPackVersions: () => listAssetPackVersions,
|
|
152
|
+
listAssetPacks: () => listAssetPacks,
|
|
153
|
+
listAssetPacksForCreator: () => listAssetPacksForCreator,
|
|
154
|
+
listAssetPacksForCreatorPage: () => listAssetPacksForCreatorPage,
|
|
155
|
+
listAssetVersions: () => listAssetVersions,
|
|
156
|
+
listAssets: () => listAssets,
|
|
157
|
+
listAssetsForCreator: () => listAssetsForCreator,
|
|
158
|
+
listAssetsForCreatorPage: () => listAssetsForCreatorPage,
|
|
159
|
+
listLeaderboards: () => listLeaderboards,
|
|
160
|
+
loadDevInterstitialAd: () => loadDevInterstitialAd,
|
|
161
|
+
loadDevRewardedAd: () => loadDevRewardedAd,
|
|
162
|
+
loadInterstitialAd: () => loadInterstitialAd,
|
|
163
|
+
loadRewardedAd: () => loadRewardedAd,
|
|
164
|
+
login: () => login,
|
|
165
|
+
loginWithApiKey: () => loginWithApiKey,
|
|
166
|
+
logout: () => logout,
|
|
167
|
+
markAllNotificationsRead: () => markAllNotificationsRead,
|
|
168
|
+
markNotificationRead: () => markNotificationRead,
|
|
169
|
+
mutateAdminAchievementState: () => mutateAdminAchievementState,
|
|
170
|
+
mutateAdminLeaderboardScore: () => mutateAdminLeaderboardScore,
|
|
171
|
+
normalizeAppType: () => import_types2.normalizeAppType,
|
|
172
|
+
pollCliLogin: () => pollCliLogin,
|
|
173
|
+
purchaseAsset: () => purchaseAsset,
|
|
174
|
+
purchaseBoostPack: () => purchaseBoostPack,
|
|
175
|
+
purchaseDevIap: () => purchaseDevIap,
|
|
176
|
+
purchaseIap: () => purchaseIap,
|
|
177
|
+
register: () => register,
|
|
178
|
+
replaceAdminGameCollectionGames: () => replaceAdminGameCollectionGames,
|
|
179
|
+
reportComment: () => reportComment,
|
|
180
|
+
reportContent: () => reportContent,
|
|
181
|
+
reportCreator: () => reportCreator,
|
|
182
|
+
requestAppAccessToken: () => requestAppAccessToken,
|
|
183
|
+
requestDevAppAccessToken: () => requestDevAppAccessToken,
|
|
184
|
+
resetAllDevPlayers: () => resetAllDevPlayers,
|
|
185
|
+
resetDevPlayer: () => resetDevPlayer,
|
|
186
|
+
retireAdminAchievement: () => retireAdminAchievement,
|
|
187
|
+
retireAdminLeaderboard: () => retireAdminLeaderboard,
|
|
188
|
+
saveItem: () => saveItem,
|
|
189
|
+
search: () => search,
|
|
190
|
+
searchAdminGameCollectionCandidates: () => searchAdminGameCollectionCandidates,
|
|
191
|
+
sendAppLog: () => sendAppLog,
|
|
192
|
+
setAchievementProgressAtLeast: () => setAchievementProgressAtLeast,
|
|
193
|
+
setSelectedProfileAsset: () => setSelectedProfileAsset,
|
|
194
|
+
showDevInterstitialAd: () => showDevInterstitialAd,
|
|
195
|
+
showDevRewardedAd: () => showDevRewardedAd,
|
|
196
|
+
showInterstitialAd: () => showInterstitialAd,
|
|
197
|
+
showRewardedAd: () => showRewardedAd,
|
|
198
|
+
signInWithApple: () => signInWithApple,
|
|
199
|
+
signInWithGoogleApple: () => signInWithGoogleApple,
|
|
200
|
+
startCliLogin: () => startCliLogin,
|
|
201
|
+
startCliWebLaunch: () => startCliWebLaunch,
|
|
202
|
+
submitLeaderboardScore: () => submitLeaderboardScore,
|
|
203
|
+
submitMyInviteCode: () => submitMyInviteCode,
|
|
204
|
+
suggestSearch: () => suggestSearch,
|
|
205
|
+
trackEngagementEvent: () => trackEngagementEvent,
|
|
206
|
+
unblockCreator: () => unblockCreator,
|
|
207
|
+
undislikeContentComment: () => undislikeContentComment,
|
|
208
|
+
undislikeItem: () => undislikeItem,
|
|
209
|
+
unfollowCreator: () => unfollowCreator,
|
|
210
|
+
unlikeContentComment: () => unlikeContentComment,
|
|
211
|
+
unlikeItem: () => unlikeItem,
|
|
212
|
+
unlinkApple: () => unlinkApple,
|
|
213
|
+
unlinkGoogle: () => unlinkGoogle,
|
|
214
|
+
unlinkX: () => unlinkX,
|
|
215
|
+
unlockAchievement: () => unlockAchievement,
|
|
216
|
+
unsaveItem: () => unsaveItem,
|
|
217
|
+
updateAdminAppVersionReview: () => updateAdminAppVersionReview,
|
|
218
|
+
updateAdminGameCollection: () => updateAdminGameCollection,
|
|
219
|
+
updateAppVersion: () => updateAppVersion,
|
|
220
|
+
updateAsset: () => updateAsset,
|
|
221
|
+
updateAssetPack: () => updateAssetPack,
|
|
222
|
+
updateAssetPackVersion: () => updateAssetPackVersion,
|
|
223
|
+
updateAssetVersion: () => updateAssetVersion,
|
|
224
|
+
updateProfile: () => updateProfile,
|
|
225
|
+
upgradeToCreator: () => upgradeToCreator,
|
|
226
|
+
uploadAdminGameCollectionIcon: () => uploadAdminGameCollectionIcon,
|
|
227
|
+
upsertApplePushDevice: () => upsertApplePushDevice,
|
|
228
|
+
upsertWebPushSubscription: () => upsertWebPushSubscription
|
|
229
|
+
});
|
|
230
|
+
module.exports = __toCommonJS(dist_exports);
|
|
231
|
+
var import_client = require("./client.js");
|
|
232
|
+
var import_client2 = require("./client.js");
|
|
233
|
+
var import_types = require("@playdrop/types");
|
|
234
|
+
var import_request = require("./core/request.js");
|
|
235
|
+
var import_types2 = require("@playdrop/types");
|
|
236
|
+
var import_types3 = require("@playdrop/types");
|
|
5
237
|
const CLIENT_HEADER_NAMES = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
238
|
+
client: "x-playdrop-client",
|
|
239
|
+
clientVersion: "x-playdrop-client-version",
|
|
240
|
+
clientBuild: "x-playdrop-client-build",
|
|
241
|
+
platform: "x-playdrop-platform",
|
|
242
|
+
platformVersion: "x-playdrop-platform-version"
|
|
11
243
|
};
|
|
12
244
|
const ENGAGEMENT_HEADER_NAMES = {
|
|
13
|
-
|
|
14
|
-
|
|
245
|
+
anonymousId: "x-playdrop-anon-id",
|
|
246
|
+
sessionId: "x-playdrop-session-id"
|
|
15
247
|
};
|
|
16
|
-
const AUTH_MODE_HEADER_NAME =
|
|
17
|
-
const COOKIE_AUTH_MODE =
|
|
248
|
+
const AUTH_MODE_HEADER_NAME = "x-playdrop-auth-mode";
|
|
249
|
+
const COOKIE_AUTH_MODE = "cookie";
|
|
18
250
|
let defaultClient = null;
|
|
19
251
|
const runtimeState = {
|
|
20
|
-
|
|
21
|
-
|
|
252
|
+
platform: null,
|
|
253
|
+
client: null
|
|
22
254
|
};
|
|
23
|
-
const WEB_ANONYMOUS_ID_STORAGE_KEY =
|
|
24
|
-
const WEB_SESSION_ID_STORAGE_KEY =
|
|
255
|
+
const WEB_ANONYMOUS_ID_STORAGE_KEY = "playdrop.anonymousId";
|
|
256
|
+
const WEB_SESSION_ID_STORAGE_KEY = "playdrop.sessionId";
|
|
25
257
|
function generateUuid() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
258
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
259
|
+
return crypto.randomUUID();
|
|
260
|
+
}
|
|
261
|
+
return `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
30
262
|
}
|
|
31
263
|
function readOrCreateStorageValue(storage, key) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
264
|
+
const existing = storage.getItem(key)?.trim();
|
|
265
|
+
if (existing) {
|
|
266
|
+
return existing;
|
|
267
|
+
}
|
|
268
|
+
const generated = generateUuid();
|
|
269
|
+
storage.setItem(key, generated);
|
|
270
|
+
return generated;
|
|
39
271
|
}
|
|
40
272
|
function getBrowserEngagementHeaders() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
273
|
+
if (typeof window === "undefined") {
|
|
274
|
+
return {};
|
|
275
|
+
}
|
|
276
|
+
const anonymousId = readOrCreateStorageValue(window.localStorage, WEB_ANONYMOUS_ID_STORAGE_KEY);
|
|
277
|
+
const sessionId = readOrCreateStorageValue(window.sessionStorage, WEB_SESSION_ID_STORAGE_KEY);
|
|
278
|
+
return {
|
|
279
|
+
[ENGAGEMENT_HEADER_NAMES.anonymousId]: anonymousId,
|
|
280
|
+
[ENGAGEMENT_HEADER_NAMES.sessionId]: sessionId
|
|
281
|
+
};
|
|
50
282
|
}
|
|
51
283
|
function getDefaultClient() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return defaultClient;
|
|
72
|
-
}
|
|
73
|
-
export async function apiFetch(path, init = {}) {
|
|
74
|
-
const state = getRuntimeState();
|
|
75
|
-
if (!state.platform || !state.client) {
|
|
76
|
-
throw new Error('apiFetch called before client runtime was configured. Call ensureWebClientRuntimeConfigured() or use createApiClient().');
|
|
77
|
-
}
|
|
78
|
-
const clientHeaders = {
|
|
79
|
-
[CLIENT_HEADER_NAMES.client]: 'web',
|
|
80
|
-
[CLIENT_HEADER_NAMES.clientVersion]: state.client.version,
|
|
81
|
-
[CLIENT_HEADER_NAMES.clientBuild]: state.client.build,
|
|
82
|
-
[CLIENT_HEADER_NAMES.platform]: state.platform.name,
|
|
83
|
-
[CLIENT_HEADER_NAMES.platformVersion]: state.platform.version,
|
|
84
|
-
[AUTH_MODE_HEADER_NAME]: COOKIE_AUTH_MODE,
|
|
85
|
-
...getBrowserEngagementHeaders(),
|
|
86
|
-
};
|
|
87
|
-
return await fetch(path, {
|
|
88
|
-
...init,
|
|
89
|
-
...buildBrowserCredentialsInit(true),
|
|
90
|
-
headers: {
|
|
91
|
-
'Content-Type': 'application/json',
|
|
92
|
-
...clientHeaders,
|
|
93
|
-
...init.headers,
|
|
94
|
-
},
|
|
284
|
+
if (!defaultClient) {
|
|
285
|
+
defaultClient = (0, import_client2.createApiClient)({
|
|
286
|
+
clientHeaders: () => {
|
|
287
|
+
const state = getRuntimeState();
|
|
288
|
+
if (!state.platform || !state.client) {
|
|
289
|
+
return {};
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
[CLIENT_HEADER_NAMES.client]: "web",
|
|
293
|
+
[CLIENT_HEADER_NAMES.clientVersion]: state.client.version,
|
|
294
|
+
[CLIENT_HEADER_NAMES.clientBuild]: state.client.build,
|
|
295
|
+
[CLIENT_HEADER_NAMES.platform]: state.platform.name,
|
|
296
|
+
[CLIENT_HEADER_NAMES.platformVersion]: state.platform.version,
|
|
297
|
+
[AUTH_MODE_HEADER_NAME]: COOKIE_AUTH_MODE,
|
|
298
|
+
...getBrowserEngagementHeaders()
|
|
299
|
+
};
|
|
300
|
+
}
|
|
95
301
|
});
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
302
|
+
}
|
|
303
|
+
return defaultClient;
|
|
304
|
+
}
|
|
305
|
+
async function apiFetch(path, init = {}) {
|
|
306
|
+
const state = getRuntimeState();
|
|
307
|
+
if (!state.platform || !state.client) {
|
|
308
|
+
throw new Error("apiFetch called before client runtime was configured. Call ensureWebClientRuntimeConfigured() or use createApiClient().");
|
|
309
|
+
}
|
|
310
|
+
const clientHeaders = {
|
|
311
|
+
[CLIENT_HEADER_NAMES.client]: "web",
|
|
312
|
+
[CLIENT_HEADER_NAMES.clientVersion]: state.client.version,
|
|
313
|
+
[CLIENT_HEADER_NAMES.clientBuild]: state.client.build,
|
|
314
|
+
[CLIENT_HEADER_NAMES.platform]: state.platform.name,
|
|
315
|
+
[CLIENT_HEADER_NAMES.platformVersion]: state.platform.version,
|
|
316
|
+
[AUTH_MODE_HEADER_NAME]: COOKIE_AUTH_MODE,
|
|
317
|
+
...getBrowserEngagementHeaders()
|
|
318
|
+
};
|
|
319
|
+
return await fetch(path, {
|
|
320
|
+
...init,
|
|
321
|
+
...(0, import_request.buildBrowserCredentialsInit)(true),
|
|
322
|
+
headers: {
|
|
323
|
+
"Content-Type": "application/json",
|
|
324
|
+
...clientHeaders,
|
|
325
|
+
...init.headers
|
|
101
326
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
throw error instanceof Error ? error : new Error(String(error));
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
async function attemptMe() {
|
|
330
|
+
try {
|
|
331
|
+
const client = getDefaultClient();
|
|
332
|
+
return await client.me();
|
|
333
|
+
} catch (error) {
|
|
334
|
+
if (error instanceof import_types.UnsupportedClientError) {
|
|
335
|
+
throw error;
|
|
113
336
|
}
|
|
337
|
+
if (error instanceof import_types.ApiError) {
|
|
338
|
+
if (error.status === 401) {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
throw error;
|
|
342
|
+
}
|
|
343
|
+
throw error instanceof Error ? error : new Error(String(error));
|
|
344
|
+
}
|
|
114
345
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
export async function register(username, password, displayName, inviteCode) {
|
|
119
|
-
return await getDefaultClient().register({
|
|
120
|
-
username,
|
|
121
|
-
password,
|
|
122
|
-
displayName,
|
|
123
|
-
...(inviteCode ? { inviteCode } : {}),
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
export async function fetchStarterProfileAssets() {
|
|
127
|
-
return await getDefaultClient().fetchStarterProfileAssets();
|
|
128
|
-
}
|
|
129
|
-
export async function loginWithApiKey(request) {
|
|
130
|
-
return await getDefaultClient().loginWithApiKey(request);
|
|
131
|
-
}
|
|
132
|
-
export async function startCliLogin() {
|
|
133
|
-
return await getDefaultClient().startCliLogin();
|
|
134
|
-
}
|
|
135
|
-
export async function pollCliLogin(request) {
|
|
136
|
-
return await getDefaultClient().pollCliLogin(request);
|
|
137
|
-
}
|
|
138
|
-
export async function fetchCliLoginStatus(requestId) {
|
|
139
|
-
return await getDefaultClient().fetchCliLoginStatus(requestId);
|
|
140
|
-
}
|
|
141
|
-
export async function approveCliLogin(request) {
|
|
142
|
-
return await getDefaultClient().approveCliLogin(request);
|
|
143
|
-
}
|
|
144
|
-
export async function startCliWebLaunch(request) {
|
|
145
|
-
return await getDefaultClient().startCliWebLaunch(request);
|
|
146
|
-
}
|
|
147
|
-
export async function logout() {
|
|
148
|
-
return await getDefaultClient().logout();
|
|
149
|
-
}
|
|
150
|
-
export async function updateProfile(request) {
|
|
151
|
-
return await getDefaultClient().updateProfile(request);
|
|
152
|
-
}
|
|
153
|
-
export async function changePassword(newPassword, currentPassword) {
|
|
154
|
-
const request = {
|
|
155
|
-
newPassword,
|
|
156
|
-
...(currentPassword ? { currentPassword } : {}),
|
|
157
|
-
};
|
|
158
|
-
return await getDefaultClient().changePassword(request);
|
|
159
|
-
}
|
|
160
|
-
export async function exportPrivacyData() {
|
|
161
|
-
return await getDefaultClient().exportPrivacyData();
|
|
162
|
-
}
|
|
163
|
-
export async function deleteAccount(request) {
|
|
164
|
-
return await getDefaultClient().deleteAccount(request);
|
|
165
|
-
}
|
|
166
|
-
export async function upgradeToCreator() {
|
|
167
|
-
return await getDefaultClient().upgradeToCreator();
|
|
168
|
-
}
|
|
169
|
-
export async function unlinkX() {
|
|
170
|
-
return await getDefaultClient().unlinkX();
|
|
171
|
-
}
|
|
172
|
-
export async function unlinkGoogle() {
|
|
173
|
-
return await getDefaultClient().unlinkGoogle();
|
|
174
|
-
}
|
|
175
|
-
export async function unlinkApple() {
|
|
176
|
-
return await getDefaultClient().unlinkApple();
|
|
177
|
-
}
|
|
178
|
-
export async function createAppleOAuthLinkStart(request) {
|
|
179
|
-
return await getDefaultClient().createAppleOAuthLinkStart(request);
|
|
346
|
+
async function login(username, password) {
|
|
347
|
+
return await getDefaultClient().login({ username, password });
|
|
180
348
|
}
|
|
181
|
-
|
|
182
|
-
|
|
349
|
+
async function register(username, password, displayName, inviteCode) {
|
|
350
|
+
return await getDefaultClient().register({
|
|
351
|
+
username,
|
|
352
|
+
password,
|
|
353
|
+
displayName,
|
|
354
|
+
...inviteCode ? { inviteCode } : {}
|
|
355
|
+
});
|
|
183
356
|
}
|
|
184
|
-
|
|
185
|
-
|
|
357
|
+
async function fetchStarterProfileAssets() {
|
|
358
|
+
return await getDefaultClient().fetchStarterProfileAssets();
|
|
186
359
|
}
|
|
187
|
-
|
|
188
|
-
|
|
360
|
+
async function loginWithApiKey(request) {
|
|
361
|
+
return await getDefaultClient().loginWithApiKey(request);
|
|
189
362
|
}
|
|
190
|
-
|
|
191
|
-
|
|
363
|
+
async function startCliLogin() {
|
|
364
|
+
return await getDefaultClient().startCliLogin();
|
|
192
365
|
}
|
|
193
|
-
|
|
194
|
-
|
|
366
|
+
async function pollCliLogin(request) {
|
|
367
|
+
return await getDefaultClient().pollCliLogin(request);
|
|
195
368
|
}
|
|
196
|
-
|
|
197
|
-
|
|
369
|
+
async function fetchCliLoginStatus(requestId) {
|
|
370
|
+
return await getDefaultClient().fetchCliLoginStatus(requestId);
|
|
198
371
|
}
|
|
199
|
-
|
|
200
|
-
|
|
372
|
+
async function approveCliLogin(request) {
|
|
373
|
+
return await getDefaultClient().approveCliLogin(request);
|
|
201
374
|
}
|
|
202
|
-
|
|
203
|
-
|
|
375
|
+
async function startCliWebLaunch(request) {
|
|
376
|
+
return await getDefaultClient().startCliWebLaunch(request);
|
|
204
377
|
}
|
|
205
|
-
|
|
206
|
-
|
|
378
|
+
async function logout() {
|
|
379
|
+
return await getDefaultClient().logout();
|
|
207
380
|
}
|
|
208
|
-
|
|
209
|
-
|
|
381
|
+
async function updateProfile(request) {
|
|
382
|
+
return await getDefaultClient().updateProfile(request);
|
|
210
383
|
}
|
|
211
|
-
|
|
212
|
-
|
|
384
|
+
async function changePassword(newPassword, currentPassword) {
|
|
385
|
+
const request = {
|
|
386
|
+
newPassword,
|
|
387
|
+
...currentPassword ? { currentPassword } : {}
|
|
388
|
+
};
|
|
389
|
+
return await getDefaultClient().changePassword(request);
|
|
213
390
|
}
|
|
214
|
-
|
|
215
|
-
|
|
391
|
+
async function exportPrivacyData() {
|
|
392
|
+
return await getDefaultClient().exportPrivacyData();
|
|
216
393
|
}
|
|
217
|
-
|
|
218
|
-
|
|
394
|
+
async function deleteAccount(request) {
|
|
395
|
+
return await getDefaultClient().deleteAccount(request);
|
|
219
396
|
}
|
|
220
|
-
|
|
221
|
-
|
|
397
|
+
async function upgradeToCreator() {
|
|
398
|
+
return await getDefaultClient().upgradeToCreator();
|
|
222
399
|
}
|
|
223
|
-
|
|
224
|
-
|
|
400
|
+
async function unlinkX() {
|
|
401
|
+
return await getDefaultClient().unlinkX();
|
|
225
402
|
}
|
|
226
|
-
|
|
227
|
-
|
|
403
|
+
async function unlinkGoogle() {
|
|
404
|
+
return await getDefaultClient().unlinkGoogle();
|
|
228
405
|
}
|
|
229
|
-
|
|
230
|
-
|
|
406
|
+
async function unlinkApple() {
|
|
407
|
+
return await getDefaultClient().unlinkApple();
|
|
231
408
|
}
|
|
232
|
-
|
|
233
|
-
|
|
409
|
+
async function createAppleOAuthLinkStart(request) {
|
|
410
|
+
return await getDefaultClient().createAppleOAuthLinkStart(request);
|
|
234
411
|
}
|
|
235
|
-
|
|
236
|
-
|
|
412
|
+
async function createAppleNativeChallenge() {
|
|
413
|
+
return await getDefaultClient().createAppleNativeChallenge();
|
|
237
414
|
}
|
|
238
|
-
|
|
239
|
-
|
|
415
|
+
async function exchangeAppleOAuthHandoff(request) {
|
|
416
|
+
return await getDefaultClient().exchangeAppleOAuthHandoff(request);
|
|
240
417
|
}
|
|
241
|
-
|
|
242
|
-
|
|
418
|
+
async function signInWithApple(request) {
|
|
419
|
+
return await getDefaultClient().signInWithApple(request);
|
|
243
420
|
}
|
|
244
|
-
|
|
245
|
-
|
|
421
|
+
async function linkApple(request) {
|
|
422
|
+
return await getDefaultClient().linkApple(request);
|
|
246
423
|
}
|
|
247
|
-
|
|
248
|
-
|
|
424
|
+
async function signInWithGoogleApple(request) {
|
|
425
|
+
return await getDefaultClient().signInWithGoogleApple(request);
|
|
249
426
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
return response.groups;
|
|
427
|
+
async function linkGoogleApple(request) {
|
|
428
|
+
return await getDefaultClient().linkGoogleApple(request);
|
|
253
429
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
return response.tag;
|
|
430
|
+
async function fetchGooglePendingSignup(token) {
|
|
431
|
+
return await getDefaultClient().fetchGooglePendingSignup(token);
|
|
257
432
|
}
|
|
258
|
-
|
|
259
|
-
|
|
433
|
+
async function fetchApplePendingSignup(token) {
|
|
434
|
+
return await getDefaultClient().fetchApplePendingSignup(token);
|
|
260
435
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return response.apps;
|
|
436
|
+
async function fetchXPendingSignup(token) {
|
|
437
|
+
return await getDefaultClient().fetchXPendingSignup(token);
|
|
264
438
|
}
|
|
265
|
-
|
|
266
|
-
|
|
439
|
+
async function fetchPublicFreeCredits() {
|
|
440
|
+
return await getDefaultClient().fetchPublicFreeCredits();
|
|
267
441
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
return response.apps;
|
|
442
|
+
async function fetchFreeCredits() {
|
|
443
|
+
return await getDefaultClient().fetchFreeCredits();
|
|
271
444
|
}
|
|
272
|
-
|
|
273
|
-
|
|
445
|
+
async function claimFreeCreditReward(rewardId) {
|
|
446
|
+
return await getDefaultClient().claimFreeCreditReward(rewardId);
|
|
274
447
|
}
|
|
275
|
-
|
|
276
|
-
|
|
448
|
+
async function fetchInvitePreview(inviteCode) {
|
|
449
|
+
return await getDefaultClient().fetchInvitePreview(inviteCode);
|
|
277
450
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
return response.apps;
|
|
451
|
+
async function fetchMyInviteCode() {
|
|
452
|
+
return await getDefaultClient().fetchMyInviteCode();
|
|
281
453
|
}
|
|
282
|
-
|
|
283
|
-
|
|
454
|
+
async function submitMyInviteCode(inviteCode) {
|
|
455
|
+
return await getDefaultClient().submitMyInviteCode(inviteCode);
|
|
284
456
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
return response.apps;
|
|
457
|
+
async function checkUsernameAvailable(username) {
|
|
458
|
+
return await getDefaultClient().checkUsernameAvailable(username);
|
|
288
459
|
}
|
|
289
|
-
|
|
290
|
-
|
|
460
|
+
async function completeGoogleSignup(request) {
|
|
461
|
+
return await getDefaultClient().completeGoogleSignup(request);
|
|
291
462
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
return response.user;
|
|
463
|
+
async function completeXSignup(request) {
|
|
464
|
+
return await getDefaultClient().completeXSignup(request);
|
|
295
465
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
return response.user;
|
|
466
|
+
async function completeAppleSignup(request) {
|
|
467
|
+
return await getDefaultClient().completeAppleSignup(request);
|
|
299
468
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
return response.app;
|
|
469
|
+
async function exchangeGoogleOneTapCredential(request) {
|
|
470
|
+
return await getDefaultClient().exchangeGoogleOneTapCredential(request);
|
|
303
471
|
}
|
|
304
|
-
|
|
305
|
-
|
|
472
|
+
async function fetchCliApiKeyStatus() {
|
|
473
|
+
return await getDefaultClient().fetchCliApiKeyStatus();
|
|
306
474
|
}
|
|
307
|
-
|
|
308
|
-
|
|
475
|
+
async function createCliApiKey() {
|
|
476
|
+
return await getDefaultClient().createCliApiKey();
|
|
309
477
|
}
|
|
310
|
-
|
|
311
|
-
|
|
478
|
+
async function fetchTagDirectory(options) {
|
|
479
|
+
return await getDefaultClient().fetchTagDirectory(options);
|
|
312
480
|
}
|
|
313
|
-
|
|
314
|
-
|
|
481
|
+
async function fetchTags(options) {
|
|
482
|
+
const response = await getDefaultClient().fetchTags(options);
|
|
483
|
+
return response.groups;
|
|
315
484
|
}
|
|
316
|
-
|
|
317
|
-
|
|
485
|
+
async function fetchTag(groupSlug, tagSlug) {
|
|
486
|
+
const response = await getDefaultClient().fetchTag(groupSlug, tagSlug);
|
|
487
|
+
return response.tag;
|
|
318
488
|
}
|
|
319
|
-
|
|
320
|
-
|
|
489
|
+
async function fetchTagGroup(groupSlug, options = {}) {
|
|
490
|
+
return await getDefaultClient().fetchTagGroup(groupSlug, options);
|
|
321
491
|
}
|
|
322
|
-
|
|
323
|
-
|
|
492
|
+
async function fetchApps(options = {}) {
|
|
493
|
+
const response = await getDefaultClient().fetchApps(options);
|
|
494
|
+
return response.apps;
|
|
324
495
|
}
|
|
325
|
-
|
|
326
|
-
|
|
496
|
+
async function fetchAppsPage(options = {}) {
|
|
497
|
+
return await getDefaultClient().fetchApps(options);
|
|
327
498
|
}
|
|
328
|
-
|
|
329
|
-
|
|
499
|
+
async function fetchAppsByType(type, options = {}) {
|
|
500
|
+
const response = await getDefaultClient().fetchAppsByType(type, options);
|
|
501
|
+
return response.apps;
|
|
330
502
|
}
|
|
331
|
-
|
|
332
|
-
|
|
503
|
+
async function fetchAppsByTypePage(type, options = {}) {
|
|
504
|
+
return await getDefaultClient().fetchAppsByType(type, options);
|
|
333
505
|
}
|
|
334
|
-
|
|
335
|
-
|
|
506
|
+
async function fetchHomeGamesCollectionPage(collectionId, options = {}) {
|
|
507
|
+
return await getDefaultClient().fetchHomeGamesCollectionPage(collectionId, options);
|
|
336
508
|
}
|
|
337
|
-
|
|
338
|
-
|
|
509
|
+
async function fetchAppsByCreator(creatorUsername, options = {}) {
|
|
510
|
+
const response = await getDefaultClient().fetchAppsByCreator(creatorUsername, options);
|
|
511
|
+
return response.apps;
|
|
339
512
|
}
|
|
340
|
-
|
|
341
|
-
|
|
513
|
+
async function fetchAppsByCreatorPage(creatorUsername, options = {}) {
|
|
514
|
+
return await getDefaultClient().fetchAppsByCreator(creatorUsername, options);
|
|
342
515
|
}
|
|
343
|
-
|
|
344
|
-
|
|
516
|
+
async function fetchMyApps(options = {}) {
|
|
517
|
+
const response = await getDefaultClient().fetchMyApps(options);
|
|
518
|
+
return response.apps;
|
|
345
519
|
}
|
|
346
|
-
|
|
347
|
-
|
|
520
|
+
async function fetchMyAppsPage(options = {}) {
|
|
521
|
+
return await getDefaultClient().fetchMyApps(options);
|
|
348
522
|
}
|
|
349
|
-
|
|
350
|
-
|
|
523
|
+
async function fetchUserById(userId) {
|
|
524
|
+
const response = await getDefaultClient().fetchUserById(userId);
|
|
525
|
+
return response.user;
|
|
351
526
|
}
|
|
352
|
-
|
|
353
|
-
|
|
527
|
+
async function fetchUserByUsername(username) {
|
|
528
|
+
const response = await getDefaultClient().fetchUserByUsername(username);
|
|
529
|
+
return response.user;
|
|
354
530
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
531
|
+
async function fetchAppBySlug(creatorUsername, appName, options = {}) {
|
|
532
|
+
const response = await getDefaultClient().fetchAppBySlug(creatorUsername, appName, options);
|
|
533
|
+
return response.app;
|
|
358
534
|
}
|
|
359
|
-
|
|
360
|
-
|
|
535
|
+
async function fetchAppRelated(creatorUsername, appName) {
|
|
536
|
+
return await getDefaultClient().fetchAppRelated(creatorUsername, appName);
|
|
361
537
|
}
|
|
362
|
-
|
|
363
|
-
|
|
538
|
+
async function fetchAppMoreCollections(creatorUsername, appName, options = {}) {
|
|
539
|
+
return await getDefaultClient().fetchAppMoreCollections(creatorUsername, appName, options);
|
|
364
540
|
}
|
|
365
|
-
|
|
366
|
-
|
|
541
|
+
async function fetchAppMoreCollectionPage(creatorUsername, appName, collectionKey, options = {}) {
|
|
542
|
+
return await getDefaultClient().fetchAppMoreCollectionPage(creatorUsername, appName, collectionKey, options);
|
|
367
543
|
}
|
|
368
|
-
|
|
369
|
-
|
|
544
|
+
async function requestAppAccessToken(appId) {
|
|
545
|
+
return await getDefaultClient().requestAppAccessToken(appId);
|
|
370
546
|
}
|
|
371
|
-
|
|
372
|
-
|
|
547
|
+
async function requestDevAppAccessToken(appId, slot) {
|
|
548
|
+
return await getDefaultClient().requestDevAppAccessToken(appId, slot);
|
|
373
549
|
}
|
|
374
|
-
|
|
375
|
-
|
|
550
|
+
async function resetDevPlayer(appId, slot) {
|
|
551
|
+
return await getDefaultClient().resetDevPlayer(appId, slot);
|
|
376
552
|
}
|
|
377
|
-
|
|
378
|
-
|
|
553
|
+
async function resetAllDevPlayers(appId) {
|
|
554
|
+
return await getDefaultClient().resetAllDevPlayers(appId);
|
|
379
555
|
}
|
|
380
|
-
|
|
381
|
-
|
|
556
|
+
async function sendAppLog(appId, entry) {
|
|
557
|
+
return await getDefaultClient().sendAppLog(appId, entry);
|
|
382
558
|
}
|
|
383
|
-
|
|
384
|
-
|
|
559
|
+
async function listAchievements(appId, options = {}) {
|
|
560
|
+
return await getDefaultClient().listAchievements(appId, options);
|
|
385
561
|
}
|
|
386
|
-
|
|
387
|
-
|
|
562
|
+
async function getAchievement(appId, key, options = {}) {
|
|
563
|
+
return await getDefaultClient().getAchievement(appId, key, options);
|
|
388
564
|
}
|
|
389
|
-
|
|
390
|
-
|
|
565
|
+
async function unlockAchievement(appId, key) {
|
|
566
|
+
return await getDefaultClient().unlockAchievement(appId, key);
|
|
391
567
|
}
|
|
392
|
-
|
|
393
|
-
|
|
568
|
+
async function setAchievementProgressAtLeast(appId, key, progress) {
|
|
569
|
+
return await getDefaultClient().setAchievementProgressAtLeast(appId, key, { progress });
|
|
394
570
|
}
|
|
395
|
-
|
|
396
|
-
|
|
571
|
+
async function listLeaderboards(appId, options = {}) {
|
|
572
|
+
return await getDefaultClient().listLeaderboards(appId, options);
|
|
397
573
|
}
|
|
398
|
-
|
|
399
|
-
|
|
574
|
+
async function getLeaderboard(appId, key, options = {}) {
|
|
575
|
+
return await getDefaultClient().getLeaderboard(appId, key, options);
|
|
400
576
|
}
|
|
401
|
-
|
|
402
|
-
|
|
577
|
+
async function submitLeaderboardScore(appId, key, score) {
|
|
578
|
+
return await getDefaultClient().submitLeaderboardScore(appId, key, { score });
|
|
403
579
|
}
|
|
404
|
-
|
|
405
|
-
|
|
580
|
+
async function fetchMyAchievements() {
|
|
581
|
+
return await getDefaultClient().fetchMyAchievements();
|
|
406
582
|
}
|
|
407
|
-
|
|
408
|
-
|
|
583
|
+
async function fetchMyLeaderboards() {
|
|
584
|
+
return await getDefaultClient().fetchMyLeaderboards();
|
|
409
585
|
}
|
|
410
|
-
|
|
411
|
-
|
|
586
|
+
async function fetchOwnedProfileAssets() {
|
|
587
|
+
const response = await getDefaultClient().fetchOwnedProfileAssets();
|
|
588
|
+
return response.assets;
|
|
412
589
|
}
|
|
413
|
-
|
|
414
|
-
|
|
590
|
+
async function saveItem(kind, creatorUsername, itemName) {
|
|
591
|
+
return await getDefaultClient().saveItem(kind, creatorUsername, itemName);
|
|
415
592
|
}
|
|
416
|
-
|
|
417
|
-
|
|
593
|
+
async function unsaveItem(kind, creatorUsername, itemName) {
|
|
594
|
+
return await getDefaultClient().unsaveItem(kind, creatorUsername, itemName);
|
|
418
595
|
}
|
|
419
|
-
|
|
420
|
-
|
|
596
|
+
async function likeItem(kind, creatorUsername, itemName) {
|
|
597
|
+
return await getDefaultClient().likeItem(kind, creatorUsername, itemName);
|
|
421
598
|
}
|
|
422
|
-
|
|
423
|
-
|
|
599
|
+
async function unlikeItem(kind, creatorUsername, itemName) {
|
|
600
|
+
return await getDefaultClient().unlikeItem(kind, creatorUsername, itemName);
|
|
424
601
|
}
|
|
425
|
-
|
|
426
|
-
|
|
602
|
+
async function dislikeItem(kind, creatorUsername, itemName) {
|
|
603
|
+
return await getDefaultClient().dislikeItem(kind, creatorUsername, itemName);
|
|
427
604
|
}
|
|
428
|
-
|
|
429
|
-
|
|
605
|
+
async function undislikeItem(kind, creatorUsername, itemName) {
|
|
606
|
+
return await getDefaultClient().undislikeItem(kind, creatorUsername, itemName);
|
|
430
607
|
}
|
|
431
|
-
|
|
432
|
-
|
|
608
|
+
async function reportContent(kind, creatorUsername, itemName, request) {
|
|
609
|
+
return await getDefaultClient().reportContent(kind, creatorUsername, itemName, request);
|
|
433
610
|
}
|
|
434
|
-
|
|
435
|
-
|
|
611
|
+
async function fetchContentComments(kind, creatorUsername, itemName) {
|
|
612
|
+
return await getDefaultClient().fetchContentComments(kind, creatorUsername, itemName);
|
|
436
613
|
}
|
|
437
|
-
|
|
438
|
-
|
|
614
|
+
async function createContentComment(kind, creatorUsername, itemName, request) {
|
|
615
|
+
return await getDefaultClient().createContentComment(kind, creatorUsername, itemName, request);
|
|
439
616
|
}
|
|
440
|
-
|
|
441
|
-
|
|
617
|
+
async function likeContentComment(commentId) {
|
|
618
|
+
return await getDefaultClient().likeContentComment(commentId);
|
|
442
619
|
}
|
|
443
|
-
|
|
444
|
-
|
|
620
|
+
async function unlikeContentComment(commentId) {
|
|
621
|
+
return await getDefaultClient().unlikeContentComment(commentId);
|
|
445
622
|
}
|
|
446
|
-
|
|
447
|
-
|
|
623
|
+
async function dislikeContentComment(commentId) {
|
|
624
|
+
return await getDefaultClient().dislikeContentComment(commentId);
|
|
448
625
|
}
|
|
449
|
-
|
|
450
|
-
|
|
626
|
+
async function undislikeContentComment(commentId) {
|
|
627
|
+
return await getDefaultClient().undislikeContentComment(commentId);
|
|
451
628
|
}
|
|
452
|
-
|
|
453
|
-
|
|
629
|
+
async function reportComment(commentId, request) {
|
|
630
|
+
return await getDefaultClient().reportComment(commentId, request);
|
|
454
631
|
}
|
|
455
|
-
|
|
456
|
-
|
|
632
|
+
async function deleteContentComment(commentId) {
|
|
633
|
+
return await getDefaultClient().deleteContentComment(commentId);
|
|
457
634
|
}
|
|
458
|
-
|
|
459
|
-
|
|
635
|
+
async function trackEngagementEvent(request) {
|
|
636
|
+
return await getDefaultClient().trackEngagementEvent(request);
|
|
460
637
|
}
|
|
461
|
-
|
|
462
|
-
|
|
638
|
+
async function fetchLibrary(options = {}) {
|
|
639
|
+
return await getDefaultClient().fetchLibrary(options);
|
|
463
640
|
}
|
|
464
|
-
|
|
465
|
-
|
|
641
|
+
async function followCreator(creatorUsername) {
|
|
642
|
+
return await getDefaultClient().followCreator(creatorUsername);
|
|
466
643
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
return await getDefaultClient().setSelectedProfileAsset(request);
|
|
644
|
+
async function unfollowCreator(creatorUsername) {
|
|
645
|
+
return await getDefaultClient().unfollowCreator(creatorUsername);
|
|
470
646
|
}
|
|
471
|
-
|
|
472
|
-
|
|
647
|
+
async function reportCreator(creatorUsername, request) {
|
|
648
|
+
return await getDefaultClient().reportCreator(creatorUsername, request);
|
|
473
649
|
}
|
|
474
|
-
|
|
475
|
-
|
|
650
|
+
async function blockCreator(creatorUsername) {
|
|
651
|
+
return await getDefaultClient().blockCreator(creatorUsername);
|
|
476
652
|
}
|
|
477
|
-
|
|
478
|
-
|
|
653
|
+
async function unblockCreator(creatorUsername) {
|
|
654
|
+
return await getDefaultClient().unblockCreator(creatorUsername);
|
|
479
655
|
}
|
|
480
|
-
|
|
481
|
-
|
|
656
|
+
async function fetchFollowingCreators(options = {}) {
|
|
657
|
+
return await getDefaultClient().fetchFollowingCreators(options);
|
|
482
658
|
}
|
|
483
|
-
|
|
484
|
-
|
|
659
|
+
async function fetchFollowingFeed(options) {
|
|
660
|
+
return await getDefaultClient().fetchFollowingFeed(options);
|
|
485
661
|
}
|
|
486
|
-
|
|
487
|
-
|
|
662
|
+
async function fetchNotifications(options = {}) {
|
|
663
|
+
return await getDefaultClient().fetchNotifications(options);
|
|
488
664
|
}
|
|
489
|
-
|
|
490
|
-
|
|
665
|
+
async function markNotificationRead(notificationId) {
|
|
666
|
+
return await getDefaultClient().markNotificationRead(notificationId);
|
|
491
667
|
}
|
|
492
|
-
|
|
493
|
-
|
|
668
|
+
async function markAllNotificationsRead() {
|
|
669
|
+
return await getDefaultClient().markAllNotificationsRead();
|
|
494
670
|
}
|
|
495
|
-
|
|
496
|
-
|
|
671
|
+
async function fetchWebPushConfig() {
|
|
672
|
+
return await getDefaultClient().fetchWebPushConfig();
|
|
497
673
|
}
|
|
498
|
-
|
|
499
|
-
|
|
674
|
+
async function fetchWebPushSubscriptionStatus(request) {
|
|
675
|
+
return await getDefaultClient().fetchWebPushSubscriptionStatus(request);
|
|
500
676
|
}
|
|
501
|
-
|
|
502
|
-
|
|
677
|
+
async function upsertWebPushSubscription(request) {
|
|
678
|
+
return await getDefaultClient().upsertWebPushSubscription(request);
|
|
503
679
|
}
|
|
504
|
-
|
|
505
|
-
|
|
680
|
+
async function deleteWebPushSubscription(request) {
|
|
681
|
+
return await getDefaultClient().deleteWebPushSubscription(request);
|
|
506
682
|
}
|
|
507
|
-
|
|
508
|
-
|
|
683
|
+
async function fetchApplePushDeviceStatus(request) {
|
|
684
|
+
return await getDefaultClient().fetchApplePushDeviceStatus(request);
|
|
509
685
|
}
|
|
510
|
-
|
|
511
|
-
|
|
686
|
+
async function upsertApplePushDevice(request) {
|
|
687
|
+
return await getDefaultClient().upsertApplePushDevice(request);
|
|
512
688
|
}
|
|
513
|
-
|
|
514
|
-
|
|
689
|
+
async function deleteApplePushDevice(request) {
|
|
690
|
+
return await getDefaultClient().deleteApplePushDevice(request);
|
|
515
691
|
}
|
|
516
|
-
|
|
517
|
-
|
|
692
|
+
async function search(request) {
|
|
693
|
+
return await getDefaultClient().search(request);
|
|
518
694
|
}
|
|
519
|
-
|
|
520
|
-
|
|
695
|
+
async function suggestSearch(request) {
|
|
696
|
+
return await getDefaultClient().suggestSearch(request);
|
|
521
697
|
}
|
|
522
|
-
|
|
523
|
-
|
|
698
|
+
async function setSelectedProfileAsset(assetRef) {
|
|
699
|
+
const request = { assetRef };
|
|
700
|
+
return await getDefaultClient().setSelectedProfileAsset(request);
|
|
524
701
|
}
|
|
525
|
-
|
|
526
|
-
|
|
702
|
+
async function fetchHome(options) {
|
|
703
|
+
return await getDefaultClient().fetchHome(options);
|
|
527
704
|
}
|
|
528
|
-
|
|
529
|
-
|
|
705
|
+
async function fetchShop() {
|
|
706
|
+
return await getDefaultClient().fetchCreditShop();
|
|
530
707
|
}
|
|
531
|
-
|
|
532
|
-
|
|
708
|
+
async function fetchPublicShop() {
|
|
709
|
+
return await getDefaultClient().fetchPublicCreditShop();
|
|
533
710
|
}
|
|
534
|
-
|
|
535
|
-
|
|
711
|
+
async function createCreditPackCheckoutSession(sku, request) {
|
|
712
|
+
return await getDefaultClient().createCreditPackCheckoutSession(sku, request);
|
|
536
713
|
}
|
|
537
|
-
|
|
538
|
-
|
|
714
|
+
async function fetchCreditPackCheckoutStatus(sessionId) {
|
|
715
|
+
return await getDefaultClient().fetchCreditPackCheckoutStatus(sessionId);
|
|
539
716
|
}
|
|
540
|
-
|
|
541
|
-
|
|
717
|
+
async function purchaseAsset(assetRef) {
|
|
718
|
+
return await getDefaultClient().purchaseAsset({ type: "asset", assetRef });
|
|
542
719
|
}
|
|
543
|
-
|
|
544
|
-
|
|
720
|
+
async function purchaseIap(request) {
|
|
721
|
+
return await getDefaultClient().purchaseIap(request);
|
|
545
722
|
}
|
|
546
|
-
|
|
547
|
-
|
|
723
|
+
async function purchaseDevIap(appId, slot, request) {
|
|
724
|
+
return await getDefaultClient().purchaseDevIap(appId, slot, request);
|
|
548
725
|
}
|
|
549
|
-
|
|
550
|
-
|
|
726
|
+
async function fetchIapReceipts(params) {
|
|
727
|
+
return await getDefaultClient().fetchIapReceipts(params);
|
|
551
728
|
}
|
|
552
|
-
|
|
553
|
-
|
|
729
|
+
async function cancelIapReceipt(receiptId) {
|
|
730
|
+
return await getDefaultClient().cancelIapReceipt(receiptId);
|
|
554
731
|
}
|
|
555
|
-
|
|
556
|
-
|
|
732
|
+
async function fetchAppIapReceipts(params) {
|
|
733
|
+
return await getDefaultClient().fetchAppIapReceipts(params);
|
|
557
734
|
}
|
|
558
|
-
|
|
559
|
-
|
|
735
|
+
async function consumeAppIapReceipt(receiptId) {
|
|
736
|
+
return await getDefaultClient().consumeAppIapReceipt(receiptId);
|
|
560
737
|
}
|
|
561
|
-
|
|
562
|
-
|
|
738
|
+
async function grantAppIapReceipt(receiptId) {
|
|
739
|
+
return await getDefaultClient().grantAppIapReceipt(receiptId);
|
|
563
740
|
}
|
|
564
|
-
|
|
565
|
-
|
|
741
|
+
async function cancelAppIapReceipt(receiptId) {
|
|
742
|
+
return await getDefaultClient().cancelAppIapReceipt(receiptId);
|
|
566
743
|
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
return response.categories;
|
|
744
|
+
async function fetchCreditTransactions(options) {
|
|
745
|
+
return await getDefaultClient().fetchCreditTransactions(options);
|
|
570
746
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
return response.assets;
|
|
747
|
+
async function fetchBoostBalance() {
|
|
748
|
+
return await getDefaultClient().fetchBoostBalance();
|
|
574
749
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
return response.asset;
|
|
750
|
+
async function purchaseBoostPack(request) {
|
|
751
|
+
return await getDefaultClient().purchaseBoostPack(request);
|
|
578
752
|
}
|
|
579
|
-
|
|
580
|
-
|
|
753
|
+
async function activateAppBoost(appId, units = 1) {
|
|
754
|
+
return await getDefaultClient().activateAppBoost(appId, { units });
|
|
581
755
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
return response.versions;
|
|
756
|
+
async function fetchAppBoostStatus(appId) {
|
|
757
|
+
return await getDefaultClient().fetchAppBoostStatus(appId);
|
|
585
758
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
return response.assets;
|
|
759
|
+
async function fetchAppBoostHistory(appId, options) {
|
|
760
|
+
return await getDefaultClient().fetchAppBoostHistory(appId, options);
|
|
589
761
|
}
|
|
590
|
-
|
|
591
|
-
|
|
762
|
+
async function fetchAppBoostReport(appId, options) {
|
|
763
|
+
return await getDefaultClient().fetchAppBoostReport(appId, options);
|
|
592
764
|
}
|
|
593
|
-
|
|
594
|
-
|
|
765
|
+
async function fetchCreatorEarnings(options) {
|
|
766
|
+
return await getDefaultClient().fetchCreatorEarnings(options);
|
|
595
767
|
}
|
|
596
|
-
|
|
597
|
-
|
|
768
|
+
async function loadInterstitialAd(sourceAppId, viewerSurface) {
|
|
769
|
+
return await getDefaultClient().loadInterstitialAd({ sourceAppId, viewerSurface });
|
|
598
770
|
}
|
|
599
|
-
|
|
600
|
-
|
|
771
|
+
async function showInterstitialAd(reservationId, viewedMs) {
|
|
772
|
+
return await getDefaultClient().showInterstitialAd({ reservationId, viewedMs });
|
|
601
773
|
}
|
|
602
|
-
|
|
603
|
-
|
|
774
|
+
async function loadDevInterstitialAd(appId, slot, viewerSurface) {
|
|
775
|
+
return await getDefaultClient().loadDevInterstitialAd(appId, slot, { viewerSurface });
|
|
604
776
|
}
|
|
605
|
-
|
|
606
|
-
|
|
777
|
+
async function showDevInterstitialAd(appId, slot, reservationId, viewedMs) {
|
|
778
|
+
return await getDefaultClient().showDevInterstitialAd(appId, slot, { reservationId, viewedMs });
|
|
607
779
|
}
|
|
608
|
-
|
|
609
|
-
|
|
780
|
+
async function loadRewardedAd(sourceAppId, viewerSurface) {
|
|
781
|
+
return await getDefaultClient().loadRewardedAd({ sourceAppId, viewerSurface });
|
|
610
782
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
return response.packs;
|
|
783
|
+
async function showRewardedAd(reservationId, viewedMs) {
|
|
784
|
+
return await getDefaultClient().showRewardedAd({ reservationId, viewedMs });
|
|
614
785
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
return response.pack;
|
|
786
|
+
async function loadDevRewardedAd(appId, slot, viewerSurface) {
|
|
787
|
+
return await getDefaultClient().loadDevRewardedAd(appId, slot, { viewerSurface });
|
|
618
788
|
}
|
|
619
|
-
|
|
620
|
-
|
|
789
|
+
async function showDevRewardedAd(appId, slot, reservationId, viewedMs) {
|
|
790
|
+
return await getDefaultClient().showDevRewardedAd(appId, slot, { reservationId, viewedMs });
|
|
621
791
|
}
|
|
622
|
-
|
|
623
|
-
|
|
792
|
+
async function fetchAiGeneration(id) {
|
|
793
|
+
return await getDefaultClient().fetchAiGeneration(id);
|
|
624
794
|
}
|
|
625
|
-
|
|
626
|
-
|
|
795
|
+
async function fetchAdminAiGeneration(id) {
|
|
796
|
+
return await getDefaultClient().fetchAdminAiGeneration(id);
|
|
627
797
|
}
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
798
|
+
async function listAssetCategories() {
|
|
799
|
+
const response = await getDefaultClient().listAssetCategories();
|
|
800
|
+
return response.categories;
|
|
631
801
|
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
802
|
+
async function listAssets(options = {}) {
|
|
803
|
+
const response = await getDefaultClient().listAssets(options);
|
|
804
|
+
return response.assets;
|
|
635
805
|
}
|
|
636
|
-
|
|
637
|
-
|
|
806
|
+
async function fetchAssetBySlug(creatorUsername, assetName) {
|
|
807
|
+
const response = await getDefaultClient().fetchAssetBySlug(creatorUsername, assetName);
|
|
808
|
+
return response.asset;
|
|
638
809
|
}
|
|
639
|
-
|
|
640
|
-
|
|
810
|
+
async function fetchAssetRelated(creatorUsername, assetName) {
|
|
811
|
+
return await getDefaultClient().fetchAssetRelated(creatorUsername, assetName);
|
|
641
812
|
}
|
|
642
|
-
|
|
643
|
-
|
|
813
|
+
async function listAssetVersions(creatorUsername, assetName, options = {}) {
|
|
814
|
+
const response = await getDefaultClient().listAssetVersions(creatorUsername, assetName, options);
|
|
815
|
+
return response.versions;
|
|
644
816
|
}
|
|
645
|
-
|
|
646
|
-
|
|
817
|
+
async function listAssetsForCreator(creatorUsername, options = {}) {
|
|
818
|
+
const response = await getDefaultClient().listAssetsForCreator(creatorUsername, options);
|
|
819
|
+
return response.assets;
|
|
647
820
|
}
|
|
648
|
-
|
|
649
|
-
|
|
821
|
+
async function listAssetsForCreatorPage(creatorUsername, options = {}) {
|
|
822
|
+
return await getDefaultClient().listAssetsForCreator(creatorUsername, options);
|
|
650
823
|
}
|
|
651
|
-
|
|
652
|
-
|
|
824
|
+
async function updateAsset(creatorUsername, name, request) {
|
|
825
|
+
return await getDefaultClient().updateAsset(creatorUsername, name, request);
|
|
653
826
|
}
|
|
654
|
-
|
|
655
|
-
|
|
827
|
+
async function updateAssetVersion(creatorUsername, name, revision, request) {
|
|
828
|
+
return await getDefaultClient().updateAssetVersion(creatorUsername, name, revision, request);
|
|
656
829
|
}
|
|
657
|
-
|
|
658
|
-
|
|
830
|
+
async function deleteAssetVersion(creatorUsername, name, revision) {
|
|
831
|
+
return await getDefaultClient().deleteAssetVersion(creatorUsername, name, revision);
|
|
659
832
|
}
|
|
660
|
-
|
|
661
|
-
|
|
833
|
+
async function deleteAsset(creatorUsername, name) {
|
|
834
|
+
return await getDefaultClient().deleteAsset(creatorUsername, name);
|
|
662
835
|
}
|
|
663
|
-
|
|
664
|
-
|
|
836
|
+
async function downloadAssetFile(creatorUsername, assetName, revision, options = {}) {
|
|
837
|
+
return await getDefaultClient().downloadAssetFile(creatorUsername, assetName, revision, options);
|
|
665
838
|
}
|
|
666
|
-
|
|
667
|
-
|
|
839
|
+
async function downloadAssetSource(creatorUsername, assetName, revision) {
|
|
840
|
+
return await getDefaultClient().downloadAssetSource(creatorUsername, assetName, revision);
|
|
668
841
|
}
|
|
669
|
-
|
|
670
|
-
|
|
842
|
+
async function listAssetPacks(options = {}) {
|
|
843
|
+
const response = await getDefaultClient().listAssetPacks(options);
|
|
844
|
+
return response.packs;
|
|
671
845
|
}
|
|
672
|
-
|
|
673
|
-
|
|
846
|
+
async function fetchAssetPackBySlug(creatorUsername, packName) {
|
|
847
|
+
const response = await getDefaultClient().fetchAssetPackBySlug(creatorUsername, packName);
|
|
848
|
+
return response.pack;
|
|
674
849
|
}
|
|
675
|
-
|
|
676
|
-
|
|
850
|
+
async function fetchAssetPackRelated(creatorUsername, packName) {
|
|
851
|
+
return await getDefaultClient().fetchAssetPackRelated(creatorUsername, packName);
|
|
677
852
|
}
|
|
678
|
-
|
|
679
|
-
|
|
853
|
+
async function downloadAssetPackSource(creatorUsername, packName, version) {
|
|
854
|
+
return await getDefaultClient().downloadAssetPackSource(creatorUsername, packName, version);
|
|
680
855
|
}
|
|
681
|
-
|
|
682
|
-
|
|
856
|
+
async function downloadAssetPack(creatorUsername, packName, version) {
|
|
857
|
+
return await getDefaultClient().downloadAssetPack(creatorUsername, packName, version);
|
|
683
858
|
}
|
|
684
|
-
|
|
685
|
-
|
|
859
|
+
async function listAssetPackVersions(creatorUsername, packName, options = {}) {
|
|
860
|
+
const response = await getDefaultClient().listAssetPackVersions(creatorUsername, packName, options);
|
|
861
|
+
return response.versions;
|
|
686
862
|
}
|
|
687
|
-
|
|
688
|
-
|
|
863
|
+
async function listAssetPacksForCreator(creatorUsername, options = {}) {
|
|
864
|
+
const response = await getDefaultClient().listAssetPacksForCreator(creatorUsername, options);
|
|
865
|
+
return response.packs;
|
|
689
866
|
}
|
|
690
|
-
|
|
691
|
-
|
|
867
|
+
async function listAssetPacksForCreatorPage(creatorUsername, options = {}) {
|
|
868
|
+
return await getDefaultClient().listAssetPacksForCreator(creatorUsername, options);
|
|
692
869
|
}
|
|
693
|
-
|
|
694
|
-
|
|
870
|
+
async function updateAssetPack(creatorUsername, name, request) {
|
|
871
|
+
return await getDefaultClient().updateAssetPack(creatorUsername, name, request);
|
|
695
872
|
}
|
|
696
|
-
|
|
697
|
-
|
|
873
|
+
async function updateAssetPackVersion(creatorUsername, name, version, request) {
|
|
874
|
+
return await getDefaultClient().updateAssetPackVersion(creatorUsername, name, version, request);
|
|
698
875
|
}
|
|
699
|
-
|
|
700
|
-
|
|
876
|
+
async function deleteAssetPackVersion(creatorUsername, name, version) {
|
|
877
|
+
return await getDefaultClient().deleteAssetPackVersion(creatorUsername, name, version);
|
|
701
878
|
}
|
|
702
|
-
|
|
703
|
-
|
|
879
|
+
async function deleteAssetPack(creatorUsername, name) {
|
|
880
|
+
return await getDefaultClient().deleteAssetPack(creatorUsername, name);
|
|
704
881
|
}
|
|
705
|
-
|
|
706
|
-
|
|
882
|
+
async function getAppVersion(creatorUsername, appName, version) {
|
|
883
|
+
return await getDefaultClient().getAppVersion(creatorUsername, appName, version);
|
|
707
884
|
}
|
|
708
|
-
|
|
709
|
-
|
|
885
|
+
async function fetchAppRuntimeAssets(creatorUsername, appName, version) {
|
|
886
|
+
return await getDefaultClient().fetchAppRuntimeAssets(creatorUsername, appName, version);
|
|
710
887
|
}
|
|
711
|
-
|
|
712
|
-
|
|
888
|
+
async function listAppVersions(creatorUsername, appName) {
|
|
889
|
+
return await getDefaultClient().listAppVersions(creatorUsername, appName);
|
|
713
890
|
}
|
|
714
|
-
|
|
715
|
-
|
|
891
|
+
async function updateAppVersion(creatorUsername, appName, version, updates) {
|
|
892
|
+
return await getDefaultClient().updateAppVersion(creatorUsername, appName, version, updates);
|
|
716
893
|
}
|
|
717
|
-
|
|
718
|
-
|
|
894
|
+
async function deleteAppVersion(creatorUsername, appName, version) {
|
|
895
|
+
return await getDefaultClient().deleteAppVersion(creatorUsername, appName, version);
|
|
719
896
|
}
|
|
720
|
-
|
|
721
|
-
|
|
897
|
+
async function deleteApp(creatorUsername, appName) {
|
|
898
|
+
return await getDefaultClient().deleteApp(creatorUsername, appName);
|
|
722
899
|
}
|
|
723
|
-
|
|
724
|
-
|
|
900
|
+
async function fetchAdminApps() {
|
|
901
|
+
return await getDefaultClient().fetchAdminApps();
|
|
725
902
|
}
|
|
726
|
-
|
|
727
|
-
|
|
903
|
+
async function fetchAdminGameCollections() {
|
|
904
|
+
return await getDefaultClient().fetchAdminGameCollections();
|
|
728
905
|
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
name: config.platform.name.trim().toLowerCase(),
|
|
732
|
-
version: config.platform.version.trim(),
|
|
733
|
-
};
|
|
734
|
-
runtimeState.client = {
|
|
735
|
-
version: config.client.version.trim(),
|
|
736
|
-
build: config.client.build.trim(),
|
|
737
|
-
};
|
|
906
|
+
async function createAdminGameCollection(request) {
|
|
907
|
+
return await getDefaultClient().createAdminGameCollection(request);
|
|
738
908
|
}
|
|
739
|
-
|
|
740
|
-
|
|
909
|
+
async function fetchAdminGameCollection(id) {
|
|
910
|
+
return await getDefaultClient().fetchAdminGameCollection(id);
|
|
741
911
|
}
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
if (!client) {
|
|
745
|
-
return '0.0.0 (build 0)';
|
|
746
|
-
}
|
|
747
|
-
return `${client.version} (build ${client.build})`;
|
|
912
|
+
async function updateAdminGameCollection(id, request) {
|
|
913
|
+
return await getDefaultClient().updateAdminGameCollection(id, request);
|
|
748
914
|
}
|
|
749
|
-
|
|
750
|
-
|
|
915
|
+
async function replaceAdminGameCollectionGames(id, request) {
|
|
916
|
+
return await getDefaultClient().replaceAdminGameCollectionGames(id, request);
|
|
917
|
+
}
|
|
918
|
+
async function searchAdminGameCollectionCandidates(options) {
|
|
919
|
+
return await getDefaultClient().searchAdminGameCollectionCandidates(options);
|
|
920
|
+
}
|
|
921
|
+
async function uploadAdminGameCollectionIcon(id, formData) {
|
|
922
|
+
return await getDefaultClient().uploadAdminGameCollectionIcon(id, formData);
|
|
923
|
+
}
|
|
924
|
+
async function deleteAdminGameCollection(id) {
|
|
925
|
+
return await getDefaultClient().deleteAdminGameCollection(id);
|
|
926
|
+
}
|
|
927
|
+
async function fetchAdminAppVersionReviews(options) {
|
|
928
|
+
return await getDefaultClient().fetchAdminAppVersionReviews(options);
|
|
929
|
+
}
|
|
930
|
+
async function claimNextAdminAppVersionReview() {
|
|
931
|
+
return await getDefaultClient().claimNextAdminAppVersionReview();
|
|
932
|
+
}
|
|
933
|
+
async function updateAdminAppVersionReview(versionId, request) {
|
|
934
|
+
return await getDefaultClient().updateAdminAppVersionReview(versionId, request);
|
|
935
|
+
}
|
|
936
|
+
async function fetchAdminAppPlayerMeta(appId) {
|
|
937
|
+
return await getDefaultClient().fetchAdminAppPlayerMeta(appId);
|
|
938
|
+
}
|
|
939
|
+
async function fetchAdminAppPlayerMetaUser(appId, userId) {
|
|
940
|
+
return await getDefaultClient().fetchAdminAppPlayerMetaUser(appId, userId);
|
|
941
|
+
}
|
|
942
|
+
async function retireAdminAchievement(appId, key) {
|
|
943
|
+
return await getDefaultClient().retireAdminAchievement(appId, key);
|
|
944
|
+
}
|
|
945
|
+
async function retireAdminLeaderboard(appId, key) {
|
|
946
|
+
return await getDefaultClient().retireAdminLeaderboard(appId, key);
|
|
947
|
+
}
|
|
948
|
+
async function mutateAdminAchievementState(appId, userId, key, request) {
|
|
949
|
+
return await getDefaultClient().mutateAdminAchievementState(appId, userId, key, request);
|
|
950
|
+
}
|
|
951
|
+
async function mutateAdminLeaderboardScore(appId, userId, key, request) {
|
|
952
|
+
return await getDefaultClient().mutateAdminLeaderboardScore(appId, userId, key, request);
|
|
953
|
+
}
|
|
954
|
+
async function fetchAppDetail(creatorUsername, appName, options = {}) {
|
|
955
|
+
return await getDefaultClient().fetchAppBySlug(creatorUsername, appName, options);
|
|
956
|
+
}
|
|
957
|
+
async function downloadAppSource(creatorUsername, appName, version) {
|
|
958
|
+
return await getDefaultClient().downloadAppSource(creatorUsername, appName, version);
|
|
959
|
+
}
|
|
960
|
+
function configureWebClientRuntime(config) {
|
|
961
|
+
runtimeState.platform = {
|
|
962
|
+
name: config.platform.name.trim().toLowerCase(),
|
|
963
|
+
version: config.platform.version.trim()
|
|
964
|
+
};
|
|
965
|
+
runtimeState.client = {
|
|
966
|
+
version: config.client.version.trim(),
|
|
967
|
+
build: config.client.build.trim()
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
function getRuntimeState() {
|
|
971
|
+
return runtimeState;
|
|
972
|
+
}
|
|
973
|
+
function getClientVersionLabel() {
|
|
974
|
+
const client = runtimeState.client;
|
|
975
|
+
if (!client) {
|
|
976
|
+
return "0.0.0 (build 0)";
|
|
977
|
+
}
|
|
978
|
+
return `${client.version} (build ${client.build})`;
|
|
979
|
+
}
|
|
980
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
981
|
+
0 && (module.exports = {
|
|
982
|
+
APP_SURFACE_VALUES,
|
|
983
|
+
APP_TYPE_DEFAULT_DISPLAY,
|
|
984
|
+
APP_TYPE_VALUES,
|
|
985
|
+
ApiError,
|
|
986
|
+
DEFAULT_APP_SURFACE_TARGETS,
|
|
987
|
+
DEFAULT_APP_TYPE,
|
|
988
|
+
UnsupportedClientError,
|
|
989
|
+
activateAppBoost,
|
|
990
|
+
apiFetch,
|
|
991
|
+
approveCliLogin,
|
|
992
|
+
attemptMe,
|
|
993
|
+
blockCreator,
|
|
994
|
+
cancelAppIapReceipt,
|
|
995
|
+
cancelIapReceipt,
|
|
996
|
+
changePassword,
|
|
997
|
+
checkUsernameAvailable,
|
|
998
|
+
claimFreeCreditReward,
|
|
999
|
+
claimNextAdminAppVersionReview,
|
|
1000
|
+
completeAppleSignup,
|
|
1001
|
+
completeGoogleSignup,
|
|
1002
|
+
completeXSignup,
|
|
1003
|
+
configureWebClientRuntime,
|
|
1004
|
+
consumeAppIapReceipt,
|
|
1005
|
+
createAdminGameCollection,
|
|
1006
|
+
createApiClient,
|
|
1007
|
+
createAppleNativeChallenge,
|
|
1008
|
+
createAppleOAuthLinkStart,
|
|
1009
|
+
createCliApiKey,
|
|
1010
|
+
createContentComment,
|
|
1011
|
+
createCreditPackCheckoutSession,
|
|
1012
|
+
deleteAccount,
|
|
1013
|
+
deleteAdminGameCollection,
|
|
1014
|
+
deleteApp,
|
|
1015
|
+
deleteAppVersion,
|
|
1016
|
+
deleteApplePushDevice,
|
|
1017
|
+
deleteAsset,
|
|
1018
|
+
deleteAssetPack,
|
|
1019
|
+
deleteAssetPackVersion,
|
|
1020
|
+
deleteAssetVersion,
|
|
1021
|
+
deleteContentComment,
|
|
1022
|
+
deleteWebPushSubscription,
|
|
1023
|
+
dislikeContentComment,
|
|
1024
|
+
dislikeItem,
|
|
1025
|
+
downloadAppSource,
|
|
1026
|
+
downloadAssetFile,
|
|
1027
|
+
downloadAssetPack,
|
|
1028
|
+
downloadAssetPackSource,
|
|
1029
|
+
downloadAssetSource,
|
|
1030
|
+
exchangeAppleOAuthHandoff,
|
|
1031
|
+
exchangeGoogleOneTapCredential,
|
|
1032
|
+
exportPrivacyData,
|
|
1033
|
+
fetchAdminAiGeneration,
|
|
1034
|
+
fetchAdminAppPlayerMeta,
|
|
1035
|
+
fetchAdminAppPlayerMetaUser,
|
|
1036
|
+
fetchAdminAppVersionReviews,
|
|
1037
|
+
fetchAdminApps,
|
|
1038
|
+
fetchAdminGameCollection,
|
|
1039
|
+
fetchAdminGameCollections,
|
|
1040
|
+
fetchAiGeneration,
|
|
1041
|
+
fetchAppBoostHistory,
|
|
1042
|
+
fetchAppBoostReport,
|
|
1043
|
+
fetchAppBoostStatus,
|
|
1044
|
+
fetchAppBySlug,
|
|
1045
|
+
fetchAppDetail,
|
|
1046
|
+
fetchAppIapReceipts,
|
|
1047
|
+
fetchAppMoreCollectionPage,
|
|
1048
|
+
fetchAppMoreCollections,
|
|
1049
|
+
fetchAppRelated,
|
|
1050
|
+
fetchAppRuntimeAssets,
|
|
1051
|
+
fetchApplePendingSignup,
|
|
1052
|
+
fetchApplePushDeviceStatus,
|
|
1053
|
+
fetchApps,
|
|
1054
|
+
fetchAppsByCreator,
|
|
1055
|
+
fetchAppsByCreatorPage,
|
|
1056
|
+
fetchAppsByType,
|
|
1057
|
+
fetchAppsByTypePage,
|
|
1058
|
+
fetchAppsPage,
|
|
1059
|
+
fetchAssetBySlug,
|
|
1060
|
+
fetchAssetPackBySlug,
|
|
1061
|
+
fetchAssetPackRelated,
|
|
1062
|
+
fetchAssetRelated,
|
|
1063
|
+
fetchBoostBalance,
|
|
1064
|
+
fetchCliApiKeyStatus,
|
|
1065
|
+
fetchCliLoginStatus,
|
|
1066
|
+
fetchContentComments,
|
|
1067
|
+
fetchCreatorEarnings,
|
|
1068
|
+
fetchCreditPackCheckoutStatus,
|
|
1069
|
+
fetchCreditTransactions,
|
|
1070
|
+
fetchFollowingCreators,
|
|
1071
|
+
fetchFollowingFeed,
|
|
1072
|
+
fetchFreeCredits,
|
|
1073
|
+
fetchGooglePendingSignup,
|
|
1074
|
+
fetchHome,
|
|
1075
|
+
fetchHomeGamesCollectionPage,
|
|
1076
|
+
fetchIapReceipts,
|
|
1077
|
+
fetchInvitePreview,
|
|
1078
|
+
fetchLibrary,
|
|
1079
|
+
fetchMyAchievements,
|
|
1080
|
+
fetchMyApps,
|
|
1081
|
+
fetchMyAppsPage,
|
|
1082
|
+
fetchMyInviteCode,
|
|
1083
|
+
fetchMyLeaderboards,
|
|
1084
|
+
fetchNotifications,
|
|
1085
|
+
fetchOwnedProfileAssets,
|
|
1086
|
+
fetchPublicFreeCredits,
|
|
1087
|
+
fetchPublicShop,
|
|
1088
|
+
fetchShop,
|
|
1089
|
+
fetchStarterProfileAssets,
|
|
1090
|
+
fetchTag,
|
|
1091
|
+
fetchTagDirectory,
|
|
1092
|
+
fetchTagGroup,
|
|
1093
|
+
fetchTags,
|
|
1094
|
+
fetchUserById,
|
|
1095
|
+
fetchUserByUsername,
|
|
1096
|
+
fetchWebPushConfig,
|
|
1097
|
+
fetchWebPushSubscriptionStatus,
|
|
1098
|
+
fetchXPendingSignup,
|
|
1099
|
+
followCreator,
|
|
1100
|
+
getAchievement,
|
|
1101
|
+
getAppVersion,
|
|
1102
|
+
getClientVersionLabel,
|
|
1103
|
+
getLeaderboard,
|
|
1104
|
+
getRuntimeState,
|
|
1105
|
+
grantAppIapReceipt,
|
|
1106
|
+
likeContentComment,
|
|
1107
|
+
likeItem,
|
|
1108
|
+
linkApple,
|
|
1109
|
+
linkGoogleApple,
|
|
1110
|
+
listAchievements,
|
|
1111
|
+
listAppVersions,
|
|
1112
|
+
listAssetCategories,
|
|
1113
|
+
listAssetPackVersions,
|
|
1114
|
+
listAssetPacks,
|
|
1115
|
+
listAssetPacksForCreator,
|
|
1116
|
+
listAssetPacksForCreatorPage,
|
|
1117
|
+
listAssetVersions,
|
|
1118
|
+
listAssets,
|
|
1119
|
+
listAssetsForCreator,
|
|
1120
|
+
listAssetsForCreatorPage,
|
|
1121
|
+
listLeaderboards,
|
|
1122
|
+
loadDevInterstitialAd,
|
|
1123
|
+
loadDevRewardedAd,
|
|
1124
|
+
loadInterstitialAd,
|
|
1125
|
+
loadRewardedAd,
|
|
1126
|
+
login,
|
|
1127
|
+
loginWithApiKey,
|
|
1128
|
+
logout,
|
|
1129
|
+
markAllNotificationsRead,
|
|
1130
|
+
markNotificationRead,
|
|
1131
|
+
mutateAdminAchievementState,
|
|
1132
|
+
mutateAdminLeaderboardScore,
|
|
1133
|
+
normalizeAppType,
|
|
1134
|
+
pollCliLogin,
|
|
1135
|
+
purchaseAsset,
|
|
1136
|
+
purchaseBoostPack,
|
|
1137
|
+
purchaseDevIap,
|
|
1138
|
+
purchaseIap,
|
|
1139
|
+
register,
|
|
1140
|
+
replaceAdminGameCollectionGames,
|
|
1141
|
+
reportComment,
|
|
1142
|
+
reportContent,
|
|
1143
|
+
reportCreator,
|
|
1144
|
+
requestAppAccessToken,
|
|
1145
|
+
requestDevAppAccessToken,
|
|
1146
|
+
resetAllDevPlayers,
|
|
1147
|
+
resetDevPlayer,
|
|
1148
|
+
retireAdminAchievement,
|
|
1149
|
+
retireAdminLeaderboard,
|
|
1150
|
+
saveItem,
|
|
1151
|
+
search,
|
|
1152
|
+
searchAdminGameCollectionCandidates,
|
|
1153
|
+
sendAppLog,
|
|
1154
|
+
setAchievementProgressAtLeast,
|
|
1155
|
+
setSelectedProfileAsset,
|
|
1156
|
+
showDevInterstitialAd,
|
|
1157
|
+
showDevRewardedAd,
|
|
1158
|
+
showInterstitialAd,
|
|
1159
|
+
showRewardedAd,
|
|
1160
|
+
signInWithApple,
|
|
1161
|
+
signInWithGoogleApple,
|
|
1162
|
+
startCliLogin,
|
|
1163
|
+
startCliWebLaunch,
|
|
1164
|
+
submitLeaderboardScore,
|
|
1165
|
+
submitMyInviteCode,
|
|
1166
|
+
suggestSearch,
|
|
1167
|
+
trackEngagementEvent,
|
|
1168
|
+
unblockCreator,
|
|
1169
|
+
undislikeContentComment,
|
|
1170
|
+
undislikeItem,
|
|
1171
|
+
unfollowCreator,
|
|
1172
|
+
unlikeContentComment,
|
|
1173
|
+
unlikeItem,
|
|
1174
|
+
unlinkApple,
|
|
1175
|
+
unlinkGoogle,
|
|
1176
|
+
unlinkX,
|
|
1177
|
+
unlockAchievement,
|
|
1178
|
+
unsaveItem,
|
|
1179
|
+
updateAdminAppVersionReview,
|
|
1180
|
+
updateAdminGameCollection,
|
|
1181
|
+
updateAppVersion,
|
|
1182
|
+
updateAsset,
|
|
1183
|
+
updateAssetPack,
|
|
1184
|
+
updateAssetPackVersion,
|
|
1185
|
+
updateAssetVersion,
|
|
1186
|
+
updateProfile,
|
|
1187
|
+
upgradeToCreator,
|
|
1188
|
+
uploadAdminGameCollectionIcon,
|
|
1189
|
+
upsertApplePushDevice,
|
|
1190
|
+
upsertWebPushSubscription
|
|
1191
|
+
});
|