@toolproof-npm/schema 0.1.79 → 0.1.80

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.
@@ -0,0 +1,3 @@
1
+ import type { ResourceRoleIdentity, StrategyThreadIdentity } from './genesis/generated/types/types.js';
2
+ export declare function isResourceRoleIdentityJson(value: string): value is ResourceRoleIdentity;
3
+ export declare function isStrategyThreadIdentityJson(value: string): value is StrategyThreadIdentity;
@@ -0,0 +1,6 @@
1
+ export function isResourceRoleIdentityJson(value) {
2
+ return value.startsWith('ROLE-');
3
+ }
4
+ export function isStrategyThreadIdentityJson(value) {
5
+ return value.startsWith('STRATEGY_THREAD-');
6
+ }
package/dist/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export type { Resource_StrategyRun as Resource_StrategyRunJson } from './genesis
14
14
  export type StepIdentityJson = WorkStepIdentity | BranchStepIdentity | WhileStepIdentity | ForStepIdentity;
15
15
  export type { Documented as DocumentedJson, ResourceFormatIdentity as ResourceFormatIdentityJson, ResourceFormat as ResourceFormatJson, ExtractionSchema as ExtractionSchemaJson, IdentityProp as IdentityPropJson, MeritProp as MeritPropJson, ResourceTypeIdentity as ResourceTypeIdentityJson, ResourceType as ResourceTypeJson, ResourceRoleIdentity as ResourceRoleIdentityJson, ResourceRoleValue as ResourceRoleValueJson, ExecutionIdentity as ExecutionIdentityJson, Execution as ExecutionJson, Conditional as ConditionalJson, RoleMap as RoleMapJson, Roles as RolesJson, RoleBindingMap as RoleBindingMapJson, RoleBindings as RoleBindingsJson, ResourceIdentity as ResourceIdentityJson, WorkStepIdentity as WorkStepIdentityJson, BranchStepIdentity as BranchStepIdentityJson, WhileStepIdentity as WhileStepIdentityJson, ForStepIdentity as ForStepIdentityJson, WorkStep as WorkStepJson, BranchStep as BranchStepJson, WhileStep as WhileStepJson, ForStep as ForStepJson, StepKind as StepKindJson, Step as StepJson, CreationContext as CreationContextJson, ResourceMissing as ResourceMissingJson, ResourcePotentialInput as ResourcePotentialInputJson, ResourcePotentialOutput as ResourcePotentialOutputJson, ResourceMetaBase as ResourceMetaJson, // ATTENTION: type not generated for ResourceMeta
16
16
  Resource as ResourceJson, StrategyState as StrategyStateJson, StatelessStrategyIdentity as StatelessStrategyIdentityJson, StatelessStrategy as StatelessStrategyJson, StatefulStrategyIdentity as StatefulStrategyIdentityJson, StatefulStrategy as StatefulStrategyJson, StrategyRunIdentity as StrategyRunIdentityJson, StrategyRunStatus as StrategyRunStatusJson, StrategyRun as StrategyRunJson, StrategyRunUpdate as StrategyRunUpdateJson, JobIdentity as JobIdentityJson, Job as JobJson, JsonData as JsonDataJson, StrategyThreadIdentity as StrategyThreadIdentityJson, StrategyThreadMap as StrategyThreadMapJson, ExecutionSocket as ExecutionSocketJson, ExecutionSocketMaterialized as ExecutionSocketMaterializedJson, Timestamp as TimestampJson, } from './genesis/generated/types/types.js';
17
+ export { isResourceRoleIdentityJson, isStrategyThreadIdentityJson } from './identityGuards.js';
package/dist/index.js CHANGED
@@ -4,3 +4,4 @@ export { default as SchemaJob } from './genesis/generated/schemas/Job.js';
4
4
  export { default as ResourceTypeGenesis } from './genesis/generated/resource-type-envelopes/Genesis.js';
5
5
  export { default as dependencies } from './genesis/generated/dependencies_ordered.json';
6
6
  export { default as terminals } from './genesis/generated/terminals.json';
7
+ export { isResourceRoleIdentityJson, isStrategyThreadIdentityJson } from './identityGuards.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/schema",
3
- "version": "0.1.79",
3
+ "version": "0.1.80",
4
4
  "description": "JSON schemas and TypeScript types for ToolProof",
5
5
  "keywords": [
6
6
  "toolproof",
@@ -26,6 +26,10 @@
26
26
  ".": {
27
27
  "import": "./dist/index.js",
28
28
  "types": "./dist/index.d.ts"
29
+ },
30
+ "./identityGuards": {
31
+ "import": "./dist/identityGuards.js",
32
+ "types": "./dist/identityGuards.d.ts"
29
33
  }
30
34
  },
31
35
  "files": [