@toolproof-npm/shared 0.1.36 → 0.1.37
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/dist/constants.d.ts +3 -3
- package/dist/constants.js +3 -3
- package/dist/firebaseAdminHelpers.js +2 -2
- package/dist/types.d.ts +3 -3
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare const CONSTANTS: {
|
|
|
11
11
|
readonly tp_resources: "tp-resources";
|
|
12
12
|
};
|
|
13
13
|
readonly COLLECTIONS: {
|
|
14
|
-
readonly
|
|
14
|
+
readonly shapes: "shapes";
|
|
15
15
|
readonly resources: "resources";
|
|
16
16
|
};
|
|
17
17
|
readonly FILTER: {
|
|
@@ -19,11 +19,11 @@ export declare const CONSTANTS: {
|
|
|
19
19
|
readonly specials: "specials";
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
readonly
|
|
22
|
+
readonly SHAPES: {
|
|
23
23
|
readonly formats: "formats";
|
|
24
24
|
readonly types: "types";
|
|
25
25
|
};
|
|
26
|
-
readonly
|
|
26
|
+
readonly ROLES: {
|
|
27
27
|
readonly roles: "roles";
|
|
28
28
|
};
|
|
29
29
|
readonly RESOURCES: {
|
package/dist/constants.js
CHANGED
|
@@ -11,7 +11,7 @@ export const CONSTANTS = {
|
|
|
11
11
|
tp_resources: 'tp-resources',
|
|
12
12
|
},
|
|
13
13
|
COLLECTIONS: {
|
|
14
|
-
|
|
14
|
+
shapes: 'shapes',
|
|
15
15
|
resources: 'resources',
|
|
16
16
|
},
|
|
17
17
|
FILTER: {
|
|
@@ -19,11 +19,11 @@ export const CONSTANTS = {
|
|
|
19
19
|
specials: 'specials',
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
SHAPES: {
|
|
23
23
|
formats: 'formats',
|
|
24
24
|
types: 'types',
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
ROLES: {
|
|
27
27
|
roles: 'roles',
|
|
28
28
|
},
|
|
29
29
|
RESOURCES: {
|
|
@@ -4,12 +4,12 @@ export function getNewId(identifiable) {
|
|
|
4
4
|
const base = identifiable.toUpperCase();
|
|
5
5
|
const normalized = base.endsWith('S') ? base.slice(0, -1) : base;
|
|
6
6
|
const prefix = normalized + '-';
|
|
7
|
-
const docRef = dbAdmin.collection(CONSTANTS.STORAGE.COLLECTIONS.
|
|
7
|
+
const docRef = dbAdmin.collection(CONSTANTS.STORAGE.COLLECTIONS.shapes).doc(identifiable).collection(CONSTANTS.STORAGE.FILTER.members).doc();
|
|
8
8
|
return prefix + docRef.id;
|
|
9
9
|
}
|
|
10
10
|
export async function listResourceShapesMeta(groupKey, filterConfig) {
|
|
11
11
|
const baseRef = dbAdmin
|
|
12
|
-
.collection(CONSTANTS.STORAGE.COLLECTIONS.
|
|
12
|
+
.collection(CONSTANTS.STORAGE.COLLECTIONS.shapes)
|
|
13
13
|
.doc(groupKey);
|
|
14
14
|
const entries = await Promise.all([
|
|
15
15
|
filterConfig.members
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ResourceIdJson, ExecutionIdJson, ResourceRoleIdJson, ResourceRoleValueJson, ResourceTypeIdJson, ResourceFormatMetaJson, ResourceFormatDataJson, ResourceTypeMetaJson, ResourceTypeDataJson, ResourceMetaJson, ResourceDataJson } from '@toolproof-npm/schema';
|
|
2
2
|
import { CONSTANTS } from './constants.js';
|
|
3
3
|
export type BucketConst = typeof CONSTANTS.STORAGE.BUCKETS.tp_shapes | typeof CONSTANTS.STORAGE.BUCKETS.tp_resources;
|
|
4
|
-
export type CollectionConst = typeof CONSTANTS.STORAGE.COLLECTIONS.
|
|
4
|
+
export type CollectionConst = typeof CONSTANTS.STORAGE.COLLECTIONS.shapes | typeof CONSTANTS.STORAGE.COLLECTIONS.resources;
|
|
5
5
|
export type FilterConst = typeof CONSTANTS.STORAGE.FILTER.members | typeof CONSTANTS.STORAGE.FILTER.specials;
|
|
6
|
-
export type ResourceShapeConst = typeof CONSTANTS.
|
|
7
|
-
export type ResourceRoleConst = typeof CONSTANTS.
|
|
6
|
+
export type ResourceShapeConst = typeof CONSTANTS.SHAPES.formats | typeof CONSTANTS.SHAPES.types;
|
|
7
|
+
export type ResourceRoleConst = typeof CONSTANTS.ROLES.roles;
|
|
8
8
|
export type ResourceConst = typeof CONSTANTS.RESOURCES.resources;
|
|
9
9
|
export type StepConst = typeof CONSTANTS.STEP.work | typeof CONSTANTS.STEP.branch | typeof CONSTANTS.STEP.while | typeof CONSTANTS.STEP.for;
|
|
10
10
|
export type WorkflowConst = typeof CONSTANTS.WORKFLOW.workflow | typeof CONSTANTS.WORKFLOW.workflowSpec | typeof CONSTANTS.WORKFLOW.execution;
|