@shoplygg/node 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -298,6 +298,7 @@ export type StoreEmailSettingsResult = {
298
298
  emailResellersEnabled: boolean;
299
299
  emailPaymentSetupEnabled: boolean;
300
300
  emailDiscordSetupEnabled: boolean;
301
+ emailDomainEnabled: boolean;
301
302
  emailDisputeOpenedEnabled: boolean;
302
303
  emailDisputeClosedEnabled: boolean;
303
304
  testEmailEvery: {
@@ -392,6 +393,7 @@ export type PaymentMethodsListResult = Array<{
392
393
  }>;
393
394
  unpaidHours: unknown;
394
395
  updatedAt: unknown;
396
+ version: unknown;
395
397
  }>;
396
398
 
397
399
  /** What switch a payment method on or off takes: `paymentMethods.setEnabled`. */
@@ -467,6 +469,7 @@ export type PaymentMethodsSetBalanceResult = Array<{
467
469
  }>;
468
470
  unpaidHours: unknown;
469
471
  updatedAt: unknown;
472
+ version: unknown;
470
473
  }>;
471
474
 
472
475
  /** What set how long an unpaid order is kept takes: `paymentMethods.setUnpaidHours`. */
@@ -524,6 +527,7 @@ export type PaymentMethodsSetUnpaidHoursResult = Array<{
524
527
  }>;
525
528
  unpaidHours: unknown;
526
529
  updatedAt: string;
530
+ version: string;
527
531
  }>;
528
532
 
529
533
  /** What set a payment method's own time for an unpaid order takes: `paymentMethods.setMethodUnpaidHours`. */
@@ -581,6 +585,7 @@ export type PaymentMethodsSetMethodUnpaidHoursResult = Array<{
581
585
  }>;
582
586
  unpaidHours: number;
583
587
  updatedAt: string;
588
+ version: string;
584
589
  }>;
585
590
 
586
591
  /** What get the overview takes: `analytics.overview`. */
@@ -6346,6 +6351,7 @@ export type EmailTemplatesShowResult = {
6346
6351
  css: unknown;
6347
6352
  subject: unknown;
6348
6353
  updatedAt: unknown;
6354
+ version: string;
6349
6355
  shared: unknown;
6350
6356
  baseCss: string;
6351
6357
  accent: string;
@@ -6359,6 +6365,8 @@ export interface EmailTemplatesUpdateParams {
6359
6365
  css?: string;
6360
6366
  /** Its subject, or null for the original. */
6361
6367
  subject?: string;
6368
+ /** The `version` you read. Sent, the change is refused with `stale_write` if its HTML, CSS or subject has changed since, a subject set by Change Cart Recovery or Change Win-Back included. Use it rather than `expectedUpdatedAt`, which neither of those moves. */
6369
+ expectedVersion?: string;
6362
6370
  /** The `updatedAt` you read; a template changed since is refused with `stale_write`. */
6363
6371
  expectedUpdatedAt?: string;
6364
6372
  }
@@ -6386,6 +6394,7 @@ export type EmailTemplatesUpdateResult = {
6386
6394
  css: string;
6387
6395
  subject: string;
6388
6396
  updatedAt: string;
6397
+ version: string;
6389
6398
  shared: unknown;
6390
6399
  baseCss: string;
6391
6400
  accent: string;
@@ -6458,6 +6467,7 @@ export type EmailTemplatesRevertResult = {
6458
6467
  css: unknown;
6459
6468
  subject: unknown;
6460
6469
  updatedAt: unknown;
6470
+ version: string;
6461
6471
  shared: unknown;
6462
6472
  baseCss: string;
6463
6473
  accent: string;
@@ -7621,15 +7631,12 @@ export interface TeamActivityParams {
7621
7631
  export type TeamActivityItem = {
7622
7632
  id: string;
7623
7633
  userId: string;
7624
- name: string;
7634
+ name: unknown;
7625
7635
  email: string;
7626
- team: string;
7636
+ team: unknown;
7627
7637
  area: string;
7628
7638
  summary: string;
7629
- subject: {
7630
- kind: string;
7631
- id: string;
7632
- };
7639
+ subject: unknown;
7633
7640
  at: string;
7634
7641
  };
7635
7642
 
@@ -7911,7 +7918,7 @@ export interface ResellerProductsBadgesParams {
7911
7918
 
7912
7919
  /** What set a product's status and labels on the panel answers: `resellerProducts.badges`. */
7913
7920
  export type ResellerProductsBadgesResult = {
7914
- "212a0544-bad6-44f0-b3f1-bc71394a59e2": {
7921
+ "e4d31280-6335-4561-8cd8-312acfcdde7f": {
7915
7922
  label: string;
7916
7923
  color: string;
7917
7924
  kind: string;
@@ -11536,6 +11543,7 @@ export type RequestsShowResult = {
11536
11543
  createdAt: string;
11537
11544
  requestBody: unknown;
11538
11545
  responseBody: string;
11546
+ bodiesWithheld: boolean;
11539
11547
  };
11540
11548
 
11541
11549
  /** What list webhook endpoints answers: `webhooks.list`. */
@@ -11551,6 +11559,7 @@ export type WebhooksListResult = Array<{
11551
11559
  lastStatus: unknown;
11552
11560
  dateCreated: string;
11553
11561
  updatedAt: string;
11562
+ version: string;
11554
11563
  recentDeliveries: unknown[] | Record<string, unknown>;
11555
11564
  }>;
11556
11565
 
@@ -11577,6 +11586,7 @@ export type WebhooksCreateResult = {
11577
11586
  lastStatus: unknown;
11578
11587
  dateCreated: string;
11579
11588
  updatedAt: string;
11589
+ version: string;
11580
11590
  secret: string;
11581
11591
  };
11582
11592
 
@@ -11593,6 +11603,7 @@ export type WebhooksShowResult = {
11593
11603
  lastStatus: unknown;
11594
11604
  dateCreated: string;
11595
11605
  updatedAt: string;
11606
+ version: string;
11596
11607
  };
11597
11608
 
11598
11609
  /** What update a webhook endpoint takes: `webhooks.update`. */
@@ -11605,6 +11616,8 @@ export interface WebhooksUpdateParams {
11605
11616
  description?: string;
11606
11617
  /** Whether events are sent to it. Switched off, nothing is sent, and what happens meanwhile is not kept for it. */
11607
11618
  enabled?: boolean;
11619
+ /** The endpoint's `version` you last read. Sent, the change is refused with `stale_write` if its address, events, note or switch has changed since. Left out, it is saved whatever happened in between. */
11620
+ expectedVersion?: string;
11608
11621
  }
11609
11622
 
11610
11623
  /** What update a webhook endpoint answers: `webhooks.update`. */
@@ -11620,6 +11633,7 @@ export type WebhooksUpdateResult = {
11620
11633
  lastStatus: unknown;
11621
11634
  dateCreated: string;
11622
11635
  updatedAt: string;
11636
+ version: string;
11623
11637
  };
11624
11638
 
11625
11639
  /** What delete a webhook endpoint answers: `webhooks.delete`. */
@@ -12888,7 +12902,7 @@ export interface ShoplyResourcesStorefronts {
12888
12902
  /**
12889
12903
  * **Publish a storefront's code**
12890
12904
  *
12891
- * Puts the draft live, its files and its design together, and makes this storefront the one buyers see, as Publish in the code studio does. Send `rev` and `version` from "Get a storefront's code" as you last read it: if either has moved since (somebody saved in the meantime) it is refused with `draft_conflict`, so you never publish what you have not seen. A mistake in a template refuses it with `code_problems`, the mistakes listed in `problems`.
12905
+ * Puts the draft live, its files and its design together, and makes this storefront the one buyers see, as Publish in the code studio does. Send `rev` and `version` from "Get a storefront's code" as you last read it: if either has moved since (somebody saved in the meantime) it is refused with `draft_conflict`, so you never publish what you have not seen. A mistake in a template refuses it with `code_problems`, the mistakes listed in `problems`. Making another storefront the one buyers see is the owner's: a key or a CLI sign-in somebody on the store's team made publishes only the storefront that is live already, and is refused another with `team_permission`.
12892
12906
  *
12893
12907
  * Needs the `storefronts.write` permission (Change Storefronts).
12894
12908
  *
@@ -14980,7 +14994,7 @@ export interface ShoplyResourcesTeam {
14980
14994
  /**
14981
14995
  * **List activity**
14982
14996
  *
14983
- * Who did what at the store on the dashboard, the newest first, fifty a page: each line's `summary` ("Refunded order ..."), who did it as they were then (`name`, `email`, `team`, which is null for the owner), its `area` of the dashboard, and what it was about (`subject`). Every change and every export is a line, the owner's included; what a key does is not, and is in List API requests. Kept 365 days.
14997
+ * Who did what at the store on the dashboard, the newest first, fifty a page: each line's `summary` ("Refunded order ..."), who did it as they were then (`name`, `email`, `team`, which is null for the owner), its `area` of the dashboard, and what it was about (`subject`). Every change and every export is a line, the owner's included. What a key does is not, and is in List API requests, except a change to the team, which is a line under whoever made the key, saying which key. Kept 365 days.
14984
14998
  *
14985
14999
  * Needs the `team.read` permission (Read the Team).
14986
15000
  *
@@ -15020,7 +15034,7 @@ export interface ShoplyResourcesTeam {
15020
15034
  /**
15021
15035
  * **Move somebody to another team**
15022
15036
  *
15023
- * They can do what the other team can from their next request. Not onto a team that holds a sensitive permission: do that on the dashboard.
15037
+ * They can do what the other team can from their next request. The API keys and CLI sign-ins a person on the team made lose what their team no longer holds, and are revoked when nothing is left or the team does not hold `dev.keys`; an app they connected is disconnected when the team does not hold all it was given, or `dev.apps`. Not onto a team that holds a sensitive permission: do that on the dashboard.
15024
15038
  *
15025
15039
  * Needs the `team.write` permission (Manage the Team).
15026
15040
  *
@@ -15030,7 +15044,7 @@ export interface ShoplyResourcesTeam {
15030
15044
  /**
15031
15045
  * **Remove somebody from the team**
15032
15046
  *
15033
- * They can no longer reach the store. The API keys they made and the apps they connected stop working with them (`keysStopped` says how many), and the webhooks those made are deleted.
15047
+ * They can no longer reach the store. The API keys they made and the apps they connected stop working with them (`keysStopped` says how many), the webhooks those made and the ones they added on the dashboard are deleted, and the invites they sent and nobody has taken up are cancelled.
15034
15048
  *
15035
15049
  * Needs the `team.write` permission (Manage the Team).
15036
15050
  *
@@ -15043,7 +15057,7 @@ export interface ShoplyResourcesTeams {
15043
15057
  /**
15044
15058
  * **Create a team**
15045
15059
  *
15046
- * A store holds as many teams as its plan does (`limits.teams` in Get the team). A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
15060
+ * A store holds as many teams as its plan does (`limits.teams` in Get the team). A key does this as whoever made it: a key somebody on the store's team made gives, takes away and changes only what their own team holds, as they can on the dashboard, and is refused with `team_beyond` otherwise. A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
15047
15061
  *
15048
15062
  * Needs the `team.write` permission (Manage the Team).
15049
15063
  *
@@ -15053,7 +15067,7 @@ export interface ShoplyResourcesTeams {
15053
15067
  /**
15054
15068
  * **Update a team**
15055
15069
  *
15056
- * Saves the team whole: its name and its permissions. Its people can do what it now holds from their next request. A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
15070
+ * Saves the team whole: its name and its permissions. Its people can do what it now holds from their next request. The API keys and CLI sign-ins a person on the team made lose what their team no longer holds, and are revoked when nothing is left or the team does not hold `dev.keys`; an app they connected is disconnected when the team does not hold all it was given, or `dev.apps`. A key does this as whoever made it: a key somebody on the store's team made gives, takes away and changes only what their own team holds, as they can on the dashboard, and is refused with `team_beyond` otherwise. A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
15057
15071
  *
15058
15072
  * Needs the `team.write` permission (Manage the Team).
15059
15073
  *
@@ -16220,7 +16234,7 @@ export interface ShoplyResourcesRequests {
16220
16234
  /**
16221
16235
  * **Get an API request**
16222
16236
  *
16223
- * One request, with what was sent and what came back. Long bodies are cut short, and values that are secrets or goods (a password, license keys going into stock) are not kept. A request's ID is the `X-Request-Id` header of its answer.
16237
+ * One request, with what was sent and what came back. Long bodies are cut short, and values that are secrets or goods (a password, license keys going into stock) are not kept. The two bodies are answered only to a key that holds the scope of what the request did, and `bodiesWithheld` is true where they were kept back. A request's ID is the `X-Request-Id` header of its answer.
16224
16238
  *
16225
16239
  * Needs the `logs.read` permission (Read API Requests).
16226
16240
  *
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.12.0";
17
+ export const VERSION = "0.12.1";
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.12.0",
3
+ "version": "0.12.1",
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",