@toolproof-npm/shared 0.1.30 → 0.1.32

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/README.md CHANGED
@@ -1,56 +1,56 @@
1
- # @toolproof-npm/shared
2
-
3
- Core library utilities for ToolProof.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pnpm add @toolproof-npm/shared
9
- # or
10
- npm install @toolproof-npm/shared
11
- # or
12
- yarn add @toolproof-npm/shared
13
- ```
14
-
15
- ## Usage
16
-
17
- ### Basic Import
18
-
19
- ```typescript
20
- import { /* your exports */ } from '@toolproof-npm/shared';
21
- ```
22
-
23
- ### Constants
24
-
25
- ```typescript
26
- import { /* constants */ } from '@toolproof-npm/shared/constants';
27
- ```
28
-
29
- ### Types
30
-
31
- ```typescript
32
- import { /* types */ } from '@toolproof-npm/shared/types';
33
- ```
34
-
35
- ### Server Utilities (Node.js only)
36
-
37
- ```typescript
38
- import { /* server utilities */ } from '@toolproof-npm/shared/server';
39
- ```
40
-
41
- ## Features
42
-
43
- - TypeScript support with full type definitions
44
- - ESM module format
45
- - Tree-shakeable exports
46
- - Server-side utilities for Firestore admin operations
47
-
48
- ## Requirements
49
-
50
- - Node.js 16+
51
- - TypeScript 4.5+ (for TypeScript projects)
52
-
53
- ## License
54
-
55
- MIT
56
-
1
+ # @toolproof-npm/shared
2
+
3
+ Core library utilities for ToolProof.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @toolproof-npm/shared
9
+ # or
10
+ npm install @toolproof-npm/shared
11
+ # or
12
+ yarn add @toolproof-npm/shared
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Basic Import
18
+
19
+ ```typescript
20
+ import { /* your exports */ } from '@toolproof-npm/shared';
21
+ ```
22
+
23
+ ### Constants
24
+
25
+ ```typescript
26
+ import { /* constants */ } from '@toolproof-npm/shared/constants';
27
+ ```
28
+
29
+ ### Types
30
+
31
+ ```typescript
32
+ import { /* types */ } from '@toolproof-npm/shared/types';
33
+ ```
34
+
35
+ ### Server Utilities (Node.js only)
36
+
37
+ ```typescript
38
+ import { /* server utilities */ } from '@toolproof-npm/shared/server';
39
+ ```
40
+
41
+ ## Features
42
+
43
+ - TypeScript support with full type definitions
44
+ - ESM module format
45
+ - Tree-shakeable exports
46
+ - Server-side utilities for Firestore admin operations
47
+
48
+ ## Requirements
49
+
50
+ - Node.js 16+
51
+ - TypeScript 4.5+ (for TypeScript projects)
52
+
53
+ ## License
54
+
55
+ MIT
56
+
@@ -1,17 +1,17 @@
1
1
  export declare const CONSTANTS: {
2
2
  readonly SCHEMA: {
3
- readonly FormatData: "FormatData";
4
- readonly TypeData: "TypeData";
3
+ readonly ResourceFormatData: "ResourceFormatData";
4
+ readonly ResourceTypeData: "ResourceTypeData";
5
5
  readonly Execution: "Execution";
6
6
  readonly ResourceMap: "ResourceMap";
7
7
  };
8
8
  readonly STORAGE: {
9
9
  readonly BUCKETS: {
10
- readonly tp_archetypes: "tp-archetypes";
10
+ readonly tp_resourceshapes: "tp-resourceshapes";
11
11
  readonly tp_resources: "tp-resources";
12
12
  };
13
13
  readonly COLLECTIONS: {
14
- readonly archetypes: "archetypes";
14
+ readonly resourceshapes: "resourceshapes";
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 ARCHETYPES: {
22
+ readonly RESOURCESHAPES: {
23
23
  readonly formats: "formats";
24
24
  readonly types: "types";
25
25
  };
26
- readonly ARCHETYPES_PSEUDO: {
26
+ readonly RESOURCESHAPES_PSEUDO: {
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 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";
48
+ readonly RF_ApplicationPrimitive: "RF-ApplicationPrimitive";
49
+ readonly RF_ApplicationJson: "RF-ApplicationJson";
50
+ readonly RF_ApplicationJob: "RF-ApplicationJob";
51
+ readonly RT_Boolean: "RT-Boolean";
52
+ readonly RT_Integer: "RT-Integer";
53
+ readonly RT_Job: "RT-Job";
54
+ readonly RT_WorkflowSpec: "RT-WorkflowSpec";
55
+ readonly RR_BUILDER: "RR-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: "TYPE-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81";
61
+ readonly Integer_Zero: "RT-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81";
62
62
  };
63
63
  };
package/dist/constants.js CHANGED
@@ -1,17 +1,17 @@
1
1
  export const CONSTANTS = {
2
2
  SCHEMA: {
3
- FormatData: 'FormatData',
4
- TypeData: 'TypeData',
3
+ ResourceFormatData: 'ResourceFormatData',
4
+ ResourceTypeData: 'ResourceTypeData',
5
5
  Execution: 'Execution',
6
6
  ResourceMap: 'ResourceMap',
7
7
  },
8
8
  STORAGE: {
9
9
  BUCKETS: {
10
- tp_archetypes: 'tp-archetypes',
10
+ tp_resourceshapes: 'tp-resourceshapes',
11
11
  tp_resources: 'tp-resources',
12
12
  },
13
13
  COLLECTIONS: {
14
- archetypes: 'archetypes',
14
+ resourceshapes: 'resourceshapes',
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
- ARCHETYPES: {
22
+ RESOURCESHAPES: {
23
23
  formats: 'formats',
24
24
  types: 'types',
25
25
  },
26
- ARCHETYPES_PSEUDO: {
26
+ RESOURCESHAPES_PSEUDO: {
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
- 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',
48
+ RF_ApplicationPrimitive: 'RF-ApplicationPrimitive',
49
+ RF_ApplicationJson: 'RF-ApplicationJson',
50
+ RF_ApplicationJob: 'RF-ApplicationJob',
51
+ RT_Boolean: 'RT-Boolean',
52
+ RT_Integer: 'RT-Integer',
53
+ RT_Job: 'RT-Job',
54
+ RT_WorkflowSpec: 'RT-WorkflowSpec',
55
+ RR_BUILDER: 'RR-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: 'TYPE-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81',
61
+ Integer_Zero: 'RT-Integer/3335e31095a13a9a2b0ea41ca7d92a458780cd5671dc0a440a72cc1b1c4f2c81',
62
62
  }
63
63
  };
@@ -0,0 +1,7 @@
1
+ import type { ResourceTypeIdJson } from '@toolproof-npm/schema';
2
+ import type { FilterConst, ResourceShapeConst, RoleConst, StepConst, WorkflowConst, ArcheresourceTypeMeta, ArcheresourceTypeData, ArcheresourceTypeMetaMap, ArcheresourceTypeDataMap, ResourceMetaMap, ResourceDataMap, ResourceConst } from './types.d.ts';
3
+ export declare function getNewId(identifiable: ResourceShapeConst | RoleConst | ResourceConst | StepConst | WorkflowConst): string;
4
+ export declare function listResourceShapesMeta<T extends ArcheresourceTypeMeta>(groupKey: ResourceShapeConst, filterConfig: Record<FilterConst, boolean>): Promise<ArcheresourceTypeMetaMap<T>>;
5
+ export declare function listResourcesMeta(resourceTypeIds: ResourceTypeIdJson[]): Promise<ResourceMetaMap>;
6
+ export declare function listResourceShapesData<T extends ArcheresourceTypeData>(groupKey: ResourceShapeConst, filterConfig: Record<FilterConst, boolean>): Promise<ArcheresourceTypeDataMap<T>>;
7
+ export declare function listResourcesData(resourceTypeIds: ResourceTypeIdJson[]): Promise<ResourceDataMap>;
@@ -1,15 +1,15 @@
1
1
  import { CONSTANTS } from './constants.js';
2
- import { dbAdmin, storageAdmin } from "./firestoreAdminInit.js";
2
+ import { dbAdmin, storageAdmin } from "./firebaseAdminInit.js";
3
3
  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.archetypes).doc(identifiable).collection(CONSTANTS.STORAGE.FILTER.members).doc();
7
+ const docRef = dbAdmin.collection(CONSTANTS.STORAGE.COLLECTIONS.resourceshapes).doc(identifiable).collection(CONSTANTS.STORAGE.FILTER.members).doc();
8
8
  return prefix + docRef.id;
9
9
  }
10
- export async function listArchetypesMeta(groupKey, filterConfig) {
10
+ export async function listResourceShapesMeta(groupKey, filterConfig) {
11
11
  const baseRef = dbAdmin
12
- .collection(CONSTANTS.STORAGE.COLLECTIONS.archetypes)
12
+ .collection(CONSTANTS.STORAGE.COLLECTIONS.resourceshapes)
13
13
  .doc(groupKey);
14
14
  const entries = await Promise.all([
15
15
  filterConfig.members
@@ -28,12 +28,12 @@ export async function listArchetypesMeta(groupKey, filterConfig) {
28
28
  const [members, specials] = entries;
29
29
  return { members, specials };
30
30
  }
31
- export async function listResourcesMeta(typeIds) {
31
+ export async function listResourcesMeta(resourceTypeIds) {
32
32
  const collectionName = CONSTANTS.STORAGE.COLLECTIONS.resources;
33
- const entries = await Promise.all(typeIds.map(async (typeId) => {
33
+ const entries = await Promise.all(resourceTypeIds.map(async (resourceTypeId) => {
34
34
  const snap = await dbAdmin
35
35
  .collection(collectionName)
36
- .doc(typeId)
36
+ .doc(resourceTypeId)
37
37
  .collection(CONSTANTS.STORAGE.FILTER.members)
38
38
  .get();
39
39
  const items = snap.docs.map(d => {
@@ -41,12 +41,12 @@ export async function listResourcesMeta(typeIds) {
41
41
  // Ensure id field is present (doc id is the resourceId)
42
42
  return { ...data, id: d.id };
43
43
  });
44
- return [typeId, items];
44
+ return [resourceTypeId, items];
45
45
  }));
46
46
  return Object.fromEntries(entries);
47
47
  }
48
- export async function listArchetypesData(groupKey, filterConfig) {
49
- const bucket = storageAdmin.bucket(CONSTANTS.STORAGE.BUCKETS.tp_archetypes);
48
+ export async function listResourceShapesData(groupKey, filterConfig) {
49
+ const bucket = storageAdmin.bucket(CONSTANTS.STORAGE.BUCKETS.tp_resourceshapes);
50
50
  const prefix = `${groupKey}/`;
51
51
  const [files] = await bucket.getFiles({ prefix });
52
52
  const result = {
@@ -70,10 +70,10 @@ export async function listArchetypesData(groupKey, filterConfig) {
70
70
  await Promise.all(tasks);
71
71
  return result;
72
72
  }
73
- export async function listResourcesData(typeIds) {
73
+ export async function listResourcesData(resourceTypeIds) {
74
74
  const bucket = storageAdmin.bucket(CONSTANTS.STORAGE.BUCKETS.tp_resources);
75
- async function fetchFilesUnder(typeId) {
76
- const prefix = `${typeId}/`;
75
+ async function fetchFilesUnder(resourceTypeId) {
76
+ const prefix = `${resourceTypeId}/`;
77
77
  const [found] = await bucket.getFiles({ prefix });
78
78
  const files = found.filter(f => {
79
79
  const name = f.name || '';
@@ -96,8 +96,8 @@ export async function listResourcesData(typeIds) {
96
96
  }));
97
97
  return items.filter(Boolean);
98
98
  }
99
- const entries = await Promise.all(typeIds.map(async (typeId) => {
100
- const rows = await fetchFilesUnder(typeId);
99
+ const entries = await Promise.all(resourceTypeIds.map(async (resourceTypeId) => {
100
+ const rows = await fetchFilesUnder(resourceTypeId);
101
101
  const items = rows.map(({ data, meta, name }) => {
102
102
  const flat = meta?.metadata ?? {};
103
103
  // Reconstruct nested object from flattened keys (dot and array index notation)
@@ -153,17 +153,17 @@ export async function listResourcesData(typeIds) {
153
153
  }
154
154
  }
155
155
  const idMeta = root.id;
156
- const typeIdMeta = root.typeId;
157
- // creationContext may be flattened as creationContext.roleId or direct roleId
158
- const roleId = (root.creationContext?.roleId ?? root.roleId);
156
+ const resourceTypeIdMeta = root.resourceTypeId;
157
+ // creationContext may be flattened as creationContext.resourceRoleId or direct resourceRoleId
158
+ const resourceRoleId = (root.creationContext?.resourceRoleId ?? root.resourceRoleId);
159
159
  const executionId = (root.creationContext?.executionId ?? root.executionId);
160
160
  const kind = root.kind;
161
161
  const path = root.path;
162
162
  const timestamp = root.timestamp;
163
163
  const missing = [
164
164
  ['id', idMeta],
165
- ['typeId', typeIdMeta],
166
- ['roleId', roleId],
165
+ ['resourceTypeId', resourceTypeIdMeta],
166
+ ['resourceRoleId', resourceRoleId],
167
167
  ['executionId', executionId],
168
168
  ['kind', kind],
169
169
  ['path', path],
@@ -175,9 +175,9 @@ export async function listResourcesData(typeIds) {
175
175
  }
176
176
  return {
177
177
  id: idMeta,
178
- typeId: typeIdMeta,
178
+ resourceTypeId: resourceTypeIdMeta,
179
179
  creationContext: {
180
- roleId: roleId,
180
+ resourceRoleId: resourceRoleId,
181
181
  executionId: executionId,
182
182
  },
183
183
  kind: kind,
@@ -186,7 +186,7 @@ export async function listResourcesData(typeIds) {
186
186
  extractedData: data,
187
187
  };
188
188
  });
189
- return [typeId, items];
189
+ return [resourceTypeId, items];
190
190
  }));
191
191
  return Object.fromEntries(entries);
192
192
  }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * as CONSTANTS from './constants.js';
2
- export * as TYPES from './types.js';
3
- export * from './firestoreAdminHelpers.js';
2
+ export * as RTS from './types.js';
3
+ export * from './firebaseAdminHelpers.js';
4
+ export * from './firebaseAdminInit.js';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * as CONSTANTS from './constants.js';
2
- export * as TYPES from './types.js';
3
- export * from './firestoreAdminHelpers.js';
2
+ export * as RTS from './types.js';
3
+ export * from './firebaseAdminHelpers.js';
4
+ export * from './firebaseAdminInit.js';
package/dist/types.d.ts CHANGED
@@ -1,27 +1,27 @@
1
- import type { ResourceIdJson, ExecutionIdJson, RoleIdJson, RoleLiteralJson, TypeIdJson, FormatMetaJson, FormatDataJson, TypeMetaJson, TypeDataJson, ResourceMetaJson, ResourceDataJson } from '@toolproof-npm/schema';
1
+ import type { ResourceIdJson, ExecutionIdJson, ResourceRoleIdJson, RoleLiteralJson, ResourceTypeIdJson, ResourceFormatMetaJson, ResourceFormatDataJson, ResourceTypeMetaJson, ResourceTypeDataJson, ResourceMetaJson, ResourceDataJson } from '@toolproof-npm/schema';
2
2
  import { CONSTANTS } from './constants.js';
3
- export type BucketConst = typeof CONSTANTS.STORAGE.BUCKETS.tp_archetypes | typeof CONSTANTS.STORAGE.BUCKETS.tp_resources;
4
- export type CollectionConst = typeof CONSTANTS.STORAGE.COLLECTIONS.archetypes | typeof CONSTANTS.STORAGE.COLLECTIONS.resources;
3
+ export type BucketConst = typeof CONSTANTS.STORAGE.BUCKETS.tp_resourceshapes | typeof CONSTANTS.STORAGE.BUCKETS.tp_resources;
4
+ export type CollectionConst = typeof CONSTANTS.STORAGE.COLLECTIONS.resourceshapes | typeof CONSTANTS.STORAGE.COLLECTIONS.resources;
5
5
  export type FilterConst = typeof CONSTANTS.STORAGE.FILTER.members | typeof CONSTANTS.STORAGE.FILTER.specials;
6
- export type ArchetypeConst = typeof CONSTANTS.ARCHETYPES.formats | typeof CONSTANTS.ARCHETYPES.types;
7
- export type RoleConst = typeof CONSTANTS.ARCHETYPES_PSEUDO.roles;
6
+ export type ResourceShapeConst = typeof CONSTANTS.RESOURCESHAPES.formats | typeof CONSTANTS.RESOURCESHAPES.types;
7
+ export type RoleConst = typeof CONSTANTS.RESOURCESHAPES_PSEUDO.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;
11
11
  export type Role = {
12
- id: RoleIdJson;
12
+ id: ResourceRoleIdJson;
13
13
  } & RoleLiteralJson;
14
- export type ArchetypeData = FormatDataJson | TypeDataJson;
15
- export type ArchetypeMeta = FormatMetaJson | TypeMetaJson;
16
- export type ArchetypeDataMap<T extends ArchetypeData> = Record<FilterConst, T[]>;
17
- export type ArchetypeMetaMap<T extends ArchetypeMeta> = Record<FilterConst, T[]>;
18
- export type ResourceMetaMap = Record<TypeIdJson, ResourceMetaJson[]>;
19
- export type ResourceDataMap = Record<TypeIdJson, ResourceDataJson[]>;
14
+ export type ArcheresourceTypeData = ResourceFormatDataJson | ResourceTypeDataJson;
15
+ export type ArcheresourceTypeMeta = ResourceFormatMetaJson | ResourceTypeMetaJson;
16
+ export type ArcheresourceTypeDataMap<T extends ArcheresourceTypeData> = Record<FilterConst, T[]>;
17
+ export type ArcheresourceTypeMetaMap<T extends ArcheresourceTypeMeta> = Record<FilterConst, T[]>;
18
+ export type ResourceMetaMap = Record<ResourceTypeIdJson, ResourceMetaJson[]>;
19
+ export type ResourceDataMap = Record<ResourceTypeIdJson, ResourceDataJson[]>;
20
20
  export type ExternallyProvidedResourceMeta = {
21
21
  id: ResourceIdJson;
22
- typeId: TypeIdJson;
22
+ resourceTypeId: ResourceTypeIdJson;
23
23
  creationContext: {
24
- roleId: RoleIdJson;
24
+ resourceRoleId: ResourceRoleIdJson;
25
25
  executionId: ExecutionIdJson;
26
26
  };
27
27
  };
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
1
  {
2
- "name": "@toolproof-npm/shared",
3
- "version": "0.1.30",
4
- "description": "Core library utilities for ToolProof",
5
- "keywords": [
6
- "toolproof",
7
- "utilities",
8
- "library"
9
- ],
10
- "author": "ToolProof Team",
11
- "license": "MIT",
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/ToolProof/core.git",
15
- "directory": "packages/_lib"
2
+ "name": "@toolproof-npm/shared",
3
+ "version": "0.1.32",
4
+ "description": "Core library utilities for ToolProof",
5
+ "keywords": [
6
+ "toolproof",
7
+ "utilities",
8
+ "library"
9
+ ],
10
+ "author": "ToolProof Team",
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/ToolProof/core.git",
15
+ "directory": "packages/_lib"
16
+ },
17
+ "homepage": "https://github.com/ToolProof/core#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/ToolProof/core/issues"
20
+ },
21
+ "type": "module",
22
+ "main": "dist/index.js",
23
+ "types": "dist/index.d.ts",
24
+ "sideEffects": false,
25
+ "exports": {
26
+ ".": {
27
+ "import": "./dist/index.js",
28
+ "types": "./dist/index.d.ts"
16
29
  },
17
- "homepage": "https://github.com/ToolProof/core#readme",
18
- "bugs": {
19
- "url": "https://github.com/ToolProof/core/issues"
30
+ "./constants": {
31
+ "import": "./dist/constants.js",
32
+ "types": "./dist/constants.d.ts"
20
33
  },
21
- "type": "module",
22
- "main": "dist/index.js",
23
- "types": "dist/index.d.ts",
24
- "sideEffects": false,
25
- "exports": {
26
- ".": {
27
- "import": "./dist/index.js",
28
- "types": "./dist/index.d.ts"
29
- },
30
- "./constants": {
31
- "import": "./dist/constants.js",
32
- "types": "./dist/constants.d.ts"
33
- },
34
- "./types": {
35
- "import": "./dist/types.js",
36
- "types": "./dist/types.d.ts"
37
- },
38
- "./server": {
39
- "node": "./dist/firestoreAdminHelpers.js",
40
- "types": "./dist/firestoreAdminHelpers.d.ts"
41
- }
34
+ "./types": {
35
+ "import": "./dist/types.js",
36
+ "types": "./dist/types.d.ts"
42
37
  },
43
- "scripts": {
44
- "build": "tsc -b"
45
- },
46
- "files": [
47
- "dist",
48
- "README.md"
49
- ],
50
- "devDependencies": {
51
- "@google-cloud/storage": "^7.17.3",
52
- "@types/node": "^20.19.25",
53
- "json-schema-to-typescript": "^15.0.4",
54
- "ts-node": "^10.9.2",
55
- "typescript": "^5.9.3"
56
- },
57
- "dependencies": {
58
- "@toolproof-npm/schema": "^0.1.26",
59
- "firebase-admin": "^13.6.0"
38
+ "./server": {
39
+ "node": "./dist/firebaseAdminHelpers.js",
40
+ "types": "./dist/firebaseAdminHelpers.d.ts"
60
41
  }
61
- }
42
+ },
43
+ "files": [
44
+ "dist",
45
+ "README.md"
46
+ ],
47
+ "devDependencies": {
48
+ "@google-cloud/storage": "^7.17.3",
49
+ "@types/node": "^20.19.25",
50
+ "json-schema-to-typescript": "^15.0.4",
51
+ "ts-node": "^10.9.2",
52
+ "typescript": "^5.9.3"
53
+ },
54
+ "dependencies": {
55
+ "@toolproof-npm/schema": "^0.1.31",
56
+ "firebase-admin": "^13.6.0"
57
+ },
58
+ "scripts": {
59
+ "build": "tsc -b"
60
+ }
61
+ }
@@ -1,7 +0,0 @@
1
- import type { TypeIdJson } from '@toolproof-npm/schema';
2
- import type { FilterConst, ArchetypeConst, RoleConst, StepConst, WorkflowConst, ArchetypeMeta, ArchetypeData, ArchetypeMetaMap, ArchetypeDataMap, ResourceMetaMap, ResourceDataMap, ResourceConst } from './types.d.ts';
3
- export declare function getNewId(identifiable: ArchetypeConst | RoleConst | ResourceConst | StepConst | WorkflowConst): string;
4
- export declare function listArchetypesMeta<T extends ArchetypeMeta>(groupKey: ArchetypeConst, filterConfig: Record<FilterConst, boolean>): Promise<ArchetypeMetaMap<T>>;
5
- export declare function listResourcesMeta(typeIds: TypeIdJson[]): Promise<ResourceMetaMap>;
6
- export declare function listArchetypesData<T extends ArchetypeData>(groupKey: ArchetypeConst, filterConfig: Record<FilterConst, boolean>): Promise<ArchetypeDataMap<T>>;
7
- export declare function listResourcesData(typeIds: TypeIdJson[]): Promise<ResourceDataMap>;