@shoplygg/node 0.9.0 → 0.10.0
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/generated/api.d.ts +61 -11
- package/generated/operations.js +1 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/generated/api.d.ts
CHANGED
|
@@ -952,7 +952,7 @@ export interface AnalyticsSearchParams {
|
|
|
952
952
|
export type AnalyticsSearchResult = unknown;
|
|
953
953
|
|
|
954
954
|
/** What list storefronts answers: `storefronts.list`. */
|
|
955
|
-
export type StorefrontsListResult = {
|
|
955
|
+
export type StorefrontsListResult = Array<{
|
|
956
956
|
id: string;
|
|
957
957
|
name: string;
|
|
958
958
|
theme: string;
|
|
@@ -966,11 +966,12 @@ export type StorefrontsListResult = {
|
|
|
966
966
|
engine: string;
|
|
967
967
|
codeOnCopy: unknown;
|
|
968
968
|
themeChanged: unknown;
|
|
969
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
969
970
|
unpublished: boolean;
|
|
970
971
|
accent: unknown;
|
|
971
972
|
headingFont: unknown;
|
|
972
973
|
pages: number;
|
|
973
|
-
}
|
|
974
|
+
}>;
|
|
974
975
|
|
|
975
976
|
/** What create a storefront takes: `storefronts.create`. */
|
|
976
977
|
export interface StorefrontsCreateParams {
|
|
@@ -987,7 +988,7 @@ export interface StorefrontsCreateParams {
|
|
|
987
988
|
}
|
|
988
989
|
|
|
989
990
|
/** What create a storefront answers: `storefronts.create`. */
|
|
990
|
-
export type StorefrontsCreateResult = {
|
|
991
|
+
export type StorefrontsCreateResult = Array<{
|
|
991
992
|
id: string;
|
|
992
993
|
name: string;
|
|
993
994
|
theme: string;
|
|
@@ -1001,11 +1002,12 @@ export type StorefrontsCreateResult = {
|
|
|
1001
1002
|
engine: string;
|
|
1002
1003
|
codeOnCopy: unknown;
|
|
1003
1004
|
themeChanged: unknown;
|
|
1005
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
1004
1006
|
unpublished: boolean;
|
|
1005
1007
|
accent: unknown;
|
|
1006
1008
|
headingFont: unknown;
|
|
1007
1009
|
pages: number;
|
|
1008
|
-
}
|
|
1010
|
+
}>;
|
|
1009
1011
|
|
|
1010
1012
|
/** What import a storefront answers: `storefronts.import`. */
|
|
1011
1013
|
export type StorefrontsImportResult = unknown;
|
|
@@ -1123,7 +1125,7 @@ export interface StorefrontsRenameParams {
|
|
|
1123
1125
|
}
|
|
1124
1126
|
|
|
1125
1127
|
/** What rename a storefront answers: `storefronts.rename`. */
|
|
1126
|
-
export type StorefrontsRenameResult = {
|
|
1128
|
+
export type StorefrontsRenameResult = Array<{
|
|
1127
1129
|
id: string;
|
|
1128
1130
|
name: string;
|
|
1129
1131
|
theme: string;
|
|
@@ -1137,14 +1139,15 @@ export type StorefrontsRenameResult = {
|
|
|
1137
1139
|
engine: string;
|
|
1138
1140
|
codeOnCopy: unknown;
|
|
1139
1141
|
themeChanged: unknown;
|
|
1142
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
1140
1143
|
unpublished: boolean;
|
|
1141
1144
|
accent: unknown;
|
|
1142
1145
|
headingFont: unknown;
|
|
1143
1146
|
pages: number;
|
|
1144
|
-
}
|
|
1147
|
+
}>;
|
|
1145
1148
|
|
|
1146
1149
|
/** What delete a storefront answers: `storefronts.delete`. */
|
|
1147
|
-
export type StorefrontsDeleteResult = {
|
|
1150
|
+
export type StorefrontsDeleteResult = Array<{
|
|
1148
1151
|
id: string;
|
|
1149
1152
|
name: string;
|
|
1150
1153
|
theme: string;
|
|
@@ -1158,11 +1161,12 @@ export type StorefrontsDeleteResult = {
|
|
|
1158
1161
|
engine: string;
|
|
1159
1162
|
codeOnCopy: unknown;
|
|
1160
1163
|
themeChanged: unknown;
|
|
1164
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
1161
1165
|
unpublished: boolean;
|
|
1162
1166
|
accent: unknown;
|
|
1163
1167
|
headingFont: unknown;
|
|
1164
1168
|
pages: number;
|
|
1165
|
-
}
|
|
1169
|
+
}>;
|
|
1166
1170
|
|
|
1167
1171
|
/** What make a storefront live takes: `storefronts.setLive`. */
|
|
1168
1172
|
export interface StorefrontsSetLiveParams {
|
|
@@ -1175,7 +1179,7 @@ export interface StorefrontsSetLiveParams {
|
|
|
1175
1179
|
}
|
|
1176
1180
|
|
|
1177
1181
|
/** What make a storefront live answers: `storefronts.setLive`. */
|
|
1178
|
-
export type StorefrontsSetLiveResult = {
|
|
1182
|
+
export type StorefrontsSetLiveResult = Array<{
|
|
1179
1183
|
id: string;
|
|
1180
1184
|
name: string;
|
|
1181
1185
|
theme: string;
|
|
@@ -1189,11 +1193,12 @@ export type StorefrontsSetLiveResult = {
|
|
|
1189
1193
|
engine: string;
|
|
1190
1194
|
codeOnCopy: unknown;
|
|
1191
1195
|
themeChanged: unknown;
|
|
1196
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
1192
1197
|
unpublished: boolean;
|
|
1193
1198
|
accent: unknown;
|
|
1194
1199
|
headingFont: unknown;
|
|
1195
1200
|
pages: number;
|
|
1196
|
-
}
|
|
1201
|
+
}>;
|
|
1197
1202
|
|
|
1198
1203
|
/** What get a storefront's code answers: `storefronts.code`. */
|
|
1199
1204
|
export type StorefrontsCodeResult = {
|
|
@@ -1211,6 +1216,7 @@ export type StorefrontsCodeResult = {
|
|
|
1211
1216
|
engine: string;
|
|
1212
1217
|
codeOnCopy: unknown;
|
|
1213
1218
|
themeChanged: unknown;
|
|
1219
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
1214
1220
|
unpublished: boolean;
|
|
1215
1221
|
accent: unknown;
|
|
1216
1222
|
headingFont: unknown;
|
|
@@ -1241,6 +1247,7 @@ export type StorefrontsCodeStartResult = {
|
|
|
1241
1247
|
engine: string;
|
|
1242
1248
|
codeOnCopy: unknown;
|
|
1243
1249
|
themeChanged: unknown;
|
|
1250
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
1244
1251
|
unpublished: boolean;
|
|
1245
1252
|
accent: unknown;
|
|
1246
1253
|
headingFont: unknown;
|
|
@@ -1479,6 +1486,7 @@ export type StorefrontsCodePublishResult = {
|
|
|
1479
1486
|
engine: string;
|
|
1480
1487
|
codeOnCopy: unknown;
|
|
1481
1488
|
themeChanged: unknown;
|
|
1489
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
1482
1490
|
unpublished: boolean;
|
|
1483
1491
|
accent: unknown;
|
|
1484
1492
|
headingFont: unknown;
|
|
@@ -7723,7 +7731,7 @@ export interface ResellerProductsBadgesParams {
|
|
|
7723
7731
|
|
|
7724
7732
|
/** What set a product's status and labels on the panel answers: `resellerProducts.badges`. */
|
|
7725
7733
|
export type ResellerProductsBadgesResult = {
|
|
7726
|
-
"
|
|
7734
|
+
"7626c760-c6cd-4b38-8344-cfbba0148a80": {
|
|
7727
7735
|
label: string;
|
|
7728
7736
|
color: string;
|
|
7729
7737
|
kind: string;
|
|
@@ -7966,6 +7974,38 @@ export interface ResellerOrdersExportParams {
|
|
|
7966
7974
|
check?: "1";
|
|
7967
7975
|
}
|
|
7968
7976
|
|
|
7977
|
+
/** What get a reseller order answers: `resellerOrders.get`. */
|
|
7978
|
+
export type ResellerOrdersGetResult = {
|
|
7979
|
+
id: string;
|
|
7980
|
+
status: string;
|
|
7981
|
+
via: string;
|
|
7982
|
+
currency: string;
|
|
7983
|
+
total: number;
|
|
7984
|
+
listTotal: number;
|
|
7985
|
+
discount: number;
|
|
7986
|
+
balanceAfter: number;
|
|
7987
|
+
createdAt: string;
|
|
7988
|
+
reseller: {
|
|
7989
|
+
id: string;
|
|
7990
|
+
name: string;
|
|
7991
|
+
removed: boolean;
|
|
7992
|
+
};
|
|
7993
|
+
boughtBy: string;
|
|
7994
|
+
goodsShown: boolean;
|
|
7995
|
+
lines: Array<{
|
|
7996
|
+
productId: string;
|
|
7997
|
+
productName: string;
|
|
7998
|
+
variantName: string;
|
|
7999
|
+
unitPrice: number;
|
|
8000
|
+
quantity: number;
|
|
8001
|
+
delivered: number;
|
|
8002
|
+
keys: string[];
|
|
8003
|
+
items: unknown[] | Record<string, unknown>;
|
|
8004
|
+
waiting: boolean;
|
|
8005
|
+
instructions: string;
|
|
8006
|
+
}>;
|
|
8007
|
+
};
|
|
8008
|
+
|
|
7969
8009
|
/** What list top-ups takes: `resellerTopUps.list`. */
|
|
7970
8010
|
export interface ResellerTopUpsListParams {
|
|
7971
8011
|
/** Only what matches this text: an order's ID, a reseller's website, or who bought or paid. */
|
|
@@ -15104,6 +15144,16 @@ export interface ShoplyResourcesResellerOrders {
|
|
|
15104
15144
|
* @see https://docs.shoply.gg/api-reference/resellers/export-reseller-orders
|
|
15105
15145
|
*/
|
|
15106
15146
|
export(params?: ResellerOrdersExportParams, options?: RequestOptions): Promise<Response>;
|
|
15147
|
+
/**
|
|
15148
|
+
* **Get a reseller order**
|
|
15149
|
+
*
|
|
15150
|
+
* One reseller order whole, as the dashboard's page for it shows it: who bought it (`reseller`, and `boughtBy`, the member of their team), how (`via`), the `total` taken off their balance, `listTotal` (what it came to at the panel's list prices when bought) and `discount` (what their price took off it), both null for an order from before those were kept, and `balanceAfter`. Each of `lines` is an option it bought, with its `unitPrice` and `quantity` and what it delivered: `keys`, `items` (what a dynamic delivery's server handed back, a line each), `instructions`, and `waiting` while a dynamic line is still being fetched. A store's own order or a top-up answers 404.
|
|
15151
|
+
*
|
|
15152
|
+
* Needs the `resellers.read` permission (Read Resellers).
|
|
15153
|
+
*
|
|
15154
|
+
* @see https://docs.shoply.gg/api-reference/resellers/get-a-reseller-order
|
|
15155
|
+
*/
|
|
15156
|
+
get(orderId: string, options?: RequestOptions): Promise<ResellerOrdersGetResult>;
|
|
15107
15157
|
}
|
|
15108
15158
|
|
|
15109
15159
|
export interface ShoplyResourcesResellerTopUps {
|
package/generated/operations.js
CHANGED
|
@@ -266,6 +266,7 @@ export const OPERATIONS = [
|
|
|
266
266
|
{"id":"resellerAnnouncements.delete","name":"resellerAnnouncements.delete","method":"DELETE","path":"/stores/{storeId}/resellers/announcements/{announcementId}","params":["announcementId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
|
|
267
267
|
{"id":"resellerOrders.list","name":"resellerOrders.list","method":"GET","path":"/stores/{storeId}/resellers/orders","params":[],"query":["q","reseller","via","page"],"body":false,"upload":null,"file":false,"paged":true,"customer":false,"signedIn":true,"idempotent":false},
|
|
268
268
|
{"id":"resellerOrders.export","name":"resellerOrders.export","method":"GET","path":"/stores/{storeId}/resellers/orders/export","params":[],"query":["q","reseller","via","check"],"body":false,"upload":null,"file":true,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
|
|
269
|
+
{"id":"resellerOrders.get","name":"resellerOrders.get","method":"GET","path":"/stores/{storeId}/resellers/orders/{orderId}","params":["orderId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
|
|
269
270
|
{"id":"resellerTopUps.list","name":"resellerTopUps.list","method":"GET","path":"/stores/{storeId}/resellers/top-ups","params":[],"query":["q","reseller","status","page"],"body":false,"upload":null,"file":false,"paged":true,"customer":false,"signedIn":true,"idempotent":false},
|
|
270
271
|
{"id":"resellerTopUps.export","name":"resellerTopUps.export","method":"GET","path":"/stores/{storeId}/resellers/top-ups/export","params":[],"query":["q","reseller","status","check"],"body":false,"upload":null,"file":true,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
|
|
271
272
|
{"id":"resellerTopUps.payment","name":"resellerTopUps.payment","method":"GET","path":"/stores/{storeId}/resellers/top-ups/{topUpId}/payment","params":["topUpId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoplygg/node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Shoply's API from your own server: every route as a typed method, safe retries, pages, checking webhooks, and OAuth for apps.",
|
|
5
5
|
"keywords": ["shoply", "api", "sdk", "ecommerce", "webhooks", "digital-goods"],
|
|
6
6
|
"homepage": "https://docs.shoply.gg/api-reference/node",
|