@paynow-gg/typescript-sdk 1.0.61 → 2.0.2

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 (140) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +44 -5
  3. package/dist/cjs/generated/management/client.d.ts +902 -0
  4. package/dist/cjs/generated/management/client.d.ts.map +1 -0
  5. package/dist/cjs/generated/management/client.js +1583 -0
  6. package/dist/cjs/generated/management/client.js.map +1 -0
  7. package/dist/cjs/generated/management/types.d.ts +7771 -0
  8. package/dist/cjs/generated/management/types.d.ts.map +1 -0
  9. package/dist/cjs/generated/management/types.js +4 -0
  10. package/dist/cjs/generated/management/types.js.map +1 -0
  11. package/dist/cjs/generated/storefront/client.d.ts +229 -0
  12. package/dist/cjs/generated/storefront/client.d.ts.map +1 -0
  13. package/dist/cjs/generated/storefront/client.js +357 -0
  14. package/dist/cjs/generated/storefront/client.js.map +1 -0
  15. package/dist/cjs/generated/storefront/types.d.ts +3076 -0
  16. package/dist/cjs/generated/storefront/types.d.ts.map +1 -0
  17. package/dist/cjs/generated/storefront/types.js +4 -0
  18. package/dist/cjs/generated/storefront/types.js.map +1 -0
  19. package/dist/cjs/generated/webhooks/types.d.ts +3113 -0
  20. package/dist/cjs/generated/webhooks/types.d.ts.map +1 -0
  21. package/dist/cjs/generated/webhooks/types.js +4 -0
  22. package/dist/cjs/generated/webhooks/types.js.map +1 -0
  23. package/dist/cjs/index.d.ts +9 -0
  24. package/dist/cjs/index.d.ts.map +1 -0
  25. package/dist/cjs/index.js +16 -0
  26. package/dist/cjs/index.js.map +1 -0
  27. package/dist/cjs/management.d.ts +3 -0
  28. package/dist/cjs/management.d.ts.map +1 -0
  29. package/dist/cjs/management.js +22 -0
  30. package/dist/cjs/management.js.map +1 -0
  31. package/dist/cjs/package.json +3 -0
  32. package/dist/cjs/runtime/errors.d.ts +18 -0
  33. package/dist/cjs/runtime/errors.d.ts.map +1 -0
  34. package/dist/cjs/runtime/errors.js +41 -0
  35. package/dist/cjs/runtime/errors.js.map +1 -0
  36. package/dist/cjs/runtime/http.d.ts +20 -0
  37. package/dist/cjs/runtime/http.d.ts.map +1 -0
  38. package/dist/cjs/runtime/http.js +121 -0
  39. package/dist/cjs/runtime/http.js.map +1 -0
  40. package/dist/cjs/runtime/options.d.ts +12 -0
  41. package/dist/cjs/runtime/options.d.ts.map +1 -0
  42. package/dist/{types.js → cjs/runtime/options.js} +1 -1
  43. package/dist/cjs/runtime/options.js.map +1 -0
  44. package/dist/cjs/storefront.d.ts +3 -0
  45. package/dist/cjs/storefront.d.ts.map +1 -0
  46. package/dist/cjs/storefront.js +22 -0
  47. package/dist/cjs/storefront.js.map +1 -0
  48. package/dist/cjs/webhooks.d.ts +2 -0
  49. package/dist/cjs/webhooks.d.ts.map +1 -0
  50. package/dist/cjs/webhooks.js +18 -0
  51. package/dist/cjs/webhooks.js.map +1 -0
  52. package/dist/esm/generated/management/client.d.ts +902 -0
  53. package/dist/esm/generated/management/client.d.ts.map +1 -0
  54. package/dist/esm/generated/management/client.js +1545 -0
  55. package/dist/esm/generated/management/client.js.map +1 -0
  56. package/dist/esm/generated/management/types.d.ts +7771 -0
  57. package/dist/esm/generated/management/types.d.ts.map +1 -0
  58. package/dist/esm/generated/management/types.js +3 -0
  59. package/dist/esm/generated/management/types.js.map +1 -0
  60. package/dist/esm/generated/storefront/client.d.ts +229 -0
  61. package/dist/esm/generated/storefront/client.d.ts.map +1 -0
  62. package/dist/esm/generated/storefront/client.js +340 -0
  63. package/dist/esm/generated/storefront/client.js.map +1 -0
  64. package/dist/esm/generated/storefront/types.d.ts +3076 -0
  65. package/dist/esm/generated/storefront/types.d.ts.map +1 -0
  66. package/dist/esm/generated/storefront/types.js +3 -0
  67. package/dist/esm/generated/storefront/types.js.map +1 -0
  68. package/dist/esm/generated/webhooks/types.d.ts +3113 -0
  69. package/dist/esm/generated/webhooks/types.d.ts.map +1 -0
  70. package/dist/esm/generated/webhooks/types.js +3 -0
  71. package/dist/esm/generated/webhooks/types.js.map +1 -0
  72. package/dist/esm/index.d.ts +9 -0
  73. package/dist/esm/index.d.ts.map +1 -0
  74. package/dist/esm/index.js +5 -0
  75. package/dist/esm/index.js.map +1 -0
  76. package/dist/esm/management.d.ts +3 -0
  77. package/dist/esm/management.d.ts.map +1 -0
  78. package/dist/esm/management.js +3 -0
  79. package/dist/esm/management.js.map +1 -0
  80. package/dist/esm/package.json +3 -0
  81. package/dist/esm/runtime/errors.d.ts +18 -0
  82. package/dist/esm/runtime/errors.d.ts.map +1 -0
  83. package/dist/esm/runtime/errors.js +36 -0
  84. package/dist/esm/runtime/errors.js.map +1 -0
  85. package/dist/esm/runtime/http.d.ts +20 -0
  86. package/dist/esm/runtime/http.d.ts.map +1 -0
  87. package/dist/esm/runtime/http.js +117 -0
  88. package/dist/esm/runtime/http.js.map +1 -0
  89. package/dist/esm/runtime/options.d.ts +12 -0
  90. package/dist/esm/runtime/options.d.ts.map +1 -0
  91. package/dist/esm/runtime/options.js +2 -0
  92. package/dist/esm/runtime/options.js.map +1 -0
  93. package/dist/esm/storefront.d.ts +3 -0
  94. package/dist/esm/storefront.d.ts.map +1 -0
  95. package/dist/esm/storefront.js +3 -0
  96. package/dist/esm/storefront.js.map +1 -0
  97. package/dist/esm/webhooks.d.ts +2 -0
  98. package/dist/esm/webhooks.d.ts.map +1 -0
  99. package/dist/esm/webhooks.js +2 -0
  100. package/dist/esm/webhooks.js.map +1 -0
  101. package/package.json +74 -15
  102. package/dist/client.d.ts +0 -73
  103. package/dist/client.d.ts.map +0 -1
  104. package/dist/client.js +0 -55
  105. package/dist/client.js.map +0 -1
  106. package/dist/errors.d.ts +0 -7
  107. package/dist/errors.d.ts.map +0 -1
  108. package/dist/errors.js +0 -14
  109. package/dist/errors.js.map +0 -1
  110. package/dist/generate.d.ts +0 -2
  111. package/dist/generate.d.ts.map +0 -1
  112. package/dist/generate.js +0 -102
  113. package/dist/generate.js.map +0 -1
  114. package/dist/generated/management.d.ts +0 -12767
  115. package/dist/generated/management.d.ts.map +0 -1
  116. package/dist/generated/management.js +0 -638
  117. package/dist/generated/management.js.map +0 -1
  118. package/dist/generated/storefront.d.ts +0 -3464
  119. package/dist/generated/storefront.d.ts.map +0 -1
  120. package/dist/generated/storefront.js +0 -90
  121. package/dist/generated/storefront.js.map +0 -1
  122. package/dist/generated/webhooks.d.ts +0 -3659
  123. package/dist/generated/webhooks.d.ts.map +0 -1
  124. package/dist/generated/webhooks.js +0 -5
  125. package/dist/generated/webhooks.js.map +0 -1
  126. package/dist/index.d.ts +0 -12
  127. package/dist/index.d.ts.map +0 -1
  128. package/dist/index.js +0 -10
  129. package/dist/index.js.map +0 -1
  130. package/dist/management.d.ts +0 -7
  131. package/dist/management.d.ts.map +0 -1
  132. package/dist/management.js +0 -12
  133. package/dist/management.js.map +0 -1
  134. package/dist/storefront.d.ts +0 -7
  135. package/dist/storefront.d.ts.map +0 -1
  136. package/dist/storefront.js +0 -13
  137. package/dist/storefront.js.map +0 -1
  138. package/dist/types.d.ts +0 -12
  139. package/dist/types.d.ts.map +0 -1
  140. package/dist/types.js.map +0 -1
@@ -0,0 +1,1583 @@
1
+ "use strict";
2
+ // Generated from OpenAPI spec. Do not edit by hand.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ManagementClient = exports.WebhooksResource = exports.UpsellSettingsResource = exports.TrialsResource = exports.TierGroupsResource = exports.TagsResource = exports.SubscriptionsResource = exports.StoreResource = exports.SalesResource = exports.RegionalPricingResource = exports.ProductsResource = exports.ProductDependentMigrationsResource = exports.PaymentSettingsResource = exports.PaymentsResource = exports.PaymentMethodTypesResource = exports.OrdersResource = exports.NavlinksResource = exports.MarketingResource = exports.InvoicesResource = exports.GlobalCommandsResource = exports.GiftcardsResource = exports.GameServersResource = exports.DownloadableFilesResource = exports.DiscordResource = exports.DeliveryResource = exports.DataMigrationsResource = exports.DashboardResource = exports.CustomVariablesResource = exports.CustomersResource = exports.CustomerPortalSessionsResource = exports.CouponsResource = exports.CheckoutResource = exports.BansResource = exports.AffiliateLinksResource = void 0;
5
+ exports.createManagementClient = createManagementClient;
6
+ const http_js_1 = require("../../runtime/http.js");
7
+ class AffiliateLinksResource {
8
+ http;
9
+ constructor(http) {
10
+ this.http = http;
11
+ }
12
+ createAffiliateLink(body, opts) {
13
+ return this.http.request("POST", "/v1/stores/{storeId}/affiliate-links", {
14
+ body,
15
+ opts,
16
+ });
17
+ }
18
+ deleteAffiliateLink(affiliateLinkId, opts) {
19
+ return this.http.request("DELETE", "/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}", { path: { affiliateLinkId }, opts });
20
+ }
21
+ getAffiliateLink(affiliateLinkId, opts) {
22
+ return this.http.request("GET", "/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}", { path: { affiliateLinkId }, opts });
23
+ }
24
+ getAffiliateLinks(opts) {
25
+ return this.http.request("GET", "/v1/stores/{storeId}/affiliate-links", { opts });
26
+ }
27
+ updateAffiliateLink(affiliateLinkId, body, opts) {
28
+ return this.http.request("PATCH", "/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}", { path: { affiliateLinkId }, body, opts });
29
+ }
30
+ }
31
+ exports.AffiliateLinksResource = AffiliateLinksResource;
32
+ class BansResource {
33
+ http;
34
+ constructor(http) {
35
+ this.http = http;
36
+ }
37
+ checkForBanByIdentities(body, opts) {
38
+ return this.http.request("POST", "/v1/stores/{storeId}/bans/check", { body, opts });
39
+ }
40
+ createBan(body, opts) {
41
+ return this.http.request("POST", "/v1/stores/{storeId}/bans", { body, opts });
42
+ }
43
+ deleteBan(banId, opts) {
44
+ return this.http.request("DELETE", "/v1/stores/{storeId}/bans/{banId}", {
45
+ path: { banId },
46
+ opts,
47
+ });
48
+ }
49
+ getBan(banId, opts) {
50
+ return this.http.request("GET", "/v1/stores/{storeId}/bans/{banId}", {
51
+ path: { banId },
52
+ opts,
53
+ });
54
+ }
55
+ getBans(query, opts) {
56
+ return this.http.request("GET", "/v1/stores/{storeId}/bans", { query, opts });
57
+ }
58
+ updateBan(banId, body, opts) {
59
+ return this.http.request("PATCH", "/v1/stores/{storeId}/bans/{banId}", {
60
+ path: { banId },
61
+ body,
62
+ opts,
63
+ });
64
+ }
65
+ }
66
+ exports.BansResource = BansResource;
67
+ class CheckoutResource {
68
+ http;
69
+ constructor(http) {
70
+ this.http = http;
71
+ }
72
+ /**
73
+ * Create a checkout session
74
+ *
75
+ * Creates a checkout session from a secure server using an API Key.
76
+ * If you have a Customer token, see the Storefront API Create Checkout endpoint.
77
+ */
78
+ createCheckoutSession(body, opts) {
79
+ return this.http.request("POST", "/v1/stores/{storeId}/checkouts", { body, opts });
80
+ }
81
+ }
82
+ exports.CheckoutResource = CheckoutResource;
83
+ class CouponsResource {
84
+ http;
85
+ constructor(http) {
86
+ this.http = http;
87
+ }
88
+ createCouponForStore(body, opts) {
89
+ return this.http.request("POST", "/v1/stores/{storeId}/coupons", { body, opts });
90
+ }
91
+ /**
92
+ * Deletes a coupon
93
+ */
94
+ deleteCouponForStore(couponId, opts) {
95
+ return this.http.request("DELETE", "/v1/stores/{storeId}/coupons/{couponId}", {
96
+ path: { couponId },
97
+ opts,
98
+ });
99
+ }
100
+ /**
101
+ * Retrieves a coupon by ID
102
+ */
103
+ getCouponByIdForStore(couponId, opts) {
104
+ return this.http.request("GET", "/v1/stores/{storeId}/coupons/{couponId}", {
105
+ path: { couponId },
106
+ opts,
107
+ });
108
+ }
109
+ /**
110
+ * Fetches all coupons for a store id
111
+ */
112
+ getCouponsForStore(query, opts) {
113
+ return this.http.request("GET", "/v1/stores/{storeId}/coupons", {
114
+ query,
115
+ opts,
116
+ });
117
+ }
118
+ /**
119
+ * Performs a Delta Update of a Coupon
120
+ */
121
+ updateCouponForStore(couponId, body, opts) {
122
+ return this.http.request("PATCH", "/v1/stores/{storeId}/coupons/{couponId}", {
123
+ path: { couponId },
124
+ body,
125
+ opts,
126
+ });
127
+ }
128
+ }
129
+ exports.CouponsResource = CouponsResource;
130
+ class CustomerPortalSessionsResource {
131
+ http;
132
+ constructor(http) {
133
+ this.http = http;
134
+ }
135
+ /**
136
+ * Create a customer portal session
137
+ *
138
+ * Creates a customer portal session from a secure server using an API Key.
139
+ * The returned session contains the token and URL to hand to the customer.
140
+ * @param customerId The ID of the customer to create the portal session for.
141
+ */
142
+ createCustomerPortalSession(customerId, body, opts) {
143
+ return this.http.request("POST", "/v1/stores/{storeId}/customers/{customerId}/portal-sessions", { path: { customerId }, body, opts });
144
+ }
145
+ }
146
+ exports.CustomerPortalSessionsResource = CustomerPortalSessionsResource;
147
+ class CustomersResource {
148
+ http;
149
+ constructor(http) {
150
+ this.http = http;
151
+ }
152
+ /**
153
+ * Bulk create customers
154
+ *
155
+ * Creates up to 200 customers at once.
156
+ */
157
+ bulkCreateCustomers(body, opts) {
158
+ return this.http.request("POST", "/v1/stores/{storeId}/customers/bulk", {
159
+ body,
160
+ opts,
161
+ });
162
+ }
163
+ /**
164
+ * Create customer
165
+ *
166
+ * Creates a new customer based on the fields passed.
167
+ */
168
+ createCustomer(body, opts) {
169
+ return this.http.request("POST", "/v1/stores/{storeId}/customers", { body, opts });
170
+ }
171
+ /**
172
+ * Create customer token
173
+ *
174
+ * Generates a customer token that can be used by the Storefront (Headless) API.
175
+ * @param customerId The ID of the customer to generate the customer token for.
176
+ */
177
+ createCustomerToken(customerId, opts) {
178
+ return this.http.request("POST", "/v1/stores/{storeId}/customers/{customerId}/tokens", { path: { customerId }, opts });
179
+ }
180
+ /**
181
+ * Get customer by ID
182
+ *
183
+ * Retrieves a customer by the ID for the specified store.
184
+ * @param customerId The ID of the customer.
185
+ */
186
+ getCustomerById(customerId, opts) {
187
+ return this.http.request("GET", "/v1/stores/{storeId}/customers/{customerId}", {
188
+ path: { customerId },
189
+ opts,
190
+ });
191
+ }
192
+ /**
193
+ * Get customers
194
+ *
195
+ * Retrieves all customers for the specified store.
196
+ */
197
+ getCustomers(query, opts) {
198
+ return this.http.request("GET", "/v1/stores/{storeId}/customers", {
199
+ query,
200
+ opts,
201
+ });
202
+ }
203
+ /**
204
+ * Invalidate customer tokens
205
+ *
206
+ * Invalidates all generated customer tokens.
207
+ * @param customerId The ID of the customer to invalidate the customer tokens for.
208
+ */
209
+ invalidateCustomerTokens(customerId, opts) {
210
+ return this.http.request("DELETE", "/v1/stores/{storeId}/customers/{customerId}/tokens", {
211
+ path: { customerId },
212
+ opts,
213
+ });
214
+ }
215
+ /**
216
+ * Lookup customer
217
+ *
218
+ * Looks up a customer by an external platform ID.
219
+ */
220
+ lookupCustomer(query, opts) {
221
+ return this.http.request("GET", "/v1/stores/{storeId}/customers/lookup", {
222
+ query,
223
+ opts,
224
+ });
225
+ }
226
+ /**
227
+ * Update customer
228
+ *
229
+ * Updates an existing customer based on the fields passed.
230
+ */
231
+ updateCustomer(customerId, body, opts) {
232
+ return this.http.request("PATCH", "/v1/stores/{storeId}/customers/{customerId}", {
233
+ path: { customerId },
234
+ body,
235
+ opts,
236
+ });
237
+ }
238
+ }
239
+ exports.CustomersResource = CustomersResource;
240
+ class CustomVariablesResource {
241
+ http;
242
+ constructor(http) {
243
+ this.http = http;
244
+ }
245
+ /**
246
+ * Create custom variable
247
+ *
248
+ * Creates a new custom variable for the specified store.
249
+ * Custom variables allow customers to provide additional input when purchasing products.
250
+ */
251
+ createCustomVariableForStore(body, opts) {
252
+ return this.http.request("POST", "/v1/stores/{storeId}/custom-variables", {
253
+ body,
254
+ opts,
255
+ });
256
+ }
257
+ /**
258
+ * Delete custom variable
259
+ *
260
+ * Deletes a custom variable from the specified store.
261
+ * This will also delete all associated options and cannot be undone.
262
+ * @param customVariableId The ID of the custom variable to delete.
263
+ */
264
+ deleteCustomVariableForStore(customVariableId, opts) {
265
+ return this.http.request("DELETE", "/v1/stores/{storeId}/custom-variables/{customVariableId}", { path: { customVariableId }, opts });
266
+ }
267
+ /**
268
+ * Get custom variable
269
+ *
270
+ * Retrieves a specific custom variable by ID from the specified store.
271
+ * @param customVariableId The ID of the custom variable to retrieve.
272
+ */
273
+ getCustomVariableByIdForStore(customVariableId, opts) {
274
+ return this.http.request("GET", "/v1/stores/{storeId}/custom-variables/{customVariableId}", { path: { customVariableId }, opts });
275
+ }
276
+ /**
277
+ * Get custom variables
278
+ *
279
+ * Retrieves all custom variables for the specified store.
280
+ */
281
+ getCustomVariablesForStore(opts) {
282
+ return this.http.request("GET", "/v1/stores/{storeId}/custom-variables", { opts });
283
+ }
284
+ /**
285
+ * Update custom variable
286
+ *
287
+ * Performs a partial update of a custom variable using field mask.
288
+ * Only the fields specified in the request will be updated.
289
+ * @param customVariableId The ID of the custom variable to update.
290
+ */
291
+ updateCustomVariableForStore(customVariableId, body, opts) {
292
+ return this.http.request("PATCH", "/v1/stores/{storeId}/custom-variables/{customVariableId}", { path: { customVariableId }, body, opts });
293
+ }
294
+ }
295
+ exports.CustomVariablesResource = CustomVariablesResource;
296
+ class DashboardResource {
297
+ http;
298
+ constructor(http) {
299
+ this.http = http;
300
+ }
301
+ getDashboardSearchHints(opts) {
302
+ return this.http.request("GET", "/v1/stores/{storeId}/dashboard/search-hints", { opts });
303
+ }
304
+ searchDashboard(query, opts) {
305
+ return this.http.request("GET", "/v1/stores/{storeId}/dashboard/search", { query, opts });
306
+ }
307
+ }
308
+ exports.DashboardResource = DashboardResource;
309
+ class DataMigrationsResource {
310
+ http;
311
+ constructor(http) {
312
+ this.http = http;
313
+ }
314
+ getDataMigrations(query, opts) {
315
+ return this.http.request("GET", "/v1/stores/{storeId}/data-migrations", { query, opts });
316
+ }
317
+ startDataMigrationFromTebex(body, opts) {
318
+ return this.http.request("POST", "/v1/stores/{storeId}/data-migrations/tebex", { body, opts });
319
+ }
320
+ }
321
+ exports.DataMigrationsResource = DataMigrationsResource;
322
+ class DeliveryResource {
323
+ http;
324
+ constructor(http) {
325
+ this.http = http;
326
+ }
327
+ /**
328
+ * Assign a delivery item to a customer
329
+ *
330
+ * Allows you to assign a delivery item to a customer
331
+ */
332
+ assignDeliveryItem(customerId, body, opts) {
333
+ return this.http.request("POST", "/v1/stores/{storeId}/customers/{customerId}/delivery/items", { path: { customerId }, body, opts });
334
+ }
335
+ /**
336
+ * Assign delivery items in bulk
337
+ *
338
+ * Allows you to assign multiple delivery items for multiple customers in bulk
339
+ */
340
+ assignDeliveryItemsBulk(body, opts) {
341
+ return this.http.request("POST", "/v1/stores/{storeId}/delivery/items", { body, opts });
342
+ }
343
+ /**
344
+ * Get command attempts associated with a customer
345
+ *
346
+ * Retrieves command attempts associated with a customer
347
+ */
348
+ getCommandAttemptsForCustomer(customerId, query, opts) {
349
+ return this.http.request("GET", "/v1/stores/{storeId}/customers/{customerId}/delivery/commands", { path: { customerId }, query, opts });
350
+ }
351
+ /**
352
+ * Get delivery items associated with a customer
353
+ *
354
+ * Retrieves delivery items associated with a customer
355
+ */
356
+ getCustomerDeliveryItems(customerId, query, opts) {
357
+ return this.http.request("GET", "/v1/stores/{storeId}/customers/{customerId}/delivery/items", { path: { customerId }, query, opts });
358
+ }
359
+ /**
360
+ * Returns delivery items in which an associated command attempt is for the gameserver
361
+ */
362
+ getGameServerDeliveryItems(gameServerId, query, opts) {
363
+ return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}/delivery/items", { path: { gameServerId }, query, opts });
364
+ }
365
+ /**
366
+ * Get delivery items associated with an order
367
+ *
368
+ * Retrieves all delivery items associated with a specific order.
369
+ * @param orderId The ID of the order to retrieve delivery items from.
370
+ */
371
+ getOrderDeliveryItems(orderId, query, opts) {
372
+ return this.http.request("GET", "/v1/stores/{storeId}/orders/{orderId}/delivery/items", { path: { orderId }, query, opts });
373
+ }
374
+ /**
375
+ * Get all delivery items
376
+ *
377
+ * Retrieves all delivery items associated with this store (paginated)
378
+ */
379
+ getStoreDeliveryItems(query, opts) {
380
+ return this.http.request("GET", "/v1/stores/{storeId}/delivery/items", {
381
+ query,
382
+ opts,
383
+ });
384
+ }
385
+ /**
386
+ * Resend commands for a given Gameserver
387
+ */
388
+ resendDeliveryCommandsForGameServer(gameServerId, body, opts) {
389
+ return this.http.request("POST", "/v1/stores/{storeId}/gameservers/{gameServerId}/delivery/commands/resend", { path: { gameServerId }, body, opts });
390
+ }
391
+ /**
392
+ * Revoke a delivery item from a customer
393
+ *
394
+ * Allows you to revoke a delivery item associated with a customer
395
+ */
396
+ revokeDeliveryItem(customerId, deliveryItemId, opts) {
397
+ return this.http.request("DELETE", "/v1/stores/{storeId}/customers/{customerId}/delivery/items/{deliveryItemId}", { path: { customerId, deliveryItemId }, opts });
398
+ }
399
+ /**
400
+ * Unqueue commands by Attempt IDs
401
+ */
402
+ unqueueDeliveryCommandAttemptByAttemptIDs(body, opts) {
403
+ return this.http.request("POST", "/v1/stores/{storeId}/delivery/commands/unqueue", { body, opts });
404
+ }
405
+ }
406
+ exports.DeliveryResource = DeliveryResource;
407
+ class DiscordResource {
408
+ http;
409
+ constructor(http) {
410
+ this.http = http;
411
+ }
412
+ createAction(productVersionId, body, opts) {
413
+ return this.http.request("PUT", "/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions", { path: { productVersionId }, body, opts });
414
+ }
415
+ createDiscordServerLink(opts) {
416
+ return this.http.request("POST", "/v1/stores/{storeId}/discord/links", {
417
+ opts,
418
+ });
419
+ }
420
+ deleteDiscordServerLinks(token, opts) {
421
+ return this.http.request("DELETE", "/v1/stores/{storeId}/discord/links/{token}", { path: { token }, opts });
422
+ }
423
+ deleteUserToDeliveryItemLink(inventoryItemId, opts) {
424
+ return this.http.request("DELETE", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link", { path: { inventoryItemId }, opts });
425
+ }
426
+ getActions(productVersionId, opts) {
427
+ return this.http.request("GET", "/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions", { path: { productVersionId }, opts });
428
+ }
429
+ getDiscordActionExecutionHistory(orderId, opts) {
430
+ return this.http.request("GET", "/v1/stores/{storeId}/orders/{orderId}/discord/queued", { path: { orderId }, opts });
431
+ }
432
+ getDiscordServerLinks(opts) {
433
+ return this.http.request("GET", "/v1/stores/{storeId}/discord/links", { opts });
434
+ }
435
+ getDiscordServerRoles(discordServerId, opts) {
436
+ return this.http.request("GET", "/v1/stores/{storeId}/discord/{discordServerId}/roles", { path: { discordServerId }, opts });
437
+ }
438
+ getDiscordServerTextChannels(discordServerId, opts) {
439
+ return this.http.request("GET", "/v1/stores/{storeId}/discord/{discordServerId}/discord/text_channels", { path: { discordServerId }, opts });
440
+ }
441
+ getLinkedDiscordAccounts(orderId, opts) {
442
+ return this.http.request("GET", "/v1/stores/{storeId}/orders/{orderId}/discord", { path: { orderId }, opts });
443
+ }
444
+ getQueuedDiscordActionForDeliveryItem(inventoryItemId, opts) {
445
+ return this.http.request("GET", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued", { path: { inventoryItemId }, opts });
446
+ }
447
+ getUserToDeliveryItemLinks(inventoryItemId, opts) {
448
+ return this.http.request("GET", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link", { path: { inventoryItemId }, opts });
449
+ }
450
+ setUserToDeliveryItemLink(inventoryItemId, query, opts) {
451
+ return this.http.request("PUT", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link", { path: { inventoryItemId }, query, opts });
452
+ }
453
+ }
454
+ exports.DiscordResource = DiscordResource;
455
+ class DownloadableFilesResource {
456
+ http;
457
+ constructor(http) {
458
+ this.http = http;
459
+ }
460
+ createDownloadUrl(productId, downloadableFileId, opts) {
461
+ return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}/download-url", { path: { productId, downloadableFileId }, opts });
462
+ }
463
+ deleteDownloadableFile(productId, downloadableFileId, opts) {
464
+ return this.http.request("DELETE", "/v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}", { path: { productId, downloadableFileId }, opts });
465
+ }
466
+ finishDownloadableFileUpload(productId, downloadableFileId, opts) {
467
+ return this.http.request("POST", "/v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}/finish", { path: { productId, downloadableFileId }, opts });
468
+ }
469
+ getDownloadableFiles(productId, opts) {
470
+ return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}/downloadable-files", { path: { productId }, opts });
471
+ }
472
+ startDownloadableFileUpload(productId, body, opts) {
473
+ return this.http.request("POST", "/v1/stores/{storeId}/products/{productId}/downloadable-files", { path: { productId }, body, opts });
474
+ }
475
+ }
476
+ exports.DownloadableFilesResource = DownloadableFilesResource;
477
+ class GameServersResource {
478
+ http;
479
+ constructor(http) {
480
+ this.http = http;
481
+ }
482
+ /**
483
+ * Create a new Game Server for a store
484
+ */
485
+ createGameServer(body, opts) {
486
+ return this.http.request("POST", "/v1/stores/{storeId}/gameservers", {
487
+ body,
488
+ opts,
489
+ });
490
+ }
491
+ /**
492
+ * Create a console for a game server.
493
+ */
494
+ createGameServerConsole(gameServerId, body, opts) {
495
+ return this.http.request("POST", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, body, opts });
496
+ }
497
+ /**
498
+ * Delete a Game Server by ID for a store
499
+ */
500
+ deleteGameServer(gameServerId, opts) {
501
+ return this.http.request("DELETE", "/v1/stores/{storeId}/gameservers/{gameServerId}", {
502
+ path: { gameServerId },
503
+ opts,
504
+ });
505
+ }
506
+ /**
507
+ * Delete an associated game server console.
508
+ */
509
+ deleteGameServerConsole(gameServerId, opts) {
510
+ return this.http.request("DELETE", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, opts });
511
+ }
512
+ /**
513
+ * Get a Game Server by ID for a store
514
+ */
515
+ getGameServer(gameServerId, opts) {
516
+ return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}", { path: { gameServerId }, opts });
517
+ }
518
+ /**
519
+ * Get the associated console for a game server.
520
+ */
521
+ getGameServerConsole(gameServerId, opts) {
522
+ return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, opts });
523
+ }
524
+ /**
525
+ * Get console messages for a game server.
526
+ */
527
+ getGameServerConsoleMessages(gameServerId, opts) {
528
+ return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}/console/messages", { path: { gameServerId }, opts });
529
+ }
530
+ /**
531
+ * Get Game Servers for a store
532
+ */
533
+ getGameServers(opts) {
534
+ return this.http.request("GET", "/v1/stores/{storeId}/gameservers", {
535
+ opts,
536
+ });
537
+ }
538
+ /**
539
+ * Reset the API Key Token for a Game Server for a store
540
+ */
541
+ resetGameServerToken(gameServerId, opts) {
542
+ return this.http.request("POST", "/v1/stores/{storeId}/gameservers/{gameServerId}/reset-token", { path: { gameServerId }, opts });
543
+ }
544
+ /**
545
+ * Update a Game Server By ID for a store
546
+ */
547
+ updateGameServer(gameServerId, body, opts) {
548
+ return this.http.request("PATCH", "/v1/stores/{storeId}/gameservers/{gameServerId}", { path: { gameServerId }, body, opts });
549
+ }
550
+ /**
551
+ * Update a console for a game server.
552
+ */
553
+ updateGameServerConsole(gameServerId, body, opts) {
554
+ return this.http.request("PATCH", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, body, opts });
555
+ }
556
+ }
557
+ exports.GameServersResource = GameServersResource;
558
+ class GiftcardsResource {
559
+ http;
560
+ constructor(http) {
561
+ this.http = http;
562
+ }
563
+ /**
564
+ * Create a Gift Card for a store
565
+ */
566
+ createGiftCard(body, opts) {
567
+ return this.http.request("POST", "/v1/stores/{storeId}/giftcards", { body, opts });
568
+ }
569
+ /**
570
+ * Delete a Gift Card By ID for a store
571
+ */
572
+ deleteGiftCard(giftCardId, opts) {
573
+ return this.http.request("DELETE", "/v1/stores/{storeId}/giftcards/{giftCardId}", {
574
+ path: { giftCardId },
575
+ opts,
576
+ });
577
+ }
578
+ /**
579
+ * Get a Gift Card By ID for a store
580
+ */
581
+ getGiftCard(giftCardId, opts) {
582
+ return this.http.request("GET", "/v1/stores/{storeId}/giftcards/{giftCardId}", {
583
+ path: { giftCardId },
584
+ opts,
585
+ });
586
+ }
587
+ /**
588
+ * Get Gift Cards for a store
589
+ */
590
+ getGiftCards(query, opts) {
591
+ return this.http.request("GET", "/v1/stores/{storeId}/giftcards", {
592
+ query,
593
+ opts,
594
+ });
595
+ }
596
+ /**
597
+ * Update a Gift Card By ID for a store
598
+ */
599
+ updateGiftCard(giftCardId, body, opts) {
600
+ return this.http.request("PATCH", "/v1/stores/{storeId}/giftcards/{giftCardId}", {
601
+ path: { giftCardId },
602
+ body,
603
+ opts,
604
+ });
605
+ }
606
+ }
607
+ exports.GiftcardsResource = GiftcardsResource;
608
+ class GlobalCommandsResource {
609
+ http;
610
+ constructor(http) {
611
+ this.http = http;
612
+ }
613
+ /**
614
+ * Create global command
615
+ *
616
+ * Creates a global command for a store.
617
+ */
618
+ createGlobalCommand(body, opts) {
619
+ return this.http.request("POST", "/v1/stores/{storeId}/global-commands", {
620
+ body,
621
+ opts,
622
+ });
623
+ }
624
+ /**
625
+ * Delete global command
626
+ *
627
+ * Deletes a global command for a store.
628
+ * @param globalCommandId The ID of the command to delete.
629
+ */
630
+ deleteGlobalCommand(globalCommandId, opts) {
631
+ return this.http.request("DELETE", "/v1/stores/{storeId}/global-commands/{globalCommandId}", { path: { globalCommandId }, opts });
632
+ }
633
+ /**
634
+ * Get global commands
635
+ *
636
+ * Retrieves all global commands for the specified store.
637
+ */
638
+ getGlobalCommands(opts) {
639
+ return this.http.request("GET", "/v1/stores/{storeId}/global-commands", { opts });
640
+ }
641
+ /**
642
+ * Update global command
643
+ *
644
+ * Updates a global command for a store.
645
+ */
646
+ updateGlobalCommand(globalCommandId, body, opts) {
647
+ return this.http.request("PATCH", "/v1/stores/{storeId}/global-commands/{globalCommandId}", { path: { globalCommandId }, body, opts });
648
+ }
649
+ }
650
+ exports.GlobalCommandsResource = GlobalCommandsResource;
651
+ class InvoicesResource {
652
+ http;
653
+ constructor(http) {
654
+ this.http = http;
655
+ }
656
+ /**
657
+ * Download invoice
658
+ *
659
+ * Retrieves a temporary download URL for the invoice PDF.
660
+ * @param invoiceId The ID of the invoice to download.
661
+ */
662
+ downloadInvoice(invoiceId, opts) {
663
+ return this.http.request("GET", "/v1/stores/{storeId}/invoices/{invoiceId}/download", { path: { invoiceId }, opts });
664
+ }
665
+ /**
666
+ * Get invoices
667
+ *
668
+ * Retrieves all invoices for the specified store.
669
+ */
670
+ listInvoices(query, opts) {
671
+ return this.http.request("GET", "/v1/stores/{storeId}/invoices", {
672
+ query,
673
+ opts,
674
+ });
675
+ }
676
+ }
677
+ exports.InvoicesResource = InvoicesResource;
678
+ class MarketingResource {
679
+ http;
680
+ constructor(http) {
681
+ this.http = http;
682
+ }
683
+ activateEmailTemplate(templateId, opts) {
684
+ return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates/{templateId}/activate", { path: { templateId }, opts });
685
+ }
686
+ createEmailTemplate(body, opts) {
687
+ return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates", { body, opts });
688
+ }
689
+ deactivateEmailTemplate(templateId, opts) {
690
+ return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates/{templateId}/deactivate", { path: { templateId }, opts });
691
+ }
692
+ deactivateEmailTemplateByType(body, opts) {
693
+ return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates/deactivate", { body, opts });
694
+ }
695
+ deleteEmailTemplate(templateId, opts) {
696
+ return this.http.request("DELETE", "/v1/stores/{storeId}/marketing/email/templates/{templateId}", { path: { templateId }, opts });
697
+ }
698
+ finishEmailBrandingImageUpload(body, opts) {
699
+ return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/branding/image-upload-finish", { body, opts });
700
+ }
701
+ getEmailBranding(opts) {
702
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/branding", { opts });
703
+ }
704
+ getEmailBrandingImageUploadUrl(query, opts) {
705
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/branding/image-upload-url", { query, opts });
706
+ }
707
+ getEmailDeliveries(query, opts) {
708
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/deliveries", { query, opts });
709
+ }
710
+ getEmailDelivery(emailDeliveryId, opts) {
711
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/deliveries/{emailDeliveryId}", { path: { emailDeliveryId }, opts });
712
+ }
713
+ getEmailTemplate(templateId, opts) {
714
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/templates/{templateId}", { path: { templateId }, opts });
715
+ }
716
+ getEmailTemplateDefinitions(opts) {
717
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/template-definitions", { opts });
718
+ }
719
+ getEmailTemplates(query, opts) {
720
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/templates", { query, opts });
721
+ }
722
+ /**
723
+ * Gets the abandoned checkout behaviour for a store
724
+ */
725
+ getStoreAbandonedCheckoutConfigurationOptions(opts) {
726
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/abandoned-checkouts/configuration", { opts });
727
+ }
728
+ /**
729
+ * Gets the purchase follow up behaviour for a store
730
+ */
731
+ getStorePurchaseFollowUpConfigurationOptions(opts) {
732
+ return this.http.request("GET", "/v1/stores/{storeId}/marketing/purchase-follow-ups/configuration", { opts });
733
+ }
734
+ /**
735
+ * Sets the abandoned checkout behaviour for a store
736
+ */
737
+ setStoreAbandonedCheckoutConfigurationOptions(body, opts) {
738
+ return this.http.request("PUT", "/v1/stores/{storeId}/marketing/abandoned-checkouts/configuration", { body, opts });
739
+ }
740
+ /**
741
+ * Sets the purchase follow up behaviour for a store
742
+ */
743
+ setStorePurchaseFollowUpConfigurationOptions(body, opts) {
744
+ return this.http.request("PUT", "/v1/stores/{storeId}/marketing/purchase-follow-ups/configuration", { body, opts });
745
+ }
746
+ updateEmailBranding(body, opts) {
747
+ return this.http.request("PATCH", "/v1/stores/{storeId}/marketing/email/branding", { body, opts });
748
+ }
749
+ updateEmailTemplate(templateId, body, opts) {
750
+ return this.http.request("PATCH", "/v1/stores/{storeId}/marketing/email/templates/{templateId}", { path: { templateId }, body, opts });
751
+ }
752
+ }
753
+ exports.MarketingResource = MarketingResource;
754
+ class NavlinksResource {
755
+ http;
756
+ constructor(http) {
757
+ this.http = http;
758
+ }
759
+ /**
760
+ * Create a new NavLink for a store
761
+ */
762
+ createNavLink(body, opts) {
763
+ return this.http.request("POST", "/v1/stores/{storeId}/navlinks", { body, opts });
764
+ }
765
+ /**
766
+ * Delete a NavLink for a store
767
+ */
768
+ deleteNavLink(navLinkId, opts) {
769
+ return this.http.request("DELETE", "/v1/stores/{storeId}/navlinks/{navLinkId}", {
770
+ path: { navLinkId },
771
+ opts,
772
+ });
773
+ }
774
+ /**
775
+ * Get a NavLink by ID for a store
776
+ */
777
+ getNavLink(navLinkId, opts) {
778
+ return this.http.request("GET", "/v1/stores/{storeId}/navlinks/{navLinkId}", {
779
+ path: { navLinkId },
780
+ opts,
781
+ });
782
+ }
783
+ /**
784
+ * Get all NavLinks for a store
785
+ */
786
+ getNavLinks(opts) {
787
+ return this.http.request("GET", "/v1/stores/{storeId}/navlinks", { opts });
788
+ }
789
+ /**
790
+ * Update a NavLink By ID for a store
791
+ */
792
+ updateNavLink(navLinkId, body, opts) {
793
+ return this.http.request("PATCH", "/v1/stores/{storeId}/navlinks/{navLinkId}", {
794
+ path: { navLinkId },
795
+ body,
796
+ opts,
797
+ });
798
+ }
799
+ /**
800
+ * Update the sort orders of NavLinks for a Store
801
+ */
802
+ updateNavLinkOrder(body, opts) {
803
+ return this.http.request("PATCH", "/v1/stores/{storeId}/navlinks/sort-orders", {
804
+ body,
805
+ opts,
806
+ });
807
+ }
808
+ }
809
+ exports.NavlinksResource = NavlinksResource;
810
+ class OrdersResource {
811
+ http;
812
+ constructor(http) {
813
+ this.http = http;
814
+ }
815
+ /**
816
+ * Get order by ID
817
+ *
818
+ * Retrieves an order by the ID for the specified store.
819
+ * @param orderId The ID of the order.
820
+ */
821
+ getOrderById(orderId, opts) {
822
+ return this.http.request("GET", "/v1/stores/{storeId}/orders/{orderId}", {
823
+ path: { orderId },
824
+ opts,
825
+ });
826
+ }
827
+ /**
828
+ * Get orders
829
+ *
830
+ * Retrieves all orders for the specified store.
831
+ */
832
+ getOrders(query, opts) {
833
+ return this.http.request("GET", "/v1/stores/{storeId}/orders", {
834
+ query,
835
+ opts,
836
+ });
837
+ }
838
+ /**
839
+ * Refund order by ID
840
+ *
841
+ * Creates a refund for an order by the ID for the specified store.
842
+ * @param orderId The ID of the order.
843
+ */
844
+ refundOrder(orderId, body, opts) {
845
+ return this.http.request("POST", "/v1/stores/{storeId}/orders/{orderId}/refund", {
846
+ path: { orderId },
847
+ body,
848
+ opts,
849
+ });
850
+ }
851
+ }
852
+ exports.OrdersResource = OrdersResource;
853
+ class PaymentMethodTypesResource {
854
+ http;
855
+ constructor(http) {
856
+ this.http = http;
857
+ }
858
+ /**
859
+ * Get store payment method types
860
+ *
861
+ * Retrieves all payment method types associated with a store
862
+ */
863
+ getStorePaymentMethodTypes(opts) {
864
+ return this.http.request("GET", "/v1/stores/{storeId}/payment-method-types", { opts });
865
+ }
866
+ /**
867
+ * Request approval for a store payment method type
868
+ *
869
+ * Requests approval to use a payment method type that requires manual review
870
+ */
871
+ requestStorePaymentMethodTypeApproval(paymentMethodTypeId, opts) {
872
+ return this.http.request("POST", "/v1/stores/{storeId}/payment-method-types/{paymentMethodTypeId}/request-approval", { path: { paymentMethodTypeId }, opts });
873
+ }
874
+ /**
875
+ * Toggle a store payment method type
876
+ *
877
+ * Enables or disabled a payment method type for a store
878
+ */
879
+ toggleStorePaymentMethodType(paymentMethodTypeId, body, opts) {
880
+ return this.http.request("PATCH", "/v1/stores/{storeId}/payment-method-types/{paymentMethodTypeId}/toggle", { path: { paymentMethodTypeId }, body, opts });
881
+ }
882
+ }
883
+ exports.PaymentMethodTypesResource = PaymentMethodTypesResource;
884
+ class PaymentsResource {
885
+ http;
886
+ constructor(http) {
887
+ this.http = http;
888
+ }
889
+ /**
890
+ * Get payment by ID
891
+ *
892
+ * Retrieves a payment by an ID.
893
+ */
894
+ getPaymentById(paymentId, opts) {
895
+ return this.http.request("GET", "/v1/stores/{storeId}/payments/{paymentId}", {
896
+ path: { paymentId },
897
+ opts,
898
+ });
899
+ }
900
+ /**
901
+ * Get payments
902
+ *
903
+ * Retrieves all payments for the specified store using the filter specified.
904
+ */
905
+ getPayments(query, opts) {
906
+ return this.http.request("GET", "/v1/stores/{storeId}/payments", {
907
+ query,
908
+ opts,
909
+ });
910
+ }
911
+ }
912
+ exports.PaymentsResource = PaymentsResource;
913
+ class PaymentSettingsResource {
914
+ http;
915
+ constructor(http) {
916
+ this.http = http;
917
+ }
918
+ /**
919
+ * Get store payment settings
920
+ *
921
+ * Retrieves payment settings for a store.
922
+ */
923
+ getStorePaymentSettings(opts) {
924
+ return this.http.request("GET", "/v1/stores/{storeId}/payment-settings", { opts });
925
+ }
926
+ /**
927
+ * Updates store payment settings
928
+ *
929
+ * Updates payment settings for a store.
930
+ */
931
+ updateStorePaymentSettings(body, opts) {
932
+ return this.http.request("PATCH", "/v1/stores/{storeId}/payment-settings", {
933
+ body,
934
+ opts,
935
+ });
936
+ }
937
+ }
938
+ exports.PaymentSettingsResource = PaymentSettingsResource;
939
+ class ProductDependentMigrationsResource {
940
+ http;
941
+ constructor(http) {
942
+ this.http = http;
943
+ }
944
+ createProductDependentMigration(productId, body, opts) {
945
+ return this.http.request("POST", "/v1/stores/{storeId}/products/{productId}/dependent-migrations", { path: { productId }, body, opts });
946
+ }
947
+ getProductDependentMigrationById(productDependentMigrationId, opts) {
948
+ return this.http.request("GET", "/v1/stores/{storeId}/product-dependent-migrations/{productDependentMigrationId}", { path: { productDependentMigrationId }, opts });
949
+ }
950
+ getProductDependentMigrationEstimate(productId, opts) {
951
+ return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}/dependent-migrations/estimate", { path: { productId }, opts });
952
+ }
953
+ getProductDependentMigrations(productId, query, opts) {
954
+ return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}/dependent-migrations", { path: { productId }, query, opts });
955
+ }
956
+ }
957
+ exports.ProductDependentMigrationsResource = ProductDependentMigrationsResource;
958
+ class ProductsResource {
959
+ http;
960
+ constructor(http) {
961
+ this.http = http;
962
+ }
963
+ /**
964
+ * Create product
965
+ *
966
+ * Creates a new product in the specified store.
967
+ * Creating dynamic products while creating a checkout session via this endpoint without prior approval is prohibited and will result in store deactivation per our User Agreement.
968
+ */
969
+ createProduct(body, opts) {
970
+ return this.http.request("POST", "/v1/stores/{storeId}/products", { body, opts });
971
+ }
972
+ /**
973
+ * Delete product
974
+ *
975
+ * Deletes a product from the specified store.
976
+ * @param productId The ID of the product to delete.
977
+ */
978
+ deleteProduct(productId, opts) {
979
+ return this.http.request("DELETE", "/v1/stores/{storeId}/products/{productId}", {
980
+ path: { productId },
981
+ opts,
982
+ });
983
+ }
984
+ /**
985
+ * Get product
986
+ *
987
+ * Retrieves a specific product by ID from the specified store.
988
+ * DO NOT USE THIS ROUTE FOR DISPLAYING PRODUCTS ON YOUR STOREFRONT, use the storefront API instead.
989
+ * @param productId The ID of the product to retrieve.
990
+ */
991
+ getProduct(productId, opts) {
992
+ return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}", {
993
+ path: { productId },
994
+ opts,
995
+ });
996
+ }
997
+ /**
998
+ * Get products
999
+ *
1000
+ * Retrieves all products for the specified store.
1001
+ * DO NOT USE THIS ROUTE FOR DISPLAYING PRODUCTS ON YOUR STOREFRONT, use the storefront API instead!
1002
+ */
1003
+ getProducts(query, opts) {
1004
+ return this.http.request("GET", "/v1/stores/{storeId}/products", {
1005
+ query,
1006
+ opts,
1007
+ });
1008
+ }
1009
+ /**
1010
+ * Update product
1011
+ *
1012
+ * Updates an existing product in the specified store.
1013
+ * @param productId The ID of the product to update.
1014
+ */
1015
+ updateProduct(productId, body, opts) {
1016
+ return this.http.request("PATCH", "/v1/stores/{storeId}/products/{productId}", {
1017
+ path: { productId },
1018
+ body,
1019
+ opts,
1020
+ });
1021
+ }
1022
+ /**
1023
+ * Update product sort order
1024
+ *
1025
+ * Updates the sort order of products in the specified store.
1026
+ */
1027
+ updateProductSortOrder(body, opts) {
1028
+ return this.http.request("POST", "/v1/stores/{storeId}/products/sort-order", { body, opts });
1029
+ }
1030
+ }
1031
+ exports.ProductsResource = ProductsResource;
1032
+ class RegionalPricingResource {
1033
+ http;
1034
+ constructor(http) {
1035
+ this.http = http;
1036
+ }
1037
+ getProductPricingRegions(productId, opts) {
1038
+ return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}/pricing/regions", { path: { productId }, opts });
1039
+ }
1040
+ getStorePricingRegionGroups(opts) {
1041
+ return this.http.request("GET", "/v1/stores/{storeId}/products/pricing/region-groups", { opts });
1042
+ }
1043
+ getStorePricingRegions(opts) {
1044
+ return this.http.request("GET", "/v1/stores/{storeId}/products/pricing/regions", { opts });
1045
+ }
1046
+ setProductPricingRegionOverride(productId, regionId, body, opts) {
1047
+ return this.http.request("PATCH", "/v1/stores/{storeId}/products/{productId}/pricing/regions/{regionId}", { path: { productId, regionId }, body, opts });
1048
+ }
1049
+ setStorePricingRegionOverride(regionId, body, opts) {
1050
+ return this.http.request("PATCH", "/v1/stores/{storeId}/products/pricing/regions/{regionId}", { path: { regionId }, body, opts });
1051
+ }
1052
+ }
1053
+ exports.RegionalPricingResource = RegionalPricingResource;
1054
+ class SalesResource {
1055
+ http;
1056
+ constructor(http) {
1057
+ this.http = http;
1058
+ }
1059
+ /**
1060
+ * Create a sale by ID for a store
1061
+ */
1062
+ createSale(body, opts) {
1063
+ return this.http.request("POST", "/v1/stores/{storeId}/sales", { body, opts });
1064
+ }
1065
+ /**
1066
+ * Delete a sale by ID for a store
1067
+ */
1068
+ deleteSaleById(saleId, opts) {
1069
+ return this.http.request("DELETE", "/v1/stores/{storeId}/sales/{saleId}", {
1070
+ path: { saleId },
1071
+ opts,
1072
+ });
1073
+ }
1074
+ /**
1075
+ * Get a sale by ID for a store
1076
+ */
1077
+ getSale(saleId, opts) {
1078
+ return this.http.request("GET", "/v1/stores/{storeId}/sales/{saleId}", {
1079
+ path: { saleId },
1080
+ opts,
1081
+ });
1082
+ }
1083
+ /**
1084
+ * Get sales associated with a store.
1085
+ */
1086
+ getSales(opts) {
1087
+ return this.http.request("GET", "/v1/stores/{storeId}/sales", { opts });
1088
+ }
1089
+ /**
1090
+ * Update a sale by ID for a store
1091
+ */
1092
+ updateSale(saleId, body, opts) {
1093
+ return this.http.request("PATCH", "/v1/stores/{storeId}/sales/{saleId}", {
1094
+ path: { saleId },
1095
+ body,
1096
+ opts,
1097
+ });
1098
+ }
1099
+ }
1100
+ exports.SalesResource = SalesResource;
1101
+ class StoreResource {
1102
+ http;
1103
+ constructor(http) {
1104
+ this.http = http;
1105
+ }
1106
+ /**
1107
+ * Get a store
1108
+ *
1109
+ * Retrieves a single store by its ID.
1110
+ */
1111
+ getStore(opts) {
1112
+ return this.http.request("GET", "/v1/stores/{storeId}", { opts });
1113
+ }
1114
+ /**
1115
+ * Get store member permissions
1116
+ *
1117
+ * Retrieves the resolved permissions map for a specific member of a store.
1118
+ */
1119
+ getStoreMemberPermissions(memberId, opts) {
1120
+ return this.http.request("GET", "/v1/stores/{storeId}/members/{memberId}/permissions", { path: { memberId }, opts });
1121
+ }
1122
+ /**
1123
+ * List store members
1124
+ *
1125
+ * Retrieves all members who have access to the specified store.
1126
+ */
1127
+ getStoreMembers(opts) {
1128
+ return this.http.request("GET", "/v1/stores/{storeId}/members", {
1129
+ opts,
1130
+ });
1131
+ }
1132
+ /**
1133
+ * Get stores
1134
+ *
1135
+ * Retrieves all stores accessible to the authenticated user or API key.
1136
+ */
1137
+ getStores(opts) {
1138
+ return this.http.request("GET", "/v1/stores", { opts });
1139
+ }
1140
+ /**
1141
+ * Remove a store member
1142
+ *
1143
+ * Removes the specified member from the store, revoking their access.
1144
+ */
1145
+ kickStoreMember(memberId, opts) {
1146
+ return this.http.request("DELETE", "/v1/stores/{storeId}/members/{memberId}", {
1147
+ path: { memberId },
1148
+ opts,
1149
+ });
1150
+ }
1151
+ /**
1152
+ * Update a store
1153
+ *
1154
+ * Partially updates a store's configuration using the provided fields.
1155
+ */
1156
+ updateStore(body, opts) {
1157
+ return this.http.request("PATCH", "/v1/stores/{storeId}", { body, opts });
1158
+ }
1159
+ /**
1160
+ * Update a store member
1161
+ *
1162
+ * Updates the role assigned to a specific member of the store.
1163
+ */
1164
+ updateStoreMember(memberId, body, opts) {
1165
+ return this.http.request("PATCH", "/v1/stores/{storeId}/members/{memberId}", {
1166
+ path: { memberId },
1167
+ body,
1168
+ opts,
1169
+ });
1170
+ }
1171
+ }
1172
+ exports.StoreResource = StoreResource;
1173
+ class SubscriptionsResource {
1174
+ http;
1175
+ constructor(http) {
1176
+ this.http = http;
1177
+ }
1178
+ /**
1179
+ * Cancel subscription by ID
1180
+ *
1181
+ * Cancels a subscription for the specified store by the supplied ID.
1182
+ * @param subscriptionId The ID of the subscription.
1183
+ */
1184
+ cancelSubscription(subscriptionId, body, opts) {
1185
+ return this.http.request("POST", "/v1/stores/{storeId}/subscriptions/{subscriptionId}/cancel", { path: { subscriptionId }, body, opts });
1186
+ }
1187
+ /**
1188
+ * Get subscription by ID
1189
+ *
1190
+ * Retrieves a subscription for the specified store by the supplied ID.
1191
+ * @param subscriptionId The ID of the subscription.
1192
+ */
1193
+ getSubscriptionById(subscriptionId, opts) {
1194
+ return this.http.request("GET", "/v1/stores/{storeId}/subscriptions/{subscriptionId}", { path: { subscriptionId }, opts });
1195
+ }
1196
+ /**
1197
+ * Get subscriptions
1198
+ *
1199
+ * Retrieves all subscriptions for the specified store.
1200
+ */
1201
+ getSubscriptions(query, opts) {
1202
+ return this.http.request("GET", "/v1/stores/{storeId}/subscriptions", {
1203
+ query,
1204
+ opts,
1205
+ });
1206
+ }
1207
+ /**
1208
+ * Preview a subscription change
1209
+ *
1210
+ * Simulates a subscription change and returns the pricing breakdown without creating any records or
1211
+ * initiating a payment. Accepts the same request body as `POST change` — see that endpoint for
1212
+ * full parameter documentation. Does not return the `pending_payment` field.
1213
+ */
1214
+ previewSubscriptionChange(subscriptionId, body, opts) {
1215
+ return this.http.request("POST", "/v1/stores/{storeId}/subscriptions/{subscriptionId}/change/preview", { path: { subscriptionId }, body, opts });
1216
+ }
1217
+ /**
1218
+ * Stop pending subscription cancellation
1219
+ *
1220
+ * Stops a pending subscription cancellation for the specified store by the supplied ID.
1221
+ * @param subscriptionId The ID of the subscription.
1222
+ */
1223
+ stopPendingSubscriptionCancellation(subscriptionId, opts) {
1224
+ return this.http.request("POST", "/v1/stores/{storeId}/subscriptions/{subscriptionId}/stop-pending-cancellation", { path: { subscriptionId }, opts });
1225
+ }
1226
+ /**
1227
+ * Update items on a subscription
1228
+ *
1229
+ * Updates the subscription lines, including the pricing, on an active subscription. The subscription must not be within 1 hour of its
1230
+ * next renewal, and only one change can be pending at a time.
1231
+ *
1232
+ * **Access**
1233
+ *
1234
+ * This endpoint requires the Subscription Updates API feature flag to be enabled on your store. Contact
1235
+ * PayNow to request access.
1236
+ *
1237
+ * **Proration behavior**
1238
+ *
1239
+ * Controlled by the `proration_behavior` field on the request:
1240
+ *
1241
+ * - `immediate` - the change is applied as soon as possible.
1242
+ * Proration is calculated for the remaining period. If the prorated amount is ≥ $0.50 (or equivalent in other currencies), an order is
1243
+ * initiated against the subscription's payment method; the change is applied once the payment succeeds.
1244
+ * If the prorated amount is below $0.50, no order is created and the change is
1245
+ * applied instantly.
1246
+ * Only one proration order is allowed per billing cycle - a second immediate change in the same
1247
+ * period will be rejected if a proration was already charged.
1248
+ * When a payment is triggered, the response will include a `pending_payment` object. The payment result
1249
+ * is synchronous - check `pending_payment.declined` to determine whether the charge succeeded. If
1250
+ * declined, `pending_payment.decline_code` contains the reason.
1251
+ *
1252
+ * - `next_billing_period` - no payment is created. The change is queued and will be applied automatically
1253
+ * at the start of the next renewal cycle. Ideal for downgrades.
1254
+ *
1255
+ * - `none` - the change is applied instantly with no proration calculated or charged.
1256
+ *
1257
+ * **Reverting a pending change**
1258
+ *
1259
+ * If a `next_billing_period` change is pending and the new request specifies the same product versions
1260
+ * that are already on the subscription (i.e. reverting back to the current state), the pending change
1261
+ * is canceled rather than rejected. The canceled change record is returned in the response.
1262
+ */
1263
+ updateSubscription(subscriptionId, body, opts) {
1264
+ return this.http.request("POST", "/v1/stores/{storeId}/subscriptions/{subscriptionId}/change", { path: { subscriptionId }, body, opts });
1265
+ }
1266
+ }
1267
+ exports.SubscriptionsResource = SubscriptionsResource;
1268
+ class TagsResource {
1269
+ http;
1270
+ constructor(http) {
1271
+ this.http = http;
1272
+ }
1273
+ /**
1274
+ * Create a new tag
1275
+ */
1276
+ createTag(body, opts) {
1277
+ return this.http.request("POST", "/v1/stores/{storeId}/tags", { body, opts });
1278
+ }
1279
+ /**
1280
+ * Delete a tag by ID
1281
+ */
1282
+ deleteTag(tagId, opts) {
1283
+ return this.http.request("DELETE", "/v1/stores/{storeId}/tags/{tagId}", {
1284
+ path: { tagId },
1285
+ opts,
1286
+ });
1287
+ }
1288
+ /**
1289
+ * Delete tag image
1290
+ *
1291
+ * Deletes an image for a tag
1292
+ */
1293
+ deleteTagImage(tagId, opts) {
1294
+ return this.http.request("DELETE", "/v1/stores/{storeId}/tags/{tagId}/image", {
1295
+ path: { tagId },
1296
+ opts,
1297
+ });
1298
+ }
1299
+ /**
1300
+ * Finish tag image upload
1301
+ *
1302
+ * Finishes an image upload for a tag
1303
+ */
1304
+ finishTagImageUpload(tagId, body, opts) {
1305
+ return this.http.request("POST", "/v1/stores/{storeId}/tags/{tagId}/image-upload-finish", { path: { tagId }, body, opts });
1306
+ }
1307
+ /**
1308
+ * Get a tag by an ID
1309
+ */
1310
+ getTag(tagId, opts) {
1311
+ return this.http.request("GET", "/v1/stores/{storeId}/tags/{tagId}", {
1312
+ path: { tagId },
1313
+ opts,
1314
+ });
1315
+ }
1316
+ /**
1317
+ * Get upload URL for tag image
1318
+ *
1319
+ * Gets a pre-signed upload URL for uploading an image to a tag
1320
+ */
1321
+ getTagImageUploadUrl(tagId, opts) {
1322
+ return this.http.request("GET", "/v1/stores/{storeId}/tags/{tagId}/image-upload-url", { path: { tagId }, opts });
1323
+ }
1324
+ /**
1325
+ * Get all tags for a store
1326
+ */
1327
+ getTags(opts) {
1328
+ return this.http.request("GET", "/v1/stores/{storeId}/tags", { opts });
1329
+ }
1330
+ /**
1331
+ * Update a tag by ID
1332
+ */
1333
+ updateTag(tagId, body, opts) {
1334
+ return this.http.request("PATCH", "/v1/stores/{storeId}/tags/{tagId}", {
1335
+ path: { tagId },
1336
+ body,
1337
+ opts,
1338
+ });
1339
+ }
1340
+ }
1341
+ exports.TagsResource = TagsResource;
1342
+ class TierGroupsResource {
1343
+ http;
1344
+ constructor(http) {
1345
+ this.http = http;
1346
+ }
1347
+ /**
1348
+ * Create a new tier group
1349
+ */
1350
+ createTierGroup(body, opts) {
1351
+ return this.http.request("POST", "/v1/stores/{storeId}/tier-groups", {
1352
+ body,
1353
+ opts,
1354
+ });
1355
+ }
1356
+ /**
1357
+ * Delete a tier group by ID
1358
+ */
1359
+ deleteTierGroup(tierGroupId, opts) {
1360
+ return this.http.request("DELETE", "/v1/stores/{storeId}/tier-groups/{tierGroupId}", {
1361
+ path: { tierGroupId },
1362
+ opts,
1363
+ });
1364
+ }
1365
+ /**
1366
+ * Get a tier group by ID
1367
+ */
1368
+ getTierGroup(tierGroupId, opts) {
1369
+ return this.http.request("GET", "/v1/stores/{storeId}/tier-groups/{tierGroupId}", { path: { tierGroupId }, opts });
1370
+ }
1371
+ /**
1372
+ * List all tier groups for a store
1373
+ */
1374
+ listTierGroups(opts) {
1375
+ return this.http.request("GET", "/v1/stores/{storeId}/tier-groups", {
1376
+ opts,
1377
+ });
1378
+ }
1379
+ /**
1380
+ * Update a tier group by ID
1381
+ */
1382
+ updateTierGroup(tierGroupId, body, opts) {
1383
+ return this.http.request("PATCH", "/v1/stores/{storeId}/tier-groups/{tierGroupId}", { path: { tierGroupId }, body, opts });
1384
+ }
1385
+ }
1386
+ exports.TierGroupsResource = TierGroupsResource;
1387
+ class TrialsResource {
1388
+ http;
1389
+ constructor(http) {
1390
+ this.http = http;
1391
+ }
1392
+ /**
1393
+ * Create trial eligibility override for a customer
1394
+ *
1395
+ * Creates a new trial eligibility override for the specified customer.
1396
+ * @param customerId The ID of the customer to create the trial eligibility override for.
1397
+ */
1398
+ createEligibilityOverrideForCustomer(customerId, body, opts) {
1399
+ return this.http.request("POST", "/v1/stores/{storeId}/customers/{customerId}/trials/eligibility/overrides", { path: { customerId }, body, opts });
1400
+ }
1401
+ /**
1402
+ * Delete trial eligibility override for a customer
1403
+ *
1404
+ * Deletes an existing trial eligibility override.
1405
+ * @param trialEligibilityOverrideId The ID of the trial eligibility override to delete.
1406
+ */
1407
+ deleteEligibilityOverrideForCustomer(customerId, trialEligibilityOverrideId, opts) {
1408
+ return this.http.request("DELETE", "/v1/stores/{storeId}/customers/{customerId}/trials/eligibility/overrides/{trialEligibilityOverrideId}", { path: { customerId, trialEligibilityOverrideId }, opts });
1409
+ }
1410
+ /**
1411
+ * Get trial eligibility overrides for a specific customer
1412
+ *
1413
+ * Retrieves all trial eligibility overrides for the specified customer.
1414
+ * @param customerId The ID of the customer to retrieve trial eligibility overrides for.
1415
+ */
1416
+ getEligibilityOverridesForCustomer(customerId, query, opts) {
1417
+ return this.http.request("GET", "/v1/stores/{storeId}/customers/{customerId}/trials/eligibility/overrides", { path: { customerId }, query, opts });
1418
+ }
1419
+ /**
1420
+ * Get a trial by ID for a store
1421
+ */
1422
+ getTrial(trialId, opts) {
1423
+ return this.http.request("GET", "/v1/stores/{storeId}/trials/{trialId}", {
1424
+ path: { trialId },
1425
+ opts,
1426
+ });
1427
+ }
1428
+ /**
1429
+ * Get trials for a store
1430
+ */
1431
+ getTrials(query, opts) {
1432
+ return this.http.request("GET", "/v1/stores/{storeId}/trials", {
1433
+ query,
1434
+ opts,
1435
+ });
1436
+ }
1437
+ }
1438
+ exports.TrialsResource = TrialsResource;
1439
+ class UpsellSettingsResource {
1440
+ http;
1441
+ constructor(http) {
1442
+ this.http = http;
1443
+ }
1444
+ /**
1445
+ * Get store upselling settings
1446
+ *
1447
+ * Retrieves upselling settings for the store.
1448
+ */
1449
+ getStoreUpsellSettings(opts) {
1450
+ return this.http.request("GET", "/v1/stores/{storeId}/upsell-settings", { opts });
1451
+ }
1452
+ /**
1453
+ * Updates store upselling settings
1454
+ *
1455
+ * Updates upselling settings for a store.
1456
+ */
1457
+ updateStoreUpsellSettings(body, opts) {
1458
+ return this.http.request("PATCH", "/v1/stores/{storeId}/upsell-settings", { body, opts });
1459
+ }
1460
+ }
1461
+ exports.UpsellSettingsResource = UpsellSettingsResource;
1462
+ class WebhooksResource {
1463
+ http;
1464
+ constructor(http) {
1465
+ this.http = http;
1466
+ }
1467
+ createSubscription(body, opts) {
1468
+ return this.http.request("POST", "/v1/stores/{storeId}/webhooks", {
1469
+ body,
1470
+ opts,
1471
+ });
1472
+ }
1473
+ deleteSubscription(webhookId, opts) {
1474
+ return this.http.request("DELETE", "/v1/stores/{storeId}/webhooks/{webhookId}", {
1475
+ path: { webhookId },
1476
+ opts,
1477
+ });
1478
+ }
1479
+ getHistory(webhookId, query, opts) {
1480
+ return this.http.request("GET", "/v1/stores/{storeId}/webhooks/{webhookId}/history", { path: { webhookId }, query, opts });
1481
+ }
1482
+ getSubscriptions(opts) {
1483
+ return this.http.request("GET", "/v1/stores/{storeId}/webhooks", { opts });
1484
+ }
1485
+ getVariables(opts) {
1486
+ return this.http.request("GET", "/v1/stores/{storeId}/webhooks/variables", { opts });
1487
+ }
1488
+ resend(body, opts) {
1489
+ return this.http.request("POST", "/v1/stores/{storeId}/webhooks/resend", { body, opts });
1490
+ }
1491
+ updateSubscription(webhookId, body, opts) {
1492
+ return this.http.request("PATCH", "/v1/stores/{storeId}/webhooks/{webhookId}", { path: { webhookId }, body, opts });
1493
+ }
1494
+ }
1495
+ exports.WebhooksResource = WebhooksResource;
1496
+ /** Typed client for the PayNow management API. */
1497
+ class ManagementClient {
1498
+ /** Escape hatch for endpoints this SDK does not model. */
1499
+ $http;
1500
+ affiliateLinks;
1501
+ bans;
1502
+ checkout;
1503
+ coupons;
1504
+ customer_portal_sessions;
1505
+ customers;
1506
+ customVariables;
1507
+ dashboard;
1508
+ dataMigrations;
1509
+ delivery;
1510
+ discord;
1511
+ downloadableFiles;
1512
+ gameServers;
1513
+ giftcards;
1514
+ globalCommands;
1515
+ invoices;
1516
+ marketing;
1517
+ navlinks;
1518
+ orders;
1519
+ paymentMethodTypes;
1520
+ payments;
1521
+ paymentSettings;
1522
+ productDependentMigrations;
1523
+ products;
1524
+ regionalPricing;
1525
+ sales;
1526
+ store;
1527
+ subscriptions;
1528
+ tags;
1529
+ tierGroups;
1530
+ trials;
1531
+ upsellSettings;
1532
+ webhooks;
1533
+ constructor(http) {
1534
+ this.$http = http;
1535
+ this.affiliateLinks = new AffiliateLinksResource(http);
1536
+ this.bans = new BansResource(http);
1537
+ this.checkout = new CheckoutResource(http);
1538
+ this.coupons = new CouponsResource(http);
1539
+ this.customer_portal_sessions = new CustomerPortalSessionsResource(http);
1540
+ this.customers = new CustomersResource(http);
1541
+ this.customVariables = new CustomVariablesResource(http);
1542
+ this.dashboard = new DashboardResource(http);
1543
+ this.dataMigrations = new DataMigrationsResource(http);
1544
+ this.delivery = new DeliveryResource(http);
1545
+ this.discord = new DiscordResource(http);
1546
+ this.downloadableFiles = new DownloadableFilesResource(http);
1547
+ this.gameServers = new GameServersResource(http);
1548
+ this.giftcards = new GiftcardsResource(http);
1549
+ this.globalCommands = new GlobalCommandsResource(http);
1550
+ this.invoices = new InvoicesResource(http);
1551
+ this.marketing = new MarketingResource(http);
1552
+ this.navlinks = new NavlinksResource(http);
1553
+ this.orders = new OrdersResource(http);
1554
+ this.paymentMethodTypes = new PaymentMethodTypesResource(http);
1555
+ this.payments = new PaymentsResource(http);
1556
+ this.paymentSettings = new PaymentSettingsResource(http);
1557
+ this.productDependentMigrations = new ProductDependentMigrationsResource(http);
1558
+ this.products = new ProductsResource(http);
1559
+ this.regionalPricing = new RegionalPricingResource(http);
1560
+ this.sales = new SalesResource(http);
1561
+ this.store = new StoreResource(http);
1562
+ this.subscriptions = new SubscriptionsResource(http);
1563
+ this.tags = new TagsResource(http);
1564
+ this.tierGroups = new TierGroupsResource(http);
1565
+ this.trials = new TrialsResource(http);
1566
+ this.upsellSettings = new UpsellSettingsResource(http);
1567
+ this.webhooks = new WebhooksResource(http);
1568
+ }
1569
+ }
1570
+ exports.ManagementClient = ManagementClient;
1571
+ /** Creates a ManagementClient that authenticates and scopes every request. */
1572
+ function createManagementClient(options) {
1573
+ const headers = { ...options.headers };
1574
+ headers.Authorization = `APIKey ${options.apiKey}`;
1575
+ return new ManagementClient(new http_js_1.HttpClient({
1576
+ baseUrl: options.baseUrl,
1577
+ timeoutMs: options.timeoutMs,
1578
+ fetch: options.fetch,
1579
+ headers,
1580
+ pathDefaults: { storeId: options.storeId, store_id: options.storeId },
1581
+ }));
1582
+ }
1583
+ //# sourceMappingURL=client.js.map