@shoplygg/node 0.11.4 → 0.12.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.
@@ -615,6 +615,7 @@ export type AnalyticsOverviewResult = {
615
615
  inProgress: boolean;
616
616
  };
617
617
  currencyCode: string;
618
+ otherCurrencies: unknown[] | Record<string, unknown>;
618
619
  totals: {
619
620
  revenue: number;
620
621
  orders: number;
@@ -2523,6 +2524,7 @@ export type ProductsListItem = {
2523
2524
  maxQuantity: number;
2524
2525
  stock: number;
2525
2526
  keyCount: number;
2527
+ fileCount: number;
2526
2528
  deliveryMethods: string[];
2527
2529
  deliveryType: string;
2528
2530
  deliveryInstructions: string;
@@ -2731,6 +2733,7 @@ export type ProductsCreateResult = {
2731
2733
  maxQuantity: number;
2732
2734
  stock: number;
2733
2735
  keyCount: number;
2736
+ fileCount: number;
2734
2737
  deliveryMethods: string[];
2735
2738
  deliveryType: string;
2736
2739
  deliveryInstructions: string;
@@ -2801,6 +2804,7 @@ export type ProductsShowResult = {
2801
2804
  maxQuantity: number;
2802
2805
  stock: number;
2803
2806
  keyCount: number;
2807
+ fileCount: number;
2804
2808
  deliveryMethods: string[];
2805
2809
  deliveryType: string;
2806
2810
  deliveryInstructions: string;
@@ -3011,6 +3015,7 @@ export type ProductsUpdateResult = {
3011
3015
  maxQuantity: number;
3012
3016
  stock: number;
3013
3017
  keyCount: number;
3018
+ fileCount: number;
3014
3019
  deliveryMethods: string[];
3015
3020
  deliveryType: string;
3016
3021
  deliveryInstructions: string;
@@ -3128,6 +3133,12 @@ export type StockListKeysItem = {
3128
3133
  export interface StockAddKeysParams {
3129
3134
  /** The keys, one an entry, each up to 500 characters with no line break in it. */
3130
3135
  keys: string[];
3136
+ /**
3137
+ * What to do with a key that would go to more than one buyer. `ask` refuses the request with `duplicate_keys`.
3138
+ *
3139
+ * Left out, it is "ask".
3140
+ */
3141
+ duplicates?: "ask" | "skip" | "keep";
3131
3142
  }
3132
3143
 
3133
3144
  /** What add license keys answers: `stock.addKeys`. */
@@ -3135,6 +3146,7 @@ export type StockAddKeysResult = {
3135
3146
  added: number;
3136
3147
  skipped: number;
3137
3148
  duplicates: number;
3149
+ leftOut: number;
3138
3150
  available: number;
3139
3151
  };
3140
3152
 
@@ -3144,6 +3156,14 @@ export interface StockReplaceKeysParams {
3144
3156
  keys: string[];
3145
3157
  /** How many unsold keys you last read. Sent, the change is refused with `stale_write` if that number has changed, so a key sold in the meantime is not put back. */
3146
3158
  expectedAvailable?: number;
3159
+ /** The `stock` a list of the variant's keys answered beside its first page, read with no search (in `meta`). Sent, the change is refused with `stale_write` if any of those keys was sold or removed, or another added, since: a sale and an addition together leave the count the same. */
3160
+ expectedStock?: string;
3161
+ /**
3162
+ * What to do with a key that would go to more than one buyer. `ask` refuses the request with `duplicate_keys`.
3163
+ *
3164
+ * Left out, it is "ask".
3165
+ */
3166
+ duplicates?: "ask" | "skip" | "keep";
3147
3167
  }
3148
3168
 
3149
3169
  /** What replace a variant's license keys answers: `stock.replaceKeys`. */
@@ -3181,6 +3201,17 @@ export type StockAddFileResult = unknown;
3181
3201
  /** What finish a file upload answers: `stock.finishFile`. */
3182
3202
  export type StockFinishFileResult = unknown;
3183
3203
 
3204
+ /** What start replacing a file takes: `stock.replaceFile`. */
3205
+ export interface StockReplaceFileParams {
3206
+ /** The new version's name, with its ending. Buyers download it under this name from then on. */
3207
+ name: string;
3208
+ /** Its size in bytes. */
3209
+ size: number;
3210
+ }
3211
+
3212
+ /** What start replacing a file answers: `stock.replaceFile`. */
3213
+ export type StockReplaceFileResult = unknown;
3214
+
3184
3215
  /** What delete a file answers: `stock.deleteFile`. */
3185
3216
  export type StockDeleteFileResult = unknown;
3186
3217
 
@@ -3617,6 +3648,8 @@ export interface UpsellsUpdateParams {
3617
3648
  * Left out, it is true.
3618
3649
  */
3619
3650
  enabled?: boolean;
3651
+ /** The `updatedAt` you last read. Sent, the change is refused with `stale_write` if the record has changed since. Left out, it is saved whatever happened in between. */
3652
+ expectedUpdatedAt?: string;
3620
3653
  }
3621
3654
 
3622
3655
  /** What update an upsell answers: `upsells.update`. */
@@ -3809,6 +3842,8 @@ export interface SubscriptionsUpdateSettingsParams {
3809
3842
  cardChangeOn?: boolean;
3810
3843
  /** How many times a declined card is tried, one a day while the grace days last, from 1 to 5. */
3811
3844
  chargeTries?: number;
3845
+ /** The settings' `version` you last read. Sent, the change is refused with `stale_write` if any of them has changed since. Left out, it is saved whatever happened in between. */
3846
+ expectedVersion?: string;
3812
3847
  }
3813
3848
 
3814
3849
  /** What change subscription settings answers: `subscriptions.updateSettings`. */
@@ -3854,6 +3889,8 @@ export interface SubscriptionsSavePlansParams {
3854
3889
  /** What it renews by. */
3855
3890
  unit: "day" | "week" | "month" | "year";
3856
3891
  }>;
3892
+ /** For a change to one option that is a plan already: that plan's `version` you last read. Sent, the change is refused with `stale_write` if the plan has changed since. Left out, it is saved whatever happened in between. */
3893
+ expectedVersion?: string;
3857
3894
  }
3858
3895
 
3859
3896
  /** What sell options as subscriptions answers: `subscriptions.savePlans`. */
@@ -4388,6 +4425,7 @@ export type OrdersShowResult = {
4388
4425
  available: boolean;
4389
4426
  why: string;
4390
4427
  };
4428
+ subscription: unknown;
4391
4429
  };
4392
4430
  productSlug: string;
4393
4431
  imageUrl: unknown;
@@ -4420,6 +4458,7 @@ export type OrdersShowResult = {
4420
4458
  customerTotals: {
4421
4459
  totalOrders: number;
4422
4460
  totalSpend: number;
4461
+ otherSpend: unknown[] | Record<string, unknown>;
4423
4462
  paidOrders: number;
4424
4463
  };
4425
4464
  customerOrders: {
@@ -4457,6 +4496,12 @@ export interface OrdersRefundParams {
4457
4496
  reason: "requested" | "duplicate" | "fraudulent" | "other";
4458
4497
  /** For `balance` only: how much to credit, from 0.01 up to what was paid, with at most 2 decimals. Left out, all of it. */
4459
4498
  amount?: number;
4499
+ /**
4500
+ * Also cancel the running subscription this order started or renews, now, once the refund has gone through. Needs the `subscriptions.write` permission as well, asked before anything is refunded. `subscriptionCancelled` in the answer says whether one was.
4501
+ *
4502
+ * Left out, it is false.
4503
+ */
4504
+ cancelSubscription?: boolean;
4460
4505
  }
4461
4506
 
4462
4507
  /** What refund an order answers: `orders.refund`. */
@@ -4464,6 +4509,7 @@ export type OrdersRefundResult = {
4464
4509
  id: string;
4465
4510
  status: string;
4466
4511
  destination: string;
4512
+ subscriptionCancelled: boolean;
4467
4513
  };
4468
4514
 
4469
4515
  /** What deliver an order again takes: `orders.redeliver`. */
@@ -5094,6 +5140,8 @@ export interface CouponCategoriesUpdateParams {
5094
5140
  name: string;
5095
5141
  /** A note for whoever manages the store. */
5096
5142
  description?: string;
5143
+ /** The `updatedAt` you last read. Sent, the change is refused with `stale_write` if the record has changed since. Left out, it is saved whatever happened in between. */
5144
+ expectedUpdatedAt?: string;
5097
5145
  }
5098
5146
 
5099
5147
  /** What update a coupon category answers: `couponCategories.update`. */
@@ -5177,6 +5225,8 @@ export interface CouponPopupUpdateParams {
5177
5225
  * Left out, it is "visit".
5178
5226
  */
5179
5227
  frequency?: "page" | "visit" | "browser";
5228
+ /** The `updatedAt` you last read. Sent, the change is refused with `stale_write` if the record has changed since. Left out, it is saved whatever happened in between. */
5229
+ expectedUpdatedAt?: string;
5180
5230
  }
5181
5231
 
5182
5232
  /** What update the coupon pop-up answers: `couponPopup.update`. */
@@ -5380,6 +5430,8 @@ export interface SalesUpdateParams {
5380
5430
  * Left out, it is true.
5381
5431
  */
5382
5432
  showBar?: boolean;
5433
+ /** The `updatedAt` you last read. Sent, the change is refused with `stale_write` if the record has changed since. Left out, it is saved whatever happened in between. */
5434
+ expectedUpdatedAt?: string;
5383
5435
  }
5384
5436
 
5385
5437
  /** What update a sale answers: `sales.update`. */
@@ -6454,6 +6506,7 @@ export type CustomersListItem = {
6454
6506
  dateCreated: string;
6455
6507
  totalOrders: number;
6456
6508
  totalSpend: number;
6509
+ otherSpend: unknown[] | Record<string, unknown>;
6457
6510
  paidOrders: number;
6458
6511
  lastOrderAt: unknown;
6459
6512
  balance: number;
@@ -6479,6 +6532,7 @@ export type CustomersCreateResult = {
6479
6532
  dateCreated: string;
6480
6533
  totalOrders: number;
6481
6534
  totalSpend: number;
6535
+ otherSpend: unknown[] | Record<string, unknown>;
6482
6536
  paidOrders: number;
6483
6537
  lastOrderAt: unknown;
6484
6538
  balance: number;
@@ -6585,7 +6639,9 @@ export type CustomersShowResult = {
6585
6639
  dateCreated: string;
6586
6640
  totalOrders: number;
6587
6641
  totalSpend: number;
6642
+ otherSpend: unknown[] | Record<string, unknown>;
6588
6643
  paidOrders: number;
6644
+ paidInCurrency: number;
6589
6645
  lastOrderAt: unknown;
6590
6646
  currencyCode: string;
6591
6647
  ordersTruncated: boolean;
@@ -6820,7 +6876,7 @@ export type CustomerTagsCreateResult = {
6820
6876
  export interface CustomerTagsAutomaticParams {
6821
6877
  /** Whether VIP is put on. */
6822
6878
  vipOn?: boolean;
6823
- /** A VIP has spent at least this, in the store's currency, on completed orders. 0 leaves it out. */
6879
+ /** A VIP has spent at least this on completed orders in the store's currency today, as `totalSpend` counts it: what a buyer paid in another is not counted. 0 leaves it out. */
6824
6880
  vipSpent?: number;
6825
6881
  /** Or paid for at least this many orders. 0 leaves it out. */
6826
6882
  vipOrders?: number;
@@ -7804,12 +7860,15 @@ export type ResellerProductsListResult = {
7804
7860
  dailyCap: number;
7805
7861
  maxDiscount: unknown;
7806
7862
  enabled: boolean;
7863
+ held: boolean;
7807
7864
  }[];
7808
7865
 
7809
7866
  /** What sell products on the panel takes: `resellerProducts.save`. */
7810
7867
  export interface ResellerProductsSaveParams {
7811
7868
  /** One a product option: `variantId`; `price`, its Reseller Price, above 0 and up to 1,000,000; `minQty`, the fewest bought at once, 1 to 1,000 (1 when left out); `dailyCap`, the most one reseller may buy of it in a day, or null for no cap; `maxDiscount`, the most off it in percent, or null for no limit (left out, as it was); `enabled`, whether it is on sale (true when left out). */
7812
7869
  rows: Record<string, unknown>[];
7870
+ /** The `version` of the panel's products you last read. Sent, the change is refused with `stale_write` if a row has changed since. Left out, it is saved whatever happened in between. */
7871
+ expectedVersion?: string;
7813
7872
  }
7814
7873
 
7815
7874
  /** What sell products on the panel answers: `resellerProducts.save`. */
@@ -7826,6 +7885,7 @@ export type ResellerProductsSaveResult = {
7826
7885
  dailyCap: number;
7827
7886
  maxDiscount: unknown;
7828
7887
  enabled: boolean;
7888
+ held: boolean;
7829
7889
  }[];
7830
7890
 
7831
7891
  /** What list what the panel can sell answers: `resellerProducts.pickable`. */
@@ -7851,7 +7911,7 @@ export interface ResellerProductsBadgesParams {
7851
7911
 
7852
7912
  /** What set a product's status and labels on the panel answers: `resellerProducts.badges`. */
7853
7913
  export type ResellerProductsBadgesResult = {
7854
- "5553d50f-7e0b-405b-9a29-b30b84627a91": {
7914
+ "212a0544-bad6-44f0-b3f1-bc71394a59e2": {
7855
7915
  label: string;
7856
7916
  color: string;
7857
7917
  kind: string;
@@ -7892,6 +7952,8 @@ export interface ResellerTiersUpdateParams {
7892
7952
  name: string;
7893
7953
  /** What it takes off every Reseller Price, in percent: 0.01 to 99.99. */
7894
7954
  discount: number;
7955
+ /** The tier's `version` you last read. Sent, the change is refused with `stale_write` if it has changed since. Left out, it is saved whatever happened in between. */
7956
+ expectedVersion?: string;
7895
7957
  }
7896
7958
 
7897
7959
  /** What update a tier answers: `resellerTiers.update`. */
@@ -9561,6 +9623,11 @@ export type FinanceProfitResult = {
9561
9623
  profit: unknown;
9562
9624
  costSet: string;
9563
9625
  }[];
9626
+ otherCurrencies: unknown[] | Record<string, unknown>;
9627
+ unknownExpenses: {
9628
+ count: number;
9629
+ total: number;
9630
+ };
9564
9631
  };
9565
9632
 
9566
9633
  /** What get the books takes: `finance.accounting`. */
@@ -9622,6 +9689,11 @@ export type FinanceAccountingResult = {
9622
9689
  orders: number;
9623
9690
  expenses: number;
9624
9691
  };
9692
+ others: unknown[] | Record<string, unknown>;
9693
+ unknownExpenses: {
9694
+ count: number;
9695
+ total: number;
9696
+ };
9625
9697
  countries: {
9626
9698
  country: string;
9627
9699
  name: string;
@@ -9639,9 +9711,11 @@ export type FinanceAccountingResult = {
9639
9711
  net: number;
9640
9712
  }[];
9641
9713
  taxReport: {
9714
+ currency: string;
9642
9715
  rows: unknown[] | Record<string, unknown>;
9643
9716
  taxable: number;
9644
9717
  tax: number;
9718
+ others: unknown[] | Record<string, unknown>;
9645
9719
  };
9646
9720
  };
9647
9721
 
@@ -10914,6 +10988,7 @@ export type ExpensesListResult = {
10914
10988
  method: string;
10915
10989
  reference: string;
10916
10990
  amount: number;
10991
+ currency: string;
10917
10992
  entered: unknown;
10918
10993
  productId: unknown;
10919
10994
  recurring: boolean;
@@ -10961,6 +11036,7 @@ export type ExpensesCreateResult = {
10961
11036
  method: string;
10962
11037
  reference: string;
10963
11038
  amount: number;
11039
+ currency: string;
10964
11040
  entered: unknown;
10965
11041
  productId: unknown;
10966
11042
  recurring: boolean;
@@ -10998,9 +11074,11 @@ export type ExpensesSummaryResult = {
10998
11074
  };
10999
11075
  spent: number;
11000
11076
  previous: number;
11077
+ otherCurrencies: unknown[] | Record<string, unknown>;
11001
11078
  recurring: {
11002
11079
  count: number;
11003
11080
  monthly: number;
11081
+ others: unknown[] | Record<string, unknown>;
11004
11082
  };
11005
11083
  largest: {
11006
11084
  name: string;
@@ -11112,6 +11190,8 @@ export interface ExpensesUpdateParams {
11112
11190
  reference?: string;
11113
11191
  /** A product this expense is a cost of. */
11114
11192
  productId?: string;
11193
+ /** With its amount as it was, the currency that amount is in: for an expense whose currency is not known (`currency` null), or to put right one that is wrong. Nothing is converted. With a new `amount` it is not read: a new amount is in the store's currency today. */
11194
+ amountCurrency?: string;
11115
11195
  }
11116
11196
 
11117
11197
  /** What update an expense answers: `expenses.update`. */
@@ -11128,6 +11208,7 @@ export type ExpensesUpdateResult = {
11128
11208
  method: string;
11129
11209
  reference: string;
11130
11210
  amount: number;
11211
+ currency: string;
11131
11212
  entered: unknown;
11132
11213
  productId: unknown;
11133
11214
  recurring: boolean;
@@ -11234,6 +11315,7 @@ export type RecurringExpensesListResult = {
11234
11315
  method: string;
11235
11316
  reference: string;
11236
11317
  amount: number;
11318
+ currency: string;
11237
11319
  cadence: string;
11238
11320
  onDay: number;
11239
11321
  nextOn: string;
@@ -11247,7 +11329,7 @@ export type RecurringExpensesListResult = {
11247
11329
  export interface RecurringExpensesCreateParams {
11248
11330
  /** Who is paid, up to 120 characters. */
11249
11331
  payee: string;
11250
- /** How much each time, in the store's currency. */
11332
+ /** How much each time, in the store's currency today. */
11251
11333
  amount: number;
11252
11334
  /** How often it comes round. */
11253
11335
  cadence: "month" | "year";
@@ -11272,6 +11354,7 @@ export type RecurringExpensesCreateResult = {
11272
11354
  method: string;
11273
11355
  reference: string;
11274
11356
  amount: number;
11357
+ currency: string;
11275
11358
  cadence: string;
11276
11359
  onDay: number;
11277
11360
  nextOn: string;
@@ -11285,7 +11368,7 @@ export type RecurringExpensesCreateResult = {
11285
11368
  export interface RecurringExpensesUpdateParams {
11286
11369
  /** Who is paid, up to 120 characters. */
11287
11370
  payee: string;
11288
- /** How much each time, in the store's currency. */
11371
+ /** How much each time, in the store's currency today. */
11289
11372
  amount: number;
11290
11373
  /** How often it comes round. */
11291
11374
  cadence: "month" | "year";
@@ -11299,6 +11382,8 @@ export interface RecurringExpensesUpdateParams {
11299
11382
  note?: string;
11300
11383
  /** A reference, up to 160 characters. */
11301
11384
  reference?: string;
11385
+ /** With its amount as it was, the currency that amount is in: for one whose currency is not known (`currency` null), or to put right one that is wrong. Nothing is converted. The expenses it writes from then on are in it; those it has written keep theirs. */
11386
+ amountCurrency?: string;
11302
11387
  }
11303
11388
 
11304
11389
  /** What update a recurring expense answers: `recurringExpenses.update`. */
@@ -11310,6 +11395,7 @@ export type RecurringExpensesUpdateResult = {
11310
11395
  method: string;
11311
11396
  reference: string;
11312
11397
  amount: number;
11398
+ currency: string;
11313
11399
  cadence: string;
11314
11400
  onDay: number;
11315
11401
  nextOn: string;
@@ -11338,6 +11424,7 @@ export type RecurringExpensesSkipResult = {
11338
11424
  method: string;
11339
11425
  reference: string;
11340
11426
  amount: number;
11427
+ currency: string;
11341
11428
  cadence: string;
11342
11429
  onDay: number;
11343
11430
  nextOn: string;
@@ -12608,7 +12695,7 @@ export interface ShoplyResourcesAnalytics {
12608
12695
  /**
12609
12696
  * **Get the overview**
12610
12697
  *
12611
- * A period's headline figures (revenue, orders, customers and the rest), the same figures for the period before, and a day by day series. What the dashboard's home page draws.
12698
+ * A period's headline figures (revenue, orders, customers and the rest), the same figures for the period before, and a day by day series. What the dashboard's home page draws. Every figure of money is in the store's currency today (`currencyCode`), its orders alone; what the period took in another currency is `otherCurrencies`, each in its own, never added in or converted. A count that is not money counts every order.
12612
12699
  *
12613
12700
  * Needs the `analytics.read` permission (Read Analytics). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
12614
12701
  *
@@ -13042,7 +13129,7 @@ export interface ShoplyResourcesProducts {
13042
13129
  /**
13043
13130
  * **Update a product**
13044
13131
  *
13045
- * Saves the product whole, as its editor does: send every field as it should be. `variants` is the complete list. An entry with an `id` changes that variant, an entry without one is added, and a variant left out is removed with its unsold stock. A variant buyers have received license keys from cannot be removed.
13132
+ * Saves the product whole, as its editor does: send every field as it should be. `variants` is the complete list. An entry with an `id` changes that variant, an entry without one is added, and a variant left out is removed with its unsold stock, which needs the `stock.write` permission as well where it holds unsold keys or files. Buyers keep what they paid for: the keys delivered to them stay with their orders, and the files they bought stay on their orders to download.
13046
13133
  *
13047
13134
  * Read the product first and send it back changed. The fields that say "stay as they are" are the only ones that may be left out.
13048
13135
  *
@@ -13054,7 +13141,7 @@ export interface ShoplyResourcesProducts {
13054
13141
  /**
13055
13142
  * **Delete a product**
13056
13143
  *
13057
- * Removes the product with its variants, pictures and unsold stock. Refused for a product buyers have received license keys from, since those keys are part of their orders: set its visibility to `private` instead.
13144
+ * Removes the product with its variants, pictures and unsold stock, which needs the `stock.write` permission as well where it holds unsold keys or files. Buyers keep what they paid for: the keys delivered to them stay with their orders, and the files they bought stay on their orders to download.
13058
13145
  *
13059
13146
  * Needs the `products.write` permission (Change Products).
13060
13147
  *
@@ -13094,7 +13181,7 @@ export interface ShoplyResourcesProducts {
13094
13181
  /**
13095
13182
  * **Delete many products**
13096
13183
  *
13097
- * Deletes each product as deleting one does. A product buyers have received license keys from is kept, and the answer names the ones that stayed.
13184
+ * Deletes each product as deleting one does, and none of them without the `stock.write` permission where any holds unsold keys or files. `kept` in the answer is always empty: nothing is kept since November 24, 2026.
13098
13185
  *
13099
13186
  * Needs the `products.write` permission (Change Products).
13100
13187
  *
@@ -13152,7 +13239,7 @@ export interface ShoplyResourcesStock {
13152
13239
  *
13153
13240
  * Adds license keys to a variant's stock, up to 5,000 in one request. A variant and a store each hold as many unsold keys as the store's plan does.
13154
13241
  *
13155
- * A key sent twice is stocked twice, which is how one key is sold to several buyers. `duplicates` in the answer counts the ones that matched stock the variant already had, so sending the same batch a second time by mistake shows.
13242
+ * A key that would go to more than one buyer is a duplicate: one the variant delivered before, one it has in stock, or one sent twice in the same request. A request with any is refused with `duplicate_keys`, which counts each kind (`sold`, `inStock`, `repeated`), and nothing is added, unless `duplicates` says what to do. `skip` adds the rest and leaves them out; `keep` stocks every one, which is how one key is sold to several buyers. In the answer, `duplicates` counts the ones stocked and `leftOut` the ones left out.
13156
13243
  *
13157
13244
  * Needs the `stock.write` permission (Change Stock).
13158
13245
  *
@@ -13164,6 +13251,8 @@ export interface ShoplyResourcesStock {
13164
13251
  *
13165
13252
  * Makes the variant's unsold stock exactly the keys sent. Keys already delivered are not touched: they are order history, not stock. Up to 5,000 keys, and only for a variant with no more than that in stock: one with more is refused with `validation_error`, and its keys are added and deleted instead.
13166
13253
  *
13254
+ * A key the variant delivered before, or one sent twice, would go to more than one buyer, and is refused with `duplicate_keys` as Add license keys refuses it, unless `duplicates` says `skip` or `keep`. A key that is in the stock being replaced is not one.
13255
+ *
13167
13256
  * Needs the `stock.write` permission (Change Stock).
13168
13257
  *
13169
13258
  * @see https://docs.shoply.gg/api-reference/stock/replace-a-variants-license-keys
@@ -13214,17 +13303,29 @@ export interface ShoplyResourcesStock {
13214
13303
  /**
13215
13304
  * **Finish a file upload**
13216
13305
  *
13217
- * The last step of adding a file: says the file has been sent. Shoply checks it arrived and is the size that was said, and from then on buyers of the variant receive it.
13306
+ * The last step of adding a file: says the file has been sent. Shoply checks it arrived and is the size that was said, and from then on buyers of the variant receive it. For a new version started with "Start replacing a file", the answer is the file it replaced, under that file's own `id`, now with the new version's name and size.
13218
13307
  *
13219
13308
  * Needs the `stock.write` permission (Change Stock).
13220
13309
  *
13221
13310
  * @see https://docs.shoply.gg/api-reference/stock/finish-a-file-upload
13222
13311
  */
13223
13312
  finishFile(variantId: string, fileId: string, options?: RequestOptions): Promise<StockFinishFileResult>;
13313
+ /**
13314
+ * **Start replacing a file**
13315
+ *
13316
+ * The first of three steps to put a new version of a file in its place, the same three as adding one: this one says what the new version is and answers a signed address to send it to, then send it there with a `PUT`, then call "Finish a file upload" with the `id` this step answered.
13317
+ *
13318
+ * Once it is finished, everybody who bought the file downloads the new version, buyers of past orders too. The file keeps its own `id`, and every download link already sent goes on working. Until then they download the old one, so an upload that fails or is never finished changes nothing. It takes the old file's place rather than one more, so it counts against the variant's and the store's files as the old one did, and against the store's storage by the difference in size.
13319
+ *
13320
+ * Needs the `stock.write` permission (Change Stock).
13321
+ *
13322
+ * @see https://docs.shoply.gg/api-reference/stock/start-replacing-a-file
13323
+ */
13324
+ replaceFile(variantId: string, fileId: string, params: StockReplaceFileParams, options?: RequestOptions): Promise<StockReplaceFileResult>;
13224
13325
  /**
13225
13326
  * **Delete a file**
13226
13327
  *
13227
- * Removes a file from the variant. Buyers who already have a link to it can no longer download it.
13328
+ * Takes a file off the variant: buyers from now on are not sent it. Buyers who already paid for it keep downloading it, and it still counts against the store's file storage while they do. To give everybody a new version instead, use "Start replacing a file".
13228
13329
  *
13229
13330
  * Needs the `stock.write` permission (Change Stock).
13230
13331
  *
@@ -13582,6 +13683,8 @@ export interface ShoplyResourcesOrders {
13582
13683
  *
13583
13684
  * Send an `Idempotency-Key` with this request. The order is marked refunded only once the payment provider has said the money is on its way, or the buyer has been credited.
13584
13685
  *
13686
+ * A refund does not end a subscription the order started or renews: it carries on and renews as before, unless `cancelSubscription` says to cancel it too. Which subscription that is, while it is running, is `refund.subscription` on the order.
13687
+ *
13585
13688
  * Needs the `orders.refund` permission (Refund Orders).
13586
13689
  *
13587
13690
  * @see https://docs.shoply.gg/api-reference/orders/refund-an-order
@@ -14460,7 +14563,7 @@ export interface ShoplyResourcesCustomers {
14460
14563
  /**
14461
14564
  * **List customers**
14462
14565
  *
14463
- * The store's customers, a page at a time, each with how many orders they have paid for, what they have spent, their balance and their `tags`: Shoply's two first (`vip` and `disputed`, worked out from their orders as they are read), then the store's own.
14566
+ * The store's customers, a page at a time, each with how many orders they have paid for, what they have spent in the store's currency today (`totalSpend`) and in any other (`otherSpend`, never added in or converted), their balance and their `tags`: Shoply's two first (`vip` and `disputed`, worked out from their orders as they are read), then the store's own.
14464
14567
  *
14465
14568
  * Needs the `customers.read` permission (Read Customers).
14466
14569
  *
@@ -14480,7 +14583,7 @@ export interface ShoplyResourcesCustomers {
14480
14583
  /**
14481
14584
  * **Export customers**
14482
14585
  *
14483
- * The customers the same filters would list, as a CSV file: each one's email, when they were first seen, the orders they paid for and what they spent, their first and last paid order, their store balance, their affiliate code and balance where they have one, their tags, and whether they are subscribed to the store's news and offers. Every customer the filters match is in the file, however many: it is sent as it is read. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, orders, customers, fraud events, blacklist rules and allowlist entries together, whoever asks: after that the answer is 429.
14586
+ * The customers the same filters would list, as a CSV file: each one's email, when they were first seen, the orders they paid for and what they spent in the store's currency today, with what they spent in any other in a column of its own, their first and last paid order, their store balance, their affiliate code and balance where they have one, their tags, and whether they are subscribed to the store's news and offers. Every customer the filters match is in the file, however many: it is sent as it is read. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, orders, customers, fraud events, blacklist rules and allowlist entries together, whoever asks: after that the answer is 429.
14484
14587
  *
14485
14588
  * Needs the `customers.read` permission (Read Customers). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
14486
14589
  *
@@ -14500,7 +14603,7 @@ export interface ShoplyResourcesCustomers {
14500
14603
  /**
14501
14604
  * **Get a customer**
14502
14605
  *
14503
- * One customer: their orders, their balance and its history, their `tags`, whether they are blacklisted, and their affiliate figures if they are one.
14606
+ * One customer: their orders, what they have spent in the store's currency today (`totalSpend`, over `paidInCurrency` of their paid orders) and in any other (`otherSpend`), their balance and its history, their `tags`, whether they are blacklisted, and their affiliate figures if they are one.
14504
14607
  *
14505
14608
  * Needs the `customers.read` permission (Read Customers).
14506
14609
  *
@@ -14593,7 +14696,7 @@ export interface ShoplyResourcesCustomerTags {
14593
14696
  /**
14594
14697
  * **List customer tags**
14595
14698
  *
14596
- * The store's own tags as `data`, by name, each with `customers`, how many wear it. `meta.automatic` is Shoply's two: VIP's rule (`vipOn`, `vipSpent` in the store's currency, `vipOrders` completed orders, `vipDays` the period, 0 for all time; either number 0 leaves that half out) and `disputedOn`, with `vipCustomers` and `disputedCustomers`, how many wear each today.
14699
+ * The store's own tags as `data`, by name, each with `customers`, how many wear it. `meta.automatic` is Shoply's two: VIP's rule (`vipOn`, `vipSpent` in the store's currency today, counting the orders in it alone, `vipOrders` completed orders in any currency, `vipDays` the period, 0 for all time; either number 0 leaves that half out) and `disputedOn`, with `vipCustomers` and `disputedCustomers`, how many wear each today.
14597
14700
  *
14598
14701
  * Needs the `customers.read` permission (Read Customers).
14599
14702
  *
@@ -15298,7 +15401,7 @@ export interface ShoplyResourcesResellerOrders {
15298
15401
  /**
15299
15402
  * **Export reseller orders**
15300
15403
  *
15301
- * The orders the same filters would list, as a CSV file: Order ID, Reseller, Bought By, Product, Variant, Quantity, Total, Currency, Bought With and Date. No delivered key is in it. Every row the filters match is in the file, up to 50,000, sent as it is read. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, whatever they are of, whoever asks: after that the answer is 429.
15404
+ * The orders the same filters would list, as a CSV file: Order ID, Reseller, Bought By, Product, Variant, Quantity, Total, Currency, Bought With and Date. No delivered key is in it. Every row the filters match is in the file, however many, sent as it is read. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, whatever they are of, whoever asks: after that the answer is 429.
15302
15405
  *
15303
15406
  * Needs the `resellers.read` permission (Read Resellers). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
15304
15407
  *
@@ -15331,7 +15434,7 @@ export interface ShoplyResourcesResellerTopUps {
15331
15434
  /**
15332
15435
  * **Export top-ups**
15333
15436
  *
15334
- * The top-ups the same filters would list, as a CSV file: Top-up ID, Reseller, Paid By, Amount, Currency, Paid With, Status, Opened and Paid. Every row the filters match is in the file, up to 50,000, sent as it is read. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, whatever they are of, whoever asks: after that the answer is 429.
15437
+ * The top-ups the same filters would list, as a CSV file: Top-up ID, Reseller, Paid By, Amount, Currency, Paid With, Status, Opened and Paid. Every row the filters match is in the file, however many, sent as it is read. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, whatever they are of, whoever asks: after that the answer is 429.
15335
15438
  *
15336
15439
  * Needs the `resellers.read` permission (Read Resellers). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
15337
15440
  *
@@ -15739,7 +15842,7 @@ export interface ShoplyResourcesFinance {
15739
15842
  /**
15740
15843
  * **Get profit**
15741
15844
  *
15742
- * What the store kept in a period and how that is made up, beside the period before: net sales, the cost of goods, payment fees, affiliate commission, expenses and net profit, twelve months of sales and profit, and every product with what each variant sold and cost. A sale is what the buyer paid: at its sale price, after its coupon and any affiliate link's discount, without tax. Payment fees are worked out from the rates the store typed, never read from a provider, so they can be slightly off. A store makes at most 20 reports every 10 minutes, counting this one, the other report, their files and the dashboard's Generate Report together: after that the answer is 429. Refused with `business_details_required` until the store has its business details.
15845
+ * What the store kept in a period and how that is made up, beside the period before: net sales, the cost of goods, payment fees, affiliate commission, expenses and net profit, twelve months of sales and profit, and every product with what each variant sold and cost. A sale is what the buyer paid: at its sale price, after its coupon and any affiliate link's discount, without tax. Payment fees are worked out from the rates the store typed, never read from a provider, so they can be slightly off. Every figure is in the store's currency today (`currency`), its orders and its expenses alone. What the period took or spent in another currency is `otherCurrencies`, each in its own, and the expenses whose currency is not known are `unknownExpenses`: nothing is added across currencies or converted. A store makes at most 20 reports every 10 minutes, counting this one, the other report, their files and the dashboard's Generate Report together: after that the answer is 429. Refused with `business_details_required` until the store has its business details.
15743
15846
  *
15744
15847
  * Needs the `finance.read` permission (Read Finance). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
15745
15848
  *
@@ -15749,7 +15852,7 @@ export interface ShoplyResourcesFinance {
15749
15852
  /**
15750
15853
  * **Get the books**
15751
15854
  *
15752
- * The books for a period: the profit and loss line by line beside the period before, where the buyers were, and what each payment method took in. Gross sales are at the prices before any sale, and what sales, discounts, refunds and chargebacks took off is a line each; affiliate commission is a cost of sales. Tax collected is not income and is in none of it but the tax report. A store makes at most 20 reports every 10 minutes, counting this one, the other report, their files and the dashboard's Generate Report together: after that the answer is 429. Refused with `business_details_required` until the store has its business details.
15855
+ * The books for a period: the profit and loss line by line beside the period before, where the buyers were, and what each payment method took in. Gross sales are at the prices before any sale, and what sales, discounts, refunds and chargebacks took off is a line each; affiliate commission is a cost of sales. Tax collected is not income and is in none of it but the tax report. The statement is in the store's currency today (`currency`), its orders and its expenses alone. Each other currency the period or the one before took or spent anything in has a statement of its own in `others`, beside the period before in that currency, and the expenses whose currency is not known are `unknownExpenses`. `taxReport` is the same: its rows in the store's currency, then `others`. Nothing is added across currencies or converted. A store makes at most 20 reports every 10 minutes, counting this one, the other report, their files and the dashboard's Generate Report together: after that the answer is 429. Refused with `business_details_required` until the store has its business details.
15753
15856
  *
15754
15857
  * Needs the `finance.read` permission (Read Finance). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
15755
15858
  *
@@ -15845,7 +15948,7 @@ export interface ShoplyResourcesExpenses {
15845
15948
  /**
15846
15949
  * **List expenses**
15847
15950
  *
15848
- * A period's expenses, newest first, up to 2,000 of them. `meta.totals` is what the expenses matched come to, counting every one, and `meta.groups` the same by category. Refused with `business_details_required` until the store has its business details.
15951
+ * A period's expenses, newest first, up to 2,000 of them, each with the `currency` its amount is in (null where it is not known). `meta.totals` is what the expenses matched in the store's currency today (`meta.currency`) come to, counting every one, and `meta.groups` the same by category. `meta.otherCurrencies` is what those in each other currency come to, and those whose currency is not known (`currency` null), never added in or converted. `meta.listedOf` is how many the filters match, whatever their currency. Refused with `business_details_required` until the store has its business details.
15849
15952
  *
15850
15953
  * Needs the `expenses.read` permission (Read Expenses).
15851
15954
  *
@@ -15865,7 +15968,7 @@ export interface ShoplyResourcesExpenses {
15865
15968
  /**
15866
15969
  * **Get an expense summary**
15867
15970
  *
15868
- * A period's spending at a glance: the total beside the period before, what repeats, the largest category, how many have receipts, twelve months of totals and what is coming up. Refused with `business_details_required` until the store has its business details.
15971
+ * A period's spending at a glance: the total beside the period before, what repeats, the largest category, how many have receipts, twelve months of totals and what is coming up. The figures are in the store's currency today; `otherCurrencies` is what the period spent in each other currency, and in none known. Refused with `business_details_required` until the store has its business details.
15869
15972
  *
15870
15973
  * Needs the `expenses.read` permission (Read Expenses). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
15871
15974
  *
@@ -15895,7 +15998,7 @@ export interface ShoplyResourcesExpenses {
15895
15998
  /**
15896
15999
  * **Update an expense**
15897
16000
  *
15898
- * Changes an expense. A field left out stays as it is. Refused with `business_details_required` until the store has its business details.
16001
+ * Changes an expense. A field left out stays as it is. An expense keeps the currency its amount was typed in, the store's of that moment, while its amount stays as it was; a new amount is in the store's currency today. Refused with `business_details_required` until the store has its business details.
15899
16002
  *
15900
16003
  * Needs the `expenses.write` permission (Change Expenses).
15901
16004
  *
@@ -16011,7 +16114,7 @@ export interface ShoplyResourcesRecurringExpenses {
16011
16114
  /**
16012
16115
  * **List recurring expenses**
16013
16116
  *
16014
- * The expenses that come round every month or year, with the day each is next due. A store holds up to 100. Refused with `business_details_required` until the store has its business details.
16117
+ * The expenses that come round every month or year, with the day each is next due and the `currency` its amount is in (null where it is not known). A store holds up to 100. `meta.running` is what the running ones come to a month, a yearly one as a twelfth: `monthly` those in the store's currency today, `others` those in each other currency and those not known, never added in or converted, and `count` every one. Refused with `business_details_required` until the store has its business details.
16015
16118
  *
16016
16119
  * Needs the `expenses.read` permission (Read Expenses).
16017
16120
  *
@@ -16031,7 +16134,7 @@ export interface ShoplyResourcesRecurringExpenses {
16031
16134
  /**
16032
16135
  * **Update a recurring expense**
16033
16136
  *
16034
- * Changes a recurring expense. A field left out stays as it is. The expenses it has already written are not changed. Refused with `business_details_required` until the store has its business details.
16137
+ * Changes a recurring expense. A field left out stays as it is. The expenses it has already written are not changed. It keeps the currency its amount was typed in while its amount stays as it was; a new amount is in the store's currency today. Refused with `business_details_required` until the store has its business details.
16035
16138
  *
16036
16139
  * Needs the `expenses.write` permission (Change Expenses).
16037
16140
  *
@@ -17084,43 +17187,43 @@ export interface WebhookEventData {
17084
17187
  /**
17085
17188
  * A business joined the store's reseller panel through one of its invite links.
17086
17189
  *
17087
- * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual` or `chargeback`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17190
+ * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual`, `chargeback` or `refund`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17088
17191
  */
17089
17192
  "reseller.joined": Record<string, unknown>;
17090
17193
  /**
17091
17194
  * A reseller was paused or made active again, or given another tier or discount, by the store or by Shoply; or paused because a top-up's payment was taken back.
17092
17195
  *
17093
- * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual` or `chargeback`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17196
+ * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual`, `chargeback` or `refund`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17094
17197
  */
17095
17198
  "reseller.updated": Record<string, unknown>;
17096
17199
  /**
17097
17200
  * The store removed a reseller: their team can no longer sign in. Their orders, top-ups and balance history are kept.
17098
17201
  *
17099
- * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual` or `chargeback`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17202
+ * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual`, `chargeback` or `refund`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17100
17203
  */
17101
17204
  "reseller.removed": Record<string, unknown>;
17102
17205
  /**
17103
17206
  * A reseller's balance changed: a top-up paid, a purchase, a change by hand, or a top-up's payment taken back.
17104
17207
  *
17105
- * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual` or `chargeback`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17208
+ * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual`, `chargeback` or `refund`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17106
17209
  */
17107
17210
  "reseller.balance_changed": Record<string, unknown>;
17108
17211
  /**
17109
17212
  * A reseller's top-up was paid, or marked paid by the store, and is on their balance.
17110
17213
  *
17111
- * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual` or `chargeback`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17214
+ * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual`, `chargeback` or `refund`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17112
17215
  */
17113
17216
  "reseller.top_up_paid": Record<string, unknown>;
17114
17217
  /**
17115
17218
  * A reseller says they paid a top-up with one of the store's custom payment methods, and it waits for the store to approve or reject it. Approved, it is `reseller.top_up_paid`.
17116
17219
  *
17117
- * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual` or `chargeback`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17220
+ * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual`, `chargeback` or `refund`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17118
17221
  */
17119
17222
  "reseller.top_up_submitted": Record<string, unknown>;
17120
17223
  /**
17121
17224
  * A reseller bought from the panel, in the panel itself, with their API or by a delivery URL, paid from their balance.
17122
17225
  *
17123
- * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual` or `chargeback`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17226
+ * `data`: For `reseller.joined`, `reseller.updated` and `reseller.removed`, the reseller, as [List resellers](https://docs.shoply.gg/api-reference/resellers/list-resellers) answers one. `reseller.balance_changed` adds `change`: its `kind` (`topup`, `order`, `manual`, `chargeback` or `refund`), `amount`, `balanceAfter`, `orderId`, `note`, `actor` and `createdAt`. The two `reseller.top_up_` events have the top-up, as [List top-ups](https://docs.shoply.gg/api-reference/resellers/list-top-ups) answers it, and `reseller.order_completed` the order, as [List reseller orders](https://docs.shoply.gg/api-reference/resellers/list-reseller-orders) answers it.
17124
17227
  */
17125
17228
  "reseller.order_completed": Record<string, unknown>;
17126
17229
  /**
@@ -78,6 +78,7 @@ export const OPERATIONS = [
78
78
  {"id":"stock.listFiles","name":"stock.listFiles","method":"GET","path":"/stores/{storeId}/variants/{variantId}/files","params":["variantId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
79
79
  {"id":"stock.addFile","name":"stock.addFile","method":"POST","path":"/stores/{storeId}/variants/{variantId}/files","params":["variantId"],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
80
80
  {"id":"stock.finishFile","name":"stock.finishFile","method":"POST","path":"/stores/{storeId}/variants/{variantId}/files/{fileId}/complete","params":["variantId","fileId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
81
+ {"id":"stock.replaceFile","name":"stock.replaceFile","method":"POST","path":"/stores/{storeId}/variants/{variantId}/files/{fileId}/replace","params":["variantId","fileId"],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
81
82
  {"id":"stock.deleteFile","name":"stock.deleteFile","method":"DELETE","path":"/stores/{storeId}/variants/{variantId}/files/{fileId}","params":["variantId","fileId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
82
83
  {"id":"categories.list","name":"categories.list","method":"GET","path":"/stores/{storeId}/categories","params":[],"query":["visibility"],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
83
84
  {"id":"categories.create","name":"categories.create","method":"POST","path":"/stores/{storeId}/categories","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
package/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { EVENTS, OPERATIONS } from "./generated/operations.js";
16
16
 
17
- export const VERSION = "0.11.4";
17
+ export const VERSION = "0.12.0";
18
18
 
19
19
  const API = "https://api.shoply.gg/v1";
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplygg/node",
3
- "version": "0.11.4",
3
+ "version": "0.12.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",