@playdrop/playdrop-cli 0.5.2 → 0.5.4

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 (118) hide show
  1. package/config/client-meta.json +4 -4
  2. package/dist/apps/build.js +49 -6
  3. package/dist/apps/index.d.ts +2 -0
  4. package/dist/apps/index.js +2 -0
  5. package/dist/apps/upload.d.ts +2 -0
  6. package/dist/apps/upload.js +126 -28
  7. package/dist/assetSpecs.d.ts +16 -0
  8. package/dist/assetSpecs.js +263 -0
  9. package/dist/assets/model-artifacts.js +3 -0
  10. package/dist/catalogue.d.ts +57 -3
  11. package/dist/catalogue.js +342 -16
  12. package/dist/commandContext.d.ts +6 -2
  13. package/dist/commandContext.js +144 -20
  14. package/dist/commands/accounts.d.ts +2 -0
  15. package/dist/commands/accounts.js +48 -0
  16. package/dist/commands/ads.d.ts +8 -0
  17. package/dist/commands/ads.js +124 -0
  18. package/dist/commands/boosts.d.ts +25 -0
  19. package/dist/commands/boosts.js +209 -0
  20. package/dist/commands/browse.d.ts +6 -1
  21. package/dist/commands/browse.js +365 -124
  22. package/dist/commands/capture.js +30 -9
  23. package/dist/commands/captureListing.d.ts +53 -0
  24. package/dist/commands/captureListing.js +815 -0
  25. package/dist/commands/create.d.ts +1 -0
  26. package/dist/commands/create.js +183 -3
  27. package/dist/commands/credits.d.ts +6 -0
  28. package/dist/commands/credits.js +47 -1
  29. package/dist/commands/detail.js +38 -4
  30. package/dist/commands/dev.js +169 -192
  31. package/dist/commands/devServer.d.ts +26 -3
  32. package/dist/commands/devServer.js +415 -72
  33. package/dist/commands/login.js +10 -2
  34. package/dist/commands/logout.d.ts +6 -1
  35. package/dist/commands/logout.js +25 -3
  36. package/dist/commands/search.d.ts +5 -0
  37. package/dist/commands/search.js +139 -17
  38. package/dist/commands/tags.d.ts +7 -0
  39. package/dist/commands/tags.js +63 -0
  40. package/dist/commands/upload-content.d.ts +13 -3
  41. package/dist/commands/upload-content.js +86 -20
  42. package/dist/commands/upload.d.ts +2 -0
  43. package/dist/commands/upload.js +187 -11
  44. package/dist/commands/validate.js +163 -2
  45. package/dist/commands/versionsBrowse.js +128 -91
  46. package/dist/commands/whoami.js +10 -2
  47. package/dist/config.d.ts +37 -0
  48. package/dist/config.js +205 -3
  49. package/dist/index.js +177 -5
  50. package/dist/refs.d.ts +2 -2
  51. package/dist/refs.js +13 -1
  52. package/dist/taskSelection.js +6 -3
  53. package/dist/taskUtils.d.ts +2 -2
  54. package/dist/taskUtils.js +1 -0
  55. package/dist/uploadLog.d.ts +1 -1
  56. package/dist/uploadLog.js +2 -2
  57. package/dist/workspaceAuth.d.ts +14 -0
  58. package/dist/workspaceAuth.js +75 -0
  59. package/node_modules/@playdrop/ai-client/package.json +1 -1
  60. package/node_modules/@playdrop/api-client/dist/client.d.ts +139 -10
  61. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  62. package/node_modules/@playdrop/api-client/dist/client.js +6 -0
  63. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +9 -1
  64. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  65. package/node_modules/@playdrop/api-client/dist/domains/admin.js +45 -0
  66. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +7 -1
  67. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  68. package/node_modules/@playdrop/api-client/dist/domains/apps.js +58 -0
  69. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +2 -0
  70. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
  71. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +16 -0
  72. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +44 -2
  73. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  74. package/node_modules/@playdrop/api-client/dist/domains/assets.js +260 -3
  75. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +22 -1
  76. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
  77. package/node_modules/@playdrop/api-client/dist/domains/payments.js +228 -0
  78. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
  79. package/node_modules/@playdrop/api-client/dist/domains/search.js +39 -11
  80. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +34 -0
  81. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -0
  82. package/node_modules/@playdrop/api-client/dist/domains/tags.js +111 -0
  83. package/node_modules/@playdrop/api-client/dist/index.d.ts +69 -1
  84. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  85. package/node_modules/@playdrop/api-client/dist/index.js +74 -0
  86. package/node_modules/@playdrop/api-client/package.json +1 -1
  87. package/node_modules/@playdrop/boxel-core/package.json +1 -1
  88. package/node_modules/@playdrop/boxel-three/package.json +1 -1
  89. package/node_modules/@playdrop/config/client-meta.json +4 -4
  90. package/node_modules/@playdrop/config/dist/src/constants.d.ts +11 -0
  91. package/node_modules/@playdrop/config/dist/src/constants.d.ts.map +1 -1
  92. package/node_modules/@playdrop/config/dist/src/constants.js +12 -1
  93. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  94. package/node_modules/@playdrop/config/package.json +1 -1
  95. package/node_modules/@playdrop/types/dist/api.d.ts +366 -6
  96. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  97. package/node_modules/@playdrop/types/dist/api.js +52 -1
  98. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +7 -1
  99. package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
  100. package/node_modules/@playdrop/types/dist/asset-spec-contract-meta-schema.json +86 -0
  101. package/node_modules/@playdrop/types/dist/asset-spec.d.ts +163 -0
  102. package/node_modules/@playdrop/types/dist/asset-spec.d.ts.map +1 -0
  103. package/node_modules/@playdrop/types/dist/asset-spec.js +101 -0
  104. package/node_modules/@playdrop/types/dist/asset.d.ts +23 -6
  105. package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
  106. package/node_modules/@playdrop/types/dist/asset.js +4 -1
  107. package/node_modules/@playdrop/types/dist/graph.d.ts +4 -2
  108. package/node_modules/@playdrop/types/dist/graph.d.ts.map +1 -1
  109. package/node_modules/@playdrop/types/dist/graph.js +9 -2
  110. package/node_modules/@playdrop/types/dist/index.d.ts +1 -0
  111. package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
  112. package/node_modules/@playdrop/types/dist/index.js +1 -0
  113. package/node_modules/@playdrop/types/dist/version.d.ts +13 -0
  114. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  115. package/node_modules/@playdrop/types/dist/version.js +21 -0
  116. package/node_modules/@playdrop/types/package.json +6 -1
  117. package/node_modules/@playdrop/vox-three/package.json +1 -1
  118. package/package.json +3 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playdrop/config",
3
- "version": "0.5.1",
3
+ "version": "0.5.4",
4
4
  "description": "Shared configuration helpers for Playdrop clients",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,6 +1,7 @@
1
1
  import type { AppType, AppSurface } from './app.js';
2
- import type { AppAuthMode, AppControllerMode, AppHostingMode, AppVersionVisibility } from './version.js';
2
+ import type { AppAuthMode, AppControllerMode, AppHostingMode, ReviewState, AppVersionVisibility } from './version.js';
3
3
  import type { AssetCategory, AssetResponse } from './asset.js';
4
+ import type { AppMetadataAssetSpecSupport, AssetSpecListResponse, AssetSpecSearchResult, AssetSpecVersionResponse, AssetSpecVersionsListResponse } from './asset-spec.js';
4
5
  import type { AssetPackResponse } from './asset-pack.js';
5
6
  export interface CreateAppRequest {
6
7
  name: string;
@@ -89,6 +90,28 @@ export interface ApiErrorResponse {
89
90
  error: string;
90
91
  message?: string;
91
92
  }
93
+ export declare const TAG_SLUG_REGEX: RegExp;
94
+ export interface ContentTagSummary {
95
+ ref: string;
96
+ groupSlug: string;
97
+ groupDisplayName: string;
98
+ slug: string;
99
+ displayName: string;
100
+ }
101
+ export interface TagGroupSummary {
102
+ slug: string;
103
+ displayName: string;
104
+ allowedTargetKinds: SavedItemKind[];
105
+ createdAt: string;
106
+ updatedAt: string;
107
+ }
108
+ export interface TagSummary extends ContentTagSummary {
109
+ createdAt: string;
110
+ updatedAt: string;
111
+ }
112
+ export interface TagGroupWithTagsSummary extends TagGroupSummary {
113
+ tags: TagSummary[];
114
+ }
92
115
  export interface AppResponse {
93
116
  id?: number;
94
117
  name: string;
@@ -114,12 +137,18 @@ export interface AppResponse {
114
137
  previewable?: boolean;
115
138
  /** Visibility of current version */
116
139
  visibility?: AppVersionVisibility;
140
+ /** Review state of current version */
141
+ reviewState?: ReviewState;
142
+ reviewStartedAt?: string | null;
143
+ reviewCompletedAt?: string | null;
117
144
  /** Base URL for loading the app (from current version) */
118
145
  assetUrl: string | null;
119
146
  /** Entry point file within assetUrl */
120
147
  entryPoint?: string | null;
121
148
  /** Surface targets from current version (undefined for draft apps with no version) */
122
149
  surfaceTargets?: AppSurface[];
150
+ /** Asset spec support declarations from the current version */
151
+ assetSpecSupport?: AppMetadataAssetSpecSupport[];
123
152
  bundleSize?: number | null;
124
153
  sourceUrl?: string | null;
125
154
  hasEcs?: boolean;
@@ -138,6 +167,10 @@ export interface AppResponse {
138
167
  playCount?: number;
139
168
  commentCount?: number;
140
169
  remixCount?: number;
170
+ boostedUntil?: string | null;
171
+ promotionSource?: string | null;
172
+ promotionToken?: string | null;
173
+ tags: ContentTagSummary[];
141
174
  }
142
175
  export type AdminAppResponse = AppResponse;
143
176
  export interface AdminAppsListResponse {
@@ -436,6 +469,26 @@ export interface AppAccessTokenResponse {
436
469
  appId: number;
437
470
  sessionId: string;
438
471
  }
472
+ export interface DevPlayerSummary {
473
+ userId: number;
474
+ slot: number;
475
+ username: string;
476
+ displayName: string;
477
+ userKind: 'TEST';
478
+ ownerUserId: number;
479
+ ownerUsername: string;
480
+ }
481
+ export interface DevAppAccessTokenResponse extends AppAccessTokenResponse {
482
+ player: DevPlayerSummary;
483
+ }
484
+ export interface DevPlayerResetResponse {
485
+ resetAll: boolean;
486
+ playerSlots: number[];
487
+ deletedAppDataCount: number;
488
+ deletedAchievementCount: number;
489
+ deletedLeaderboardScoreCount: number;
490
+ deletedIapReceiptCount: number;
491
+ }
439
492
  export type LogSeverity = 'debug' | 'info' | 'warn' | 'error';
440
493
  export interface AppLogEntryContext {
441
494
  appName?: string | null;
@@ -507,6 +560,38 @@ export interface UpdateAppResponse {
507
560
  export interface AdminUpdateAppResponse {
508
561
  app: AdminAppResponse;
509
562
  }
563
+ export interface AdminAppVersionReviewSummary {
564
+ versionId: number;
565
+ version: string;
566
+ appId: number;
567
+ appName: string;
568
+ appDisplayName: string;
569
+ appType: AppType;
570
+ creatorId: number;
571
+ creatorUsername: string;
572
+ isCurrent: boolean;
573
+ visibility: AppVersionVisibility;
574
+ reviewState: ReviewState;
575
+ reviewMessage?: string | null;
576
+ reviewStartedAt?: string | null;
577
+ reviewCompletedAt?: string | null;
578
+ createdAt: string;
579
+ updatedAt: string;
580
+ assetUrl: string;
581
+ }
582
+ export interface AdminAppVersionReviewsListResponse {
583
+ versions: AdminAppVersionReviewSummary[];
584
+ }
585
+ export interface AdminUpdateAppVersionReviewRequest {
586
+ reviewState?: ReviewState;
587
+ reviewMessage?: string | null;
588
+ }
589
+ export interface AdminUpdateAppVersionReviewResponse {
590
+ version: AdminAppVersionReviewSummary;
591
+ }
592
+ export interface AdminClaimNextAppVersionReviewResponse {
593
+ version: AdminAppVersionReviewSummary | null;
594
+ }
510
595
  export interface ProfileAssetSummary {
511
596
  assetRef: string;
512
597
  assetId: number;
@@ -580,26 +665,33 @@ export interface AdminUserResponse {
580
665
  user: AdminUserDetail;
581
666
  }
582
667
  export type UserDetailResponse = PublicUserResponse;
583
- export declare const SEARCH_RESULT_KIND_VALUES: readonly ["creator", "app", "asset", "pack"];
668
+ export declare const SEARCH_RESULT_KIND_VALUES: readonly ["creator", "app", "asset", "asset-spec", "pack"];
584
669
  export type SearchResultKind = typeof SEARCH_RESULT_KIND_VALUES[number];
585
- export declare const SEARCH_KIND_VALUES: readonly ["all", "creator", "app", "asset", "pack"];
670
+ export declare const SEARCH_KIND_VALUES: readonly ["all", "creator", "app", "asset", "asset-spec", "pack"];
586
671
  export type SearchKind = typeof SEARCH_KIND_VALUES[number];
587
672
  export declare const SEARCH_MODE_VALUES: readonly ["grouped", "flat"];
588
673
  export type SearchMode = typeof SEARCH_MODE_VALUES[number];
589
674
  export declare const SEARCH_ASSET_TYPE_VALUES: readonly ["image", "video", "audio", "song", "sfx", "3d"];
590
675
  export type SearchAssetType = typeof SEARCH_ASSET_TYPE_VALUES[number];
676
+ export declare const SEARCH_SORT_VALUES: readonly ["relevance", "recent", "likes", "downloads", "remixes", "comments", "assets", "apps", "alpha"];
677
+ export type SearchSort = typeof SEARCH_SORT_VALUES[number];
591
678
  export interface SearchRequest {
592
679
  q: string;
593
680
  mode?: SearchMode;
594
681
  kind?: SearchKind;
682
+ sort?: SearchSort;
595
683
  page?: number;
596
684
  pageSize?: number;
597
685
  appType?: AppType;
598
686
  assetType?: SearchAssetType;
599
687
  assetCategory?: AssetCategory;
600
688
  assetSubcategory?: string;
689
+ assetSpec?: string;
690
+ assetSpecOwner?: string;
691
+ assetSpecName?: string;
601
692
  packContainsCategory?: AssetCategory;
602
693
  packContainsSubcategory?: string;
694
+ tags?: string[];
603
695
  }
604
696
  export interface SearchSuggestRequest {
605
697
  q: string;
@@ -608,6 +700,7 @@ export interface SearchCountsByKind {
608
700
  creator: number;
609
701
  app: number;
610
702
  asset: number;
703
+ assetSpec: number;
611
704
  pack: number;
612
705
  total: number;
613
706
  }
@@ -624,6 +717,7 @@ export interface SearchTabCounts {
624
717
  songs: number;
625
718
  sfx: number;
626
719
  models3d: number;
720
+ assetSpecs: number;
627
721
  packs: number;
628
722
  }
629
723
  export interface HomeCreatorResponse {
@@ -639,6 +733,63 @@ export interface HomeCreatorResponse {
639
733
  }
640
734
  export declare const SAVED_ITEM_KIND_VALUES: readonly ["APP", "ASSET", "PACK"];
641
735
  export type SavedItemKind = typeof SAVED_ITEM_KIND_VALUES[number];
736
+ export interface ListTagsRequest {
737
+ targetKind?: SavedItemKind;
738
+ groupSlug?: string;
739
+ limit?: number;
740
+ offset?: number;
741
+ }
742
+ export interface TagListResponse {
743
+ groups: TagGroupWithTagsSummary[];
744
+ pagination: PaginationMeta;
745
+ }
746
+ export interface TagDetailResponse {
747
+ tag: TagSummary & {
748
+ group: TagGroupSummary;
749
+ };
750
+ }
751
+ export interface AdminTagGroupsResponse {
752
+ groups: TagGroupWithTagsSummary[];
753
+ }
754
+ export interface AdminTagGroupResponse {
755
+ group: TagGroupSummary;
756
+ }
757
+ export interface AdminTagResponse {
758
+ tag: TagSummary;
759
+ }
760
+ export interface CreateTagGroupRequest {
761
+ slug: string;
762
+ displayName: string;
763
+ allowedTargetKinds?: SavedItemKind[];
764
+ }
765
+ export interface UpdateTagGroupRequest {
766
+ displayName?: string;
767
+ allowedTargetKinds?: SavedItemKind[];
768
+ }
769
+ export interface CreateTagRequest {
770
+ slug: string;
771
+ displayName: string;
772
+ }
773
+ export interface UpdateTagRequest {
774
+ displayName?: string;
775
+ }
776
+ export interface CatalogueTagDefinition {
777
+ slug: string;
778
+ displayName: string;
779
+ }
780
+ export interface CatalogueTagGroupDefinition {
781
+ slug: string;
782
+ displayName: string;
783
+ allowedTargetKinds?: SavedItemKind[];
784
+ tags: CatalogueTagDefinition[];
785
+ }
786
+ export declare function isValidTagSlug(value: unknown): value is string;
787
+ export declare function normalizeTagSlug(value: string): string;
788
+ export declare function parseTagRef(value: string): {
789
+ groupSlug: string;
790
+ tagSlug: string;
791
+ } | null;
792
+ export declare function normalizeTagRef(value: string): string;
642
793
  export declare const ENGAGEMENT_EVENT_TYPE_VALUES: readonly ["VIEW", "LAUNCH", "PLAY", "DOWNLOAD", "LIKE", "UNLIKE", "SAVE", "UNSAVE", "FOLLOW", "UNFOLLOW"];
643
794
  export type EngagementEventType = typeof ENGAGEMENT_EVENT_TYPE_VALUES[number];
644
795
  export declare const ENGAGEMENT_TARGET_KIND_VALUES: readonly ["CREATOR", "APP", "ASSET", "PACK"];
@@ -690,6 +841,7 @@ export interface TrackEngagementEventRequest {
690
841
  creatorUsername: string;
691
842
  itemName?: string;
692
843
  launchContext?: AppLaunchContext;
844
+ promotionToken?: string | null;
693
845
  }
694
846
  export interface TrackEngagementEventResponse {
695
847
  recorded: boolean;
@@ -734,11 +886,12 @@ export interface AssetPackSearchResult {
734
886
  targetPath: string;
735
887
  pack: AssetPackResponse;
736
888
  }
737
- export type SearchResult = CreatorSearchResult | AppSearchResult | AssetSearchResult | AssetPackSearchResult;
889
+ export type SearchResult = CreatorSearchResult | AppSearchResult | AssetSearchResult | AssetSpecSearchResult | AssetPackSearchResult;
738
890
  export interface SearchGroupedResults {
739
891
  creators: CreatorSearchResult[];
740
892
  apps: AppSearchResult[];
741
893
  assets: AssetSearchResult[];
894
+ assetSpecs: AssetSpecSearchResult[];
742
895
  packs: AssetPackSearchResult[];
743
896
  }
744
897
  export interface SearchResponse {
@@ -756,6 +909,11 @@ export interface SearchSuggestResponse {
756
909
  countsByKind: SearchCountsByKind;
757
910
  groups: SearchGroupedResults;
758
911
  }
912
+ export type AssetSpecsResponse = AssetSpecListResponse;
913
+ export type AssetSpecVersionsResponse = AssetSpecVersionsListResponse;
914
+ export interface AssetSpecVersionResponseEnvelope {
915
+ version: AssetSpecVersionResponse;
916
+ }
759
917
  export interface SavedItemMutationResponse {
760
918
  saved: boolean;
761
919
  }
@@ -798,7 +956,7 @@ export interface DeleteContentCommentResponse {
798
956
  export interface CreatorFollowMutationResponse {
799
957
  following: boolean;
800
958
  }
801
- export declare const FREE_CREDIT_OBJECTIVE_VALUES: readonly ["WELCOME", "PLAY_GAME", "FOLLOW_CREATOR", "INVITED", "SHARE_CODE", "ENABLE_PUSH", "CREATE_SONG", "CREATE_IMAGE", "CREATE_3D", "CLI_LOGIN", "PUBLISH_GAME"];
959
+ export declare const FREE_CREDIT_OBJECTIVE_VALUES: readonly ["WELCOME", "PLAY_GAME", "FOLLOW_CREATOR", "INVITED", "SHARE_CODE", "ENABLE_PUSH", "CREATE_SONG", "CREATE_IMAGE", "CREATE_3D", "CLI_LOGIN", "PUBLISH_GAME", "BOOST_GAME"];
802
960
  export type FreeCreditObjectiveKey = typeof FREE_CREDIT_OBJECTIVE_VALUES[number];
803
961
  export declare const FREE_CREDIT_REWARD_STATUS_VALUES: readonly ["INCOMPLETE", "CLAIMABLE", "CLAIMED"];
804
962
  export type FreeCreditRewardStatus = typeof FREE_CREDIT_REWARD_STATUS_VALUES[number];
@@ -1002,6 +1160,7 @@ export interface CreditPack {
1002
1160
  export interface ShopCollection {
1003
1161
  id: string;
1004
1162
  title: string;
1163
+ metadata?: Record<string, unknown> | null;
1005
1164
  items: ShopItem[];
1006
1165
  }
1007
1166
  export type ShopItem = {
@@ -1024,9 +1183,17 @@ export type ShopItem = {
1024
1183
  priceCredits: number;
1025
1184
  owned: boolean;
1026
1185
  creatorUsername: string;
1186
+ } | {
1187
+ type: 'boost_pack';
1188
+ id: string;
1189
+ sku: BoostSku;
1190
+ name: string;
1191
+ units: number;
1192
+ priceCredits: number;
1027
1193
  };
1028
1194
  export interface ShopResponse {
1029
1195
  collections: ShopCollection[];
1196
+ boostBalance?: number;
1030
1197
  }
1031
1198
  export interface AdminCreditPack {
1032
1199
  sku: string;
@@ -1051,7 +1218,7 @@ export interface CreditPackResponse {
1051
1218
  export type CreditTransactionDirection = 'IN' | 'OUT';
1052
1219
  export type CreditTransactionKind = 'CONSUMABLE' | 'ENTITLEMENT';
1053
1220
  export type CreditTransactionStatus = 'PENDING' | 'AUTHORIZED' | 'CONSUMED' | 'GRANTED' | 'CANCELLED';
1054
- export type CreditTransactionType = 'CREDIT_PACK' | 'ASSET' | 'IN_APP' | 'AI_SERVICE' | 'ADMIN_GRANT' | 'FREE_CREDIT';
1221
+ export type CreditTransactionType = 'CREDIT_PACK' | 'ASSET' | 'IN_APP' | 'AI_SERVICE' | 'ADMIN_GRANT' | 'FREE_CREDIT' | 'AD_PAYOUT' | 'BOOST_PURCHASE';
1055
1222
  export interface CreditTransaction {
1056
1223
  id: number;
1057
1224
  sourceId: number;
@@ -1067,6 +1234,7 @@ export interface CreditTransaction {
1067
1234
  netAmount: number;
1068
1235
  buyer: string;
1069
1236
  seller: string;
1237
+ metadata?: Record<string, unknown> | null;
1070
1238
  createdAt: string;
1071
1239
  updatedAt: string;
1072
1240
  }
@@ -1088,9 +1256,200 @@ export interface AdminCreditTransaction {
1088
1256
  buyer: string;
1089
1257
  sellerId: number;
1090
1258
  seller: string;
1259
+ metadata?: Record<string, unknown> | null;
1260
+ createdAt: string;
1261
+ updatedAt: string;
1262
+ }
1263
+ export declare const BOOST_SKU_VALUES: readonly ["boost_1", "boost_3", "boost_7", "boost_14", "boost_31"];
1264
+ export type BoostSku = typeof BOOST_SKU_VALUES[number];
1265
+ export interface BoostOffer {
1266
+ sku: BoostSku;
1267
+ displayName: string;
1268
+ units: number;
1269
+ priceCredits: number;
1270
+ durationHours: number;
1271
+ }
1272
+ export interface BoostBalanceResponse {
1273
+ balance: number;
1274
+ offers: BoostOffer[];
1275
+ }
1276
+ export interface BoostPurchaseRequest {
1277
+ sku: BoostSku;
1278
+ quantity?: number;
1279
+ }
1280
+ export interface BoostEligibleGameSummary {
1281
+ name: string;
1282
+ displayName: string;
1283
+ creatorUsername: string;
1284
+ type: AppType;
1285
+ }
1286
+ export interface BoostPurchaseResponse {
1287
+ offer: BoostOffer;
1288
+ quantity: number;
1289
+ unitsAdded: number;
1290
+ boostBalance: number;
1291
+ creditBalance: number;
1292
+ transaction: CreditTransaction;
1293
+ eligibleGameCount: number;
1294
+ eligibleGame: BoostEligibleGameSummary | null;
1295
+ }
1296
+ export interface BoostActivationRequest {
1297
+ units?: number;
1298
+ }
1299
+ export interface BoostRunSummary {
1300
+ id: number;
1301
+ status: 'ACTIVE' | 'EXPIRED' | 'CANCELLED';
1302
+ startedAt: string;
1303
+ endsAt: string;
1304
+ consumedUnits: number;
1305
+ deliveredImpressionCount: number;
1306
+ promotedDetailViewCount: number;
1307
+ promotedPlayCount: number;
1091
1308
  createdAt: string;
1092
1309
  updatedAt: string;
1093
1310
  }
1311
+ export interface BoostStatusResponse {
1312
+ app: AppResponse;
1313
+ boostsAvailable: number;
1314
+ isActive: boolean;
1315
+ boostedUntil: string | null;
1316
+ currentRun: BoostRunSummary | null;
1317
+ totals: {
1318
+ deliveredImpressions: number;
1319
+ promotedDetailViews: number;
1320
+ promotedPlays: number;
1321
+ };
1322
+ }
1323
+ export interface BoostHistoryResponse {
1324
+ runs: BoostRunSummary[];
1325
+ }
1326
+ export interface BoostReportQuery {
1327
+ days?: number;
1328
+ startDateUtc?: string;
1329
+ endDateUtc?: string;
1330
+ }
1331
+ export interface BoostReportPoint {
1332
+ dateUtc: string;
1333
+ provisional: boolean;
1334
+ regularDetailViews: number;
1335
+ promotedDetailViews: number;
1336
+ regularPlays: number;
1337
+ promotedPlays: number;
1338
+ boostedHomeViews: number;
1339
+ adViews: number;
1340
+ boostedHomePlays: number;
1341
+ adPlays: number;
1342
+ interstitialImpressions: number;
1343
+ rewardedImpressions: number;
1344
+ creditedImpressions: number;
1345
+ adEarnings: number;
1346
+ }
1347
+ export interface BoostReportResponse {
1348
+ appId: number;
1349
+ days: BoostReportPoint[];
1350
+ }
1351
+ export interface CreatorEarningsAppDayRow {
1352
+ appId: number;
1353
+ appName: string;
1354
+ creatorUsername: string;
1355
+ format: 'interstitial' | 'rewarded';
1356
+ amount: number;
1357
+ servedCount: number;
1358
+ creditedCount: number;
1359
+ settled: boolean;
1360
+ }
1361
+ export interface CreatorEarningsDay {
1362
+ dateUtc: string;
1363
+ provisional: boolean;
1364
+ totalAmount: number;
1365
+ interstitialAmount: number;
1366
+ rewardedAmount: number;
1367
+ servedCount: number;
1368
+ creditedCount: number;
1369
+ apps: CreatorEarningsAppDayRow[];
1370
+ }
1371
+ export interface CreatorEarningsSummary {
1372
+ provisionalToday: number;
1373
+ settledLast7Days: number;
1374
+ settledLast30Days: number;
1375
+ boostSpendLast30Days: number;
1376
+ }
1377
+ export interface CreatorEarningsResponse {
1378
+ summary: CreatorEarningsSummary;
1379
+ days: CreatorEarningsDay[];
1380
+ }
1381
+ export type AdFormat = 'INTERSTITIAL' | 'REWARDED';
1382
+ export type AdLoadStatus = 'ready' | 'no_fill' | 'rate_limited' | 'blocked';
1383
+ export type AdInterstitialShowStatus = 'dismissed' | 'not_ready' | 'expired';
1384
+ export type AdRewardedShowStatus = 'completed' | 'dismissed' | 'not_ready' | 'expired';
1385
+ export type AdTargetType = 'BOOSTED_APP' | 'HOUSE_AVATAR' | 'HOUSE_GAME' | 'HOUSE_CREATE_ACCOUNT' | 'HOUSE_INVITE_FRIENDS';
1386
+ export interface AdCreative {
1387
+ targetType: AdTargetType;
1388
+ title: string;
1389
+ body: string | null;
1390
+ ctaLabel: string | null;
1391
+ targetHref: string;
1392
+ imageUrl: string | null;
1393
+ promotedApp?: AppResponse | null;
1394
+ }
1395
+ export type AdLoadResult = {
1396
+ status: 'ready';
1397
+ } | {
1398
+ status: 'no_fill';
1399
+ } | {
1400
+ status: 'rate_limited';
1401
+ retryAfterSeconds: number;
1402
+ } | {
1403
+ status: 'blocked';
1404
+ reason: string;
1405
+ };
1406
+ export type AdLoadResponse = {
1407
+ status: 'ready';
1408
+ format: AdFormat;
1409
+ reservationId: string;
1410
+ creative: AdCreative;
1411
+ } | {
1412
+ status: 'no_fill';
1413
+ format: AdFormat;
1414
+ } | {
1415
+ status: 'rate_limited';
1416
+ format: AdFormat;
1417
+ retryAfterSeconds: number;
1418
+ } | {
1419
+ status: 'blocked';
1420
+ format: AdFormat;
1421
+ reason: string;
1422
+ };
1423
+ export interface AdShowRequest {
1424
+ reservationId: string;
1425
+ viewedMs: number;
1426
+ }
1427
+ export type AdInterstitialShowResponse = {
1428
+ status: 'dismissed';
1429
+ reservationId: string;
1430
+ impressionId: number;
1431
+ } | {
1432
+ status: 'not_ready';
1433
+ reservationId: null;
1434
+ impressionId?: null;
1435
+ } | {
1436
+ status: 'expired';
1437
+ reservationId: string | null;
1438
+ impressionId?: null;
1439
+ };
1440
+ export type AdRewardedShowResponse = {
1441
+ status: 'completed' | 'dismissed';
1442
+ reservationId: string;
1443
+ impressionId: number;
1444
+ } | {
1445
+ status: 'not_ready';
1446
+ reservationId: null;
1447
+ impressionId?: null;
1448
+ } | {
1449
+ status: 'expired';
1450
+ reservationId: string | null;
1451
+ impressionId?: null;
1452
+ };
1094
1453
  export interface AdminCreditTransactionsResponse {
1095
1454
  transactions: AdminCreditTransaction[];
1096
1455
  pagination: PaginationMeta;
@@ -1123,6 +1482,7 @@ export interface IapPurchaseRequest {
1123
1482
  displayName: string;
1124
1483
  priceCredits: number;
1125
1484
  }
1485
+ export declare const MUSIC_PROMPT_MAX_LENGTH = 4000;
1126
1486
  export type AiGenerationType = 'TEXT' | 'JSON' | 'IMAGE' | 'MUSIC' | 'SFX' | 'VIDEO' | 'MODEL_3D';
1127
1487
  export type AiGenerationStatus = 'SUCCESS' | 'FAILURE';
1128
1488
  export type AiGenerationPaidBy = 'USER' | 'CREATOR';