@accordproject/template-engine 3.0.1 → 4.0.0

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.
Files changed (121) hide show
  1. package/README.md +41 -0
  2. package/lib/JavaScriptEvaluator.d.ts +71 -0
  3. package/lib/JavaScriptEvaluator.js +245 -0
  4. package/lib/JavaScriptEvaluator.js.map +1 -0
  5. package/lib/TemplateArchiveProcessor.d.ts +61 -0
  6. package/lib/TemplateArchiveProcessor.js +152 -0
  7. package/lib/TemplateArchiveProcessor.js.map +1 -0
  8. package/lib/TemplateMarkInterpreter.d.ts +34 -0
  9. package/lib/TemplateMarkInterpreter.js +689 -0
  10. package/lib/TemplateMarkInterpreter.js.map +1 -0
  11. package/lib/TemplateMarkNodes.d.ts +19 -0
  12. package/lib/TemplateMarkNodes.js +45 -0
  13. package/lib/TemplateMarkNodes.js.map +1 -0
  14. package/lib/TemplateMarkToJavaScriptCompiler.d.ts +20 -0
  15. package/lib/TemplateMarkToJavaScriptCompiler.js +99 -0
  16. package/lib/TemplateMarkToJavaScriptCompiler.js.map +1 -0
  17. package/lib/TypeScriptCompilationContext.d.ts +15 -0
  18. package/lib/TypeScriptCompilationContext.js +57 -0
  19. package/lib/TypeScriptCompilationContext.js.map +1 -0
  20. package/lib/TypeScriptRuntime.d.ts +17 -0
  21. package/lib/TypeScriptRuntime.js +84 -0
  22. package/lib/TypeScriptRuntime.js.map +1 -0
  23. package/lib/TypeScriptToJavaScriptCompiler.d.ts +11 -0
  24. package/lib/TypeScriptToJavaScriptCompiler.js +169 -0
  25. package/lib/TypeScriptToJavaScriptCompiler.js.map +1 -0
  26. package/lib/drafting/Boolean/index.d.ts +6 -0
  27. package/lib/drafting/Boolean/index.js +30 -0
  28. package/lib/drafting/Boolean/index.js.map +1 -0
  29. package/lib/drafting/DateTime/index.d.ts +8 -0
  30. package/lib/drafting/DateTime/index.js +33 -0
  31. package/lib/drafting/DateTime/index.js.map +1 -0
  32. package/lib/drafting/Double/format.d.ts +14 -0
  33. package/lib/drafting/Double/format.js +62 -0
  34. package/lib/drafting/Double/format.js.map +1 -0
  35. package/lib/drafting/Double/index.d.ts +8 -0
  36. package/lib/drafting/Double/index.js +33 -0
  37. package/lib/drafting/Double/index.js.map +1 -0
  38. package/lib/drafting/DraftFormat.d.ts +5 -0
  39. package/lib/drafting/DraftFormat.js +18 -0
  40. package/lib/drafting/DraftFormat.js.map +1 -0
  41. package/lib/drafting/Duration/index.d.ts +6 -0
  42. package/lib/drafting/Duration/index.js +39 -0
  43. package/lib/drafting/Duration/index.js.map +1 -0
  44. package/lib/drafting/Integer/format.d.ts +14 -0
  45. package/lib/drafting/Integer/format.js +52 -0
  46. package/lib/drafting/Integer/format.js.map +1 -0
  47. package/lib/drafting/Integer/index.d.ts +8 -0
  48. package/lib/drafting/Integer/index.js +33 -0
  49. package/lib/drafting/Integer/index.js.map +1 -0
  50. package/lib/drafting/Long/index.d.ts +8 -0
  51. package/lib/drafting/Long/index.js +33 -0
  52. package/lib/drafting/Long/index.js.map +1 -0
  53. package/lib/drafting/MonetaryAmount/currencycode.d.ts +35 -0
  54. package/lib/drafting/MonetaryAmount/currencycode.js +53 -0
  55. package/lib/drafting/MonetaryAmount/currencycode.js.map +1 -0
  56. package/lib/drafting/MonetaryAmount/index.d.ts +13 -0
  57. package/lib/drafting/MonetaryAmount/index.js +67 -0
  58. package/lib/drafting/MonetaryAmount/index.js.map +1 -0
  59. package/lib/drafting/String/index.d.ts +6 -0
  60. package/lib/drafting/String/index.js +25 -0
  61. package/lib/drafting/String/index.js.map +1 -0
  62. package/lib/drafting/index.d.ts +2 -0
  63. package/lib/drafting/index.js +43 -0
  64. package/lib/drafting/index.js.map +1 -0
  65. package/lib/index.d.ts +7 -0
  66. package/lib/index.js +42 -0
  67. package/lib/index.js.map +1 -0
  68. package/lib/model-gen/concerto.d.ts +13 -0
  69. package/lib/model-gen/concerto.js +4 -0
  70. package/lib/model-gen/concerto.js.map +1 -0
  71. package/lib/model-gen/concerto.metamodel@1.0.0.d.ts +196 -0
  72. package/lib/model-gen/concerto.metamodel@1.0.0.js +4 -0
  73. package/lib/model-gen/concerto.metamodel@1.0.0.js.map +1 -0
  74. package/lib/model-gen/concerto@1.0.0.d.ts +19 -0
  75. package/lib/model-gen/concerto@1.0.0.js +4 -0
  76. package/lib/model-gen/concerto@1.0.0.js.map +1 -0
  77. package/lib/model-gen/org.accordproject.ciceromark@0.6.0.d.ts +49 -0
  78. package/lib/model-gen/org.accordproject.ciceromark@0.6.0.js +4 -0
  79. package/lib/model-gen/org.accordproject.ciceromark@0.6.0.js.map +1 -0
  80. package/lib/model-gen/org.accordproject.commonmark@0.5.0.d.ts +89 -0
  81. package/lib/model-gen/org.accordproject.commonmark@0.5.0.js +4 -0
  82. package/lib/model-gen/org.accordproject.commonmark@0.5.0.js.map +1 -0
  83. package/lib/model-gen/org.accordproject.templatemark@0.5.0.d.ts +76 -0
  84. package/lib/model-gen/org.accordproject.templatemark@0.5.0.js +11 -0
  85. package/lib/model-gen/org.accordproject.templatemark@0.5.0.js.map +1 -0
  86. package/lib/runtime/declarations.d.ts +3 -0
  87. package/lib/runtime/declarations.js +22 -0
  88. package/lib/runtime/declarations.js.map +1 -0
  89. package/lib/slc/model-gen/concerto.d.ts +13 -0
  90. package/lib/slc/model-gen/concerto.decorator@1.0.0.d.ts +6 -0
  91. package/lib/slc/model-gen/concerto.decorator@1.0.0.js +5 -0
  92. package/lib/slc/model-gen/concerto.decorator@1.0.0.js.map +1 -0
  93. package/lib/slc/model-gen/concerto.js +5 -0
  94. package/lib/slc/model-gen/concerto.js.map +1 -0
  95. package/lib/slc/model-gen/concerto@1.0.0.d.ts +24 -0
  96. package/lib/slc/model-gen/concerto@1.0.0.js +6 -0
  97. package/lib/slc/model-gen/concerto@1.0.0.js.map +1 -0
  98. package/lib/slc/model-gen/org.accordproject.contract@0.2.0.d.ts +7 -0
  99. package/lib/slc/model-gen/org.accordproject.contract@0.2.0.js +5 -0
  100. package/lib/slc/model-gen/org.accordproject.contract@0.2.0.js.map +1 -0
  101. package/lib/slc/model-gen/org.accordproject.runtime@0.2.0.d.ts +15 -0
  102. package/lib/slc/model-gen/org.accordproject.runtime@0.2.0.js +4 -0
  103. package/lib/slc/model-gen/org.accordproject.runtime@0.2.0.js.map +1 -0
  104. package/lib/slc/model-gen/org.accordproject.time@0.3.0.d.ts +46 -0
  105. package/lib/slc/model-gen/org.accordproject.time@0.3.0.js +48 -0
  106. package/lib/slc/model-gen/org.accordproject.time@0.3.0.js.map +1 -0
  107. package/lib/utils.d.ts +6 -0
  108. package/lib/utils.js +71 -0
  109. package/lib/utils.js.map +1 -0
  110. package/lib/worker.d.ts +1 -0
  111. package/{dist → lib}/worker.js +12 -10
  112. package/lib/worker.js.map +1 -0
  113. package/package.json +37 -25
  114. package/umd/template-engine.js +13 -0
  115. package/umd/template-engine.js.LICENSE.txt +21 -0
  116. package/dist/index.d.ts +0 -174
  117. package/dist/index.js +0 -1244
  118. package/dist/index.js.map +0 -1
  119. package/dist/index.mjs +0 -1217
  120. package/dist/index.mjs.map +0 -1
  121. package/dist/worker.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /*
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.default = stringDrafter;
17
+ /**
18
+ * Creates a drafter for String
19
+ * @param {object} value the String
20
+ * @returns {string} the text
21
+ */
22
+ function stringDrafter(value) {
23
+ return value;
24
+ }
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drafting/String/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAOH,gCAEC;AAPD;;;;GAIG;AACH,SAAwB,aAAa,CAAC,KAAY;IAC9C,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { DraftFormat } from './DraftFormat';
2
+ export declare function getDrafter(typeName: string): ((value: any, format?: DraftFormat) => string) | null;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /*
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.getDrafter = getDrafter;
20
+ /* eslint-disable @typescript-eslint/no-explicit-any */
21
+ const Boolean_1 = __importDefault(require("./Boolean"));
22
+ const DateTime_1 = __importDefault(require("./DateTime"));
23
+ const Double_1 = __importDefault(require("./Double"));
24
+ const Integer_1 = __importDefault(require("./Integer"));
25
+ const Duration_1 = __importDefault(require("./Duration"));
26
+ const Long_1 = __importDefault(require("./Long"));
27
+ const MonetaryAmount_1 = __importDefault(require("./MonetaryAmount"));
28
+ const String_1 = __importDefault(require("./String"));
29
+ function getDrafter(typeName) {
30
+ switch (typeName) {
31
+ case 'Boolean': return Boolean_1.default;
32
+ case 'DateTime': return DateTime_1.default;
33
+ case 'Double': return Double_1.default;
34
+ case 'Integer': return Integer_1.default;
35
+ case 'Long': return Long_1.default;
36
+ case 'org.accordproject.money@0.3.0.MonetaryAmount': return MonetaryAmount_1.default;
37
+ case 'org.accordproject.time@0.3.0.Duration': return Duration_1.default;
38
+ case 'org.accordproject.time@0.3.0.Period': return Duration_1.default;
39
+ case 'String': return String_1.default;
40
+ default: return null;
41
+ }
42
+ }
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drafting/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;AAcH,gCAaC;AAzBD,uDAAuD;AAEvD,wDAAuC;AACvC,0DAAyC;AACzC,sDAAqC;AACrC,wDAAuC;AACvC,0DAAyC;AACzC,kDAAiC;AACjC,sEAAqD;AAErD,sDAAqC;AAErC,SAAgB,UAAU,CAAC,QAAgB;IACvC,QAAO,QAAQ,EAAE,CAAC;QAClB,KAAK,SAAS,CAAC,CAAC,OAAO,iBAAc,CAAC;QACtC,KAAK,UAAU,CAAC,CAAC,OAAO,kBAAe,CAAC;QACxC,KAAK,QAAQ,CAAC,CAAC,OAAO,gBAAa,CAAC;QACpC,KAAK,SAAS,CAAC,CAAC,OAAO,iBAAc,CAAC;QACtC,KAAK,MAAM,CAAC,CAAC,OAAO,cAAW,CAAC;QAChC,KAAK,8CAA8C,CAAC,CAAC,OAAO,wBAAqB,CAAC;QAClF,KAAK,uCAAuC,CAAC,CAAC,OAAO,kBAAe,CAAC;QACrE,KAAK,qCAAqC,CAAC,CAAC,OAAO,kBAAe,CAAC;QACnE,KAAK,QAAQ,CAAC,CAAC,OAAO,gBAAa,CAAC;QACpC,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC;IACrB,CAAC;AACL,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { TemplateLogic } from './slc/SmartLegalContract.d.ts';
2
+ export { TemplateMarkInterpreter } from './TemplateMarkInterpreter';
3
+ export { TemplateArchiveProcessor } from './TemplateArchiveProcessor';
4
+ export { TemplateLogic };
5
+ export * from './utils';
6
+ export { ModelManager } from '@accordproject/concerto-core';
7
+ export { TemplateMarkTransformer } from '@accordproject/markdown-template';
package/lib/index.js ADDED
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /*
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.TemplateMarkTransformer = exports.ModelManager = exports.TemplateArchiveProcessor = exports.TemplateMarkInterpreter = void 0;
31
+ var TemplateMarkInterpreter_1 = require("./TemplateMarkInterpreter");
32
+ Object.defineProperty(exports, "TemplateMarkInterpreter", { enumerable: true, get: function () { return TemplateMarkInterpreter_1.TemplateMarkInterpreter; } });
33
+ var TemplateArchiveProcessor_1 = require("./TemplateArchiveProcessor");
34
+ Object.defineProperty(exports, "TemplateArchiveProcessor", { enumerable: true, get: function () { return TemplateArchiveProcessor_1.TemplateArchiveProcessor; } });
35
+ __exportStar(require("./utils"), exports);
36
+ // Re-exported for convenience so a single browser bundle can run the full
37
+ // model -> template -> agreement flow (and so consumers share one concerto instance).
38
+ var concerto_core_1 = require("@accordproject/concerto-core");
39
+ Object.defineProperty(exports, "ModelManager", { enumerable: true, get: function () { return concerto_core_1.ModelManager; } });
40
+ var markdown_template_1 = require("@accordproject/markdown-template");
41
+ Object.defineProperty(exports, "TemplateMarkTransformer", { enumerable: true, get: function () { return markdown_template_1.TemplateMarkTransformer; } });
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;AAIH,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AAEjC,0CAAwB;AAExB,0EAA0E;AAC1E,sFAAsF;AACtF,8DAA4D;AAAnD,6GAAA,YAAY,OAAA;AACrB,sEAA2E;AAAlE,4HAAA,uBAAuB,OAAA"}
@@ -0,0 +1,13 @@
1
+ export interface IConcept {
2
+ $class: string;
3
+ }
4
+ export interface IAsset extends IConcept {
5
+ $identifier: string;
6
+ }
7
+ export interface IParticipant extends IConcept {
8
+ $identifier: string;
9
+ }
10
+ export interface ITransaction extends IConcept {
11
+ }
12
+ export interface IEvent extends IConcept {
13
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Generated code for namespace: concerto
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=concerto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concerto.js","sourceRoot":"","sources":["../../src/model-gen/concerto.ts"],"names":[],"mappings":";AACA,yCAAyC"}
@@ -0,0 +1,196 @@
1
+ import { IConcept } from './concerto@1.0.0';
2
+ export interface IPosition extends IConcept {
3
+ line: number;
4
+ column: number;
5
+ offset: number;
6
+ }
7
+ export interface IRange extends IConcept {
8
+ start: IPosition;
9
+ end: IPosition;
10
+ source?: string;
11
+ }
12
+ export interface ITypeIdentifier extends IConcept {
13
+ name: string;
14
+ namespace?: string;
15
+ }
16
+ export interface IDecoratorLiteral extends IConcept {
17
+ location?: IRange;
18
+ }
19
+ export type DecoratorLiteralUnion = IDecoratorString | IDecoratorNumber | IDecoratorBoolean | IDecoratorTypeReference;
20
+ export interface IDecoratorString extends IDecoratorLiteral {
21
+ value: string;
22
+ }
23
+ export interface IDecoratorNumber extends IDecoratorLiteral {
24
+ value: number;
25
+ }
26
+ export interface IDecoratorBoolean extends IDecoratorLiteral {
27
+ value: boolean;
28
+ }
29
+ export interface IDecoratorTypeReference extends IDecoratorLiteral {
30
+ type: ITypeIdentifier;
31
+ isArray: boolean;
32
+ }
33
+ export interface IDecorator extends IConcept {
34
+ name: string;
35
+ arguments?: IDecoratorLiteral[];
36
+ location?: IRange;
37
+ }
38
+ export interface IIdentified extends IConcept {
39
+ }
40
+ export type IdentifiedUnion = IIdentifiedBy;
41
+ export interface IIdentifiedBy extends IIdentified {
42
+ name: string;
43
+ }
44
+ export interface IDeclaration extends IConcept {
45
+ name: string;
46
+ decorators?: IDecorator[];
47
+ location?: IRange;
48
+ }
49
+ export type DeclarationUnion = IMapDeclaration | IEnumDeclaration | IConceptDeclaration | IScalarDeclaration;
50
+ export interface IMapDeclaration extends IDeclaration {
51
+ key: IMapKeyType;
52
+ value: IAggregateValueType;
53
+ }
54
+ export interface IMapKeyType extends IConcept {
55
+ type: ITypeIdentifier;
56
+ decorators?: IDecorator[];
57
+ location?: IRange;
58
+ }
59
+ export interface IAggregateValueType extends IConcept {
60
+ type: ITypeIdentifier;
61
+ decorators?: IDecorator[];
62
+ location?: IRange;
63
+ }
64
+ export type AggregateValueTypeUnion = IAggregateRelationshipValueType;
65
+ export interface IAggregateRelationshipValueType extends IAggregateValueType {
66
+ }
67
+ export interface IEnumDeclaration extends IDeclaration {
68
+ properties: IEnumProperty[];
69
+ }
70
+ export interface IEnumProperty extends IConcept {
71
+ name: string;
72
+ decorators?: IDecorator[];
73
+ location?: IRange;
74
+ }
75
+ export interface IConceptDeclaration extends IDeclaration {
76
+ isAbstract: boolean;
77
+ identified?: IIdentified;
78
+ superType?: ITypeIdentifier;
79
+ properties: IProperty[];
80
+ }
81
+ export type ConceptDeclarationUnion = IAssetDeclaration | IParticipantDeclaration | ITransactionDeclaration | IEventDeclaration;
82
+ export interface IAssetDeclaration extends IConceptDeclaration {
83
+ }
84
+ export interface IParticipantDeclaration extends IConceptDeclaration {
85
+ }
86
+ export interface ITransactionDeclaration extends IConceptDeclaration {
87
+ }
88
+ export interface IEventDeclaration extends IConceptDeclaration {
89
+ }
90
+ export interface IProperty extends IConcept {
91
+ name: string;
92
+ isArray: boolean;
93
+ isOptional: boolean;
94
+ decorators?: IDecorator[];
95
+ location?: IRange;
96
+ }
97
+ export type PropertyUnion = IRelationshipProperty | IObjectProperty | IBooleanProperty | IDateTimeProperty | IStringProperty | IDoubleProperty | IIntegerProperty | ILongProperty;
98
+ export interface IRelationshipProperty extends IProperty {
99
+ type: ITypeIdentifier;
100
+ }
101
+ export interface IObjectProperty extends IProperty {
102
+ defaultValue?: string;
103
+ type: ITypeIdentifier;
104
+ }
105
+ export interface IBooleanProperty extends IProperty {
106
+ defaultValue?: boolean;
107
+ }
108
+ export interface IDateTimeProperty extends IProperty {
109
+ }
110
+ export interface IStringProperty extends IProperty {
111
+ defaultValue?: string;
112
+ validator?: IStringRegexValidator;
113
+ lengthValidator?: IStringLengthValidator;
114
+ }
115
+ export interface IStringRegexValidator extends IConcept {
116
+ pattern: string;
117
+ flags: string;
118
+ }
119
+ export interface IStringLengthValidator extends IConcept {
120
+ minLength?: number;
121
+ maxLength?: number;
122
+ }
123
+ export interface IDoubleProperty extends IProperty {
124
+ defaultValue?: number;
125
+ validator?: IDoubleDomainValidator;
126
+ }
127
+ export interface IDoubleDomainValidator extends IConcept {
128
+ lower?: number;
129
+ upper?: number;
130
+ }
131
+ export interface IIntegerProperty extends IProperty {
132
+ defaultValue?: number;
133
+ validator?: IIntegerDomainValidator;
134
+ }
135
+ export interface IIntegerDomainValidator extends IConcept {
136
+ lower?: number;
137
+ upper?: number;
138
+ }
139
+ export interface ILongProperty extends IProperty {
140
+ defaultValue?: number;
141
+ validator?: ILongDomainValidator;
142
+ }
143
+ export interface ILongDomainValidator extends IConcept {
144
+ lower?: number;
145
+ upper?: number;
146
+ }
147
+ export interface IImport extends IConcept {
148
+ namespace: string;
149
+ uri?: string;
150
+ }
151
+ export type ImportUnion = IImportAll | IImportType | IImportTypes;
152
+ export interface IImportAll extends IImport {
153
+ }
154
+ export interface IImportType extends IImport {
155
+ name: string;
156
+ }
157
+ export interface IImportTypes extends IImport {
158
+ types: string[];
159
+ }
160
+ export interface IModel extends IConcept {
161
+ namespace: string;
162
+ sourceUri?: string;
163
+ concertoVersion?: string;
164
+ imports?: IImport[];
165
+ declarations?: IDeclaration[];
166
+ decorators?: IDecorator[];
167
+ }
168
+ export interface IModels extends IConcept {
169
+ models: IModel[];
170
+ }
171
+ export interface IScalarDeclaration extends IDeclaration {
172
+ }
173
+ export type ScalarDeclarationUnion = IBooleanScalar | IIntegerScalar | ILongScalar | IDoubleScalar | IStringScalar | IDateTimeScalar;
174
+ export interface IBooleanScalar extends IScalarDeclaration {
175
+ defaultValue: boolean;
176
+ }
177
+ export interface IIntegerScalar extends IScalarDeclaration {
178
+ defaultValue?: number;
179
+ validator?: IIntegerDomainValidator;
180
+ }
181
+ export interface ILongScalar extends IScalarDeclaration {
182
+ defaultValue?: number;
183
+ validator?: ILongDomainValidator;
184
+ }
185
+ export interface IDoubleScalar extends IScalarDeclaration {
186
+ defaultValue?: number;
187
+ validator?: IDoubleDomainValidator;
188
+ }
189
+ export interface IStringScalar extends IScalarDeclaration {
190
+ defaultValue?: string;
191
+ validator?: IStringRegexValidator;
192
+ lengthValidator?: IStringLengthValidator;
193
+ }
194
+ export interface IDateTimeScalar extends IScalarDeclaration {
195
+ defaultValue?: string;
196
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Generated code for namespace: concerto.metamodel@1.0.0
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=concerto.metamodel@1.0.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concerto.metamodel@1.0.0.js","sourceRoot":"","sources":["../../src/model-gen/concerto.metamodel@1.0.0.ts"],"names":[],"mappings":";AACA,yDAAyD"}
@@ -0,0 +1,19 @@
1
+ import type { ICode } from './org.accordproject.templatemark@0.5.0';
2
+ import type { INode, IAttribute, ITagInfo } from './org.accordproject.commonmark@0.5.0';
3
+ import type { IPosition, IRange, ITypeIdentifier, IDecoratorLiteral, IDecorator, IIdentified, IDeclaration, IMapKeyType, IAggregateValueType, IEnumProperty, IProperty, IStringRegexValidator, IStringLengthValidator, IDoubleDomainValidator, IIntegerDomainValidator, ILongDomainValidator, IImport, IModel, IModels } from './concerto.metamodel@1.0.0';
4
+ export interface IConcept {
5
+ $class: string;
6
+ }
7
+ export type ConceptUnion = ICode | INode | IAttribute | ITagInfo | IPosition | IRange | ITypeIdentifier | IDecoratorLiteral | IDecorator | IIdentified | IDeclaration | IMapKeyType | IAggregateValueType | IEnumProperty | IProperty | IStringRegexValidator | IStringLengthValidator | IDoubleDomainValidator | IIntegerDomainValidator | ILongDomainValidator | IImport | IModel | IModels;
8
+ export interface IAsset extends IConcept {
9
+ $identifier: string;
10
+ }
11
+ export interface IParticipant extends IConcept {
12
+ $identifier: string;
13
+ }
14
+ export interface ITransaction extends IConcept {
15
+ $timestamp: Date;
16
+ }
17
+ export interface IEvent extends IConcept {
18
+ $timestamp: Date;
19
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Generated code for namespace: concerto@1.0.0
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=concerto@1.0.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concerto@1.0.0.js","sourceRoot":"","sources":["../../src/model-gen/concerto@1.0.0.ts"],"names":[],"mappings":";AACA,+CAA+C"}
@@ -0,0 +1,49 @@
1
+ import { IChild } from './org.accordproject.commonmark@0.5.0';
2
+ import { IDecorator } from './concerto.metamodel@1.0.0';
3
+ export interface IElement extends IChild {
4
+ name: string;
5
+ elementType?: string;
6
+ decorators?: IDecorator[];
7
+ }
8
+ export type ElementUnion = IVariable | IFormula | IBlock;
9
+ export interface IVariable extends IElement {
10
+ value: string;
11
+ identifiedBy?: string;
12
+ }
13
+ export type VariableUnion = IFormattedVariable | IEnumVariable;
14
+ export interface IFormattedVariable extends IVariable {
15
+ format: string;
16
+ }
17
+ export interface IEnumVariable extends IVariable {
18
+ enumValues: string[];
19
+ }
20
+ export interface IFormula extends IElement {
21
+ value: string;
22
+ dependencies?: string[];
23
+ code?: string;
24
+ }
25
+ export interface IBlock extends IElement {
26
+ }
27
+ export type BlockUnion = IClause | IContract | IConditional | IOptional | IListBlock;
28
+ export interface IClause extends IBlock {
29
+ src?: string;
30
+ }
31
+ export interface IContract extends IBlock {
32
+ src?: string;
33
+ }
34
+ export interface IConditional extends IBlock {
35
+ isTrue: boolean;
36
+ whenTrue: IChild[];
37
+ whenFalse: IChild[];
38
+ }
39
+ export interface IOptional extends IBlock {
40
+ hasSome: boolean;
41
+ whenSome: IChild[];
42
+ whenNone: IChild[];
43
+ }
44
+ export interface IListBlock extends IBlock {
45
+ type: string;
46
+ tight: string;
47
+ start?: string;
48
+ delimiter?: string;
49
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Generated code for namespace: org.accordproject.ciceromark@0.6.0
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=org.accordproject.ciceromark@0.6.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org.accordproject.ciceromark@0.6.0.js","sourceRoot":"","sources":["../../src/model-gen/org.accordproject.ciceromark@0.6.0.ts"],"names":[],"mappings":";AACA,mEAAmE"}
@@ -0,0 +1,89 @@
1
+ import type { IElementDefinition } from './org.accordproject.templatemark@0.5.0';
2
+ import { IConcept } from './concerto@1.0.0';
3
+ export interface INode extends IConcept {
4
+ text?: string;
5
+ nodes?: INode[];
6
+ startLine?: number;
7
+ endLine?: number;
8
+ }
9
+ export type NodeUnion = IRoot | IChild;
10
+ export interface IRoot extends INode {
11
+ }
12
+ export type RootUnion = IDocument;
13
+ export interface IChild extends INode {
14
+ }
15
+ export type ChildUnion = IElementDefinition | IText | ICodeBlock | ICode | IHtmlInline | IHtmlBlock | IEmph | IStrong | IBlockQuote | IHeading | IThematicBreak | ISoftbreak | ILinebreak | ILink | IImage | IParagraph | IList | IItem | ITable | ITableHead | ITableBody | ITableRow | IHeaderCell | ITableCell;
16
+ export interface IText extends IChild {
17
+ }
18
+ export interface IAttribute extends IConcept {
19
+ name: string;
20
+ value: string;
21
+ }
22
+ export interface ITagInfo extends IConcept {
23
+ tagName: string;
24
+ attributeString: string;
25
+ attributes: IAttribute[];
26
+ content: string;
27
+ closed: boolean;
28
+ }
29
+ export interface ICodeBlock extends IChild {
30
+ info?: string;
31
+ tag?: ITagInfo;
32
+ }
33
+ export interface ICode extends IChild {
34
+ info?: string;
35
+ }
36
+ export interface IHtmlInline extends IChild {
37
+ tag?: ITagInfo;
38
+ }
39
+ export interface IHtmlBlock extends IChild {
40
+ tag?: ITagInfo;
41
+ }
42
+ export interface IEmph extends IChild {
43
+ }
44
+ export interface IStrong extends IChild {
45
+ }
46
+ export interface IBlockQuote extends IChild {
47
+ }
48
+ export interface IHeading extends IChild {
49
+ level: string;
50
+ }
51
+ export interface IThematicBreak extends IChild {
52
+ }
53
+ export interface ISoftbreak extends IChild {
54
+ }
55
+ export interface ILinebreak extends IChild {
56
+ }
57
+ export interface ILink extends IChild {
58
+ destination: string;
59
+ title: string;
60
+ }
61
+ export interface IImage extends IChild {
62
+ destination: string;
63
+ title: string;
64
+ }
65
+ export interface IParagraph extends IChild {
66
+ }
67
+ export interface IList extends IChild {
68
+ type: string;
69
+ start?: string;
70
+ tight: string;
71
+ delimiter?: string;
72
+ }
73
+ export interface IItem extends IChild {
74
+ }
75
+ export interface IDocument extends IRoot {
76
+ xmlns: string;
77
+ }
78
+ export interface ITable extends IChild {
79
+ }
80
+ export interface ITableHead extends IChild {
81
+ }
82
+ export interface ITableBody extends IChild {
83
+ }
84
+ export interface ITableRow extends IChild {
85
+ }
86
+ export interface IHeaderCell extends IChild {
87
+ }
88
+ export interface ITableCell extends IChild {
89
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Generated code for namespace: org.accordproject.commonmark@0.5.0
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=org.accordproject.commonmark@0.5.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org.accordproject.commonmark@0.5.0.js","sourceRoot":"","sources":["../../src/model-gen/org.accordproject.commonmark@0.5.0.ts"],"names":[],"mappings":";AACA,mEAAmE"}
@@ -0,0 +1,76 @@
1
+ import { IChild } from './org.accordproject.commonmark@0.5.0';
2
+ import { IDecorator } from './concerto.metamodel@1.0.0';
3
+ import { IConcept } from './concerto@1.0.0';
4
+ export declare enum CodeType {
5
+ TYPESCRIPT = "TYPESCRIPT",
6
+ ES_2020 = "ES_2020"
7
+ }
8
+ export interface ICode extends IConcept {
9
+ type: CodeType;
10
+ contents: string;
11
+ }
12
+ export interface IElementDefinition extends IChild {
13
+ name: string;
14
+ elementType?: string;
15
+ decorators?: IDecorator[];
16
+ }
17
+ export type ElementDefinitionUnion = IVariableDefinition | IFormulaDefinition | IBlockDefinition;
18
+ export interface IVariableDefinition extends IElementDefinition {
19
+ identifiedBy?: string;
20
+ }
21
+ export type VariableDefinitionUnion = IFormattedVariableDefinition | IEnumVariableDefinition;
22
+ export interface IFormattedVariableDefinition extends IVariableDefinition {
23
+ format: string;
24
+ }
25
+ export interface IEnumVariableDefinition extends IVariableDefinition {
26
+ enumValues: string[];
27
+ }
28
+ export interface IFormulaDefinition extends IElementDefinition {
29
+ dependencies?: string[];
30
+ code: ICode;
31
+ }
32
+ export interface IBlockDefinition extends IElementDefinition {
33
+ }
34
+ export type BlockDefinitionUnion = IClauseDefinition | IContractDefinition | IWithDefinition | IConditionalDefinition | IOptionalDefinition | IJoinDefinition | IListBlockDefinition | IForeachBlockDefinition | IWithBlockDefinition | IConditionalBlockDefinition | IOptionalBlockDefinition;
35
+ export interface IClauseDefinition extends IBlockDefinition {
36
+ condition?: ICode;
37
+ }
38
+ export interface IContractDefinition extends IBlockDefinition {
39
+ }
40
+ export interface IWithDefinition extends IBlockDefinition {
41
+ }
42
+ export interface IConditionalDefinition extends IBlockDefinition {
43
+ whenTrue: IChild[];
44
+ whenFalse: IChild[];
45
+ condition?: ICode;
46
+ dependencies?: string[];
47
+ }
48
+ export interface IOptionalDefinition extends IBlockDefinition {
49
+ whenSome: IChild[];
50
+ whenNone: IChild[];
51
+ }
52
+ export interface IJoinDefinition extends IBlockDefinition {
53
+ separator?: string;
54
+ locale?: string;
55
+ type?: string;
56
+ style?: string;
57
+ }
58
+ export interface IListBlockDefinition extends IBlockDefinition {
59
+ type: string;
60
+ tight: string;
61
+ start?: string;
62
+ delimiter?: string;
63
+ }
64
+ export interface IForeachBlockDefinition extends IBlockDefinition {
65
+ }
66
+ export interface IWithBlockDefinition extends IBlockDefinition {
67
+ }
68
+ export interface IConditionalBlockDefinition extends IBlockDefinition {
69
+ whenTrue: IChild[];
70
+ whenFalse: IChild[];
71
+ condition?: ICode;
72
+ }
73
+ export interface IOptionalBlockDefinition extends IBlockDefinition {
74
+ whenSome: IChild[];
75
+ whenNone: IChild[];
76
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // Generated code for namespace: org.accordproject.templatemark@0.5.0
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CodeType = void 0;
5
+ // interfaces
6
+ var CodeType;
7
+ (function (CodeType) {
8
+ CodeType["TYPESCRIPT"] = "TYPESCRIPT";
9
+ CodeType["ES_2020"] = "ES_2020";
10
+ })(CodeType || (exports.CodeType = CodeType = {}));
11
+ //# sourceMappingURL=org.accordproject.templatemark@0.5.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org.accordproject.templatemark@0.5.0.js","sourceRoot":"","sources":["../../src/model-gen/org.accordproject.templatemark@0.5.0.ts"],"names":[],"mappings":";AACA,qEAAqE;;;AAarE,aAAa;AACb,IAAY,QAGX;AAHD,WAAY,QAAQ;IACjB,qCAAyB,CAAA;IACzB,+BAAmB,CAAA;AACtB,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB"}