@paynow-gg/typescript-sdk 2.0.1 → 2.0.3

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.
@@ -243,6 +243,11 @@ export interface AffiliateLinkDto {
243
243
  * - `last_referer`: The most recent affiliate link the customer followed is credited.
244
244
  */
245
245
  export type AffiliateLinkRefererTypeDto = "invalid" | "first_referer" | "last_referer";
246
+ export interface AffiliateLinkResult {
247
+ id: FlakeId;
248
+ store_id?: FlakeId;
249
+ affiliate_link?: AffiliateLinkDto;
250
+ }
246
251
  /**
247
252
  * Alipay payment method details
248
253
  */
@@ -258,6 +263,11 @@ export interface AlipayDetailsDto {
258
263
  */
259
264
  fingerprint?: string | null;
260
265
  }
266
+ export interface AvailablePermissionDto {
267
+ id: string;
268
+ name: string;
269
+ description: string;
270
+ }
261
271
  /**
262
272
  * Bancontact payment method details
263
273
  */
@@ -313,6 +323,11 @@ export interface BanIdentityDto {
313
323
  ban_type: BanType;
314
324
  ban_type_value: string;
315
325
  }
326
+ export interface BanResult {
327
+ id: FlakeId;
328
+ store_id?: FlakeId;
329
+ ban?: BanDto;
330
+ }
316
331
  /**
317
332
  * Query parameters
318
333
  */
@@ -497,6 +512,21 @@ export interface CheckoutPaymentInfoDto {
497
512
  */
498
513
  checkout_url?: string | null;
499
514
  }
515
+ export interface CheckoutStyleDto {
516
+ store_id: FlakeId;
517
+ font_family?: string | null;
518
+ /**
519
+ * @format int32
520
+ */
521
+ border_radius?: number | null;
522
+ color_primary?: string | null;
523
+ color_elements?: string | null;
524
+ color_input?: string | null;
525
+ color_background?: string | null;
526
+ color_text?: string | null;
527
+ color_outline?: string | null;
528
+ url_background?: string | null;
529
+ }
500
530
  export interface CommandAttemptDto {
501
531
  id: FlakeId;
502
532
  store_id: FlakeId;
@@ -660,6 +690,11 @@ export type CouponFilterStatusDto = "all" | "active" | "inactive";
660
690
  * - `generated`: Coupon's that were created by the system (basket recover, etc.).
661
691
  */
662
692
  export type CouponFilterTypeDto = "all" | "manual" | "generated";
693
+ export interface CouponResult {
694
+ id: FlakeId;
695
+ store_id?: FlakeId;
696
+ coupon?: CouponDto;
697
+ }
663
698
  /**
664
699
  * Query parameters
665
700
  */
@@ -863,6 +898,19 @@ export interface CreateCheckoutSessionResponseDto {
863
898
  */
864
899
  url: string;
865
900
  }
901
+ export interface CreateCheckoutStyleDto {
902
+ font_family?: string;
903
+ /**
904
+ * @format int32
905
+ */
906
+ border_radius?: number | null;
907
+ color_primary?: string;
908
+ color_elements?: string;
909
+ color_input?: string;
910
+ color_background?: string;
911
+ color_text?: string;
912
+ color_outline?: string;
913
+ }
866
914
  export interface CreateCouponDto {
867
915
  enabled: boolean;
868
916
  code: string;
@@ -916,11 +964,7 @@ export interface CreateCouponDto {
916
964
  */
917
965
  export interface CreateCustomerPortalSessionRequestDto {
918
966
  flow: CustomerPortalSessionFlowDto;
919
- /**
920
- * How long the portal session stays valid, in seconds. When unset, a default expiry is used.
921
- * @format int64
922
- */
923
- expires_in_seconds?: number | null;
967
+ expires_in?: Period;
924
968
  /**
925
969
  * URL to redirect the customer back to after completing the portal flow
926
970
  */
@@ -971,6 +1015,10 @@ export interface CreateGiftCardDto {
971
1015
  */
972
1016
  expires_at?: string | null;
973
1017
  }
1018
+ export interface CreateInviteDto {
1019
+ role_id: FlakeId;
1020
+ user_email: string;
1021
+ }
974
1022
  export interface CreateNavLinkDto {
975
1023
  tag_id: FlakeId;
976
1024
  parent_node_id?: string;
@@ -992,6 +1040,11 @@ export interface CreateRefundRequestDto {
992
1040
  */
993
1041
  refund_from_connected_user_balance?: boolean | null;
994
1042
  }
1043
+ export interface CreateRoleDto {
1044
+ name: string;
1045
+ description: string;
1046
+ permissions?: Record<string, boolean>;
1047
+ }
995
1048
  export interface CreateSaleDto {
996
1049
  enabled: boolean;
997
1050
  name: string;
@@ -1254,6 +1307,11 @@ export interface CustomerPortalSessionFlowDto {
1254
1307
  * - `minecraft_uuid`: Minecraft profile platform - the ID param must be a Minecraft UUID.
1255
1308
  */
1256
1309
  export type CustomerProfilePlatform = "invalid" | "steam" | "minecraft" | "paynow_name" | "paynow" | "minecraft_java_name" | "minecraft_bedrock_name" | "xbox_xuid" | "minecraft_uuid";
1310
+ export interface CustomerResult {
1311
+ id: FlakeId;
1312
+ store_id?: FlakeId;
1313
+ customer: CustomerDto;
1314
+ }
1257
1315
  /**
1258
1316
  * Query parameters
1259
1317
  */
@@ -1577,6 +1635,43 @@ export interface CustomVariableOptionRequestDto {
1577
1635
  Customers can enter numeric values (subject to validation).
1578
1636
  */
1579
1637
  export type CustomVariableType = "dropdown" | "text" | "number";
1638
+ /**
1639
+ * Query parameters
1640
+ */
1641
+ export type DashboardSearchDashboardQuery = {
1642
+ query?: string;
1643
+ search_hints?: Record<string, string>;
1644
+ search_result_type?: DashboardSearchResultTypeDto;
1645
+ /**
1646
+ * The maximum number of items to return in a single request.
1647
+ * @format int32
1648
+ * @minimum 1
1649
+ * @maximum 100
1650
+ */
1651
+ limit?: number;
1652
+ /**
1653
+ * Returns items after the specified ID.
1654
+ * Used for forward pagination through results.
1655
+ */
1656
+ after?: FlakeId;
1657
+ /**
1658
+ * Returns items before the specified ID.
1659
+ * Used for backward pagination through results.
1660
+ */
1661
+ before?: FlakeId;
1662
+ /**
1663
+ * Determines the sort order of returned items.
1664
+ * When true, items are returned in ascending order.
1665
+ * When false, items are returned in descending order.
1666
+ */
1667
+ asc?: boolean;
1668
+ };
1669
+ export interface DashboardSearchHintDto {
1670
+ prefix: string;
1671
+ example: string;
1672
+ description: string;
1673
+ }
1674
+ export type DashboardSearchResultTypeDto = "unknown" | "orders" | "trials" | "subscriptions" | "customers" | "coupons" | "gameservers" | "products" | "sales" | "api_keys" | "bans" | "affiliate_links" | "tags" | "giftcards" | "stores" | "users" | "tickets";
1580
1675
  export interface DashboardStatsDto {
1581
1676
  store_id: FlakeId;
1582
1677
  /**
@@ -2125,10 +2220,30 @@ export interface ExecutedWebhookDto {
2125
2220
  status_code: number;
2126
2221
  response?: string | null;
2127
2222
  }
2223
+ export interface FinishCheckoutStyleBackgroundImageUploadRequestDto {
2224
+ image_id: string;
2225
+ }
2128
2226
  export interface FinishEmailBrandingImageUploadRequestDto {
2129
2227
  image_id: string;
2130
2228
  dark_mode: boolean;
2131
2229
  }
2230
+ export interface FinishProductImageUploadRequestDto {
2231
+ /**
2232
+ * The ID of the uploaded image returned by the server.
2233
+ */
2234
+ image_id: string;
2235
+ }
2236
+ export interface FinishStoreLogoUploadRequestDto {
2237
+ /**
2238
+ * The ID of the uploaded image returned by the server.
2239
+ */
2240
+ image_id: string;
2241
+ /**
2242
+ * Which logo the upload replaces. 1 is the default logo, 2 the square logo.
2243
+ * @format int32
2244
+ */
2245
+ logo_type: number;
2246
+ }
2132
2247
  export interface FinishTagImageUploadUrlRequestDto {
2133
2248
  /**
2134
2249
  * The ID of the uploaded image returned by the server.
@@ -2232,6 +2347,15 @@ export interface GameServerLinkDto {
2232
2347
  last_fetched_commands_at?: string | null;
2233
2348
  last_fetched_commands_from_ip?: string | null;
2234
2349
  }
2350
+ export interface GameserverResult {
2351
+ id: FlakeId;
2352
+ store_id?: FlakeId;
2353
+ gameserver?: GameServerDto;
2354
+ }
2355
+ export interface GetCheckoutStyleBackgroundImageUploadUrlResponseDto {
2356
+ id: string;
2357
+ upload_url: string;
2358
+ }
2235
2359
  export interface GetDimensionStatsResponseDto_V2 {
2236
2360
  dimension_type: StatsDimensionTypeDto_V2;
2237
2361
  revenue_basis: RevenueBasisDto_V2;
@@ -2245,6 +2369,26 @@ export interface GetEmailBrandingImageUploadUrlResponseDto {
2245
2369
  upload_url: string;
2246
2370
  image_id: string;
2247
2371
  }
2372
+ export interface GetProductImageUploadUrlResponseDto {
2373
+ /**
2374
+ * The ID of the direct image upload URL.
2375
+ */
2376
+ id: string;
2377
+ /**
2378
+ * The URL to upload the image to.
2379
+ */
2380
+ upload_url: string;
2381
+ }
2382
+ export interface GetStoreLogoUploadUrlResponseDto {
2383
+ /**
2384
+ * The ID of the direct image upload URL.
2385
+ */
2386
+ id: string;
2387
+ /**
2388
+ * The URL to upload the logo to.
2389
+ */
2390
+ upload_url: string;
2391
+ }
2248
2392
  export interface GetTagImageUploadUrlResponseDto {
2249
2393
  /**
2250
2394
  * The ID of the direct image upload URL.
@@ -2315,6 +2459,11 @@ export interface GiftCardDto {
2315
2459
  canceled_at?: string | null;
2316
2460
  canceled_by?: ActorDto;
2317
2461
  }
2462
+ export interface GiftcardResult {
2463
+ id: FlakeId;
2464
+ store_id?: FlakeId;
2465
+ giftcard?: GiftCardDto;
2466
+ }
2318
2467
  /**
2319
2468
  * Query parameters
2320
2469
  */
@@ -2594,6 +2743,37 @@ export interface IntervalTagStatsDto {
2594
2743
  */
2595
2744
  total_earnings: number;
2596
2745
  }
2746
+ export interface InviteDto {
2747
+ id: FlakeId;
2748
+ store_id: FlakeId;
2749
+ /**
2750
+ * The token the invited user redeems to accept the invite.
2751
+ */
2752
+ token: string;
2753
+ role_id: FlakeId;
2754
+ /**
2755
+ * The email address the invite was sent to.
2756
+ */
2757
+ user_email: string;
2758
+ created_by: ActorDto;
2759
+ /**
2760
+ * When the invite was created.
2761
+ * @format date-time
2762
+ */
2763
+ created_at: string;
2764
+ updated_by?: ActorDto;
2765
+ /**
2766
+ * When the invite was last updated.
2767
+ * @format date-time
2768
+ */
2769
+ updated_at?: string | null;
2770
+ /**
2771
+ * When the invite was accepted. Unset while the invite is still pending.
2772
+ * @format date-time
2773
+ */
2774
+ accepted_at?: string | null;
2775
+ accepted_by_user?: ActorDto;
2776
+ }
2597
2777
  export interface InvoiceDownloadUrlResponseDto {
2598
2778
  /**
2599
2779
  * Temporary URL the invoice document can be downloaded from
@@ -3344,6 +3524,11 @@ export interface OrderLinePayoutSplitDto {
3344
3524
  */
3345
3525
  platform_fee: number;
3346
3526
  }
3527
+ export interface OrderResult {
3528
+ id: FlakeId;
3529
+ store_id?: FlakeId;
3530
+ order?: OrderDto;
3531
+ }
3347
3532
  /**
3348
3533
  * Query parameters
3349
3534
  */
@@ -3870,6 +4055,20 @@ export interface PaymentMethodTypeFeeOverrideDto {
3870
4055
  */
3871
4056
  fee_cents: number;
3872
4057
  countries: Array<string>;
4058
+ card_brands: Array<string>;
4059
+ card_networks: Array<string>;
4060
+ card_funding_types: Array<string>;
4061
+ card_regulated_statuses: Array<string>;
4062
+ card_product_categories: Array<string>;
4063
+ fee_schedule_id?: FlakeId;
4064
+ /**
4065
+ * @format date-time
4066
+ */
4067
+ begins_at: string;
4068
+ /**
4069
+ * @format date-time
4070
+ */
4071
+ ends_at?: string | null;
3873
4072
  }
3874
4073
  /**
3875
4074
  * Represents payout split results for multi-party payments
@@ -4548,6 +4747,15 @@ export interface ProductPricingRegionOverrideDto {
4548
4747
  tax_inclusive?: boolean | null;
4549
4748
  }
4550
4749
  export type ProductRemoveAfterIntervalScale = "invalid" | "day" | "week" | "month";
4750
+ export interface ProductResult {
4751
+ id: FlakeId;
4752
+ store_id?: FlakeId;
4753
+ /**
4754
+ * @format int64
4755
+ */
4756
+ total: number;
4757
+ product?: ProductDto;
4758
+ }
4551
4759
  /**
4552
4760
  * Query parameters
4553
4761
  */
@@ -5069,6 +5277,23 @@ export interface ResendWebhookDto {
5069
5277
  webhook_id: FlakeId;
5070
5278
  }
5071
5279
  export type RevenueBasisDto_V2 = "unspecified" | "gross" | "gross_excluding_taxes" | "net";
5280
+ export interface RoleDto {
5281
+ id: FlakeId;
5282
+ store_id: FlakeId;
5283
+ name: string;
5284
+ description: string;
5285
+ permissions?: Record<string, boolean> | null;
5286
+ created_by: ActorDto;
5287
+ /**
5288
+ * @format date-time
5289
+ */
5290
+ created_at: string;
5291
+ updated_by?: ActorDto;
5292
+ /**
5293
+ * @format date-time
5294
+ */
5295
+ updated_at?: string | null;
5296
+ }
5072
5297
  export type SaleDiscountTypeDto = "percent" | "amount";
5073
5298
  /**
5074
5299
  * Represents a detailed view of a Sale, including configuration and audit information.
@@ -5136,6 +5361,11 @@ export interface SaleDto {
5136
5361
  updated_at?: string | null;
5137
5362
  }
5138
5363
  export type SaleDurationDto = "unspecified" | "once" | "forever" | "repeating";
5364
+ export interface SaleResult {
5365
+ id: FlakeId;
5366
+ store_id?: FlakeId;
5367
+ sale?: SaleDto;
5368
+ }
5139
5369
  /**
5140
5370
  * Object representing a sales tax jurisdiction and its associated taxes.
5141
5371
  */
@@ -5176,6 +5406,91 @@ export interface SalesTaxJurisdictionTaxDto {
5176
5406
  */
5177
5407
  tax_rate: string;
5178
5408
  }
5409
+ export interface SearchDashboardResponseDto {
5410
+ stores: Array<StoreResult>;
5411
+ customers: Array<CustomerResult>;
5412
+ orders: Array<OrderResult>;
5413
+ gameservers: Array<GameserverResult>;
5414
+ products: Array<ProductResult>;
5415
+ coupons: Array<CouponResult>;
5416
+ sales: Array<SaleResult>;
5417
+ giftcards: Array<GiftcardResult>;
5418
+ tags: Array<TagsResult>;
5419
+ affiliate_links: Array<AffiliateLinkResult>;
5420
+ trials: Array<TrialResult>;
5421
+ subscriptions: Array<SubscriptionResult>;
5422
+ bans: Array<BanResult>;
5423
+ facets: {
5424
+ /**
5425
+ * @format int64
5426
+ */
5427
+ unknown?: number;
5428
+ /**
5429
+ * @format int64
5430
+ */
5431
+ orders?: number;
5432
+ /**
5433
+ * @format int64
5434
+ */
5435
+ trials?: number;
5436
+ /**
5437
+ * @format int64
5438
+ */
5439
+ subscriptions?: number;
5440
+ /**
5441
+ * @format int64
5442
+ */
5443
+ customers?: number;
5444
+ /**
5445
+ * @format int64
5446
+ */
5447
+ coupons?: number;
5448
+ /**
5449
+ * @format int64
5450
+ */
5451
+ gameservers?: number;
5452
+ /**
5453
+ * @format int64
5454
+ */
5455
+ products?: number;
5456
+ /**
5457
+ * @format int64
5458
+ */
5459
+ sales?: number;
5460
+ /**
5461
+ * @format int64
5462
+ */
5463
+ api_keys?: number;
5464
+ /**
5465
+ * @format int64
5466
+ */
5467
+ bans?: number;
5468
+ /**
5469
+ * @format int64
5470
+ */
5471
+ affiliate_links?: number;
5472
+ /**
5473
+ * @format int64
5474
+ */
5475
+ tags?: number;
5476
+ /**
5477
+ * @format int64
5478
+ */
5479
+ giftcards?: number;
5480
+ /**
5481
+ * @format int64
5482
+ */
5483
+ stores?: number;
5484
+ /**
5485
+ * @format int64
5486
+ */
5487
+ users?: number;
5488
+ /**
5489
+ * @format int64
5490
+ */
5491
+ tickets?: number;
5492
+ };
5493
+ }
5179
5494
  export interface SetDiscordActionDto {
5180
5495
  discord_server_id: FlakeId;
5181
5496
  action_type: DiscordActionType;
@@ -5240,6 +5555,15 @@ export interface SteamSkinsInventoryItemDetailsDto {
5240
5555
  */
5241
5556
  price: number;
5242
5557
  }
5558
+ /**
5559
+ * Query parameters
5560
+ */
5561
+ export type StoreDeleteStoreLogoQuery = {
5562
+ /**
5563
+ * @format int32
5564
+ */
5565
+ type?: number;
5566
+ };
5243
5567
  /**
5244
5568
  * Represents a PayNow store and its associated configuration.
5245
5569
  */
@@ -5551,6 +5875,11 @@ export type StoreRequirementCategory = "invalid" | "business" | "kyc" | "complia
5551
5875
  */
5552
5876
  export type StoreRequirementStatus = "invalid" | "pending" | "under_review" | "requires_revision" | "approved" | "expired" | "waived" | "rejected_final";
5553
5877
  export type StoreRestrictionFlagDto = "none" | "payments_disabled" | "payouts_disabled";
5878
+ export interface StoreResult {
5879
+ id: FlakeId;
5880
+ store_id?: FlakeId;
5881
+ store: StoreDto;
5882
+ }
5554
5883
  export interface StoreTrustDto {
5555
5884
  store_id: FlakeId;
5556
5885
  status: StoreTrustStatusDto;
@@ -6447,6 +6776,11 @@ export interface SubscriptionLineDto {
6447
6776
  export interface SubscriptionPaymentMethodUpdateFlowDto {
6448
6777
  subscription_id: FlakeId;
6449
6778
  }
6779
+ export interface SubscriptionResult {
6780
+ id: FlakeId;
6781
+ store_id?: FlakeId;
6782
+ subscription?: SubscriptionDto;
6783
+ }
6450
6784
  /**
6451
6785
  * Query parameters
6452
6786
  */
@@ -6546,6 +6880,11 @@ export interface TagDto {
6546
6880
  updated_at?: string | null;
6547
6881
  updated_by?: ActorDto;
6548
6882
  }
6883
+ export interface TagsResult {
6884
+ id: FlakeId;
6885
+ store_id?: FlakeId;
6886
+ tag?: TagDto;
6887
+ }
6549
6888
  export interface TierGroupDto {
6550
6889
  id: FlakeId;
6551
6890
  store_id: FlakeId;
@@ -6739,6 +7078,11 @@ export interface TrialEligibilityOverrideDto {
6739
7078
  deleted_at?: string | null;
6740
7079
  deleted_by?: ActorDto;
6741
7080
  }
7081
+ export interface TrialResult {
7082
+ id: FlakeId;
7083
+ store_id?: FlakeId;
7084
+ trial?: TrialDto;
7085
+ }
6742
7086
  /**
6743
7087
  * Query parameters
6744
7088
  */
@@ -6993,6 +7337,19 @@ export interface UpdateAffiliateLinkDto {
6993
7337
  commission_amount_steps?: Array<AffiliateLinkCommissionAmountStepDto>;
6994
7338
  last_commission_amount_step_repeats?: boolean;
6995
7339
  }
7340
+ export interface UpdateCheckoutStyleDto {
7341
+ font_family?: string;
7342
+ /**
7343
+ * @format int32
7344
+ */
7345
+ border_radius?: number | null;
7346
+ color_primary?: string;
7347
+ color_elements?: string;
7348
+ color_input?: string;
7349
+ color_background?: string;
7350
+ color_text?: string;
7351
+ color_outline?: string;
7352
+ }
6996
7353
  export interface UpdateCouponDto {
6997
7354
  enabled?: boolean;
6998
7355
  code?: string;
@@ -7081,6 +7438,10 @@ export interface UpdateGiftCardDto {
7081
7438
  */
7082
7439
  expires_at?: string | null;
7083
7440
  }
7441
+ export interface UpdateInviteDto {
7442
+ role_id?: FlakeId;
7443
+ user_email?: string;
7444
+ }
7084
7445
  export interface UpdateNavLinkDto {
7085
7446
  tag_id?: FlakeId;
7086
7447
  parent_node_id?: string;
@@ -7102,6 +7463,11 @@ export interface UpdateProductSortOrderRequestDto {
7102
7463
  */
7103
7464
  product_ids: Array<FlakeId>;
7104
7465
  }
7466
+ export interface UpdateRoleDto {
7467
+ name?: string;
7468
+ description?: string;
7469
+ permissions?: Record<string, boolean>;
7470
+ }
7105
7471
  export interface UpdateSaleDto {
7106
7472
  enabled?: boolean;
7107
7473
  name?: string;