@paynow-gg/typescript-sdk 1.0.60 → 2.0.1

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