@atscript/moost-wf 0.1.98 → 0.1.100

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/store.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { t as AsWfStateRecord } from "./as-wf-state-DD5Ot4HG.mjs";
2
- import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
1
+ import { TAtscriptAnnotatedType, TAtscriptTypeComplex, TAtscriptTypeObject, TMetadataMap, TValidatorOptions, Validator } from "@atscript/typescript/utils";
3
2
  import { AtscriptDbTable } from "@atscript/db";
4
3
 
5
4
  //#region ../../node_modules/.pnpm/@prostojs+wf@0.1.1/node_modules/@prostojs/wf/dist/types-DQ7U9zZ5.d.mts
@@ -177,4 +176,54 @@ declare class AsWfStore implements WfStateStore {
177
176
  protected resolveFieldPrimitive(fieldType: TAtscriptAnnotatedType): "string" | "number" | "boolean" | undefined;
178
177
  }
179
178
  //#endregion
179
+ //#region src/store/as-wf-state.as.d.ts
180
+ /**
181
+ * Atscript type **JsonValue**
182
+ * @see {@link ./as-wf-state.as:6:13}
183
+ */
184
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
185
+ [key: string]: JsonValue;
186
+ };
187
+ declare namespace JsonValue {
188
+ const __is_atscript_annotated_type: true;
189
+ const type: TAtscriptTypeComplex<JsonValue>;
190
+ const metadata: TMetadataMap<AtscriptMetadata>;
191
+ const validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof JsonValue>;
192
+ /** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
193
+ const toJsonSchema: () => any;
194
+ /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
195
+ const toExampleData: (() => any) | undefined;
196
+ }
197
+ /**
198
+ * Atscript interface **AsWfStateRecord**
199
+ * @see {@link ./as-wf-state.as:8:18}
200
+ */
201
+ declare class AsWfStateRecord {
202
+ handle: string;
203
+ schemaId: string;
204
+ state: {
205
+ context: JsonValue;
206
+ indexes: number[];
207
+ meta?: {
208
+ [key: string]: JsonValue;
209
+ };
210
+ };
211
+ expiresAt?: number;
212
+ /* timestamp */
213
+ updatedAt: number;
214
+ /* timestamp */
215
+ createdAt: number;
216
+ /* timestamp */
217
+ createdBy?: string;
218
+ lastUpdatedBy?: string;
219
+ static __is_atscript_annotated_type: true;
220
+ static type: TAtscriptTypeObject<keyof AsWfStateRecord, AsWfStateRecord>;
221
+ static metadata: TMetadataMap<AtscriptMetadata>;
222
+ static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof AsWfStateRecord>;
223
+ /** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
224
+ static toJsonSchema: () => any;
225
+ /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
226
+ static toExampleData?: () => any;
227
+ }
228
+ //#endregion
180
229
  export { AsWfStateRecord, AsWfStore, type AsWfStoreOptions };
package/dist/store.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as AsWfStateRecord } from "./as-wf-state-DD5Ot4HG.mjs";
1
+ import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
2
2
  //#region src/store/wf-store.ts
3
3
  const defaultClock = { now: () => Date.now() };
4
4
  /**
@@ -236,4 +236,26 @@ var AsWfStore = class {
236
236
  }
237
237
  };
238
238
  //#endregion
239
+ //#region src/store/as-wf-state.as
240
+ var JsonValue = class {
241
+ static __is_atscript_annotated_type = true;
242
+ static type = {};
243
+ static metadata = /* @__PURE__ */ new Map();
244
+ static id = "JsonValue";
245
+ static toJsonSchema() {
246
+ throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
247
+ }
248
+ };
249
+ var AsWfStateRecord = class {
250
+ static __is_atscript_annotated_type = true;
251
+ static type = {};
252
+ static metadata = /* @__PURE__ */ new Map();
253
+ static id = "AsWfStateRecord";
254
+ static toJsonSchema() {
255
+ throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
256
+ }
257
+ };
258
+ defineAnnotatedType("union", JsonValue).item(defineAnnotatedType().designType("string").tags("string").$type).item(defineAnnotatedType().designType("number").tags("number").$type).item(defineAnnotatedType().designType("boolean").tags("boolean").$type).item(defineAnnotatedType().designType("null").tags("null").$type).item(defineAnnotatedType("array").of(defineAnnotatedType().refTo(JsonValue).$type).$type).item(defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).$type);
259
+ defineAnnotatedType("object", AsWfStateRecord).prop("handle", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("db.index.unique", "handle_idx", true).annotate("expect.maxLength", { length: 256 }).$type).prop("schemaId", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "schema_idx" }, true).annotate("expect.maxLength", { length: 256 }).$type).prop("state", defineAnnotatedType("object").prop("context", defineAnnotatedType().refTo(JsonValue).$type).prop("indexes", defineAnnotatedType("array").of(defineAnnotatedType().designType("number").tags("number").$type).$type).prop("meta", defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).optional().$type).annotate("ui.table.hidden", true).annotate("db.json", true).$type).prop("expiresAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("db.index.plain", { name: "expires_idx" }, true).annotate("expect.int", true).optional().$type).prop("updatedAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("db.default.now", true).annotate("db.index.plain", { name: "updated_idx" }, true).annotate("expect.int", true).$type).prop("createdAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("createdBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type).prop("lastUpdatedBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type);
260
+ //#endregion
239
261
  export { AsWfStateRecord, AsWfStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/moost-wf",
3
- "version": "0.1.98",
3
+ "version": "0.1.100",
4
4
  "description": "Workflow form integration for moost — decorators, interceptors, and serialization driven by atscript type metadata",
5
5
  "keywords": [
6
6
  "atscript",
@@ -26,7 +26,8 @@
26
26
  },
27
27
  "files": [
28
28
  "dist",
29
- "src/store/as-wf-state.as"
29
+ "src/store/as-wf-state.as",
30
+ "src/store/as-wf-state.as.d.ts"
30
31
  ],
31
32
  "type": "module",
32
33
  "sideEffects": false,
@@ -45,33 +46,36 @@
45
46
  "types": "./dist/store.d.mts",
46
47
  "import": "./dist/store.mjs"
47
48
  },
48
- "./store.as": "./src/store/as-wf-state.as",
49
+ "./store.as": {
50
+ "types": "./src/store/as-wf-state.as.d.ts",
51
+ "default": "./src/store/as-wf-state.as"
52
+ },
49
53
  "./package.json": "./package.json"
50
54
  },
51
55
  "publishConfig": {
52
56
  "access": "public"
53
57
  },
54
58
  "devDependencies": {
55
- "@atscript/core": "^0.1.75",
56
- "@atscript/db": "^0.1.104",
57
- "@atscript/db-sqlite": "^0.1.104",
58
- "@atscript/typescript": "^0.1.75",
59
- "@moostjs/event-wf": "^0.6.26",
59
+ "@atscript/core": "^0.1.76",
60
+ "@atscript/db": "^0.1.106",
61
+ "@atscript/db-sqlite": "^0.1.106",
62
+ "@atscript/typescript": "^0.1.76",
63
+ "@moostjs/event-wf": "^0.6.27",
60
64
  "@prostojs/wf": "^0.1.1",
61
65
  "@wooksjs/event-core": "^0.7.19",
62
66
  "@wooksjs/event-wf": "^0.7.19",
63
- "moost": "^0.6.26",
64
- "unplugin-atscript": "^0.1.75",
67
+ "moost": "^0.6.27",
68
+ "unplugin-atscript": "^0.1.76",
65
69
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
66
- "@atscript/ui": "^0.1.98"
70
+ "@atscript/ui": "^0.1.100"
67
71
  },
68
72
  "peerDependencies": {
69
- "@atscript/core": "^0.1.75",
70
- "@atscript/typescript": "^0.1.75",
71
- "@moostjs/event-wf": "^0.6.26",
73
+ "@atscript/core": "^0.1.76",
74
+ "@atscript/typescript": "^0.1.76",
75
+ "@moostjs/event-wf": "^0.6.27",
72
76
  "@wooksjs/event-core": "^0.7.19",
73
77
  "@wooksjs/event-wf": "^0.7.19",
74
- "moost": "^0.6.26"
78
+ "moost": "^0.6.27"
75
79
  },
76
80
  "scripts": {
77
81
  "build": "vp pack",
@@ -0,0 +1,58 @@
1
+ // prettier-ignore-start
2
+ /* eslint-disable */
3
+ /* oxlint-disable */
4
+ /// <reference path="./as-wf-state.as" />
5
+ /**
6
+ * 🪄 This file was generated by Atscript
7
+ * Do not edit this file!
8
+ */
9
+
10
+ import type { TAtscriptTypeObject, TAtscriptTypeComplex, TAtscriptTypeFinal, TAtscriptTypeArray, TAtscriptAnnotatedType, TMetadataMap, Validator, TValidatorOptions } from "@atscript/typescript/utils"
11
+
12
+ /**
13
+ * Atscript type **JsonValue**
14
+ * @see {@link ./as-wf-state.as:6:13}
15
+ */
16
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
17
+ [key: string]: JsonValue
18
+ }
19
+ declare namespace JsonValue {
20
+ const __is_atscript_annotated_type: true
21
+ const type: TAtscriptTypeComplex<JsonValue>
22
+ const metadata: TMetadataMap<AtscriptMetadata>
23
+ const validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof JsonValue>
24
+ /** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
25
+ const toJsonSchema: () => any
26
+ /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
27
+ const toExampleData: (() => any) | undefined
28
+ }
29
+
30
+ /**
31
+ * Atscript interface **AsWfStateRecord**
32
+ * @see {@link ./as-wf-state.as:8:18}
33
+ */
34
+ export declare class AsWfStateRecord {
35
+ handle: string
36
+ schemaId: string
37
+ state: {
38
+ context: JsonValue
39
+ indexes: number[]
40
+ meta?: {
41
+ [key: string]: JsonValue
42
+ }
43
+ }
44
+ expiresAt?: number /* timestamp */
45
+ updatedAt: number /* timestamp */
46
+ createdAt: number /* timestamp */
47
+ createdBy?: string
48
+ lastUpdatedBy?: string
49
+ static __is_atscript_annotated_type: true
50
+ static type: TAtscriptTypeObject<keyof AsWfStateRecord, AsWfStateRecord>
51
+ static metadata: TMetadataMap<AtscriptMetadata>
52
+ static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof AsWfStateRecord>
53
+ /** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
54
+ static toJsonSchema: () => any
55
+ /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
56
+ static toExampleData?: () => any
57
+ }
58
+ // prettier-ignore-end
@@ -1,24 +0,0 @@
1
- import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
2
- //#region src/store/as-wf-state.as
3
- var JsonValue = class {
4
- static __is_atscript_annotated_type = true;
5
- static type = {};
6
- static metadata = /* @__PURE__ */ new Map();
7
- static id = "JsonValue";
8
- static toJsonSchema() {
9
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
10
- }
11
- };
12
- var AsWfStateRecord = class {
13
- static __is_atscript_annotated_type = true;
14
- static type = {};
15
- static metadata = /* @__PURE__ */ new Map();
16
- static id = "AsWfStateRecord";
17
- static toJsonSchema() {
18
- throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
19
- }
20
- };
21
- defineAnnotatedType("union", JsonValue).item(defineAnnotatedType().designType("string").tags("string").$type).item(defineAnnotatedType().designType("number").tags("number").$type).item(defineAnnotatedType().designType("boolean").tags("boolean").$type).item(defineAnnotatedType().designType("null").tags("null").$type).item(defineAnnotatedType("array").of(defineAnnotatedType().refTo(JsonValue).$type).$type).item(defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).$type);
22
- defineAnnotatedType("object", AsWfStateRecord).prop("handle", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("db.index.unique", "handle_idx", true).annotate("expect.maxLength", { length: 256 }).$type).prop("schemaId", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "schema_idx" }, true).annotate("expect.maxLength", { length: 256 }).$type).prop("state", defineAnnotatedType("object").prop("context", defineAnnotatedType().refTo(JsonValue).$type).prop("indexes", defineAnnotatedType("array").of(defineAnnotatedType().designType("number").tags("number").$type).$type).prop("meta", defineAnnotatedType("object").propPattern(/^.+$/, defineAnnotatedType().refTo(JsonValue).$type).optional().$type).annotate("ui.table.hidden", true).annotate("db.json", true).$type).prop("expiresAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("db.index.plain", { name: "expires_idx" }, true).annotate("expect.int", true).optional().$type).prop("updatedAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("db.default.now", true).annotate("db.index.plain", { name: "updated_idx" }, true).annotate("expect.int", true).$type).prop("createdAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("createdBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type).prop("lastUpdatedBy", defineAnnotatedType().designType("string").tags("string").annotate("ui.table.hidden", true).annotate("expect.maxLength", { length: 128 }).optional().$type);
23
- //#endregion
24
- export { AsWfStateRecord as t };