@paynow-gg/typescript-sdk 2.1.3 → 2.1.4
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.
- package/dist/cjs/generated/management/client.d.ts +616 -72
- package/dist/cjs/generated/management/client.d.ts.map +1 -1
- package/dist/cjs/generated/management/client.js +675 -158
- package/dist/cjs/generated/management/client.js.map +1 -1
- package/dist/cjs/generated/management/types.d.ts +973 -84
- package/dist/cjs/generated/management/types.d.ts.map +1 -1
- package/dist/cjs/generated/storefront/types.d.ts +4 -0
- package/dist/cjs/generated/storefront/types.d.ts.map +1 -1
- package/dist/esm/generated/management/client.d.ts +616 -72
- package/dist/esm/generated/management/client.d.ts.map +1 -1
- package/dist/esm/generated/management/client.js +674 -155
- package/dist/esm/generated/management/client.js.map +1 -1
- package/dist/esm/generated/management/types.d.ts +973 -84
- package/dist/esm/generated/management/types.d.ts.map +1 -1
- package/dist/esm/generated/storefront/types.d.ts +4 -0
- package/dist/esm/generated/storefront/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,21 +5,49 @@ export class AffiliateLinksResource {
|
|
|
5
5
|
constructor(http) {
|
|
6
6
|
this.http = http;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Create affiliate link
|
|
10
|
+
*
|
|
11
|
+
* Creates a new affiliate link in the specified store.
|
|
12
|
+
*/
|
|
8
13
|
createAffiliateLink(body, opts) {
|
|
9
14
|
return this.http.request("POST", "/v1/stores/{storeId}/affiliate-links", {
|
|
10
15
|
body,
|
|
11
16
|
opts,
|
|
12
17
|
});
|
|
13
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Delete affiliate link by ID
|
|
21
|
+
*
|
|
22
|
+
* Deletes an affiliate link by the ID for the specified store.
|
|
23
|
+
* @param affiliateLinkId The ID of the affiliate link.
|
|
24
|
+
*/
|
|
14
25
|
deleteAffiliateLink(affiliateLinkId, opts) {
|
|
15
26
|
return this.http.request("DELETE", "/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}", { path: { affiliateLinkId }, opts });
|
|
16
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Get affiliate link by ID
|
|
30
|
+
*
|
|
31
|
+
* Retrieves an affiliate link by the ID for the specified store.
|
|
32
|
+
* @param affiliateLinkId The ID of the affiliate link.
|
|
33
|
+
*/
|
|
17
34
|
getAffiliateLink(affiliateLinkId, opts) {
|
|
18
35
|
return this.http.request("GET", "/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}", { path: { affiliateLinkId }, opts });
|
|
19
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Get affiliate links
|
|
39
|
+
*
|
|
40
|
+
* Retrieves all affiliate links for the specified store.
|
|
41
|
+
*/
|
|
20
42
|
getAffiliateLinks(opts) {
|
|
21
43
|
return this.http.request("GET", "/v1/stores/{storeId}/affiliate-links", { opts });
|
|
22
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Update affiliate link by ID
|
|
47
|
+
*
|
|
48
|
+
* Performs a delta update of an affiliate link by the ID for the specified store.
|
|
49
|
+
* @param affiliateLinkId The ID of the affiliate link.
|
|
50
|
+
*/
|
|
23
51
|
updateAffiliateLink(affiliateLinkId, body, opts) {
|
|
24
52
|
return this.http.request("PATCH", "/v1/stores/{storeId}/affiliate-links/{affiliateLinkId}", { path: { affiliateLinkId }, body, opts });
|
|
25
53
|
}
|
|
@@ -29,112 +57,67 @@ export class BansResource {
|
|
|
29
57
|
constructor(http) {
|
|
30
58
|
this.http = http;
|
|
31
59
|
}
|
|
32
|
-
checkForBanByIdentities(body, opts) {
|
|
33
|
-
return this.http.request("POST", "/v1/stores/{storeId}/bans/check", { body, opts });
|
|
34
|
-
}
|
|
35
|
-
createBan(body, opts) {
|
|
36
|
-
return this.http.request("POST", "/v1/stores/{storeId}/bans", { body, opts });
|
|
37
|
-
}
|
|
38
|
-
deleteBan(banId, opts) {
|
|
39
|
-
return this.http.request("DELETE", "/v1/stores/{storeId}/bans/{banId}", {
|
|
40
|
-
path: { banId },
|
|
41
|
-
opts,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
getBan(banId, opts) {
|
|
45
|
-
return this.http.request("GET", "/v1/stores/{storeId}/bans/{banId}", {
|
|
46
|
-
path: { banId },
|
|
47
|
-
opts,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
getBans(query, opts) {
|
|
51
|
-
return this.http.request("GET", "/v1/stores/{storeId}/bans", { query, opts });
|
|
52
|
-
}
|
|
53
|
-
updateBan(banId, body, opts) {
|
|
54
|
-
return this.http.request("PATCH", "/v1/stores/{storeId}/bans/{banId}", {
|
|
55
|
-
path: { banId },
|
|
56
|
-
body,
|
|
57
|
-
opts,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
export class BillingResource {
|
|
62
|
-
http;
|
|
63
|
-
constructor(http) {
|
|
64
|
-
this.http = http;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Change subscription plan
|
|
68
|
-
*
|
|
69
|
-
* Moves the store onto a different plan. When the change needs paying for, the response
|
|
70
|
-
* carries a 'session_url' the store owner must complete.
|
|
71
|
-
*/
|
|
72
|
-
changeSubscriptionPlan(body, opts) {
|
|
73
|
-
return this.http.request("POST", "/v1/stores/{storeId}/billing/plans/change", { body, opts });
|
|
74
|
-
}
|
|
75
60
|
/**
|
|
76
|
-
*
|
|
61
|
+
* Check for ban by identities
|
|
77
62
|
*
|
|
78
|
-
*
|
|
63
|
+
* Checks whether any of the supplied identities are banned in the specified store.
|
|
79
64
|
*/
|
|
80
|
-
|
|
81
|
-
return this.http.request("POST", "/v1/stores/{storeId}/
|
|
65
|
+
checkForBanByIdentities(body, opts) {
|
|
66
|
+
return this.http.request("POST", "/v1/stores/{storeId}/bans/check", { body, opts });
|
|
82
67
|
}
|
|
83
68
|
/**
|
|
84
|
-
* Create
|
|
69
|
+
* Create ban
|
|
85
70
|
*
|
|
86
|
-
*
|
|
87
|
-
* active subscription. The store owner has to visit the returned 'session_url' to complete
|
|
88
|
-
* the update.
|
|
71
|
+
* Creates a new ban in the specified store.
|
|
89
72
|
*/
|
|
90
|
-
|
|
91
|
-
return this.http.request("POST", "/v1/stores/{storeId}/
|
|
73
|
+
createBan(body, opts) {
|
|
74
|
+
return this.http.request("POST", "/v1/stores/{storeId}/bans", { body, opts });
|
|
92
75
|
}
|
|
93
76
|
/**
|
|
94
|
-
*
|
|
77
|
+
* Delete ban by ID
|
|
95
78
|
*
|
|
96
|
-
*
|
|
79
|
+
* Deletes a ban by the ID for the specified store.
|
|
80
|
+
* @param banId The ID of the ban.
|
|
97
81
|
*/
|
|
98
|
-
|
|
99
|
-
return this.http.request("
|
|
82
|
+
deleteBan(banId, opts) {
|
|
83
|
+
return this.http.request("DELETE", "/v1/stores/{storeId}/bans/{banId}", {
|
|
84
|
+
path: { banId },
|
|
100
85
|
opts,
|
|
101
86
|
});
|
|
102
87
|
}
|
|
103
88
|
/**
|
|
104
|
-
* Get
|
|
89
|
+
* Get ban by ID
|
|
105
90
|
*
|
|
106
|
-
* Retrieves
|
|
91
|
+
* Retrieves a ban by the ID for the specified store.
|
|
92
|
+
* @param banId The ID of the ban.
|
|
107
93
|
*/
|
|
108
|
-
|
|
109
|
-
return this.http.request("GET", "/v1/stores/{storeId}/
|
|
94
|
+
getBan(banId, opts) {
|
|
95
|
+
return this.http.request("GET", "/v1/stores/{storeId}/bans/{banId}", {
|
|
96
|
+
path: { banId },
|
|
97
|
+
opts,
|
|
98
|
+
});
|
|
110
99
|
}
|
|
111
100
|
/**
|
|
112
|
-
* Get
|
|
101
|
+
* Get bans
|
|
113
102
|
*
|
|
114
|
-
* Retrieves
|
|
115
|
-
* call this.
|
|
103
|
+
* Retrieves all bans for the specified store.
|
|
116
104
|
*/
|
|
117
|
-
|
|
118
|
-
return this.http.request("GET", "/v1/stores/{storeId}/
|
|
105
|
+
getBans(query, opts) {
|
|
106
|
+
return this.http.request("GET", "/v1/stores/{storeId}/bans", { query, opts });
|
|
119
107
|
}
|
|
120
108
|
/**
|
|
121
|
-
*
|
|
109
|
+
* Update ban by ID
|
|
122
110
|
*
|
|
123
|
-
*
|
|
111
|
+
* Updates a ban by the ID for the specified store.
|
|
112
|
+
* @param banId The ID of the ban.
|
|
124
113
|
*/
|
|
125
|
-
|
|
126
|
-
return this.http.request("
|
|
114
|
+
updateBan(banId, body, opts) {
|
|
115
|
+
return this.http.request("PATCH", "/v1/stores/{storeId}/bans/{banId}", {
|
|
116
|
+
path: { banId },
|
|
117
|
+
body,
|
|
127
118
|
opts,
|
|
128
119
|
});
|
|
129
120
|
}
|
|
130
|
-
/**
|
|
131
|
-
* Update billing details
|
|
132
|
-
*
|
|
133
|
-
* Replaces the billing address and tax details the store is invoiced under.
|
|
134
|
-
*/
|
|
135
|
-
updateStoreBillingDetails(body, opts) {
|
|
136
|
-
return this.http.request("PUT", "/v1/stores/{storeId}/billing/details", { body, opts });
|
|
137
|
-
}
|
|
138
121
|
}
|
|
139
122
|
export class CheckoutResource {
|
|
140
123
|
http;
|
|
@@ -207,40 +190,56 @@ export class CouponsResource {
|
|
|
207
190
|
constructor(http) {
|
|
208
191
|
this.http = http;
|
|
209
192
|
}
|
|
210
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Create coupon
|
|
195
|
+
*
|
|
196
|
+
* Creates a new coupon in the specified store.
|
|
197
|
+
*/
|
|
198
|
+
createCoupon(body, opts) {
|
|
211
199
|
return this.http.request("POST", "/v1/stores/{storeId}/coupons", { body, opts });
|
|
212
200
|
}
|
|
213
201
|
/**
|
|
214
|
-
*
|
|
202
|
+
* Delete coupon by ID
|
|
203
|
+
*
|
|
204
|
+
* Deletes a coupon by the ID for the specified store.
|
|
205
|
+
* @param couponId The ID of the coupon.
|
|
215
206
|
*/
|
|
216
|
-
|
|
207
|
+
deleteCoupon(couponId, opts) {
|
|
217
208
|
return this.http.request("DELETE", "/v1/stores/{storeId}/coupons/{couponId}", {
|
|
218
209
|
path: { couponId },
|
|
219
210
|
opts,
|
|
220
211
|
});
|
|
221
212
|
}
|
|
222
213
|
/**
|
|
223
|
-
*
|
|
214
|
+
* Get coupon by ID
|
|
215
|
+
*
|
|
216
|
+
* Retrieves a coupon by the ID for the specified store.
|
|
217
|
+
* @param couponId The ID of the coupon.
|
|
224
218
|
*/
|
|
225
|
-
|
|
219
|
+
getCouponById(couponId, opts) {
|
|
226
220
|
return this.http.request("GET", "/v1/stores/{storeId}/coupons/{couponId}", {
|
|
227
221
|
path: { couponId },
|
|
228
222
|
opts,
|
|
229
223
|
});
|
|
230
224
|
}
|
|
231
225
|
/**
|
|
232
|
-
*
|
|
226
|
+
* Get coupons
|
|
227
|
+
*
|
|
228
|
+
* Retrieves all coupons for the specified store.
|
|
233
229
|
*/
|
|
234
|
-
|
|
230
|
+
getCoupons(query, opts) {
|
|
235
231
|
return this.http.request("GET", "/v1/stores/{storeId}/coupons", {
|
|
236
232
|
query,
|
|
237
233
|
opts,
|
|
238
234
|
});
|
|
239
235
|
}
|
|
240
236
|
/**
|
|
241
|
-
*
|
|
237
|
+
* Update coupon by ID
|
|
238
|
+
*
|
|
239
|
+
* Performs a delta update of a coupon by the ID for the specified store.
|
|
240
|
+
* @param couponId The ID of the coupon.
|
|
242
241
|
*/
|
|
243
|
-
|
|
242
|
+
updateCoupon(couponId, body, opts) {
|
|
244
243
|
return this.http.request("PATCH", "/v1/stores/{storeId}/coupons/{couponId}", {
|
|
245
244
|
path: { couponId },
|
|
246
245
|
body,
|
|
@@ -347,6 +346,7 @@ export class CustomersResource {
|
|
|
347
346
|
* Update customer
|
|
348
347
|
*
|
|
349
348
|
* Updates an existing customer based on the fields passed.
|
|
349
|
+
* @param customerId The ID of the customer.
|
|
350
350
|
*/
|
|
351
351
|
updateCustomer(customerId, body, opts) {
|
|
352
352
|
return this.http.request("PATCH", "/v1/stores/{storeId}/customers/{customerId}", {
|
|
@@ -367,7 +367,7 @@ export class CustomVariablesResource {
|
|
|
367
367
|
* Creates a new custom variable for the specified store.
|
|
368
368
|
* Custom variables allow customers to provide additional input when purchasing products.
|
|
369
369
|
*/
|
|
370
|
-
|
|
370
|
+
createCustomVariable(body, opts) {
|
|
371
371
|
return this.http.request("POST", "/v1/stores/{storeId}/custom-variables", {
|
|
372
372
|
body,
|
|
373
373
|
opts,
|
|
@@ -380,7 +380,7 @@ export class CustomVariablesResource {
|
|
|
380
380
|
* This will also delete all associated options and cannot be undone.
|
|
381
381
|
* @param customVariableId The ID of the custom variable to delete.
|
|
382
382
|
*/
|
|
383
|
-
|
|
383
|
+
deleteCustomVariable(customVariableId, opts) {
|
|
384
384
|
return this.http.request("DELETE", "/v1/stores/{storeId}/custom-variables/{customVariableId}", { path: { customVariableId }, opts });
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
@@ -389,7 +389,7 @@ export class CustomVariablesResource {
|
|
|
389
389
|
* Retrieves a specific custom variable by ID from the specified store.
|
|
390
390
|
* @param customVariableId The ID of the custom variable to retrieve.
|
|
391
391
|
*/
|
|
392
|
-
|
|
392
|
+
getCustomVariableById(customVariableId, opts) {
|
|
393
393
|
return this.http.request("GET", "/v1/stores/{storeId}/custom-variables/{customVariableId}", { path: { customVariableId }, opts });
|
|
394
394
|
}
|
|
395
395
|
/**
|
|
@@ -397,7 +397,7 @@ export class CustomVariablesResource {
|
|
|
397
397
|
*
|
|
398
398
|
* Retrieves all custom variables for the specified store.
|
|
399
399
|
*/
|
|
400
|
-
|
|
400
|
+
getCustomVariables(opts) {
|
|
401
401
|
return this.http.request("GET", "/v1/stores/{storeId}/custom-variables", { opts });
|
|
402
402
|
}
|
|
403
403
|
/**
|
|
@@ -407,27 +407,20 @@ export class CustomVariablesResource {
|
|
|
407
407
|
* Only the fields specified in the request will be updated.
|
|
408
408
|
* @param customVariableId The ID of the custom variable to update.
|
|
409
409
|
*/
|
|
410
|
-
|
|
410
|
+
updateCustomVariable(customVariableId, body, opts) {
|
|
411
411
|
return this.http.request("PATCH", "/v1/stores/{storeId}/custom-variables/{customVariableId}", { path: { customVariableId }, body, opts });
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
export class DashboardResource {
|
|
415
|
-
http;
|
|
416
|
-
constructor(http) {
|
|
417
|
-
this.http = http;
|
|
418
|
-
}
|
|
419
|
-
getDashboardSearchHints(opts) {
|
|
420
|
-
return this.http.request("GET", "/v1/stores/{storeId}/dashboard/search-hints", { opts });
|
|
421
|
-
}
|
|
422
|
-
searchDashboard(query, opts) {
|
|
423
|
-
return this.http.request("GET", "/v1/stores/{storeId}/dashboard/search", { query, opts });
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
414
|
export class DataMigrationsResource {
|
|
427
415
|
http;
|
|
428
416
|
constructor(http) {
|
|
429
417
|
this.http = http;
|
|
430
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Get data migrations
|
|
421
|
+
*
|
|
422
|
+
* Retrieves all data migration tasks for the specified store.
|
|
423
|
+
*/
|
|
431
424
|
getDataMigrations(query, opts) {
|
|
432
425
|
return this.http.request("GET", "/v1/stores/{storeId}/data-migrations", { query, opts });
|
|
433
426
|
}
|
|
@@ -444,6 +437,7 @@ export class DeliveryResource {
|
|
|
444
437
|
* Assign a delivery item to a customer
|
|
445
438
|
*
|
|
446
439
|
* Allows you to assign a delivery item to a customer
|
|
440
|
+
* @param customerId The ID of the customer to assign the delivery item to.
|
|
447
441
|
*/
|
|
448
442
|
assignDeliveryItem(customerId, body, opts) {
|
|
449
443
|
return this.http.request("POST", "/v1/stores/{storeId}/customers/{customerId}/delivery/items", { path: { customerId }, body, opts });
|
|
@@ -460,6 +454,7 @@ export class DeliveryResource {
|
|
|
460
454
|
* Get command attempts associated with a customer
|
|
461
455
|
*
|
|
462
456
|
* Retrieves command attempts associated with a customer
|
|
457
|
+
* @param customerId The ID of the customer.
|
|
463
458
|
*/
|
|
464
459
|
getCommandAttemptsForCustomer(customerId, query, opts) {
|
|
465
460
|
return this.http.request("GET", "/v1/stores/{storeId}/customers/{customerId}/delivery/commands", { path: { customerId }, query, opts });
|
|
@@ -468,12 +463,16 @@ export class DeliveryResource {
|
|
|
468
463
|
* Get delivery items associated with a customer
|
|
469
464
|
*
|
|
470
465
|
* Retrieves delivery items associated with a customer
|
|
466
|
+
* @param customerId The ID of the customer.
|
|
471
467
|
*/
|
|
472
468
|
getCustomerDeliveryItems(customerId, query, opts) {
|
|
473
469
|
return this.http.request("GET", "/v1/stores/{storeId}/customers/{customerId}/delivery/items", { path: { customerId }, query, opts });
|
|
474
470
|
}
|
|
475
471
|
/**
|
|
476
472
|
* Returns delivery items in which an associated command attempt is for the gameserver
|
|
473
|
+
*
|
|
474
|
+
* Retrieves all delivery items that have a command attempt targeting the game server.
|
|
475
|
+
* @param gameServerId The ID of the game server.
|
|
477
476
|
*/
|
|
478
477
|
getGameServerDeliveryItems(gameServerId, query, opts) {
|
|
479
478
|
return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}/delivery/items", { path: { gameServerId }, query, opts });
|
|
@@ -500,6 +499,9 @@ export class DeliveryResource {
|
|
|
500
499
|
}
|
|
501
500
|
/**
|
|
502
501
|
* Resend commands for a given Gameserver
|
|
502
|
+
*
|
|
503
|
+
* Re-enqueues delivery commands for a game server, narrowed by the filters in the request body.
|
|
504
|
+
* @param gameServerId The ID of the game server.
|
|
503
505
|
*/
|
|
504
506
|
resendDeliveryCommandsForGameServer(gameServerId, body, opts) {
|
|
505
507
|
return this.http.request("POST", "/v1/stores/{storeId}/gameservers/{gameServerId}/delivery/commands/resend", { path: { gameServerId }, body, opts });
|
|
@@ -524,44 +526,123 @@ export class DiscordResource {
|
|
|
524
526
|
constructor(http) {
|
|
525
527
|
this.http = http;
|
|
526
528
|
}
|
|
529
|
+
/**
|
|
530
|
+
* Set product version Discord actions
|
|
531
|
+
*
|
|
532
|
+
* Replaces the Discord actions configured for a product version in the specified store.
|
|
533
|
+
* @param productVersionId The ID of the product version.
|
|
534
|
+
*/
|
|
527
535
|
createAction(productVersionId, body, opts) {
|
|
528
536
|
return this.http.request("PUT", "/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions", { path: { productVersionId }, body, opts });
|
|
529
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* Create Discord server link
|
|
540
|
+
*
|
|
541
|
+
* Creates a new link token that can be used to connect a Discord server to the specified store.
|
|
542
|
+
*/
|
|
530
543
|
createDiscordServerLink(opts) {
|
|
531
544
|
return this.http.request("POST", "/v1/stores/{storeId}/discord/links", {
|
|
532
545
|
opts,
|
|
533
546
|
});
|
|
534
547
|
}
|
|
548
|
+
/**
|
|
549
|
+
* Delete Discord server link
|
|
550
|
+
*
|
|
551
|
+
* Deletes a Discord server link by the token for the specified store.
|
|
552
|
+
* @param token The token of the Discord server link.
|
|
553
|
+
*/
|
|
535
554
|
deleteDiscordServerLinks(token, opts) {
|
|
536
|
-
return this.http.request("DELETE", "/v1/stores/{storeId}/discord/links/{token}", {
|
|
555
|
+
return this.http.request("DELETE", "/v1/stores/{storeId}/discord/links/{token}", {
|
|
556
|
+
path: { token },
|
|
557
|
+
opts,
|
|
558
|
+
});
|
|
537
559
|
}
|
|
560
|
+
/**
|
|
561
|
+
* Unlink Discord user from delivery item
|
|
562
|
+
*
|
|
563
|
+
* Removes the Discord user link from a delivery item in the specified store.
|
|
564
|
+
* @param inventoryItemId The ID of the delivery item.
|
|
565
|
+
*/
|
|
538
566
|
deleteUserToDeliveryItemLink(inventoryItemId, opts) {
|
|
539
567
|
return this.http.request("DELETE", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link", { path: { inventoryItemId }, opts });
|
|
540
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* Get product version Discord actions
|
|
571
|
+
*
|
|
572
|
+
* Retrieves all Discord actions configured for a product version in the specified store.
|
|
573
|
+
* @param productVersionId The ID of the product version.
|
|
574
|
+
*/
|
|
541
575
|
getActions(productVersionId, opts) {
|
|
542
576
|
return this.http.request("GET", "/v1/stores/{storeId}/product_versions/{productVersionId}/discord_actions", { path: { productVersionId }, opts });
|
|
543
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* Get Discord action execution history
|
|
580
|
+
*
|
|
581
|
+
* Retrieves the history of Discord actions executed for an order in the specified store.
|
|
582
|
+
* @param orderId The ID of the order.
|
|
583
|
+
*/
|
|
544
584
|
getDiscordActionExecutionHistory(orderId, opts) {
|
|
545
585
|
return this.http.request("GET", "/v1/stores/{storeId}/orders/{orderId}/discord/queued", { path: { orderId }, opts });
|
|
546
586
|
}
|
|
587
|
+
/**
|
|
588
|
+
* Get Discord server links
|
|
589
|
+
*
|
|
590
|
+
* Retrieves all Discord server links for the specified store.
|
|
591
|
+
*/
|
|
547
592
|
getDiscordServerLinks(opts) {
|
|
548
593
|
return this.http.request("GET", "/v1/stores/{storeId}/discord/links", { opts });
|
|
549
594
|
}
|
|
595
|
+
/**
|
|
596
|
+
* Get Discord server roles
|
|
597
|
+
*
|
|
598
|
+
* Retrieves all roles for a Discord server linked to the specified store.
|
|
599
|
+
* @param discordServerId The ID of the Discord server.
|
|
600
|
+
*/
|
|
550
601
|
getDiscordServerRoles(discordServerId, opts) {
|
|
551
602
|
return this.http.request("GET", "/v1/stores/{storeId}/discord/{discordServerId}/roles", { path: { discordServerId }, opts });
|
|
552
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* Get Discord server text channels
|
|
606
|
+
*
|
|
607
|
+
* Retrieves all text channels for a Discord server linked to the specified store.
|
|
608
|
+
* @param discordServerId The ID of the Discord server.
|
|
609
|
+
*/
|
|
553
610
|
getDiscordServerTextChannels(discordServerId, opts) {
|
|
554
611
|
return this.http.request("GET", "/v1/stores/{storeId}/discord/{discordServerId}/discord/text_channels", { path: { discordServerId }, opts });
|
|
555
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* Get linked Discord accounts
|
|
615
|
+
*
|
|
616
|
+
* Retrieves the Discord accounts linked to an order for the specified store.
|
|
617
|
+
* @param orderId The ID of the order.
|
|
618
|
+
*/
|
|
556
619
|
getLinkedDiscordAccounts(orderId, opts) {
|
|
557
620
|
return this.http.request("GET", "/v1/stores/{storeId}/orders/{orderId}/discord", { path: { orderId }, opts });
|
|
558
621
|
}
|
|
622
|
+
/**
|
|
623
|
+
* Get queued Discord actions for delivery item
|
|
624
|
+
*
|
|
625
|
+
* Retrieves all queued Discord actions for a delivery item in the specified store.
|
|
626
|
+
* @param inventoryItemId The ID of the delivery item.
|
|
627
|
+
*/
|
|
559
628
|
getQueuedDiscordActionForDeliveryItem(inventoryItemId, opts) {
|
|
560
629
|
return this.http.request("GET", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/queued", { path: { inventoryItemId }, opts });
|
|
561
630
|
}
|
|
631
|
+
/**
|
|
632
|
+
* Get Discord user linked to delivery item
|
|
633
|
+
*
|
|
634
|
+
* Retrieves the Discord profile linked to a delivery item in the specified store.
|
|
635
|
+
* @param inventoryItemId The ID of the delivery item.
|
|
636
|
+
*/
|
|
562
637
|
getUserToDeliveryItemLinks(inventoryItemId, opts) {
|
|
563
638
|
return this.http.request("GET", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link", { path: { inventoryItemId }, opts });
|
|
564
639
|
}
|
|
640
|
+
/**
|
|
641
|
+
* Link Discord user to delivery item
|
|
642
|
+
*
|
|
643
|
+
* Links a Discord user to a delivery item in the specified store.
|
|
644
|
+
* @param inventoryItemId The ID of the delivery item.
|
|
645
|
+
*/
|
|
565
646
|
setUserToDeliveryItemLink(inventoryItemId, query, opts) {
|
|
566
647
|
return this.http.request("PUT", "/v1/stores/{storeId}/inventory/{inventoryItemId}/discord/link", { path: { inventoryItemId }, query, opts });
|
|
567
648
|
}
|
|
@@ -580,6 +661,12 @@ export class DownloadableFilesResource {
|
|
|
580
661
|
finishDownloadableFileUpload(productId, downloadableFileId, opts) {
|
|
581
662
|
return this.http.request("POST", "/v1/stores/{storeId}/products/{productId}/downloadable-files/{downloadableFileId}/finish", { path: { productId, downloadableFileId }, opts });
|
|
582
663
|
}
|
|
664
|
+
/**
|
|
665
|
+
* Get downloadable files
|
|
666
|
+
*
|
|
667
|
+
* Retrieves all downloadable files for a product in the specified store.
|
|
668
|
+
* @param productId The ID of the product.
|
|
669
|
+
*/
|
|
583
670
|
getDownloadableFiles(productId, opts) {
|
|
584
671
|
return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}/downloadable-files", { path: { productId }, opts });
|
|
585
672
|
}
|
|
@@ -594,6 +681,8 @@ export class GameServersResource {
|
|
|
594
681
|
}
|
|
595
682
|
/**
|
|
596
683
|
* Create a new Game Server for a store
|
|
684
|
+
*
|
|
685
|
+
* Creates a new game server in the specified store.
|
|
597
686
|
*/
|
|
598
687
|
createGameServer(body, opts) {
|
|
599
688
|
return this.http.request("POST", "/v1/stores/{storeId}/gameservers", {
|
|
@@ -603,6 +692,9 @@ export class GameServersResource {
|
|
|
603
692
|
}
|
|
604
693
|
/**
|
|
605
694
|
* Create a console for a game server.
|
|
695
|
+
*
|
|
696
|
+
* Creates a new console for a game server in the specified store.
|
|
697
|
+
* @param gameServerId The ID of the game server.
|
|
606
698
|
*/
|
|
607
699
|
createGameServerConsole(gameServerId, body, opts) {
|
|
608
700
|
return this.http.request("POST", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, body, opts });
|
|
@@ -618,30 +710,44 @@ export class GameServersResource {
|
|
|
618
710
|
}
|
|
619
711
|
/**
|
|
620
712
|
* Delete an associated game server console.
|
|
713
|
+
*
|
|
714
|
+
* Deletes the console associated with a game server in the specified store.
|
|
715
|
+
* @param gameServerId The ID of the game server.
|
|
621
716
|
*/
|
|
622
717
|
deleteGameServerConsole(gameServerId, opts) {
|
|
623
718
|
return this.http.request("DELETE", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, opts });
|
|
624
719
|
}
|
|
625
720
|
/**
|
|
626
721
|
* Get a Game Server by ID for a store
|
|
722
|
+
*
|
|
723
|
+
* Retrieves a game server by the ID for the specified store.
|
|
724
|
+
* @param gameServerId The ID of the game server.
|
|
627
725
|
*/
|
|
628
726
|
getGameServer(gameServerId, opts) {
|
|
629
727
|
return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}", { path: { gameServerId }, opts });
|
|
630
728
|
}
|
|
631
729
|
/**
|
|
632
730
|
* Get the associated console for a game server.
|
|
731
|
+
*
|
|
732
|
+
* Retrieves the console associated with a game server in the specified store.
|
|
733
|
+
* @param gameServerId The ID of the game server.
|
|
633
734
|
*/
|
|
634
735
|
getGameServerConsole(gameServerId, opts) {
|
|
635
736
|
return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, opts });
|
|
636
737
|
}
|
|
637
738
|
/**
|
|
638
739
|
* Get console messages for a game server.
|
|
740
|
+
*
|
|
741
|
+
* Retrieves recent console messages for a game server in the specified store.
|
|
742
|
+
* @param gameServerId The ID of the game server.
|
|
639
743
|
*/
|
|
640
744
|
getGameServerConsoleMessages(gameServerId, opts) {
|
|
641
745
|
return this.http.request("GET", "/v1/stores/{storeId}/gameservers/{gameServerId}/console/messages", { path: { gameServerId }, opts });
|
|
642
746
|
}
|
|
643
747
|
/**
|
|
644
748
|
* Get Game Servers for a store
|
|
749
|
+
*
|
|
750
|
+
* Retrieves all game servers for the specified store.
|
|
645
751
|
*/
|
|
646
752
|
getGameServers(opts) {
|
|
647
753
|
return this.http.request("GET", "/v1/stores/{storeId}/gameservers", {
|
|
@@ -656,12 +762,18 @@ export class GameServersResource {
|
|
|
656
762
|
}
|
|
657
763
|
/**
|
|
658
764
|
* Update a Game Server By ID for a store
|
|
765
|
+
*
|
|
766
|
+
* Performs a delta update of a game server by the ID for the specified store.
|
|
767
|
+
* @param gameServerId The ID of the game server.
|
|
659
768
|
*/
|
|
660
769
|
updateGameServer(gameServerId, body, opts) {
|
|
661
770
|
return this.http.request("PATCH", "/v1/stores/{storeId}/gameservers/{gameServerId}", { path: { gameServerId }, body, opts });
|
|
662
771
|
}
|
|
663
772
|
/**
|
|
664
773
|
* Update a console for a game server.
|
|
774
|
+
*
|
|
775
|
+
* Performs a delta update of the console for a game server in the specified store.
|
|
776
|
+
* @param gameServerId The ID of the game server.
|
|
665
777
|
*/
|
|
666
778
|
updateGameServerConsole(gameServerId, body, opts) {
|
|
667
779
|
return this.http.request("PATCH", "/v1/stores/{storeId}/gameservers/{gameServerId}/console", { path: { gameServerId }, body, opts });
|
|
@@ -674,12 +786,17 @@ export class GiftcardsResource {
|
|
|
674
786
|
}
|
|
675
787
|
/**
|
|
676
788
|
* Create a Gift Card for a store
|
|
789
|
+
*
|
|
790
|
+
* Creates a new gift card in the specified store.
|
|
677
791
|
*/
|
|
678
792
|
createGiftCard(body, opts) {
|
|
679
793
|
return this.http.request("POST", "/v1/stores/{storeId}/giftcards", { body, opts });
|
|
680
794
|
}
|
|
681
795
|
/**
|
|
682
796
|
* Delete a Gift Card By ID for a store
|
|
797
|
+
*
|
|
798
|
+
* Deletes a gift card by the ID for the specified store.
|
|
799
|
+
* @param giftCardId The ID of the gift card.
|
|
683
800
|
*/
|
|
684
801
|
deleteGiftCard(giftCardId, opts) {
|
|
685
802
|
return this.http.request("DELETE", "/v1/stores/{storeId}/giftcards/{giftCardId}", {
|
|
@@ -689,6 +806,9 @@ export class GiftcardsResource {
|
|
|
689
806
|
}
|
|
690
807
|
/**
|
|
691
808
|
* Get a Gift Card By ID for a store
|
|
809
|
+
*
|
|
810
|
+
* Retrieves a gift card by the ID for the specified store.
|
|
811
|
+
* @param giftCardId The ID of the gift card.
|
|
692
812
|
*/
|
|
693
813
|
getGiftCard(giftCardId, opts) {
|
|
694
814
|
return this.http.request("GET", "/v1/stores/{storeId}/giftcards/{giftCardId}", {
|
|
@@ -698,6 +818,8 @@ export class GiftcardsResource {
|
|
|
698
818
|
}
|
|
699
819
|
/**
|
|
700
820
|
* Get Gift Cards for a store
|
|
821
|
+
*
|
|
822
|
+
* Retrieves all gift cards for the specified store.
|
|
701
823
|
*/
|
|
702
824
|
getGiftCards(query, opts) {
|
|
703
825
|
return this.http.request("GET", "/v1/stores/{storeId}/giftcards", {
|
|
@@ -707,6 +829,9 @@ export class GiftcardsResource {
|
|
|
707
829
|
}
|
|
708
830
|
/**
|
|
709
831
|
* Update a Gift Card By ID for a store
|
|
832
|
+
*
|
|
833
|
+
* Performs a delta update of a gift card by the ID for the specified store.
|
|
834
|
+
* @param giftCardId The ID of the gift card.
|
|
710
835
|
*/
|
|
711
836
|
updateGiftCard(giftCardId, body, opts) {
|
|
712
837
|
return this.http.request("PATCH", "/v1/stores/{storeId}/giftcards/{giftCardId}", {
|
|
@@ -753,6 +878,7 @@ export class GlobalCommandsResource {
|
|
|
753
878
|
* Update global command
|
|
754
879
|
*
|
|
755
880
|
* Updates a global command for a store.
|
|
881
|
+
* @param globalCommandId The ID of the global command.
|
|
756
882
|
*/
|
|
757
883
|
updateGlobalCommand(globalCommandId, body, opts) {
|
|
758
884
|
return this.http.request("PATCH", "/v1/stores/{storeId}/global-commands/{globalCommandId}", { path: { globalCommandId }, body, opts });
|
|
@@ -833,72 +959,153 @@ export class MarketingResource {
|
|
|
833
959
|
constructor(http) {
|
|
834
960
|
this.http = http;
|
|
835
961
|
}
|
|
962
|
+
/**
|
|
963
|
+
* Activate email template by ID
|
|
964
|
+
*
|
|
965
|
+
* Activates an email template by the ID for the specified store, so it is sent in place of the
|
|
966
|
+
* default template for its type.
|
|
967
|
+
* @param templateId The ID of the email template.
|
|
968
|
+
*/
|
|
836
969
|
activateEmailTemplate(templateId, opts) {
|
|
837
970
|
return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates/{templateId}/activate", { path: { templateId }, opts });
|
|
838
971
|
}
|
|
972
|
+
/**
|
|
973
|
+
* Create email template
|
|
974
|
+
*
|
|
975
|
+
* Creates a new email template in the specified store.
|
|
976
|
+
*/
|
|
839
977
|
createEmailTemplate(body, opts) {
|
|
840
978
|
return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates", { body, opts });
|
|
841
979
|
}
|
|
980
|
+
/**
|
|
981
|
+
* Deactivate email template by ID
|
|
982
|
+
*
|
|
983
|
+
* Deactivates an email template by the ID for the specified store, so the default template for
|
|
984
|
+
* its type is sent instead.
|
|
985
|
+
* @param templateId The ID of the email template.
|
|
986
|
+
*/
|
|
842
987
|
deactivateEmailTemplate(templateId, opts) {
|
|
843
988
|
return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates/{templateId}/deactivate", { path: { templateId }, opts });
|
|
844
989
|
}
|
|
990
|
+
/**
|
|
991
|
+
* Deactivate email template by type
|
|
992
|
+
*
|
|
993
|
+
* Deactivates the active email template of the supplied type for the specified store.
|
|
994
|
+
*/
|
|
845
995
|
deactivateEmailTemplateByType(body, opts) {
|
|
846
996
|
return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/templates/deactivate", { body, opts });
|
|
847
997
|
}
|
|
998
|
+
/**
|
|
999
|
+
* Delete email template by ID
|
|
1000
|
+
*
|
|
1001
|
+
* Deletes an email template by the ID for the specified store.
|
|
1002
|
+
* @param templateId The ID of the email template.
|
|
1003
|
+
*/
|
|
848
1004
|
deleteEmailTemplate(templateId, opts) {
|
|
849
1005
|
return this.http.request("DELETE", "/v1/stores/{storeId}/marketing/email/templates/{templateId}", { path: { templateId }, opts });
|
|
850
1006
|
}
|
|
851
1007
|
finishEmailBrandingImageUpload(body, opts) {
|
|
852
1008
|
return this.http.request("POST", "/v1/stores/{storeId}/marketing/email/branding/image-upload-finish", { body, opts });
|
|
853
1009
|
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Get email branding
|
|
1012
|
+
*
|
|
1013
|
+
* Retrieves the email branding for the specified store.
|
|
1014
|
+
*/
|
|
854
1015
|
getEmailBranding(opts) {
|
|
855
1016
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/branding", { opts });
|
|
856
1017
|
}
|
|
857
1018
|
getEmailBrandingImageUploadUrl(query, opts) {
|
|
858
1019
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/branding/image-upload-url", { query, opts });
|
|
859
1020
|
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Get email deliveries
|
|
1023
|
+
*
|
|
1024
|
+
* Retrieves all email deliveries for the specified store.
|
|
1025
|
+
*/
|
|
860
1026
|
getEmailDeliveries(query, opts) {
|
|
861
1027
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/deliveries", { query, opts });
|
|
862
1028
|
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Get email delivery by ID
|
|
1031
|
+
*
|
|
1032
|
+
* Retrieves an email delivery by the ID for the specified store.
|
|
1033
|
+
* @param emailDeliveryId The ID of the email delivery.
|
|
1034
|
+
*/
|
|
863
1035
|
getEmailDelivery(emailDeliveryId, opts) {
|
|
864
1036
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/deliveries/{emailDeliveryId}", { path: { emailDeliveryId }, opts });
|
|
865
1037
|
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Get email template by ID
|
|
1040
|
+
*
|
|
1041
|
+
* Retrieves an email template by the ID for the specified store.
|
|
1042
|
+
* @param templateId The ID of the email template.
|
|
1043
|
+
*/
|
|
866
1044
|
getEmailTemplate(templateId, opts) {
|
|
867
1045
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/templates/{templateId}", { path: { templateId }, opts });
|
|
868
1046
|
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Get email template definitions
|
|
1049
|
+
*
|
|
1050
|
+
* Retrieves the email template definitions available to the specified store.
|
|
1051
|
+
*/
|
|
869
1052
|
getEmailTemplateDefinitions(opts) {
|
|
870
1053
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/template-definitions", { opts });
|
|
871
1054
|
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Get email templates
|
|
1057
|
+
*
|
|
1058
|
+
* Retrieves all email templates for the specified store.
|
|
1059
|
+
*/
|
|
872
1060
|
getEmailTemplates(query, opts) {
|
|
873
1061
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/email/templates", { query, opts });
|
|
874
1062
|
}
|
|
875
1063
|
/**
|
|
876
1064
|
* Gets the abandoned checkout behaviour for a store
|
|
1065
|
+
*
|
|
1066
|
+
* Retrieves the abandoned checkout configuration for the specified store.
|
|
877
1067
|
*/
|
|
878
1068
|
getStoreAbandonedCheckoutConfigurationOptions(opts) {
|
|
879
1069
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/abandoned-checkouts/configuration", { opts });
|
|
880
1070
|
}
|
|
881
1071
|
/**
|
|
882
1072
|
* Gets the purchase follow up behaviour for a store
|
|
1073
|
+
*
|
|
1074
|
+
* Retrieves the purchase follow up configuration for the specified store.
|
|
883
1075
|
*/
|
|
884
1076
|
getStorePurchaseFollowUpConfigurationOptions(opts) {
|
|
885
1077
|
return this.http.request("GET", "/v1/stores/{storeId}/marketing/purchase-follow-ups/configuration", { opts });
|
|
886
1078
|
}
|
|
887
1079
|
/**
|
|
888
1080
|
* Sets the abandoned checkout behaviour for a store
|
|
1081
|
+
*
|
|
1082
|
+
* Updates the abandoned checkout configuration for the specified store.
|
|
889
1083
|
*/
|
|
890
1084
|
setStoreAbandonedCheckoutConfigurationOptions(body, opts) {
|
|
891
1085
|
return this.http.request("PUT", "/v1/stores/{storeId}/marketing/abandoned-checkouts/configuration", { body, opts });
|
|
892
1086
|
}
|
|
893
1087
|
/**
|
|
894
1088
|
* Sets the purchase follow up behaviour for a store
|
|
1089
|
+
*
|
|
1090
|
+
* Updates the purchase follow up configuration for the specified store.
|
|
895
1091
|
*/
|
|
896
1092
|
setStorePurchaseFollowUpConfigurationOptions(body, opts) {
|
|
897
1093
|
return this.http.request("PUT", "/v1/stores/{storeId}/marketing/purchase-follow-ups/configuration", { body, opts });
|
|
898
1094
|
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Update email branding
|
|
1097
|
+
*
|
|
1098
|
+
* Performs a delta update of the email branding for the specified store.
|
|
1099
|
+
*/
|
|
899
1100
|
updateEmailBranding(body, opts) {
|
|
900
1101
|
return this.http.request("PATCH", "/v1/stores/{storeId}/marketing/email/branding", { body, opts });
|
|
901
1102
|
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Update email template by ID
|
|
1105
|
+
*
|
|
1106
|
+
* Performs a delta update of an email template by the ID for the specified store.
|
|
1107
|
+
* @param templateId The ID of the email template.
|
|
1108
|
+
*/
|
|
902
1109
|
updateEmailTemplate(templateId, body, opts) {
|
|
903
1110
|
return this.http.request("PATCH", "/v1/stores/{storeId}/marketing/email/templates/{templateId}", { path: { templateId }, body, opts });
|
|
904
1111
|
}
|
|
@@ -910,12 +1117,17 @@ export class NavlinksResource {
|
|
|
910
1117
|
}
|
|
911
1118
|
/**
|
|
912
1119
|
* Create a new NavLink for a store
|
|
1120
|
+
*
|
|
1121
|
+
* Creates a new navigation link in the specified store.
|
|
913
1122
|
*/
|
|
914
1123
|
createNavLink(body, opts) {
|
|
915
1124
|
return this.http.request("POST", "/v1/stores/{storeId}/navlinks", { body, opts });
|
|
916
1125
|
}
|
|
917
1126
|
/**
|
|
918
1127
|
* Delete a NavLink for a store
|
|
1128
|
+
*
|
|
1129
|
+
* Deletes a navigation link by the ID for the specified store.
|
|
1130
|
+
* @param navLinkId The ID of the navigation link.
|
|
919
1131
|
*/
|
|
920
1132
|
deleteNavLink(navLinkId, opts) {
|
|
921
1133
|
return this.http.request("DELETE", "/v1/stores/{storeId}/navlinks/{navLinkId}", {
|
|
@@ -925,6 +1137,9 @@ export class NavlinksResource {
|
|
|
925
1137
|
}
|
|
926
1138
|
/**
|
|
927
1139
|
* Get a NavLink by ID for a store
|
|
1140
|
+
*
|
|
1141
|
+
* Retrieves a navigation link by the ID for the specified store.
|
|
1142
|
+
* @param navLinkId The ID of the navigation link.
|
|
928
1143
|
*/
|
|
929
1144
|
getNavLink(navLinkId, opts) {
|
|
930
1145
|
return this.http.request("GET", "/v1/stores/{storeId}/navlinks/{navLinkId}", {
|
|
@@ -934,12 +1149,17 @@ export class NavlinksResource {
|
|
|
934
1149
|
}
|
|
935
1150
|
/**
|
|
936
1151
|
* Get all NavLinks for a store
|
|
1152
|
+
*
|
|
1153
|
+
* Retrieves all navigation links for the specified store.
|
|
937
1154
|
*/
|
|
938
1155
|
getNavLinks(opts) {
|
|
939
1156
|
return this.http.request("GET", "/v1/stores/{storeId}/navlinks", { opts });
|
|
940
1157
|
}
|
|
941
1158
|
/**
|
|
942
1159
|
* Update a NavLink By ID for a store
|
|
1160
|
+
*
|
|
1161
|
+
* Performs a delta update of a navigation link by the ID for the specified store.
|
|
1162
|
+
* @param navLinkId The ID of the navigation link.
|
|
943
1163
|
*/
|
|
944
1164
|
updateNavLink(navLinkId, body, opts) {
|
|
945
1165
|
return this.http.request("PATCH", "/v1/stores/{storeId}/navlinks/{navLinkId}", {
|
|
@@ -950,6 +1170,8 @@ export class NavlinksResource {
|
|
|
950
1170
|
}
|
|
951
1171
|
/**
|
|
952
1172
|
* Update the sort orders of NavLinks for a Store
|
|
1173
|
+
*
|
|
1174
|
+
* Updates the sort order of navigation links in the specified store.
|
|
953
1175
|
*/
|
|
954
1176
|
updateNavLinkOrder(body, opts) {
|
|
955
1177
|
return this.http.request("PATCH", "/v1/stores/{storeId}/navlinks/sort-orders", {
|
|
@@ -1039,6 +1261,7 @@ export class PaymentsResource {
|
|
|
1039
1261
|
* Get payment by ID
|
|
1040
1262
|
*
|
|
1041
1263
|
* Retrieves a payment by an ID.
|
|
1264
|
+
* @param paymentId The ID of the payment.
|
|
1042
1265
|
*/
|
|
1043
1266
|
getPaymentById(paymentId, opts) {
|
|
1044
1267
|
return this.http.request("GET", "/v1/stores/{storeId}/payments/{paymentId}", {
|
|
@@ -1198,7 +1421,10 @@ export class ProductsResource {
|
|
|
1198
1421
|
* Updates the sort order of products in the specified store.
|
|
1199
1422
|
*/
|
|
1200
1423
|
updateProductSortOrder(body, opts) {
|
|
1201
|
-
return this.http.request("POST", "/v1/stores/{storeId}/products/sort-order", {
|
|
1424
|
+
return this.http.request("POST", "/v1/stores/{storeId}/products/sort-order", {
|
|
1425
|
+
body,
|
|
1426
|
+
opts,
|
|
1427
|
+
});
|
|
1202
1428
|
}
|
|
1203
1429
|
}
|
|
1204
1430
|
export class RegionalPricingResource {
|
|
@@ -1206,18 +1432,47 @@ export class RegionalPricingResource {
|
|
|
1206
1432
|
constructor(http) {
|
|
1207
1433
|
this.http = http;
|
|
1208
1434
|
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Get product pricing regions
|
|
1437
|
+
*
|
|
1438
|
+
* Retrieves the regional pricing for a product in the specified store.
|
|
1439
|
+
* @param productId The ID of the product.
|
|
1440
|
+
*/
|
|
1209
1441
|
getProductPricingRegions(productId, opts) {
|
|
1210
1442
|
return this.http.request("GET", "/v1/stores/{storeId}/products/{productId}/pricing/regions", { path: { productId }, opts });
|
|
1211
1443
|
}
|
|
1444
|
+
/**
|
|
1445
|
+
* Get pricing region groups
|
|
1446
|
+
*
|
|
1447
|
+
* Retrieves the pricing region groups available to the specified store.
|
|
1448
|
+
*/
|
|
1212
1449
|
getStorePricingRegionGroups(opts) {
|
|
1213
1450
|
return this.http.request("GET", "/v1/stores/{storeId}/products/pricing/region-groups", { opts });
|
|
1214
1451
|
}
|
|
1452
|
+
/**
|
|
1453
|
+
* Get store pricing regions
|
|
1454
|
+
*
|
|
1455
|
+
* Retrieves the regional pricing configuration for the specified store.
|
|
1456
|
+
*/
|
|
1215
1457
|
getStorePricingRegions(opts) {
|
|
1216
1458
|
return this.http.request("GET", "/v1/stores/{storeId}/products/pricing/regions", { opts });
|
|
1217
1459
|
}
|
|
1460
|
+
/**
|
|
1461
|
+
* Update product pricing region
|
|
1462
|
+
*
|
|
1463
|
+
* Performs a delta update of the regional pricing override for a product in the specified store.
|
|
1464
|
+
* @param productId The ID of the product.
|
|
1465
|
+
* @param regionId The ID of the pricing region.
|
|
1466
|
+
*/
|
|
1218
1467
|
setProductPricingRegionOverride(productId, regionId, body, opts) {
|
|
1219
1468
|
return this.http.request("PATCH", "/v1/stores/{storeId}/products/{productId}/pricing/regions/{regionId}", { path: { productId, regionId }, body, opts });
|
|
1220
1469
|
}
|
|
1470
|
+
/**
|
|
1471
|
+
* Update store pricing region
|
|
1472
|
+
*
|
|
1473
|
+
* Performs a delta update of the regional pricing override for the specified store.
|
|
1474
|
+
* @param regionId The ID of the pricing region.
|
|
1475
|
+
*/
|
|
1221
1476
|
setStorePricingRegionOverride(regionId, body, opts) {
|
|
1222
1477
|
return this.http.request("PATCH", "/v1/stores/{storeId}/products/pricing/regions/{regionId}", { path: { regionId }, body, opts });
|
|
1223
1478
|
}
|
|
@@ -1263,12 +1518,17 @@ export class SalesResource {
|
|
|
1263
1518
|
}
|
|
1264
1519
|
/**
|
|
1265
1520
|
* Create a sale by ID for a store
|
|
1521
|
+
*
|
|
1522
|
+
* Creates a new sale in the specified store.
|
|
1266
1523
|
*/
|
|
1267
1524
|
createSale(body, opts) {
|
|
1268
1525
|
return this.http.request("POST", "/v1/stores/{storeId}/sales", { body, opts });
|
|
1269
1526
|
}
|
|
1270
1527
|
/**
|
|
1271
1528
|
* Delete a sale by ID for a store
|
|
1529
|
+
*
|
|
1530
|
+
* Deletes a sale by the ID for the specified store.
|
|
1531
|
+
* @param saleId The ID of the sale.
|
|
1272
1532
|
*/
|
|
1273
1533
|
deleteSaleById(saleId, opts) {
|
|
1274
1534
|
return this.http.request("DELETE", "/v1/stores/{storeId}/sales/{saleId}", {
|
|
@@ -1278,6 +1538,9 @@ export class SalesResource {
|
|
|
1278
1538
|
}
|
|
1279
1539
|
/**
|
|
1280
1540
|
* Get a sale by ID for a store
|
|
1541
|
+
*
|
|
1542
|
+
* Retrieves a sale by the ID for the specified store.
|
|
1543
|
+
* @param saleId The ID of the sale.
|
|
1281
1544
|
*/
|
|
1282
1545
|
getSale(saleId, opts) {
|
|
1283
1546
|
return this.http.request("GET", "/v1/stores/{storeId}/sales/{saleId}", {
|
|
@@ -1287,12 +1550,17 @@ export class SalesResource {
|
|
|
1287
1550
|
}
|
|
1288
1551
|
/**
|
|
1289
1552
|
* Get sales associated with a store.
|
|
1553
|
+
*
|
|
1554
|
+
* Retrieves all sales for the specified store.
|
|
1290
1555
|
*/
|
|
1291
1556
|
getSales(opts) {
|
|
1292
1557
|
return this.http.request("GET", "/v1/stores/{storeId}/sales", { opts });
|
|
1293
1558
|
}
|
|
1294
1559
|
/**
|
|
1295
1560
|
* Update a sale by ID for a store
|
|
1561
|
+
*
|
|
1562
|
+
* Performs a delta update of a sale by the ID for the specified store.
|
|
1563
|
+
* @param saleId The ID of the sale.
|
|
1296
1564
|
*/
|
|
1297
1565
|
updateSale(saleId, body, opts) {
|
|
1298
1566
|
return this.http.request("PATCH", "/v1/stores/{storeId}/sales/{saleId}", {
|
|
@@ -1501,12 +1769,17 @@ export class TagsResource {
|
|
|
1501
1769
|
}
|
|
1502
1770
|
/**
|
|
1503
1771
|
* Create a new tag
|
|
1772
|
+
*
|
|
1773
|
+
* Creates a new tag in the specified store.
|
|
1504
1774
|
*/
|
|
1505
1775
|
createTag(body, opts) {
|
|
1506
1776
|
return this.http.request("POST", "/v1/stores/{storeId}/tags", { body, opts });
|
|
1507
1777
|
}
|
|
1508
1778
|
/**
|
|
1509
1779
|
* Delete a tag by ID
|
|
1780
|
+
*
|
|
1781
|
+
* Deletes a tag by the ID for the specified store.
|
|
1782
|
+
* @param tagId The ID of the tag.
|
|
1510
1783
|
*/
|
|
1511
1784
|
deleteTag(tagId, opts) {
|
|
1512
1785
|
return this.http.request("DELETE", "/v1/stores/{storeId}/tags/{tagId}", {
|
|
@@ -1518,6 +1791,7 @@ export class TagsResource {
|
|
|
1518
1791
|
* Delete tag image
|
|
1519
1792
|
*
|
|
1520
1793
|
* Deletes an image for a tag
|
|
1794
|
+
* @param tagId The ID of the tag.
|
|
1521
1795
|
*/
|
|
1522
1796
|
deleteTagImage(tagId, opts) {
|
|
1523
1797
|
return this.http.request("DELETE", "/v1/stores/{storeId}/tags/{tagId}/image", {
|
|
@@ -1535,6 +1809,9 @@ export class TagsResource {
|
|
|
1535
1809
|
}
|
|
1536
1810
|
/**
|
|
1537
1811
|
* Get a tag by an ID
|
|
1812
|
+
*
|
|
1813
|
+
* Retrieves a tag by the ID for the specified store.
|
|
1814
|
+
* @param tagId The ID of the tag.
|
|
1538
1815
|
*/
|
|
1539
1816
|
getTag(tagId, opts) {
|
|
1540
1817
|
return this.http.request("GET", "/v1/stores/{storeId}/tags/{tagId}", {
|
|
@@ -1552,12 +1829,17 @@ export class TagsResource {
|
|
|
1552
1829
|
}
|
|
1553
1830
|
/**
|
|
1554
1831
|
* Get all tags for a store
|
|
1832
|
+
*
|
|
1833
|
+
* Retrieves all tags for the specified store.
|
|
1555
1834
|
*/
|
|
1556
1835
|
getTags(opts) {
|
|
1557
1836
|
return this.http.request("GET", "/v1/stores/{storeId}/tags", { opts });
|
|
1558
1837
|
}
|
|
1559
1838
|
/**
|
|
1560
1839
|
* Update a tag by ID
|
|
1840
|
+
*
|
|
1841
|
+
* Performs a delta update of a tag by the ID for the specified store.
|
|
1842
|
+
* @param tagId The ID of the tag.
|
|
1561
1843
|
*/
|
|
1562
1844
|
updateTag(tagId, body, opts) {
|
|
1563
1845
|
return this.http.request("PATCH", "/v1/stores/{storeId}/tags/{tagId}", {
|
|
@@ -1574,6 +1856,8 @@ export class TierGroupsResource {
|
|
|
1574
1856
|
}
|
|
1575
1857
|
/**
|
|
1576
1858
|
* Create a new tier group
|
|
1859
|
+
*
|
|
1860
|
+
* Creates a new tier group in the specified store.
|
|
1577
1861
|
*/
|
|
1578
1862
|
createTierGroup(body, opts) {
|
|
1579
1863
|
return this.http.request("POST", "/v1/stores/{storeId}/tier-groups", {
|
|
@@ -1583,6 +1867,9 @@ export class TierGroupsResource {
|
|
|
1583
1867
|
}
|
|
1584
1868
|
/**
|
|
1585
1869
|
* Delete a tier group by ID
|
|
1870
|
+
*
|
|
1871
|
+
* Deletes a tier group by the ID for the specified store.
|
|
1872
|
+
* @param tierGroupId The ID of the tier group.
|
|
1586
1873
|
*/
|
|
1587
1874
|
deleteTierGroup(tierGroupId, opts) {
|
|
1588
1875
|
return this.http.request("DELETE", "/v1/stores/{storeId}/tier-groups/{tierGroupId}", {
|
|
@@ -1592,12 +1879,17 @@ export class TierGroupsResource {
|
|
|
1592
1879
|
}
|
|
1593
1880
|
/**
|
|
1594
1881
|
* Get a tier group by ID
|
|
1882
|
+
*
|
|
1883
|
+
* Retrieves a tier group by the ID for the specified store.
|
|
1884
|
+
* @param tierGroupId The ID of the tier group.
|
|
1595
1885
|
*/
|
|
1596
1886
|
getTierGroup(tierGroupId, opts) {
|
|
1597
1887
|
return this.http.request("GET", "/v1/stores/{storeId}/tier-groups/{tierGroupId}", { path: { tierGroupId }, opts });
|
|
1598
1888
|
}
|
|
1599
1889
|
/**
|
|
1600
1890
|
* List all tier groups for a store
|
|
1891
|
+
*
|
|
1892
|
+
* Retrieves all tier groups for the specified store.
|
|
1601
1893
|
*/
|
|
1602
1894
|
listTierGroups(opts) {
|
|
1603
1895
|
return this.http.request("GET", "/v1/stores/{storeId}/tier-groups", {
|
|
@@ -1606,6 +1898,9 @@ export class TierGroupsResource {
|
|
|
1606
1898
|
}
|
|
1607
1899
|
/**
|
|
1608
1900
|
* Update a tier group by ID
|
|
1901
|
+
*
|
|
1902
|
+
* Performs a delta update of a tier group by the ID for the specified store.
|
|
1903
|
+
* @param tierGroupId The ID of the tier group.
|
|
1609
1904
|
*/
|
|
1610
1905
|
updateTierGroup(tierGroupId, body, opts) {
|
|
1611
1906
|
return this.http.request("PATCH", "/v1/stores/{storeId}/tier-groups/{tierGroupId}", { path: { tierGroupId }, body, opts });
|
|
@@ -1645,6 +1940,9 @@ export class TrialsResource {
|
|
|
1645
1940
|
}
|
|
1646
1941
|
/**
|
|
1647
1942
|
* Get a trial by ID for a store
|
|
1943
|
+
*
|
|
1944
|
+
* Retrieves a trial by the ID for the specified store.
|
|
1945
|
+
* @param trialId The ID of the trial.
|
|
1648
1946
|
*/
|
|
1649
1947
|
getTrial(trialId, opts) {
|
|
1650
1948
|
return this.http.request("GET", "/v1/stores/{storeId}/trials/{trialId}", {
|
|
@@ -1654,6 +1952,8 @@ export class TrialsResource {
|
|
|
1654
1952
|
}
|
|
1655
1953
|
/**
|
|
1656
1954
|
* Get trials for a store
|
|
1955
|
+
*
|
|
1956
|
+
* Retrieves all trials for the specified store.
|
|
1657
1957
|
*/
|
|
1658
1958
|
getTrials(query, opts) {
|
|
1659
1959
|
return this.http.request("GET", "/v1/stores/{storeId}/trials", {
|
|
@@ -1689,30 +1989,68 @@ export class WebhooksResource {
|
|
|
1689
1989
|
constructor(http) {
|
|
1690
1990
|
this.http = http;
|
|
1691
1991
|
}
|
|
1992
|
+
/**
|
|
1993
|
+
* Create webhook
|
|
1994
|
+
*
|
|
1995
|
+
* Creates a new webhook subscription in the specified store.
|
|
1996
|
+
*/
|
|
1692
1997
|
createSubscription(body, opts) {
|
|
1693
1998
|
return this.http.request("POST", "/v1/stores/{storeId}/webhooks", {
|
|
1694
1999
|
body,
|
|
1695
2000
|
opts,
|
|
1696
2001
|
});
|
|
1697
2002
|
}
|
|
2003
|
+
/**
|
|
2004
|
+
* Delete webhook by ID
|
|
2005
|
+
*
|
|
2006
|
+
* Deletes a webhook subscription by the ID for the specified store.
|
|
2007
|
+
* @param webhookId The ID of the webhook.
|
|
2008
|
+
*/
|
|
1698
2009
|
deleteSubscription(webhookId, opts) {
|
|
1699
2010
|
return this.http.request("DELETE", "/v1/stores/{storeId}/webhooks/{webhookId}", {
|
|
1700
2011
|
path: { webhookId },
|
|
1701
2012
|
opts,
|
|
1702
2013
|
});
|
|
1703
2014
|
}
|
|
2015
|
+
/**
|
|
2016
|
+
* Get webhook history
|
|
2017
|
+
*
|
|
2018
|
+
* Retrieves the delivery history of a webhook subscription by the ID for the specified store.
|
|
2019
|
+
* @param webhookId The ID of the webhook.
|
|
2020
|
+
*/
|
|
1704
2021
|
getHistory(webhookId, query, opts) {
|
|
1705
2022
|
return this.http.request("GET", "/v1/stores/{storeId}/webhooks/{webhookId}/history", { path: { webhookId }, query, opts });
|
|
1706
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Get webhooks
|
|
2026
|
+
*
|
|
2027
|
+
* Retrieves all webhook subscriptions for the specified store.
|
|
2028
|
+
*/
|
|
1707
2029
|
getSubscriptions(opts) {
|
|
1708
2030
|
return this.http.request("GET", "/v1/stores/{storeId}/webhooks", { opts });
|
|
1709
2031
|
}
|
|
2032
|
+
/**
|
|
2033
|
+
* Get webhook variables
|
|
2034
|
+
*
|
|
2035
|
+
* Retrieves the variables available to webhook payload templates for the specified store.
|
|
2036
|
+
*/
|
|
1710
2037
|
getVariables(opts) {
|
|
1711
2038
|
return this.http.request("GET", "/v1/stores/{storeId}/webhooks/variables", { opts });
|
|
1712
2039
|
}
|
|
2040
|
+
/**
|
|
2041
|
+
* Resend webhook events
|
|
2042
|
+
*
|
|
2043
|
+
* Resends the supplied webhook events for the specified store.
|
|
2044
|
+
*/
|
|
1713
2045
|
resend(body, opts) {
|
|
1714
2046
|
return this.http.request("POST", "/v1/stores/{storeId}/webhooks/resend", { body, opts });
|
|
1715
2047
|
}
|
|
2048
|
+
/**
|
|
2049
|
+
* Update webhook by ID
|
|
2050
|
+
*
|
|
2051
|
+
* Performs a delta update of a webhook subscription by the ID for the specified store.
|
|
2052
|
+
* @param webhookId The ID of the webhook.
|
|
2053
|
+
*/
|
|
1716
2054
|
updateSubscription(webhookId, body, opts) {
|
|
1717
2055
|
return this.http.request("PATCH", "/v1/stores/{storeId}/webhooks/{webhookId}", { path: { webhookId }, body, opts });
|
|
1718
2056
|
}
|
|
@@ -1722,23 +2060,45 @@ export class WebstoreResource {
|
|
|
1722
2060
|
constructor(http) {
|
|
1723
2061
|
this.http = http;
|
|
1724
2062
|
}
|
|
2063
|
+
/**
|
|
2064
|
+
* Create webstore module
|
|
2065
|
+
*
|
|
2066
|
+
* Adds a module to the store's webstore. The module's 'type' decides which 'settings' it accepts.
|
|
2067
|
+
*/
|
|
1725
2068
|
createWebstoreModule(body, opts) {
|
|
1726
|
-
return this.http.request("PUT", "/v1/
|
|
2069
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/modules", {
|
|
1727
2070
|
body,
|
|
1728
2071
|
opts,
|
|
1729
2072
|
});
|
|
1730
2073
|
}
|
|
2074
|
+
/**
|
|
2075
|
+
* Create template
|
|
2076
|
+
*
|
|
2077
|
+
* Creates an empty template on the store's webstore. Add files to it, then set it as the
|
|
2078
|
+
* webstore's default template to serve it to customers.
|
|
2079
|
+
*/
|
|
1731
2080
|
createWebstoreTemplate(body, opts) {
|
|
1732
|
-
return this.http.request("PUT", "/v1/
|
|
1733
|
-
body,
|
|
1734
|
-
opts,
|
|
1735
|
-
});
|
|
2081
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/templates", { body, opts });
|
|
1736
2082
|
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Create template file
|
|
2085
|
+
*
|
|
2086
|
+
* Adds a file to a template. Its 'file_name' and 'content_type' decide where the file is served
|
|
2087
|
+
* from and whether it is public.
|
|
2088
|
+
* @param templateId The ID of the template to add the file to.
|
|
2089
|
+
*/
|
|
1737
2090
|
createWebstoreTemplateFile(templateId, body, opts) {
|
|
1738
|
-
return this.http.request("PUT", "/v1/
|
|
2091
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/templates/{templateId}/files", { path: { templateId }, body, opts });
|
|
1739
2092
|
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Create template variable
|
|
2095
|
+
*
|
|
2096
|
+
* Adds a variable to a template. Its 'variable' is the name the template's files reference it
|
|
2097
|
+
* by, and 'type' decides how 'value' is parsed when the template renders.
|
|
2098
|
+
* @param templateId The ID of the template to add the variable to.
|
|
2099
|
+
*/
|
|
1740
2100
|
createWebstoreTemplateVariable(templateId, body, opts) {
|
|
1741
|
-
return this.http.request("PUT", "/v1/
|
|
2101
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/templates/{templateId}/variables", { path: { templateId }, body, opts });
|
|
1742
2102
|
}
|
|
1743
2103
|
/**
|
|
1744
2104
|
* Delete custom domain
|
|
@@ -1747,34 +2107,80 @@ export class WebstoreResource {
|
|
|
1747
2107
|
* slug.
|
|
1748
2108
|
*/
|
|
1749
2109
|
deleteWebstoreCustomDomain(opts) {
|
|
1750
|
-
return this.http.request("DELETE", "/v1/
|
|
2110
|
+
return this.http.request("DELETE", "/v1/stores/{storeId}/webstore/custom-domain", {
|
|
2111
|
+
opts,
|
|
2112
|
+
});
|
|
1751
2113
|
}
|
|
2114
|
+
/**
|
|
2115
|
+
* Delete webstore module
|
|
2116
|
+
*
|
|
2117
|
+
* Permanently removes a module from the store's webstore.
|
|
2118
|
+
* @param moduleId The ID of the module.
|
|
2119
|
+
*/
|
|
1752
2120
|
deleteWebstoreModule(moduleId, opts) {
|
|
1753
|
-
return this.http.request("DELETE", "/v1/
|
|
2121
|
+
return this.http.request("DELETE", "/v1/stores/{storeId}/webstore/modules/{moduleId}", {
|
|
1754
2122
|
path: { moduleId },
|
|
1755
2123
|
opts,
|
|
1756
2124
|
});
|
|
1757
2125
|
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Delete template
|
|
2128
|
+
*
|
|
2129
|
+
* Permanently deletes a template and all of its files. Switch the webstore to another template
|
|
2130
|
+
* first if this one is its current template.
|
|
2131
|
+
* @param templateId The ID of the template.
|
|
2132
|
+
*/
|
|
1758
2133
|
deleteWebstoreTemplate(templateId, opts) {
|
|
1759
|
-
return this.http.request("DELETE", "/v1/
|
|
1760
|
-
path: { templateId },
|
|
1761
|
-
opts,
|
|
1762
|
-
});
|
|
2134
|
+
return this.http.request("DELETE", "/v1/stores/{storeId}/webstore/templates/{templateId}", { path: { templateId }, opts });
|
|
1763
2135
|
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Delete template file
|
|
2138
|
+
*
|
|
2139
|
+
* Permanently deletes a template file. Files whose 'is_deletable' is false cannot be removed.
|
|
2140
|
+
* @param templateId The ID of the template.
|
|
2141
|
+
* @param templateFileId The ID of the template file.
|
|
2142
|
+
*/
|
|
1764
2143
|
deleteWebstoreTemplateFile(templateId, templateFileId, opts) {
|
|
1765
|
-
return this.http.request("DELETE", "/v1/
|
|
2144
|
+
return this.http.request("DELETE", "/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}", { path: { templateId, templateFileId }, opts });
|
|
1766
2145
|
}
|
|
2146
|
+
/**
|
|
2147
|
+
* Delete template variable
|
|
2148
|
+
*
|
|
2149
|
+
* Permanently deletes a template variable.
|
|
2150
|
+
* @param templateId The ID of the template.
|
|
2151
|
+
* @param templateVariableId The ID of the template variable.
|
|
2152
|
+
*/
|
|
1767
2153
|
deleteWebstoreTemplateVariable(templateId, templateVariableId, opts) {
|
|
1768
|
-
return this.http.request("DELETE", "/v1/
|
|
2154
|
+
return this.http.request("DELETE", "/v1/stores/{storeId}/webstore/templates/{templateId}/variables/{templateVariableId}", { path: { templateId, templateVariableId }, opts });
|
|
1769
2155
|
}
|
|
2156
|
+
/**
|
|
2157
|
+
* Update template to latest version
|
|
2158
|
+
*
|
|
2159
|
+
* Downloads the newest published version of a marketplace template over the installed copy,
|
|
2160
|
+
* replacing its files.
|
|
2161
|
+
* @param templateId The ID of the template to update.
|
|
2162
|
+
*/
|
|
1770
2163
|
downloadWebstoreTemplateUpdate(templateId, opts) {
|
|
1771
|
-
return this.http.request("POST", "/v1/
|
|
2164
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/templates/{templateId}/update", { path: { templateId }, opts });
|
|
1772
2165
|
}
|
|
2166
|
+
/**
|
|
2167
|
+
* Duplicate template
|
|
2168
|
+
*
|
|
2169
|
+
* Copies a template and its files into a new template on the same webstore and returns it.
|
|
2170
|
+
* @param templateId The ID of the template to copy.
|
|
2171
|
+
*/
|
|
1773
2172
|
duplicateWebstoreTemplate(templateId, opts) {
|
|
1774
|
-
return this.http.request("POST", "/v1/
|
|
2173
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/templates/{templateId}/duplicate", { path: { templateId }, opts });
|
|
1775
2174
|
}
|
|
2175
|
+
/**
|
|
2176
|
+
* Finish template upload
|
|
2177
|
+
*
|
|
2178
|
+
* Imports the files from an archive uploaded to the URL returned by the upload URL endpoint
|
|
2179
|
+
* into the template, and reports any files that could not be imported.
|
|
2180
|
+
* @param templateId The ID of the template the files are imported into.
|
|
2181
|
+
*/
|
|
1776
2182
|
finishWebstoreTemplateUpload(templateId, opts) {
|
|
1777
|
-
return this.http.request("POST", "/v1/
|
|
2183
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/templates/{templateId}/upload_finish", { path: { templateId }, opts });
|
|
1778
2184
|
}
|
|
1779
2185
|
/**
|
|
1780
2186
|
* Get webstore
|
|
@@ -1783,7 +2189,7 @@ export class WebstoreResource {
|
|
|
1783
2189
|
* state and the template it currently renders.
|
|
1784
2190
|
*/
|
|
1785
2191
|
getWebstore(opts) {
|
|
1786
|
-
return this.http.request("GET", "/v1/
|
|
2192
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore", { opts });
|
|
1787
2193
|
}
|
|
1788
2194
|
/**
|
|
1789
2195
|
* Get custom domain
|
|
@@ -1792,42 +2198,123 @@ export class WebstoreResource {
|
|
|
1792
2198
|
* outstanding for ownership and SSL verification.
|
|
1793
2199
|
*/
|
|
1794
2200
|
getWebstoreCustomDomain(opts) {
|
|
1795
|
-
return this.http.request("GET", "/v1/
|
|
2201
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/custom-domain", { opts });
|
|
1796
2202
|
}
|
|
2203
|
+
/**
|
|
2204
|
+
* Get webstore modules
|
|
2205
|
+
*
|
|
2206
|
+
* Retrieves all modules on the store's webstore, in sort order.
|
|
2207
|
+
*/
|
|
1797
2208
|
getWebstoreModules(opts) {
|
|
1798
|
-
return this.http.request("GET", "/v1/
|
|
1799
|
-
opts,
|
|
1800
|
-
});
|
|
2209
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/modules", { opts });
|
|
1801
2210
|
}
|
|
2211
|
+
/**
|
|
2212
|
+
* Get template
|
|
2213
|
+
*
|
|
2214
|
+
* Retrieves a template. Pass 'include' as 'files' to embed its files, content included, in
|
|
2215
|
+
* 'template_files'.
|
|
2216
|
+
* @param templateId The ID of the template.
|
|
2217
|
+
*/
|
|
1802
2218
|
getWebstoreTemplate(templateId, query, opts) {
|
|
1803
|
-
return this.http.request("GET", "/v1/
|
|
2219
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}", { path: { templateId }, query, opts });
|
|
1804
2220
|
}
|
|
2221
|
+
/**
|
|
2222
|
+
* Get template archive
|
|
2223
|
+
*
|
|
2224
|
+
* Creates a temporary URL to download the template's files as an archive.
|
|
2225
|
+
* @param templateId The ID of the template.
|
|
2226
|
+
*/
|
|
1805
2227
|
getWebstoreTemplateArchive(templateId, opts) {
|
|
1806
|
-
return this.http.request("GET", "/v1/
|
|
2228
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}/archive", { path: { templateId }, opts });
|
|
1807
2229
|
}
|
|
2230
|
+
/**
|
|
2231
|
+
* Get template file
|
|
2232
|
+
*
|
|
2233
|
+
* Retrieves a single template file, content included.
|
|
2234
|
+
* @param templateId The ID of the template.
|
|
2235
|
+
* @param templateFileId The ID of the template file.
|
|
2236
|
+
*/
|
|
1808
2237
|
getWebstoreTemplateFile(templateId, templateFileId, opts) {
|
|
1809
|
-
return this.http.request("GET", "/v1/
|
|
2238
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}", { path: { templateId, templateFileId }, opts });
|
|
1810
2239
|
}
|
|
2240
|
+
/**
|
|
2241
|
+
* Get template files
|
|
2242
|
+
*
|
|
2243
|
+
* Retrieves the files of a template without their content. Fetch a single file to read its
|
|
2244
|
+
* content.
|
|
2245
|
+
* @param templateId The ID of the template.
|
|
2246
|
+
*/
|
|
1811
2247
|
getWebstoreTemplateFiles(templateId, opts) {
|
|
1812
|
-
return this.http.request("GET", "/v1/
|
|
2248
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}/files", { path: { templateId }, opts });
|
|
1813
2249
|
}
|
|
2250
|
+
/**
|
|
2251
|
+
* Get latest template version
|
|
2252
|
+
*
|
|
2253
|
+
* Retrieves the newest published version available for a template installed from the
|
|
2254
|
+
* marketplace. 'version' is null when there is no update or the template is not
|
|
2255
|
+
* marketplace-based.
|
|
2256
|
+
* @param templateId The ID of the template.
|
|
2257
|
+
*/
|
|
1814
2258
|
getWebstoreTemplateLatestVersion(templateId, opts) {
|
|
1815
|
-
return this.http.request("GET", "/v1/
|
|
2259
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}/update", { path: { templateId }, opts });
|
|
2260
|
+
}
|
|
2261
|
+
/**
|
|
2262
|
+
* Create template preview URL
|
|
2263
|
+
*
|
|
2264
|
+
* Creates a short-lived link that renders the template without caching. The link expires
|
|
2265
|
+
* after 15 minutes.
|
|
2266
|
+
* @param templateId The ID of the template to preview.
|
|
2267
|
+
*/
|
|
2268
|
+
getWebstoreTemplatePreviewUrl(templateId, opts) {
|
|
2269
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/templates/{templateId}/preview", { path: { templateId }, opts });
|
|
1816
2270
|
}
|
|
2271
|
+
/**
|
|
2272
|
+
* Get templates
|
|
2273
|
+
*
|
|
2274
|
+
* Retrieves the templates of the store's webstore, without their files. The one customers see
|
|
2275
|
+
* is the webstore's 'current_template_id'.
|
|
2276
|
+
*/
|
|
1817
2277
|
getWebstoreTemplates(opts) {
|
|
1818
|
-
return this.http.request("GET", "/v1/
|
|
2278
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates", { opts });
|
|
1819
2279
|
}
|
|
2280
|
+
/**
|
|
2281
|
+
* Get template schema
|
|
2282
|
+
*
|
|
2283
|
+
* Retrieves the schema a template declares: its author, support contacts, update source and
|
|
2284
|
+
* the settings a store can configure.
|
|
2285
|
+
* @param templateId The ID of the template.
|
|
2286
|
+
*/
|
|
1820
2287
|
getWebstoreTemplateSchema(templateId, opts) {
|
|
1821
|
-
return this.http.request("GET", "/v1/
|
|
2288
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}/schema", { path: { templateId }, opts });
|
|
1822
2289
|
}
|
|
2290
|
+
/**
|
|
2291
|
+
* Get template upload URL
|
|
2292
|
+
*
|
|
2293
|
+
* Creates a pre-signed URL for uploading an archive of template files. Upload the archive to
|
|
2294
|
+
* it, then finish the upload to import the files into the template.
|
|
2295
|
+
* @param templateId The ID of the template the files are imported into.
|
|
2296
|
+
*/
|
|
1823
2297
|
getWebstoreTemplateUploadUrl(templateId, query, opts) {
|
|
1824
|
-
return this.http.request("GET", "/v1/
|
|
2298
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}/upload_url", { path: { templateId }, query, opts });
|
|
1825
2299
|
}
|
|
2300
|
+
/**
|
|
2301
|
+
* Get template variables
|
|
2302
|
+
*
|
|
2303
|
+
* Retrieves the variables of a template with their current values.
|
|
2304
|
+
* @param templateId The ID of the template.
|
|
2305
|
+
*/
|
|
1826
2306
|
getWebstoreTemplateVariables(templateId, opts) {
|
|
1827
|
-
return this.http.request("GET", "/v1/
|
|
2307
|
+
return this.http.request("GET", "/v1/stores/{storeId}/webstore/templates/{templateId}/variables", { path: { templateId }, opts });
|
|
1828
2308
|
}
|
|
1829
|
-
|
|
1830
|
-
|
|
2309
|
+
/**
|
|
2310
|
+
* Install marketplace template
|
|
2311
|
+
*
|
|
2312
|
+
* Installs a template from the marketplace into the store's webstore and returns the ID of the
|
|
2313
|
+
* installed copy.
|
|
2314
|
+
* @param marketplaceTemplateId The ID of the marketplace template to install.
|
|
2315
|
+
*/
|
|
2316
|
+
installMarketplaceTemplate(marketplaceTemplateId, opts) {
|
|
2317
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/marketplace/templates/{marketplaceTemplateId}/install", { path: { marketplaceTemplateId }, opts });
|
|
1831
2318
|
}
|
|
1832
2319
|
/**
|
|
1833
2320
|
* Set custom domain
|
|
@@ -1835,7 +2322,7 @@ export class WebstoreResource {
|
|
|
1835
2322
|
* Attaches a custom domain to the store's webstore and begins verification.
|
|
1836
2323
|
*/
|
|
1837
2324
|
setWebstoreCustomDomain(body, opts) {
|
|
1838
|
-
return this.http.request("POST", "/v1/
|
|
2325
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/custom-domain", { body, opts });
|
|
1839
2326
|
}
|
|
1840
2327
|
/**
|
|
1841
2328
|
* Set default template
|
|
@@ -1843,7 +2330,7 @@ export class WebstoreResource {
|
|
|
1843
2330
|
* Sets the template the webstore renders for customers.
|
|
1844
2331
|
*/
|
|
1845
2332
|
setWebstoreDefaultTemplate(body, opts) {
|
|
1846
|
-
return this.http.request("POST", "/v1/
|
|
2333
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/set-default-template", {
|
|
1847
2334
|
body,
|
|
1848
2335
|
opts,
|
|
1849
2336
|
});
|
|
@@ -1855,22 +2342,58 @@ export class WebstoreResource {
|
|
|
1855
2342
|
* slug already taken by another store is rejected.
|
|
1856
2343
|
*/
|
|
1857
2344
|
setWebstoreSlug(body, opts) {
|
|
1858
|
-
return this.http.request("POST", "/v1/
|
|
2345
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/set-slug", {
|
|
2346
|
+
body,
|
|
2347
|
+
opts,
|
|
2348
|
+
});
|
|
1859
2349
|
}
|
|
2350
|
+
/**
|
|
2351
|
+
* Update webstore module
|
|
2352
|
+
*
|
|
2353
|
+
* Performs a delta update of a module on the store's webstore.
|
|
2354
|
+
* @param moduleId The ID of the module.
|
|
2355
|
+
*/
|
|
1860
2356
|
updateWebstoreModule(moduleId, body, opts) {
|
|
1861
|
-
return this.http.request("PUT", "/v1/
|
|
2357
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/modules/{moduleId}", { path: { moduleId }, body, opts });
|
|
1862
2358
|
}
|
|
2359
|
+
/**
|
|
2360
|
+
* Update template
|
|
2361
|
+
*
|
|
2362
|
+
* Performs a delta update of a template's name and compatibility mode.
|
|
2363
|
+
* @param templateId The ID of the template.
|
|
2364
|
+
*/
|
|
1863
2365
|
updateWebstoreTemplate(templateId, body, opts) {
|
|
1864
|
-
return this.http.request("PUT", "/v1/
|
|
2366
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/templates/{templateId}", { path: { templateId }, body, opts });
|
|
1865
2367
|
}
|
|
2368
|
+
/**
|
|
2369
|
+
* Update template file content
|
|
2370
|
+
*
|
|
2371
|
+
* Replaces the content of a template file. If the template is the webstore's current template,
|
|
2372
|
+
* customers see the change immediately.
|
|
2373
|
+
* @param templateId The ID of the template.
|
|
2374
|
+
* @param templateFileId The ID of the template file.
|
|
2375
|
+
*/
|
|
1866
2376
|
updateWebstoreTemplateFile(templateId, templateFileId, body, opts) {
|
|
1867
|
-
return this.http.request("PUT", "/v1/
|
|
2377
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}", { path: { templateId, templateFileId }, body, opts });
|
|
1868
2378
|
}
|
|
2379
|
+
/**
|
|
2380
|
+
* Update template schema variables
|
|
2381
|
+
*
|
|
2382
|
+
* Sets values for the settings the template's schema defines.
|
|
2383
|
+
* @param templateId The ID of the template.
|
|
2384
|
+
*/
|
|
1869
2385
|
updateWebstoreTemplateSchemaVariables(templateId, body, opts) {
|
|
1870
|
-
return this.http.request("PUT", "/v1/
|
|
2386
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/templates/{templateId}/schema/variables", { path: { templateId }, body, opts });
|
|
1871
2387
|
}
|
|
2388
|
+
/**
|
|
2389
|
+
* Update template variable
|
|
2390
|
+
*
|
|
2391
|
+
* Performs a delta update of a template variable.
|
|
2392
|
+
* @param templateId The ID of the template.
|
|
2393
|
+
* @param templateVariableId The ID of the template variable.
|
|
2394
|
+
*/
|
|
1872
2395
|
updateWebstoreTemplateVariable(templateId, templateVariableId, body, opts) {
|
|
1873
|
-
return this.http.request("PUT", "/v1/
|
|
2396
|
+
return this.http.request("PUT", "/v1/stores/{storeId}/webstore/templates/{templateId}/variables/{templateVariableId}", { path: { templateId, templateVariableId }, body, opts });
|
|
1874
2397
|
}
|
|
1875
2398
|
/**
|
|
1876
2399
|
* Verify custom domain
|
|
@@ -1879,7 +2402,7 @@ export class WebstoreResource {
|
|
|
1879
2402
|
* records returned when the domain was set have been published.
|
|
1880
2403
|
*/
|
|
1881
2404
|
verifyWebstoreCustomDomain(opts) {
|
|
1882
|
-
return this.http.request("POST", "/v1/
|
|
2405
|
+
return this.http.request("POST", "/v1/stores/{storeId}/webstore/custom-domain/verify", {
|
|
1883
2406
|
opts,
|
|
1884
2407
|
});
|
|
1885
2408
|
}
|
|
@@ -1890,14 +2413,12 @@ export class ManagementClient {
|
|
|
1890
2413
|
$http;
|
|
1891
2414
|
affiliateLinks;
|
|
1892
2415
|
bans;
|
|
1893
|
-
billing;
|
|
1894
2416
|
checkout;
|
|
1895
2417
|
checkoutStyle;
|
|
1896
2418
|
coupons;
|
|
1897
|
-
|
|
2419
|
+
customerPortalSessions;
|
|
1898
2420
|
customers;
|
|
1899
2421
|
customVariables;
|
|
1900
|
-
dashboard;
|
|
1901
2422
|
dataMigrations;
|
|
1902
2423
|
delivery;
|
|
1903
2424
|
discord;
|
|
@@ -1930,14 +2451,12 @@ export class ManagementClient {
|
|
|
1930
2451
|
this.$http = http;
|
|
1931
2452
|
this.affiliateLinks = new AffiliateLinksResource(http);
|
|
1932
2453
|
this.bans = new BansResource(http);
|
|
1933
|
-
this.billing = new BillingResource(http);
|
|
1934
2454
|
this.checkout = new CheckoutResource(http);
|
|
1935
2455
|
this.checkoutStyle = new CheckoutStyleResource(http);
|
|
1936
2456
|
this.coupons = new CouponsResource(http);
|
|
1937
|
-
this.
|
|
2457
|
+
this.customerPortalSessions = new CustomerPortalSessionsResource(http);
|
|
1938
2458
|
this.customers = new CustomersResource(http);
|
|
1939
2459
|
this.customVariables = new CustomVariablesResource(http);
|
|
1940
|
-
this.dashboard = new DashboardResource(http);
|
|
1941
2460
|
this.dataMigrations = new DataMigrationsResource(http);
|
|
1942
2461
|
this.delivery = new DeliveryResource(http);
|
|
1943
2462
|
this.discord = new DiscordResource(http);
|