@paynow-gg/typescript-sdk 2.1.7 → 2.1.8

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.
@@ -641,10 +641,11 @@ export interface CheckoutStyleDto {
641
641
  */
642
642
  color_outline?: string | null;
643
643
  /**
644
- * The URL of the image shown behind the checkout, or null when none has been uploaded. It cannot
645
- * be set directly; upload an image through the background image endpoints instead.
644
+ * The URL of the image shown behind the checkout, or null when there is none. It cannot be set
645
+ * directly; set 'background_media_asset_id' instead.
646
646
  */
647
647
  url_background?: string | null;
648
+ background_media_asset_id?: FlakeId;
648
649
  }
649
650
  export interface CommandAttemptDto {
650
651
  id: FlakeId;
@@ -1082,6 +1083,7 @@ export interface CreateCheckoutStyleDto {
1082
1083
  * default.
1083
1084
  */
1084
1085
  color_outline?: string;
1086
+ background_media_asset_id?: FlakeId;
1085
1087
  }
1086
1088
  export interface CreateCouponDto {
1087
1089
  /**
@@ -1191,8 +1193,8 @@ export interface CreateDownloadableFileDownloadUrlResponseDto {
1191
1193
  }
1192
1194
  export interface CreateEmailBrandingDto {
1193
1195
  color: string;
1194
- header_image_light_url?: string;
1195
- header_image_dark_url?: string;
1196
+ header_image_light_media_asset_id?: FlakeId;
1197
+ header_image_dark_media_asset_id?: FlakeId;
1196
1198
  }
1197
1199
  export interface CreateEmailTemplateDto {
1198
1200
  email_template_type: EmailTemplateTypeDto;
@@ -1271,6 +1273,37 @@ export interface CreateInviteDto {
1271
1273
  */
1272
1274
  user_email: string;
1273
1275
  }
1276
+ /**
1277
+ * Represents a request to start uploading a media file.
1278
+ */
1279
+ export interface CreateMediaUploadRequestDto {
1280
+ /**
1281
+ * The MIME type of the file. One of 'image/png', 'image/jpeg', 'image/webp', 'image/gif' or 'video/mp4'.
1282
+ * @example "image/png"
1283
+ */
1284
+ content_type: string;
1285
+ /**
1286
+ * The size of the file in bytes, at most 20 MB (20971520 bytes).
1287
+ * @format int64
1288
+ * @example 524288
1289
+ */
1290
+ size_bytes: number;
1291
+ }
1292
+ /**
1293
+ * Represents a started media upload.
1294
+ */
1295
+ export interface CreateMediaUploadResponseDto {
1296
+ media_asset_id: FlakeId;
1297
+ /**
1298
+ * The URL to upload the file to with a PUT request, sending the file as the raw request body.
1299
+ */
1300
+ upload_url: string;
1301
+ /**
1302
+ * The date and time after which 'upload_url' stops accepting the upload.
1303
+ * @format date-time
1304
+ */
1305
+ expires_at: string;
1306
+ }
1274
1307
  export interface CreateNavLinkDto {
1275
1308
  tag_id: FlakeId;
1276
1309
  /**
@@ -1395,6 +1428,8 @@ export interface CreateStoreDto {
1395
1428
  * The integration type used by the store.
1396
1429
  */
1397
1430
  integration_type?: string;
1431
+ logo_media_asset_id?: FlakeId;
1432
+ logo_square_media_asset_id?: FlakeId;
1398
1433
  /**
1399
1434
  * Username prefix used to identify Minecraft Bedrock players (e.g. ".").
1400
1435
  */
@@ -2558,6 +2593,8 @@ export interface EmailBrandingDto {
2558
2593
  color: string;
2559
2594
  header_image_light_url?: string | null;
2560
2595
  header_image_dark_url?: string | null;
2596
+ header_image_light_media_asset_id?: FlakeId;
2597
+ header_image_dark_media_asset_id?: FlakeId;
2561
2598
  }
2562
2599
  export interface EmailDeliveryDto {
2563
2600
  id: FlakeId;
@@ -2640,36 +2677,6 @@ export interface ExecutedWebhookDto {
2640
2677
  status_code: number;
2641
2678
  response?: string | null;
2642
2679
  }
2643
- export interface FinishCheckoutStyleBackgroundImageUploadRequestDto {
2644
- image_id: string;
2645
- }
2646
- export interface FinishEmailBrandingImageUploadRequestDto {
2647
- image_id: string;
2648
- dark_mode: boolean;
2649
- }
2650
- export interface FinishProductImageUploadRequestDto {
2651
- /**
2652
- * The ID of the uploaded image returned by the server.
2653
- */
2654
- image_id: string;
2655
- }
2656
- export interface FinishStoreLogoUploadRequestDto {
2657
- /**
2658
- * The ID of the uploaded image returned by the server.
2659
- */
2660
- image_id: string;
2661
- /**
2662
- * Which logo the upload replaces. 1 is the default logo, 2 the square logo.
2663
- * @format int32
2664
- */
2665
- logo_type: number;
2666
- }
2667
- export interface FinishTagImageUploadUrlRequestDto {
2668
- /**
2669
- * The ID of the uploaded image returned by the server.
2670
- */
2671
- image_id: string;
2672
- }
2673
2680
  /**
2674
2681
  * Represents the result of importing an uploaded template archive into a template.
2675
2682
  */
@@ -2820,10 +2827,6 @@ export interface GameserverResult {
2820
2827
  store_id?: FlakeId;
2821
2828
  gameserver?: GameServerDto;
2822
2829
  }
2823
- export interface GetCheckoutStyleBackgroundImageUploadUrlResponseDto {
2824
- id: string;
2825
- upload_url: string;
2826
- }
2827
2830
  export interface GetDimensionStatsResponseDto_V2 {
2828
2831
  dimension_type: StatsDimensionTypeDto_V2;
2829
2832
  revenue_basis: RevenueBasisDto_V2;
@@ -2833,40 +2836,6 @@ export interface GetDistributionResponseDto_V2 {
2833
2836
  distribution_type: StatsDistributionTypeDto_V2;
2834
2837
  entries: Array<DistributionEntryDto_V2>;
2835
2838
  }
2836
- export interface GetEmailBrandingImageUploadUrlResponseDto {
2837
- upload_url: string;
2838
- image_id: string;
2839
- }
2840
- export interface GetProductImageUploadUrlResponseDto {
2841
- /**
2842
- * The ID of the direct image upload URL.
2843
- */
2844
- id: string;
2845
- /**
2846
- * The URL to upload the image to.
2847
- */
2848
- upload_url: string;
2849
- }
2850
- export interface GetStoreLogoUploadUrlResponseDto {
2851
- /**
2852
- * The ID of the direct image upload URL.
2853
- */
2854
- id: string;
2855
- /**
2856
- * The URL to upload the logo to.
2857
- */
2858
- upload_url: string;
2859
- }
2860
- export interface GetTagImageUploadUrlResponseDto {
2861
- /**
2862
- * The ID of the direct image upload URL.
2863
- */
2864
- id: string;
2865
- /**
2866
- * The URL to upload the image to.
2867
- */
2868
- upload_url: string;
2869
- }
2870
2839
  /**
2871
2840
  * Represents a link to download a template's files as an archive.
2872
2841
  */
@@ -3191,6 +3160,10 @@ export interface InlineProductCreateDto {
3191
3160
  * The IDs of associated custom variables.
3192
3161
  */
3193
3162
  custom_variable_ids?: Array<FlakeId> | null;
3163
+ /**
3164
+ * The IDs of the media assets to show as the product's images, in display order.
3165
+ */
3166
+ media_asset_ids?: Array<FlakeId> | null;
3194
3167
  /**
3195
3168
  * Indicates if applying gift cards should be disabled on the product.
3196
3169
  */
@@ -3489,12 +3462,6 @@ export interface MarketingCouponConfigurationDto {
3489
3462
  usable_on_subscriptions: boolean;
3490
3463
  expires_after?: Period;
3491
3464
  }
3492
- /**
3493
- * Query parameters
3494
- */
3495
- export type MarketingGetEmailBrandingImageUploadUrlQuery = {
3496
- dark_mode?: boolean;
3497
- };
3498
3465
  /**
3499
3466
  * Query parameters
3500
3467
  */
@@ -3558,6 +3525,71 @@ export type MarketingGetEmailTemplatesQuery = {
3558
3525
  */
3559
3526
  asc?: boolean;
3560
3527
  };
3528
+ /**
3529
+ * Represents an image or video uploaded to a store's media.
3530
+ */
3531
+ export interface MediaAssetDto {
3532
+ id: FlakeId;
3533
+ store_id: FlakeId;
3534
+ /**
3535
+ * The public URL the media is served from.
3536
+ */
3537
+ url: string;
3538
+ type: MediaAssetTypeDto;
3539
+ /**
3540
+ * The MIME type of the media, for example 'image/png'.
3541
+ */
3542
+ content_type: string;
3543
+ /**
3544
+ * The size of the media in bytes.
3545
+ * @format int64
3546
+ */
3547
+ size_bytes: number;
3548
+ /**
3549
+ * The date and time the media asset was created.
3550
+ * @format date-time
3551
+ */
3552
+ created_at: string;
3553
+ }
3554
+ /**
3555
+ * Specifies the kind of media an asset holds.
3556
+ * - `unknown`: The type is unknown.
3557
+ * - `image`: An image (PNG, JPEG, WEBP or GIF).
3558
+ * - `video`: A video (MP4).
3559
+ */
3560
+ export type MediaAssetTypeDto = "unknown" | "image" | "video";
3561
+ /**
3562
+ * Query parameters
3563
+ */
3564
+ export type MediaListMediaAssetsQuery = {
3565
+ /**
3566
+ * Only return media of this type.
3567
+ */
3568
+ type?: MediaAssetTypeDto;
3569
+ /**
3570
+ * The maximum number of items to return in a single request.
3571
+ * @format int32
3572
+ * @minimum 1
3573
+ * @maximum 100
3574
+ */
3575
+ limit?: number;
3576
+ /**
3577
+ * Returns items after the specified ID.
3578
+ * Used for forward pagination through results.
3579
+ */
3580
+ after?: FlakeId;
3581
+ /**
3582
+ * Returns items before the specified ID.
3583
+ * Used for backward pagination through results.
3584
+ */
3585
+ before?: FlakeId;
3586
+ /**
3587
+ * Determines the sort order of returned items.
3588
+ * When true, items are returned in ascending order.
3589
+ * When false, items are returned in descending order.
3590
+ */
3591
+ asc?: boolean;
3592
+ };
3561
3593
  export interface MoneyDto_V2 {
3562
3594
  /**
3563
3595
  * The ISO 4217 currency code, e.g. "USD", "GBP".
@@ -5144,6 +5176,10 @@ export interface ProductDto {
5144
5176
  * The URL to the product image.
5145
5177
  */
5146
5178
  image_url?: string | null;
5179
+ /**
5180
+ * The product's images in display order. The first image is the primary image.
5181
+ */
5182
+ images: Array<ProductImageDto>;
5147
5183
  /**
5148
5184
  * The unique slug for the product.
5149
5185
  */
@@ -5301,6 +5337,17 @@ export interface ProductGameServerDto {
5301
5337
  */
5302
5338
  enabled: boolean;
5303
5339
  }
5340
+ /**
5341
+ * Represents one of a product's images.
5342
+ */
5343
+ export interface ProductImageDto {
5344
+ media_asset_id: FlakeId;
5345
+ /**
5346
+ * The public URL the image is served from.
5347
+ */
5348
+ url: string;
5349
+ type: MediaAssetTypeDto;
5350
+ }
5304
5351
  export interface ProductPayoutSplitDto {
5305
5352
  user_id: FlakeId;
5306
5353
  /**
@@ -6390,6 +6437,8 @@ export interface StoreDto {
6390
6437
  * URL of the store's square/icon logo image.
6391
6438
  */
6392
6439
  logo_square_url?: string | null;
6440
+ logo_media_asset_id?: FlakeId;
6441
+ logo_square_media_asset_id?: FlakeId;
6393
6442
  /**
6394
6443
  * Username prefix used to identify Minecraft Bedrock players (e.g. ".").
6395
6444
  */
@@ -8141,6 +8190,7 @@ export interface TagDto {
8141
8190
  * The Image URL associated with the tag.
8142
8191
  */
8143
8192
  image_url?: string | null;
8193
+ media_asset_id?: FlakeId;
8144
8194
  /**
8145
8195
  * Indicates whether this tag is enabled.
8146
8196
  */
@@ -8677,6 +8727,7 @@ export interface UpdateCheckoutStyleDto {
8677
8727
  * default.
8678
8728
  */
8679
8729
  color_outline?: string;
8730
+ background_media_asset_id?: FlakeId;
8680
8731
  }
8681
8732
  export interface UpdateCouponDto {
8682
8733
  /**
@@ -8772,8 +8823,8 @@ export interface UpdateCouponDto {
8772
8823
  }
8773
8824
  export interface UpdateEmailBrandingDto {
8774
8825
  color?: string;
8775
- header_image_light_url?: string;
8776
- header_image_dark_url?: string;
8826
+ header_image_light_media_asset_id?: FlakeId;
8827
+ header_image_dark_media_asset_id?: FlakeId;
8777
8828
  }
8778
8829
  export interface UpdateEmailTemplateDto {
8779
8830
  name?: string;
@@ -8974,6 +9025,8 @@ export interface UpdateStoreDto {
8974
9025
  * When set to true, the store is processing real transactions in live mode.
8975
9026
  */
8976
9027
  live_mode?: boolean;
9028
+ logo_media_asset_id?: FlakeId;
9029
+ logo_square_media_asset_id?: FlakeId;
8977
9030
  /**
8978
9031
  * Username prefix used to identify Minecraft Bedrock players (e.g. ".").
8979
9032
  */
@@ -9342,6 +9395,10 @@ export interface UpsertProductRequestDto {
9342
9395
  * The IDs of associated custom variables.
9343
9396
  */
9344
9397
  custom_variable_ids?: Array<FlakeId> | null;
9398
+ /**
9399
+ * The IDs of the media assets to show as the product's images, in display order.
9400
+ */
9401
+ media_asset_ids?: Array<FlakeId> | null;
9345
9402
  /**
9346
9403
  * Indicates if applying gift cards should be disabled on the product.
9347
9404
  */
@@ -9430,6 +9487,7 @@ export interface UpsertTagRequestDto {
9430
9487
  slug?: string | null;
9431
9488
  description?: string | null;
9432
9489
  enabled?: boolean | null;
9490
+ media_asset_id?: FlakeId;
9433
9491
  }
9434
9492
  /**
9435
9493
  * A validation error.