@opencrvs/toolkit 2.0.0-rc.ecef004 → 2.0.0-rc.ed0aa22
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/commons/api/router.d.ts +1570 -1570
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +323 -32
- package/dist/commons/events/ActionConfig.d.ts +77 -70
- package/dist/commons/events/ActionDocument.d.ts +107 -107
- package/dist/commons/events/ActionType.d.ts +57 -57
- package/dist/commons/events/AdvancedSearchConfig.d.ts +501 -501
- package/dist/commons/events/AuditLog.d.ts +41 -41
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/Conditional.d.ts +3 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
- package/dist/commons/events/Draft.d.ts +35 -35
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +5 -5
- package/dist/commons/events/EventDocument.d.ts +43 -43
- package/dist/commons/events/EventIndex.d.ts +62 -62
- package/dist/commons/events/EventMetadata.d.ts +40 -40
- package/dist/commons/events/FieldConfig.d.ts +331 -331
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/Flag.d.ts +15 -15
- package/dist/commons/events/TemplateConfig.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
- package/dist/commons/events/WorkqueueConfig.d.ts +817 -817
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +2 -2
- package/dist/commons/events/field.d.ts +198 -69
- package/dist/commons/events/locations.d.ts +4 -4
- package/dist/commons/events/mocks.test.utils.d.ts +2 -2
- package/dist/commons/events/scopes.d.ts +4 -4
- package/dist/commons/events/state/index.d.ts +17 -17
- package/dist/commons/events/state/utils.d.ts +7 -7
- package/dist/commons/events/test.utils.d.ts +33 -33
- package/dist/commons/events/utils.d.ts +118 -110
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/environment/derived-variables.d.ts +131 -131
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/logger.d.ts +12 -3
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/manage-users.js +7 -17
- package/dist/environment/questions.d.ts +74 -75
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +14 -8
- package/dist/environment/swarm-to-k8s.js +7 -17
- package/dist/environment/update-workflows.js +7 -17
- package/dist/environment/users.js +7 -17
- package/dist/environment/utils.d.ts +1 -1
- package/dist/environment/utils.js +7 -17
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +36 -12
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +7 -17
- package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
- package/dist/migrations/v2.0/remove-hearth-migrations.js +7 -17
- package/dist/notification/index.js +22 -11
- package/dist/scopes/index.d.ts +140 -140
- package/opencrvs-toolkit-2.0.0-rc.ed0aa22.tgz +0 -0
- package/package.json +3 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.ecef004.tgz +0 -0
|
@@ -161,10 +161,13 @@ function promptAndStoreAnswer(environment, questions, existingValues) {
|
|
|
161
161
|
const existingValuesForQuestions = questions
|
|
162
162
|
// Only variables can have previous values we can use
|
|
163
163
|
.filter((question) => question.valueType === 'VARIABLE')
|
|
164
|
-
.map((question) => {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
.map((question) => {
|
|
165
|
+
var _a;
|
|
166
|
+
return [
|
|
167
|
+
question.name,
|
|
168
|
+
(_a = (0, utils_1.findExistingValue)(question.valueLabel, 'VARIABLE', question.scope, existingValues)) === null || _a === void 0 ? void 0 : _a.value
|
|
169
|
+
];
|
|
170
|
+
});
|
|
168
171
|
return Object.assign(Object.assign({}, Object.fromEntries(existingValuesForQuestions)), result);
|
|
169
172
|
});
|
|
170
173
|
}
|
|
@@ -600,10 +603,13 @@ ALL_QUESTIONS.push(...questions_1.githubTokenQuestion, ...questions_1.githubOthe
|
|
|
600
603
|
derivedUpdates.push(...applicationServerUpdates);
|
|
601
604
|
const updates = getAnswers(existingValues)
|
|
602
605
|
.concat(...derivedUpdates.filter((update) => update.value !== null))
|
|
603
|
-
.filter((variable) => {
|
|
604
|
-
|
|
605
|
-
(variable.
|
|
606
|
-
|
|
606
|
+
.filter((variable) => {
|
|
607
|
+
var _a;
|
|
608
|
+
return Boolean(variable.value) &&
|
|
609
|
+
// Only update values that changed
|
|
610
|
+
(variable.type !== 'VARIABLE' ||
|
|
611
|
+
variable.value !== ((_a = variable.didExist) === null || _a === void 0 ? void 0 : _a.value));
|
|
612
|
+
});
|
|
607
613
|
(0, utils_1.storeSecrets)(environment, updates);
|
|
608
614
|
/*
|
|
609
615
|
* List out all updates to the variables and confirm with the user
|
|
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
25
25
|
}) : function(o, v) {
|
|
26
26
|
o["default"] = v;
|
|
27
27
|
});
|
|
28
|
-
var __importStar = (this && this.__importStar) ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
28
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
45
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
46
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
47
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
25
25
|
}) : function(o, v) {
|
|
26
26
|
o["default"] = v;
|
|
27
27
|
});
|
|
28
|
-
var __importStar = (this && this.__importStar) ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
28
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
45
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
46
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
47
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
25
25
|
}) : function(o, v) {
|
|
26
26
|
o["default"] = v;
|
|
27
27
|
});
|
|
28
|
-
var __importStar = (this && this.__importStar) ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
28
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
45
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
46
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
47
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Secret, Variable } from './github';
|
|
2
2
|
import { Answers } from './custom-types';
|
|
3
3
|
export declare function generateLongPassword(): string;
|
|
4
|
-
export declare function findExistingValue<T extends string>(name: string, type: T, scope: 'ENVIRONMENT' | 'REPOSITORY', existingValues: Array<Secret | Variable>): (T extends
|
|
4
|
+
export declare function findExistingValue<T extends string>(name: string, type: T, scope: 'ENVIRONMENT' | 'REPOSITORY', existingValues: Array<Secret | Variable>): (T extends "SECRET" ? Secret : T extends "VARIABLE" ? Variable : never) | undefined;
|
|
5
5
|
/**
|
|
6
6
|
* Merges and stores secrets in `.env.{environment}` file.
|
|
7
7
|
* Updates existing variables, preserves unchanged ones, adds new ones.
|
|
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
25
25
|
}) : function(o, v) {
|
|
26
26
|
o["default"] = v;
|
|
27
27
|
});
|
|
28
|
-
var __importStar = (this && this.__importStar) ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
28
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
45
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
46
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
37
|
};
|
|
@@ -59,8 +59,8 @@ export declare function field(fieldId: string): {
|
|
|
59
59
|
fieldId: string;
|
|
60
60
|
type: "dateRange";
|
|
61
61
|
options: {
|
|
62
|
-
pivot?: number | undefined;
|
|
63
62
|
days: number;
|
|
63
|
+
pivot?: number | undefined;
|
|
64
64
|
boost?: number | undefined;
|
|
65
65
|
matchAgainst?: string | undefined;
|
|
66
66
|
};
|
package/dist/events/index.js
CHANGED
|
@@ -312,6 +312,7 @@ __export(events_exports, {
|
|
|
312
312
|
getActionAnnotation: () => getActionAnnotation,
|
|
313
313
|
getActionAnnotationFields: () => getActionAnnotationFields,
|
|
314
314
|
getActionConfig: () => getActionConfig,
|
|
315
|
+
getActionFormFields: () => getActionFormFields,
|
|
315
316
|
getActionReview: () => getActionReview,
|
|
316
317
|
getActionReviewFields: () => getActionReviewFields,
|
|
317
318
|
getAdministrativeAreaHierarchy: () => getAdministrativeAreaHierarchy,
|
|
@@ -3235,7 +3236,10 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
3235
3236
|
);
|
|
3236
3237
|
var NotifyConfig = ActionConfigBase.extend(
|
|
3237
3238
|
z24.object({
|
|
3238
|
-
type: z24.literal(ActionType.NOTIFY)
|
|
3239
|
+
type: z24.literal(ActionType.NOTIFY),
|
|
3240
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
3241
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
3242
|
+
)
|
|
3239
3243
|
}).shape
|
|
3240
3244
|
);
|
|
3241
3245
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
@@ -3244,6 +3248,9 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
3244
3248
|
review: DeclarationReviewConfig.describe(
|
|
3245
3249
|
"Configuration of the review page fields."
|
|
3246
3250
|
),
|
|
3251
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
3252
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
3253
|
+
),
|
|
3247
3254
|
dialogCopy: z24.object({
|
|
3248
3255
|
notify: TranslationConfig.describe(
|
|
3249
3256
|
"Confirmation text for the notify action"
|
|
@@ -3259,7 +3266,10 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
3259
3266
|
);
|
|
3260
3267
|
var ArchiveConfig = ActionConfigBase.extend(
|
|
3261
3268
|
z24.object({
|
|
3262
|
-
type: z24.literal(ActionType.ARCHIVE)
|
|
3269
|
+
type: z24.literal(ActionType.ARCHIVE),
|
|
3270
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
3271
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
3272
|
+
)
|
|
3263
3273
|
}).shape
|
|
3264
3274
|
);
|
|
3265
3275
|
var EditActionConfig = ActionConfigBase.extend(
|
|
@@ -3280,12 +3290,18 @@ var EditActionConfig = ActionConfigBase.extend(
|
|
|
3280
3290
|
);
|
|
3281
3291
|
var RejectConfig = ActionConfigBase.extend(
|
|
3282
3292
|
z24.object({
|
|
3283
|
-
type: z24.literal(ActionType.REJECT)
|
|
3293
|
+
type: z24.literal(ActionType.REJECT),
|
|
3294
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
3295
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
3296
|
+
)
|
|
3284
3297
|
}).shape
|
|
3285
3298
|
);
|
|
3286
3299
|
var RegisterConfig = DeclarationActionBase.extend(
|
|
3287
3300
|
z24.object({
|
|
3288
|
-
type: z24.literal(ActionType.REGISTER)
|
|
3301
|
+
type: z24.literal(ActionType.REGISTER),
|
|
3302
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
3303
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
3304
|
+
)
|
|
3289
3305
|
}).shape
|
|
3290
3306
|
);
|
|
3291
3307
|
var PrintCertificateActionConfig = ActionConfigBase.extend(
|
|
@@ -4516,7 +4532,19 @@ function getCustomActionFields(eventConfiguration, customActionType) {
|
|
|
4516
4532
|
customActionType,
|
|
4517
4533
|
actionType: ActionType.CUSTOM
|
|
4518
4534
|
});
|
|
4519
|
-
if (!actionConfig ||
|
|
4535
|
+
if (!actionConfig || actionConfig.type !== ActionType.CUSTOM) {
|
|
4536
|
+
return [];
|
|
4537
|
+
}
|
|
4538
|
+
return actionConfig.form;
|
|
4539
|
+
}
|
|
4540
|
+
function getActionFormFields(eventConfiguration, actionType, customActionType) {
|
|
4541
|
+
const actionConfig = eventConfiguration.actions.find((a) => {
|
|
4542
|
+
if (a.type === ActionType.CUSTOM && customActionType) {
|
|
4543
|
+
return a.customActionType === customActionType;
|
|
4544
|
+
}
|
|
4545
|
+
return a.type === actionType;
|
|
4546
|
+
});
|
|
4547
|
+
if (!actionConfig || !("form" in actionConfig) || actionConfig.form == null) {
|
|
4520
4548
|
return [];
|
|
4521
4549
|
}
|
|
4522
4550
|
return actionConfig.form;
|
|
@@ -4537,13 +4565,9 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
4537
4565
|
if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
|
|
4538
4566
|
return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
|
|
4539
4567
|
}
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
if ("review" in actionConfig && actionConfig.review != null) {
|
|
4544
|
-
return actionConfig.review.fields;
|
|
4545
|
-
}
|
|
4546
|
-
return [];
|
|
4568
|
+
const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
|
|
4569
|
+
const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
|
|
4570
|
+
return [...reviewFields, ...formFields];
|
|
4547
4571
|
};
|
|
4548
4572
|
function getAllAnnotationFields(config) {
|
|
4549
4573
|
return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
|
|
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
25
25
|
}) : function(o, v) {
|
|
26
26
|
o["default"] = v;
|
|
27
27
|
});
|
|
28
|
-
var __importStar = (this && this.__importStar) ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
28
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
45
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
46
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
47
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -92,10 +92,9 @@ const FUNCTION_LIKE_KINDS = [
|
|
|
92
92
|
* Falls back to `<anonymous>` when nothing useful can be derived.
|
|
93
93
|
*/
|
|
94
94
|
function describeFunction(node) {
|
|
95
|
-
var _a;
|
|
96
|
-
var _b, _c;
|
|
95
|
+
var _a, _b, _c;
|
|
97
96
|
if (ts_morph_1.Node.isFunctionDeclaration(node) || ts_morph_1.Node.isMethodDeclaration(node)) {
|
|
98
|
-
return (
|
|
97
|
+
return (_a = node.getName()) !== null && _a !== void 0 ? _a : '<anonymous>';
|
|
99
98
|
}
|
|
100
99
|
// FunctionExpression / ArrowFunction: try to pick up the assignment target.
|
|
101
100
|
const parent = node.getParent();
|
|
@@ -107,7 +106,7 @@ function describeFunction(node) {
|
|
|
107
106
|
}
|
|
108
107
|
if (ts_morph_1.Node.isFunctionExpression(node) &&
|
|
109
108
|
node.getNameNode() !== undefined) {
|
|
110
|
-
return (_c = (
|
|
109
|
+
return (_c = (_b = node.getNameNode()) === null || _b === void 0 ? void 0 : _b.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
|
|
111
110
|
}
|
|
112
111
|
return '<anonymous>';
|
|
113
112
|
}
|
|
@@ -25,23 +25,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
25
25
|
}) : function(o, v) {
|
|
26
26
|
o["default"] = v;
|
|
27
27
|
});
|
|
28
|
-
var __importStar = (this && this.__importStar) ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
28
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
45
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
46
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
47
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -2692,7 +2692,10 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
2692
2692
|
);
|
|
2693
2693
|
var NotifyConfig = ActionConfigBase.extend(
|
|
2694
2694
|
z24.object({
|
|
2695
|
-
type: z24.literal(ActionType.NOTIFY)
|
|
2695
|
+
type: z24.literal(ActionType.NOTIFY),
|
|
2696
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
2697
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
2698
|
+
)
|
|
2696
2699
|
}).shape
|
|
2697
2700
|
);
|
|
2698
2701
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
@@ -2701,6 +2704,9 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
2701
2704
|
review: DeclarationReviewConfig.describe(
|
|
2702
2705
|
"Configuration of the review page fields."
|
|
2703
2706
|
),
|
|
2707
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
2708
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
2709
|
+
),
|
|
2704
2710
|
dialogCopy: z24.object({
|
|
2705
2711
|
notify: TranslationConfig.describe(
|
|
2706
2712
|
"Confirmation text for the notify action"
|
|
@@ -2716,7 +2722,10 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
2716
2722
|
);
|
|
2717
2723
|
var ArchiveConfig = ActionConfigBase.extend(
|
|
2718
2724
|
z24.object({
|
|
2719
|
-
type: z24.literal(ActionType.ARCHIVE)
|
|
2725
|
+
type: z24.literal(ActionType.ARCHIVE),
|
|
2726
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
2727
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
2728
|
+
)
|
|
2720
2729
|
}).shape
|
|
2721
2730
|
);
|
|
2722
2731
|
var EditActionConfig = ActionConfigBase.extend(
|
|
@@ -2737,12 +2746,18 @@ var EditActionConfig = ActionConfigBase.extend(
|
|
|
2737
2746
|
);
|
|
2738
2747
|
var RejectConfig = ActionConfigBase.extend(
|
|
2739
2748
|
z24.object({
|
|
2740
|
-
type: z24.literal(ActionType.REJECT)
|
|
2749
|
+
type: z24.literal(ActionType.REJECT),
|
|
2750
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
2751
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
2752
|
+
)
|
|
2741
2753
|
}).shape
|
|
2742
2754
|
);
|
|
2743
2755
|
var RegisterConfig = DeclarationActionBase.extend(
|
|
2744
2756
|
z24.object({
|
|
2745
|
-
type: z24.literal(ActionType.REGISTER)
|
|
2757
|
+
type: z24.literal(ActionType.REGISTER),
|
|
2758
|
+
form: z24.array(FieldConfig).optional().describe(
|
|
2759
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
2760
|
+
)
|
|
2746
2761
|
}).shape
|
|
2747
2762
|
);
|
|
2748
2763
|
var PrintCertificateActionConfig = ActionConfigBase.extend(
|
|
@@ -3216,13 +3231,9 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
3216
3231
|
if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
|
|
3217
3232
|
return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
|
|
3218
3233
|
}
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
if ("review" in actionConfig && actionConfig.review != null) {
|
|
3223
|
-
return actionConfig.review.fields;
|
|
3224
|
-
}
|
|
3225
|
-
return [];
|
|
3234
|
+
const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
|
|
3235
|
+
const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
|
|
3236
|
+
return [...reviewFields, ...formFields];
|
|
3226
3237
|
};
|
|
3227
3238
|
function getAllAnnotationFields(config) {
|
|
3228
3239
|
return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
|