@shoplygg/node 0.4.0 → 0.4.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.
@@ -6738,6 +6738,7 @@ export type TicketsGetResult = {
6738
6738
  id: string;
6739
6739
  from: string;
6740
6740
  body: string;
6741
+ html: string;
6741
6742
  pictures: unknown[] | Record<string, unknown>;
6742
6743
  createdAt: string;
6743
6744
  }>;
@@ -6805,6 +6806,7 @@ export type TicketsReplyResult = {
6805
6806
  id: string;
6806
6807
  from: string;
6807
6808
  body: string;
6809
+ html: string;
6808
6810
  pictures: unknown[] | Record<string, unknown>;
6809
6811
  createdAt: string;
6810
6812
  }>;
@@ -6860,6 +6862,7 @@ export type TicketsResolveResult = {
6860
6862
  id: string;
6861
6863
  from: string;
6862
6864
  body: string;
6865
+ html: string;
6863
6866
  pictures: unknown[] | Record<string, unknown>;
6864
6867
  createdAt: string;
6865
6868
  }>;
@@ -6915,6 +6918,7 @@ export type TicketsReopenResult = {
6915
6918
  id: string;
6916
6919
  from: string;
6917
6920
  body: string;
6921
+ html: string;
6918
6922
  pictures: unknown[] | Record<string, unknown>;
6919
6923
  createdAt: string;
6920
6924
  }>;
@@ -9925,8 +9929,24 @@ export type CustomerShowResult = {
9925
9929
  buttons: unknown[] | Record<string, unknown>;
9926
9930
  guideUrl: string;
9927
9931
  files: unknown[] | Record<string, unknown>;
9928
- instructions: unknown[] | Record<string, unknown>;
9932
+ instructions: {
9933
+ productName: string;
9934
+ variantName: string;
9935
+ text: string;
9936
+ }[];
9929
9937
  general: string;
9938
+ orders: Array<{
9939
+ id: string;
9940
+ dateCreated: string;
9941
+ products: string[];
9942
+ imageUrl: unknown;
9943
+ files: unknown[] | Record<string, unknown>;
9944
+ instructions: {
9945
+ productName: unknown;
9946
+ variantName: unknown;
9947
+ text: unknown;
9948
+ }[];
9949
+ }>;
9930
9950
  };
9931
9951
  supportUrl: string;
9932
9952
  };
@@ -10538,6 +10558,7 @@ export type CustomerTicketsCreateResult = {
10538
10558
  id: string;
10539
10559
  from: string;
10540
10560
  body: string;
10561
+ html: string;
10541
10562
  pictures: unknown[] | Record<string, unknown>;
10542
10563
  createdAt: string;
10543
10564
  }>;
@@ -10575,6 +10596,7 @@ export type CustomerTicketsShowResult = {
10575
10596
  id: string;
10576
10597
  from: string;
10577
10598
  body: string;
10599
+ html: string;
10578
10600
  pictures: unknown[] | Record<string, unknown>;
10579
10601
  createdAt: string;
10580
10602
  }>;
@@ -10618,6 +10640,7 @@ export type CustomerTicketsReplyResult = {
10618
10640
  id: string;
10619
10641
  from: string;
10620
10642
  body: string;
10643
+ html: string;
10621
10644
  pictures: unknown[] | Record<string, unknown>;
10622
10645
  createdAt: string;
10623
10646
  }>;
@@ -10655,6 +10678,7 @@ export type CustomerTicketsResolveResult = {
10655
10678
  id: string;
10656
10679
  from: string;
10657
10680
  body: string;
10681
+ html: string;
10658
10682
  pictures: unknown[] | Record<string, unknown>;
10659
10683
  createdAt: string;
10660
10684
  }>;
@@ -12944,7 +12968,7 @@ export interface ShoplyResourcesTickets {
12944
12968
  /**
12945
12969
  * **Get a support ticket**
12946
12970
  *
12947
- * A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body`, `pictures` (each one's `name` and the `url` the dashboard reads it at; read it with Get a ticket's picture) and `createdAt`. `customer` is who wrote it, with their tags, `order` the order it is about, `orders` their five latest, and `canReopenUntil` the last moment the buyer can open a resolved ticket again by writing on it. Reading a ticket marks it read, as opening it on the dashboard does.
12971
+ * A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body` (Markdown, as written), `html` (the body as Markdown draws it, escaped: links only to the web or an email, each opening in a new tab, and a picture written in Markdown a link, never loaded), `pictures` (each one's `name` and the `url` the dashboard reads it at; read it with Get a ticket's picture) and `createdAt`. `customer` is who wrote it, with their tags, `order` the order it is about, `orders` their five latest, and `canReopenUntil` the last moment the buyer can open a resolved ticket again by writing on it. Reading a ticket marks it read, as opening it on the dashboard does.
12948
12972
  *
12949
12973
  * Needs the `tickets.read` permission (Read Support Tickets).
12950
12974
  *
@@ -14023,7 +14047,7 @@ export interface ShoplyCustomerResourcesTickets {
14023
14047
  /**
14024
14048
  * **Get a support ticket**
14025
14049
  *
14026
- * A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body`, `pictures` and `createdAt`. A picture is named here and shown in the customer panel. `canReopenUntil` is the last moment writing on a resolved ticket opens it again.
14050
+ * A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body` (Markdown, as written), `html` (the body as Markdown draws it, escaped, which is safe to show as it is), `pictures` and `createdAt`. A picture is named here and shown in the customer panel. `canReopenUntil` is the last moment writing on a resolved ticket opens it again.
14027
14051
  *
14028
14052
  * Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
14029
14053
  *
@@ -14096,6 +14120,8 @@ export interface ShoplyCustomerResources {
14096
14120
  *
14097
14121
  * Everything the customer panel's first page shows: the buyer's email, what they have spent, their store balance, their 200 newest orders, and the downloads, files and setup instructions their paid orders hand over.
14098
14122
  *
14123
+ * `downloads.files` and `downloads.instructions` are every paid order's together. `downloads.orders` is the same an order at a time, newest first, as the customer panel shows it: each with what it bought, its own files and its own instructions. The store's `buttons` and `general` notes go with every order.
14124
+ *
14099
14125
  * `affiliate` is null unless the store has an affiliate programme the buyer is in or may join, and `subscriptions` says whether they have ever had one. Keys are not listed here: Get an order has them.
14100
14126
  *
14101
14127
  * Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
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.4.0";
17
+ export const VERSION = "0.4.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.4.0",
3
+ "version": "0.4.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",