@gomusdev/web-components 3.11.0 → 3.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.
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.12.0 (2026-07-07)
4
+
5
+ ### Features
6
+
7
+ * **go-api:** add go.api.getOrders() with pagination
8
+
3
9
  ## 3.11.0 (2026-07-06)
4
10
 
5
11
  ### Features
@@ -13413,6 +13413,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13413
13413
  var SIGN_IN_ENDPOINT = "/api/v4/auth/sign_in";
13414
13414
  var SIGN_UP_ENDPOINT = "/api/v4/auth";
13415
13415
  var WITHDRAWAL_ENDPOINT = "/api/v4/orders/withdrawals";
13416
+ var ORDERS_ENDPOINT = "/api/v4/orders";
13416
13417
  //#endregion
13417
13418
  //#region ../../packages/gomus-api/lib/customerLevels.ts
13418
13419
  var CustomerLevels = {
@@ -13527,6 +13528,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13527
13528
  if (!this.auth.data.accessToken) return NOT_SIGNED_IN;
13528
13529
  return this.fetchAndCache(VALIDATE_TOKEN_ENDPOINT, `getCustomer`, "", { cache: 5 });
13529
13530
  }
13531
+ getOrders(params = {}) {
13532
+ if (!this.auth.data.accessToken) return NOT_SIGNED_IN;
13533
+ return this.fetchAndCache(ORDERS_ENDPOINT, `orders-${JSON.stringify(params)}`, "", {
13534
+ cache: 5,
13535
+ query: params
13536
+ });
13537
+ }
13530
13538
  ticketsCalendar(params) {
13531
13539
  return this.fetchAndCache(TICKETS_CALENDAR_ENDPOINT, `ticketsCalendar-${JSON.stringify(params)}`, "data", {
13532
13540
  cache: 60,
@@ -37329,10 +37337,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
37329
37337
  throw e;
37330
37338
  }
37331
37339
  },
37332
- api: { getCustomer: async () => {
37333
- await ensureShopReady();
37334
- return shop.asyncFetch(() => shop.getCustomer());
37335
- } }
37340
+ api: {
37341
+ getCustomer: async () => {
37342
+ await ensureShopReady();
37343
+ return shop.asyncFetch(() => shop.getCustomer());
37344
+ },
37345
+ getOrders: async (params) => {
37346
+ await ensureShopReady();
37347
+ return shop.asyncFetch(() => shop.getOrders(params));
37348
+ }
37349
+ }
37336
37350
  };
37337
37351
  (async () => {
37338
37352
  await initGo(window);
@@ -13412,6 +13412,7 @@ var TICKETS_ENDPOINT = "/api/v4/tickets";
13412
13412
  var SIGN_IN_ENDPOINT = "/api/v4/auth/sign_in";
13413
13413
  var SIGN_UP_ENDPOINT = "/api/v4/auth";
13414
13414
  var WITHDRAWAL_ENDPOINT = "/api/v4/orders/withdrawals";
13415
+ var ORDERS_ENDPOINT = "/api/v4/orders";
13415
13416
  //#endregion
13416
13417
  //#region ../../packages/gomus-api/lib/customerLevels.ts
13417
13418
  var CustomerLevels = {
@@ -13526,6 +13527,13 @@ var Shop = class {
13526
13527
  if (!this.auth.data.accessToken) return NOT_SIGNED_IN;
13527
13528
  return this.fetchAndCache(VALIDATE_TOKEN_ENDPOINT, `getCustomer`, "", { cache: 5 });
13528
13529
  }
13530
+ getOrders(params = {}) {
13531
+ if (!this.auth.data.accessToken) return NOT_SIGNED_IN;
13532
+ return this.fetchAndCache(ORDERS_ENDPOINT, `orders-${JSON.stringify(params)}`, "", {
13533
+ cache: 5,
13534
+ query: params
13535
+ });
13536
+ }
13529
13537
  ticketsCalendar(params) {
13530
13538
  return this.fetchAndCache(TICKETS_CALENDAR_ENDPOINT, `ticketsCalendar-${JSON.stringify(params)}`, "data", {
13531
13539
  cache: 60,
@@ -37328,10 +37336,16 @@ var go = {
37328
37336
  throw e;
37329
37337
  }
37330
37338
  },
37331
- api: { getCustomer: async () => {
37332
- await ensureShopReady();
37333
- return shop.asyncFetch(() => shop.getCustomer());
37334
- } }
37339
+ api: {
37340
+ getCustomer: async () => {
37341
+ await ensureShopReady();
37342
+ return shop.asyncFetch(() => shop.getCustomer());
37343
+ },
37344
+ getOrders: async (params) => {
37345
+ await ensureShopReady();
37346
+ return shop.asyncFetch(() => shop.getOrders(params));
37347
+ }
37348
+ }
37335
37349
  };
37336
37350
  (async () => {
37337
37351
  await initGo(window);