@tailor-platform/sdk 1.15.2 → 1.16.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/CHANGELOG.md +16 -0
- package/dist/application-CNpRSiWJ.mjs +4 -0
- package/dist/{application-DLUgR1gv.mjs → application-DQ2F9UmJ.mjs} +7 -3
- package/dist/application-DQ2F9UmJ.mjs.map +1 -0
- package/dist/cli/index.mjs +2 -2
- package/dist/cli/lib.d.mts +19 -3
- package/dist/cli/lib.mjs +2 -2
- package/dist/configure/index.d.mts +3 -3
- package/dist/{index-Bg_UJxhL.d.mts → index-1V_2bvT4.d.mts} +3 -3
- package/dist/{index-pQbghcVa.d.mts → index-Ds8lbSJb.d.mts} +2 -2
- package/dist/plugin/index.d.mts +1 -1
- package/dist/schema-DRYB-nzA.mjs.map +1 -1
- package/dist/{types-BZRw-Iys.d.mts → types-_sYDzqHG.d.mts} +54 -10
- package/dist/types-b-ig8nW_.mjs.map +1 -1
- package/dist/{update-70uX2TDG.mjs → update-C5jgLxpK.mjs} +17 -5
- package/dist/update-C5jgLxpK.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +3 -3
- package/package.json +1 -1
- package/dist/application-DLUgR1gv.mjs.map +0 -1
- package/dist/application-DhvHS3pX.mjs +0 -4
- package/dist/update-70uX2TDG.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 1.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#602](https://github.com/tailor-platform/sdk/pull/602) [`4174110`](https://github.com/tailor-platform/sdk/commit/4174110ae1d1410801de98f9df2020c1ee0a4ef8) Thanks [@remiposo](https://github.com/remiposo)! - Add `hasAny` / `not hasAny` permission operators for array-to-array comparison
|
|
8
|
+
|
|
9
|
+
New permission operators that check whether two arrays share any common elements.
|
|
10
|
+
|
|
11
|
+
Usage examples:
|
|
12
|
+
|
|
13
|
+
- `[{ user: "roles" }, "hasAny", { record: "allowedRoles" }]` — allow access when the user's roles overlap with the record's allowed roles
|
|
14
|
+
- `[{ user: "tags" }, "not hasAny", ["blocked", "suspended"]]` — deny access when the user's tags share any element with the blocked list
|
|
15
|
+
- `[["admin", "editor"], "hasAny", { user: "roles" }]` — both operands can be string arrays
|
|
16
|
+
|
|
17
|
+
Unlike `in` / `not in` (scalar vs array), `hasAny` / `not hasAny` compares two arrays and checks for intersection.
|
|
18
|
+
|
|
3
19
|
## 1.15.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -336,7 +336,9 @@ const operatorMap = {
|
|
|
336
336
|
"=": "eq",
|
|
337
337
|
"!=": "ne",
|
|
338
338
|
in: "in",
|
|
339
|
-
"not in": "nin"
|
|
339
|
+
"not in": "nin",
|
|
340
|
+
hasAny: "hasAny",
|
|
341
|
+
"not hasAny": "nhasAny"
|
|
340
342
|
};
|
|
341
343
|
function normalizeOperand(operand) {
|
|
342
344
|
if (typeof operand === "object" && "user" in operand) return { user: operand.user === "id" ? "_id" : operand.user };
|
|
@@ -97659,7 +97661,9 @@ const PermissionOperatorSchema = z.enum([
|
|
|
97659
97661
|
"=",
|
|
97660
97662
|
"!=",
|
|
97661
97663
|
"in",
|
|
97662
|
-
"not in"
|
|
97664
|
+
"not in",
|
|
97665
|
+
"hasAny",
|
|
97666
|
+
"not hasAny"
|
|
97663
97667
|
]);
|
|
97664
97668
|
const RecordPermissionConditionSchema = z.tuple([
|
|
97665
97669
|
RecordPermissionOperandSchema,
|
|
@@ -98591,4 +98595,4 @@ function defineApplication(params) {
|
|
|
98591
98595
|
|
|
98592
98596
|
//#endregion
|
|
98593
98597
|
export { ExecutorSchema as a, functionSchema as c, loadFilesWithIgnores as d, logger as f, createExecutorService as i, stringifyFunction as l, symbols as m, WorkflowJobSchema as n, OAuth2ClientSchema as o, styles as p, WorkflowSchema as r, ResolverSchema as s, defineApplication as t, tailorUserMap as u };
|
|
98594
|
-
//# sourceMappingURL=application-
|
|
98598
|
+
//# sourceMappingURL=application-DQ2F9UmJ.mjs.map
|