@vexcms/core 0.0.20 → 0.1.0-alpha.2
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/LICENSE +202 -0
- package/dist/.build +1 -0
- package/dist/access/buildChecks.d.ts +58 -0
- package/dist/access/buildChecks.d.ts.map +1 -0
- package/dist/access/canAccessAdminPanel.d.ts +53 -0
- package/dist/access/canAccessAdminPanel.d.ts.map +1 -0
- package/dist/access/compileConstraints.d.ts +155 -0
- package/dist/access/compileConstraints.d.ts.map +1 -0
- package/dist/access/config.d.ts +62 -0
- package/dist/access/config.d.ts.map +1 -0
- package/dist/access/constants.d.ts +95 -0
- package/dist/access/constants.d.ts.map +1 -0
- package/dist/access/constraintTypes.d.ts +337 -0
- package/dist/access/constraintTypes.d.ts.map +1 -0
- package/dist/access/createAccessQueryBuilder.d.ts +59 -0
- package/dist/access/createAccessQueryBuilder.d.ts.map +1 -0
- package/dist/access/createFilterConstraintBuilder.d.ts +26 -0
- package/dist/access/createFilterConstraintBuilder.d.ts.map +1 -0
- package/dist/access/createIndexConstraintBuilder.d.ts +40 -0
- package/dist/access/createIndexConstraintBuilder.d.ts.map +1 -0
- package/dist/access/hasPermission.d.ts +85 -0
- package/dist/access/hasPermission.d.ts.map +1 -0
- package/dist/access/index.d.ts +13 -0
- package/dist/access/index.d.ts.map +1 -0
- package/dist/access/pickQueryIndex.d.ts +42 -0
- package/dist/access/pickQueryIndex.d.ts.map +1 -0
- package/dist/access/resolveAccessRule.d.ts +85 -0
- package/dist/access/resolveAccessRule.d.ts.map +1 -0
- package/dist/access/types.d.ts +738 -0
- package/dist/access/types.d.ts.map +1 -0
- package/dist/access/validateAccessConstraints.d.ts +57 -0
- package/dist/access/validateAccessConstraints.d.ts.map +1 -0
- package/dist/api/client.d.ts +20 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +117 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/convex.d.ts +296 -0
- package/dist/api/convex.d.ts.map +1 -0
- package/dist/api/create/client.d.ts +50 -0
- package/dist/api/create/client.d.ts.map +1 -0
- package/dist/api/create/server.d.ts +43 -0
- package/dist/api/create/server.d.ts.map +1 -0
- package/dist/api/depth.d.ts +39 -0
- package/dist/api/depth.d.ts.map +1 -0
- package/dist/api/find/client.d.ts +90 -0
- package/dist/api/find/client.d.ts.map +1 -0
- package/dist/api/find/server.d.ts +73 -0
- package/dist/api/find/server.d.ts.map +1 -0
- package/dist/api/get/client.d.ts +56 -0
- package/dist/api/get/client.d.ts.map +1 -0
- package/dist/api/get/server.d.ts +49 -0
- package/dist/api/get/server.d.ts.map +1 -0
- package/dist/api/globals/find.client.d.ts +20 -0
- package/dist/api/globals/find.client.d.ts.map +1 -0
- package/dist/api/globals/find.server.d.ts +29 -0
- package/dist/api/globals/find.server.d.ts.map +1 -0
- package/dist/api/globals/get.client.d.ts +46 -0
- package/dist/api/globals/get.client.d.ts.map +1 -0
- package/dist/api/globals/get.server.d.ts +55 -0
- package/dist/api/globals/get.server.d.ts.map +1 -0
- package/dist/api/globals/types.d.ts +65 -0
- package/dist/api/globals/types.d.ts.map +1 -0
- package/dist/api/globals/upsert.client.d.ts +24 -0
- package/dist/api/globals/upsert.client.d.ts.map +1 -0
- package/dist/api/globals/upsert.server.d.ts +47 -0
- package/dist/api/globals/upsert.server.d.ts.map +1 -0
- package/dist/api/populate.d.ts +23 -0
- package/dist/api/populate.d.ts.map +1 -0
- package/dist/api/remove/client.d.ts +58 -0
- package/dist/api/remove/client.d.ts.map +1 -0
- package/dist/api/remove/server.d.ts +65 -0
- package/dist/api/remove/server.d.ts.map +1 -0
- package/dist/api/search/client.d.ts +58 -0
- package/dist/api/search/client.d.ts.map +1 -0
- package/dist/api/search/server.d.ts +54 -0
- package/dist/api/search/server.d.ts.map +1 -0
- package/dist/api/server.d.ts +370 -0
- package/dist/api/server.d.ts.map +1 -0
- package/dist/api/server.js +33 -0
- package/dist/api/server.js.map +1 -0
- package/dist/api/types.d.ts +525 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/update/client.d.ts +53 -0
- package/dist/api/update/client.d.ts.map +1 -0
- package/dist/api/update/server.d.ts +47 -0
- package/dist/api/update/server.d.ts.map +1 -0
- package/dist/api/utils.d.ts +57 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/auth/mergeCollections.d.ts +28 -0
- package/dist/auth/mergeCollections.d.ts.map +1 -0
- package/dist/auth/types.d.ts +84 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/chunk-2DU7JDEX.js +1877 -0
- package/dist/chunk-2DU7JDEX.js.map +1 -0
- package/dist/chunk-2IB2DCN7.js +75 -0
- package/dist/chunk-2IB2DCN7.js.map +1 -0
- package/dist/collections/config.d.ts +28 -0
- package/dist/collections/config.d.ts.map +1 -0
- package/dist/collections/constants.d.ts +27 -0
- package/dist/collections/constants.d.ts.map +1 -0
- package/dist/collections/index.d.ts +7 -0
- package/dist/collections/index.d.ts.map +1 -0
- package/dist/collections/indexFields.d.ts +20 -0
- package/dist/collections/indexFields.d.ts.map +1 -0
- package/dist/collections/interfaceGen.d.ts +59 -0
- package/dist/collections/interfaceGen.d.ts.map +1 -0
- package/dist/collections/internal/index.d.ts +2 -0
- package/dist/collections/internal/index.d.ts.map +1 -0
- package/dist/collections/types.d.ts +282 -0
- package/dist/collections/types.d.ts.map +1 -0
- package/dist/collections/utils.d.ts +71 -0
- package/dist/collections/utils.d.ts.map +1 -0
- package/dist/collections/validator.d.ts +73 -0
- package/dist/collections/validator.d.ts.map +1 -0
- package/dist/config/config.d.ts +43 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/sanitizeConfig.d.ts +82 -0
- package/dist/config/sanitizeConfig.d.ts.map +1 -0
- package/dist/config/types.d.ts +316 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/fields/array/config.d.ts +57 -0
- package/dist/fields/array/config.d.ts.map +1 -0
- package/dist/fields/array/index.d.ts +5 -0
- package/dist/fields/array/index.d.ts.map +1 -0
- package/dist/fields/array/inputSchema.d.ts +32 -0
- package/dist/fields/array/inputSchema.d.ts.map +1 -0
- package/dist/fields/array/types.d.ts +127 -0
- package/dist/fields/array/types.d.ts.map +1 -0
- package/dist/fields/array/validator.d.ts +30 -0
- package/dist/fields/array/validator.d.ts.map +1 -0
- package/dist/fields/baseTypes.d.ts +251 -0
- package/dist/fields/baseTypes.d.ts.map +1 -0
- package/dist/fields/blocks/config.d.ts +63 -0
- package/dist/fields/blocks/config.d.ts.map +1 -0
- package/dist/fields/blocks/index.d.ts +5 -0
- package/dist/fields/blocks/index.d.ts.map +1 -0
- package/dist/fields/blocks/inputSchema.d.ts +22 -0
- package/dist/fields/blocks/inputSchema.d.ts.map +1 -0
- package/dist/fields/blocks/types.d.ts +253 -0
- package/dist/fields/blocks/types.d.ts.map +1 -0
- package/dist/fields/blocks/validator.d.ts +32 -0
- package/dist/fields/blocks/validator.d.ts.map +1 -0
- package/dist/fields/checkbox/config.d.ts +46 -0
- package/dist/fields/checkbox/config.d.ts.map +1 -0
- package/dist/fields/checkbox/index.d.ts +5 -0
- package/dist/fields/checkbox/index.d.ts.map +1 -0
- package/dist/fields/checkbox/inputSchema.d.ts +27 -0
- package/dist/fields/checkbox/inputSchema.d.ts.map +1 -0
- package/dist/fields/checkbox/types.d.ts +67 -0
- package/dist/fields/checkbox/types.d.ts.map +1 -0
- package/dist/fields/checkbox/validator.d.ts +34 -0
- package/dist/fields/checkbox/validator.d.ts.map +1 -0
- package/dist/fields/color/config.d.ts +49 -0
- package/dist/fields/color/config.d.ts.map +1 -0
- package/dist/fields/color/convert.d.ts +72 -0
- package/dist/fields/color/convert.d.ts.map +1 -0
- package/dist/fields/color/formats.d.ts +38 -0
- package/dist/fields/color/formats.d.ts.map +1 -0
- package/dist/fields/color/index.d.ts +8 -0
- package/dist/fields/color/index.d.ts.map +1 -0
- package/dist/fields/color/inputSchema.d.ts +29 -0
- package/dist/fields/color/inputSchema.d.ts.map +1 -0
- package/dist/fields/color/types.d.ts +100 -0
- package/dist/fields/color/types.d.ts.map +1 -0
- package/dist/fields/color/utils.d.ts +100 -0
- package/dist/fields/color/utils.d.ts.map +1 -0
- package/dist/fields/color/validator.d.ts +27 -0
- package/dist/fields/color/validator.d.ts.map +1 -0
- package/dist/fields/constants.d.ts +108 -0
- package/dist/fields/constants.d.ts.map +1 -0
- package/dist/fields/date/config.d.ts +57 -0
- package/dist/fields/date/config.d.ts.map +1 -0
- package/dist/fields/date/index.d.ts +5 -0
- package/dist/fields/date/index.d.ts.map +1 -0
- package/dist/fields/date/inputSchema.d.ts +29 -0
- package/dist/fields/date/inputSchema.d.ts.map +1 -0
- package/dist/fields/date/types.d.ts +147 -0
- package/dist/fields/date/types.d.ts.map +1 -0
- package/dist/fields/date/validator.d.ts +34 -0
- package/dist/fields/date/validator.d.ts.map +1 -0
- package/dist/fields/group/config.d.ts +47 -0
- package/dist/fields/group/config.d.ts.map +1 -0
- package/dist/fields/group/index.d.ts +5 -0
- package/dist/fields/group/index.d.ts.map +1 -0
- package/dist/fields/group/inputSchema.d.ts +27 -0
- package/dist/fields/group/inputSchema.d.ts.map +1 -0
- package/dist/fields/group/types.d.ts +105 -0
- package/dist/fields/group/types.d.ts.map +1 -0
- package/dist/fields/group/validator.d.ts +41 -0
- package/dist/fields/group/validator.d.ts.map +1 -0
- package/dist/fields/index.d.ts +20 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/inputSchemas/index.d.ts +23 -0
- package/dist/fields/inputSchemas/index.d.ts.map +1 -0
- package/dist/fields/inputSchemas/utils.d.ts +25 -0
- package/dist/fields/inputSchemas/utils.d.ts.map +1 -0
- package/dist/fields/interfaceGen.d.ts +15 -0
- package/dist/fields/interfaceGen.d.ts.map +1 -0
- package/dist/fields/number/config.d.ts +48 -0
- package/dist/fields/number/config.d.ts.map +1 -0
- package/dist/fields/number/index.d.ts +5 -0
- package/dist/fields/number/index.d.ts.map +1 -0
- package/dist/fields/number/inputSchema.d.ts +23 -0
- package/dist/fields/number/inputSchema.d.ts.map +1 -0
- package/dist/fields/number/types.d.ts +100 -0
- package/dist/fields/number/types.d.ts.map +1 -0
- package/dist/fields/number/validator.d.ts +39 -0
- package/dist/fields/number/validator.d.ts.map +1 -0
- package/dist/fields/relationship/config.d.ts +45 -0
- package/dist/fields/relationship/config.d.ts.map +1 -0
- package/dist/fields/relationship/index.d.ts +5 -0
- package/dist/fields/relationship/index.d.ts.map +1 -0
- package/dist/fields/relationship/inputSchema.d.ts +31 -0
- package/dist/fields/relationship/inputSchema.d.ts.map +1 -0
- package/dist/fields/relationship/types.d.ts +126 -0
- package/dist/fields/relationship/types.d.ts.map +1 -0
- package/dist/fields/relationship/validator.d.ts +27 -0
- package/dist/fields/relationship/validator.d.ts.map +1 -0
- package/dist/fields/select/config.d.ts +59 -0
- package/dist/fields/select/config.d.ts.map +1 -0
- package/dist/fields/select/index.d.ts +5 -0
- package/dist/fields/select/index.d.ts.map +1 -0
- package/dist/fields/select/inputSchema.d.ts +28 -0
- package/dist/fields/select/inputSchema.d.ts.map +1 -0
- package/dist/fields/select/types.d.ts +89 -0
- package/dist/fields/select/types.d.ts.map +1 -0
- package/dist/fields/select/validator.d.ts +31 -0
- package/dist/fields/select/validator.d.ts.map +1 -0
- package/dist/fields/text/config.d.ts +48 -0
- package/dist/fields/text/config.d.ts.map +1 -0
- package/dist/fields/text/index.d.ts +5 -0
- package/dist/fields/text/index.d.ts.map +1 -0
- package/dist/fields/text/inputSchema.d.ts +24 -0
- package/dist/fields/text/inputSchema.d.ts.map +1 -0
- package/dist/fields/text/types.d.ts +132 -0
- package/dist/fields/text/types.d.ts.map +1 -0
- package/dist/fields/text/validator.d.ts +39 -0
- package/dist/fields/text/validator.d.ts.map +1 -0
- package/dist/fields/types.d.ts +135 -0
- package/dist/fields/types.d.ts.map +1 -0
- package/dist/fields/upload/config.d.ts +24 -0
- package/dist/fields/upload/config.d.ts.map +1 -0
- package/dist/fields/upload/index.d.ts +5 -0
- package/dist/fields/upload/index.d.ts.map +1 -0
- package/dist/fields/upload/inputSchema.d.ts +17 -0
- package/dist/fields/upload/inputSchema.d.ts.map +1 -0
- package/dist/fields/upload/types.d.ts +78 -0
- package/dist/fields/upload/types.d.ts.map +1 -0
- package/dist/fields/upload/validator.d.ts +16 -0
- package/dist/fields/upload/validator.d.ts.map +1 -0
- package/dist/fields/url/config.d.ts +49 -0
- package/dist/fields/url/config.d.ts.map +1 -0
- package/dist/fields/url/index.d.ts +5 -0
- package/dist/fields/url/index.d.ts.map +1 -0
- package/dist/fields/url/inputSchema.d.ts +31 -0
- package/dist/fields/url/inputSchema.d.ts.map +1 -0
- package/dist/fields/url/types.d.ts +70 -0
- package/dist/fields/url/types.d.ts.map +1 -0
- package/dist/fields/url/validator.d.ts +37 -0
- package/dist/fields/url/validator.d.ts.map +1 -0
- package/dist/fields/utils.d.ts +47 -0
- package/dist/fields/utils.d.ts.map +1 -0
- package/dist/fields/validators/index.d.ts +23 -0
- package/dist/fields/validators/index.d.ts.map +1 -0
- package/dist/fields/validators/utils.d.ts +24 -0
- package/dist/fields/validators/utils.d.ts.map +1 -0
- package/dist/framework.d.ts +227 -0
- package/dist/framework.d.ts.map +1 -0
- package/dist/globals/config/config.d.ts +1 -0
- package/dist/globals/config/config.d.ts.map +1 -0
- package/dist/globals/config/types.d.ts +1 -0
- package/dist/globals/config/types.d.ts.map +1 -0
- package/dist/globals/config.d.ts +47 -0
- package/dist/globals/config.d.ts.map +1 -0
- package/dist/globals/index.d.ts +5 -0
- package/dist/globals/index.d.ts.map +1 -0
- package/dist/globals/interfaceGen.d.ts +33 -0
- package/dist/globals/interfaceGen.d.ts.map +1 -0
- package/dist/globals/types.d.ts +175 -0
- package/dist/globals/types.d.ts.map +1 -0
- package/dist/globals/utils.d.ts +37 -0
- package/dist/globals/utils.d.ts.map +1 -0
- package/dist/index.d.ts +15 -3165
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2101 -3475
- package/dist/index.js.map +1 -1
- package/dist/media/api/index.d.ts +5 -0
- package/dist/media/api/index.d.ts.map +1 -0
- package/dist/media/api/mutations.d.ts +76 -0
- package/dist/media/api/mutations.d.ts.map +1 -0
- package/dist/media/api/queries.d.ts +28 -0
- package/dist/media/api/queries.d.ts.map +1 -0
- package/dist/media/api/server.d.ts +68 -0
- package/dist/media/api/server.d.ts.map +1 -0
- package/dist/media/api/types.d.ts +171 -0
- package/dist/media/api/types.d.ts.map +1 -0
- package/dist/media/config.d.ts +25 -0
- package/dist/media/config.d.ts.map +1 -0
- package/dist/media/index.d.ts +6 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/types.d.ts +332 -0
- package/dist/media/types.d.ts.map +1 -0
- package/dist/media/utils.d.ts +35 -0
- package/dist/media/utils.d.ts.map +1 -0
- package/dist/media/validators.d.ts +61 -0
- package/dist/media/validators.d.ts.map +1 -0
- package/dist/schema/generateVexSchema.d.ts +36 -0
- package/dist/schema/generateVexSchema.d.ts.map +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/migrate.d.ts +73 -0
- package/dist/schema/migrate.d.ts.map +1 -0
- package/dist/types/generateVexTypes.d.ts +41 -0
- package/dist/types/generateVexTypes.d.ts.map +1 -0
- package/dist/types/generated.d.ts +382 -0
- package/dist/types/generated.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils.d.ts +57 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +67 -24
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/dist/.build
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1788177820990
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AccessCheck, AccessDocFieldFor, AccessFieldValueFor, AccessIndexedFieldFor, AccessMutationCheck, AccessResourceRef } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Builds a read check narrowed to `field === value`, pushed into that field's index.
|
|
4
|
+
*
|
|
5
|
+
* @typeParam S - Resource slug, inferred from `props.resource`.
|
|
6
|
+
* @typeParam F - Field name, constrained to `S`'s index-leading fields.
|
|
7
|
+
* @param props - Input props.
|
|
8
|
+
* @param props.resource - The resource this check governs.
|
|
9
|
+
* @param props.field - Field to compare, completed from `S`'s indexed fields.
|
|
10
|
+
* @param props.value - Value to match, typed from `S`'s document.
|
|
11
|
+
* @returns A check assignable to `permissions[role][S].read`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function indexedEqCheck<S extends string, F extends AccessIndexedFieldFor<S>>(props: {
|
|
14
|
+
field: F;
|
|
15
|
+
resource: AccessResourceRef<S>;
|
|
16
|
+
value: AccessFieldValueFor<S, F>;
|
|
17
|
+
}): AccessCheck<S>;
|
|
18
|
+
/**
|
|
19
|
+
* Builds a read check narrowed to rows the requesting user owns, pushed into the owner
|
|
20
|
+
* field's index.
|
|
21
|
+
*
|
|
22
|
+
* The comparison value is built per request from `user`, and its shape follows the
|
|
23
|
+
* field's declared type: a relationship column stores `Id[]`, so the value is
|
|
24
|
+
* `[user._id]`; anything else compares the id directly. That decision needs the
|
|
25
|
+
* resource config, which is why this is a distinct builder rather than a call to
|
|
26
|
+
* {@link indexedEqCheck}.
|
|
27
|
+
*
|
|
28
|
+
* @typeParam S - Resource slug, inferred from `props.resource`.
|
|
29
|
+
* @typeParam F - Owner field, constrained to `S`'s index-leading fields.
|
|
30
|
+
* @param props - Input props.
|
|
31
|
+
* @param props.resource - The resource this check governs.
|
|
32
|
+
* @param props.field - The owner field, e.g. `"authorId"`.
|
|
33
|
+
* @returns A check assignable to `permissions[role][S].read`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function indexedOwnerCheck<S extends string, F extends AccessIndexedFieldFor<S>>(props: {
|
|
36
|
+
field: F;
|
|
37
|
+
resource: AccessResourceRef<S>;
|
|
38
|
+
}): AccessCheck<S>;
|
|
39
|
+
/**
|
|
40
|
+
* Builds a single-document check that passes only when `field` names the requesting
|
|
41
|
+
* user.
|
|
42
|
+
*
|
|
43
|
+
* A per-document predicate rather than an index range: `create`/`update`/`delete`
|
|
44
|
+
* authorize one document, so there is nothing to narrow (DD 14). `field` is therefore
|
|
45
|
+
* any readable field, not only an indexed one.
|
|
46
|
+
*
|
|
47
|
+
* @typeParam S - Resource slug, inferred from `props.resource`.
|
|
48
|
+
* @typeParam F - Owner field on `S`.
|
|
49
|
+
* @param props - Input props.
|
|
50
|
+
* @param props.resource - The resource this check governs.
|
|
51
|
+
* @param props.field - The owner field, e.g. `"authorId"`.
|
|
52
|
+
* @returns A check assignable to a non-query action on `S`.
|
|
53
|
+
*/
|
|
54
|
+
export declare function ownerPredicateCheck<S extends string, F extends AccessDocFieldFor<S>>(props: {
|
|
55
|
+
field: F;
|
|
56
|
+
resource: AccessResourceRef<S>;
|
|
57
|
+
}): AccessMutationCheck<S>;
|
|
58
|
+
//# sourceMappingURL=buildChecks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildChecks.d.ts","sourceRoot":"","sources":["../../src/access/buildChecks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAEjB,mBAAmB,EACnB,qBAAqB,EAErB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAuEjB;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,qBAAqB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE;IAC1F,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC/B,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAClC,GAAG,WAAW,CAAC,CAAC,CAAC,CAMjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,qBAAqB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE;IAC7F,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;CAChC,GAAG,WAAW,CAAC,CAAC,CAAC,CAiBjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE;IAC3F,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;CAChC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAKzB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { VexAccessConfig } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link canAccessAdminPanel}.
|
|
4
|
+
*/
|
|
5
|
+
export interface CanAccessAdminPanelProps {
|
|
6
|
+
/**
|
|
7
|
+
* The resolved config from `defineAccess()`. `undefined` means RBAC is not
|
|
8
|
+
* configured, which grants access — the same escape hatch `hasPermission`
|
|
9
|
+
* uses, so a project without an access matrix keeps working.
|
|
10
|
+
*/
|
|
11
|
+
access?: VexAccessConfig;
|
|
12
|
+
/**
|
|
13
|
+
* The authenticated caller. `null`/`{}` (unauthenticated) resolves to an empty
|
|
14
|
+
* role list and therefore denies.
|
|
15
|
+
*/
|
|
16
|
+
user: Record<string, unknown> | null;
|
|
17
|
+
/** The caller's active organization, forwarded to permission callbacks. */
|
|
18
|
+
organization?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Answers whether a caller may open the admin panel at all — the
|
|
22
|
+
* `adminPanel.access` gate.
|
|
23
|
+
*
|
|
24
|
+
* This is the coarse entry check. It is deliberately separate from the
|
|
25
|
+
* per-collection checks: a caller who fails this should never reach the panel,
|
|
26
|
+
* whereas a caller who passes it may still be denied individual collections.
|
|
27
|
+
*
|
|
28
|
+
* Call it in the host app's admin route (a server component, layout, or
|
|
29
|
+
* middleware) and redirect on `false`. It never throws: the `adminPanel.access`
|
|
30
|
+
* subject carries no document, so it is evaluated with
|
|
31
|
+
* `scope: "any"` — a permission callback that only reads `user`/`organization`
|
|
32
|
+
* resolves normally, and one that reaches for a document resolves to `true`
|
|
33
|
+
* rather than throwing, since "can this caller use the panel" is inherently a
|
|
34
|
+
* subject-level question.
|
|
35
|
+
*
|
|
36
|
+
* Prefer this over hand-writing `hasPermission({ resource: "adminPanel", … })`
|
|
37
|
+
* so the subject key and action are never spelled by hand.
|
|
38
|
+
*
|
|
39
|
+
* @param props - The access config plus the resolved caller.
|
|
40
|
+
* @returns `true` when the caller may open the admin panel; `false` to deny.
|
|
41
|
+
* Also `true` when `access` is `undefined` (RBAC not configured).
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* // app/admin/[[...path]]/page.tsx
|
|
45
|
+
* const auth = await fetchAuthQuery(api.auth.api.getUserOrg, {});
|
|
46
|
+
* if (!canAccessAdminPanel({ access, user: auth.user, organization: auth.organization })) {
|
|
47
|
+
* redirect("/unauthorized");
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
* @see {@link hasPermission} for the general check this delegates to
|
|
51
|
+
*/
|
|
52
|
+
export declare function canAccessAdminPanel(props: CanAccessAdminPanelProps): boolean;
|
|
53
|
+
//# sourceMappingURL=canAccessAdminPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canAccessAdminPanel.d.ts","sourceRoot":"","sources":["../../src/access/canAccessAdminPanel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAS5E"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { DocumentByInfo, Expression, FilterBuilder, GenericDocument, GenericTableInfo } from "convex/server";
|
|
2
|
+
import type { AccessFilterConstraint, AccessIndexConstraint } from "./constraintTypes";
|
|
3
|
+
import type { IndexRangeFn } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Structural equality over Convex values.
|
|
6
|
+
*
|
|
7
|
+
* Convex compares values by CONTENT, both in an index range and in a `.filter()`
|
|
8
|
+
* expression. JS `===` compares arrays and objects by REFERENCE, so using it for the
|
|
9
|
+
* predicate made the two compile targets disagree for every array-valued field —
|
|
10
|
+
* which is every `relationship` and `select` field, since both store `v.array(...)`.
|
|
11
|
+
*
|
|
12
|
+
* The divergence was not symmetric, and one direction was unsafe: `eq` produced a
|
|
13
|
+
* false NEGATIVE (the query returned a row the predicate then rejected, so a client
|
|
14
|
+
* denied access the server had granted), while `neq` produced a false POSITIVE (the
|
|
15
|
+
* predicate admitted a row the query had excluded). The second is the dangerous one,
|
|
16
|
+
* and it is why this is content equality rather than a special case for `eq`.
|
|
17
|
+
*
|
|
18
|
+
* `undefined` equals `undefined`, which keeps "field missing" and "field explicitly
|
|
19
|
+
* undefined" indistinguishable — matching how a document read through bracket access
|
|
20
|
+
* behaves, and matching Convex, which stores neither.
|
|
21
|
+
*
|
|
22
|
+
* @param a - Left value.
|
|
23
|
+
* @param b - Right value.
|
|
24
|
+
* @returns `true` when the two values are structurally equal.
|
|
25
|
+
*/
|
|
26
|
+
declare function convexValuesEqual(a: unknown, b: unknown): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* JS-side comparator per {@link IndexOp}, used by `constraintsToPredicate`.
|
|
29
|
+
* `as never` narrows past `unknown` for the ordering operators only —
|
|
30
|
+
* `eq` never needs it. Exported so a caller building its own predicate logic
|
|
31
|
+
* (or a future compile target) reuses the same five comparisons rather than
|
|
32
|
+
* re-deriving them.
|
|
33
|
+
*
|
|
34
|
+
* The ordering operators are left as JS relational comparisons: they are only ever
|
|
35
|
+
* recorded against a single field of one type, where JS and Convex agree. Convex's
|
|
36
|
+
* cross-type total order is deliberately not reimplemented here.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CONSTRAINT_COMPARATORS: {
|
|
39
|
+
readonly eq: typeof convexValuesEqual;
|
|
40
|
+
readonly gt: (a: unknown, b: unknown) => boolean;
|
|
41
|
+
readonly gte: (a: unknown, b: unknown) => boolean;
|
|
42
|
+
readonly lt: (a: unknown, b: unknown) => boolean;
|
|
43
|
+
readonly lte: (a: unknown, b: unknown) => boolean;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Compiles a recorded constraint list to a `withIndex` range function.
|
|
47
|
+
*
|
|
48
|
+
* @param props - Input props.
|
|
49
|
+
* @param props.constraints - The rule's recorded constraints, in the order
|
|
50
|
+
* they were built. May be empty — an unrestricted range.
|
|
51
|
+
* @returns A function usable directly as `find`'s `withIndex` range: applies
|
|
52
|
+
* each constraint's operator to the builder in order and returns the
|
|
53
|
+
* result as an `IndexRange`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function accessConstraintsToIndexRange<TDocument extends GenericDocument = GenericDocument>(props: {
|
|
56
|
+
constraints: readonly AccessIndexConstraint<string, TDocument>[];
|
|
57
|
+
}): IndexRangeFn;
|
|
58
|
+
/**
|
|
59
|
+
* Compiles a recorded constraint list to a single `FilterBuilder` expression,
|
|
60
|
+
* `and`-ing multiple constraints together.
|
|
61
|
+
*
|
|
62
|
+
* @param props - Input props.
|
|
63
|
+
* @param props.constraints - The rule's recorded constraints, in the order
|
|
64
|
+
* they were built. Must be non-empty.
|
|
65
|
+
* @param props.q - The query's own `FilterBuilder`, from `.filter((q) => …)`.
|
|
66
|
+
* @returns A boolean expression usable directly as (or `and`-ed into) a
|
|
67
|
+
* `.filter()` predicate. A single constraint returns its own expression
|
|
68
|
+
* unwrapped; two or more are combined with `and`.
|
|
69
|
+
* @throws {Error} When `props.constraints` is empty — a caller contract
|
|
70
|
+
* violation, not a config-authoring mistake. An unrestricted rule resolves to
|
|
71
|
+
* its boolean shorthand upstream and never reaches a compile target.
|
|
72
|
+
*/
|
|
73
|
+
export declare function accessConstraintsToFilter<TTableInfo extends GenericTableInfo, TDocument extends DocumentByInfo<TTableInfo> = DocumentByInfo<TTableInfo>>(props: {
|
|
74
|
+
constraints: readonly AccessIndexConstraint<string, TDocument>[];
|
|
75
|
+
q: FilterBuilder<TTableInfo>;
|
|
76
|
+
}): Expression<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Compiles a recorded constraint list to a JS predicate, for interpreting
|
|
79
|
+
* constraints against an already-fetched document (`hasPermission`,
|
|
80
|
+
* client-side `usePermission`).
|
|
81
|
+
*
|
|
82
|
+
* The third compile target for the SAME recorded list, and it agrees with
|
|
83
|
+
* `accessConstraintsToFilter` by construction: both walk the constraints in order
|
|
84
|
+
* and both dispatch on the operator set {@link CONSTRAINT_COMPARATORS} defines, one
|
|
85
|
+
* in JS and one as a Convex expression. `compileConstraints.test.ts` asserts that
|
|
86
|
+
* agreement on a matching and a non-matching document.
|
|
87
|
+
*
|
|
88
|
+
* @param props - Input props.
|
|
89
|
+
* @param props.constraints - The rule's recorded constraints, in the order
|
|
90
|
+
* they were built. May be empty — an unrestricted predicate.
|
|
91
|
+
* @returns A function returning `true` when `doc` satisfies every constraint.
|
|
92
|
+
*/
|
|
93
|
+
export declare function accessConstraintsToPredicate<TDoc extends GenericDocument>(props: {
|
|
94
|
+
constraints: readonly AccessIndexConstraint<string, TDoc>[];
|
|
95
|
+
}): (doc: TDoc) => boolean;
|
|
96
|
+
/**
|
|
97
|
+
* JS-side comparator per {@link FilterOp} — {@link CONSTRAINT_COMPARATORS} plus
|
|
98
|
+
* `neq`, which `FilterBuilder` has and `IndexRangeBuilder` does not.
|
|
99
|
+
*
|
|
100
|
+
* Used by {@link accessFilterTreeToPredicate}. Kept as an extension of the index
|
|
101
|
+
* map rather than a parallel one so the two algebras cannot drift on a shared
|
|
102
|
+
* operator: change `gte` once and both compile targets follow.
|
|
103
|
+
*/
|
|
104
|
+
export declare const FILTER_COMPARATORS: {
|
|
105
|
+
readonly neq: (a: unknown, b: unknown) => boolean;
|
|
106
|
+
readonly eq: typeof convexValuesEqual;
|
|
107
|
+
readonly gt: (a: unknown, b: unknown) => boolean;
|
|
108
|
+
readonly gte: (a: unknown, b: unknown) => boolean;
|
|
109
|
+
readonly lt: (a: unknown, b: unknown) => boolean;
|
|
110
|
+
readonly lte: (a: unknown, b: unknown) => boolean;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Compiles a recorded constraint TREE to a single `FilterBuilder` expression.
|
|
114
|
+
*
|
|
115
|
+
* The tree counterpart of {@link accessConstraintsToFilter}: that one walks the
|
|
116
|
+
* flat positional list an indexed rule records, this one walks the recursive
|
|
117
|
+
* `compare`/`and`/`or`/`not` shape an unindexed rule records. Both target the
|
|
118
|
+
* same `.filter()` slot.
|
|
119
|
+
*
|
|
120
|
+
* There is no empty-tree case to guard. A rule that recorded nothing leaves
|
|
121
|
+
* `AccessCondition.filter` as `undefined`, so absence is represented by
|
|
122
|
+
* the field being missing rather than by an empty node — unlike the flat list,
|
|
123
|
+
* where `[]` is representable and has to be rejected.
|
|
124
|
+
*
|
|
125
|
+
* @typeParam TTableInfo - Convex table info for the query being filtered.
|
|
126
|
+
* @typeParam TDoc - Document shape the recorded values are typed against.
|
|
127
|
+
* @param props - Input props.
|
|
128
|
+
* @param props.node - Root of the recorded tree.
|
|
129
|
+
* @param props.q - The query's own `FilterBuilder`, from `.filter((q) => …)`.
|
|
130
|
+
* @returns A boolean expression usable directly as (or `and`-ed into) a
|
|
131
|
+
* `.filter()` predicate.
|
|
132
|
+
*/
|
|
133
|
+
export declare function accessFilterTreeToFilter<TTableInfo extends GenericTableInfo, TDoc extends DocumentByInfo<TTableInfo> = DocumentByInfo<TTableInfo>>(props: {
|
|
134
|
+
node: AccessFilterConstraint<TDoc>;
|
|
135
|
+
q: FilterBuilder<TTableInfo>;
|
|
136
|
+
}): Expression<boolean>;
|
|
137
|
+
/**
|
|
138
|
+
* Compiles a recorded constraint TREE to a JS predicate, for interpreting an
|
|
139
|
+
* unindexed rule against an already-fetched document.
|
|
140
|
+
*
|
|
141
|
+
* The tree counterpart of {@link accessConstraintsToPredicate}, and it agrees with
|
|
142
|
+
* {@link accessFilterTreeToFilter} by construction: both walk the same nodes in the
|
|
143
|
+
* same order and both dispatch comparisons through {@link FILTER_COMPARATORS}, one
|
|
144
|
+
* in JS and one as a Convex expression.
|
|
145
|
+
*
|
|
146
|
+
* @typeParam TDoc - Document shape the recorded values are typed against.
|
|
147
|
+
* @param props - Input props.
|
|
148
|
+
* @param props.node - Root of the recorded tree.
|
|
149
|
+
* @returns A function returning `true` when `doc` satisfies the tree.
|
|
150
|
+
*/
|
|
151
|
+
export declare function accessFilterTreeToPredicate<TDoc extends GenericDocument>(props: {
|
|
152
|
+
node: AccessFilterConstraint<TDoc>;
|
|
153
|
+
}): (doc: TDoc) => boolean;
|
|
154
|
+
export {};
|
|
155
|
+
//# sourceMappingURL=compileConstraints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compileConstraints.d.ts","sourceRoot":"","sources":["../../src/access/compileConstraints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAEjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EAGtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CA2B1D;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;;qBAEzB,OAAO,KAAK,OAAO;sBAClB,OAAO,KAAK,OAAO;qBACpB,OAAO,KAAK,OAAO;sBAClB,OAAO,KAAK,OAAO;CAC2C,CAAC;AAE1E;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,SAAS,eAAe,GAAG,eAAe,EACnD,KAAK,EAAE;IAAE,WAAW,EAAE,SAAS,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAA;CAAE,GAAG,YAAY,CAkB3F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,SAAS,gBAAgB,EACnC,SAAS,SAAS,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,UAAU,CAAC,EACzE,KAAK,EAAE;IACP,WAAW,EAAE,SAAS,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC;IACjE,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CAC9B,GAAG,UAAU,CAAC,OAAO,CAAC,CA+BtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,SAAS,eAAe,EAAE,KAAK,EAAE;IAChF,WAAW,EAAE,SAAS,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;CAC7D,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,CAMzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;sBAEpB,OAAO,KAAK,OAAO;;qBAhIpB,OAAO,KAAK,OAAO;sBAClB,OAAO,KAAK,OAAO;qBACpB,OAAO,KAAK,OAAO;sBAClB,OAAO,KAAK,OAAO;CA8H4C,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,SAAS,gBAAgB,EACnC,IAAI,SAAS,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,UAAU,CAAC,EACpE,KAAK,EAAE;IAAE,IAAI,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;CAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAkClG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,SAAS,eAAe,EAAE,KAAK,EAAE;IAC/E,IAAI,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;CACpC,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,CA2BzB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CollectionSlug } from "../types/generated";
|
|
2
|
+
import { CustomActionsInput, type AccessResource, type CustomResourceInput, type SubjectMap, type VexAccessConfig, type VexAccessConfigInput } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Defines the RBAC configuration for a VexCMS project.
|
|
5
|
+
*
|
|
6
|
+
* Builder in the `defineCollection`/`defineGlobal` family: infers the
|
|
7
|
+
* per-subject action/data/field registry (`SubjectMap`) from `resources` and
|
|
8
|
+
* `customResources` so `hasPermission()` calls against the returned config are
|
|
9
|
+
* fully typed; validates the matrix in dev; returns a frozen `VexAccessConfig`
|
|
10
|
+
* for `defineConfig({ access })`.
|
|
11
|
+
*
|
|
12
|
+
* @typeParam TRoles - Tuple of role name literals.
|
|
13
|
+
* @typeParam TResources - Tuple of collection/global configs contributing subjects.
|
|
14
|
+
* @typeParam TCustomResources - Custom subject declarations (`{ actions, data? }`).
|
|
15
|
+
* @typeParam TUserSlug - Slug literal of the user collection; drives the callback
|
|
16
|
+
* `user` type via the generated registry.
|
|
17
|
+
* @typeParam TOrgSlug - Slug literal of the organization collection, when
|
|
18
|
+
* multi-tenant. Presence gates the `organization` callback key; `undefined`
|
|
19
|
+
* when single-tenant.
|
|
20
|
+
* @param props - The access configuration.
|
|
21
|
+
* @param props.roles - All role names the matrix may reference.
|
|
22
|
+
* @param props.resources - Collections/globals to expose as subjects, keyed by slug.
|
|
23
|
+
* @param props.customResources - Non-resource subjects, keyed by name.
|
|
24
|
+
* @param props.userCollectionSlug - Slug of the collection whose documents are
|
|
25
|
+
* `user` in callbacks. A plain string — the merged user collection
|
|
26
|
+
* (auth-adapter fields included) does not exist yet at authoring time; the
|
|
27
|
+
* document type resolves from the generated registry by slug.
|
|
28
|
+
* @param props.userRolesField - Field on the user document holding role(s)
|
|
29
|
+
* (`string` or `string[]` value); `hasPermission` reads roles from it.
|
|
30
|
+
* @param props.orgCollectionSlug - Optional org collection slug enabling
|
|
31
|
+
* org-scoped callbacks.
|
|
32
|
+
* @param props.permissions - Role → subject → check matrix (see `RolePermissions`).
|
|
33
|
+
* @returns Frozen `VexAccessConfig` carrying the `SubjectMap` phantom for inference.
|
|
34
|
+
* @throws {VexAccessConfigError} When `userCollectionSlug` or `userRolesField` is
|
|
35
|
+
* empty, when a `customResources` key collides with a resource slug, or when a
|
|
36
|
+
* `customResources` entry declares an empty `actions` array. Also when a rule's
|
|
37
|
+
* recorded constraints are not an in-order prefix of a declared index or violate
|
|
38
|
+
* Convex's operator rule (see `validateAccessConstraints`), and when a
|
|
39
|
+
* `constraints` callback throws while being recorded — every rule's callback runs
|
|
40
|
+
* once here, at module load, so a rule that reached past its types surfaces as a
|
|
41
|
+
* config error naming the role, resource and action rather than as a bare
|
|
42
|
+
* `TypeError` from whichever method was missing.
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* export const access = defineAccess({
|
|
46
|
+
* roles: ["admin", "editor"],
|
|
47
|
+
* resources: [pages, users],
|
|
48
|
+
* customResources: { apiKeys: { actions: ["create", "revoke"] } },
|
|
49
|
+
* userCollectionSlug: "users",
|
|
50
|
+
* userRolesField: "roles",
|
|
51
|
+
* permissions: {
|
|
52
|
+
* admin: { [WILDCARD_KEY]: true },
|
|
53
|
+
* editor: { pages: { read: true, update: true }, apiKeys: false },
|
|
54
|
+
* },
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @see {@link VexAccessConfigInput} for the input type
|
|
59
|
+
* @see {@link VexAccessConfig} for the resolved return type
|
|
60
|
+
*/
|
|
61
|
+
export declare function defineAccess<const TRoles extends readonly string[], const TResources extends readonly AccessResource[], const TCustomResources extends Record<string, CustomResourceInput> = {}, const TUserSlug extends CollectionSlug = CollectionSlug, const TOrgSlug extends CollectionSlug | undefined = undefined, const TCustomActions extends Partial<Record<TResources[number]["slug"] | TUserSlug | Extract<TOrgSlug, string>, CustomActionsInput>> = {}>(props: VexAccessConfigInput<TRoles, TResources, TCustomResources, TUserSlug, TOrgSlug, TCustomActions>): VexAccessConfig<SubjectMap<TResources, TCustomResources, TUserSlug, TOrgSlug, TCustomActions>, TResources, TUserSlug, TOrgSlug, TCustomActions>;
|
|
62
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/access/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EACL,kBAAkB,EAElB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,YAAY,CAC1B,KAAK,CAAC,MAAM,SAAS,SAAS,MAAM,EAAE,EACtC,KAAK,CAAC,UAAU,SAAS,SAAS,cAAc,EAAE,EAClD,KAAK,CAAC,gBAAgB,SAAS,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,EAAE,EACvE,KAAK,CAAC,SAAS,SAAS,cAAc,GAAG,cAAc,EACvD,KAAK,CAAC,QAAQ,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAC7D,KAAK,CAAC,cAAc,SAAS,OAAO,CAClC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAC/F,GAAG,EAAE,EAEN,KAAK,EAAE,oBAAoB,CACzB,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,cAAc,CACf,GACA,eAAe,CAChB,UAAU,CAAC,UAAU,EAAE,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,CAAC,EAC7E,UAAU,EACV,SAAS,EACT,QAAQ,EACR,cAAc,CACf,CA4EA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRUD actions available on every resource subject (collections and globals).
|
|
3
|
+
*
|
|
4
|
+
* Draft actions ({@link DRAFT_ACTIONS}) are added conditionally when a resource
|
|
5
|
+
* declares `versions.drafts: true`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CRUD_ACTIONS: {
|
|
8
|
+
readonly create: "create";
|
|
9
|
+
readonly read: "read";
|
|
10
|
+
readonly update: "update";
|
|
11
|
+
readonly delete: "delete";
|
|
12
|
+
};
|
|
13
|
+
/** CRUD action union, derived from {@link CRUD_ACTIONS}. */
|
|
14
|
+
export type CrudAction = (typeof CRUD_ACTIONS)[keyof typeof CRUD_ACTIONS];
|
|
15
|
+
/**
|
|
16
|
+
* Draft workflow actions — present on a resource subject only when its config
|
|
17
|
+
* declares `versions.drafts: true` (globals today; collections with Spec 36).
|
|
18
|
+
*/
|
|
19
|
+
export declare const DRAFT_ACTIONS: {
|
|
20
|
+
readonly readDrafts: "readDrafts";
|
|
21
|
+
readonly saveDraft: "saveDraft";
|
|
22
|
+
readonly publish: "publish";
|
|
23
|
+
readonly unpublish: "unpublish";
|
|
24
|
+
};
|
|
25
|
+
/** Draft action union, derived from {@link DRAFT_ACTIONS}. */
|
|
26
|
+
export type DraftAction = (typeof DRAFT_ACTIONS)[keyof typeof DRAFT_ACTIONS];
|
|
27
|
+
/**
|
|
28
|
+
* Actions whose read shape is a query rather than a single-document check —
|
|
29
|
+
* the only actions an indexed `{ filter, withIndex }` permission check may
|
|
30
|
+
* target (design doc §3: `withIndex` on `create`/`update`/`delete` would
|
|
31
|
+
* narrow nothing, since those authorize one document, not a range).
|
|
32
|
+
*/
|
|
33
|
+
export declare const QUERY_ACTIONS: {
|
|
34
|
+
readonly read: "read";
|
|
35
|
+
readonly readDrafts: "readDrafts";
|
|
36
|
+
};
|
|
37
|
+
/** Query-shaped action union, derived from {@link QUERY_ACTIONS}. */
|
|
38
|
+
export type QueryAction = (typeof QUERY_ACTIONS)[keyof typeof QUERY_ACTIONS];
|
|
39
|
+
/**
|
|
40
|
+
* Field-mode object modes: `allow` = only the listed fields, `deny` = all but
|
|
41
|
+
* the listed fields.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PERMISSION_MODES: {
|
|
44
|
+
readonly allow: "allow";
|
|
45
|
+
readonly deny: "deny";
|
|
46
|
+
};
|
|
47
|
+
/** Field-mode object mode, derived from {@link PERMISSION_MODES}. */
|
|
48
|
+
export type PermissionMode = (typeof PERMISSION_MODES)[keyof typeof PERMISSION_MODES];
|
|
49
|
+
/**
|
|
50
|
+
* How `hasPermission` answers a *quantified* question: when no `data` is
|
|
51
|
+
* supplied and a role's check is a callback that needs the document, the scope
|
|
52
|
+
* decides what "yes" would even mean.
|
|
53
|
+
*
|
|
54
|
+
* - `doc` — "may they do this to THIS document?" `data` is required; a callback
|
|
55
|
+
* that needs it and does not get it throws {@link VexAccessError}. Opt into
|
|
56
|
+
* this in edit views and row actions, where a silent `false` would surface as
|
|
57
|
+
* a permanently disabled control and read like a misconfigured matrix.
|
|
58
|
+
* - `any` — "may they do this to AT LEAST ONE document?" Resolves such a callback
|
|
59
|
+
* to `true` without invoking it. Use for nav/sidebar/list gating; per-document
|
|
60
|
+
* filtering still happens downstream in `find`/`get`.
|
|
61
|
+
* - `all` (default) — "may they do this to EVERY document?" Resolves such a
|
|
62
|
+
* callback to `false`: a per-document condition cannot hold for all of them.
|
|
63
|
+
* Fail-closed, so omitting `scope` never throws and never over-permits.
|
|
64
|
+
*
|
|
65
|
+
* Static boolean checks are unaffected by scope, and any scope evaluates the
|
|
66
|
+
* callback normally once `data` is supplied.
|
|
67
|
+
*/
|
|
68
|
+
export declare const PERMISSION_SCOPES: {
|
|
69
|
+
readonly doc: "doc";
|
|
70
|
+
readonly any: "any";
|
|
71
|
+
readonly all: "all";
|
|
72
|
+
};
|
|
73
|
+
/** Permission evaluation scope, derived from {@link PERMISSION_SCOPES}. */
|
|
74
|
+
export type PermissionScope = (typeof PERMISSION_SCOPES)[keyof typeof PERMISSION_SCOPES];
|
|
75
|
+
/**
|
|
76
|
+
* Wildcard key usable at two matrix levels: role level (`admin: { [WILDCARD_KEY]:
|
|
77
|
+
* true }`, boolean only) and action level inside a per-action map (any
|
|
78
|
+
* `PermissionCheck`). Precedence: explicit action > subject wildcard > role
|
|
79
|
+
* wildcard > `defaults`.
|
|
80
|
+
*/
|
|
81
|
+
export declare const WILDCARD_KEY: "*";
|
|
82
|
+
/**
|
|
83
|
+
* Built-in non-resource subjects contributed by core. Every entry becomes a
|
|
84
|
+
* subject in the {@link SubjectMap} exactly like a user-declared custom
|
|
85
|
+
* resource (no data, no fields).
|
|
86
|
+
*/
|
|
87
|
+
export declare const ADMIN_CUSTOM_SUBJECTS: {
|
|
88
|
+
readonly adminPanel: {
|
|
89
|
+
readonly key: "adminPanel";
|
|
90
|
+
readonly actions: readonly ["access", "impersonate"];
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/** Union of built-in subject slugs (currently `"adminPanel"`). */
|
|
94
|
+
export type AdminCustomSubjectSlug = keyof typeof ADMIN_CUSTOM_SUBJECTS;
|
|
95
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/access/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AACX,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AACX,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AACX,qEAAqE;AACrE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AACX,qEAAqE;AACrE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAEtF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AACX,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAG,GAAY,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,kEAAkE;AAClE,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,qBAAqB,CAAC"}
|