@opencrvs/toolkit 2.1.0-rc.1dde62b → 2.1.0-rc.27f8b44
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/application-config/index.js +2 -1
- package/dist/commons/api/router.d.ts +3323 -3359
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +32 -323
- package/dist/commons/events/ActionConfig.d.ts +112 -105
- package/dist/commons/events/ActionDocument.d.ts +119 -119
- package/dist/commons/events/ActionInput.d.ts +0 -6
- package/dist/commons/events/ActionType.d.ts +62 -62
- package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -507
- package/dist/commons/events/AuditLog.d.ts +43 -43
- 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 +37 -37
- 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 +48 -48
- 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 +336 -336
- 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 +826 -826
- 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 +69 -198
- 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 +35 -38
- package/dist/commons/events/utils.d.ts +122 -114
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/environment/derived-variables.d.ts +119 -119
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/logger.d.ts +3 -12
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/manage-users.js +17 -7
- package/dist/environment/questions.d.ts +75 -74
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +8 -14
- package/dist/environment/swarm-to-k8s.js +17 -7
- package/dist/environment/update-workflows.js +17 -7
- package/dist/environment/users.js +17 -7
- package/dist/environment/utils.d.ts +1 -1
- package/dist/environment/utils.js +17 -7
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +32 -18
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
- package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
- package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
- package/dist/notification/index.js +18 -16
- package/dist/scopes/index.d.ts +146 -146
- package/opencrvs-toolkit-2.1.0-rc.27f8b44.tgz +0 -0
- package/package.json +5 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.1dde62b.tgz +0 -0
|
@@ -25,13 +25,23 @@ 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) || function (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
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
|
+
})();
|
|
35
45
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
46
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
47
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -25,13 +25,23 @@ 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) || function (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
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
|
+
})();
|
|
35
45
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
46
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
47
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -25,13 +25,23 @@ 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) || function (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
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
|
+
})();
|
|
35
45
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
46
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
47
|
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,13 +25,23 @@ 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) || function (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
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
|
+
})();
|
|
35
45
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
46
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
47
|
};
|
package/dist/events/index.js
CHANGED
|
@@ -313,6 +313,7 @@ __export(events_exports, {
|
|
|
313
313
|
getActionAnnotation: () => getActionAnnotation,
|
|
314
314
|
getActionAnnotationFields: () => getActionAnnotationFields,
|
|
315
315
|
getActionConfig: () => getActionConfig,
|
|
316
|
+
getActionFormFields: () => getActionFormFields,
|
|
316
317
|
getActionReview: () => getActionReview,
|
|
317
318
|
getActionReviewFields: () => getActionReviewFields,
|
|
318
319
|
getAdministrativeAreaHierarchy: () => getAdministrativeAreaHierarchy,
|
|
@@ -1675,9 +1676,10 @@ var NotifiedAction = ActionBase.extend(
|
|
|
1675
1676
|
var EditAction = ActionBase.extend(
|
|
1676
1677
|
z14.object({
|
|
1677
1678
|
type: z14.literal(ActionType.EDIT),
|
|
1679
|
+
/** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
|
|
1678
1680
|
content: z14.object({
|
|
1679
1681
|
comment: z14.string().describe("Comment for the edit action.").optional()
|
|
1680
|
-
})
|
|
1682
|
+
}).optional()
|
|
1681
1683
|
}).shape
|
|
1682
1684
|
);
|
|
1683
1685
|
var PrintContent = z14.object({
|
|
@@ -3238,6 +3240,9 @@ var ActionConfigBase = z24.object({
|
|
|
3238
3240
|
var DeclarationActionBase = ActionConfigBase.extend({
|
|
3239
3241
|
deduplication: DeduplicationConfig.optional()
|
|
3240
3242
|
});
|
|
3243
|
+
var actionConfirmationForm = z24.array(FieldConfig).optional().describe(
|
|
3244
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
3245
|
+
);
|
|
3241
3246
|
var ReadActionConfig = ActionConfigBase.extend(
|
|
3242
3247
|
z24.object({
|
|
3243
3248
|
type: z24.literal(ActionType.READ),
|
|
@@ -3249,7 +3254,8 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
3249
3254
|
);
|
|
3250
3255
|
var NotifyConfig = ActionConfigBase.extend(
|
|
3251
3256
|
z24.object({
|
|
3252
|
-
type: z24.literal(ActionType.NOTIFY)
|
|
3257
|
+
type: z24.literal(ActionType.NOTIFY),
|
|
3258
|
+
form: actionConfirmationForm
|
|
3253
3259
|
}).shape
|
|
3254
3260
|
);
|
|
3255
3261
|
var DuplicateDetectedConfig = ActionConfigBase.extend(
|
|
@@ -3304,6 +3310,7 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
3304
3310
|
review: DeclarationReviewConfig.describe(
|
|
3305
3311
|
"Configuration of the review page fields."
|
|
3306
3312
|
),
|
|
3313
|
+
form: actionConfirmationForm,
|
|
3307
3314
|
dialogCopy: z24.object({
|
|
3308
3315
|
notify: TranslationConfig.describe(
|
|
3309
3316
|
"Confirmation text for the notify action"
|
|
@@ -3319,7 +3326,8 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
3319
3326
|
);
|
|
3320
3327
|
var ArchiveConfig = ActionConfigBase.extend(
|
|
3321
3328
|
z24.object({
|
|
3322
|
-
type: z24.literal(ActionType.ARCHIVE)
|
|
3329
|
+
type: z24.literal(ActionType.ARCHIVE),
|
|
3330
|
+
form: actionConfirmationForm
|
|
3323
3331
|
}).shape
|
|
3324
3332
|
);
|
|
3325
3333
|
var UnarchiveConfig = ActionConfigBase.extend(
|
|
@@ -3345,12 +3353,14 @@ var EditActionConfig = ActionConfigBase.extend(
|
|
|
3345
3353
|
);
|
|
3346
3354
|
var RejectConfig = ActionConfigBase.extend(
|
|
3347
3355
|
z24.object({
|
|
3348
|
-
type: z24.literal(ActionType.REJECT)
|
|
3356
|
+
type: z24.literal(ActionType.REJECT),
|
|
3357
|
+
form: actionConfirmationForm
|
|
3349
3358
|
}).shape
|
|
3350
3359
|
);
|
|
3351
3360
|
var RegisterConfig = DeclarationActionBase.extend(
|
|
3352
3361
|
z24.object({
|
|
3353
|
-
type: z24.literal(ActionType.REGISTER)
|
|
3362
|
+
type: z24.literal(ActionType.REGISTER),
|
|
3363
|
+
form: actionConfirmationForm
|
|
3354
3364
|
}).shape
|
|
3355
3365
|
);
|
|
3356
3366
|
var PrintCertificateActionConfig = ActionConfigBase.extend(
|
|
@@ -4624,7 +4634,19 @@ function getCustomActionFields(eventConfiguration, customActionType) {
|
|
|
4624
4634
|
customActionType,
|
|
4625
4635
|
actionType: ActionType.CUSTOM
|
|
4626
4636
|
});
|
|
4627
|
-
if (!actionConfig ||
|
|
4637
|
+
if (!actionConfig || actionConfig.type !== ActionType.CUSTOM) {
|
|
4638
|
+
return [];
|
|
4639
|
+
}
|
|
4640
|
+
return actionConfig.form;
|
|
4641
|
+
}
|
|
4642
|
+
function getActionFormFields(eventConfiguration, actionType, customActionType) {
|
|
4643
|
+
const actionConfig = eventConfiguration.actions.find((a) => {
|
|
4644
|
+
if (a.type === ActionType.CUSTOM && customActionType) {
|
|
4645
|
+
return a.customActionType === customActionType;
|
|
4646
|
+
}
|
|
4647
|
+
return a.type === actionType;
|
|
4648
|
+
});
|
|
4649
|
+
if (!actionConfig || !("form" in actionConfig) || actionConfig.form == null) {
|
|
4628
4650
|
return [];
|
|
4629
4651
|
}
|
|
4630
4652
|
return actionConfig.form;
|
|
@@ -4645,13 +4667,9 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
4645
4667
|
if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
|
|
4646
4668
|
return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
|
|
4647
4669
|
}
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
if ("review" in actionConfig && actionConfig.review != null) {
|
|
4652
|
-
return actionConfig.review.fields;
|
|
4653
|
-
}
|
|
4654
|
-
return [];
|
|
4670
|
+
const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
|
|
4671
|
+
const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
|
|
4672
|
+
return [...reviewFields, ...formFields];
|
|
4655
4673
|
};
|
|
4656
4674
|
function getAllAnnotationFields(config) {
|
|
4657
4675
|
return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
|
|
@@ -6398,10 +6416,7 @@ var DeclareActionInput = BaseActionInput.extend(
|
|
|
6398
6416
|
);
|
|
6399
6417
|
var EditActionInput = BaseActionInput.extend(
|
|
6400
6418
|
z38.object({
|
|
6401
|
-
type: z38.literal(ActionType.EDIT).default(ActionType.EDIT)
|
|
6402
|
-
content: z38.object({
|
|
6403
|
-
comment: z38.string().describe("Comment for the edit action.").optional()
|
|
6404
|
-
})
|
|
6419
|
+
type: z38.literal(ActionType.EDIT).default(ActionType.EDIT)
|
|
6405
6420
|
}).shape
|
|
6406
6421
|
);
|
|
6407
6422
|
var PrintCertificateActionInput = BaseActionInput.extend(
|
|
@@ -9946,7 +9961,6 @@ function eventPayloadGenerator(rng, configuration = tennisClubMembershipEvent) {
|
|
|
9946
9961
|
},
|
|
9947
9962
|
edit: (eventId, input = {}) => ({
|
|
9948
9963
|
type: ActionType.EDIT,
|
|
9949
|
-
content: { comment: "Test comment" },
|
|
9950
9964
|
transactionId: input.transactionId ?? getUUID(),
|
|
9951
9965
|
declaration: input.declaration ?? generateActionDeclarationInput(configuration, ActionType.EDIT, rng),
|
|
9952
9966
|
annotation: input.annotation ?? generateActionAnnotationInput(configuration, ActionType.EDIT, rng),
|
|
@@ -25,13 +25,23 @@ 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) || function (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
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
|
+
})();
|
|
35
45
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
46
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
47
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -92,9 +92,10 @@ 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
|
|
95
|
+
var _a;
|
|
96
|
+
var _b, _c;
|
|
96
97
|
if (ts_morph_1.Node.isFunctionDeclaration(node) || ts_morph_1.Node.isMethodDeclaration(node)) {
|
|
97
|
-
return (
|
|
98
|
+
return (_b = node.getName()) !== null && _b !== void 0 ? _b : '<anonymous>';
|
|
98
99
|
}
|
|
99
100
|
// FunctionExpression / ArrowFunction: try to pick up the assignment target.
|
|
100
101
|
const parent = node.getParent();
|
|
@@ -106,7 +107,7 @@ function describeFunction(node) {
|
|
|
106
107
|
}
|
|
107
108
|
if (ts_morph_1.Node.isFunctionExpression(node) &&
|
|
108
109
|
node.getNameNode() !== undefined) {
|
|
109
|
-
return (_c = (
|
|
110
|
+
return (_c = (_a = node.getNameNode()) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _c !== void 0 ? _c : '<anonymous>';
|
|
110
111
|
}
|
|
111
112
|
return '<anonymous>';
|
|
112
113
|
}
|
|
@@ -25,13 +25,23 @@ 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) || function (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
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
|
+
})();
|
|
35
45
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
46
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
47
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -1216,9 +1216,10 @@ var NotifiedAction = ActionBase.extend(
|
|
|
1216
1216
|
var EditAction = ActionBase.extend(
|
|
1217
1217
|
z14.object({
|
|
1218
1218
|
type: z14.literal(ActionType.EDIT),
|
|
1219
|
+
/** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
|
|
1219
1220
|
content: z14.object({
|
|
1220
1221
|
comment: z14.string().describe("Comment for the edit action.").optional()
|
|
1221
|
-
})
|
|
1222
|
+
}).optional()
|
|
1222
1223
|
}).shape
|
|
1223
1224
|
);
|
|
1224
1225
|
var PrintContent = z14.object({
|
|
@@ -2694,6 +2695,9 @@ var ActionConfigBase = z24.object({
|
|
|
2694
2695
|
var DeclarationActionBase = ActionConfigBase.extend({
|
|
2695
2696
|
deduplication: DeduplicationConfig.optional()
|
|
2696
2697
|
});
|
|
2698
|
+
var actionConfirmationForm = z24.array(FieldConfig).optional().describe(
|
|
2699
|
+
"Fields rendered on the action confirmation dialog. Submitted values are stored in the action annotation and shown in the audit history."
|
|
2700
|
+
);
|
|
2697
2701
|
var ReadActionConfig = ActionConfigBase.extend(
|
|
2698
2702
|
z24.object({
|
|
2699
2703
|
type: z24.literal(ActionType.READ),
|
|
@@ -2705,7 +2709,8 @@ var ReadActionConfig = ActionConfigBase.extend(
|
|
|
2705
2709
|
);
|
|
2706
2710
|
var NotifyConfig = ActionConfigBase.extend(
|
|
2707
2711
|
z24.object({
|
|
2708
|
-
type: z24.literal(ActionType.NOTIFY)
|
|
2712
|
+
type: z24.literal(ActionType.NOTIFY),
|
|
2713
|
+
form: actionConfirmationForm
|
|
2709
2714
|
}).shape
|
|
2710
2715
|
);
|
|
2711
2716
|
var DuplicateDetectedConfig = ActionConfigBase.extend(
|
|
@@ -2760,6 +2765,7 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
2760
2765
|
review: DeclarationReviewConfig.describe(
|
|
2761
2766
|
"Configuration of the review page fields."
|
|
2762
2767
|
),
|
|
2768
|
+
form: actionConfirmationForm,
|
|
2763
2769
|
dialogCopy: z24.object({
|
|
2764
2770
|
notify: TranslationConfig.describe(
|
|
2765
2771
|
"Confirmation text for the notify action"
|
|
@@ -2775,7 +2781,8 @@ var DeclareConfig = DeclarationActionBase.extend(
|
|
|
2775
2781
|
);
|
|
2776
2782
|
var ArchiveConfig = ActionConfigBase.extend(
|
|
2777
2783
|
z24.object({
|
|
2778
|
-
type: z24.literal(ActionType.ARCHIVE)
|
|
2784
|
+
type: z24.literal(ActionType.ARCHIVE),
|
|
2785
|
+
form: actionConfirmationForm
|
|
2779
2786
|
}).shape
|
|
2780
2787
|
);
|
|
2781
2788
|
var UnarchiveConfig = ActionConfigBase.extend(
|
|
@@ -2801,12 +2808,14 @@ var EditActionConfig = ActionConfigBase.extend(
|
|
|
2801
2808
|
);
|
|
2802
2809
|
var RejectConfig = ActionConfigBase.extend(
|
|
2803
2810
|
z24.object({
|
|
2804
|
-
type: z24.literal(ActionType.REJECT)
|
|
2811
|
+
type: z24.literal(ActionType.REJECT),
|
|
2812
|
+
form: actionConfirmationForm
|
|
2805
2813
|
}).shape
|
|
2806
2814
|
);
|
|
2807
2815
|
var RegisterConfig = DeclarationActionBase.extend(
|
|
2808
2816
|
z24.object({
|
|
2809
|
-
type: z24.literal(ActionType.REGISTER)
|
|
2817
|
+
type: z24.literal(ActionType.REGISTER),
|
|
2818
|
+
form: actionConfirmationForm
|
|
2810
2819
|
}).shape
|
|
2811
2820
|
);
|
|
2812
2821
|
var PrintCertificateActionConfig = ActionConfigBase.extend(
|
|
@@ -3326,13 +3335,9 @@ var getActionAnnotationFields = (actionConfig) => {
|
|
|
3326
3335
|
if (actionConfig.type === ActionType.PRINT_CERTIFICATE) {
|
|
3327
3336
|
return actionConfig.printForm.pages.flatMap(({ fields }) => fields);
|
|
3328
3337
|
}
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
if ("review" in actionConfig && actionConfig.review != null) {
|
|
3333
|
-
return actionConfig.review.fields;
|
|
3334
|
-
}
|
|
3335
|
-
return [];
|
|
3338
|
+
const reviewFields = "review" in actionConfig && actionConfig.review != null ? actionConfig.review.fields : [];
|
|
3339
|
+
const formFields = "form" in actionConfig && actionConfig.form != null ? actionConfig.form : [];
|
|
3340
|
+
return [...reviewFields, ...formFields];
|
|
3336
3341
|
};
|
|
3337
3342
|
function getAllAnnotationFields(config) {
|
|
3338
3343
|
return (0, import_lodash.flattenDeep)(config.actions.map(getActionAnnotationFields));
|
|
@@ -4648,10 +4653,7 @@ var DeclareActionInput = BaseActionInput.extend(
|
|
|
4648
4653
|
);
|
|
4649
4654
|
var EditActionInput = BaseActionInput.extend(
|
|
4650
4655
|
z38.object({
|
|
4651
|
-
type: z38.literal(ActionType.EDIT).default(ActionType.EDIT)
|
|
4652
|
-
content: z38.object({
|
|
4653
|
-
comment: z38.string().describe("Comment for the edit action.").optional()
|
|
4654
|
-
})
|
|
4656
|
+
type: z38.literal(ActionType.EDIT).default(ActionType.EDIT)
|
|
4655
4657
|
}).shape
|
|
4656
4658
|
);
|
|
4657
4659
|
var PrintCertificateActionInput = BaseActionInput.extend(
|