@objectstack/client 3.2.1 → 3.2.3
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +15 -0
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
- package/src/client.hono.test.ts +1 -1
- package/src/client.msw.test.ts +1 -1
- package/src/index.ts +7 -7
- package/vitest.config.ts +13 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/client@3.2.
|
|
2
|
+
> @objectstack/client@3.2.3 build /home/runner/work/spec/spec/packages/client
|
|
3
3
|
> tsup --config ../../tsup.config.ts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m52.12 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m104.44 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 51ms
|
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m53.29 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m104.49 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 51ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 5619ms
|
|
21
21
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m30.61 KB[39m
|
|
22
22
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m30.61 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @objectstack/client
|
|
2
2
|
|
|
3
|
+
## 3.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @objectstack/spec@3.2.3
|
|
8
|
+
- @objectstack/core@3.2.3
|
|
9
|
+
|
|
10
|
+
## 3.2.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [46defbb]
|
|
15
|
+
- @objectstack/spec@3.2.2
|
|
16
|
+
- @objectstack/core@3.2.2
|
|
17
|
+
|
|
3
18
|
## 3.2.1
|
|
4
19
|
|
|
5
20
|
### 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
|
|
795
|
-
|
|
796
|
-
|
|
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}/
|
|
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}/
|
|
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/
|
|
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",
|