@toolproof-npm/shared 0.1.35 → 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 +12 -12
- package/dist/constants.js +12 -12
- package/dist/firebaseAdminHelpers.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +3 -3
- package/package.json +2 -2
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: {
|
|
@@ -45,19 +45,19 @@ export declare const CONSTANTS: {
|
|
|
45
45
|
readonly GraphRunWorkflow: "GraphRunWorkflow";
|
|
46
46
|
};
|
|
47
47
|
readonly SPECIALS: {
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
48
|
+
readonly FORMAT_ApplicationPrimitive: "FORMAT-ApplicationPrimitive";
|
|
49
|
+
readonly FORMAT_ApplicationJson: "FORMAT-ApplicationJson";
|
|
50
|
+
readonly FORMAT_ApplicationJob: "FORMAT-ApplicationJob";
|
|
51
|
+
readonly TYPE_Boolean: "TYPE-Boolean";
|
|
52
|
+
readonly TYPE_Integer: "TYPE-Integer";
|
|
53
|
+
readonly TYPE_Job: "TYPE-Job";
|
|
54
|
+
readonly TYPE_WorkflowSpec: "TYPE-WorkflowSpec";
|
|
55
|
+
readonly ROLE_BUILDER: "ROLE-Builder";
|
|
56
56
|
readonly JOB_Engine: "JOB-Engine";
|
|
57
57
|
readonly BOOLEAN_false: "RESOURCE-c2kAldyzgNhLdF79p0Vt";
|
|
58
58
|
readonly BOOLEAN_true: "RESOURCE-FHycY5TxwEBngKVhkv2j";
|
|
59
59
|
};
|
|
60
60
|
readonly TESTING: {
|
|
61
|
-
readonly Integer_Zero: "
|
|
61
|
+
readonly Integer_Zero: "TYPE-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81";
|
|
62
62
|
};
|
|
63
63
|
};
|
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: {
|
|
@@ -45,19 +45,19 @@ export const CONSTANTS = {
|
|
|
45
45
|
GraphRunWorkflow: 'GraphRunWorkflow',
|
|
46
46
|
},
|
|
47
47
|
SPECIALS: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
FORMAT_ApplicationPrimitive: 'FORMAT-ApplicationPrimitive',
|
|
49
|
+
FORMAT_ApplicationJson: 'FORMAT-ApplicationJson',
|
|
50
|
+
FORMAT_ApplicationJob: 'FORMAT-ApplicationJob',
|
|
51
|
+
TYPE_Boolean: 'TYPE-Boolean',
|
|
52
|
+
TYPE_Integer: 'TYPE-Integer',
|
|
53
|
+
TYPE_Job: 'TYPE-Job',
|
|
54
|
+
TYPE_WorkflowSpec: 'TYPE-WorkflowSpec',
|
|
55
|
+
ROLE_BUILDER: 'ROLE-Builder',
|
|
56
56
|
JOB_Engine: 'JOB-Engine',
|
|
57
57
|
BOOLEAN_false: 'RESOURCE-c2kAldyzgNhLdF79p0Vt',
|
|
58
58
|
BOOLEAN_true: 'RESOURCE-FHycY5TxwEBngKVhkv2j',
|
|
59
59
|
},
|
|
60
60
|
TESTING: {
|
|
61
|
-
Integer_Zero: '
|
|
61
|
+
Integer_Zero: 'TYPE-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81',
|
|
62
62
|
}
|
|
63
63
|
};
|
|
@@ -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/index.d.ts
CHANGED
package/dist/index.js
CHANGED
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolproof-npm/shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"description": "Core library utilities for ToolProof",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"toolproof",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"typescript": "^5.9.3"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@toolproof-npm/schema": "^0.1.
|
|
55
|
+
"@toolproof-npm/schema": "^0.1.32",
|
|
56
56
|
"firebase-admin": "^13.6.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|