@toolproof-npm/shared 0.1.37 → 0.1.39

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.
@@ -45,11 +45,10 @@ export declare const CONSTANTS: {
45
45
  readonly GraphRunWorkflow: "GraphRunWorkflow";
46
46
  };
47
47
  readonly SPECIALS: {
48
- readonly FORMAT_ApplicationPrimitive: "FORMAT-ApplicationPrimitive";
49
48
  readonly FORMAT_ApplicationJson: "FORMAT-ApplicationJson";
50
49
  readonly FORMAT_ApplicationJob: "FORMAT-ApplicationJob";
51
50
  readonly TYPE_Boolean: "TYPE-Boolean";
52
- readonly TYPE_Integer: "TYPE-Integer";
51
+ readonly TYPE_Natural: "TYPE-Natural";
53
52
  readonly TYPE_Job: "TYPE-Job";
54
53
  readonly TYPE_WorkflowSpec: "TYPE-WorkflowSpec";
55
54
  readonly ROLE_BUILDER: "ROLE-Builder";
@@ -58,6 +57,6 @@ export declare const CONSTANTS: {
58
57
  readonly BOOLEAN_true: "RESOURCE-FHycY5TxwEBngKVhkv2j";
59
58
  };
60
59
  readonly TESTING: {
61
- readonly Integer_Zero: "TYPE-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81";
60
+ readonly Natural_Zero: "TYPE-Natural/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81";
62
61
  };
63
62
  };
package/dist/constants.js CHANGED
@@ -45,11 +45,10 @@ export const CONSTANTS = {
45
45
  GraphRunWorkflow: 'GraphRunWorkflow',
46
46
  },
47
47
  SPECIALS: {
48
- FORMAT_ApplicationPrimitive: 'FORMAT-ApplicationPrimitive',
49
48
  FORMAT_ApplicationJson: 'FORMAT-ApplicationJson',
50
49
  FORMAT_ApplicationJob: 'FORMAT-ApplicationJob',
51
50
  TYPE_Boolean: 'TYPE-Boolean',
52
- TYPE_Integer: 'TYPE-Integer',
51
+ TYPE_Natural: 'TYPE-Natural',
53
52
  TYPE_Job: 'TYPE-Job',
54
53
  TYPE_WorkflowSpec: 'TYPE-WorkflowSpec',
55
54
  ROLE_BUILDER: 'ROLE-Builder',
@@ -58,6 +57,6 @@ export const CONSTANTS = {
58
57
  BOOLEAN_true: 'RESOURCE-FHycY5TxwEBngKVhkv2j',
59
58
  },
60
59
  TESTING: {
61
- Integer_Zero: 'TYPE-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81',
60
+ Natural_Zero: 'TYPE-Natural/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81',
62
61
  }
63
62
  };
@@ -1,7 +1,7 @@
1
1
  import type { ResourceTypeIdJson } from '@toolproof-npm/schema';
2
- import type { FilterConst, ResourceShapeConst, ResourceRoleConst, StepConst, WorkflowConst, ShapesMeta, ShapesData, ShapesMetaMap, ShapesDataMap, ResourceMetaMap, ResourceDataMap, ResourceConst } from './types.d.ts';
2
+ import type { FilterConst, ResourceShapeConst, ResourceRoleConst, StepConst, WorkflowConst, ShapesMeta, ShapesData, ShapesMetaMap, ShapesDataMap, ResourceRawMetaMap, ResourceDataMap, ResourceConst } from './types.d.ts';
3
3
  export declare function getNewId(identifiable: ResourceShapeConst | ResourceRoleConst | ResourceConst | StepConst | WorkflowConst): string;
4
4
  export declare function listResourceShapesMeta<T extends ShapesMeta>(groupKey: ResourceShapeConst, filterConfig: Record<FilterConst, boolean>): Promise<ShapesMetaMap<T>>;
5
- export declare function listResourcesMeta(resourceTypeIds: ResourceTypeIdJson[]): Promise<ResourceMetaMap>;
5
+ export declare function listResourcesRawMeta(resourceTypeIds: ResourceTypeIdJson[]): Promise<ResourceRawMetaMap>;
6
6
  export declare function listResourceShapesData<T extends ShapesData>(groupKey: ResourceShapeConst, filterConfig: Record<FilterConst, boolean>): Promise<ShapesDataMap<T>>;
7
7
  export declare function listResourcesData(resourceTypeIds: ResourceTypeIdJson[]): Promise<ResourceDataMap>;
@@ -28,7 +28,7 @@ export async function listResourceShapesMeta(groupKey, filterConfig) {
28
28
  const [members, specials] = entries;
29
29
  return { members, specials };
30
30
  }
31
- export async function listResourcesMeta(resourceTypeIds) {
31
+ export async function listResourcesRawMeta(resourceTypeIds) {
32
32
  const collectionName = CONSTANTS.STORAGE.COLLECTIONS.resources;
33
33
  const entries = await Promise.all(resourceTypeIds.map(async (resourceTypeId) => {
34
34
  const snap = await dbAdmin
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ResourceIdJson, ExecutionIdJson, ResourceRoleIdJson, ResourceRoleValueJson, ResourceTypeIdJson, ResourceFormatMetaJson, ResourceFormatDataJson, ResourceTypeMetaJson, ResourceTypeDataJson, ResourceMetaJson, ResourceDataJson } from '@toolproof-npm/schema';
1
+ import type { ResourceIdJson, ExecutionIdJson, ResourceRoleIdJson, ResourceRoleValueJson, ResourceTypeIdJson, ResourceFormatMetaJson, ResourceFormatDataJson, ResourceTypeMetaJson, ResourceTypeDataJson, ResourceRawMetaJson, 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
4
  export type CollectionConst = typeof CONSTANTS.STORAGE.COLLECTIONS.shapes | typeof CONSTANTS.STORAGE.COLLECTIONS.resources;
@@ -15,7 +15,7 @@ export type ShapesData = ResourceFormatDataJson | ResourceTypeDataJson;
15
15
  export type ShapesMeta = ResourceFormatMetaJson | ResourceTypeMetaJson;
16
16
  export type ShapesDataMap<T extends ShapesData> = Record<FilterConst, T[]>;
17
17
  export type ShapesMetaMap<T extends ShapesMeta> = Record<FilterConst, T[]>;
18
- export type ResourceMetaMap = Record<ResourceTypeIdJson, ResourceMetaJson[]>;
18
+ export type ResourceRawMetaMap = Record<ResourceTypeIdJson, ResourceRawMetaJson[]>;
19
19
  export type ResourceDataMap = Record<ResourceTypeIdJson, ResourceDataJson[]>;
20
20
  export type ExternallyProvidedResourceMeta = {
21
21
  id: ResourceIdJson;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/shared",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "Core library utilities for ToolProof",
5
5
  "keywords": [
6
6
  "toolproof",
@@ -12,7 +12,7 @@
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/ToolProof/core.git",
15
- "directory": "packages/_lib"
15
+ "directory": "packages/shared"
16
16
  },
17
17
  "homepage": "https://github.com/ToolProof/core#readme",
18
18
  "bugs": {
@@ -52,7 +52,7 @@
52
52
  "typescript": "^5.9.3"
53
53
  },
54
54
  "dependencies": {
55
- "@toolproof-npm/schema": "^0.1.32",
55
+ "@toolproof-npm/schema": "^0.1.33",
56
56
  "firebase-admin": "^13.6.0"
57
57
  },
58
58
  "scripts": {