@objectstack/client 3.2.2 → 3.2.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/client@3.2.2 build /home/runner/work/spec/spec/packages/client
2
+ > @objectstack/client@3.2.4 build /home/runner/work/spec/spec/packages/client
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 52.00 KB
14
- ESM dist/index.mjs.map 104.19 KB
15
- ESM ⚡️ Build success in 70ms
16
- CJS dist/index.js 53.17 KB
17
- CJS dist/index.js.map 104.24 KB
18
- CJS ⚡️ Build success in 70ms
13
+ ESM dist/index.mjs 52.12 KB
14
+ ESM dist/index.mjs.map 104.44 KB
15
+ ESM ⚡️ Build success in 55ms
16
+ CJS dist/index.js 53.29 KB
17
+ CJS dist/index.js.map 104.49 KB
18
+ CJS ⚡️ Build success in 56ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 5636ms
20
+ DTS ⚡️ Build success in 5542ms
21
21
  DTS dist/index.d.mts 30.61 KB
22
22
  DTS dist/index.d.ts 30.61 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @objectstack/client
2
2
 
3
+ ## 3.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - @objectstack/spec@3.2.4
8
+ - @objectstack/core@3.2.4
9
+
10
+ ## 3.2.3
11
+
12
+ ### Patch Changes
13
+
14
+ - @objectstack/spec@3.2.3
15
+ - @objectstack/core@3.2.3
16
+
3
17
  ## 3.2.2
4
18
 
5
19
  ### Patch Changes
package/dist/index.js CHANGED
@@ -791,10 +791,10 @@ var ObjectStackClient = class {
791
791
  */
792
792
  check: async (request) => {
793
793
  const route = this.getRoute("permissions");
794
- const res = await this.fetch(`${this.baseUrl}${route}/check`, {
795
- method: "POST",
796
- body: JSON.stringify(request)
797
- });
794
+ const params = new URLSearchParams({ object: request.object, action: request.action });
795
+ if (request.recordId !== void 0) params.set("recordId", request.recordId);
796
+ if (request.field !== void 0) params.set("field", request.field);
797
+ const res = await this.fetch(`${this.baseUrl}${route}/check?${params.toString()}`);
798
798
  return this.unwrapResponse(res);
799
799
  },
800
800
  /**
@@ -802,7 +802,7 @@ var ObjectStackClient = class {
802
802
  */
803
803
  getObjectPermissions: async (object) => {
804
804
  const route = this.getRoute("permissions");
805
- const res = await this.fetch(`${this.baseUrl}${route}/permissions/${encodeURIComponent(object)}`);
805
+ const res = await this.fetch(`${this.baseUrl}${route}/objects/${encodeURIComponent(object)}`);
806
806
  return this.unwrapResponse(res);
807
807
  },
808
808
  /**
@@ -810,7 +810,7 @@ var ObjectStackClient = class {
810
810
  */
811
811
  getEffectivePermissions: async () => {
812
812
  const route = this.getRoute("permissions");
813
- const res = await this.fetch(`${this.baseUrl}${route}/permissions/effective`);
813
+ const res = await this.fetch(`${this.baseUrl}${route}/effective`);
814
814
  return this.unwrapResponse(res);
815
815
  }
816
816
  };
@@ -1610,8 +1610,7 @@ var ObjectStackClient = class {
1610
1610
  storage: "/api/v1/storage",
1611
1611
  automation: "/api/v1/automation",
1612
1612
  packages: "/api/v1/packages",
1613
- permissions: "/api/v1/auth",
1614
- // Permission endpoints are under /api/v1/auth per spec
1613
+ permissions: "/api/v1/permissions",
1615
1614
  realtime: "/api/v1/realtime",
1616
1615
  workflow: "/api/v1/workflow",
1617
1616
  views: "/api/v1/ui/views",