scjson 0.3.1 → 0.3.2

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
@@ -185,32 +185,31 @@ Several generated classes share generic helper fields:
185
185
 
186
186
  ### Document / Object Types
187
187
  Plain typescript types without runtime validation.
188
-
189
- - `AssignProps` `AssignArray` update a datamodel location with an expression or value.
190
- - `CancelProps` `CancelArray` cancel a pending `<send>` operation.
191
- - `ContentProps` `ContentArray` inline payload used by `<send>` and `<invoke>`.
192
- - `DataProps` `DataArray` represents a single datamodel variable.
193
- - `DatamodelProps` `DatamodelArray` container for one or more `<data>` elements.
194
- - `DonedataProps` `DonedataArray` payload returned when a `<final>` state is reached.
195
- - `ElseProps` fallback branch for `<if>` conditions.
196
- - `ElseifProps` – conditional branch following an `<if>`.
197
- - `FinalProps` `FinalArray` marks a terminal state in the machine.
198
- - `FinalizeProps` `FinalizeArray` executed after an `<invoke>` completes.
199
- - `ForeachProps` `ForeachArray` iterate over items within executable content.
200
- - `HistoryProps` `HistoryArray` pseudostate remembering previous active children.
201
- - `IfProps` `IfArray` conditional execution block.
202
- - `InitialProps` `InitialArray` starting state within a compound state.
203
- - `InvokeProps` `InvokeArray` run an external process or machine.
204
- - `LogProps` `LogArray` diagnostic output statement.
205
- - `OnentryProps` `OnentryArray` – actions performed when entering a state.
206
- - `OnexitProps` `OnexitArray` actions performed when leaving a state.
207
- - `ParallelProps` `ParallelArray` coordinates concurrent regions.
208
- - `ParamProps` `ParamArray` parameter passed to `<invoke>` or `<send>`.
209
- - `RaiseProps` `RaiseArray` raise an internal event.
210
- - `ScriptProps` `ScriptArray` inline executable script.
211
- - `ScxmlProps` – root element of an SCJSON document.
212
- - `SendProps` `SendArray` dispatch an external event.
213
- - `StateProps` `StateArray` – basic state node.
188
+ - `AssignProps` `AssignArray` – update a datamodel location with an expression or value.
189
+ - `CancelProps` `CancelArray` cancel a pending `<send>` operation.
190
+ - `ContentProps` `ContentArray` inline payload used by `<send>` and `<invoke>`.
191
+ - `DataProps` `DataArray` represents a single datamodel variable.
192
+ - `DatamodelProps` `DatamodelArray` container for one or more `<data>` elements.
193
+ - `DonedataProps` `DonedataArray` payload returned when a `<final>` state is reached.
194
+ - `ElseProps` fallback branch for `<if>` conditions.
195
+ - `ElseifProps` conditional branch following an `<if>`.
196
+ - `FinalProps` `FinalArray` marks a terminal state in the machine.
197
+ - `FinalizeProps` `FinalizeArray` executed after an `<invoke>` completes.
198
+ - `ForeachProps` `ForeachArray` iterate over items within executable content.
199
+ - `HistoryProps` `HistoryArray` pseudostate remembering previous active children.
200
+ - `IfProps` `IfArray` conditional execution block.
201
+ - `InitialProps` `InitialArray` starting state within a compound state.
202
+ - `InvokeProps` `InvokeArray` run an external process or machine.
203
+ - `LogProps` `LogArray` diagnostic output statement.
204
+ - `OnentryProps` `OnentryArray` actions performed when entering a state.
205
+ - `OnexitProps` `OnexitArray` – actions performed when leaving a state.
206
+ - `ParallelProps` `ParallelArray` coordinates concurrent regions.
207
+ - `ParamProps` `ParamArray` parameter passed to `<invoke>` or `<send>`.
208
+ - `RaiseProps` `RaiseArray` raise an internal event.
209
+ - `ScriptProps` `ScriptArray` inline executable script.
210
+ - `ScxmlProps` root element of an SCJSON document.
211
+ - `SendProps` `SendArray` dispatch an external event.
212
+ - `StateProps` `StateArray` basic state node.
214
213
  - `TransitionProps` `TransitionArray` – edge between states triggered by events.
215
214
 
216
215
  ### Object Management
@@ -1,9 +1,12 @@
1
1
  /**
2
- * Agent Name: ts-props
2
+ * scjsonProps.ts : Properties runtime file for scjson types
3
3
  *
4
4
  * Part of the scjson project.
5
5
  * Developed by Softoboros Technology Inc.
6
6
  * Licensed under the BSD 1-Clause License.
7
+ */
8
+ /**
9
+ * update a datamodel location with an expression or value.
7
10
  */
8
11
  export interface AssignProps {
9
12
  location: string;
@@ -13,8 +16,23 @@ export interface AssignProps {
13
16
  otherAttributes: Record<string, object>;
14
17
  content: Record<string, object>[];
15
18
  }
19
+ /** Instantiate a default object of type AssignProps */
16
20
  export declare const defaultAssign: () => AssignProps;
21
+ /**
22
+ * update a datamodel location with an expression or value.
23
+ */
24
+ /** Type for an array of of AssignProps */
17
25
  export type AssignArray = AssignProps[];
26
+ /**
27
+ * The assign type that allows for precise manipulation of the datamodel
28
+ * location.
29
+ * Types are:
30
+ * replacechildren (default),
31
+ * firstchild, lastchild,
32
+ * previoussibling, nextsibling,
33
+ * replace, delete,
34
+ * addattribute
35
+ */
18
36
  export declare const AssignTypeDatatypeProps: {
19
37
  readonly Addattribute: "addattribute";
20
38
  readonly Delete: "delete";
@@ -25,32 +43,60 @@ export declare const AssignTypeDatatypeProps: {
25
43
  readonly Replace: "replace";
26
44
  readonly Replacechildren: "replacechildren";
27
45
  };
46
+ /** executable version of AssignTypeDatatypeProps */
28
47
  export type AssignTypeDatatypeProps = typeof AssignTypeDatatypeProps[keyof typeof AssignTypeDatatypeProps];
48
+ /**
49
+ * The binding type in use for the SCXML document.
50
+ */
29
51
  export declare const BindingDatatypeProps: {
30
52
  readonly Early: "early";
31
53
  readonly Late: "late";
32
54
  };
55
+ /** executable version of BindingDatatypeProps */
33
56
  export type BindingDatatypeProps = typeof BindingDatatypeProps[keyof typeof BindingDatatypeProps];
57
+ /**
58
+ * Boolean: true or false only
59
+ */
34
60
  export declare const BooleanDatatypeProps: {
35
61
  readonly False: "false";
36
62
  readonly True: "true";
37
63
  };
64
+ /** executable version of BooleanDatatypeProps */
38
65
  export type BooleanDatatypeProps = typeof BooleanDatatypeProps[keyof typeof BooleanDatatypeProps];
66
+ /**
67
+ * cancel a pending `<send>` operation.
68
+ */
39
69
  export interface CancelProps {
40
70
  otherElement: Record<string, object>[];
41
71
  sendid: string | null;
42
72
  sendidexpr: string | null;
43
73
  otherAttributes: Record<string, object>;
44
74
  }
75
+ /** Instantiate a default object of type CancelProps */
45
76
  export declare const defaultCancel: () => CancelProps;
77
+ /**
78
+ * cancel a pending `<send>` operation.
79
+ */
80
+ /** Type for an array of of CancelProps */
46
81
  export type CancelArray = CancelProps[];
82
+ /**
83
+ * inline payload used by `<send>` and `<invoke>`.
84
+ */
47
85
  export interface ContentProps {
48
86
  content: ScxmlProps[] | null;
49
87
  expr: string | null;
50
88
  otherAttributes: Record<string, object>;
51
89
  }
90
+ /** Instantiate a default object of type ContentProps */
52
91
  export declare const defaultContent: () => ContentProps;
92
+ /**
93
+ * inline payload used by `<send>` and `<invoke>`.
94
+ */
95
+ /** Type for an array of of ContentProps */
53
96
  export type ContentArray = ContentProps[];
97
+ /**
98
+ * represents a single datamodel variable.
99
+ */
54
100
  export interface DataProps {
55
101
  id: string;
56
102
  src: string | null;
@@ -58,36 +104,74 @@ export interface DataProps {
58
104
  otherAttributes: Record<string, object>;
59
105
  content: Record<string, object>[];
60
106
  }
107
+ /** Instantiate a default object of type DataProps */
61
108
  export declare const defaultData: () => DataProps;
109
+ /**
110
+ * represents a single datamodel variable.
111
+ */
112
+ /** Type for an array of of DataProps */
62
113
  export type DataArray = DataProps[];
114
+ /**
115
+ * container for one or more `<data>` elements.
116
+ */
63
117
  export interface DatamodelProps {
64
118
  data: DataProps[];
65
119
  otherElement: Record<string, object>[];
66
120
  otherAttributes: Record<string, object>;
67
121
  }
122
+ /** Instantiate a default object of type DatamodelProps */
68
123
  export declare const defaultDatamodel: () => DatamodelProps;
124
+ /**
125
+ * container for one or more `<data>` elements.
126
+ */
127
+ /** Type for an array of of DatamodelProps */
69
128
  export type DatamodelArray = DatamodelProps[];
129
+ /**
130
+ * payload returned when a `<final>` state is reached.
131
+ */
70
132
  export interface DonedataProps {
71
133
  content: ContentProps | null;
72
134
  param: ParamProps[];
73
135
  otherAttributes: Record<string, object>;
74
136
  }
137
+ /** Instantiate a default object of type DonedataProps */
75
138
  export declare const defaultDonedata: () => DonedataProps;
139
+ /**
140
+ * payload returned when a `<final>` state is reached.
141
+ */
142
+ /** Type for an array of of DonedataProps */
76
143
  export type DonedataArray = DonedataProps[];
144
+ /**
145
+ * fallback branch for `<if>` conditions.
146
+ */
77
147
  export interface ElseProps {
78
148
  otherAttributes: Record<string, object>;
79
149
  }
150
+ /** Instantiate a default object of type ElseProps */
80
151
  export declare const defaultElse: () => ElseProps;
152
+ /**
153
+ * conditional branch following an `<if>`.
154
+ */
81
155
  export interface ElseifProps {
82
156
  cond: string;
83
157
  otherAttributes: Record<string, object>;
84
158
  }
159
+ /** Instantiate a default object of type ElseifProps */
85
160
  export declare const defaultElseif: () => ElseifProps;
161
+ /**
162
+ * Describes the processor execution mode for this document, being either "lax"
163
+ * or
164
+ * "strict".
165
+ */
86
166
  export declare const ExmodeDatatypeProps: {
87
167
  readonly Lax: "lax";
88
168
  readonly Strict: "strict";
89
169
  };
170
+ /** executable version of ExmodeDatatypeProps */
90
171
  export type ExmodeDatatypeProps = typeof ExmodeDatatypeProps[keyof typeof ExmodeDatatypeProps];
172
+ /**
173
+ * marks a terminal state in the machine.
174
+ */
91
175
  export interface FinalProps {
92
176
  onentry: OnentryProps[];
93
177
  onexit: OnexitProps[];
@@ -96,8 +180,16 @@ export interface FinalProps {
96
180
  id: string | null;
97
181
  otherAttributes: Record<string, object>;
98
182
  }
183
+ /** Instantiate a default object of type FinalProps */
99
184
  export declare const defaultFinal: () => FinalProps;
185
+ /**
186
+ * marks a terminal state in the machine.
187
+ */
188
+ /** Type for an array of of FinalProps */
100
189
  export type FinalArray = FinalProps[];
190
+ /**
191
+ * executed after an `<invoke>` completes.
192
+ */
101
193
  export interface FinalizeProps {
102
194
  otherElement: Record<string, object>[];
103
195
  raiseValue: RaiseProps[];
@@ -110,8 +202,16 @@ export interface FinalizeProps {
110
202
  cancel: CancelProps[];
111
203
  otherAttributes: Record<string, object>;
112
204
  }
205
+ /** Instantiate a default object of type FinalizeProps */
113
206
  export declare const defaultFinalize: () => FinalizeProps;
207
+ /**
208
+ * executed after an `<invoke>` completes.
209
+ */
210
+ /** Type for an array of of FinalizeProps */
114
211
  export type FinalizeArray = FinalizeProps[];
212
+ /**
213
+ * iterate over items within executable content.
214
+ */
115
215
  export interface ForeachProps {
116
216
  otherElement: Record<string, object>[];
117
217
  raiseValue: RaiseProps[];
@@ -127,8 +227,16 @@ export interface ForeachProps {
127
227
  index: string | null;
128
228
  otherAttributes: Record<string, object>;
129
229
  }
230
+ /** Instantiate a default object of type ForeachProps */
130
231
  export declare const defaultForeach: () => ForeachProps;
232
+ /**
233
+ * iterate over items within executable content.
234
+ */
235
+ /** Type for an array of of ForeachProps */
131
236
  export type ForeachArray = ForeachProps[];
237
+ /**
238
+ * pseudostate remembering previous active children.
239
+ */
132
240
  export interface HistoryProps {
133
241
  otherElement: Record<string, object>[];
134
242
  transition: TransitionProps;
@@ -136,13 +244,25 @@ export interface HistoryProps {
136
244
  typeValue: HistoryTypeDatatypeProps | null;
137
245
  otherAttributes: Record<string, object>;
138
246
  }
247
+ /** Instantiate a default object of type HistoryProps */
139
248
  export declare const defaultHistory: () => HistoryProps;
249
+ /**
250
+ * pseudostate remembering previous active children.
251
+ */
252
+ /** Type for an array of of HistoryProps */
140
253
  export type HistoryArray = HistoryProps[];
254
+ /**
255
+ * type of `<history>` state: `shallow` or `deep`.
256
+ */
141
257
  export declare const HistoryTypeDatatypeProps: {
142
258
  readonly Deep: "deep";
143
259
  readonly Shallow: "shallow";
144
260
  };
261
+ /** executable version of HistoryTypeDatatypeProps */
145
262
  export type HistoryTypeDatatypeProps = typeof HistoryTypeDatatypeProps[keyof typeof HistoryTypeDatatypeProps];
263
+ /**
264
+ * conditional execution block.
265
+ */
146
266
  export interface IfProps {
147
267
  otherElement: Record<string, object>[];
148
268
  raiseValue: RaiseProps[];
@@ -158,15 +278,31 @@ export interface IfProps {
158
278
  cond: string;
159
279
  otherAttributes: Record<string, object>;
160
280
  }
281
+ /** Instantiate a default object of type IfProps */
161
282
  export declare const defaultIf: () => IfProps;
283
+ /**
284
+ * conditional execution block.
285
+ */
286
+ /** Type for an array of of IfProps */
162
287
  export type IfArray = IfProps[];
288
+ /**
289
+ * starting state within a compound state.
290
+ */
163
291
  export interface InitialProps {
164
292
  otherElement: Record<string, object>[];
165
293
  transition: TransitionProps;
166
294
  otherAttributes: Record<string, object>;
167
295
  }
296
+ /** Instantiate a default object of type InitialProps */
168
297
  export declare const defaultInitial: () => InitialProps;
298
+ /**
299
+ * starting state within a compound state.
300
+ */
301
+ /** Type for an array of of InitialProps */
169
302
  export type InitialArray = InitialProps[];
303
+ /**
304
+ * run an external process or machine.
305
+ */
170
306
  export interface InvokeProps {
171
307
  content: ContentProps[];
172
308
  param: ParamProps[];
@@ -182,16 +318,32 @@ export interface InvokeProps {
182
318
  autoforward: BooleanDatatypeProps;
183
319
  otherAttributes: Record<string, object>;
184
320
  }
321
+ /** Instantiate a default object of type InvokeProps */
185
322
  export declare const defaultInvoke: () => InvokeProps;
323
+ /**
324
+ * run an external process or machine.
325
+ */
326
+ /** Type for an array of of InvokeProps */
186
327
  export type InvokeArray = InvokeProps[];
328
+ /**
329
+ * diagnostic output statement.
330
+ */
187
331
  export interface LogProps {
188
332
  otherElement: Record<string, object>[];
189
333
  label: string | null;
190
334
  expr: string | null;
191
335
  otherAttributes: Record<string, object>;
192
336
  }
337
+ /** Instantiate a default object of type LogProps */
193
338
  export declare const defaultLog: () => LogProps;
339
+ /**
340
+ * diagnostic output statement.
341
+ */
342
+ /** Type for an array of of LogProps */
194
343
  export type LogArray = LogProps[];
344
+ /**
345
+ * actions performed when entering a state.
346
+ */
195
347
  export interface OnentryProps {
196
348
  otherElement: Record<string, object>[];
197
349
  raiseValue: RaiseProps[];
@@ -204,8 +356,16 @@ export interface OnentryProps {
204
356
  cancel: CancelProps[];
205
357
  otherAttributes: Record<string, object>;
206
358
  }
359
+ /** Instantiate a default object of type OnentryProps */
207
360
  export declare const defaultOnentry: () => OnentryProps;
361
+ /**
362
+ * actions performed when entering a state.
363
+ */
364
+ /** Type for an array of of OnentryProps */
208
365
  export type OnentryArray = OnentryProps[];
366
+ /**
367
+ * actions performed when leaving a state.
368
+ */
209
369
  export interface OnexitProps {
210
370
  otherElement: Record<string, object>[];
211
371
  raiseValue: RaiseProps[];
@@ -218,8 +378,16 @@ export interface OnexitProps {
218
378
  cancel: CancelProps[];
219
379
  otherAttributes: Record<string, object>;
220
380
  }
381
+ /** Instantiate a default object of type OnexitProps */
221
382
  export declare const defaultOnexit: () => OnexitProps;
383
+ /**
384
+ * actions performed when leaving a state.
385
+ */
386
+ /** Type for an array of of OnexitProps */
222
387
  export type OnexitArray = OnexitProps[];
388
+ /**
389
+ * coordinates concurrent regions.
390
+ */
223
391
  export interface ParallelProps {
224
392
  onentry: OnentryProps[];
225
393
  onexit: OnexitProps[];
@@ -233,8 +401,16 @@ export interface ParallelProps {
233
401
  id: string | null;
234
402
  otherAttributes: Record<string, object>;
235
403
  }
404
+ /** Instantiate a default object of type ParallelProps */
236
405
  export declare const defaultParallel: () => ParallelProps;
406
+ /**
407
+ * coordinates concurrent regions.
408
+ */
409
+ /** Type for an array of of ParallelProps */
237
410
  export type ParallelArray = ParallelProps[];
411
+ /**
412
+ * parameter passed to `<invoke>` or `<send>`.
413
+ */
238
414
  export interface ParamProps {
239
415
  otherElement: Record<string, object>[];
240
416
  name: string;
@@ -242,21 +418,45 @@ export interface ParamProps {
242
418
  location: string | null;
243
419
  otherAttributes: Record<string, object>;
244
420
  }
421
+ /** Instantiate a default object of type ParamProps */
245
422
  export declare const defaultParam: () => ParamProps;
423
+ /**
424
+ * parameter passed to `<invoke>` or `<send>`.
425
+ */
426
+ /** Type for an array of of ParamProps */
246
427
  export type ParamArray = ParamProps[];
428
+ /**
429
+ * raise an internal event.
430
+ */
247
431
  export interface RaiseProps {
248
432
  event: string;
249
433
  otherAttributes: Record<string, object>;
250
434
  }
435
+ /** Instantiate a default object of type RaiseProps */
251
436
  export declare const defaultRaise: () => RaiseProps;
437
+ /**
438
+ * raise an internal event.
439
+ */
440
+ /** Type for an array of of RaiseProps */
252
441
  export type RaiseArray = RaiseProps[];
442
+ /**
443
+ * inline executable script.
444
+ */
253
445
  export interface ScriptProps {
254
446
  src: string | null;
255
447
  otherAttributes: Record<string, object>;
256
448
  content: Record<string, object>[];
257
449
  }
450
+ /** Instantiate a default object of type ScriptProps */
258
451
  export declare const defaultScript: () => ScriptProps;
452
+ /**
453
+ * inline executable script.
454
+ */
455
+ /** Type for an array of of ScriptProps */
259
456
  export type ScriptArray = ScriptProps[];
457
+ /**
458
+ * root element of an SCJSON document.
459
+ */
260
460
  export interface ScxmlProps {
261
461
  state: StateProps[];
262
462
  parallel: ParallelProps[];
@@ -272,7 +472,11 @@ export interface ScxmlProps {
272
472
  exmode: ExmodeDatatypeProps | null;
273
473
  otherAttributes: Record<string, object>;
274
474
  }
475
+ /** Instantiate a default object of type ScxmlProps */
275
476
  export declare const defaultScxml: () => ScxmlProps;
477
+ /**
478
+ * dispatch an external event.
479
+ */
276
480
  export interface SendProps {
277
481
  content: ContentProps[];
278
482
  param: ParamProps[];
@@ -290,8 +494,16 @@ export interface SendProps {
290
494
  namelist: string | null;
291
495
  otherAttributes: Record<string, object>;
292
496
  }
497
+ /** Instantiate a default object of type SendProps */
293
498
  export declare const defaultSend: () => SendProps;
499
+ /**
500
+ * dispatch an external event.
501
+ */
502
+ /** Type for an array of of SendProps */
294
503
  export type SendArray = SendProps[];
504
+ /**
505
+ * basic state node.
506
+ */
295
507
  export interface StateProps {
296
508
  onentry: OnentryProps[];
297
509
  onexit: OnexitProps[];
@@ -308,8 +520,16 @@ export interface StateProps {
308
520
  initialAttribute: string[];
309
521
  otherAttributes: Record<string, object>;
310
522
  }
523
+ /** Instantiate a default object of type StateProps */
311
524
  export declare const defaultState: () => StateProps;
525
+ /**
526
+ * basic state node.
527
+ */
528
+ /** Type for an array of of StateProps */
312
529
  export type StateArray = StateProps[];
530
+ /**
531
+ * edge between states triggered by events.
532
+ */
313
533
  export interface TransitionProps {
314
534
  otherElement: Record<string, object>[];
315
535
  raiseValue: RaiseProps[];
@@ -326,12 +546,21 @@ export interface TransitionProps {
326
546
  typeValue: TransitionTypeDatatypeProps | null;
327
547
  otherAttributes: Record<string, object>;
328
548
  }
549
+ /** Instantiate a default object of type TransitionProps */
329
550
  export declare const defaultTransition: () => TransitionProps;
551
+ /**
552
+ * edge between states triggered by events.
553
+ */
554
+ /** Type for an array of of TransitionProps */
330
555
  export type TransitionArray = TransitionProps[];
556
+ /**
557
+ * The type of the transition i.e. internal or external.
558
+ */
331
559
  export declare const TransitionTypeDatatypeProps: {
332
560
  readonly External: "external";
333
561
  readonly Internal: "internal";
334
562
  };
563
+ /** executable version of TransitionTypeDatatypeProps */
335
564
  export type TransitionTypeDatatypeProps = typeof TransitionTypeDatatypeProps[keyof typeof TransitionTypeDatatypeProps];
336
565
  export type Kind = "number" | "string" | "record<string, object>" | "number[]" | "string[]" | "record<string, object>[]" | "assign" | "assigntypedatatype" | "bindingdatatype" | "booleandatatype" | "cancel" | "content" | "data" | "datamodel" | "donedata" | "else" | "elseif" | "exmodedatatype" | "final" | "finalize" | "foreach" | "history" | "historytypedatatype" | "if" | "initial" | "invoke" | "log" | "onentry" | "onexit" | "parallel" | "param" | "raise" | "script" | "scxml" | "send" | "state" | "transition" | "transitiontypedatatype" | "assignarray" | "cancelarray" | "contentarray" | "dataarray" | "datamodelarray" | "donedataarray" | "finalarray" | "finalizearray" | "foreacharray" | "historyarray" | "ifarray" | "initialarray" | "invokearray" | "logarray" | "onentryarray" | "onexitarray" | "parallelarray" | "paramarray" | "raisearray" | "scriptarray" | "sendarray" | "statearray" | "transitionarray";
337
566
  export type PropsUnion = null | string | number | Record<string, object> | string[] | number[] | Record<string, object>[] | AssignProps | AssignTypeDatatypeProps | BindingDatatypeProps | BooleanDatatypeProps | CancelProps | ContentProps | DataProps | DatamodelProps | DonedataProps | ElseProps | ElseifProps | ExmodeDatatypeProps | FinalProps | FinalizeProps | ForeachProps | HistoryProps | HistoryTypeDatatypeProps | IfProps | InitialProps | InvokeProps | LogProps | OnentryProps | OnexitProps | ParallelProps | ParamProps | RaiseProps | ScriptProps | ScxmlProps | SendProps | StateProps | TransitionProps | TransitionTypeDatatypeProps | AssignArray | CancelArray | ContentArray | DataArray | DatamodelArray | DonedataArray | FinalArray | FinalizeArray | ForeachArray | HistoryArray | IfArray | InitialArray | InvokeArray | LogArray | OnentryArray | OnexitArray | ParallelArray | ParamArray | RaiseArray | ScriptArray | SendArray | StateArray | TransitionArray;
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  /**
3
- * Agent Name: ts-props
3
+ * scjsonProps.ts : Properties runtime file for scjson types
4
4
  *
5
5
  * Part of the scjson project.
6
6
  * Developed by Softoboros Technology Inc.
7
7
  * Licensed under the BSD 1-Clause License.
8
- */
8
+ */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.TransitionTypeDatatypeProps = exports.defaultTransition = exports.defaultState = exports.defaultSend = exports.defaultScxml = exports.defaultScript = exports.defaultRaise = exports.defaultParam = exports.defaultParallel = exports.defaultOnexit = exports.defaultOnentry = exports.defaultLog = exports.defaultInvoke = exports.defaultInitial = exports.defaultIf = exports.HistoryTypeDatatypeProps = exports.defaultHistory = exports.defaultForeach = exports.defaultFinalize = exports.defaultFinal = exports.ExmodeDatatypeProps = exports.defaultElseif = exports.defaultElse = exports.defaultDonedata = exports.defaultDatamodel = exports.defaultData = exports.defaultContent = exports.defaultCancel = exports.BooleanDatatypeProps = exports.BindingDatatypeProps = exports.AssignTypeDatatypeProps = exports.defaultAssign = void 0;
11
+ /** Instantiate a default object of type AssignProps */
11
12
  const defaultAssign = () => ({
12
13
  location: "",
13
14
  expr: null,
@@ -17,6 +18,16 @@ const defaultAssign = () => ({
17
18
  content: [],
18
19
  });
19
20
  exports.defaultAssign = defaultAssign;
21
+ /**
22
+ * The assign type that allows for precise manipulation of the datamodel
23
+ * location.
24
+ * Types are:
25
+ * replacechildren (default),
26
+ * firstchild, lastchild,
27
+ * previoussibling, nextsibling,
28
+ * replace, delete,
29
+ * addattribute
30
+ */
20
31
  exports.AssignTypeDatatypeProps = {
21
32
  Addattribute: "addattribute",
22
33
  Delete: "delete",
@@ -27,14 +38,21 @@ exports.AssignTypeDatatypeProps = {
27
38
  Replace: "replace",
28
39
  Replacechildren: "replacechildren",
29
40
  };
41
+ /**
42
+ * The binding type in use for the SCXML document.
43
+ */
30
44
  exports.BindingDatatypeProps = {
31
45
  Early: "early",
32
46
  Late: "late",
33
47
  };
48
+ /**
49
+ * Boolean: true or false only
50
+ */
34
51
  exports.BooleanDatatypeProps = {
35
52
  False: "false",
36
53
  True: "true",
37
54
  };
55
+ /** Instantiate a default object of type CancelProps */
38
56
  const defaultCancel = () => ({
39
57
  otherElement: [],
40
58
  sendid: null,
@@ -42,12 +60,14 @@ const defaultCancel = () => ({
42
60
  otherAttributes: {},
43
61
  });
44
62
  exports.defaultCancel = defaultCancel;
63
+ /** Instantiate a default object of type ContentProps */
45
64
  const defaultContent = () => ({
46
65
  content: null,
47
66
  expr: null,
48
67
  otherAttributes: {},
49
68
  });
50
69
  exports.defaultContent = defaultContent;
70
+ /** Instantiate a default object of type DataProps */
51
71
  const defaultData = () => ({
52
72
  id: "",
53
73
  src: null,
@@ -56,31 +76,41 @@ const defaultData = () => ({
56
76
  content: [],
57
77
  });
58
78
  exports.defaultData = defaultData;
79
+ /** Instantiate a default object of type DatamodelProps */
59
80
  const defaultDatamodel = () => ({
60
81
  data: [],
61
82
  otherElement: [],
62
83
  otherAttributes: {},
63
84
  });
64
85
  exports.defaultDatamodel = defaultDatamodel;
86
+ /** Instantiate a default object of type DonedataProps */
65
87
  const defaultDonedata = () => ({
66
88
  content: null,
67
89
  param: [],
68
90
  otherAttributes: {},
69
91
  });
70
92
  exports.defaultDonedata = defaultDonedata;
93
+ /** Instantiate a default object of type ElseProps */
71
94
  const defaultElse = () => ({
72
95
  otherAttributes: {},
73
96
  });
74
97
  exports.defaultElse = defaultElse;
98
+ /** Instantiate a default object of type ElseifProps */
75
99
  const defaultElseif = () => ({
76
100
  cond: "",
77
101
  otherAttributes: {},
78
102
  });
79
103
  exports.defaultElseif = defaultElseif;
104
+ /**
105
+ * Describes the processor execution mode for this document, being either "lax"
106
+ * or
107
+ * "strict".
108
+ */
80
109
  exports.ExmodeDatatypeProps = {
81
110
  Lax: "lax",
82
111
  Strict: "strict",
83
112
  };
113
+ /** Instantiate a default object of type FinalProps */
84
114
  const defaultFinal = () => ({
85
115
  onentry: [],
86
116
  onexit: [],
@@ -90,6 +120,7 @@ const defaultFinal = () => ({
90
120
  otherAttributes: {},
91
121
  });
92
122
  exports.defaultFinal = defaultFinal;
123
+ /** Instantiate a default object of type FinalizeProps */
93
124
  const defaultFinalize = () => ({
94
125
  otherElement: [],
95
126
  raiseValue: [],
@@ -103,6 +134,7 @@ const defaultFinalize = () => ({
103
134
  otherAttributes: {},
104
135
  });
105
136
  exports.defaultFinalize = defaultFinalize;
137
+ /** Instantiate a default object of type ForeachProps */
106
138
  const defaultForeach = () => ({
107
139
  otherElement: [],
108
140
  raiseValue: [],
@@ -119,6 +151,7 @@ const defaultForeach = () => ({
119
151
  otherAttributes: {},
120
152
  });
121
153
  exports.defaultForeach = defaultForeach;
154
+ /** Instantiate a default object of type HistoryProps */
122
155
  const defaultHistory = () => ({
123
156
  otherElement: [],
124
157
  transition: (0, exports.defaultTransition)(),
@@ -127,10 +160,14 @@ const defaultHistory = () => ({
127
160
  otherAttributes: {},
128
161
  });
129
162
  exports.defaultHistory = defaultHistory;
163
+ /**
164
+ * type of `<history>` state: `shallow` or `deep`.
165
+ */
130
166
  exports.HistoryTypeDatatypeProps = {
131
167
  Deep: "deep",
132
168
  Shallow: "shallow",
133
169
  };
170
+ /** Instantiate a default object of type IfProps */
134
171
  const defaultIf = () => ({
135
172
  otherElement: [],
136
173
  raiseValue: [],
@@ -147,12 +184,14 @@ const defaultIf = () => ({
147
184
  otherAttributes: {},
148
185
  });
149
186
  exports.defaultIf = defaultIf;
187
+ /** Instantiate a default object of type InitialProps */
150
188
  const defaultInitial = () => ({
151
189
  otherElement: [],
152
190
  transition: (0, exports.defaultTransition)(),
153
191
  otherAttributes: {},
154
192
  });
155
193
  exports.defaultInitial = defaultInitial;
194
+ /** Instantiate a default object of type InvokeProps */
156
195
  const defaultInvoke = () => ({
157
196
  content: [],
158
197
  param: [],
@@ -169,6 +208,7 @@ const defaultInvoke = () => ({
169
208
  otherAttributes: {},
170
209
  });
171
210
  exports.defaultInvoke = defaultInvoke;
211
+ /** Instantiate a default object of type LogProps */
172
212
  const defaultLog = () => ({
173
213
  otherElement: [],
174
214
  label: null,
@@ -176,6 +216,7 @@ const defaultLog = () => ({
176
216
  otherAttributes: {},
177
217
  });
178
218
  exports.defaultLog = defaultLog;
219
+ /** Instantiate a default object of type OnentryProps */
179
220
  const defaultOnentry = () => ({
180
221
  otherElement: [],
181
222
  raiseValue: [],
@@ -189,6 +230,7 @@ const defaultOnentry = () => ({
189
230
  otherAttributes: {},
190
231
  });
191
232
  exports.defaultOnentry = defaultOnentry;
233
+ /** Instantiate a default object of type OnexitProps */
192
234
  const defaultOnexit = () => ({
193
235
  otherElement: [],
194
236
  raiseValue: [],
@@ -202,6 +244,7 @@ const defaultOnexit = () => ({
202
244
  otherAttributes: {},
203
245
  });
204
246
  exports.defaultOnexit = defaultOnexit;
247
+ /** Instantiate a default object of type ParallelProps */
205
248
  const defaultParallel = () => ({
206
249
  onentry: [],
207
250
  onexit: [],
@@ -216,6 +259,7 @@ const defaultParallel = () => ({
216
259
  otherAttributes: {},
217
260
  });
218
261
  exports.defaultParallel = defaultParallel;
262
+ /** Instantiate a default object of type ParamProps */
219
263
  const defaultParam = () => ({
220
264
  otherElement: [],
221
265
  name: "",
@@ -224,17 +268,20 @@ const defaultParam = () => ({
224
268
  otherAttributes: {},
225
269
  });
226
270
  exports.defaultParam = defaultParam;
271
+ /** Instantiate a default object of type RaiseProps */
227
272
  const defaultRaise = () => ({
228
273
  event: "",
229
274
  otherAttributes: {},
230
275
  });
231
276
  exports.defaultRaise = defaultRaise;
277
+ /** Instantiate a default object of type ScriptProps */
232
278
  const defaultScript = () => ({
233
279
  src: null,
234
280
  otherAttributes: {},
235
281
  content: [],
236
282
  });
237
283
  exports.defaultScript = defaultScript;
284
+ /** Instantiate a default object of type ScxmlProps */
238
285
  const defaultScxml = () => ({
239
286
  state: [],
240
287
  parallel: [],
@@ -251,6 +298,7 @@ const defaultScxml = () => ({
251
298
  otherAttributes: {},
252
299
  });
253
300
  exports.defaultScxml = defaultScxml;
301
+ /** Instantiate a default object of type SendProps */
254
302
  const defaultSend = () => ({
255
303
  content: [],
256
304
  param: [],
@@ -269,6 +317,7 @@ const defaultSend = () => ({
269
317
  otherAttributes: {},
270
318
  });
271
319
  exports.defaultSend = defaultSend;
320
+ /** Instantiate a default object of type StateProps */
272
321
  const defaultState = () => ({
273
322
  onentry: [],
274
323
  onexit: [],
@@ -286,6 +335,7 @@ const defaultState = () => ({
286
335
  otherAttributes: {},
287
336
  });
288
337
  exports.defaultState = defaultState;
338
+ /** Instantiate a default object of type TransitionProps */
289
339
  const defaultTransition = () => ({
290
340
  otherElement: [],
291
341
  raiseValue: [],
@@ -303,6 +353,9 @@ const defaultTransition = () => ({
303
353
  otherAttributes: {},
304
354
  });
305
355
  exports.defaultTransition = defaultTransition;
356
+ /**
357
+ * The type of the transition i.e. internal or external.
358
+ */
306
359
  exports.TransitionTypeDatatypeProps = {
307
360
  External: "external",
308
361
  Internal: "internal",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scjson",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "A JSON-based serialization of SCXML (State Chart XML).",
5
5
  "author": "Softoboros Technology Inc. <ira@softoboros.com>",
6
6
  "license": "BSD-1-Clause",