@opencrvs/toolkit 1.9.16-rc.5b72bdc → 1.9.16-rc.82b1628
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 +198 -193
- package/dist/commons/events/ActionConfig.d.ts +28 -0
- package/dist/commons/events/ActionDocument.d.ts +129 -129
- package/dist/commons/events/Draft.d.ts +5 -5
- package/dist/commons/events/EventConfig.d.ts +25 -0
- package/dist/commons/events/EventDocument.d.ts +90 -90
- package/dist/commons/events/EventIndex.d.ts +17 -17
- package/dist/commons/events/EventMetadata.d.ts +33 -33
- package/dist/commons/events/FormConfig.d.ts +30 -0
- package/dist/commons/events/PageConfig.d.ts +6 -0
- package/dist/commons/events/defineConfig.d.ts +5 -0
- package/dist/commons/events/state/index.d.ts +3 -3
- package/dist/commons/events/state/utils.d.ts +20 -20
- package/dist/commons/events/utils.d.ts +9 -0
- package/dist/events/index.js +13 -5
- package/dist/notification/index.js +13 -5
- package/dist/scopes/index.d.ts +3 -2
- package/dist/scopes/index.js +6 -2
- package/package.json +1 -1
package/dist/events/index.js
CHANGED
|
@@ -1037,7 +1037,9 @@ var SCOPES = {
|
|
|
1037
1037
|
// config
|
|
1038
1038
|
CONFIG_UPDATE_ALL: "config.update:all",
|
|
1039
1039
|
// data seeding
|
|
1040
|
-
USER_DATA_SEEDING: "user.data-seeding"
|
|
1040
|
+
USER_DATA_SEEDING: "user.data-seeding",
|
|
1041
|
+
// bootstrap: allows countryconfig to register integrations on startup
|
|
1042
|
+
INTEGRATION_CREATE: "integration.create"
|
|
1041
1043
|
};
|
|
1042
1044
|
var LegacyScopes = import_zod11.z.union([
|
|
1043
1045
|
import_zod11.z.literal(SCOPES.BYPASSRATELIMIT),
|
|
@@ -1112,6 +1114,7 @@ var UserScopes = import_zod11.z.union([
|
|
|
1112
1114
|
]);
|
|
1113
1115
|
var ConfigScope = import_zod11.z.literal(SCOPES.CONFIG_UPDATE_ALL);
|
|
1114
1116
|
var DataSeedingScope = import_zod11.z.literal(SCOPES.USER_DATA_SEEDING);
|
|
1117
|
+
var IntegrationCreateScope = import_zod11.z.literal(SCOPES.INTEGRATION_CREATE);
|
|
1115
1118
|
var LiteralScopes = import_zod11.z.union([
|
|
1116
1119
|
LegacyScopes,
|
|
1117
1120
|
IntegrationScopes,
|
|
@@ -1129,7 +1132,8 @@ var LiteralScopes = import_zod11.z.union([
|
|
|
1129
1132
|
UserScopes,
|
|
1130
1133
|
ConfigScope,
|
|
1131
1134
|
DataSeedingScope,
|
|
1132
|
-
InternalOperationsScopes
|
|
1135
|
+
InternalOperationsScopes,
|
|
1136
|
+
IntegrationCreateScope
|
|
1133
1137
|
]);
|
|
1134
1138
|
var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
|
|
1135
1139
|
var rawConfigurableScope = import_zod11.z.string().regex(rawConfigurableScopeRegex);
|
|
@@ -1414,7 +1418,7 @@ var ActionBase = import_zod13.z.object({
|
|
|
1414
1418
|
),
|
|
1415
1419
|
createdAt: import_zod13.z.string().datetime().describe("Timestamp indicating when the action was created."),
|
|
1416
1420
|
createdBy: import_zod13.z.string().describe("Identifier of the user who created the action."),
|
|
1417
|
-
createdByRole: import_zod13.z.string().describe("Role of the user who created the action."),
|
|
1421
|
+
createdByRole: import_zod13.z.string().optional().describe("Role of the user who created the action."),
|
|
1418
1422
|
createdBySignature: import_zod13.z.string().nullish().describe("Reference to the signature of the user who created the action."),
|
|
1419
1423
|
createdAtLocation: CreatedAtLocation.describe(
|
|
1420
1424
|
"Reference to the location of the user who created the action."
|
|
@@ -1618,7 +1622,7 @@ var ActionCreationMetadata = import_zod14.z.object({
|
|
|
1618
1622
|
),
|
|
1619
1623
|
createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1620
1624
|
acceptedAt: import_zod14.z.string().datetime().describe("Timestamp when the action request was accepted."),
|
|
1621
|
-
createdByRole: import_zod14.z.string().describe("Role of the user at the time of action request creation."),
|
|
1625
|
+
createdByRole: import_zod14.z.string().optional().describe("Role of the user at the time of action request creation."),
|
|
1622
1626
|
createdBySignature: import_zod14.z.string().nullish().describe("Signature of the user who created the action request.")
|
|
1623
1627
|
});
|
|
1624
1628
|
var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
@@ -1641,7 +1645,7 @@ var EventMetadata = import_zod14.z.object({
|
|
|
1641
1645
|
dateOfEvent: ZodDate.nullish(),
|
|
1642
1646
|
createdBy: import_zod14.z.string().describe("ID of the user who created the event."),
|
|
1643
1647
|
createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1644
|
-
updatedByUserRole: import_zod14.z.string().describe("Role of the user who last changed the status."),
|
|
1648
|
+
updatedByUserRole: import_zod14.z.string().optional().describe("Role of the user who last changed the status."),
|
|
1645
1649
|
createdAtLocation: CreatedAtLocation.describe(
|
|
1646
1650
|
"Location of the user who created the event."
|
|
1647
1651
|
),
|
|
@@ -2590,6 +2594,9 @@ var PageConfigBase = import_zod18.z.object({
|
|
|
2590
2594
|
requireCompletionToContinue: import_zod18.z.boolean().default(false).describe(
|
|
2591
2595
|
"If true, all required fields must be filled before continuing to the next page"
|
|
2592
2596
|
),
|
|
2597
|
+
showClearButton: import_zod18.z.boolean().optional().describe(
|
|
2598
|
+
'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
|
|
2599
|
+
),
|
|
2593
2600
|
fields: import_zod18.z.array(FieldConfig).describe("Fields to be rendered on the page"),
|
|
2594
2601
|
conditional: Conditional.optional().describe(
|
|
2595
2602
|
"Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
|
|
@@ -6747,6 +6754,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
|
|
|
6747
6754
|
defaultMessage: "Who is applying for the membership?",
|
|
6748
6755
|
description: "This is the title of the section"
|
|
6749
6756
|
},
|
|
6757
|
+
showClearButton: true,
|
|
6750
6758
|
fields: [
|
|
6751
6759
|
{
|
|
6752
6760
|
id: "applicant.name",
|
|
@@ -671,7 +671,9 @@ var SCOPES = {
|
|
|
671
671
|
// config
|
|
672
672
|
CONFIG_UPDATE_ALL: "config.update:all",
|
|
673
673
|
// data seeding
|
|
674
|
-
USER_DATA_SEEDING: "user.data-seeding"
|
|
674
|
+
USER_DATA_SEEDING: "user.data-seeding",
|
|
675
|
+
// bootstrap: allows countryconfig to register integrations on startup
|
|
676
|
+
INTEGRATION_CREATE: "integration.create"
|
|
675
677
|
};
|
|
676
678
|
var LegacyScopes = import_zod11.z.union([
|
|
677
679
|
import_zod11.z.literal(SCOPES.BYPASSRATELIMIT),
|
|
@@ -746,6 +748,7 @@ var UserScopes = import_zod11.z.union([
|
|
|
746
748
|
]);
|
|
747
749
|
var ConfigScope = import_zod11.z.literal(SCOPES.CONFIG_UPDATE_ALL);
|
|
748
750
|
var DataSeedingScope = import_zod11.z.literal(SCOPES.USER_DATA_SEEDING);
|
|
751
|
+
var IntegrationCreateScope = import_zod11.z.literal(SCOPES.INTEGRATION_CREATE);
|
|
749
752
|
var LiteralScopes = import_zod11.z.union([
|
|
750
753
|
LegacyScopes,
|
|
751
754
|
IntegrationScopes,
|
|
@@ -763,7 +766,8 @@ var LiteralScopes = import_zod11.z.union([
|
|
|
763
766
|
UserScopes,
|
|
764
767
|
ConfigScope,
|
|
765
768
|
DataSeedingScope,
|
|
766
|
-
InternalOperationsScopes
|
|
769
|
+
InternalOperationsScopes,
|
|
770
|
+
IntegrationCreateScope
|
|
767
771
|
]);
|
|
768
772
|
var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
|
|
769
773
|
var rawConfigurableScope = import_zod11.z.string().regex(rawConfigurableScopeRegex);
|
|
@@ -994,7 +998,7 @@ var ActionBase = import_zod13.z.object({
|
|
|
994
998
|
),
|
|
995
999
|
createdAt: import_zod13.z.string().datetime().describe("Timestamp indicating when the action was created."),
|
|
996
1000
|
createdBy: import_zod13.z.string().describe("Identifier of the user who created the action."),
|
|
997
|
-
createdByRole: import_zod13.z.string().describe("Role of the user who created the action."),
|
|
1001
|
+
createdByRole: import_zod13.z.string().optional().describe("Role of the user who created the action."),
|
|
998
1002
|
createdBySignature: import_zod13.z.string().nullish().describe("Reference to the signature of the user who created the action."),
|
|
999
1003
|
createdAtLocation: CreatedAtLocation.describe(
|
|
1000
1004
|
"Reference to the location of the user who created the action."
|
|
@@ -1198,7 +1202,7 @@ var ActionCreationMetadata = import_zod14.z.object({
|
|
|
1198
1202
|
),
|
|
1199
1203
|
createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1200
1204
|
acceptedAt: import_zod14.z.string().datetime().describe("Timestamp when the action request was accepted."),
|
|
1201
|
-
createdByRole: import_zod14.z.string().describe("Role of the user at the time of action request creation."),
|
|
1205
|
+
createdByRole: import_zod14.z.string().optional().describe("Role of the user at the time of action request creation."),
|
|
1202
1206
|
createdBySignature: import_zod14.z.string().nullish().describe("Signature of the user who created the action request.")
|
|
1203
1207
|
});
|
|
1204
1208
|
var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
@@ -1221,7 +1225,7 @@ var EventMetadata = import_zod14.z.object({
|
|
|
1221
1225
|
dateOfEvent: ZodDate.nullish(),
|
|
1222
1226
|
createdBy: import_zod14.z.string().describe("ID of the user who created the event."),
|
|
1223
1227
|
createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1224
|
-
updatedByUserRole: import_zod14.z.string().describe("Role of the user who last changed the status."),
|
|
1228
|
+
updatedByUserRole: import_zod14.z.string().optional().describe("Role of the user who last changed the status."),
|
|
1225
1229
|
createdAtLocation: CreatedAtLocation.describe(
|
|
1226
1230
|
"Location of the user who created the event."
|
|
1227
1231
|
),
|
|
@@ -2086,6 +2090,9 @@ var PageConfigBase = import_zod18.z.object({
|
|
|
2086
2090
|
requireCompletionToContinue: import_zod18.z.boolean().default(false).describe(
|
|
2087
2091
|
"If true, all required fields must be filled before continuing to the next page"
|
|
2088
2092
|
),
|
|
2093
|
+
showClearButton: import_zod18.z.boolean().optional().describe(
|
|
2094
|
+
'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
|
|
2095
|
+
),
|
|
2089
2096
|
fields: import_zod18.z.array(FieldConfig).describe("Fields to be rendered on the page"),
|
|
2090
2097
|
conditional: Conditional.optional().describe(
|
|
2091
2098
|
"Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
|
|
@@ -4872,6 +4879,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
|
|
|
4872
4879
|
defaultMessage: "Who is applying for the membership?",
|
|
4873
4880
|
description: "This is the title of the section"
|
|
4874
4881
|
},
|
|
4882
|
+
showClearButton: true,
|
|
4875
4883
|
fields: [
|
|
4876
4884
|
{
|
|
4877
4885
|
id: "applicant.name",
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -61,9 +61,10 @@ export declare const SCOPES: {
|
|
|
61
61
|
readonly USER_UPDATE_MY_JURISDICTION: "user.update:my-jurisdiction";
|
|
62
62
|
readonly CONFIG_UPDATE_ALL: "config.update:all";
|
|
63
63
|
readonly USER_DATA_SEEDING: "user.data-seeding";
|
|
64
|
+
readonly INTEGRATION_CREATE: "integration.create";
|
|
64
65
|
};
|
|
65
66
|
export declare const SearchScopes: z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>;
|
|
66
|
-
declare const LiteralScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<[z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<[z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<[z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>, z.ZodLiteral<"record.read">, z.ZodLiteral<"profile.electronic-signature">, z.ZodUnion<[z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<[z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<[z.ZodLiteral<"user.read:all">, z.ZodLiteral<"user.read:my-office">, z.ZodLiteral<"user.read:my-jurisdiction">, z.ZodLiteral<"user.read:only-my-audit">, z.ZodLiteral<"user.create:all">, z.ZodLiteral<"user.create:my-jurisdiction">, z.ZodLiteral<"user.update:all">, z.ZodLiteral<"user.update:my-jurisdiction">]>, z.ZodLiteral<"config.update:all">, z.ZodLiteral<"user.data-seeding">, z.ZodUnion<[z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>]>;
|
|
67
|
+
declare const LiteralScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<[z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<[z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<[z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>, z.ZodLiteral<"record.read">, z.ZodLiteral<"profile.electronic-signature">, z.ZodUnion<[z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<[z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<[z.ZodLiteral<"user.read:all">, z.ZodLiteral<"user.read:my-office">, z.ZodLiteral<"user.read:my-jurisdiction">, z.ZodLiteral<"user.read:only-my-audit">, z.ZodLiteral<"user.create:all">, z.ZodLiteral<"user.create:my-jurisdiction">, z.ZodLiteral<"user.update:all">, z.ZodLiteral<"user.update:my-jurisdiction">]>, z.ZodLiteral<"config.update:all">, z.ZodLiteral<"user.data-seeding">, z.ZodUnion<[z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>, z.ZodLiteral<"integration.create">]>;
|
|
67
68
|
declare const SearchScope: z.ZodObject<{
|
|
68
69
|
type: z.ZodLiteral<"search">;
|
|
69
70
|
options: z.ZodObject<{
|
|
@@ -354,7 +355,7 @@ export declare function parseConfigurableScope(scope: string): {
|
|
|
354
355
|
};
|
|
355
356
|
} | undefined;
|
|
356
357
|
export declare function parseLiteralScope(scope: string): {
|
|
357
|
-
type: "bypassratelimit" | "register" | "demo" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.import" | "record.reindex" | "record.declare-birth" | "record.declare-birth:my-jurisdiction" | "record.declare-death" | "record.declare-death:my-jurisdiction" | "record.declare-marriage" | "record.declare-marriage:my-jurisdiction" | "record.declaration-submit-incomplete" | "record.declaration-submit-for-review" | "record.unassign-others" | "record.declaration-submit-for-approval" | "record.declaration-submit-for-updates" | "record.declaration-edit" | "record.review-duplicates" | "record.declaration-archive" | "record.declaration-reinstate" | "record.register" | "record.registration-print&issue-certified-copies" | "record.registration-request-correction" | "record.registration-correct" | "record.confirm-registration" | "record.reject-registration" | "search.birth:my-jurisdiction" | "search.birth" | "search.death:my-jurisdiction" | "search.death" | "search.marriage:my-jurisdiction" | "search.marriage" | "record.read" | "profile.electronic-signature" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "organisation.read-locations:all" | "organisation.read-locations:my-office" | "organisation.read-locations:my-jurisdiction" | "user.read:all" | "user.read:my-office" | "user.read:my-jurisdiction" | "user.read:only-my-audit" | "user.create:all" | "user.create:my-jurisdiction" | "user.update:all" | "user.update:my-jurisdiction" | "config.update:all" | "user.data-seeding";
|
|
358
|
+
type: "bypassratelimit" | "register" | "demo" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.import" | "record.reindex" | "record.declare-birth" | "record.declare-birth:my-jurisdiction" | "record.declare-death" | "record.declare-death:my-jurisdiction" | "record.declare-marriage" | "record.declare-marriage:my-jurisdiction" | "record.declaration-submit-incomplete" | "record.declaration-submit-for-review" | "record.unassign-others" | "record.declaration-submit-for-approval" | "record.declaration-submit-for-updates" | "record.declaration-edit" | "record.review-duplicates" | "record.declaration-archive" | "record.declaration-reinstate" | "record.register" | "record.registration-print&issue-certified-copies" | "record.registration-request-correction" | "record.registration-correct" | "record.confirm-registration" | "record.reject-registration" | "search.birth:my-jurisdiction" | "search.birth" | "search.death:my-jurisdiction" | "search.death" | "search.marriage:my-jurisdiction" | "search.marriage" | "record.read" | "profile.electronic-signature" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "organisation.read-locations:all" | "organisation.read-locations:my-office" | "organisation.read-locations:my-jurisdiction" | "user.read:all" | "user.read:my-office" | "user.read:my-jurisdiction" | "user.read:only-my-audit" | "user.create:all" | "user.create:my-jurisdiction" | "user.update:all" | "user.update:my-jurisdiction" | "config.update:all" | "user.data-seeding" | "integration.create";
|
|
358
359
|
} | undefined;
|
|
359
360
|
/**
|
|
360
361
|
* Stringifies a ConfigurableScopes object into a scope string.
|
package/dist/scopes/index.js
CHANGED
|
@@ -112,7 +112,9 @@ var SCOPES = {
|
|
|
112
112
|
// config
|
|
113
113
|
CONFIG_UPDATE_ALL: "config.update:all",
|
|
114
114
|
// data seeding
|
|
115
|
-
USER_DATA_SEEDING: "user.data-seeding"
|
|
115
|
+
USER_DATA_SEEDING: "user.data-seeding",
|
|
116
|
+
// bootstrap: allows countryconfig to register integrations on startup
|
|
117
|
+
INTEGRATION_CREATE: "integration.create"
|
|
116
118
|
};
|
|
117
119
|
var LegacyScopes = import_zod.z.union([
|
|
118
120
|
import_zod.z.literal(SCOPES.BYPASSRATELIMIT),
|
|
@@ -187,6 +189,7 @@ var UserScopes = import_zod.z.union([
|
|
|
187
189
|
]);
|
|
188
190
|
var ConfigScope = import_zod.z.literal(SCOPES.CONFIG_UPDATE_ALL);
|
|
189
191
|
var DataSeedingScope = import_zod.z.literal(SCOPES.USER_DATA_SEEDING);
|
|
192
|
+
var IntegrationCreateScope = import_zod.z.literal(SCOPES.INTEGRATION_CREATE);
|
|
190
193
|
var LiteralScopes = import_zod.z.union([
|
|
191
194
|
LegacyScopes,
|
|
192
195
|
IntegrationScopes,
|
|
@@ -204,7 +207,8 @@ var LiteralScopes = import_zod.z.union([
|
|
|
204
207
|
UserScopes,
|
|
205
208
|
ConfigScope,
|
|
206
209
|
DataSeedingScope,
|
|
207
|
-
InternalOperationsScopes
|
|
210
|
+
InternalOperationsScopes,
|
|
211
|
+
IntegrationCreateScope
|
|
208
212
|
]);
|
|
209
213
|
var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
|
|
210
214
|
var rawConfigurableScope = import_zod.z.string().regex(rawConfigurableScopeRegex);
|