@paynow-gg/typescript-sdk 2.1.6 → 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
  */
@@ -1453,7 +1488,7 @@ export interface CreateTrialEligibilityOverrideDto {
1453
1488
  export interface CreateWebhookDto {
1454
1489
  url: string;
1455
1490
  subscribed_to: WebhookEventType;
1456
- type: WebhookType;
1491
+ type: WebhookTypeDto;
1457
1492
  discord_description_template?: string | null;
1458
1493
  discord_title?: string | null;
1459
1494
  discord_color?: string | null;
@@ -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
  /**
@@ -5731,7 +5778,7 @@ export interface QueuedWebhookDto {
5731
5778
  * @format date-time
5732
5779
  */
5733
5780
  created_at: string;
5734
- state: WebhookState;
5781
+ state: WebhookStateDto;
5735
5782
  /**
5736
5783
  * @format date-time
5737
5784
  */
@@ -6188,6 +6235,10 @@ export interface StartDownloadableFileUploadRequestDto {
6188
6235
  file_content_type: string;
6189
6236
  description?: string | null;
6190
6237
  }
6238
+ export interface StartDownloadableFileUploadResponseDto {
6239
+ downloadable_file_id: FlakeId;
6240
+ upload_signed_url: string;
6241
+ }
6191
6242
  export type StatsDimensionTypeDto_V2 = "unspecified" | "product" | "gameserver" | "tag" | "affiliate_link" | "coupon" | "giftcard" | "payout_id";
6192
6243
  export type StatsDistributionTypeDto_V2 = "unspecified" | "order_country" | "payment_method" | "payment_acceptance";
6193
6244
  /**
@@ -6386,6 +6437,8 @@ export interface StoreDto {
6386
6437
  * URL of the store's square/icon logo image.
6387
6438
  */
6388
6439
  logo_square_url?: string | null;
6440
+ logo_media_asset_id?: FlakeId;
6441
+ logo_square_media_asset_id?: FlakeId;
6389
6442
  /**
6390
6443
  * Username prefix used to identify Minecraft Bedrock players (e.g. ".").
6391
6444
  */
@@ -8137,6 +8190,7 @@ export interface TagDto {
8137
8190
  * The Image URL associated with the tag.
8138
8191
  */
8139
8192
  image_url?: string | null;
8193
+ media_asset_id?: FlakeId;
8140
8194
  /**
8141
8195
  * Indicates whether this tag is enabled.
8142
8196
  */
@@ -8673,6 +8727,7 @@ export interface UpdateCheckoutStyleDto {
8673
8727
  * default.
8674
8728
  */
8675
8729
  color_outline?: string;
8730
+ background_media_asset_id?: FlakeId;
8676
8731
  }
8677
8732
  export interface UpdateCouponDto {
8678
8733
  /**
@@ -8768,8 +8823,8 @@ export interface UpdateCouponDto {
8768
8823
  }
8769
8824
  export interface UpdateEmailBrandingDto {
8770
8825
  color?: string;
8771
- header_image_light_url?: string;
8772
- header_image_dark_url?: string;
8826
+ header_image_light_media_asset_id?: FlakeId;
8827
+ header_image_dark_media_asset_id?: FlakeId;
8773
8828
  }
8774
8829
  export interface UpdateEmailTemplateDto {
8775
8830
  name?: string;
@@ -8970,6 +9025,8 @@ export interface UpdateStoreDto {
8970
9025
  * When set to true, the store is processing real transactions in live mode.
8971
9026
  */
8972
9027
  live_mode?: boolean;
9028
+ logo_media_asset_id?: FlakeId;
9029
+ logo_square_media_asset_id?: FlakeId;
8973
9030
  /**
8974
9031
  * Username prefix used to identify Minecraft Bedrock players (e.g. ".").
8975
9032
  */
@@ -9338,6 +9395,10 @@ export interface UpsertProductRequestDto {
9338
9395
  * The IDs of associated custom variables.
9339
9396
  */
9340
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;
9341
9402
  /**
9342
9403
  * Indicates if applying gift cards should be disabled on the product.
9343
9404
  */
@@ -9426,6 +9487,7 @@ export interface UpsertTagRequestDto {
9426
9487
  slug?: string | null;
9427
9488
  description?: string | null;
9428
9489
  enabled?: boolean | null;
9490
+ media_asset_id?: FlakeId;
9429
9491
  }
9430
9492
  /**
9431
9493
  * A validation error.
@@ -9482,7 +9544,7 @@ export type WebhooksGetHistoryQuery = {
9482
9544
  */
9483
9545
  state?: string;
9484
9546
  };
9485
- export type WebhookState = "success" | "pending" | "failed" | "all";
9547
+ export type WebhookStateDto = "success" | "pending" | "failed" | "all";
9486
9548
  /**
9487
9549
  * Represents a webhook subscription: an endpoint that receives a request whenever one of the
9488
9550
  * subscribed events happens in the store.
@@ -9490,7 +9552,7 @@ export type WebhookState = "success" | "pending" | "failed" | "all";
9490
9552
  export interface WebhookSubscriptionDto {
9491
9553
  id: FlakeId;
9492
9554
  /**
9493
- * The URL each event is delivered to. For the 'discord_v1' type this is the Discord webhook URL.
9555
+ * The URL each event is delivered to. For the 'DiscordV1' type this is the Discord webhook URL.
9494
9556
  */
9495
9557
  url: string;
9496
9558
  /**
@@ -9499,24 +9561,29 @@ export interface WebhookSubscriptionDto {
9499
9561
  */
9500
9562
  secret: string;
9501
9563
  subscribed_to: WebhookEventType;
9502
- type: WebhookType;
9564
+ type: WebhookTypeDto;
9503
9565
  /**
9504
9566
  * The template rendered into the body of the Discord message, with webhook variables substituted.
9505
- * Only used by the 'discord_v1' type.
9567
+ * Only used by the 'DiscordV1' type.
9506
9568
  */
9507
9569
  discord_description_template?: string | null;
9508
9570
  /**
9509
- * The title of the Discord embed. Only used by the 'discord_v1' type with the 'embed' format.
9571
+ * The title of the Discord embed. Only used by the 'DiscordV1' type with the 'Embed' format.
9510
9572
  */
9511
9573
  discord_title?: string | null;
9512
9574
  /**
9513
- * The accent colour of the Discord embed, as a hex colour. Only used by the 'discord_v1' type
9514
- * with the 'embed' format.
9575
+ * The accent colour of the Discord embed, as a hex colour. Only used by the 'DiscordV1' type
9576
+ * with the 'Embed' format.
9515
9577
  */
9516
9578
  discord_color?: string | null;
9517
9579
  discord_format?: WebhookDiscordFormatDto;
9518
9580
  }
9519
- export type WebhookType = "json_v1" | "discord_v1";
9581
+ /**
9582
+ * Specifies the payload format a webhook delivers.
9583
+ * - `JsonV1`: The event is posted as JSON. This is the default.
9584
+ * - `DiscordV1`: The event is posted as a Discord message.
9585
+ */
9586
+ export type WebhookTypeDto = "JsonV1" | "DiscordV1";
9520
9587
  export interface WebhookVariablesDto {
9521
9588
  event_type: WebhookEventType;
9522
9589
  variables: Array<string>;