@paynow-gg/typescript-sdk 1.0.1 → 1.0.6

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 (146) hide show
  1. package/README.md +4 -4
  2. package/dist/client.d.ts +71 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +51 -0
  5. package/dist/client.js.map +1 -0
  6. package/dist/errors.d.ts +7 -0
  7. package/dist/errors.d.ts.map +1 -0
  8. package/dist/errors.js +14 -0
  9. package/dist/errors.js.map +1 -0
  10. package/dist/generate.d.ts +2 -0
  11. package/dist/generate.d.ts.map +1 -0
  12. package/dist/generate.js +97 -0
  13. package/dist/generate.js.map +1 -0
  14. package/dist/generated/management.d.ts +9173 -0
  15. package/dist/generated/management.d.ts.map +1 -0
  16. package/dist/generated/management.js +510 -0
  17. package/dist/generated/management.js.map +1 -0
  18. package/dist/generated/storefront.d.ts +1660 -0
  19. package/dist/generated/storefront.d.ts.map +1 -0
  20. package/dist/generated/storefront.js +62 -0
  21. package/dist/generated/storefront.js.map +1 -0
  22. package/dist/index.d.ts +4 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +7 -5
  25. package/dist/index.js.map +1 -1
  26. package/dist/management.d.ts +6 -21
  27. package/dist/management.d.ts.map +1 -1
  28. package/dist/management.js +8 -58
  29. package/dist/management.js.map +1 -1
  30. package/dist/storefront.d.ts +6 -20
  31. package/dist/storefront.d.ts.map +1 -1
  32. package/dist/storefront.js +9 -59
  33. package/dist/storefront.js.map +1 -1
  34. package/package.json +5 -4
  35. package/dist/base-api.d.ts +0 -58
  36. package/dist/base-api.d.ts.map +0 -1
  37. package/dist/base-api.js +0 -103
  38. package/dist/base-api.js.map +0 -1
  39. package/dist/management-client/client/client.d.ts +0 -3
  40. package/dist/management-client/client/client.d.ts.map +0 -1
  41. package/dist/management-client/client/client.js +0 -100
  42. package/dist/management-client/client/client.js.map +0 -1
  43. package/dist/management-client/client/index.d.ts +0 -8
  44. package/dist/management-client/client/index.d.ts.map +0 -1
  45. package/dist/management-client/client/index.js +0 -14
  46. package/dist/management-client/client/index.js.map +0 -1
  47. package/dist/management-client/client/types.d.ts +0 -94
  48. package/dist/management-client/client/types.d.ts.map +0 -1
  49. package/dist/management-client/client/types.js +0 -3
  50. package/dist/management-client/client/types.js.map +0 -1
  51. package/dist/management-client/client/utils.d.ts +0 -21
  52. package/dist/management-client/client/utils.d.ts.map +0 -1
  53. package/dist/management-client/client/utils.js +0 -226
  54. package/dist/management-client/client/utils.js.map +0 -1
  55. package/dist/management-client/client.gen.d.ts +0 -13
  56. package/dist/management-client/client.gen.d.ts.map +0 -1
  57. package/dist/management-client/client.gen.js +0 -9
  58. package/dist/management-client/client.gen.js.map +0 -1
  59. package/dist/management-client/core/auth.d.ts +0 -19
  60. package/dist/management-client/core/auth.d.ts.map +0 -1
  61. package/dist/management-client/core/auth.js +0 -18
  62. package/dist/management-client/core/auth.js.map +0 -1
  63. package/dist/management-client/core/bodySerializer.d.ts +0 -18
  64. package/dist/management-client/core/bodySerializer.d.ts.map +0 -1
  65. package/dist/management-client/core/bodySerializer.js +0 -57
  66. package/dist/management-client/core/bodySerializer.js.map +0 -1
  67. package/dist/management-client/core/params.d.ts +0 -24
  68. package/dist/management-client/core/params.d.ts.map +0 -1
  69. package/dist/management-client/core/params.js +0 -92
  70. package/dist/management-client/core/params.js.map +0 -1
  71. package/dist/management-client/core/pathSerializer.d.ts +0 -34
  72. package/dist/management-client/core/pathSerializer.d.ts.map +0 -1
  73. package/dist/management-client/core/pathSerializer.js +0 -123
  74. package/dist/management-client/core/pathSerializer.js.map +0 -1
  75. package/dist/management-client/core/types.d.ts +0 -74
  76. package/dist/management-client/core/types.d.ts.map +0 -1
  77. package/dist/management-client/core/types.js +0 -3
  78. package/dist/management-client/core/types.js.map +0 -1
  79. package/dist/management-client/index.d.ts +0 -3
  80. package/dist/management-client/index.d.ts.map +0 -1
  81. package/dist/management-client/index.js +0 -20
  82. package/dist/management-client/index.js.map +0 -1
  83. package/dist/management-client/sdk.gen.d.ts +0 -482
  84. package/dist/management-client/sdk.gen.d.ts.map +0 -1
  85. package/dist/management-client/sdk.gen.js +0 -2169
  86. package/dist/management-client/sdk.gen.js.map +0 -1
  87. package/dist/management-client/types.gen.d.ts +0 -6676
  88. package/dist/management-client/types.gen.d.ts.map +0 -1
  89. package/dist/management-client/types.gen.js +0 -380
  90. package/dist/management-client/types.gen.js.map +0 -1
  91. package/dist/storefront-client/client/client.d.ts +0 -3
  92. package/dist/storefront-client/client/client.d.ts.map +0 -1
  93. package/dist/storefront-client/client/client.js +0 -100
  94. package/dist/storefront-client/client/client.js.map +0 -1
  95. package/dist/storefront-client/client/index.d.ts +0 -8
  96. package/dist/storefront-client/client/index.d.ts.map +0 -1
  97. package/dist/storefront-client/client/index.js +0 -14
  98. package/dist/storefront-client/client/index.js.map +0 -1
  99. package/dist/storefront-client/client/types.d.ts +0 -94
  100. package/dist/storefront-client/client/types.d.ts.map +0 -1
  101. package/dist/storefront-client/client/types.js +0 -3
  102. package/dist/storefront-client/client/types.js.map +0 -1
  103. package/dist/storefront-client/client/utils.d.ts +0 -21
  104. package/dist/storefront-client/client/utils.d.ts.map +0 -1
  105. package/dist/storefront-client/client/utils.js +0 -226
  106. package/dist/storefront-client/client/utils.js.map +0 -1
  107. package/dist/storefront-client/client.gen.d.ts +0 -13
  108. package/dist/storefront-client/client.gen.d.ts.map +0 -1
  109. package/dist/storefront-client/client.gen.js +0 -9
  110. package/dist/storefront-client/client.gen.js.map +0 -1
  111. package/dist/storefront-client/core/auth.d.ts +0 -19
  112. package/dist/storefront-client/core/auth.d.ts.map +0 -1
  113. package/dist/storefront-client/core/auth.js +0 -18
  114. package/dist/storefront-client/core/auth.js.map +0 -1
  115. package/dist/storefront-client/core/bodySerializer.d.ts +0 -18
  116. package/dist/storefront-client/core/bodySerializer.d.ts.map +0 -1
  117. package/dist/storefront-client/core/bodySerializer.js +0 -57
  118. package/dist/storefront-client/core/bodySerializer.js.map +0 -1
  119. package/dist/storefront-client/core/params.d.ts +0 -24
  120. package/dist/storefront-client/core/params.d.ts.map +0 -1
  121. package/dist/storefront-client/core/params.js +0 -92
  122. package/dist/storefront-client/core/params.js.map +0 -1
  123. package/dist/storefront-client/core/pathSerializer.d.ts +0 -34
  124. package/dist/storefront-client/core/pathSerializer.d.ts.map +0 -1
  125. package/dist/storefront-client/core/pathSerializer.js +0 -123
  126. package/dist/storefront-client/core/pathSerializer.js.map +0 -1
  127. package/dist/storefront-client/core/types.d.ts +0 -74
  128. package/dist/storefront-client/core/types.d.ts.map +0 -1
  129. package/dist/storefront-client/core/types.js +0 -3
  130. package/dist/storefront-client/core/types.js.map +0 -1
  131. package/dist/storefront-client/index.d.ts +0 -3
  132. package/dist/storefront-client/index.d.ts.map +0 -1
  133. package/dist/storefront-client/index.js +0 -20
  134. package/dist/storefront-client/index.js.map +0 -1
  135. package/dist/storefront-client/sdk.gen.d.ts +0 -100
  136. package/dist/storefront-client/sdk.gen.d.ts.map +0 -1
  137. package/dist/storefront-client/sdk.gen.js +0 -296
  138. package/dist/storefront-client/sdk.gen.js.map +0 -1
  139. package/dist/storefront-client/types.gen.d.ts +0 -1410
  140. package/dist/storefront-client/types.gen.d.ts.map +0 -1
  141. package/dist/storefront-client/types.gen.js +0 -58
  142. package/dist/storefront-client/types.gen.js.map +0 -1
  143. package/dist/types.d.ts +0 -49
  144. package/dist/types.d.ts.map +0 -1
  145. package/dist/types.js +0 -9
  146. package/dist/types.js.map +0 -1
@@ -1,380 +0,0 @@
1
- "use strict";
2
- // This file is auto-generated by @hey-api/openapi-ts
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.WebhookType = exports.WebhookState = exports.WebhookEventType = exports.TrustStoreOnboardingStatus = exports.TrialStatusDto = exports.SubscriptionStatus = exports.StoreRequirementStatus = exports.StoreRequirementCategory = exports.StoreRequirementActionParty = exports.SaleDiscountType = exports.RefundStatus = exports.QueuedDiscordActionStatus = exports.QueuedDiscordActionExecutionStatus = exports.ProductTaxCode = exports.ProductSubscriptionIntervalScale = exports.ProductStockTimeScale = exports.ProductRemoveAfterIntervalScale = exports.ProductCommandStage = exports.PaymentDeclineCode = exports.PayNowActorType = exports.OrderType = exports.OrderStatus = exports.DiscordActionType = exports.DiscordActionRevocationStage = exports.DiscordActionExecutionStage = exports.DeliveryItemStateDto = exports.CustomerProfilePlatform = exports.CustomerMinecraftPlatform = exports.CustomVariableType = exports.CustomVariableOptionPriceType = exports.CouponFilterTypeEnum = exports.CouponFilterStatusEnum = exports.CouponDurationEnum = exports.CouponDiscountTypeEnum = exports.BanType = exports.AffiliateLinkRefererType = exports.AffiliateLinkDiscountType = exports.AffiliateLinkCommissionType = void 0;
5
- var AffiliateLinkCommissionType;
6
- (function (AffiliateLinkCommissionType) {
7
- AffiliateLinkCommissionType["NONE"] = "none";
8
- AffiliateLinkCommissionType["FIXED"] = "fixed";
9
- AffiliateLinkCommissionType["PERCENTAGE"] = "percentage";
10
- })(AffiliateLinkCommissionType || (exports.AffiliateLinkCommissionType = AffiliateLinkCommissionType = {}));
11
- var AffiliateLinkDiscountType;
12
- (function (AffiliateLinkDiscountType) {
13
- AffiliateLinkDiscountType["NONE"] = "none";
14
- AffiliateLinkDiscountType["FIXED"] = "fixed";
15
- AffiliateLinkDiscountType["PERCENTAGE"] = "percentage";
16
- })(AffiliateLinkDiscountType || (exports.AffiliateLinkDiscountType = AffiliateLinkDiscountType = {}));
17
- var AffiliateLinkRefererType;
18
- (function (AffiliateLinkRefererType) {
19
- AffiliateLinkRefererType["INVALID"] = "invalid";
20
- AffiliateLinkRefererType["FIRST_REFERER"] = "first_referer";
21
- AffiliateLinkRefererType["LAST_REFERER"] = "last_referer";
22
- })(AffiliateLinkRefererType || (exports.AffiliateLinkRefererType = AffiliateLinkRefererType = {}));
23
- var BanType;
24
- (function (BanType) {
25
- BanType["UNKNOWN"] = "unknown";
26
- BanType["STEAM"] = "steam";
27
- BanType["IP"] = "ip";
28
- BanType["CUSTOMER"] = "customer";
29
- BanType["CUSTOMER_NAME"] = "customer_name";
30
- BanType["EMAIL"] = "email";
31
- })(BanType || (exports.BanType = BanType = {}));
32
- /**
33
- * Specifies the type of discount applied by a coupon.
34
- */
35
- var CouponDiscountTypeEnum;
36
- (function (CouponDiscountTypeEnum) {
37
- CouponDiscountTypeEnum["UNSPECIFIED"] = "unspecified";
38
- CouponDiscountTypeEnum["PERCENT"] = "percent";
39
- CouponDiscountTypeEnum["AMOUNT"] = "amount";
40
- })(CouponDiscountTypeEnum || (exports.CouponDiscountTypeEnum = CouponDiscountTypeEnum = {}));
41
- /**
42
- * Defines the duration for which a coupon remains valid.
43
- */
44
- var CouponDurationEnum;
45
- (function (CouponDurationEnum) {
46
- CouponDurationEnum["ONCE"] = "once";
47
- CouponDurationEnum["FOREVER"] = "forever";
48
- CouponDurationEnum["REPEATING"] = "repeating";
49
- })(CouponDurationEnum || (exports.CouponDurationEnum = CouponDurationEnum = {}));
50
- /**
51
- * Will filter by coupon status.
52
- */
53
- var CouponFilterStatusEnum;
54
- (function (CouponFilterStatusEnum) {
55
- CouponFilterStatusEnum["ALL"] = "all";
56
- CouponFilterStatusEnum["ACTIVE"] = "active";
57
- CouponFilterStatusEnum["INACTIVE"] = "inactive";
58
- })(CouponFilterStatusEnum || (exports.CouponFilterStatusEnum = CouponFilterStatusEnum = {}));
59
- /**
60
- * Will filter by coupon creation type.
61
- */
62
- var CouponFilterTypeEnum;
63
- (function (CouponFilterTypeEnum) {
64
- CouponFilterTypeEnum["ALL"] = "all";
65
- CouponFilterTypeEnum["MANUAL"] = "manual";
66
- CouponFilterTypeEnum["GENERATED"] = "generated";
67
- })(CouponFilterTypeEnum || (exports.CouponFilterTypeEnum = CouponFilterTypeEnum = {}));
68
- /**
69
- * Defines how option pricing should be applied to the base product price.
70
- */
71
- var CustomVariableOptionPriceType;
72
- (function (CustomVariableOptionPriceType) {
73
- CustomVariableOptionPriceType["FIXED"] = "fixed";
74
- CustomVariableOptionPriceType["PERCENTAGE"] = "percentage";
75
- })(CustomVariableOptionPriceType || (exports.CustomVariableOptionPriceType = CustomVariableOptionPriceType = {}));
76
- /**
77
- * Defines the type of input method for a custom variable.
78
- */
79
- var CustomVariableType;
80
- (function (CustomVariableType) {
81
- CustomVariableType["DROPDOWN"] = "dropdown";
82
- CustomVariableType["TEXT"] = "text";
83
- CustomVariableType["NUMBER"] = "number";
84
- })(CustomVariableType || (exports.CustomVariableType = CustomVariableType = {}));
85
- var CustomerMinecraftPlatform;
86
- (function (CustomerMinecraftPlatform) {
87
- CustomerMinecraftPlatform["UNKNOWN"] = "unknown";
88
- CustomerMinecraftPlatform["JAVA"] = "java";
89
- CustomerMinecraftPlatform["BEDROCK"] = "bedrock";
90
- })(CustomerMinecraftPlatform || (exports.CustomerMinecraftPlatform = CustomerMinecraftPlatform = {}));
91
- /**
92
- * A customer platform type used while gifting
93
- */
94
- var CustomerProfilePlatform;
95
- (function (CustomerProfilePlatform) {
96
- CustomerProfilePlatform["INVALID"] = "invalid";
97
- CustomerProfilePlatform["STEAM"] = "steam";
98
- CustomerProfilePlatform["MINECRAFT"] = "minecraft";
99
- CustomerProfilePlatform["PAYNOW_NAME"] = "paynow_name";
100
- })(CustomerProfilePlatform || (exports.CustomerProfilePlatform = CustomerProfilePlatform = {}));
101
- var DeliveryItemStateDto;
102
- (function (DeliveryItemStateDto) {
103
- DeliveryItemStateDto["USABLE"] = "usable";
104
- DeliveryItemStateDto["ACTIVE"] = "active";
105
- DeliveryItemStateDto["USED"] = "used";
106
- DeliveryItemStateDto["REVOKED"] = "revoked";
107
- DeliveryItemStateDto["RENEWED"] = "renewed";
108
- })(DeliveryItemStateDto || (exports.DeliveryItemStateDto = DeliveryItemStateDto = {}));
109
- var DiscordActionExecutionStage;
110
- (function (DiscordActionExecutionStage) {
111
- DiscordActionExecutionStage["ON_PURCHASE"] = "on_purchase";
112
- DiscordActionExecutionStage["ON_EXPIRE"] = "on_expire";
113
- DiscordActionExecutionStage["ON_REFUND"] = "on_refund";
114
- DiscordActionExecutionStage["ON_CHARGEBACK"] = "on_chargeback";
115
- })(DiscordActionExecutionStage || (exports.DiscordActionExecutionStage = DiscordActionExecutionStage = {}));
116
- var DiscordActionRevocationStage;
117
- (function (DiscordActionRevocationStage) {
118
- DiscordActionRevocationStage["ON_EXPIRE"] = "on_expire";
119
- DiscordActionRevocationStage["ON_REFUND"] = "on_refund";
120
- DiscordActionRevocationStage["ON_CHARGEBACK"] = "on_chargeback";
121
- })(DiscordActionRevocationStage || (exports.DiscordActionRevocationStage = DiscordActionRevocationStage = {}));
122
- var DiscordActionType;
123
- (function (DiscordActionType) {
124
- DiscordActionType["PERSIST_ROLE"] = "persist_role";
125
- DiscordActionType["SEND_MESSAGE"] = "send_message";
126
- DiscordActionType["BAN_USER"] = "ban_user";
127
- DiscordActionType["KICK_USER"] = "kick_user";
128
- DiscordActionType["GENERATE_INVITE_LINK"] = "generate_invite_link";
129
- })(DiscordActionType || (exports.DiscordActionType = DiscordActionType = {}));
130
- var OrderStatus;
131
- (function (OrderStatus) {
132
- OrderStatus["CREATED"] = "created";
133
- OrderStatus["COMPLETED"] = "completed";
134
- OrderStatus["CANCELED"] = "canceled";
135
- OrderStatus["REFUNDED"] = "refunded";
136
- OrderStatus["CHARGEBACK"] = "chargeback";
137
- })(OrderStatus || (exports.OrderStatus = OrderStatus = {}));
138
- /**
139
- * Defines the type of items contained in an order
140
- */
141
- var OrderType;
142
- (function (OrderType) {
143
- OrderType["ONE_TIME"] = "one_time";
144
- OrderType["SUBSCRIPTION"] = "subscription";
145
- OrderType["MIXED"] = "mixed";
146
- })(OrderType || (exports.OrderType = OrderType = {}));
147
- var PayNowActorType;
148
- (function (PayNowActorType) {
149
- PayNowActorType["ANONYMOUS"] = "anonymous";
150
- PayNowActorType["USER"] = "user";
151
- PayNowActorType["CUSTOMER"] = "customer";
152
- PayNowActorType["API_KEY"] = "api_key";
153
- PayNowActorType["GAME_SERVER"] = "game_server";
154
- PayNowActorType["ADMIN"] = "admin";
155
- PayNowActorType["INTERNAL"] = "internal";
156
- PayNowActorType["PLATFORM"] = "platform";
157
- PayNowActorType["GLOBAL_CUSTOMER"] = "global_customer";
158
- })(PayNowActorType || (exports.PayNowActorType = PayNowActorType = {}));
159
- /**
160
- * A payment decline reason code.
161
- */
162
- var PaymentDeclineCode;
163
- (function (PaymentDeclineCode) {
164
- PaymentDeclineCode["UNKNOWN"] = "unknown";
165
- PaymentDeclineCode["GENERIC_DECLINE"] = "generic_decline";
166
- PaymentDeclineCode["CALL_ISSUER"] = "call_issuer";
167
- PaymentDeclineCode["AUTHENTICATION_REQUIRED"] = "authentication_required";
168
- PaymentDeclineCode["CURRENCY_NOT_SUPPORTED"] = "currency_not_supported";
169
- PaymentDeclineCode["DUPLICATE_TRANSACTION"] = "duplicate_transaction";
170
- PaymentDeclineCode["EXPIRED_CARD"] = "expired_card";
171
- PaymentDeclineCode["FRAUDULENT"] = "fraudulent";
172
- PaymentDeclineCode["INCORRECT_NUMBER"] = "incorrect_number";
173
- PaymentDeclineCode["INCORRECT_CVC"] = "incorrect_cvc";
174
- PaymentDeclineCode["INCORRECT_PIN"] = "incorrect_pin";
175
- PaymentDeclineCode["INCORRECT_ZIP"] = "incorrect_zip";
176
- PaymentDeclineCode["INSUFFICIENT_FUNDS"] = "insufficient_funds";
177
- PaymentDeclineCode["INVALID_ACCOUNT"] = "invalid_account";
178
- PaymentDeclineCode["INVALID_AMOUNT"] = "invalid_amount";
179
- PaymentDeclineCode["INVALID_EXPIRY_MONTH"] = "invalid_expiry_month";
180
- PaymentDeclineCode["INVALID_EXPIRY_YEAR"] = "invalid_expiry_year";
181
- PaymentDeclineCode["ISSUER_NOT_AVAILABLE"] = "issuer_not_available";
182
- PaymentDeclineCode["LOST_CARD"] = "lost_card";
183
- PaymentDeclineCode["MERCHANT_BLACKLIST"] = "merchant_blacklist";
184
- PaymentDeclineCode["NEW_ACCOUNT_INFORMATION_AVAILABLE"] = "new_account_information_available";
185
- PaymentDeclineCode["NO_ACTION_TAKEN"] = "no_action_taken";
186
- PaymentDeclineCode["PICKUP_CARD"] = "pickup_card";
187
- PaymentDeclineCode["PIN_TRY_EXCEEDED"] = "pin_try_exceeded";
188
- PaymentDeclineCode["RESTRICTED_CARD"] = "restricted_card";
189
- PaymentDeclineCode["STOLEN_CARD"] = "stolen_card";
190
- PaymentDeclineCode["TESTMODE_DECLINE"] = "testmode_decline";
191
- PaymentDeclineCode["TRY_AGAIN_LATER"] = "try_again_later";
192
- PaymentDeclineCode["SECURITY_VIOLATION"] = "security_violation";
193
- PaymentDeclineCode["CARD_VELOCITY_EXCEEDED"] = "card_velocity_exceeded";
194
- PaymentDeclineCode["DO_NOT_HONOR"] = "do_not_honor";
195
- PaymentDeclineCode["PROCESSING_ERROR"] = "processing_error";
196
- PaymentDeclineCode["CARD_NOT_SUPPORTED"] = "card_not_supported";
197
- PaymentDeclineCode["TRANSACTION_NOT_ALLOWED"] = "transaction_not_allowed";
198
- PaymentDeclineCode["AUTHORIZATION_REVOKED"] = "authorization_revoked";
199
- })(PaymentDeclineCode || (exports.PaymentDeclineCode = PaymentDeclineCode = {}));
200
- /**
201
- * Defines the stages at which product commands can be executed.
202
- */
203
- var ProductCommandStage;
204
- (function (ProductCommandStage) {
205
- ProductCommandStage["INVALID"] = "invalid";
206
- ProductCommandStage["ON_PURCHASE"] = "on_purchase";
207
- ProductCommandStage["ON_EXPIRE"] = "on_expire";
208
- ProductCommandStage["ON_REFUND"] = "on_refund";
209
- ProductCommandStage["ON_RENEW"] = "on_renew";
210
- ProductCommandStage["ON_CHARGEBACK"] = "on_chargeback";
211
- ProductCommandStage["ON_TRIAL_START"] = "on_trial_start";
212
- ProductCommandStage["ON_TRIAL_EXPIRE"] = "on_trial_expire";
213
- })(ProductCommandStage || (exports.ProductCommandStage = ProductCommandStage = {}));
214
- var ProductRemoveAfterIntervalScale;
215
- (function (ProductRemoveAfterIntervalScale) {
216
- ProductRemoveAfterIntervalScale["INVALID"] = "invalid";
217
- ProductRemoveAfterIntervalScale["DAY"] = "day";
218
- ProductRemoveAfterIntervalScale["WEEK"] = "week";
219
- ProductRemoveAfterIntervalScale["MONTH"] = "month";
220
- })(ProductRemoveAfterIntervalScale || (exports.ProductRemoveAfterIntervalScale = ProductRemoveAfterIntervalScale = {}));
221
- var ProductStockTimeScale;
222
- (function (ProductStockTimeScale) {
223
- ProductStockTimeScale["INVALID"] = "invalid";
224
- ProductStockTimeScale["DAY"] = "day";
225
- ProductStockTimeScale["WEEK"] = "week";
226
- ProductStockTimeScale["MONTH"] = "month";
227
- ProductStockTimeScale["YEAR"] = "year";
228
- })(ProductStockTimeScale || (exports.ProductStockTimeScale = ProductStockTimeScale = {}));
229
- var ProductSubscriptionIntervalScale;
230
- (function (ProductSubscriptionIntervalScale) {
231
- ProductSubscriptionIntervalScale["INVALID"] = "invalid";
232
- ProductSubscriptionIntervalScale["DAY"] = "day";
233
- ProductSubscriptionIntervalScale["WEEK"] = "week";
234
- ProductSubscriptionIntervalScale["MONTH"] = "month";
235
- ProductSubscriptionIntervalScale["YEAR"] = "year";
236
- })(ProductSubscriptionIntervalScale || (exports.ProductSubscriptionIntervalScale = ProductSubscriptionIntervalScale = {}));
237
- /**
238
- * Determines the category of the product for taxation purposes.
239
- * Contact support for help with setting the correct tax code.
240
- */
241
- var ProductTaxCode;
242
- (function (ProductTaxCode) {
243
- ProductTaxCode["UNKNOWN"] = "unknown";
244
- ProductTaxCode["DIGITAL_GOODS_SUBSCRIPTION"] = "digital_goods_subscription";
245
- ProductTaxCode["DIGITAL_GOODS_PERMANENT"] = "digital_goods_permanent";
246
- ProductTaxCode["SAAS"] = "saas";
247
- ProductTaxCode["DOWNLOADED_SOFTWARE"] = "downloaded_software";
248
- ProductTaxCode["DIGITAL_GOODS_SUBSCRIPTION_GAMING"] = "digital_goods_subscription_gaming";
249
- ProductTaxCode["DIGITAL_GOODS_PERMANENT_GAMING"] = "digital_goods_permanent_gaming";
250
- })(ProductTaxCode || (exports.ProductTaxCode = ProductTaxCode = {}));
251
- var QueuedDiscordActionExecutionStatus;
252
- (function (QueuedDiscordActionExecutionStatus) {
253
- QueuedDiscordActionExecutionStatus["SUCCESS"] = "success";
254
- QueuedDiscordActionExecutionStatus["FAILURE"] = "failure";
255
- })(QueuedDiscordActionExecutionStatus || (exports.QueuedDiscordActionExecutionStatus = QueuedDiscordActionExecutionStatus = {}));
256
- var QueuedDiscordActionStatus;
257
- (function (QueuedDiscordActionStatus) {
258
- QueuedDiscordActionStatus["ACTIVE"] = "active";
259
- QueuedDiscordActionStatus["COMPLETE"] = "complete";
260
- QueuedDiscordActionStatus["ERRORED"] = "errored";
261
- QueuedDiscordActionStatus["CANCELED"] = "canceled";
262
- })(QueuedDiscordActionStatus || (exports.QueuedDiscordActionStatus = QueuedDiscordActionStatus = {}));
263
- /**
264
- * Represents the current status of a refund in the system
265
- */
266
- var RefundStatus;
267
- (function (RefundStatus) {
268
- RefundStatus["CREATED"] = "created";
269
- RefundStatus["APPROVED"] = "approved";
270
- RefundStatus["PROCESSING"] = "processing";
271
- RefundStatus["COMPLETED"] = "completed";
272
- RefundStatus["CANCELED"] = "canceled";
273
- RefundStatus["FAILED"] = "failed";
274
- })(RefundStatus || (exports.RefundStatus = RefundStatus = {}));
275
- var SaleDiscountType;
276
- (function (SaleDiscountType) {
277
- SaleDiscountType["PERCENT"] = "percent";
278
- SaleDiscountType["AMOUNT"] = "amount";
279
- })(SaleDiscountType || (exports.SaleDiscountType = SaleDiscountType = {}));
280
- /**
281
- * Determines the party that needs to perform or requests a verification
282
- */
283
- var StoreRequirementActionParty;
284
- (function (StoreRequirementActionParty) {
285
- StoreRequirementActionParty["INVALID"] = "invalid";
286
- StoreRequirementActionParty["STORE"] = "store";
287
- StoreRequirementActionParty["PAYNOW"] = "paynow";
288
- StoreRequirementActionParty["PAYMENT_PROCESSOR"] = "payment_processor";
289
- StoreRequirementActionParty["PAYOUT_PROVIDER"] = "payout_provider";
290
- StoreRequirementActionParty["KYC_PROVIDER"] = "kyc_provider";
291
- StoreRequirementActionParty["EXTERNAL"] = "external";
292
- })(StoreRequirementActionParty || (exports.StoreRequirementActionParty = StoreRequirementActionParty = {}));
293
- /**
294
- * Represents categories of requirements that must be fulfilled for store setup and compliance in the PayNow platform.
295
- */
296
- var StoreRequirementCategory;
297
- (function (StoreRequirementCategory) {
298
- StoreRequirementCategory["INVALID"] = "invalid";
299
- StoreRequirementCategory["BUSINESS"] = "business";
300
- StoreRequirementCategory["KYC"] = "kyc";
301
- StoreRequirementCategory["COMPLIANCE"] = "compliance";
302
- StoreRequirementCategory["RISK"] = "risk";
303
- StoreRequirementCategory["TECHNICAL"] = "technical";
304
- StoreRequirementCategory["FINANCIAL"] = "financial";
305
- StoreRequirementCategory["LEGAL"] = "legal";
306
- StoreRequirementCategory["OTHER"] = "other";
307
- })(StoreRequirementCategory || (exports.StoreRequirementCategory = StoreRequirementCategory = {}));
308
- var StoreRequirementStatus;
309
- (function (StoreRequirementStatus) {
310
- StoreRequirementStatus["INVALID"] = "invalid";
311
- StoreRequirementStatus["PENDING"] = "pending";
312
- StoreRequirementStatus["UNDER_REVIEW"] = "under_review";
313
- StoreRequirementStatus["REQUIRES_REVISION"] = "requires_revision";
314
- StoreRequirementStatus["APPROVED"] = "approved";
315
- StoreRequirementStatus["EXPIRED"] = "expired";
316
- StoreRequirementStatus["WAIVED"] = "waived";
317
- StoreRequirementStatus["REJECTED_FINAL"] = "rejected_final";
318
- })(StoreRequirementStatus || (exports.StoreRequirementStatus = StoreRequirementStatus = {}));
319
- /**
320
- * Represents the current state of a subscription.
321
- */
322
- var SubscriptionStatus;
323
- (function (SubscriptionStatus) {
324
- SubscriptionStatus["CREATED"] = "created";
325
- SubscriptionStatus["ACTIVE"] = "active";
326
- SubscriptionStatus["CANCELED"] = "canceled";
327
- })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
328
- var TrialStatusDto;
329
- (function (TrialStatusDto) {
330
- TrialStatusDto["CREATED"] = "created";
331
- TrialStatusDto["ACTIVE"] = "active";
332
- TrialStatusDto["CANCELED"] = "canceled";
333
- TrialStatusDto["COMPLETED"] = "completed";
334
- })(TrialStatusDto || (exports.TrialStatusDto = TrialStatusDto = {}));
335
- var TrustStoreOnboardingStatus;
336
- (function (TrustStoreOnboardingStatus) {
337
- TrustStoreOnboardingStatus["INVALID"] = "invalid";
338
- TrustStoreOnboardingStatus["PENDING"] = "pending";
339
- TrustStoreOnboardingStatus["APPROVED"] = "approved";
340
- TrustStoreOnboardingStatus["DECLINED"] = "declined";
341
- TrustStoreOnboardingStatus["REQUIRES_ACTION"] = "requires_action";
342
- TrustStoreOnboardingStatus["UNDER_REVIEW"] = "under_review";
343
- })(TrustStoreOnboardingStatus || (exports.TrustStoreOnboardingStatus = TrustStoreOnboardingStatus = {}));
344
- var WebhookEventType;
345
- (function (WebhookEventType) {
346
- WebhookEventType["ON_IGNORE"] = "on_ignore";
347
- WebhookEventType["ON_ORDER_COMPLETED"] = "on_order_completed";
348
- WebhookEventType["ON_REFUND"] = "on_refund";
349
- WebhookEventType["ON_CHARGEBACK"] = "on_chargeback";
350
- WebhookEventType["ON_DELIVERY_ITEM_ADDED"] = "on_delivery_item_added";
351
- WebhookEventType["ON_DELIVERY_ITEM_ACTIVATED"] = "on_delivery_item_activated";
352
- WebhookEventType["ON_DELIVERY_ITEM_USED"] = "on_delivery_item_used";
353
- WebhookEventType["ON_DELIVERY_ITEM_REVOKED"] = "on_delivery_item_revoked";
354
- WebhookEventType["ON_SUBSCRIPTION_ACTIVATED"] = "on_subscription_activated";
355
- WebhookEventType["ON_SUBSCRIPTION_RENEWED"] = "on_subscription_renewed";
356
- WebhookEventType["ON_SUBSCRIPTION_CANCELED"] = "on_subscription_canceled";
357
- WebhookEventType["ON_DISCORD_ORDER_ACTIONS_QUEUED"] = "on_discord_order_actions_queued";
358
- WebhookEventType["ON_CONNECTED_USER_REGISTERED"] = "on_connected_user_registered";
359
- WebhookEventType["ON_CONNECTED_USER_BECAME_PAYABLE"] = "on_connected_user_became_payable";
360
- WebhookEventType["ON_CONNECTED_USER_PAYOUT_CREATED"] = "on_connected_user_payout_created";
361
- WebhookEventType["ON_CONNECTED_USER_PAYOUT_COMPLETED"] = "on_connected_user_payout_completed";
362
- WebhookEventType["ON_CONNECTED_USER_TRANSACTION_INSERTED"] = "on_connected_user_transaction_inserted";
363
- WebhookEventType["ON_CONNECTED_USER_BECAME_UNPAYABLE"] = "on_connected_user_became_unpayable";
364
- WebhookEventType["ON_TRIAL_ACTIVATED"] = "on_trial_activated";
365
- WebhookEventType["ON_TRIAL_COMPLETED"] = "on_trial_completed";
366
- WebhookEventType["ON_TRIAL_CANCELED"] = "on_trial_canceled";
367
- })(WebhookEventType || (exports.WebhookEventType = WebhookEventType = {}));
368
- var WebhookState;
369
- (function (WebhookState) {
370
- WebhookState["SUCCESS"] = "success";
371
- WebhookState["PENDING"] = "pending";
372
- WebhookState["FAILED"] = "failed";
373
- WebhookState["ALL"] = "all";
374
- })(WebhookState || (exports.WebhookState = WebhookState = {}));
375
- var WebhookType;
376
- (function (WebhookType) {
377
- WebhookType["JSON_V1"] = "json_v1";
378
- WebhookType["DISCORD_V1"] = "discord_v1";
379
- })(WebhookType || (exports.WebhookType = WebhookType = {}));
380
- //# sourceMappingURL=types.gen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../../src/management-client/types.gen.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AA6ErD,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACnC,4CAAa,CAAA;IACb,8CAAe,CAAA;IACf,wDAAyB,CAAA;AAC7B,CAAC,EAJW,2BAA2B,2CAA3B,2BAA2B,QAItC;AAED,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,0CAAa,CAAA;IACb,4CAAe,CAAA;IACf,sDAAyB,CAAA;AAC7B,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC;AAqBD,IAAY,wB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BAAW,CAAA;AACf,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAaD,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,wCAAyB,CAAA;AAC7B,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
@@ -1,3 +0,0 @@
1
- import type { Client, Config } from './types';
2
- export declare const createClient: (config?: Config) => Client;
3
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/storefront-client/client/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAS9C,eAAO,MAAM,YAAY,GAAI,SAAQ,MAAW,KAAG,MAsGlD,CAAC"}
@@ -1,100 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createClient = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const utils_1 = require("./utils");
9
- const createClient = (config = {}) => {
10
- let _config = (0, utils_1.mergeConfigs)((0, utils_1.createConfig)(), config);
11
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
12
- const { auth, ...configWithoutAuth } = _config;
13
- const instance = axios_1.default.create(configWithoutAuth);
14
- const getConfig = () => ({ ..._config });
15
- const setConfig = (config) => {
16
- _config = (0, utils_1.mergeConfigs)(_config, config);
17
- instance.defaults = {
18
- ...instance.defaults,
19
- ..._config,
20
- // @ts-expect-error
21
- headers: (0, utils_1.mergeHeaders)(instance.defaults.headers, _config.headers),
22
- };
23
- return getConfig();
24
- };
25
- // @ts-expect-error
26
- const request = async (options) => {
27
- const opts = {
28
- ..._config,
29
- ...options,
30
- axios: options.axios ?? _config.axios ?? instance,
31
- headers: (0, utils_1.mergeHeaders)(_config.headers, options.headers),
32
- };
33
- if (opts.security) {
34
- await (0, utils_1.setAuthParams)({
35
- ...opts,
36
- security: opts.security,
37
- });
38
- }
39
- if (opts.requestValidator) {
40
- await opts.requestValidator(opts);
41
- }
42
- if (opts.body && opts.bodySerializer) {
43
- opts.body = opts.bodySerializer(opts.body);
44
- }
45
- const url = (0, utils_1.buildUrl)(opts);
46
- try {
47
- // assign Axios here for consistency with fetch
48
- const _axios = opts.axios;
49
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
50
- const { auth, ...optsWithoutAuth } = opts;
51
- const response = await _axios({
52
- ...optsWithoutAuth,
53
- baseURL: opts.baseURL,
54
- data: opts.body,
55
- headers: opts.headers,
56
- // let `paramsSerializer()` handle query params if it exists
57
- params: opts.paramsSerializer ? opts.query : undefined,
58
- url,
59
- });
60
- let { data } = response;
61
- if (opts.responseType === 'json') {
62
- if (opts.responseValidator) {
63
- await opts.responseValidator(data);
64
- }
65
- if (opts.responseTransformer) {
66
- data = await opts.responseTransformer(data);
67
- }
68
- }
69
- return {
70
- ...response,
71
- data: data ?? {},
72
- };
73
- }
74
- catch (error) {
75
- const e = error;
76
- if (opts.throwOnError) {
77
- throw e;
78
- }
79
- // @ts-expect-error
80
- e.error = e.response?.data ?? {};
81
- return e;
82
- }
83
- };
84
- return {
85
- buildUrl: utils_1.buildUrl,
86
- delete: (options) => request({ ...options, method: 'DELETE' }),
87
- get: (options) => request({ ...options, method: 'GET' }),
88
- getConfig,
89
- head: (options) => request({ ...options, method: 'HEAD' }),
90
- instance,
91
- options: (options) => request({ ...options, method: 'OPTIONS' }),
92
- patch: (options) => request({ ...options, method: 'PATCH' }),
93
- post: (options) => request({ ...options, method: 'POST' }),
94
- put: (options) => request({ ...options, method: 'PUT' }),
95
- request,
96
- setConfig,
97
- };
98
- };
99
- exports.createClient = createClient;
100
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/storefront-client/client/client.ts"],"names":[],"mappings":";;;;;;AACA,kDAA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;KACA,CAAC;AACd,CAAC,CAAC;AAtGW,QAAA,YAAY,gBAsGvB"}
@@ -1,8 +0,0 @@
1
- export type { Auth } from '../core/auth';
2
- export type { QuerySerializerOptions } from '../core/bodySerializer';
3
- export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer';
4
- export { buildClientParams } from '../core/params';
5
- export { createClient } from './client';
6
- export type { Client, ClientOptions, Config, CreateClientConfig, Options, OptionsLegacyParser, RequestOptions, RequestResult, TDataShape, } from './types';
7
- export { createConfig } from './utils';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storefront-client/client/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,YAAY,EACV,MAAM,EACN,aAAa,EACb,MAAM,EACN,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createConfig = exports.createClient = exports.buildClientParams = exports.urlSearchParamsBodySerializer = exports.jsonBodySerializer = exports.formDataBodySerializer = void 0;
4
- var bodySerializer_1 = require("../core/bodySerializer");
5
- Object.defineProperty(exports, "formDataBodySerializer", { enumerable: true, get: function () { return bodySerializer_1.formDataBodySerializer; } });
6
- Object.defineProperty(exports, "jsonBodySerializer", { enumerable: true, get: function () { return bodySerializer_1.jsonBodySerializer; } });
7
- Object.defineProperty(exports, "urlSearchParamsBodySerializer", { enumerable: true, get: function () { return bodySerializer_1.urlSearchParamsBodySerializer; } });
8
- var params_1 = require("../core/params");
9
- Object.defineProperty(exports, "buildClientParams", { enumerable: true, get: function () { return params_1.buildClientParams; } });
10
- var client_1 = require("./client");
11
- Object.defineProperty(exports, "createClient", { enumerable: true, get: function () { return client_1.createClient; } });
12
- var utils_1 = require("./utils");
13
- Object.defineProperty(exports, "createConfig", { enumerable: true, get: function () { return utils_1.createConfig; } });
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storefront-client/client/index.ts"],"names":[],"mappings":";;;AAEA,yDAIgC;AAH9B,wHAAA,sBAAsB,OAAA;AACtB,oHAAA,kBAAkB,OAAA;AAClB,+HAAA,6BAA6B,OAAA;AAE/B,yCAAmD;AAA1C,2GAAA,iBAAiB,OAAA;AAC1B,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AAYrB,iCAAuC;AAA9B,qGAAA,YAAY,OAAA"}
@@ -1,94 +0,0 @@
1
- import type { AxiosError, AxiosInstance, AxiosResponse, AxiosStatic, CreateAxiosDefaults } from 'axios';
2
- import type { Auth } from '../core/auth';
3
- import type { Client as CoreClient, Config as CoreConfig } from '../core/types';
4
- export interface Config<T extends ClientOptions = ClientOptions> extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {
5
- /**
6
- * Axios implementation. You can use this option to provide a custom
7
- * Axios instance.
8
- *
9
- * @default axios
10
- */
11
- axios?: AxiosStatic;
12
- /**
13
- * Base URL for all requests made by this client.
14
- */
15
- baseURL?: T['baseURL'];
16
- /**
17
- * An object containing any HTTP headers that you want to pre-populate your
18
- * `Headers` object with.
19
- *
20
- * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
21
- */
22
- headers?: CreateAxiosDefaults['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
23
- /**
24
- * Throw an error instead of returning it in the response?
25
- *
26
- * @default false
27
- */
28
- throwOnError?: T['throwOnError'];
29
- }
30
- export interface RequestOptions<ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
31
- throwOnError: ThrowOnError;
32
- }> {
33
- /**
34
- * Any body that you want to add to your request.
35
- *
36
- * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
37
- */
38
- body?: unknown;
39
- path?: Record<string, unknown>;
40
- query?: Record<string, unknown>;
41
- /**
42
- * Security mechanism(s) to use for the request.
43
- */
44
- security?: ReadonlyArray<Auth>;
45
- url: Url;
46
- }
47
- export type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean> = ThrowOnError extends true ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>> : Promise<(AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {
48
- error: undefined;
49
- }) | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {
50
- data: undefined;
51
- error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
52
- })>;
53
- export interface ClientOptions {
54
- baseURL?: string;
55
- throwOnError?: boolean;
56
- }
57
- type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
58
- type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<ThrowOnError>, 'method'> & Pick<Required<RequestOptions<ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
59
- type BuildUrlFn = <TData extends {
60
- body?: unknown;
61
- path?: Record<string, unknown>;
62
- query?: Record<string, unknown>;
63
- url: string;
64
- }>(options: Pick<TData, 'url'> & Omit<Options<TData>, 'axios'>) => string;
65
- export type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn> & {
66
- instance: AxiosInstance;
67
- };
68
- /**
69
- * The `createClientConfig()` function will be called on client initialization
70
- * and the returned object will become the client's initial configuration.
71
- *
72
- * You may want to initialize your client this way instead of calling
73
- * `setConfig()`. This is useful for example if you're using Next.js
74
- * to ensure your client always has the correct values.
75
- */
76
- export type CreateClientConfig<T extends ClientOptions = ClientOptions> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
77
- export interface TDataShape {
78
- body?: unknown;
79
- headers?: unknown;
80
- path?: unknown;
81
- query?: unknown;
82
- url: string;
83
- }
84
- type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
85
- export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;
86
- export type OptionsLegacyParser<TData = unknown, ThrowOnError extends boolean = boolean> = TData extends {
87
- body?: any;
88
- } ? TData extends {
89
- headers?: any;
90
- } ? OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'headers' | 'url'> & TData : OmitKeys<RequestOptions<ThrowOnError>, 'body' | 'url'> & TData & Pick<RequestOptions<ThrowOnError>, 'headers'> : TData extends {
91
- headers?: any;
92
- } ? OmitKeys<RequestOptions<ThrowOnError>, 'headers' | 'url'> & TData & Pick<RequestOptions<ThrowOnError>, 'body'> : OmitKeys<RequestOptions<ThrowOnError>, 'url'> & TData;
93
- export {};
94
- //# sourceMappingURL=types.d.ts.map