@knkcs/importhub-ui 0.1.0 → 0.2.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.
- package/CHANGELOG.md +7 -0
- package/README.md +16 -4
- package/dist/importhub-client-CYqd7Eeq.js +16 -0
- package/dist/importhub-client-CYqd7Eeq.js.map +1 -0
- package/dist/index.d.ts +628 -13
- package/dist/index.js +1718 -97
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +235 -14
- package/dist/testing.js +411 -41
- package/dist/testing.js.map +1 -1
- package/package.json +10 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../gen/ts/importhub/v1/configuration_pb.ts","../../../gen/ts/importhub/v1/entity_set_pb.ts","../../../gen/ts/importhub/v1/import_profile_pb.ts","../src/client/connect-importhub-client.ts","../src/i18n/resources.ts","../src/common/host.tsx","../src/common/change-set-link.tsx","../src/common/query-keys.ts","../src/common/start-page.tsx"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/configuration.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/configuration.proto.\n */\nexport const file_importhub_v1_configuration: GenFile = /*@__PURE__*/\n fileDesc(\"CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHl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AEKFUZpZWxkQ29tcGFyaXNvblN0YXR1cxInCiNGSUVMRF9DT01QQVJJU09OX1NUQVRVU19VTlNQRUNJRklFRBAAEiUKIUZJRUxEX0NPTVBBUklTT05fU1RBVFVTX1VOQ0hBTkdFRBABEiEKHUZJRUxEX0NPTVBBUklTT05fU1RBVFVTX0FEREVEEAISIwofRklFTERfQ09NUEFSSVNPTl9TVEFUVVNfUkVNT1ZFRBADEiMKH0ZJRUxEX0NPTVBBUklTT05fU1RBVFVTX0NIQU5HRUQQBEI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM\", [file_google_protobuf_timestamp]);\n\n/**\n * Validity says whether a Revision may be released, and if not, why. It is\n * decided when the Revision is saved, and decided again when a Release is\n * cut from it, so a Release never holds a Revision that is invalid by the\n * rules in force when it was cut.\n *\n * @generated from message importhub.v1.Validity\n */\nexport type Validity = Message<\"importhub.v1.Validity\"> & {\n /**\n * True when no reason was found.\n *\n * @generated from field: bool valid = 1;\n */\n valid: boolean;\n\n /**\n * Why the Revision is invalid; empty when it is valid. In a stable order:\n * the same data gives the same reasons in the same order.\n *\n * @generated from field: repeated importhub.v1.ValidityReason reasons = 2;\n */\n reasons: ValidityReason[];\n};\n\n/**\n * Describes the message importhub.v1.Validity.\n * Use `create(ValiditySchema)` to create a new message.\n */\nexport const ValiditySchema: GenMessage<Validity> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 0);\n\n/**\n * ValidityReason is one thing that makes a Revision invalid.\n *\n * @generated from message importhub.v1.ValidityReason\n */\nexport type ValidityReason = Message<\"importhub.v1.ValidityReason\"> & {\n /**\n * Where in the configuration, as a JSON Pointer into its content (for\n * example `/entities/nbsp`); empty when it concerns the whole.\n *\n * @generated from field: string path = 1;\n */\n path: string;\n\n /**\n * A stable, machine-readable code, such as `no_entities`; the type's\n * service documents its codes.\n *\n * @generated from field: string code = 2;\n */\n code: string;\n\n /**\n * What is wrong, in English, for a person.\n *\n * @generated from field: string message = 3;\n */\n message: string;\n};\n\n/**\n * Describes the message importhub.v1.ValidityReason.\n * Use `create(ValidityReasonSchema)` to create a new message.\n */\nexport const ValidityReasonSchema: GenMessage<ValidityReason> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 1);\n\n/**\n * ConfigurationRevision is one saved Revision of a configuration, as its\n * history lists it.\n *\n * @generated from message importhub.v1.ConfigurationRevision\n */\nexport type ConfigurationRevision = Message<\"importhub.v1.ConfigurationRevision\"> & {\n /**\n * The Revision's id.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The odon user id of the person who saved it.\n *\n * @generated from field: string saved_by = 2;\n */\n savedBy: string;\n\n /**\n * When it was saved.\n *\n * @generated from field: google.protobuf.Timestamp saved_at = 3;\n */\n savedAt?: Timestamp | undefined;\n\n /**\n * Whether it could be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity validity = 4;\n */\n validity?: Validity | undefined;\n\n /**\n * The Revision it restored, when it was saved by a restore; empty for an\n * ordinary save.\n *\n * @generated from field: string restored_from_revision_id = 5;\n */\n restoredFromRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationRevision.\n * Use `create(ConfigurationRevisionSchema)` to create a new message.\n */\nexport const ConfigurationRevisionSchema: GenMessage<ConfigurationRevision> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 2);\n\n/**\n * ConfigurationRelease is one Configuration Release: a Revision an admin\n * declared ready to run. A real Import runs only on Releases (ADR 0016).\n * A Release never changes.\n *\n * @generated from message importhub.v1.ConfigurationRelease\n */\nexport type ConfigurationRelease = Message<\"importhub.v1.ConfigurationRelease\"> & {\n /**\n * The Release's id.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision it pins.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * Its place among the configuration's Releases: 1 for the first, counting\n * up, so a person can say \"Release 3\".\n *\n * @generated from field: int32 number = 3;\n */\n number: number;\n\n /**\n * The odon user id of the admin who cut it.\n *\n * @generated from field: string released_by = 4;\n */\n releasedBy: string;\n\n /**\n * When it was cut.\n *\n * @generated from field: google.protobuf.Timestamp released_at = 5;\n */\n releasedAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationRelease.\n * Use `create(ConfigurationReleaseSchema)` to create a new message.\n */\nexport const ConfigurationReleaseSchema: GenMessage<ConfigurationRelease> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 3);\n\n/**\n * ConfigurationState is where a configuration stands: its draft, and how the\n * draft compares with the latest Release (release-a-configuration:AC1).\n *\n * @generated from message importhub.v1.ConfigurationState\n */\nexport type ConfigurationState = Message<\"importhub.v1.ConfigurationState\"> & {\n /**\n * The draft: the head Revision, the one the next save builds on and a\n * Release would be cut from.\n *\n * @generated from field: string draft_revision_id = 1;\n */\n draftRevisionId: string;\n\n /**\n * Whether the draft may be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity draft_validity = 2;\n */\n draftValidity?: Validity | undefined;\n\n /**\n * The latest Release; unset while the configuration has none.\n *\n * @generated from field: importhub.v1.ConfigurationRelease latest_release = 3;\n */\n latestRelease?: ConfigurationRelease | undefined;\n\n /**\n * True when the draft's content differs from the latest Release's, and\n * always true while there is no Release. A draft that restored the latest\n * Release's content does not differ, even though it is another Revision.\n *\n * @generated from field: bool draft_differs_from_release = 4;\n */\n draftDiffersFromRelease: boolean;\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationState.\n * Use `create(ConfigurationStateSchema)` to create a new message.\n */\nexport const ConfigurationStateSchema: GenMessage<ConfigurationState> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 4);\n\n/**\n * FieldComparison is how one top-level field of a configuration differs\n * between two of its Revisions.\n *\n * @generated from message importhub.v1.FieldComparison\n */\nexport type FieldComparison = Message<\"importhub.v1.FieldComparison\"> & {\n /**\n * The field's key in the content, such as `entities`.\n *\n * @generated from field: string field = 1;\n */\n field: string;\n\n /**\n * @generated from field: importhub.v1.FieldComparisonStatus status = 2;\n */\n status: FieldComparisonStatus;\n};\n\n/**\n * Describes the message importhub.v1.FieldComparison.\n * Use `create(FieldComparisonSchema)` to create a new message.\n */\nexport const FieldComparisonSchema: GenMessage<FieldComparison> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 5);\n\n/**\n * ImportProfileRef names one Import Profile: where another configuration is\n * used (manage-mappings:AC3, release-a-configuration:AC4) or why it may not be\n * deleted (manage-mappings:AC4, manage-entity-sets:AC3).\n *\n * @generated from message importhub.v1.ImportProfileRef\n */\nexport type ImportProfileRef = Message<\"importhub.v1.ImportProfileRef\"> & {\n /**\n * The Import Profile's id.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * Its name, as its draft has it.\n *\n * @generated from field: string name = 2;\n */\n name: string;\n};\n\n/**\n * Describes the message importhub.v1.ImportProfileRef.\n * Use `create(ImportProfileRefSchema)` to create a new message.\n */\nexport const ImportProfileRefSchema: GenMessage<ImportProfileRef> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 6);\n\n/**\n * ConfigurationInUse is the detail of a FailedPrecondition delete of a\n * Mapping that Import Profiles include, or of an Entity Set they name: the\n * Profiles, by name. A Profile counts when its draft or its latest Release\n * includes or names it, since either may still run or be released.\n *\n * @generated from message importhub.v1.ConfigurationInUse\n */\nexport type ConfigurationInUse = Message<\"importhub.v1.ConfigurationInUse\"> & {\n /**\n * @generated from field: repeated importhub.v1.ImportProfileRef import_profiles = 1;\n */\n importProfiles: ImportProfileRef[];\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationInUse.\n * Use `create(ConfigurationInUseSchema)` to create a new message.\n */\nexport const ConfigurationInUseSchema: GenMessage<ConfigurationInUse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 7);\n\n/**\n * FieldComparisonStatus is how a field differs between two Revisions, from\n * the first to the second.\n *\n * @generated from enum importhub.v1.FieldComparisonStatus\n */\nexport enum FieldComparisonStatus {\n /**\n * @generated from enum value: FIELD_COMPARISON_STATUS_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * The same value on both sides, or absent from both.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_UNCHANGED = 1;\n */\n UNCHANGED = 1,\n\n /**\n * Absent from the first, present in the second.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_ADDED = 2;\n */\n ADDED = 2,\n\n /**\n * Present in the first, absent from the second.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_REMOVED = 3;\n */\n REMOVED = 3,\n\n /**\n * Present on both sides with different values.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_CHANGED = 4;\n */\n CHANGED = 4,\n}\n\n/**\n * Describes the enum importhub.v1.FieldComparisonStatus.\n */\nexport const FieldComparisonStatusSchema: GenEnum<FieldComparisonStatus> = /*@__PURE__*/\n enumDesc(file_importhub_v1_configuration, 0);\n\n","// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/entity_set.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { ConfigurationRelease, ConfigurationRevision, ConfigurationState, FieldComparison, Validity } from \"./configuration_pb\";\nimport { file_importhub_v1_configuration } from \"./configuration_pb\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/entity_set.proto.\n */\nexport const file_importhub_v1_entity_set: GenFile = /*@__PURE__*/\n fileDesc(\"Ch1pbXBvcnRodWIvdjEvZW50aXR5X3NldC5wcm90bxIMaW1wb3J0aHViLnYxIugBCglFbnRpdHlTZXQSCgoCaWQ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yi52MS5DdXRFbnRpdHlTZXRSZWxlYXNlUmVzcG9uc2USbQoUTGlzdEVudGl0eVNldEhpc3RvcnkSKS5pbXBvcnRodWIudjEuTGlzdEVudGl0eVNldEhpc3RvcnlSZXF1ZXN0GiouaW1wb3J0aHViLnYxLkxpc3RFbnRpdHlTZXRIaXN0b3J5UmVzcG9uc2USfAoZQ29tcGFyZUVudGl0eVNldFJldmlzaW9ucxIuLmltcG9ydGh1Yi52MS5Db21wYXJlRW50aXR5U2V0UmV2aXNpb25zUmVxdWVzdBovLmltcG9ydGh1Yi52MS5Db21wYXJlRW50aXR5U2V0UmV2aXNpb25zUmVzcG9uc2USeQoYUmVzdG9yZUVudGl0eVNldFJldmlzaW9uEi0uaW1wb3J0aHViLnYxLlJlc3RvcmVFbnRpdHlTZXRSZXZpc2lvblJlcXVlc3QaLi5pbXBvcnRodWIudjEuUmVzdG9yZUVudGl0eVNldFJldmlzaW9uUmVzcG9uc2VCOVo3Z2l0aHViLmNvbS9rbmtjcy9pbXBvcnRodWIvZ2VuL2ltcG9ydGh1Yi92MTtpbXBvcnRodWJ2MWIGcHJvdG8z\", [file_google_protobuf_timestamp, file_importhub_v1_configuration]);\n\n/**\n * EntitySet is one Entity Set, at one of its Revisions.\n *\n * @generated from message importhub.v1.EntitySet\n */\nexport type EntitySet = Message<\"importhub.v1.EntitySet\"> & {\n /**\n * The Entity Set's id, a KSUID.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision this content is from: the draft, unless an older one was\n * asked for.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * The content at that Revision.\n *\n * @generated from field: importhub.v1.EntitySetContent content = 3;\n */\n content?: EntitySetContent | undefined;\n\n /**\n * Whether that Revision may be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity validity = 4;\n */\n validity?: Validity | undefined;\n\n /**\n * Where the Entity Set stands: its draft and latest Release.\n *\n * @generated from field: importhub.v1.ConfigurationState state = 5;\n */\n state?: ConfigurationState | undefined;\n\n /**\n * When the Entity Set was created.\n *\n * @generated from field: google.protobuf.Timestamp created_at = 6;\n */\n createdAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message importhub.v1.EntitySet.\n * Use `create(EntitySetSchema)` to create a new message.\n */\nexport const EntitySetSchema: GenMessage<EntitySet> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 0);\n\n/**\n * EntitySetContent is what an admin edits, and what a Revision holds.\n *\n * @generated from message importhub.v1.EntitySetContent\n */\nexport type EntitySetContent = Message<\"importhub.v1.EntitySetContent\"> & {\n /**\n * The Entity Set's name, unique in the workspace. An Import Profile names\n * its Entity Set by id, so renaming it breaks no Profile.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * What the Entity Set is for; free text.\n *\n * @generated from field: string description = 2;\n */\n description: string;\n\n /**\n * The entities, by name without `&` and `;`: `auml` for `ä`, mapped\n * to the text each stands for, which may be empty.\n *\n * @generated from field: map<string, string> entities = 3;\n */\n entities: { [key: string]: string };\n};\n\n/**\n * Describes the message importhub.v1.EntitySetContent.\n * Use `create(EntitySetContentSchema)` to create a new message.\n */\nexport const EntitySetContentSchema: GenMessage<EntitySetContent> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 1);\n\n/**\n * @generated from message importhub.v1.ListEntitySetsRequest\n */\nexport type ListEntitySetsRequest = Message<\"importhub.v1.ListEntitySetsRequest\"> & {\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetsRequest.\n * Use `create(ListEntitySetsRequestSchema)` to create a new message.\n */\nexport const ListEntitySetsRequestSchema: GenMessage<ListEntitySetsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 2);\n\n/**\n * @generated from message importhub.v1.ListEntitySetsResponse\n */\nexport type ListEntitySetsResponse = Message<\"importhub.v1.ListEntitySetsResponse\"> & {\n /**\n * @generated from field: repeated importhub.v1.EntitySet entity_sets = 1;\n */\n entitySets: EntitySet[];\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetsResponse.\n * Use `create(ListEntitySetsResponseSchema)` to create a new message.\n */\nexport const ListEntitySetsResponseSchema: GenMessage<ListEntitySetsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 3);\n\n/**\n * @generated from message importhub.v1.GetEntitySetRequest\n */\nexport type GetEntitySetRequest = Message<\"importhub.v1.GetEntitySetRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * An older Revision to read the content of; empty for the draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.GetEntitySetRequest.\n * Use `create(GetEntitySetRequestSchema)` to create a new message.\n */\nexport const GetEntitySetRequestSchema: GenMessage<GetEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 4);\n\n/**\n * @generated from message importhub.v1.GetEntitySetResponse\n */\nexport type GetEntitySetResponse = Message<\"importhub.v1.GetEntitySetResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.GetEntitySetResponse.\n * Use `create(GetEntitySetResponseSchema)` to create a new message.\n */\nexport const GetEntitySetResponseSchema: GenMessage<GetEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 5);\n\n/**\n * @generated from message importhub.v1.CreateEntitySetRequest\n */\nexport type CreateEntitySetRequest = Message<\"importhub.v1.CreateEntitySetRequest\"> & {\n /**\n * @generated from field: importhub.v1.EntitySetContent content = 1;\n */\n content?: EntitySetContent | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateEntitySetRequest.\n * Use `create(CreateEntitySetRequestSchema)` to create a new message.\n */\nexport const CreateEntitySetRequestSchema: GenMessage<CreateEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 6);\n\n/**\n * @generated from message importhub.v1.CreateEntitySetResponse\n */\nexport type CreateEntitySetResponse = Message<\"importhub.v1.CreateEntitySetResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateEntitySetResponse.\n * Use `create(CreateEntitySetResponseSchema)` to create a new message.\n */\nexport const CreateEntitySetResponseSchema: GenMessage<CreateEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 7);\n\n/**\n * @generated from message importhub.v1.UpdateEntitySetRequest\n */\nexport type UpdateEntitySetRequest = Message<\"importhub.v1.UpdateEntitySetRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The whole new content; it replaces the draft's.\n *\n * @generated from field: importhub.v1.EntitySetContent content = 2;\n */\n content?: EntitySetContent | undefined;\n\n /**\n * The draft this edit was made on. Given, the save is refused if the\n * draft has moved since; empty, it saves on whatever the draft is.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.UpdateEntitySetRequest.\n * Use `create(UpdateEntitySetRequestSchema)` to create a new message.\n */\nexport const UpdateEntitySetRequestSchema: GenMessage<UpdateEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 8);\n\n/**\n * @generated from message importhub.v1.UpdateEntitySetResponse\n */\nexport type UpdateEntitySetResponse = Message<\"importhub.v1.UpdateEntitySetResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.UpdateEntitySetResponse.\n * Use `create(UpdateEntitySetResponseSchema)` to create a new message.\n */\nexport const UpdateEntitySetResponseSchema: GenMessage<UpdateEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 9);\n\n/**\n * @generated from message importhub.v1.DeleteEntitySetRequest\n */\nexport type DeleteEntitySetRequest = Message<\"importhub.v1.DeleteEntitySetRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message importhub.v1.DeleteEntitySetRequest.\n * Use `create(DeleteEntitySetRequestSchema)` to create a new message.\n */\nexport const DeleteEntitySetRequestSchema: GenMessage<DeleteEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 10);\n\n/**\n * @generated from message importhub.v1.DeleteEntitySetResponse\n */\nexport type DeleteEntitySetResponse = Message<\"importhub.v1.DeleteEntitySetResponse\"> & {\n};\n\n/**\n * Describes the message importhub.v1.DeleteEntitySetResponse.\n * Use `create(DeleteEntitySetResponseSchema)` to create a new message.\n */\nexport const DeleteEntitySetResponseSchema: GenMessage<DeleteEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 11);\n\n/**\n * @generated from message importhub.v1.CutEntitySetReleaseRequest\n */\nexport type CutEntitySetReleaseRequest = Message<\"importhub.v1.CutEntitySetReleaseRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The draft the admin is releasing. Given, the cut is refused if the\n * draft has moved since, so what was reviewed is what is released.\n *\n * @generated from field: string draft_revision_id = 2;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CutEntitySetReleaseRequest.\n * Use `create(CutEntitySetReleaseRequestSchema)` to create a new message.\n */\nexport const CutEntitySetReleaseRequestSchema: GenMessage<CutEntitySetReleaseRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 12);\n\n/**\n * @generated from message importhub.v1.CutEntitySetReleaseResponse\n */\nexport type CutEntitySetReleaseResponse = Message<\"importhub.v1.CutEntitySetReleaseResponse\"> & {\n /**\n * The Release cut.\n *\n * @generated from field: importhub.v1.ConfigurationRelease release = 1;\n */\n release?: ConfigurationRelease | undefined;\n\n /**\n * The Entity Set after the cut.\n *\n * @generated from field: importhub.v1.EntitySet entity_set = 2;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CutEntitySetReleaseResponse.\n * Use `create(CutEntitySetReleaseResponseSchema)` to create a new message.\n */\nexport const CutEntitySetReleaseResponseSchema: GenMessage<CutEntitySetReleaseResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 13);\n\n/**\n * @generated from message importhub.v1.ListEntitySetHistoryRequest\n */\nexport type ListEntitySetHistoryRequest = Message<\"importhub.v1.ListEntitySetHistoryRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * Revisions per page; 0 means 100, and at most 1000.\n *\n * @generated from field: int32 page_size = 2;\n */\n pageSize: number;\n\n /**\n * The next_page_token of the previous page; empty for the first.\n *\n * @generated from field: string page_token = 3;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetHistoryRequest.\n * Use `create(ListEntitySetHistoryRequestSchema)` to create a new message.\n */\nexport const ListEntitySetHistoryRequestSchema: GenMessage<ListEntitySetHistoryRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 14);\n\n/**\n * @generated from message importhub.v1.ListEntitySetHistoryResponse\n */\nexport type ListEntitySetHistoryResponse = Message<\"importhub.v1.ListEntitySetHistoryResponse\"> & {\n /**\n * One page of Revisions, newest first.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRevision revisions = 1;\n */\n revisions: ConfigurationRevision[];\n\n /**\n * Every Release, newest first, on every page.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRelease releases = 2;\n */\n releases: ConfigurationRelease[];\n\n /**\n * The page_token of the next page; empty on the last.\n *\n * @generated from field: string next_page_token = 3;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetHistoryResponse.\n * Use `create(ListEntitySetHistoryResponseSchema)` to create a new message.\n */\nexport const ListEntitySetHistoryResponseSchema: GenMessage<ListEntitySetHistoryResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 15);\n\n/**\n * @generated from message importhub.v1.CompareEntitySetRevisionsRequest\n */\nexport type CompareEntitySetRevisionsRequest = Message<\"importhub.v1.CompareEntitySetRevisionsRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision compared from.\n *\n * @generated from field: string from_revision_id = 2;\n */\n fromRevisionId: string;\n\n /**\n * The Revision compared to.\n *\n * @generated from field: string to_revision_id = 3;\n */\n toRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CompareEntitySetRevisionsRequest.\n * Use `create(CompareEntitySetRevisionsRequestSchema)` to create a new message.\n */\nexport const CompareEntitySetRevisionsRequestSchema: GenMessage<CompareEntitySetRevisionsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 16);\n\n/**\n * @generated from message importhub.v1.CompareEntitySetRevisionsResponse\n */\nexport type CompareEntitySetRevisionsResponse = Message<\"importhub.v1.CompareEntitySetRevisionsResponse\"> & {\n /**\n * The Entity Set at from_revision_id.\n *\n * @generated from field: importhub.v1.EntitySet from = 1;\n */\n from?: EntitySet | undefined;\n\n /**\n * The Entity Set at to_revision_id.\n *\n * @generated from field: importhub.v1.EntitySet to = 2;\n */\n to?: EntitySet | undefined;\n\n /**\n * Each field, and how it differs from `from` to `to`.\n *\n * @generated from field: repeated importhub.v1.FieldComparison fields = 3;\n */\n fields: FieldComparison[];\n};\n\n/**\n * Describes the message importhub.v1.CompareEntitySetRevisionsResponse.\n * Use `create(CompareEntitySetRevisionsResponseSchema)` to create a new message.\n */\nexport const CompareEntitySetRevisionsResponseSchema: GenMessage<CompareEntitySetRevisionsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 17);\n\n/**\n * @generated from message importhub.v1.RestoreEntitySetRevisionRequest\n */\nexport type RestoreEntitySetRevisionRequest = Message<\"importhub.v1.RestoreEntitySetRevisionRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The older Revision whose content becomes the new draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * As UpdateEntitySetRequest's.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.RestoreEntitySetRevisionRequest.\n * Use `create(RestoreEntitySetRevisionRequestSchema)` to create a new message.\n */\nexport const RestoreEntitySetRevisionRequestSchema: GenMessage<RestoreEntitySetRevisionRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 18);\n\n/**\n * @generated from message importhub.v1.RestoreEntitySetRevisionResponse\n */\nexport type RestoreEntitySetRevisionResponse = Message<\"importhub.v1.RestoreEntitySetRevisionResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.RestoreEntitySetRevisionResponse.\n * Use `create(RestoreEntitySetRevisionResponseSchema)` to create a new message.\n */\nexport const RestoreEntitySetRevisionResponseSchema: GenMessage<RestoreEntitySetRevisionResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 19);\n\n/**\n * EntitySetService holds the workspace's Entity Sets: named tables of XML\n * character entities and what they stand for, with which an Import reads a\n * Source File that uses entities it does not declare (CONTEXT.md,\n * manage-entity-sets).\n *\n * An Entity Set is versioned configuration (ADR 0016): every create, update\n * and restore saves a draft Revision, and an admin cuts a Configuration\n * Release from a valid draft. A real Import runs only on a Release.\n *\n * Every RPC acts on the caller's workspace, which comes from the token's\n * active workspace and never from a request field. Reads need `viewer`;\n * every write needs `admin` (ADR 0010, control-who-may-import:AC3).\n *\n * The validity reason codes of an Entity Set:\n *\n * - `no_entities`: it defines no entity.\n * - `unreadable_name`: an entity's name is not a letter followed by\n * letters, digits, `.`, `_` or `-`, so no reference in a Source File\n * could ever name it.\n * - `predefined_entity`: it redefines one of XML's own entities (`amp`,\n * `lt`, `gt`, `quot`, `apos`), which would change how every file is\n * read.\n *\n * @generated from service importhub.v1.EntitySetService\n */\nexport const EntitySetService: GenService<{\n /**\n * ListEntitySets returns every Entity Set of the workspace, by name, each\n * with its draft. A workspace keeps a handful, so the list is not paged.\n *\n * @generated from rpc importhub.v1.EntitySetService.ListEntitySets\n */\n listEntitySets: {\n methodKind: \"unary\";\n input: typeof ListEntitySetsRequestSchema;\n output: typeof ListEntitySetsResponseSchema;\n },\n /**\n * GetEntitySet returns one Entity Set with its draft, or with an older\n * Revision of it when one is named.\n *\n * @generated from rpc importhub.v1.EntitySetService.GetEntitySet\n */\n getEntitySet: {\n methodKind: \"unary\";\n input: typeof GetEntitySetRequestSchema;\n output: typeof GetEntitySetResponseSchema;\n },\n /**\n * CreateEntitySet creates an Entity Set, its content the first draft. An\n * invalid table of entities is saved and marked invalid with its reasons;\n * a missing name, or one another Entity Set of the workspace has, is\n * refused (InvalidArgument, AlreadyExists).\n *\n * @generated from rpc importhub.v1.EntitySetService.CreateEntitySet\n */\n createEntitySet: {\n methodKind: \"unary\";\n input: typeof CreateEntitySetRequestSchema;\n output: typeof CreateEntitySetResponseSchema;\n },\n /**\n * UpdateEntitySet saves new content as a new draft Revision. It is\n * refused with FailedPrecondition when draft_revision_id is given and is\n * no longer the draft: somebody saved in between.\n *\n * @generated from rpc importhub.v1.EntitySetService.UpdateEntitySet\n */\n updateEntitySet: {\n methodKind: \"unary\";\n input: typeof UpdateEntitySetRequestSchema;\n output: typeof UpdateEntitySetResponseSchema;\n },\n /**\n * DeleteEntitySet deletes an Entity Set; it no longer appears in the list,\n * and its name is free again. It is refused with FailedPrecondition while\n * an Import Profile names it, naming the Profiles in the message and in a\n * ConfigurationInUse detail (manage-entity-sets:AC3).\n *\n * @generated from rpc importhub.v1.EntitySetService.DeleteEntitySet\n */\n deleteEntitySet: {\n methodKind: \"unary\";\n input: typeof DeleteEntitySetRequestSchema;\n output: typeof DeleteEntitySetResponseSchema;\n },\n /**\n * CutEntitySetRelease cuts a Configuration Release from the draft. It is\n * refused with FailedPrecondition when the draft is invalid (the error\n * carries the draft's Validity as a detail, with its reasons), when the\n * draft does not differ from the latest Release, or when\n * draft_revision_id is given and is no longer the draft.\n *\n * @generated from rpc importhub.v1.EntitySetService.CutEntitySetRelease\n */\n cutEntitySetRelease: {\n methodKind: \"unary\";\n input: typeof CutEntitySetReleaseRequestSchema;\n output: typeof CutEntitySetReleaseResponseSchema;\n },\n /**\n * ListEntitySetHistory lists an Entity Set's Revisions, newest first and\n * paged, with who saved each and when, and all its Releases, with who cut\n * each and when (release-a-configuration:AC6).\n *\n * @generated from rpc importhub.v1.EntitySetService.ListEntitySetHistory\n */\n listEntitySetHistory: {\n methodKind: \"unary\";\n input: typeof ListEntitySetHistoryRequestSchema;\n output: typeof ListEntitySetHistoryResponseSchema;\n },\n /**\n * CompareEntitySetRevisions compares two Revisions of one Entity Set: both\n * contents, for a side-by-side view, and how each field differs from the\n * first to the second. A Release is compared through the Revision it pins.\n *\n * @generated from rpc importhub.v1.EntitySetService.CompareEntitySetRevisions\n */\n compareEntitySetRevisions: {\n methodKind: \"unary\";\n input: typeof CompareEntitySetRevisionsRequestSchema;\n output: typeof CompareEntitySetRevisionsResponseSchema;\n },\n /**\n * RestoreEntitySetRevision saves an older Revision's content as a new\n * draft (release-a-configuration:AC7). Its validity is decided anew, by\n * the rules in force now. It is refused like UpdateEntitySet when the\n * draft moved, and with AlreadyExists when the old name is now another\n * Entity Set's.\n *\n * @generated from rpc importhub.v1.EntitySetService.RestoreEntitySetRevision\n */\n restoreEntitySetRevision: {\n methodKind: \"unary\";\n input: typeof RestoreEntitySetRevisionRequestSchema;\n output: typeof RestoreEntitySetRevisionResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_importhub_v1_entity_set, 0);\n\n","// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/import_profile.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_struct, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { ConfigurationRelease, ConfigurationRevision, ConfigurationState, FieldComparison, Validity } from \"./configuration_pb\";\nimport { file_importhub_v1_configuration } from \"./configuration_pb\";\nimport type { JsonObject, Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/import_profile.proto.\n */\nexport const file_importhub_v1_import_profile: GenFile = /*@__PURE__*/\n fileDesc(\"CiFpbXBvcnRodWIvdjEvaW1wb3J0X3Byb2ZpbGUucHJvdG8SDGltcG9ydGh1Yi52MSKiAgoNSW1wb3J0UHJvZmlsZRIKCgJpZBgBIAEoCRITCgtyZXZpc2lvbl9pZBgCIAEoCRIzCgdjb250ZW50GAMgASgLMiIuaW1wb3J0aHViLnYxLkltcG9ydFByb2ZpbGVDb250ZW50EigKCHZhbGlkaXR5GAQgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5Ei8KBXN0YXRlGAUgASgLMiAuaW1wb3J0aHViLnYxLkNvbmZpZ3VyYXRpb25TdGF0ZRIuCgpjcmVhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIwChBjdXJyZW50X3ZhbGlkaXR5GAcgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5IowCChRJbXBvcnRQcm9maWxlQ29udGVudBIMCgRuYW1lGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEhUKDWVudGl0eV9zZXRfaWQYAyABKAkSMgoNcHJlcHJvY2Vzc29ycxgEIAMoCzIbLmltcG9ydGh1Yi52MS5Qcm9jZXNzb3JTdGVwEhMKC21hcHBpbmdfaWRzGAUgAygJEjQKD3Bvc3RfcHJvY2Vzc29ycxgGIAMoCzIbLmltcG9ydGh1Yi52MS5Qcm9jZXNzb3JTdGVwEhQKDGF1dG9fcHVibGlzaBgHIAEoCBIlCh1kZWxldGVfc291cmNlX2Zp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zcG9uc2USeQoYTGlzdEltcG9ydFByb2ZpbGVIaXN0b3J5Ei0uaW1wb3J0aHViLnYxLkxpc3RJbXBvcnRQcm9maWxlSGlzdG9yeVJlcXVlc3QaLi5pbXBvcnRodWIudjEuTGlzdEltcG9ydFByb2ZpbGVIaXN0b3J5UmVzcG9uc2USiAEKHUNvbXBhcmVJbXBvcnRQcm9maWxlUmV2aXNpb25zEjIuaW1wb3J0aHViLnYxLkNvbXBhcmVJbXBvcnRQcm9maWxlUmV2aXNpb25zUmVxdWVzdBozLmltcG9ydGh1Yi52MS5Db21wYXJlSW1wb3J0UHJvZmlsZVJldmlzaW9uc1Jlc3BvbnNlEoUBChxSZXN0b3JlSW1wb3J0UHJvZmlsZVJldmlzaW9uEjEuaW1wb3J0aHViLnYxLlJlc3RvcmVJbXBvcnRQcm9maWxlUmV2aXNpb25SZXF1ZXN0GjIuaW1wb3J0aHViLnYxLlJlc3RvcmVJbXBvcnRQcm9maWxlUmV2aXNpb25SZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM\", [file_google_protobuf_struct, file_google_protobuf_timestamp, file_importhub_v1_configuration]);\n\n/**\n * ImportProfile is one Import Profile, at one of its Revisions.\n *\n * @generated from message importhub.v1.ImportProfile\n */\nexport type ImportProfile = Message<\"importhub.v1.ImportProfile\"> & {\n /**\n * The Import Profile's id, a KSUID.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision this content is from: the draft, unless an older one was\n * asked for.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * The content at that Revision.\n *\n * @generated from field: importhub.v1.ImportProfileContent content = 3;\n */\n content?: ImportProfileContent | undefined;\n\n /**\n * Whether that Revision may be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity validity = 4;\n */\n validity?: Validity | undefined;\n\n /**\n * Where the Profile stands: its draft and latest Release.\n *\n * @generated from field: importhub.v1.ConfigurationState state = 5;\n */\n state?: ConfigurationState | undefined;\n\n /**\n * When the Profile was created.\n *\n * @generated from field: google.protobuf.Timestamp created_at = 6;\n */\n createdAt?: Timestamp | undefined;\n\n /**\n * Whether the draft can be released now: its validity as saved, plus\n * what changed since without the Profile being saved, such as a Mapping\n * it includes becoming invalid (manage-import-profiles:AC6).\n *\n * @generated from field: importhub.v1.Validity current_validity = 7;\n */\n currentValidity?: Validity | undefined;\n};\n\n/**\n * Describes the message importhub.v1.ImportProfile.\n * Use `create(ImportProfileSchema)` to create a new message.\n */\nexport const ImportProfileSchema: GenMessage<ImportProfile> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 0);\n\n/**\n * ImportProfileContent is what an admin edits, and what a Revision holds.\n *\n * @generated from message importhub.v1.ImportProfileContent\n */\nexport type ImportProfileContent = Message<\"importhub.v1.ImportProfileContent\"> & {\n /**\n * The Profile's name, unique in the workspace.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * What the Profile is for; free text.\n *\n * @generated from field: string description = 2;\n */\n description: string;\n\n /**\n * The id of the Entity Set the Source File is read with; empty for none.\n *\n * @generated from field: string entity_set_id = 3;\n */\n entitySetId: string;\n\n /**\n * The Preprocessors, in the order they run on the Source File.\n *\n * @generated from field: repeated importhub.v1.ProcessorStep preprocessors = 4;\n */\n preprocessors: ProcessorStep[];\n\n /**\n * The ids of the Mappings it includes, in the order they run.\n *\n * @generated from field: repeated string mapping_ids = 5;\n */\n mappingIds: string[];\n\n /**\n * The Post-processors, in the order they run on the mapped Source\n * Versions.\n *\n * @generated from field: repeated importhub.v1.ProcessorStep post_processors = 6;\n */\n postProcessors: ProcessorStep[];\n\n /**\n * Publish the Change Set of an Import that Succeeds without Item\n * Problems (CONTEXT.md \"Auto-publish\").\n *\n * @generated from field: bool auto_publish = 7;\n */\n autoPublish: boolean;\n\n /**\n * Delete the Source File as soon as an Import Succeeds without Item\n * Problems, instead of after the retention period.\n *\n * @generated from field: bool delete_source_file_on_success = 8;\n */\n deleteSourceFileOnSuccess: boolean;\n};\n\n/**\n * Describes the message importhub.v1.ImportProfileContent.\n * Use `create(ImportProfileContentSchema)` to create a new message.\n */\nexport const ImportProfileContentSchema: GenMessage<ImportProfileContent> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 1);\n\n/**\n * ProcessorStep is one Processor in a Profile's pipeline, with its settings.\n *\n * @generated from message importhub.v1.ProcessorStep\n */\nexport type ProcessorStep = Message<\"importhub.v1.ProcessorStep\"> & {\n /**\n * The Processor, by its name in the catalogue.\n *\n * @generated from field: string processor = 1;\n */\n processor: string;\n\n /**\n * Its settings: one value per setting of its settings spec, by the\n * setting's `api_accessor`.\n *\n * @generated from field: google.protobuf.Struct settings = 2;\n */\n settings?: JsonObject | undefined;\n};\n\n/**\n * Describes the message importhub.v1.ProcessorStep.\n * Use `create(ProcessorStepSchema)` to create a new message.\n */\nexport const ProcessorStepSchema: GenMessage<ProcessorStep> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 2);\n\n/**\n * @generated from message importhub.v1.ListImportProfilesRequest\n */\nexport type ListImportProfilesRequest = Message<\"importhub.v1.ListImportProfilesRequest\"> & {\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfilesRequest.\n * Use `create(ListImportProfilesRequestSchema)` to create a new message.\n */\nexport const ListImportProfilesRequestSchema: GenMessage<ListImportProfilesRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 3);\n\n/**\n * @generated from message importhub.v1.ListImportProfilesResponse\n */\nexport type ListImportProfilesResponse = Message<\"importhub.v1.ListImportProfilesResponse\"> & {\n /**\n * @generated from field: repeated importhub.v1.ImportProfile import_profiles = 1;\n */\n importProfiles: ImportProfile[];\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfilesResponse.\n * Use `create(ListImportProfilesResponseSchema)` to create a new message.\n */\nexport const ListImportProfilesResponseSchema: GenMessage<ListImportProfilesResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 4);\n\n/**\n * @generated from message importhub.v1.GetImportProfileRequest\n */\nexport type GetImportProfileRequest = Message<\"importhub.v1.GetImportProfileRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * An older Revision to read the content of; empty for the draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.GetImportProfileRequest.\n * Use `create(GetImportProfileRequestSchema)` to create a new message.\n */\nexport const GetImportProfileRequestSchema: GenMessage<GetImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 5);\n\n/**\n * @generated from message importhub.v1.GetImportProfileResponse\n */\nexport type GetImportProfileResponse = Message<\"importhub.v1.GetImportProfileResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.GetImportProfileResponse.\n * Use `create(GetImportProfileResponseSchema)` to create a new message.\n */\nexport const GetImportProfileResponseSchema: GenMessage<GetImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 6);\n\n/**\n * @generated from message importhub.v1.CreateImportProfileRequest\n */\nexport type CreateImportProfileRequest = Message<\"importhub.v1.CreateImportProfileRequest\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfileContent content = 1;\n */\n content?: ImportProfileContent | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateImportProfileRequest.\n * Use `create(CreateImportProfileRequestSchema)` to create a new message.\n */\nexport const CreateImportProfileRequestSchema: GenMessage<CreateImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 7);\n\n/**\n * @generated from message importhub.v1.CreateImportProfileResponse\n */\nexport type CreateImportProfileResponse = Message<\"importhub.v1.CreateImportProfileResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateImportProfileResponse.\n * Use `create(CreateImportProfileResponseSchema)` to create a new message.\n */\nexport const CreateImportProfileResponseSchema: GenMessage<CreateImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 8);\n\n/**\n * @generated from message importhub.v1.UpdateImportProfileRequest\n */\nexport type UpdateImportProfileRequest = Message<\"importhub.v1.UpdateImportProfileRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The whole new content; it replaces the draft's.\n *\n * @generated from field: importhub.v1.ImportProfileContent content = 2;\n */\n content?: ImportProfileContent | undefined;\n\n /**\n * The draft this edit was made on. Given, the save is refused if the\n * draft has moved since; empty, it saves on whatever the draft is.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.UpdateImportProfileRequest.\n * Use `create(UpdateImportProfileRequestSchema)` to create a new message.\n */\nexport const UpdateImportProfileRequestSchema: GenMessage<UpdateImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 9);\n\n/**\n * @generated from message importhub.v1.UpdateImportProfileResponse\n */\nexport type UpdateImportProfileResponse = Message<\"importhub.v1.UpdateImportProfileResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.UpdateImportProfileResponse.\n * Use `create(UpdateImportProfileResponseSchema)` to create a new message.\n */\nexport const UpdateImportProfileResponseSchema: GenMessage<UpdateImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 10);\n\n/**\n * @generated from message importhub.v1.DeleteImportProfileRequest\n */\nexport type DeleteImportProfileRequest = Message<\"importhub.v1.DeleteImportProfileRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message importhub.v1.DeleteImportProfileRequest.\n * Use `create(DeleteImportProfileRequestSchema)` to create a new message.\n */\nexport const DeleteImportProfileRequestSchema: GenMessage<DeleteImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 11);\n\n/**\n * @generated from message importhub.v1.DeleteImportProfileResponse\n */\nexport type DeleteImportProfileResponse = Message<\"importhub.v1.DeleteImportProfileResponse\"> & {\n};\n\n/**\n * Describes the message importhub.v1.DeleteImportProfileResponse.\n * Use `create(DeleteImportProfileResponseSchema)` to create a new message.\n */\nexport const DeleteImportProfileResponseSchema: GenMessage<DeleteImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 12);\n\n/**\n * @generated from message importhub.v1.CutImportProfileReleaseRequest\n */\nexport type CutImportProfileReleaseRequest = Message<\"importhub.v1.CutImportProfileReleaseRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The draft the admin is releasing. Given, the cut is refused if the\n * draft has moved since.\n *\n * @generated from field: string draft_revision_id = 2;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CutImportProfileReleaseRequest.\n * Use `create(CutImportProfileReleaseRequestSchema)` to create a new message.\n */\nexport const CutImportProfileReleaseRequestSchema: GenMessage<CutImportProfileReleaseRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 13);\n\n/**\n * @generated from message importhub.v1.CutImportProfileReleaseResponse\n */\nexport type CutImportProfileReleaseResponse = Message<\"importhub.v1.CutImportProfileReleaseResponse\"> & {\n /**\n * The Release cut.\n *\n * @generated from field: importhub.v1.ConfigurationRelease release = 1;\n */\n release?: ConfigurationRelease | undefined;\n\n /**\n * The Profile after the cut.\n *\n * @generated from field: importhub.v1.ImportProfile import_profile = 2;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CutImportProfileReleaseResponse.\n * Use `create(CutImportProfileReleaseResponseSchema)` to create a new message.\n */\nexport const CutImportProfileReleaseResponseSchema: GenMessage<CutImportProfileReleaseResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 14);\n\n/**\n * @generated from message importhub.v1.ListImportProfileHistoryRequest\n */\nexport type ListImportProfileHistoryRequest = Message<\"importhub.v1.ListImportProfileHistoryRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * Revisions per page; 0 means 100, and at most 1000.\n *\n * @generated from field: int32 page_size = 2;\n */\n pageSize: number;\n\n /**\n * The next_page_token of the previous page; empty for the first.\n *\n * @generated from field: string page_token = 3;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfileHistoryRequest.\n * Use `create(ListImportProfileHistoryRequestSchema)` to create a new message.\n */\nexport const ListImportProfileHistoryRequestSchema: GenMessage<ListImportProfileHistoryRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 15);\n\n/**\n * @generated from message importhub.v1.ListImportProfileHistoryResponse\n */\nexport type ListImportProfileHistoryResponse = Message<\"importhub.v1.ListImportProfileHistoryResponse\"> & {\n /**\n * One page of Revisions, newest first.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRevision revisions = 1;\n */\n revisions: ConfigurationRevision[];\n\n /**\n * Every Release, newest first, on every page.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRelease releases = 2;\n */\n releases: ConfigurationRelease[];\n\n /**\n * The page_token of the next page; empty on the last.\n *\n * @generated from field: string next_page_token = 3;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfileHistoryResponse.\n * Use `create(ListImportProfileHistoryResponseSchema)` to create a new message.\n */\nexport const ListImportProfileHistoryResponseSchema: GenMessage<ListImportProfileHistoryResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 16);\n\n/**\n * @generated from message importhub.v1.CompareImportProfileRevisionsRequest\n */\nexport type CompareImportProfileRevisionsRequest = Message<\"importhub.v1.CompareImportProfileRevisionsRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string from_revision_id = 2;\n */\n fromRevisionId: string;\n\n /**\n * @generated from field: string to_revision_id = 3;\n */\n toRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CompareImportProfileRevisionsRequest.\n * Use `create(CompareImportProfileRevisionsRequestSchema)` to create a new message.\n */\nexport const CompareImportProfileRevisionsRequestSchema: GenMessage<CompareImportProfileRevisionsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 17);\n\n/**\n * @generated from message importhub.v1.CompareImportProfileRevisionsResponse\n */\nexport type CompareImportProfileRevisionsResponse = Message<\"importhub.v1.CompareImportProfileRevisionsResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile from = 1;\n */\n from?: ImportProfile | undefined;\n\n /**\n * @generated from field: importhub.v1.ImportProfile to = 2;\n */\n to?: ImportProfile | undefined;\n\n /**\n * Each field, and how it differs from `from` to `to`.\n *\n * @generated from field: repeated importhub.v1.FieldComparison fields = 3;\n */\n fields: FieldComparison[];\n};\n\n/**\n * Describes the message importhub.v1.CompareImportProfileRevisionsResponse.\n * Use `create(CompareImportProfileRevisionsResponseSchema)` to create a new message.\n */\nexport const CompareImportProfileRevisionsResponseSchema: GenMessage<CompareImportProfileRevisionsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 18);\n\n/**\n * @generated from message importhub.v1.RestoreImportProfileRevisionRequest\n */\nexport type RestoreImportProfileRevisionRequest = Message<\"importhub.v1.RestoreImportProfileRevisionRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The older Revision whose content becomes the new draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * As UpdateImportProfileRequest's.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.RestoreImportProfileRevisionRequest.\n * Use `create(RestoreImportProfileRevisionRequestSchema)` to create a new message.\n */\nexport const RestoreImportProfileRevisionRequestSchema: GenMessage<RestoreImportProfileRevisionRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 19);\n\n/**\n * @generated from message importhub.v1.RestoreImportProfileRevisionResponse\n */\nexport type RestoreImportProfileRevisionResponse = Message<\"importhub.v1.RestoreImportProfileRevisionResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.RestoreImportProfileRevisionResponse.\n * Use `create(RestoreImportProfileRevisionResponseSchema)` to create a new message.\n */\nexport const RestoreImportProfileRevisionResponseSchema: GenMessage<RestoreImportProfileRevisionResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 20);\n\n/**\n * ImportProfileService holds the workspace's Import Profiles: the named\n * recipes an Import runs, one per kind of Source File (CONTEXT.md,\n * manage-import-profiles). A Profile names at most one Entity Set, its\n * Preprocessors, the Mappings it includes and its Post-processors, in order,\n * and what happens to the result.\n *\n * An Import Profile is versioned configuration (ADR 0016): every create,\n * update and restore saves a draft Revision, and an admin cuts a\n * Configuration Release from a valid draft. A Profile names its Mappings and\n * its Entity Set by id, not their Releases: an Import takes the latest\n * Release of each when it starts.\n *\n * Every RPC acts on the caller's workspace, which comes from the token's\n * active workspace and never from a request field. Reads need `viewer`;\n * every write needs `admin` (ADR 0010, control-who-may-import:AC3).\n *\n * The validity reason codes of an Import Profile, decided when it is saved:\n *\n * - `unknown_processor`: a step names a Processor the catalogue does not\n * list (ProcessorService).\n * - `wrong_processor_kind`: a Post-processor listed among the\n * Preprocessors, or the other way round.\n * - `rich_text_processor`: a Processor that works on one rich-text field,\n * which a Mapping's field configures, listed on the Profile.\n * - `invalid_processor_settings`: a setting the Processor does not take, a\n * required one left out, or a value of the wrong type.\n * - `no_mappings`: it includes no Mapping.\n * - `duplicate_mapping`: it includes one Mapping twice.\n * - `mapping_missing`: it includes a Mapping that does not exist.\n * - `entity_set_missing`: it names an Entity Set that does not exist.\n *\n * And the ones current_validity adds, decided at each read and when a Release\n * is cut, since they change without the Profile being saved\n * (manage-import-profiles:AC6):\n *\n * - `mapping_invalid`: what an Import would run of a Mapping it includes\n * is invalid now: its latest Release, when its Blueprint is gone, or,\n * while it has no Release, its draft. The message names the Mapping and\n * its reasons.\n * - `entity_set_invalid`: the Entity Set it names has no Release and an\n * invalid draft (a Release was valid when cut).\n * - `mapping_missing`, `entity_set_missing`, as above, once deleted.\n *\n * @generated from service importhub.v1.ImportProfileService\n */\nexport const ImportProfileService: GenService<{\n /**\n * ListImportProfiles returns every Import Profile of the workspace, by\n * name, each with its draft, its latest Release and whether it is valid\n * now. A workspace keeps a handful, so the list is not paged.\n *\n * @generated from rpc importhub.v1.ImportProfileService.ListImportProfiles\n */\n listImportProfiles: {\n methodKind: \"unary\";\n input: typeof ListImportProfilesRequestSchema;\n output: typeof ListImportProfilesResponseSchema;\n },\n /**\n * GetImportProfile returns one Import Profile with its draft, or with an\n * older Revision of it when one is named.\n *\n * @generated from rpc importhub.v1.ImportProfileService.GetImportProfile\n */\n getImportProfile: {\n methodKind: \"unary\";\n input: typeof GetImportProfileRequestSchema;\n output: typeof GetImportProfileResponseSchema;\n },\n /**\n * CreateImportProfile creates an Import Profile, its content the first\n * draft. Invalid settings are saved and marked invalid with their\n * reasons; a missing name, or one another Profile of the workspace has,\n * is refused (InvalidArgument, AlreadyExists).\n *\n * @generated from rpc importhub.v1.ImportProfileService.CreateImportProfile\n */\n createImportProfile: {\n methodKind: \"unary\";\n input: typeof CreateImportProfileRequestSchema;\n output: typeof CreateImportProfileResponseSchema;\n },\n /**\n * UpdateImportProfile saves new content as a new draft Revision. It is\n * refused with FailedPrecondition when draft_revision_id is given and is\n * no longer the draft.\n *\n * @generated from rpc importhub.v1.ImportProfileService.UpdateImportProfile\n */\n updateImportProfile: {\n methodKind: \"unary\";\n input: typeof UpdateImportProfileRequestSchema;\n output: typeof UpdateImportProfileResponseSchema;\n },\n /**\n * DeleteImportProfile deletes an Import Profile; it no longer appears in\n * the list, and its name is free again.\n *\n * @generated from rpc importhub.v1.ImportProfileService.DeleteImportProfile\n */\n deleteImportProfile: {\n methodKind: \"unary\";\n input: typeof DeleteImportProfileRequestSchema;\n output: typeof DeleteImportProfileResponseSchema;\n },\n /**\n * CutImportProfileRelease cuts a Configuration Release from the draft. It\n * is refused with FailedPrecondition, the Validity as a detail, when the\n * draft is not valid now (current_validity: an included Mapping that is\n * invalid refuses it too), when the draft does not differ from the latest\n * Release, or when draft_revision_id is given and is no longer the draft.\n *\n * @generated from rpc importhub.v1.ImportProfileService.CutImportProfileRelease\n */\n cutImportProfileRelease: {\n methodKind: \"unary\";\n input: typeof CutImportProfileReleaseRequestSchema;\n output: typeof CutImportProfileReleaseResponseSchema;\n },\n /**\n * ListImportProfileHistory lists an Import Profile's Revisions, newest\n * first and paged, and all its Releases (release-a-configuration:AC6).\n *\n * @generated from rpc importhub.v1.ImportProfileService.ListImportProfileHistory\n */\n listImportProfileHistory: {\n methodKind: \"unary\";\n input: typeof ListImportProfileHistoryRequestSchema;\n output: typeof ListImportProfileHistoryResponseSchema;\n },\n /**\n * CompareImportProfileRevisions compares two Revisions of one Import\n * Profile: both contents, and how each field differs.\n *\n * @generated from rpc importhub.v1.ImportProfileService.CompareImportProfileRevisions\n */\n compareImportProfileRevisions: {\n methodKind: \"unary\";\n input: typeof CompareImportProfileRevisionsRequestSchema;\n output: typeof CompareImportProfileRevisionsResponseSchema;\n },\n /**\n * RestoreImportProfileRevision saves an older Revision's content as a new\n * draft (release-a-configuration:AC7), its validity decided anew.\n *\n * @generated from rpc importhub.v1.ImportProfileService.RestoreImportProfileRevision\n */\n restoreImportProfileRevision: {\n methodKind: \"unary\";\n input: typeof RestoreImportProfileRevisionRequestSchema;\n output: typeof RestoreImportProfileRevisionResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_importhub_v1_import_profile, 0);\n\n","import { createClient, type Transport } from \"@connectrpc/connect\";\nimport { createConnectTransport } from \"@connectrpc/connect-web\";\nimport { EntitySetService } from \"../../../../gen/ts/importhub/v1/entity_set_pb\";\nimport { ImportProfileService } from \"../../../../gen/ts/importhub/v1/import_profile_pb\";\nimport type { ImporthubClient } from \"./importhub-client\";\n\nexport interface CreateConnectImporthubClientOptions {\n\t/**\n\t * Base URL on the host origin under which `/importhub.v1.…Service/…` is\n\t * served: \"\" when importhub serves the page itself (the Standalone App),\n\t * the mount prefix when a host proxies it.\n\t */\n\tbaseUrl: string;\n\t/**\n\t * The fetch the transport calls, e.g. one that adds `credentials:\n\t * \"include\"` so a session cookie travels, or a host's own token.\n\t */\n\tfetch?: typeof fetch;\n\t/** A pre-built transport (tests: `createRouterTransport`). Overrides baseUrl and fetch. */\n\ttransport?: Transport;\n}\n\n/**\n * The one call a host makes to talk to importhub (knkcms/core ADR 0003):\n * an `ImporthubClient` over Connect.\n */\nexport function createConnectImporthubClient(\n\toptions: CreateConnectImporthubClientOptions,\n): ImporthubClient {\n\tconst transport =\n\t\toptions.transport ?? createConnectTransport({ baseUrl: options.baseUrl, fetch: options.fetch });\n\tconst profiles = createClient(ImportProfileService, transport);\n\tconst entitySets = createClient(EntitySetService, transport);\n\treturn {\n\t\tasync listImportProfiles() {\n\t\t\tconst res = await profiles.listImportProfiles({});\n\t\t\treturn res.importProfiles.map((p) => ({ id: p.id, name: p.content?.name ?? \"\" }));\n\t\t},\n\t\tasync listEntitySets() {\n\t\t\tconst res = await entitySets.listEntitySets({});\n\t\t\treturn res.entitySets.map((e) => ({ id: e.id, name: e.content?.name ?? \"\" }));\n\t\t},\n\t};\n}\n","import de from \"./de.json\";\nimport en from \"./en.json\";\n\n/**\n * The i18next namespace every string in this package is looked up under. A\n * host merges `i18nResources` and lists this constant among its namespaces\n * (knkcms/core ADR 0005), never the literal, so a rename fails the host's\n * compile rather than rendering raw keys.\n */\nexport const IMPORTHUB_UI_NS = \"importhub-ui\";\n\n/** The package's bundled translations, keyed by language, then by namespace. */\nexport const i18nResources = {\n\ten: { [IMPORTHUB_UI_NS]: en },\n\tde: { [IMPORTHUB_UI_NS]: de },\n};\n","// importhub-ui's host contract: what a host decides that anker's own host\n// contract (@knkcs/anker/host) does not cover.\n//\n// anker's covers the page frame, the rail and identity: a screen reports its\n// title, breadcrumbs and actions, and reads the viewer and the active\n// workspace from `useHostIdentity()`, which the host provides once. What is\n// left is importhub's own: where the host mounts each section, for the links\n// a screen draws itself, and where a Change Set lives in contenthub, which\n// only the host knows (ADR 0005, amended: the contract has no seams only core\n// needed). Navigation a screen *asks* for (open an Import, start one) goes\n// through that screen's callbacks, since only the host knows its router.\nimport { createContext, type ReactNode, useContext } from \"react\";\n\n/**\n * importhub's sections: Imports, the host's own work, and the configuration\n * an admin manages (CONTEXT.md, \"Configuration\").\n */\nexport type ImporthubSection = \"imports\" | \"profiles\" | \"mappings\" | \"entitySets\";\n\n/** Every section, in the order a host lists them. */\nexport const IMPORTHUB_SECTIONS: readonly ImporthubSection[] = [\n\t\"imports\",\n\t\"profiles\",\n\t\"mappings\",\n\t\"entitySets\",\n];\n\n/** Where the host mounts each section's index. */\nexport type ImporthubPaths = Record<ImporthubSection, string>;\n\nexport interface ImporthubHost {\n\t/** Where the host mounts each section's index, for breadcrumbs and links. */\n\tpaths: ImporthubPaths;\n\t/**\n\t * The address of a Change Set in contenthub, which an Import's page links\n\t * out to (follow-an-import:AC5). null when the host has no contenthub to\n\t * link to: the screen then shows no link rather than a broken one.\n\t */\n\tchangeSetHref: (changeSetId: string) => string | null;\n}\n\n/**\n * The Standalone App's paths: Imports at the top, the configuration under\n * `/settings/<item>`, one page per item (odon's integration guide, \"Sidebar\n * layout\").\n */\nexport const STANDALONE_IMPORTHUB_PATHS: ImporthubPaths = {\n\timports: \"/imports\",\n\tprofiles: \"/settings/import-profiles\",\n\tmappings: \"/settings/mappings\",\n\tentitySets: \"/settings/entity-sets\",\n};\n\nconst DEFAULT_HOST: ImporthubHost = {\n\tpaths: STANDALONE_IMPORTHUB_PATHS,\n\tchangeSetHref: () => null,\n};\n\nconst HostContext = createContext<ImporthubHost>(DEFAULT_HOST);\n\nexport interface ImporthubHostProviderProps {\n\thost: ImporthubHost;\n\tchildren: ReactNode;\n}\n\n/** Provides the host's decisions to every importhub screen beneath it. */\nexport function ImporthubHostProvider({ host, children }: ImporthubHostProviderProps) {\n\treturn <HostContext.Provider value={host}>{children}</HostContext.Provider>;\n}\n\n/**\n * The host's decisions; outside a provider, the Standalone App's paths and\n * no Change Set links.\n */\nexport function useImporthubHost(): ImporthubHost {\n\treturn useContext(HostContext);\n}\n","import { Link } from \"@knkcs/anker/primitives\";\nimport { ExternalLink } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\nimport { useImporthubHost } from \"./host\";\n\nexport interface ChangeSetLinkProps {\n\tchangeSetId: string;\n}\n\n/**\n * The link out to a Change Set in contenthub, where the host says it is\n * (`ImporthubHost.changeSetHref`). Nothing when the host has no address for\n * it: a link to nowhere is worse than none.\n */\nexport function ChangeSetLink({ changeSetId }: ChangeSetLinkProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst href = useImporthubHost().changeSetHref(changeSetId);\n\tif (!href) return null;\n\treturn (\n\t\t<Link href={href} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t{t(\"changeSet.open\")}\n\t\t\t<ExternalLink size={14} aria-hidden />\n\t\t</Link>\n\t);\n}\n","// Every query key starts with the active workspace, from the host's identity.\n// A host that switches workspace without remounting (an embedding solution's\n// picker, say) then reads the new workspace's data rather than the old one's\n// cache (use-the-importhub-standalone-app:AC3), and two workspaces' answers\n// never share an entry.\nexport const importhubKeys = {\n\tall: (workspaceId: string) => [\"importhub\", workspaceId] as const,\n\timportProfiles: (workspaceId: string) =>\n\t\t[...importhubKeys.all(workspaceId), \"importProfiles\"] as const,\n\tentitySets: (workspaceId: string) => [...importhubKeys.all(workspaceId), \"entitySets\"] as const,\n};\n","import { EmptyState } from \"@knkcs/anker/atoms\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { Box, Spinner } from \"@knkcs/anker/primitives\";\nimport { IndexPageTemplate } from \"@knkcs/anker/templates\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { Ampersand, FileCog, FileUp, type LucideIcon, Waypoints } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { ImporthubClient } from \"../client/importhub-client\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\nimport type { ImporthubSection } from \"./host\";\nimport { importhubKeys } from \"./query-keys\";\n\nexport interface ImporthubStartPageProps {\n\tclient: ImporthubClient;\n\t/** The section whose start page this is. */\n\tsection: ImporthubSection;\n}\n\n/** Each section's icon, as the Standalone App's sidebar shows it too. */\nexport const IMPORTHUB_SECTION_ICONS: Record<ImporthubSection, LucideIcon> = {\n\timports: FileUp,\n\tprofiles: FileCog,\n\tmappings: Waypoints,\n\tentitySets: Ampersand,\n};\n\n/**\n * A section's start page, until its screens exist: the section's\n * title in the frame, and a body saying what the workspace holds of it. Where\n * importhub can already list a section (Import Profiles, Entity Sets) it\n * says how many there are, read for the host's active workspace; Imports and\n * Mappings have nothing to read yet.\n */\nexport function ImporthubStartPage({ client, section }: ImporthubStartPageProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst Icon = IMPORTHUB_SECTION_ICONS[section];\n\treturn (\n\t\t<IndexPageTemplate title={t(`section.${section}.title`)}>\n\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t<EmptyState\n\t\t\t\t\ticon={<Icon size={32} aria-hidden />}\n\t\t\t\t\theader={t(`section.${section}.title`)}\n\t\t\t\t\tdescription={<SectionSummary client={client} section={section} />}\n\t\t\t\t/>\n\t\t\t</Box>\n\t\t</IndexPageTemplate>\n\t);\n}\n\nfunction SectionSummary({ client, section }: ImporthubStartPageProps) {\n\tswitch (section) {\n\t\tcase \"profiles\":\n\t\t\treturn (\n\t\t\t\t<CountSummary\n\t\t\t\t\tsection={section}\n\t\t\t\t\tqueryKey={importhubKeys.importProfiles}\n\t\t\t\t\tread={() => client.listImportProfiles()}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"entitySets\":\n\t\t\treturn (\n\t\t\t\t<CountSummary\n\t\t\t\t\tsection={section}\n\t\t\t\t\tqueryKey={importhubKeys.entitySets}\n\t\t\t\t\tread={() => client.listEntitySets()}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn <NothingYet section={section} />;\n\t}\n}\n\nfunction NothingYet({ section }: { section: \"imports\" | \"mappings\" }) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\treturn <>{t(`section.${section}.empty`)}</>;\n}\n\nfunction CountSummary({\n\tsection,\n\tqueryKey,\n\tread,\n}: {\n\tsection: \"profiles\" | \"entitySets\";\n\t/** The section's query key for a workspace (`importhubKeys`). */\n\tqueryKey: (workspaceId: string) => readonly unknown[];\n\tread: () => Promise<unknown[]>;\n}) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst query = useQuery({ queryKey: queryKey(workspaceId), queryFn: read });\n\tif (query.isPending) return <Spinner size=\"sm\" aria-label={t(\"startPage.loading\")} />;\n\t// Text, not an Alert: the summary is the EmptyState's description, a\n\t// paragraph, which can hold no block.\n\tif (query.isError) return <>{t(\"startPage.error\")}</>;\n\treturn <>{t(`section.${section}.summary`, { count: query.data.length })}</>;\n}\n"],"names":["file_importhub_v1_configuration","fileDesc","file_google_protobuf_timestamp","file_importhub_v1_entity_set","EntitySetService","serviceDesc","file_importhub_v1_import_profile","file_google_protobuf_struct","ImportProfileService","createConnectImporthubClient","options","transport","createConnectTransport","profiles","createClient","entitySets","p","e","IMPORTHUB_UI_NS","i18nResources","en","de","IMPORTHUB_SECTIONS","STANDALONE_IMPORTHUB_PATHS","DEFAULT_HOST","HostContext","createContext","ImporthubHostProvider","host","children","useImporthubHost","useContext","ChangeSetLink","changeSetId","t","useTranslation","href","Link","jsx","ExternalLink","importhubKeys","workspaceId","IMPORTHUB_SECTION_ICONS","FileUp","FileCog","Waypoints","Ampersand","ImporthubStartPage","client","section","Icon","IndexPageTemplate","Box","EmptyState","SectionSummary","CountSummary","NothingYet","Fragment","queryKey","read","useHostIdentity","query","useQuery","Spinner"],"mappings":";;;;;;;;;;;;;AAaO,MAAMA,IACX,gBAAAC,EAAS,+jDAA+jD,CAACC,CAA8B,CAAC,GCC7lDC,IACX,gBAAAF,EAAS,o4HAAo4H,CAACC,GAAgCF,CAA+B,CAAC,GAqhBn8HI,IAkHX,gBAAAC,EAAYF,GAA8B,CAAC,GCxoBhCG,IACX,gBAAAL,EAAS,uhJAAuhJ,CAACM,GAA6BL,GAAgCF,CAA+B,CAAC,GA2mBnnJQ,IA4GX,gBAAAH,EAAYC,GAAkC,CAAC;AC7sB1C,SAASG,GACfC,GACkB;AAClB,QAAMC,IACLD,EAAQ,aAAaE,EAAuB,EAAE,SAASF,EAAQ,SAAS,OAAOA,EAAQ,MAAA,CAAO,GACzFG,IAAWC,EAAaN,GAAsBG,CAAS,GACvDI,IAAaD,EAAaV,GAAkBO,CAAS;AAC3D,SAAO;AAAA,IACN,MAAM,qBAAqB;AAE1B,cADY,MAAME,EAAS,mBAAmB,CAAA,CAAE,GACrC,eAAe,IAAI,CAACG,OAAO,EAAE,IAAIA,EAAE,IAAI,MAAMA,EAAE,SAAS,QAAQ,KAAK;AAAA,IACjF;AAAA,IACA,MAAM,iBAAiB;AAEtB,cADY,MAAMD,EAAW,eAAe,CAAA,CAAE,GACnC,WAAW,IAAI,CAACE,OAAO,EAAE,IAAIA,EAAE,IAAI,MAAMA,EAAE,SAAS,QAAQ,KAAK;AAAA,IAC7E;AAAA,EAAA;AAEF;;;;;;;;;GClCaC,IAAkB,gBAGlBC,KAAgB;AAAA,EAC5B,IAAI,EAAE,CAACD,CAAe,GAAGE,EAAA;AAAA,EACzB,IAAI,EAAE,CAACF,CAAe,GAAGG,EAAA;AAC1B,GCKaC,KAAkD;AAAA,EAC9D;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EAAS,EAAE,UAAUJ,EAASjB,CAAW,GAAG,SAASkB,GAAM;AACzE,SAAIE,EAAM,YAAkB,gBAAAvB,EAACyB,GAAA,EAAQ,MAAK,MAAK,cAAY7B,EAAE,mBAAmB,EAAA,CAAG,IAG/E2B,EAAM,UAAgB,gBAAAvB,EAAAmB,GAAA,EAAG,UAAAvB,EAAE,iBAAiB,GAAE,IAC3C,gBAAAI,EAAAmB,GAAA,EAAG,UAAAvB,EAAE,WAAWe,CAAO,YAAY,EAAE,OAAOY,EAAM,KAAK,OAAA,CAAQ,GAAE;AACzE;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../gen/ts/importhub/v1/configuration_pb.ts","../../../gen/ts/importhub/v1/entity_set_pb.ts","../../../gen/ts/importhub/v1/import_profile_pb.ts","../../../gen/ts/importhub/v1/mapping_pb.ts","../../../gen/ts/importhub/v1/processor_pb.ts","../src/client/connect-importhub-client.ts","../src/i18n/resources.ts","../src/common/host.tsx","../src/common/change-set-link.tsx","../src/common/query-keys.ts","../src/common/start-page.tsx","../src/common/delete-dialog.tsx","../src/common/query-state.tsx","../src/common/use-can-configure.ts","../src/common/validity.tsx","../src/screens/entity-sets/entity-set-detail.tsx","../src/common/create-dialog.tsx","../src/screens/entity-sets/entity-sets-index.tsx","../src/common/blueprint-names.ts","../src/screens/mappings/move-release-dialog.tsx","../src/screens/mappings/mapping-detail.tsx","../src/screens/mappings/blueprint-fields.tsx","../src/screens/mappings/mappings-index.tsx","../src/screens/processors/processor-catalogue.tsx","../src/screens/profiles/ordered-list.tsx","../src/screens/profiles/processor-settings-dialog.tsx","../src/screens/profiles/import-profile-detail.tsx","../src/screens/profiles/import-profiles-index.tsx"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/configuration.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/configuration.proto.\n */\nexport const file_importhub_v1_configuration: GenFile = /*@__PURE__*/\n fileDesc(\"CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHlSZWFzb24iPQoOVmFsaWRpdHlSZWFzb24SDAoEcGF0aBgBIAEoCRIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkisAEKFUNvbmZpZ3VyYXRpb25SZXZpc2lvbhIKCgJpZBgBIAEoCRIQCghzYXZlZF9ieRgCIAEoCRIsCghzYXZlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSIQoZcmVzdG9yZWRfZnJvbV9yZXZpc2lvbl9pZBgFIAEoCSKNAQoUQ29uZmlndXJhdGlvblJlbGVhc2USCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSDgoGbnVtYmVyGAMgASgFEhMKC3JlbGVhc2VkX2J5GAQgASgJEi8KC3JlbGVhc2VkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCK/AQoSQ29uZmlndXJhdGlvblN0YXRlEhkKEWRyYWZ0X3JldmlzaW9uX2lkGAEgASgJEi4KDmRyYWZ0X3ZhbGlkaXR5GAIgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5EjoKDmxhdGVzdF9yZWxlYXNlGAMgASgLMiIuaW1wb3J0aHViLnYxLkNvbmZpZ3VyYXRpb25SZWxlYXNlEiIKGmRyYWZ0X2RpZmZlcnNfZnJvbV9yZWxlYXNlGAQgASgIIlUKD0ZpZWxkQ29tcGFyaXNvbhINCgVmaWVsZBgBIAEoCRIzCgZzdGF0dXMYAiABKA4yIy5pbXBvcnRodWIudjEuRmllbGRDb21wYXJpc29uU3RhdHVzIiwKEEltcG9ydFByb2ZpbGVSZWYSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCSJNChJDb25maWd1cmF0aW9uSW5Vc2USNwoPaW1wb3J0X3Byb2ZpbGVzGAEgAygLMh4uaW1wb3J0aHViLnYxLkltcG9ydFByb2ZpbGVSZWYq1AEKFUZpZWxkQ29tcGFyaXNvblN0YXR1cxInCiNGSUVMRF9DT01QQVJJU09OX1NUQVRVU19VTlNQRUNJRklFRBAAEiUKIUZJRUxEX0NPTVBBUklTT05fU1RBVFVTX1VOQ0hBTkdFRBABEiEKHUZJRUxEX0NPTVBBUklTT05fU1RBVFVTX0FEREVEEAISIwofRklFTERfQ09NUEFSSVNPTl9TVEFUVVNfUkVNT1ZFRBADEiMKH0ZJRUxEX0NPTVBBUklTT05fU1RBVFVTX0NIQU5HRUQQBEI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM\", [file_google_protobuf_timestamp]);\n\n/**\n * Validity says whether a Revision may be released, and if not, why. It is\n * decided when the Revision is saved, and decided again when a Release is\n * cut from it, so a Release never holds a Revision that is invalid by the\n * rules in force when it was cut.\n *\n * @generated from message importhub.v1.Validity\n */\nexport type Validity = Message<\"importhub.v1.Validity\"> & {\n /**\n * True when no reason was found.\n *\n * @generated from field: bool valid = 1;\n */\n valid: boolean;\n\n /**\n * Why the Revision is invalid; empty when it is valid. In a stable order:\n * the same data gives the same reasons in the same order.\n *\n * @generated from field: repeated importhub.v1.ValidityReason reasons = 2;\n */\n reasons: ValidityReason[];\n};\n\n/**\n * Describes the message importhub.v1.Validity.\n * Use `create(ValiditySchema)` to create a new message.\n */\nexport const ValiditySchema: GenMessage<Validity> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 0);\n\n/**\n * ValidityReason is one thing that makes a Revision invalid.\n *\n * @generated from message importhub.v1.ValidityReason\n */\nexport type ValidityReason = Message<\"importhub.v1.ValidityReason\"> & {\n /**\n * Where in the configuration, as a JSON Pointer into its content (for\n * example `/entities/nbsp`); empty when it concerns the whole.\n *\n * @generated from field: string path = 1;\n */\n path: string;\n\n /**\n * A stable, machine-readable code, such as `no_entities`; the type's\n * service documents its codes.\n *\n * @generated from field: string code = 2;\n */\n code: string;\n\n /**\n * What is wrong, in English, for a person.\n *\n * @generated from field: string message = 3;\n */\n message: string;\n};\n\n/**\n * Describes the message importhub.v1.ValidityReason.\n * Use `create(ValidityReasonSchema)` to create a new message.\n */\nexport const ValidityReasonSchema: GenMessage<ValidityReason> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 1);\n\n/**\n * ConfigurationRevision is one saved Revision of a configuration, as its\n * history lists it.\n *\n * @generated from message importhub.v1.ConfigurationRevision\n */\nexport type ConfigurationRevision = Message<\"importhub.v1.ConfigurationRevision\"> & {\n /**\n * The Revision's id.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The odon user id of the person who saved it.\n *\n * @generated from field: string saved_by = 2;\n */\n savedBy: string;\n\n /**\n * When it was saved.\n *\n * @generated from field: google.protobuf.Timestamp saved_at = 3;\n */\n savedAt?: Timestamp | undefined;\n\n /**\n * Whether it could be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity validity = 4;\n */\n validity?: Validity | undefined;\n\n /**\n * The Revision it restored, when it was saved by a restore; empty for an\n * ordinary save.\n *\n * @generated from field: string restored_from_revision_id = 5;\n */\n restoredFromRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationRevision.\n * Use `create(ConfigurationRevisionSchema)` to create a new message.\n */\nexport const ConfigurationRevisionSchema: GenMessage<ConfigurationRevision> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 2);\n\n/**\n * ConfigurationRelease is one Configuration Release: a Revision an admin\n * declared ready to run. A real Import runs only on Releases (ADR 0016).\n * A Release never changes.\n *\n * @generated from message importhub.v1.ConfigurationRelease\n */\nexport type ConfigurationRelease = Message<\"importhub.v1.ConfigurationRelease\"> & {\n /**\n * The Release's id.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision it pins.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * Its place among the configuration's Releases: 1 for the first, counting\n * up, so a person can say \"Release 3\".\n *\n * @generated from field: int32 number = 3;\n */\n number: number;\n\n /**\n * The odon user id of the admin who cut it.\n *\n * @generated from field: string released_by = 4;\n */\n releasedBy: string;\n\n /**\n * When it was cut.\n *\n * @generated from field: google.protobuf.Timestamp released_at = 5;\n */\n releasedAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationRelease.\n * Use `create(ConfigurationReleaseSchema)` to create a new message.\n */\nexport const ConfigurationReleaseSchema: GenMessage<ConfigurationRelease> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 3);\n\n/**\n * ConfigurationState is where a configuration stands: its draft, and how the\n * draft compares with the latest Release (release-a-configuration:AC1).\n *\n * @generated from message importhub.v1.ConfigurationState\n */\nexport type ConfigurationState = Message<\"importhub.v1.ConfigurationState\"> & {\n /**\n * The draft: the head Revision, the one the next save builds on and a\n * Release would be cut from.\n *\n * @generated from field: string draft_revision_id = 1;\n */\n draftRevisionId: string;\n\n /**\n * Whether the draft may be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity draft_validity = 2;\n */\n draftValidity?: Validity | undefined;\n\n /**\n * The latest Release; unset while the configuration has none.\n *\n * @generated from field: importhub.v1.ConfigurationRelease latest_release = 3;\n */\n latestRelease?: ConfigurationRelease | undefined;\n\n /**\n * True when the draft's content differs from the latest Release's, and\n * always true while there is no Release. A draft that restored the latest\n * Release's content does not differ, even though it is another Revision.\n *\n * @generated from field: bool draft_differs_from_release = 4;\n */\n draftDiffersFromRelease: boolean;\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationState.\n * Use `create(ConfigurationStateSchema)` to create a new message.\n */\nexport const ConfigurationStateSchema: GenMessage<ConfigurationState> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 4);\n\n/**\n * FieldComparison is how one top-level field of a configuration differs\n * between two of its Revisions.\n *\n * @generated from message importhub.v1.FieldComparison\n */\nexport type FieldComparison = Message<\"importhub.v1.FieldComparison\"> & {\n /**\n * The field's key in the content, such as `entities`.\n *\n * @generated from field: string field = 1;\n */\n field: string;\n\n /**\n * @generated from field: importhub.v1.FieldComparisonStatus status = 2;\n */\n status: FieldComparisonStatus;\n};\n\n/**\n * Describes the message importhub.v1.FieldComparison.\n * Use `create(FieldComparisonSchema)` to create a new message.\n */\nexport const FieldComparisonSchema: GenMessage<FieldComparison> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 5);\n\n/**\n * ImportProfileRef names one Import Profile: where another configuration is\n * used (manage-mappings:AC3, release-a-configuration:AC4) or why it may not be\n * deleted (manage-mappings:AC4, manage-entity-sets:AC3).\n *\n * @generated from message importhub.v1.ImportProfileRef\n */\nexport type ImportProfileRef = Message<\"importhub.v1.ImportProfileRef\"> & {\n /**\n * The Import Profile's id.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * Its name, as its draft has it.\n *\n * @generated from field: string name = 2;\n */\n name: string;\n};\n\n/**\n * Describes the message importhub.v1.ImportProfileRef.\n * Use `create(ImportProfileRefSchema)` to create a new message.\n */\nexport const ImportProfileRefSchema: GenMessage<ImportProfileRef> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 6);\n\n/**\n * ConfigurationInUse is the detail of a FailedPrecondition delete of a\n * Mapping that Import Profiles include, or of an Entity Set they name: the\n * Profiles, by name. A Profile counts when its draft or its latest Release\n * includes or names it, since either may still run or be released.\n *\n * @generated from message importhub.v1.ConfigurationInUse\n */\nexport type ConfigurationInUse = Message<\"importhub.v1.ConfigurationInUse\"> & {\n /**\n * @generated from field: repeated importhub.v1.ImportProfileRef import_profiles = 1;\n */\n importProfiles: ImportProfileRef[];\n};\n\n/**\n * Describes the message importhub.v1.ConfigurationInUse.\n * Use `create(ConfigurationInUseSchema)` to create a new message.\n */\nexport const ConfigurationInUseSchema: GenMessage<ConfigurationInUse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_configuration, 7);\n\n/**\n * FieldComparisonStatus is how a field differs between two Revisions, from\n * the first to the second.\n *\n * @generated from enum importhub.v1.FieldComparisonStatus\n */\nexport enum FieldComparisonStatus {\n /**\n * @generated from enum value: FIELD_COMPARISON_STATUS_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * The same value on both sides, or absent from both.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_UNCHANGED = 1;\n */\n UNCHANGED = 1,\n\n /**\n * Absent from the first, present in the second.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_ADDED = 2;\n */\n ADDED = 2,\n\n /**\n * Present in the first, absent from the second.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_REMOVED = 3;\n */\n REMOVED = 3,\n\n /**\n * Present on both sides with different values.\n *\n * @generated from enum value: FIELD_COMPARISON_STATUS_CHANGED = 4;\n */\n CHANGED = 4,\n}\n\n/**\n * Describes the enum importhub.v1.FieldComparisonStatus.\n */\nexport const FieldComparisonStatusSchema: GenEnum<FieldComparisonStatus> = /*@__PURE__*/\n enumDesc(file_importhub_v1_configuration, 0);\n\n","// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/entity_set.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { ConfigurationRelease, ConfigurationRevision, ConfigurationState, FieldComparison, Validity } from \"./configuration_pb\";\nimport { file_importhub_v1_configuration } from \"./configuration_pb\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/entity_set.proto.\n */\nexport const file_importhub_v1_entity_set: GenFile = /*@__PURE__*/\n fileDesc(\"Ch1pbXBvcnRodWIvdjEvZW50aXR5X3NldC5wcm90bxIMaW1wb3J0aHViLnYxIugBCglFbnRpdHlTZXQSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSLwoHY29udGVudBgDIAEoCzIeLmltcG9ydGh1Yi52MS5FbnRpdHlTZXRDb250ZW50EigKCHZhbGlkaXR5GAQgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5Ei8KBXN0YXRlGAUgASgLMiAuaW1wb3J0aHViLnYxLkNvbmZpZ3VyYXRpb25TdGF0ZRIuCgpjcmVhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCKmAQoQRW50aXR5U2V0Q29udGVudBIMCgRuYW1lGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEj4KCGVudGl0aWVzGAMgAygLMiwuaW1wb3J0aHViLnYxLkVudGl0eVNldENvbnRlbnQuRW50aXRpZXNFbnRyeRovCg1FbnRpdGllc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiFwoVTGlzdEVudGl0eVNldHNSZXF1ZXN0IkYKFkxpc3RFbnRpdHlTZXRzUmVzcG9uc2USLAoLZW50aXR5X3NldHMYASADKAsyFy5pbXBvcnRodWIudjEuRW50aXR5U2V0IjYKE0dldEVudGl0eVNldFJlcXVlc3QSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkiQwoUR2V0RW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G9uc2USXgoPVXBkYXRlRW50aXR5U2V0EiQuaW1wb3J0aHViLnYxLlVwZGF0ZUVudGl0eVNldFJlcXVlc3QaJS5pbXBvcnRodWIudjEuVXBkYXRlRW50aXR5U2V0UmVzcG9uc2USXgoPRGVsZXRlRW50aXR5U2V0EiQuaW1wb3J0aHViLnYxLkRlbGV0ZUVudGl0eVNldFJlcXVlc3QaJS5pbXBvcnRodWIudjEuRGVsZXRlRW50aXR5U2V0UmVzcG9uc2USagoTQ3V0RW50aXR5U2V0UmVsZWFzZRIoLmltcG9ydGh1Yi52MS5DdXRFbnRpdHlTZXRSZWxlYXNlUmVxdWVzdBopLmltcG9ydGh1Yi52MS5DdXRFbnRpdHlTZXRSZWxlYXNlUmVzcG9uc2USbQoUTGlzdEVudGl0eVNldEhpc3RvcnkSKS5pbXBvcnRodWIudjEuTGlzdEVudGl0eVNldEhpc3RvcnlSZXF1ZXN0GiouaW1wb3J0aHViLnYxLkxpc3RFbnRpdHlTZXRIaXN0b3J5UmVzcG9uc2USfAoZQ29tcGFyZUVudGl0eVNldFJldmlzaW9ucxIuLmltcG9ydGh1Yi52MS5Db21wYXJlRW50aXR5U2V0UmV2aXNpb25zUmVxdWVzdBovLmltcG9ydGh1Yi52MS5Db21wYXJlRW50aXR5U2V0UmV2aXNpb25zUmVzcG9uc2USeQoYUmVzdG9yZUVudGl0eVNldFJldmlzaW9uEi0uaW1wb3J0aHViLnYxLlJlc3RvcmVFbnRpdHlTZXRSZXZpc2lvblJlcXVlc3QaLi5pbXBvcnRodWIudjEuUmVzdG9yZUVudGl0eVNldFJldmlzaW9uUmVzcG9uc2VCOVo3Z2l0aHViLmNvbS9rbmtjcy9pbXBvcnRodWIvZ2VuL2ltcG9ydGh1Yi92MTtpbXBvcnRodWJ2MWIGcHJvdG8z\", [file_google_protobuf_timestamp, file_importhub_v1_configuration]);\n\n/**\n * EntitySet is one Entity Set, at one of its Revisions.\n *\n * @generated from message importhub.v1.EntitySet\n */\nexport type EntitySet = Message<\"importhub.v1.EntitySet\"> & {\n /**\n * The Entity Set's id, a KSUID.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision this content is from: the draft, unless an older one was\n * asked for.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * The content at that Revision.\n *\n * @generated from field: importhub.v1.EntitySetContent content = 3;\n */\n content?: EntitySetContent | undefined;\n\n /**\n * Whether that Revision may be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity validity = 4;\n */\n validity?: Validity | undefined;\n\n /**\n * Where the Entity Set stands: its draft and latest Release.\n *\n * @generated from field: importhub.v1.ConfigurationState state = 5;\n */\n state?: ConfigurationState | undefined;\n\n /**\n * When the Entity Set was created.\n *\n * @generated from field: google.protobuf.Timestamp created_at = 6;\n */\n createdAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message importhub.v1.EntitySet.\n * Use `create(EntitySetSchema)` to create a new message.\n */\nexport const EntitySetSchema: GenMessage<EntitySet> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 0);\n\n/**\n * EntitySetContent is what an admin edits, and what a Revision holds.\n *\n * @generated from message importhub.v1.EntitySetContent\n */\nexport type EntitySetContent = Message<\"importhub.v1.EntitySetContent\"> & {\n /**\n * The Entity Set's name, unique in the workspace. An Import Profile names\n * its Entity Set by id, so renaming it breaks no Profile.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * What the Entity Set is for; free text.\n *\n * @generated from field: string description = 2;\n */\n description: string;\n\n /**\n * The entities, by name without `&` and `;`: `auml` for `ä`, mapped\n * to the text each stands for, which may be empty.\n *\n * @generated from field: map<string, string> entities = 3;\n */\n entities: { [key: string]: string };\n};\n\n/**\n * Describes the message importhub.v1.EntitySetContent.\n * Use `create(EntitySetContentSchema)` to create a new message.\n */\nexport const EntitySetContentSchema: GenMessage<EntitySetContent> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 1);\n\n/**\n * @generated from message importhub.v1.ListEntitySetsRequest\n */\nexport type ListEntitySetsRequest = Message<\"importhub.v1.ListEntitySetsRequest\"> & {\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetsRequest.\n * Use `create(ListEntitySetsRequestSchema)` to create a new message.\n */\nexport const ListEntitySetsRequestSchema: GenMessage<ListEntitySetsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 2);\n\n/**\n * @generated from message importhub.v1.ListEntitySetsResponse\n */\nexport type ListEntitySetsResponse = Message<\"importhub.v1.ListEntitySetsResponse\"> & {\n /**\n * @generated from field: repeated importhub.v1.EntitySet entity_sets = 1;\n */\n entitySets: EntitySet[];\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetsResponse.\n * Use `create(ListEntitySetsResponseSchema)` to create a new message.\n */\nexport const ListEntitySetsResponseSchema: GenMessage<ListEntitySetsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 3);\n\n/**\n * @generated from message importhub.v1.GetEntitySetRequest\n */\nexport type GetEntitySetRequest = Message<\"importhub.v1.GetEntitySetRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * An older Revision to read the content of; empty for the draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.GetEntitySetRequest.\n * Use `create(GetEntitySetRequestSchema)` to create a new message.\n */\nexport const GetEntitySetRequestSchema: GenMessage<GetEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 4);\n\n/**\n * @generated from message importhub.v1.GetEntitySetResponse\n */\nexport type GetEntitySetResponse = Message<\"importhub.v1.GetEntitySetResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.GetEntitySetResponse.\n * Use `create(GetEntitySetResponseSchema)` to create a new message.\n */\nexport const GetEntitySetResponseSchema: GenMessage<GetEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 5);\n\n/**\n * @generated from message importhub.v1.CreateEntitySetRequest\n */\nexport type CreateEntitySetRequest = Message<\"importhub.v1.CreateEntitySetRequest\"> & {\n /**\n * @generated from field: importhub.v1.EntitySetContent content = 1;\n */\n content?: EntitySetContent | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateEntitySetRequest.\n * Use `create(CreateEntitySetRequestSchema)` to create a new message.\n */\nexport const CreateEntitySetRequestSchema: GenMessage<CreateEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 6);\n\n/**\n * @generated from message importhub.v1.CreateEntitySetResponse\n */\nexport type CreateEntitySetResponse = Message<\"importhub.v1.CreateEntitySetResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateEntitySetResponse.\n * Use `create(CreateEntitySetResponseSchema)` to create a new message.\n */\nexport const CreateEntitySetResponseSchema: GenMessage<CreateEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 7);\n\n/**\n * @generated from message importhub.v1.UpdateEntitySetRequest\n */\nexport type UpdateEntitySetRequest = Message<\"importhub.v1.UpdateEntitySetRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The whole new content; it replaces the draft's.\n *\n * @generated from field: importhub.v1.EntitySetContent content = 2;\n */\n content?: EntitySetContent | undefined;\n\n /**\n * The draft this edit was made on. Given, the save is refused if the\n * draft has moved since; empty, it saves on whatever the draft is.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.UpdateEntitySetRequest.\n * Use `create(UpdateEntitySetRequestSchema)` to create a new message.\n */\nexport const UpdateEntitySetRequestSchema: GenMessage<UpdateEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 8);\n\n/**\n * @generated from message importhub.v1.UpdateEntitySetResponse\n */\nexport type UpdateEntitySetResponse = Message<\"importhub.v1.UpdateEntitySetResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.UpdateEntitySetResponse.\n * Use `create(UpdateEntitySetResponseSchema)` to create a new message.\n */\nexport const UpdateEntitySetResponseSchema: GenMessage<UpdateEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 9);\n\n/**\n * @generated from message importhub.v1.DeleteEntitySetRequest\n */\nexport type DeleteEntitySetRequest = Message<\"importhub.v1.DeleteEntitySetRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message importhub.v1.DeleteEntitySetRequest.\n * Use `create(DeleteEntitySetRequestSchema)` to create a new message.\n */\nexport const DeleteEntitySetRequestSchema: GenMessage<DeleteEntitySetRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 10);\n\n/**\n * @generated from message importhub.v1.DeleteEntitySetResponse\n */\nexport type DeleteEntitySetResponse = Message<\"importhub.v1.DeleteEntitySetResponse\"> & {\n};\n\n/**\n * Describes the message importhub.v1.DeleteEntitySetResponse.\n * Use `create(DeleteEntitySetResponseSchema)` to create a new message.\n */\nexport const DeleteEntitySetResponseSchema: GenMessage<DeleteEntitySetResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 11);\n\n/**\n * @generated from message importhub.v1.CutEntitySetReleaseRequest\n */\nexport type CutEntitySetReleaseRequest = Message<\"importhub.v1.CutEntitySetReleaseRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The draft the admin is releasing. Given, the cut is refused if the\n * draft has moved since, so what was reviewed is what is released.\n *\n * @generated from field: string draft_revision_id = 2;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CutEntitySetReleaseRequest.\n * Use `create(CutEntitySetReleaseRequestSchema)` to create a new message.\n */\nexport const CutEntitySetReleaseRequestSchema: GenMessage<CutEntitySetReleaseRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 12);\n\n/**\n * @generated from message importhub.v1.CutEntitySetReleaseResponse\n */\nexport type CutEntitySetReleaseResponse = Message<\"importhub.v1.CutEntitySetReleaseResponse\"> & {\n /**\n * The Release cut.\n *\n * @generated from field: importhub.v1.ConfigurationRelease release = 1;\n */\n release?: ConfigurationRelease | undefined;\n\n /**\n * The Entity Set after the cut.\n *\n * @generated from field: importhub.v1.EntitySet entity_set = 2;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CutEntitySetReleaseResponse.\n * Use `create(CutEntitySetReleaseResponseSchema)` to create a new message.\n */\nexport const CutEntitySetReleaseResponseSchema: GenMessage<CutEntitySetReleaseResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 13);\n\n/**\n * @generated from message importhub.v1.ListEntitySetHistoryRequest\n */\nexport type ListEntitySetHistoryRequest = Message<\"importhub.v1.ListEntitySetHistoryRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * Revisions per page; 0 means 100, and at most 1000.\n *\n * @generated from field: int32 page_size = 2;\n */\n pageSize: number;\n\n /**\n * The next_page_token of the previous page; empty for the first.\n *\n * @generated from field: string page_token = 3;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetHistoryRequest.\n * Use `create(ListEntitySetHistoryRequestSchema)` to create a new message.\n */\nexport const ListEntitySetHistoryRequestSchema: GenMessage<ListEntitySetHistoryRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 14);\n\n/**\n * @generated from message importhub.v1.ListEntitySetHistoryResponse\n */\nexport type ListEntitySetHistoryResponse = Message<\"importhub.v1.ListEntitySetHistoryResponse\"> & {\n /**\n * One page of Revisions, newest first.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRevision revisions = 1;\n */\n revisions: ConfigurationRevision[];\n\n /**\n * Every Release, newest first, on every page.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRelease releases = 2;\n */\n releases: ConfigurationRelease[];\n\n /**\n * The page_token of the next page; empty on the last.\n *\n * @generated from field: string next_page_token = 3;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListEntitySetHistoryResponse.\n * Use `create(ListEntitySetHistoryResponseSchema)` to create a new message.\n */\nexport const ListEntitySetHistoryResponseSchema: GenMessage<ListEntitySetHistoryResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 15);\n\n/**\n * @generated from message importhub.v1.CompareEntitySetRevisionsRequest\n */\nexport type CompareEntitySetRevisionsRequest = Message<\"importhub.v1.CompareEntitySetRevisionsRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision compared from.\n *\n * @generated from field: string from_revision_id = 2;\n */\n fromRevisionId: string;\n\n /**\n * The Revision compared to.\n *\n * @generated from field: string to_revision_id = 3;\n */\n toRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CompareEntitySetRevisionsRequest.\n * Use `create(CompareEntitySetRevisionsRequestSchema)` to create a new message.\n */\nexport const CompareEntitySetRevisionsRequestSchema: GenMessage<CompareEntitySetRevisionsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 16);\n\n/**\n * @generated from message importhub.v1.CompareEntitySetRevisionsResponse\n */\nexport type CompareEntitySetRevisionsResponse = Message<\"importhub.v1.CompareEntitySetRevisionsResponse\"> & {\n /**\n * The Entity Set at from_revision_id.\n *\n * @generated from field: importhub.v1.EntitySet from = 1;\n */\n from?: EntitySet | undefined;\n\n /**\n * The Entity Set at to_revision_id.\n *\n * @generated from field: importhub.v1.EntitySet to = 2;\n */\n to?: EntitySet | undefined;\n\n /**\n * Each field, and how it differs from `from` to `to`.\n *\n * @generated from field: repeated importhub.v1.FieldComparison fields = 3;\n */\n fields: FieldComparison[];\n};\n\n/**\n * Describes the message importhub.v1.CompareEntitySetRevisionsResponse.\n * Use `create(CompareEntitySetRevisionsResponseSchema)` to create a new message.\n */\nexport const CompareEntitySetRevisionsResponseSchema: GenMessage<CompareEntitySetRevisionsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 17);\n\n/**\n * @generated from message importhub.v1.RestoreEntitySetRevisionRequest\n */\nexport type RestoreEntitySetRevisionRequest = Message<\"importhub.v1.RestoreEntitySetRevisionRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The older Revision whose content becomes the new draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * As UpdateEntitySetRequest's.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.RestoreEntitySetRevisionRequest.\n * Use `create(RestoreEntitySetRevisionRequestSchema)` to create a new message.\n */\nexport const RestoreEntitySetRevisionRequestSchema: GenMessage<RestoreEntitySetRevisionRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 18);\n\n/**\n * @generated from message importhub.v1.RestoreEntitySetRevisionResponse\n */\nexport type RestoreEntitySetRevisionResponse = Message<\"importhub.v1.RestoreEntitySetRevisionResponse\"> & {\n /**\n * @generated from field: importhub.v1.EntitySet entity_set = 1;\n */\n entitySet?: EntitySet | undefined;\n};\n\n/**\n * Describes the message importhub.v1.RestoreEntitySetRevisionResponse.\n * Use `create(RestoreEntitySetRevisionResponseSchema)` to create a new message.\n */\nexport const RestoreEntitySetRevisionResponseSchema: GenMessage<RestoreEntitySetRevisionResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_entity_set, 19);\n\n/**\n * EntitySetService holds the workspace's Entity Sets: named tables of XML\n * character entities and what they stand for, with which an Import reads a\n * Source File that uses entities it does not declare (CONTEXT.md,\n * manage-entity-sets).\n *\n * An Entity Set is versioned configuration (ADR 0016): every create, update\n * and restore saves a draft Revision, and an admin cuts a Configuration\n * Release from a valid draft. A real Import runs only on a Release.\n *\n * Every RPC acts on the caller's workspace, which comes from the token's\n * active workspace and never from a request field. Reads need `viewer`;\n * every write needs `admin` (ADR 0010, control-who-may-import:AC3).\n *\n * The validity reason codes of an Entity Set:\n *\n * - `no_entities`: it defines no entity.\n * - `unreadable_name`: an entity's name is not a letter followed by\n * letters, digits, `.`, `_` or `-`, so no reference in a Source File\n * could ever name it.\n * - `predefined_entity`: it redefines one of XML's own entities (`amp`,\n * `lt`, `gt`, `quot`, `apos`), which would change how every file is\n * read.\n *\n * @generated from service importhub.v1.EntitySetService\n */\nexport const EntitySetService: GenService<{\n /**\n * ListEntitySets returns every Entity Set of the workspace, by name, each\n * with its draft. A workspace keeps a handful, so the list is not paged.\n *\n * @generated from rpc importhub.v1.EntitySetService.ListEntitySets\n */\n listEntitySets: {\n methodKind: \"unary\";\n input: typeof ListEntitySetsRequestSchema;\n output: typeof ListEntitySetsResponseSchema;\n },\n /**\n * GetEntitySet returns one Entity Set with its draft, or with an older\n * Revision of it when one is named.\n *\n * @generated from rpc importhub.v1.EntitySetService.GetEntitySet\n */\n getEntitySet: {\n methodKind: \"unary\";\n input: typeof GetEntitySetRequestSchema;\n output: typeof GetEntitySetResponseSchema;\n },\n /**\n * CreateEntitySet creates an Entity Set, its content the first draft. An\n * invalid table of entities is saved and marked invalid with its reasons;\n * a missing name, or one another Entity Set of the workspace has, is\n * refused (InvalidArgument, AlreadyExists).\n *\n * @generated from rpc importhub.v1.EntitySetService.CreateEntitySet\n */\n createEntitySet: {\n methodKind: \"unary\";\n input: typeof CreateEntitySetRequestSchema;\n output: typeof CreateEntitySetResponseSchema;\n },\n /**\n * UpdateEntitySet saves new content as a new draft Revision. It is\n * refused with FailedPrecondition when draft_revision_id is given and is\n * no longer the draft: somebody saved in between.\n *\n * @generated from rpc importhub.v1.EntitySetService.UpdateEntitySet\n */\n updateEntitySet: {\n methodKind: \"unary\";\n input: typeof UpdateEntitySetRequestSchema;\n output: typeof UpdateEntitySetResponseSchema;\n },\n /**\n * DeleteEntitySet deletes an Entity Set; it no longer appears in the list,\n * and its name is free again. It is refused with FailedPrecondition while\n * an Import Profile names it, naming the Profiles in the message and in a\n * ConfigurationInUse detail (manage-entity-sets:AC3).\n *\n * @generated from rpc importhub.v1.EntitySetService.DeleteEntitySet\n */\n deleteEntitySet: {\n methodKind: \"unary\";\n input: typeof DeleteEntitySetRequestSchema;\n output: typeof DeleteEntitySetResponseSchema;\n },\n /**\n * CutEntitySetRelease cuts a Configuration Release from the draft. It is\n * refused with FailedPrecondition when the draft is invalid (the error\n * carries the draft's Validity as a detail, with its reasons), when the\n * draft does not differ from the latest Release, or when\n * draft_revision_id is given and is no longer the draft.\n *\n * @generated from rpc importhub.v1.EntitySetService.CutEntitySetRelease\n */\n cutEntitySetRelease: {\n methodKind: \"unary\";\n input: typeof CutEntitySetReleaseRequestSchema;\n output: typeof CutEntitySetReleaseResponseSchema;\n },\n /**\n * ListEntitySetHistory lists an Entity Set's Revisions, newest first and\n * paged, with who saved each and when, and all its Releases, with who cut\n * each and when (release-a-configuration:AC6).\n *\n * @generated from rpc importhub.v1.EntitySetService.ListEntitySetHistory\n */\n listEntitySetHistory: {\n methodKind: \"unary\";\n input: typeof ListEntitySetHistoryRequestSchema;\n output: typeof ListEntitySetHistoryResponseSchema;\n },\n /**\n * CompareEntitySetRevisions compares two Revisions of one Entity Set: both\n * contents, for a side-by-side view, and how each field differs from the\n * first to the second. A Release is compared through the Revision it pins.\n *\n * @generated from rpc importhub.v1.EntitySetService.CompareEntitySetRevisions\n */\n compareEntitySetRevisions: {\n methodKind: \"unary\";\n input: typeof CompareEntitySetRevisionsRequestSchema;\n output: typeof CompareEntitySetRevisionsResponseSchema;\n },\n /**\n * RestoreEntitySetRevision saves an older Revision's content as a new\n * draft (release-a-configuration:AC7). Its validity is decided anew, by\n * the rules in force now. It is refused like UpdateEntitySet when the\n * draft moved, and with AlreadyExists when the old name is now another\n * Entity Set's.\n *\n * @generated from rpc importhub.v1.EntitySetService.RestoreEntitySetRevision\n */\n restoreEntitySetRevision: {\n methodKind: \"unary\";\n input: typeof RestoreEntitySetRevisionRequestSchema;\n output: typeof RestoreEntitySetRevisionResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_importhub_v1_entity_set, 0);\n\n","// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/import_profile.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_struct, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { ConfigurationRelease, ConfigurationRevision, ConfigurationState, FieldComparison, Validity } from \"./configuration_pb\";\nimport { file_importhub_v1_configuration } from \"./configuration_pb\";\nimport type { JsonObject, Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/import_profile.proto.\n */\nexport const file_importhub_v1_import_profile: GenFile = /*@__PURE__*/\n fileDesc(\"CiFpbXBvcnRodWIvdjEvaW1wb3J0X3Byb2ZpbGUucHJvdG8SDGltcG9ydGh1Yi52MSKiAgoNSW1wb3J0UHJvZmlsZRIKCgJpZBgBIAEoCRITCgtyZXZpc2lvbl9pZBgCIAEoCRIzCgdjb250ZW50GAMgASgLMiIuaW1wb3J0aHViLnYxLkltcG9ydFByb2ZpbGVDb250ZW50EigKCHZhbGlkaXR5GAQgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5Ei8KBXN0YXRlGAUgASgLMiAuaW1wb3J0aHViLnYxLkNvbmZpZ3VyYXRpb25TdGF0ZRIuCgpjcmVhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIwChBjdXJyZW50X3ZhbGlkaXR5GAcgASgLMhYuaW1wb3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dWVzdBopLmltcG9ydGh1Yi52MS5VcGRhdGVJbXBvcnRQcm9maWxlUmVzcG9uc2USagoTRGVsZXRlSW1wb3J0UHJvZmlsZRIoLmltcG9ydGh1Yi52MS5EZWxldGVJbXBvcnRQcm9maWxlUmVxdWVzdBopLmltcG9ydGh1Yi52MS5EZWxldGVJbXBvcnRQcm9maWxlUmVzcG9uc2USdgoXQ3V0SW1wb3J0UHJvZmlsZVJlbGVhc2USLC5pbXBvcnRodWIudjEuQ3V0SW1wb3J0UHJvZmlsZVJlbGVhc2VSZXF1ZXN0Gi0uaW1wb3J0aHViLnYxLkN1dEltcG9ydFByb2ZpbGVSZWxlYXNlUmVzcG9uc2USeQoYTGlzdEltcG9ydFByb2ZpbGVIaXN0b3J5Ei0uaW1wb3J0aHViLnYxLkxpc3RJbXBvcnRQcm9maWxlSGlzdG9yeVJlcXVlc3QaLi5pbXBvcnRodWIudjEuTGlzdEltcG9ydFByb2ZpbGVIaXN0b3J5UmVzcG9uc2USiAEKHUNvbXBhcmVJbXBvcnRQcm9maWxlUmV2aXNpb25zEjIuaW1wb3J0aHViLnYxLkNvbXBhcmVJbXBvcnRQcm9maWxlUmV2aXNpb25zUmVxdWVzdBozLmltcG9ydGh1Yi52MS5Db21wYXJlSW1wb3J0UHJvZmlsZVJldmlzaW9uc1Jlc3BvbnNlEoUBChxSZXN0b3JlSW1wb3J0UHJvZmlsZVJldmlzaW9uEjEuaW1wb3J0aHViLnYxLlJlc3RvcmVJbXBvcnRQcm9maWxlUmV2aXNpb25SZXF1ZXN0GjIuaW1wb3J0aHViLnYxLlJlc3RvcmVJbXBvcnRQcm9maWxlUmV2aXNpb25SZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM\", [file_google_protobuf_struct, file_google_protobuf_timestamp, file_importhub_v1_configuration]);\n\n/**\n * ImportProfile is one Import Profile, at one of its Revisions.\n *\n * @generated from message importhub.v1.ImportProfile\n */\nexport type ImportProfile = Message<\"importhub.v1.ImportProfile\"> & {\n /**\n * The Import Profile's id, a KSUID.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision this content is from: the draft, unless an older one was\n * asked for.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * The content at that Revision.\n *\n * @generated from field: importhub.v1.ImportProfileContent content = 3;\n */\n content?: ImportProfileContent | undefined;\n\n /**\n * Whether that Revision may be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity validity = 4;\n */\n validity?: Validity | undefined;\n\n /**\n * Where the Profile stands: its draft and latest Release.\n *\n * @generated from field: importhub.v1.ConfigurationState state = 5;\n */\n state?: ConfigurationState | undefined;\n\n /**\n * When the Profile was created.\n *\n * @generated from field: google.protobuf.Timestamp created_at = 6;\n */\n createdAt?: Timestamp | undefined;\n\n /**\n * Whether the draft can be released now: its validity as saved, plus\n * what changed since without the Profile being saved, such as a Mapping\n * it includes becoming invalid (manage-import-profiles:AC6).\n *\n * @generated from field: importhub.v1.Validity current_validity = 7;\n */\n currentValidity?: Validity | undefined;\n};\n\n/**\n * Describes the message importhub.v1.ImportProfile.\n * Use `create(ImportProfileSchema)` to create a new message.\n */\nexport const ImportProfileSchema: GenMessage<ImportProfile> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 0);\n\n/**\n * ImportProfileContent is what an admin edits, and what a Revision holds.\n *\n * @generated from message importhub.v1.ImportProfileContent\n */\nexport type ImportProfileContent = Message<\"importhub.v1.ImportProfileContent\"> & {\n /**\n * The Profile's name, unique in the workspace.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * What the Profile is for; free text.\n *\n * @generated from field: string description = 2;\n */\n description: string;\n\n /**\n * The id of the Entity Set the Source File is read with; empty for none.\n *\n * @generated from field: string entity_set_id = 3;\n */\n entitySetId: string;\n\n /**\n * The Preprocessors, in the order they run on the Source File.\n *\n * @generated from field: repeated importhub.v1.ProcessorStep preprocessors = 4;\n */\n preprocessors: ProcessorStep[];\n\n /**\n * The ids of the Mappings it includes, in the order they run.\n *\n * @generated from field: repeated string mapping_ids = 5;\n */\n mappingIds: string[];\n\n /**\n * The Post-processors, in the order they run on the mapped Source\n * Versions.\n *\n * @generated from field: repeated importhub.v1.ProcessorStep post_processors = 6;\n */\n postProcessors: ProcessorStep[];\n\n /**\n * Publish the Change Set of an Import that Succeeds without Item\n * Problems (CONTEXT.md \"Auto-publish\").\n *\n * @generated from field: bool auto_publish = 7;\n */\n autoPublish: boolean;\n\n /**\n * Delete the Source File as soon as an Import Succeeds without Item\n * Problems, instead of after the retention period.\n *\n * @generated from field: bool delete_source_file_on_success = 8;\n */\n deleteSourceFileOnSuccess: boolean;\n};\n\n/**\n * Describes the message importhub.v1.ImportProfileContent.\n * Use `create(ImportProfileContentSchema)` to create a new message.\n */\nexport const ImportProfileContentSchema: GenMessage<ImportProfileContent> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 1);\n\n/**\n * ProcessorStep is one Processor in a Profile's pipeline, with its settings.\n *\n * @generated from message importhub.v1.ProcessorStep\n */\nexport type ProcessorStep = Message<\"importhub.v1.ProcessorStep\"> & {\n /**\n * The Processor, by its name in the catalogue.\n *\n * @generated from field: string processor = 1;\n */\n processor: string;\n\n /**\n * Its settings: one value per setting of its settings spec, by the\n * setting's `api_accessor`.\n *\n * @generated from field: google.protobuf.Struct settings = 2;\n */\n settings?: JsonObject | undefined;\n};\n\n/**\n * Describes the message importhub.v1.ProcessorStep.\n * Use `create(ProcessorStepSchema)` to create a new message.\n */\nexport const ProcessorStepSchema: GenMessage<ProcessorStep> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 2);\n\n/**\n * @generated from message importhub.v1.ListImportProfilesRequest\n */\nexport type ListImportProfilesRequest = Message<\"importhub.v1.ListImportProfilesRequest\"> & {\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfilesRequest.\n * Use `create(ListImportProfilesRequestSchema)` to create a new message.\n */\nexport const ListImportProfilesRequestSchema: GenMessage<ListImportProfilesRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 3);\n\n/**\n * @generated from message importhub.v1.ListImportProfilesResponse\n */\nexport type ListImportProfilesResponse = Message<\"importhub.v1.ListImportProfilesResponse\"> & {\n /**\n * @generated from field: repeated importhub.v1.ImportProfile import_profiles = 1;\n */\n importProfiles: ImportProfile[];\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfilesResponse.\n * Use `create(ListImportProfilesResponseSchema)` to create a new message.\n */\nexport const ListImportProfilesResponseSchema: GenMessage<ListImportProfilesResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 4);\n\n/**\n * @generated from message importhub.v1.GetImportProfileRequest\n */\nexport type GetImportProfileRequest = Message<\"importhub.v1.GetImportProfileRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * An older Revision to read the content of; empty for the draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.GetImportProfileRequest.\n * Use `create(GetImportProfileRequestSchema)` to create a new message.\n */\nexport const GetImportProfileRequestSchema: GenMessage<GetImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 5);\n\n/**\n * @generated from message importhub.v1.GetImportProfileResponse\n */\nexport type GetImportProfileResponse = Message<\"importhub.v1.GetImportProfileResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.GetImportProfileResponse.\n * Use `create(GetImportProfileResponseSchema)` to create a new message.\n */\nexport const GetImportProfileResponseSchema: GenMessage<GetImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 6);\n\n/**\n * @generated from message importhub.v1.CreateImportProfileRequest\n */\nexport type CreateImportProfileRequest = Message<\"importhub.v1.CreateImportProfileRequest\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfileContent content = 1;\n */\n content?: ImportProfileContent | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateImportProfileRequest.\n * Use `create(CreateImportProfileRequestSchema)` to create a new message.\n */\nexport const CreateImportProfileRequestSchema: GenMessage<CreateImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 7);\n\n/**\n * @generated from message importhub.v1.CreateImportProfileResponse\n */\nexport type CreateImportProfileResponse = Message<\"importhub.v1.CreateImportProfileResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateImportProfileResponse.\n * Use `create(CreateImportProfileResponseSchema)` to create a new message.\n */\nexport const CreateImportProfileResponseSchema: GenMessage<CreateImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 8);\n\n/**\n * @generated from message importhub.v1.UpdateImportProfileRequest\n */\nexport type UpdateImportProfileRequest = Message<\"importhub.v1.UpdateImportProfileRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The whole new content; it replaces the draft's.\n *\n * @generated from field: importhub.v1.ImportProfileContent content = 2;\n */\n content?: ImportProfileContent | undefined;\n\n /**\n * The draft this edit was made on. Given, the save is refused if the\n * draft has moved since; empty, it saves on whatever the draft is.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.UpdateImportProfileRequest.\n * Use `create(UpdateImportProfileRequestSchema)` to create a new message.\n */\nexport const UpdateImportProfileRequestSchema: GenMessage<UpdateImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 9);\n\n/**\n * @generated from message importhub.v1.UpdateImportProfileResponse\n */\nexport type UpdateImportProfileResponse = Message<\"importhub.v1.UpdateImportProfileResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.UpdateImportProfileResponse.\n * Use `create(UpdateImportProfileResponseSchema)` to create a new message.\n */\nexport const UpdateImportProfileResponseSchema: GenMessage<UpdateImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 10);\n\n/**\n * @generated from message importhub.v1.DeleteImportProfileRequest\n */\nexport type DeleteImportProfileRequest = Message<\"importhub.v1.DeleteImportProfileRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message importhub.v1.DeleteImportProfileRequest.\n * Use `create(DeleteImportProfileRequestSchema)` to create a new message.\n */\nexport const DeleteImportProfileRequestSchema: GenMessage<DeleteImportProfileRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 11);\n\n/**\n * @generated from message importhub.v1.DeleteImportProfileResponse\n */\nexport type DeleteImportProfileResponse = Message<\"importhub.v1.DeleteImportProfileResponse\"> & {\n};\n\n/**\n * Describes the message importhub.v1.DeleteImportProfileResponse.\n * Use `create(DeleteImportProfileResponseSchema)` to create a new message.\n */\nexport const DeleteImportProfileResponseSchema: GenMessage<DeleteImportProfileResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 12);\n\n/**\n * @generated from message importhub.v1.CutImportProfileReleaseRequest\n */\nexport type CutImportProfileReleaseRequest = Message<\"importhub.v1.CutImportProfileReleaseRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The draft the admin is releasing. Given, the cut is refused if the\n * draft has moved since.\n *\n * @generated from field: string draft_revision_id = 2;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CutImportProfileReleaseRequest.\n * Use `create(CutImportProfileReleaseRequestSchema)` to create a new message.\n */\nexport const CutImportProfileReleaseRequestSchema: GenMessage<CutImportProfileReleaseRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 13);\n\n/**\n * @generated from message importhub.v1.CutImportProfileReleaseResponse\n */\nexport type CutImportProfileReleaseResponse = Message<\"importhub.v1.CutImportProfileReleaseResponse\"> & {\n /**\n * The Release cut.\n *\n * @generated from field: importhub.v1.ConfigurationRelease release = 1;\n */\n release?: ConfigurationRelease | undefined;\n\n /**\n * The Profile after the cut.\n *\n * @generated from field: importhub.v1.ImportProfile import_profile = 2;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CutImportProfileReleaseResponse.\n * Use `create(CutImportProfileReleaseResponseSchema)` to create a new message.\n */\nexport const CutImportProfileReleaseResponseSchema: GenMessage<CutImportProfileReleaseResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 14);\n\n/**\n * @generated from message importhub.v1.ListImportProfileHistoryRequest\n */\nexport type ListImportProfileHistoryRequest = Message<\"importhub.v1.ListImportProfileHistoryRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * Revisions per page; 0 means 100, and at most 1000.\n *\n * @generated from field: int32 page_size = 2;\n */\n pageSize: number;\n\n /**\n * The next_page_token of the previous page; empty for the first.\n *\n * @generated from field: string page_token = 3;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfileHistoryRequest.\n * Use `create(ListImportProfileHistoryRequestSchema)` to create a new message.\n */\nexport const ListImportProfileHistoryRequestSchema: GenMessage<ListImportProfileHistoryRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 15);\n\n/**\n * @generated from message importhub.v1.ListImportProfileHistoryResponse\n */\nexport type ListImportProfileHistoryResponse = Message<\"importhub.v1.ListImportProfileHistoryResponse\"> & {\n /**\n * One page of Revisions, newest first.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRevision revisions = 1;\n */\n revisions: ConfigurationRevision[];\n\n /**\n * Every Release, newest first, on every page.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRelease releases = 2;\n */\n releases: ConfigurationRelease[];\n\n /**\n * The page_token of the next page; empty on the last.\n *\n * @generated from field: string next_page_token = 3;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListImportProfileHistoryResponse.\n * Use `create(ListImportProfileHistoryResponseSchema)` to create a new message.\n */\nexport const ListImportProfileHistoryResponseSchema: GenMessage<ListImportProfileHistoryResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 16);\n\n/**\n * @generated from message importhub.v1.CompareImportProfileRevisionsRequest\n */\nexport type CompareImportProfileRevisionsRequest = Message<\"importhub.v1.CompareImportProfileRevisionsRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string from_revision_id = 2;\n */\n fromRevisionId: string;\n\n /**\n * @generated from field: string to_revision_id = 3;\n */\n toRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CompareImportProfileRevisionsRequest.\n * Use `create(CompareImportProfileRevisionsRequestSchema)` to create a new message.\n */\nexport const CompareImportProfileRevisionsRequestSchema: GenMessage<CompareImportProfileRevisionsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 17);\n\n/**\n * @generated from message importhub.v1.CompareImportProfileRevisionsResponse\n */\nexport type CompareImportProfileRevisionsResponse = Message<\"importhub.v1.CompareImportProfileRevisionsResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile from = 1;\n */\n from?: ImportProfile | undefined;\n\n /**\n * @generated from field: importhub.v1.ImportProfile to = 2;\n */\n to?: ImportProfile | undefined;\n\n /**\n * Each field, and how it differs from `from` to `to`.\n *\n * @generated from field: repeated importhub.v1.FieldComparison fields = 3;\n */\n fields: FieldComparison[];\n};\n\n/**\n * Describes the message importhub.v1.CompareImportProfileRevisionsResponse.\n * Use `create(CompareImportProfileRevisionsResponseSchema)` to create a new message.\n */\nexport const CompareImportProfileRevisionsResponseSchema: GenMessage<CompareImportProfileRevisionsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 18);\n\n/**\n * @generated from message importhub.v1.RestoreImportProfileRevisionRequest\n */\nexport type RestoreImportProfileRevisionRequest = Message<\"importhub.v1.RestoreImportProfileRevisionRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The older Revision whose content becomes the new draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * As UpdateImportProfileRequest's.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.RestoreImportProfileRevisionRequest.\n * Use `create(RestoreImportProfileRevisionRequestSchema)` to create a new message.\n */\nexport const RestoreImportProfileRevisionRequestSchema: GenMessage<RestoreImportProfileRevisionRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 19);\n\n/**\n * @generated from message importhub.v1.RestoreImportProfileRevisionResponse\n */\nexport type RestoreImportProfileRevisionResponse = Message<\"importhub.v1.RestoreImportProfileRevisionResponse\"> & {\n /**\n * @generated from field: importhub.v1.ImportProfile import_profile = 1;\n */\n importProfile?: ImportProfile | undefined;\n};\n\n/**\n * Describes the message importhub.v1.RestoreImportProfileRevisionResponse.\n * Use `create(RestoreImportProfileRevisionResponseSchema)` to create a new message.\n */\nexport const RestoreImportProfileRevisionResponseSchema: GenMessage<RestoreImportProfileRevisionResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_import_profile, 20);\n\n/**\n * ImportProfileService holds the workspace's Import Profiles: the named\n * recipes an Import runs, one per kind of Source File (CONTEXT.md,\n * manage-import-profiles). A Profile names at most one Entity Set, its\n * Preprocessors, the Mappings it includes and its Post-processors, in order,\n * and what happens to the result.\n *\n * An Import Profile is versioned configuration (ADR 0016): every create,\n * update and restore saves a draft Revision, and an admin cuts a\n * Configuration Release from a valid draft. A Profile names its Mappings and\n * its Entity Set by id, not their Releases: an Import takes the latest\n * Release of each when it starts.\n *\n * Every RPC acts on the caller's workspace, which comes from the token's\n * active workspace and never from a request field. Reads need `viewer`;\n * every write needs `admin` (ADR 0010, control-who-may-import:AC3).\n *\n * The validity reason codes of an Import Profile, decided when it is saved:\n *\n * - `unknown_processor`: a step names a Processor the catalogue does not\n * list (ProcessorService).\n * - `wrong_processor_kind`: a Post-processor listed among the\n * Preprocessors, or the other way round.\n * - `rich_text_processor`: a Processor that works on one rich-text field,\n * which a Mapping's field configures, listed on the Profile.\n * - `invalid_processor_settings`: a setting the Processor does not take, a\n * required one left out, or a value of the wrong type.\n * - `no_mappings`: it includes no Mapping.\n * - `duplicate_mapping`: it includes one Mapping twice.\n * - `mapping_missing`: it includes a Mapping that does not exist.\n * - `entity_set_missing`: it names an Entity Set that does not exist.\n *\n * And the ones current_validity adds, decided at each read and when a Release\n * is cut, since they change without the Profile being saved\n * (manage-import-profiles:AC6):\n *\n * - `mapping_invalid`: what an Import would run of a Mapping it includes\n * is invalid now: its latest Release, when its Blueprint is gone, or,\n * while it has no Release, its draft. The message names the Mapping and\n * its reasons.\n * - `entity_set_invalid`: the Entity Set it names has no Release and an\n * invalid draft (a Release was valid when cut).\n * - `mapping_missing`, `entity_set_missing`, as above, once deleted.\n *\n * @generated from service importhub.v1.ImportProfileService\n */\nexport const ImportProfileService: GenService<{\n /**\n * ListImportProfiles returns every Import Profile of the workspace, by\n * name, each with its draft, its latest Release and whether it is valid\n * now. A workspace keeps a handful, so the list is not paged.\n *\n * @generated from rpc importhub.v1.ImportProfileService.ListImportProfiles\n */\n listImportProfiles: {\n methodKind: \"unary\";\n input: typeof ListImportProfilesRequestSchema;\n output: typeof ListImportProfilesResponseSchema;\n },\n /**\n * GetImportProfile returns one Import Profile with its draft, or with an\n * older Revision of it when one is named.\n *\n * @generated from rpc importhub.v1.ImportProfileService.GetImportProfile\n */\n getImportProfile: {\n methodKind: \"unary\";\n input: typeof GetImportProfileRequestSchema;\n output: typeof GetImportProfileResponseSchema;\n },\n /**\n * CreateImportProfile creates an Import Profile, its content the first\n * draft. Invalid settings are saved and marked invalid with their\n * reasons; a missing name, or one another Profile of the workspace has,\n * is refused (InvalidArgument, AlreadyExists).\n *\n * @generated from rpc importhub.v1.ImportProfileService.CreateImportProfile\n */\n createImportProfile: {\n methodKind: \"unary\";\n input: typeof CreateImportProfileRequestSchema;\n output: typeof CreateImportProfileResponseSchema;\n },\n /**\n * UpdateImportProfile saves new content as a new draft Revision. It is\n * refused with FailedPrecondition when draft_revision_id is given and is\n * no longer the draft.\n *\n * @generated from rpc importhub.v1.ImportProfileService.UpdateImportProfile\n */\n updateImportProfile: {\n methodKind: \"unary\";\n input: typeof UpdateImportProfileRequestSchema;\n output: typeof UpdateImportProfileResponseSchema;\n },\n /**\n * DeleteImportProfile deletes an Import Profile; it no longer appears in\n * the list, and its name is free again.\n *\n * @generated from rpc importhub.v1.ImportProfileService.DeleteImportProfile\n */\n deleteImportProfile: {\n methodKind: \"unary\";\n input: typeof DeleteImportProfileRequestSchema;\n output: typeof DeleteImportProfileResponseSchema;\n },\n /**\n * CutImportProfileRelease cuts a Configuration Release from the draft. It\n * is refused with FailedPrecondition, the Validity as a detail, when the\n * draft is not valid now (current_validity: an included Mapping that is\n * invalid refuses it too), when the draft does not differ from the latest\n * Release, or when draft_revision_id is given and is no longer the draft.\n *\n * @generated from rpc importhub.v1.ImportProfileService.CutImportProfileRelease\n */\n cutImportProfileRelease: {\n methodKind: \"unary\";\n input: typeof CutImportProfileReleaseRequestSchema;\n output: typeof CutImportProfileReleaseResponseSchema;\n },\n /**\n * ListImportProfileHistory lists an Import Profile's Revisions, newest\n * first and paged, and all its Releases (release-a-configuration:AC6).\n *\n * @generated from rpc importhub.v1.ImportProfileService.ListImportProfileHistory\n */\n listImportProfileHistory: {\n methodKind: \"unary\";\n input: typeof ListImportProfileHistoryRequestSchema;\n output: typeof ListImportProfileHistoryResponseSchema;\n },\n /**\n * CompareImportProfileRevisions compares two Revisions of one Import\n * Profile: both contents, and how each field differs.\n *\n * @generated from rpc importhub.v1.ImportProfileService.CompareImportProfileRevisions\n */\n compareImportProfileRevisions: {\n methodKind: \"unary\";\n input: typeof CompareImportProfileRevisionsRequestSchema;\n output: typeof CompareImportProfileRevisionsResponseSchema;\n },\n /**\n * RestoreImportProfileRevision saves an older Revision's content as a new\n * draft (release-a-configuration:AC7), its validity decided anew.\n *\n * @generated from rpc importhub.v1.ImportProfileService.RestoreImportProfileRevision\n */\n restoreImportProfileRevision: {\n methodKind: \"unary\";\n input: typeof RestoreImportProfileRevisionRequestSchema;\n output: typeof RestoreImportProfileRevisionResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_importhub_v1_import_profile, 0);\n\n","// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/mapping.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_struct, file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { ConfigurationRelease, ConfigurationRevision, ConfigurationState, FieldComparison, ImportProfileRef, Validity } from \"./configuration_pb\";\nimport { file_importhub_v1_configuration } from \"./configuration_pb\";\nimport type { JsonObject, Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/mapping.proto.\n */\nexport const file_importhub_v1_mapping: GenFile = /*@__PURE__*/\n fileDesc(\"ChppbXBvcnRodWIvdjEvbWFwcGluZy5wcm90bxIMaW1wb3J0aHViLnYxIpYCCgdNYXBwaW5nEgoKAmlkGAEgASgJEhMKC3JldmlzaW9uX2lkGAIgASgJEi0KB2NvbnRlbnQYAyABKAsyHC5pbXBvcnRodWIudjEuTWFwcGluZ0NvbnRlbnQSKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSLwoFc3RhdGUYBSABKAsyIC5pbXBvcnRodWIudjEuQ29uZmlndXJhdGlvbl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0aHViLnYxLkxpc3RNYXBwaW5nSGlzdG9yeVJlc3BvbnNlEnYKF0NvbXBhcmVNYXBwaW5nUmV2aXNpb25zEiwuaW1wb3J0aHViLnYxLkNvbXBhcmVNYXBwaW5nUmV2aXNpb25zUmVxdWVzdBotLmltcG9ydGh1Yi52MS5Db21wYXJlTWFwcGluZ1JldmlzaW9uc1Jlc3BvbnNlEnMKFlJlc3RvcmVNYXBwaW5nUmV2aXNpb24SKy5pbXBvcnRodWIudjEuUmVzdG9yZU1hcHBpbmdSZXZpc2lvblJlcXVlc3QaLC5pbXBvcnRodWIudjEuUmVzdG9yZU1hcHBpbmdSZXZpc2lvblJlc3BvbnNlEnwKGUxpc3RNYXBwaW5nSW1wb3J0UHJvZmlsZXMSLi5pbXBvcnRodWIudjEuTGlzdE1hcHBpbmdJbXBvcnRQcm9maWxlc1JlcXVlc3QaLy5pbXBvcnRodWIudjEuTGlzdE1hcHBpbmdJbXBvcnRQcm9maWxlc1Jlc3BvbnNlEoUBChxDaGVja01hcHBpbmdCbHVlcHJpbnRSZWxlYXNlEjEuaW1wb3J0aHViLnYxLkNoZWNrTWFwcGluZ0JsdWVwcmludFJlbGVhc2VSZXF1ZXN0GjIuaW1wb3J0aHViLnYxLkNoZWNrTWFwcGluZ0JsdWVwcmludFJlbGVhc2VSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM\", [file_google_protobuf_struct, file_google_protobuf_timestamp, file_importhub_v1_configuration]);\n\n/**\n * Mapping is one Mapping, at one of its Revisions.\n *\n * @generated from message importhub.v1.Mapping\n */\nexport type Mapping = Message<\"importhub.v1.Mapping\"> & {\n /**\n * The Mapping's id, a KSUID.\n *\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Revision this content is from: the draft, unless an older one was\n * asked for.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * The content at that Revision.\n *\n * @generated from field: importhub.v1.MappingContent content = 3;\n */\n content?: MappingContent | undefined;\n\n /**\n * Whether that Revision may be released, as decided when it was saved.\n *\n * @generated from field: importhub.v1.Validity validity = 4;\n */\n validity?: Validity | undefined;\n\n /**\n * Where the Mapping stands: its draft and latest Release.\n *\n * @generated from field: importhub.v1.ConfigurationState state = 5;\n */\n state?: ConfigurationState | undefined;\n\n /**\n * When the Mapping was created.\n *\n * @generated from field: google.protobuf.Timestamp created_at = 6;\n */\n createdAt?: Timestamp | undefined;\n\n /**\n * Whether the draft can be released now: its validity as saved, plus\n * `blueprint_gone` when blueprinthub no longer knows a Release the draft\n * or the latest Release pins (manage-mappings:AC7).\n *\n * @generated from field: importhub.v1.Validity current_validity = 7;\n */\n currentValidity?: Validity | undefined;\n};\n\n/**\n * Describes the message importhub.v1.Mapping.\n * Use `create(MappingSchema)` to create a new message.\n */\nexport const MappingSchema: GenMessage<Mapping> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 0);\n\n/**\n * MappingContent is what an admin edits, and what a Revision holds. Every\n * setting is defined here, including those whose behaviour later Tasks\n * build, so the structured editor is built against one shape.\n *\n * @generated from message importhub.v1.MappingContent\n */\nexport type MappingContent = Message<\"importhub.v1.MappingContent\"> & {\n /**\n * The Mapping's name, unique in the workspace.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * What the Mapping is for; free text.\n *\n * @generated from field: string description = 2;\n */\n description: string;\n\n /**\n * The target Blueprint in blueprinthub.\n *\n * @generated from field: string blueprint_id = 3;\n */\n blueprintId: string;\n\n /**\n * The Blueprint Release it pins, a Release of blueprint_id. Every Import\n * creates Content on exactly this Release (ADR 0002).\n *\n * @generated from field: string blueprint_release_id = 4;\n */\n blueprintReleaseId: string;\n\n /**\n * The XPath selecting the source elements that each become one Content.\n *\n * @generated from field: string element_selector = 5;\n */\n elementSelector: string;\n\n /**\n * How each element's Source Key is extracted.\n *\n * @generated from field: importhub.v1.SourceKey source_key = 6;\n */\n sourceKey?: SourceKey | undefined;\n\n /**\n * The field mappings, each an xmlmapper FieldMapping object (`name`,\n * `selector`, `type` and the options of its type, xmlmapper's JSON keys):\n * `name` is the field path in the pinned Release, and a fieldset's or a\n * virtual table's children are named relative to it. Every key is kept\n * as given, including those the structured editor has no form for\n * (edit-a-mapping-in-the-structured-editor:AC3).\n *\n * @generated from field: repeated google.protobuf.Struct fields = 7;\n */\n fields: JsonObject[];\n\n /**\n * The values that decide whether a Source Version is already in\n * contenthub (CONTEXT.md \"Version Match\"). Unset: each element is a\n * single version, compared with Main's head.\n *\n * @generated from field: importhub.v1.VersionMatch version_match = 8;\n */\n versionMatch?: VersionMatch | undefined;\n\n /**\n * Where a Source Version's Validity Period is read from; unset when the\n * source carries none (the Import's effective date applies).\n *\n * @generated from field: importhub.v1.ValidityPeriodSource validity_period = 9;\n */\n validityPeriod?: ValidityPeriodSource | undefined;\n\n /**\n * Where a Source Version's Release Spec values are read from.\n *\n * @generated from field: repeated importhub.v1.ReleaseSpecSource release_spec = 10;\n */\n releaseSpec: ReleaseSpecSource[];\n\n /**\n * What happens to a Changed Version.\n *\n * @generated from field: importhub.v1.ChangedVersionHandling changed_version = 11;\n */\n changedVersion: ChangedVersionHandling;\n\n /**\n * A Stub Mapping: for each Source Key no Content has yet, it creates\n * Content holding only the Content Key and the fields it maps, and never\n * changes existing Content (CONTEXT.md \"Stub Mapping\").\n *\n * @generated from field: bool stub = 12;\n */\n stub: boolean;\n\n /**\n * The per-Ausgabe data written onto Titles (CONTEXT.md \"Title\n * Contribution\").\n *\n * @generated from field: repeated importhub.v1.TitleContribution title_contributions = 13;\n */\n titleContributions: TitleContribution[];\n\n /**\n * How each Content's Collection is derived from the source.\n *\n * @generated from field: importhub.v1.CollectionRouting collection_routing = 14;\n */\n collectionRouting?: CollectionRouting | undefined;\n\n /**\n * The keys of the Collections every Content of the Mapping is filed\n * into, beside what collection_routing derives.\n *\n * @generated from field: repeated string collections = 15;\n */\n collections: string[];\n\n /**\n * The display name of each Content, with field paths in braces, such as\n * `{titelnum} — {titel}`.\n *\n * @generated from field: string display_name_template = 16;\n */\n displayNameTemplate: string;\n\n /**\n * The file references that become Placeholder Assets in mediahub.\n *\n * @generated from field: repeated importhub.v1.PlaceholderAssets placeholder_assets = 17;\n */\n placeholderAssets: PlaceholderAssets[];\n};\n\n/**\n * Describes the message importhub.v1.MappingContent.\n * Use `create(MappingContentSchema)` to create a new message.\n */\nexport const MappingContentSchema: GenMessage<MappingContent> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 1);\n\n/**\n * SourceKey says how the Source Key is extracted from an element: by\n * selector, or by template, which wins when both are set (xmlmapper's\n * idSelector and idTemplate).\n *\n * @generated from message importhub.v1.SourceKey\n */\nexport type SourceKey = Message<\"importhub.v1.SourceKey\"> & {\n /**\n * An XPath, relative to the element, whose value is the Source Key.\n *\n * @generated from field: string selector = 1;\n */\n selector: string;\n\n /**\n * The Source Key built from XPath expressions in braces, such as\n * `{ancestor::gesetz/@refid}-{@nr}`.\n *\n * @generated from field: string template = 2;\n */\n template: string;\n\n /**\n * A regular expression applied to each placeholder's value; its capture\n * groups replace a value it matches (xmlmapper's idExtractPattern).\n *\n * @generated from field: string extract_pattern = 3;\n */\n extractPattern: string;\n\n /**\n * Joins the capture groups; `-` when unset (idExtractSeparator).\n *\n * @generated from field: optional string extract_separator = 4;\n */\n extractSeparator?: string | undefined;\n\n /**\n * Removes all whitespace from the Source Key (idNormalize).\n *\n * @generated from field: bool normalize = 5;\n */\n normalize: boolean;\n};\n\n/**\n * Describes the message importhub.v1.SourceKey.\n * Use `create(SourceKeySchema)` to create a new message.\n */\nexport const SourceKeySchema: GenMessage<SourceKey> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 2);\n\n/**\n * VersionMatch is any combination of the Validity Period, Release Spec fields\n * and content fields. A Source Version matches an existing Release of the\n * same Content whose values are all equal.\n *\n * @generated from message importhub.v1.VersionMatch\n */\nexport type VersionMatch = Message<\"importhub.v1.VersionMatch\"> & {\n /**\n * Compare the Validity Period.\n *\n * @generated from field: bool validity_period = 1;\n */\n validityPeriod: boolean;\n\n /**\n * The Release Spec fields to compare, by path.\n *\n * @generated from field: repeated string release_spec_fields = 2;\n */\n releaseSpecFields: string[];\n\n /**\n * The content fields to compare, by path; each must be mapped.\n *\n * @generated from field: repeated string content_fields = 3;\n */\n contentFields: string[];\n};\n\n/**\n * Describes the message importhub.v1.VersionMatch.\n * Use `create(VersionMatchSchema)` to create a new message.\n */\nexport const VersionMatchSchema: GenMessage<VersionMatch> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 3);\n\n/**\n * ValidityPeriodSource is where the Validity Period of a Source Version is\n * read from.\n *\n * @generated from message importhub.v1.ValidityPeriodSource\n */\nexport type ValidityPeriodSource = Message<\"importhub.v1.ValidityPeriodSource\"> & {\n /**\n * An XPath, relative to the element, for the first day it is valid.\n *\n * @generated from field: string valid_from_selector = 1;\n */\n validFromSelector: string;\n\n /**\n * An XPath for the last day; empty for open-ended.\n *\n * @generated from field: string valid_to_selector = 2;\n */\n validToSelector: string;\n\n /**\n * Go time layouts the dates are read with, tried in order; ISO dates\n * (`2006-01-02`) when empty.\n *\n * @generated from field: repeated string date_formats = 3;\n */\n dateFormats: string[];\n};\n\n/**\n * Describes the message importhub.v1.ValidityPeriodSource.\n * Use `create(ValidityPeriodSourceSchema)` to create a new message.\n */\nexport const ValidityPeriodSourceSchema: GenMessage<ValidityPeriodSource> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 4);\n\n/**\n * ReleaseSpecSource is where one Release Spec value is read from.\n *\n * @generated from message importhub.v1.ReleaseSpecSource\n */\nexport type ReleaseSpecSource = Message<\"importhub.v1.ReleaseSpecSource\"> & {\n /**\n * The Release Spec field, by its path in the pinned Release.\n *\n * @generated from field: string field = 1;\n */\n field: string;\n\n /**\n * An XPath, relative to the element.\n *\n * @generated from field: string selector = 2;\n */\n selector: string;\n};\n\n/**\n * Describes the message importhub.v1.ReleaseSpecSource.\n * Use `create(ReleaseSpecSourceSchema)` to create a new message.\n */\nexport const ReleaseSpecSourceSchema: GenMessage<ReleaseSpecSource> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 5);\n\n/**\n * TitleContribution writes per-Ausgabe data found in the element onto the\n * Title whose Content Key equals the Ausgabe code (ADR 0013).\n *\n * @generated from message importhub.v1.TitleContribution\n */\nexport type TitleContribution = Message<\"importhub.v1.TitleContribution\"> & {\n /**\n * An XPath, relative to the element, selecting the elements that carry\n * one Ausgabe's data each.\n *\n * @generated from field: string selector = 1;\n */\n selector: string;\n\n /**\n * An XPath, relative to each of those, for the Ausgabe code.\n *\n * @generated from field: string ausgabe_code_selector = 2;\n */\n ausgabeCodeSelector: string;\n\n /**\n * Reference Spec values written on the Title's Include.\n *\n * @generated from field: repeated importhub.v1.TitleValueSource reference_spec_values = 3;\n */\n referenceSpecValues: TitleValueSource[];\n\n /**\n * An XPath for the reference filter written on the Title; empty for\n * none.\n *\n * @generated from field: string reference_filter_selector = 4;\n */\n referenceFilterSelector: string;\n\n /**\n * An intent written on the Title's tree; unset for none.\n *\n * @generated from field: importhub.v1.TitleIntent intent = 5;\n */\n intent: TitleIntent;\n\n /**\n * An XPath for the replacement or annotation text of a `replace` or\n * `annotate` intent.\n *\n * @generated from field: string intent_text_selector = 6;\n */\n intentTextSelector: string;\n};\n\n/**\n * Describes the message importhub.v1.TitleContribution.\n * Use `create(TitleContributionSchema)` to create a new message.\n */\nexport const TitleContributionSchema: GenMessage<TitleContribution> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 6);\n\n/**\n * TitleValueSource is where one value written on a Title is read from.\n *\n * @generated from message importhub.v1.TitleValueSource\n */\nexport type TitleValueSource = Message<\"importhub.v1.TitleValueSource\"> & {\n /**\n * The field, by its path in the Title's Reference Spec.\n *\n * @generated from field: string field = 1;\n */\n field: string;\n\n /**\n * An XPath, relative to the Ausgabe's element.\n *\n * @generated from field: string selector = 2;\n */\n selector: string;\n};\n\n/**\n * Describes the message importhub.v1.TitleValueSource.\n * Use `create(TitleValueSourceSchema)` to create a new message.\n */\nexport const TitleValueSourceSchema: GenMessage<TitleValueSource> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 7);\n\n/**\n * CollectionRouting derives one Collection per Content from the source. It\n * yields at most one key: the selector's value, mapped through\n * collection_map when it has entries; else id_pattern's first capture group\n * on the Source Key, filled into collection_template; else fallback.\n *\n * @generated from message importhub.v1.CollectionRouting\n */\nexport type CollectionRouting = Message<\"importhub.v1.CollectionRouting\"> & {\n /**\n * An XPath, relative to the element, whose value decides the Collection.\n *\n * @generated from field: string selector = 1;\n */\n selector: string;\n\n /**\n * The selector's values, mapped to Collection keys. Empty: the value is\n * the key.\n *\n * @generated from field: map<string, string> collection_map = 2;\n */\n collectionMap: { [key: string]: string };\n\n /**\n * A regular expression applied to the Source Key; its first capture\n * group is `{match}` in collection_template.\n *\n * @generated from field: string id_pattern = 3;\n */\n idPattern: string;\n\n /**\n * The Collection key, with `{match}` and `{suffix}` placeholders.\n *\n * @generated from field: string collection_template = 4;\n */\n collectionTemplate: string;\n\n /**\n * The static text `{suffix}` stands for.\n *\n * @generated from field: string suffix = 5;\n */\n suffix: string;\n\n /**\n * The Collection key used when the routing yields nothing; each use is\n * reported.\n *\n * @generated from field: string fallback = 6;\n */\n fallback: string;\n};\n\n/**\n * Describes the message importhub.v1.CollectionRouting.\n * Use `create(CollectionRoutingSchema)` to create a new message.\n */\nexport const CollectionRoutingSchema: GenMessage<CollectionRouting> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 8);\n\n/**\n * PlaceholderAssets turns the file references a Mapping marks into\n * Placeholder Assets in mediahub (CONTEXT.md \"Placeholder Asset\").\n *\n * @generated from message importhub.v1.PlaceholderAssets\n */\nexport type PlaceholderAssets = Message<\"importhub.v1.PlaceholderAssets\"> & {\n /**\n * An XPath, relative to the element, selecting the file references, such\n * as `.//grafik`.\n *\n * @generated from field: string selector = 1;\n */\n selector: string;\n\n /**\n * The mediahub asset type of the assets created.\n *\n * @generated from field: string asset_type = 2;\n */\n assetType: string;\n\n /**\n * XPath expressions, relative to each reference, whose values joined by\n * `/` form the asset's key in mediahub (its external_key).\n *\n * @generated from field: repeated string key_parts = 3;\n */\n keyParts: string[];\n\n /**\n * An XPath for the asset's name.\n *\n * @generated from field: string name_selector = 4;\n */\n nameSelector: string;\n\n /**\n * An XPath for the asset's description; empty for none.\n *\n * @generated from field: string description_selector = 5;\n */\n descriptionSelector: string;\n\n /**\n * The asset's metadata: XPath expressions, by metadata field.\n *\n * @generated from field: map<string, string> metadata = 6;\n */\n metadata: { [key: string]: string };\n\n /**\n * The mediahub folder path the mirrored folders are made under.\n *\n * @generated from field: string folder_root = 7;\n */\n folderRoot: string;\n\n /**\n * An XPath for the file's path, mirrored as folders under folder_root.\n *\n * @generated from field: string folder_path_selector = 8;\n */\n folderPathSelector: string;\n};\n\n/**\n * Describes the message importhub.v1.PlaceholderAssets.\n * Use `create(PlaceholderAssetsSchema)` to create a new message.\n */\nexport const PlaceholderAssetsSchema: GenMessage<PlaceholderAssets> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 9);\n\n/**\n * @generated from message importhub.v1.ListMappingsRequest\n */\nexport type ListMappingsRequest = Message<\"importhub.v1.ListMappingsRequest\"> & {\n};\n\n/**\n * Describes the message importhub.v1.ListMappingsRequest.\n * Use `create(ListMappingsRequestSchema)` to create a new message.\n */\nexport const ListMappingsRequestSchema: GenMessage<ListMappingsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 10);\n\n/**\n * @generated from message importhub.v1.ListMappingsResponse\n */\nexport type ListMappingsResponse = Message<\"importhub.v1.ListMappingsResponse\"> & {\n /**\n * @generated from field: repeated importhub.v1.Mapping mappings = 1;\n */\n mappings: Mapping[];\n};\n\n/**\n * Describes the message importhub.v1.ListMappingsResponse.\n * Use `create(ListMappingsResponseSchema)` to create a new message.\n */\nexport const ListMappingsResponseSchema: GenMessage<ListMappingsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 11);\n\n/**\n * @generated from message importhub.v1.GetMappingRequest\n */\nexport type GetMappingRequest = Message<\"importhub.v1.GetMappingRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * An older Revision to read the content of; empty for the draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.GetMappingRequest.\n * Use `create(GetMappingRequestSchema)` to create a new message.\n */\nexport const GetMappingRequestSchema: GenMessage<GetMappingRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 12);\n\n/**\n * @generated from message importhub.v1.GetMappingResponse\n */\nexport type GetMappingResponse = Message<\"importhub.v1.GetMappingResponse\"> & {\n /**\n * @generated from field: importhub.v1.Mapping mapping = 1;\n */\n mapping?: Mapping | undefined;\n};\n\n/**\n * Describes the message importhub.v1.GetMappingResponse.\n * Use `create(GetMappingResponseSchema)` to create a new message.\n */\nexport const GetMappingResponseSchema: GenMessage<GetMappingResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 13);\n\n/**\n * @generated from message importhub.v1.CreateMappingRequest\n */\nexport type CreateMappingRequest = Message<\"importhub.v1.CreateMappingRequest\"> & {\n /**\n * @generated from field: importhub.v1.MappingContent content = 1;\n */\n content?: MappingContent | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateMappingRequest.\n * Use `create(CreateMappingRequestSchema)` to create a new message.\n */\nexport const CreateMappingRequestSchema: GenMessage<CreateMappingRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 14);\n\n/**\n * @generated from message importhub.v1.CreateMappingResponse\n */\nexport type CreateMappingResponse = Message<\"importhub.v1.CreateMappingResponse\"> & {\n /**\n * @generated from field: importhub.v1.Mapping mapping = 1;\n */\n mapping?: Mapping | undefined;\n};\n\n/**\n * Describes the message importhub.v1.CreateMappingResponse.\n * Use `create(CreateMappingResponseSchema)` to create a new message.\n */\nexport const CreateMappingResponseSchema: GenMessage<CreateMappingResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 15);\n\n/**\n * @generated from message importhub.v1.UpdateMappingRequest\n */\nexport type UpdateMappingRequest = Message<\"importhub.v1.UpdateMappingRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The whole new content; it replaces the draft's.\n *\n * @generated from field: importhub.v1.MappingContent content = 2;\n */\n content?: MappingContent | undefined;\n\n /**\n * The draft this edit was made on. Given, the save is refused if the\n * draft has moved since; empty, it saves on whatever the draft is.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.UpdateMappingRequest.\n * Use `create(UpdateMappingRequestSchema)` to create a new message.\n */\nexport const UpdateMappingRequestSchema: GenMessage<UpdateMappingRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 16);\n\n/**\n * @generated from message importhub.v1.UpdateMappingResponse\n */\nexport type UpdateMappingResponse = Message<\"importhub.v1.UpdateMappingResponse\"> & {\n /**\n * @generated from field: importhub.v1.Mapping mapping = 1;\n */\n mapping?: Mapping | undefined;\n};\n\n/**\n * Describes the message importhub.v1.UpdateMappingResponse.\n * Use `create(UpdateMappingResponseSchema)` to create a new message.\n */\nexport const UpdateMappingResponseSchema: GenMessage<UpdateMappingResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 17);\n\n/**\n * @generated from message importhub.v1.DeleteMappingRequest\n */\nexport type DeleteMappingRequest = Message<\"importhub.v1.DeleteMappingRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message importhub.v1.DeleteMappingRequest.\n * Use `create(DeleteMappingRequestSchema)` to create a new message.\n */\nexport const DeleteMappingRequestSchema: GenMessage<DeleteMappingRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 18);\n\n/**\n * @generated from message importhub.v1.DeleteMappingResponse\n */\nexport type DeleteMappingResponse = Message<\"importhub.v1.DeleteMappingResponse\"> & {\n};\n\n/**\n * Describes the message importhub.v1.DeleteMappingResponse.\n * Use `create(DeleteMappingResponseSchema)` to create a new message.\n */\nexport const DeleteMappingResponseSchema: GenMessage<DeleteMappingResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 19);\n\n/**\n * @generated from message importhub.v1.CutMappingReleaseRequest\n */\nexport type CutMappingReleaseRequest = Message<\"importhub.v1.CutMappingReleaseRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The draft the admin is releasing. Given, the cut is refused if the\n * draft has moved since.\n *\n * @generated from field: string draft_revision_id = 2;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CutMappingReleaseRequest.\n * Use `create(CutMappingReleaseRequestSchema)` to create a new message.\n */\nexport const CutMappingReleaseRequestSchema: GenMessage<CutMappingReleaseRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 20);\n\n/**\n * @generated from message importhub.v1.CutMappingReleaseResponse\n */\nexport type CutMappingReleaseResponse = Message<\"importhub.v1.CutMappingReleaseResponse\"> & {\n /**\n * The Release cut.\n *\n * @generated from field: importhub.v1.ConfigurationRelease release = 1;\n */\n release?: ConfigurationRelease | undefined;\n\n /**\n * The Mapping after the cut.\n *\n * @generated from field: importhub.v1.Mapping mapping = 2;\n */\n mapping?: Mapping | undefined;\n\n /**\n * The Import Profiles that include it, by name.\n *\n * @generated from field: repeated importhub.v1.ImportProfileRef import_profiles = 3;\n */\n importProfiles: ImportProfileRef[];\n};\n\n/**\n * Describes the message importhub.v1.CutMappingReleaseResponse.\n * Use `create(CutMappingReleaseResponseSchema)` to create a new message.\n */\nexport const CutMappingReleaseResponseSchema: GenMessage<CutMappingReleaseResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 21);\n\n/**\n * @generated from message importhub.v1.ListMappingHistoryRequest\n */\nexport type ListMappingHistoryRequest = Message<\"importhub.v1.ListMappingHistoryRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * Revisions per page; 0 means 100, and at most 1000.\n *\n * @generated from field: int32 page_size = 2;\n */\n pageSize: number;\n\n /**\n * The next_page_token of the previous page; empty for the first.\n *\n * @generated from field: string page_token = 3;\n */\n pageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListMappingHistoryRequest.\n * Use `create(ListMappingHistoryRequestSchema)` to create a new message.\n */\nexport const ListMappingHistoryRequestSchema: GenMessage<ListMappingHistoryRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 22);\n\n/**\n * @generated from message importhub.v1.ListMappingHistoryResponse\n */\nexport type ListMappingHistoryResponse = Message<\"importhub.v1.ListMappingHistoryResponse\"> & {\n /**\n * One page of Revisions, newest first.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRevision revisions = 1;\n */\n revisions: ConfigurationRevision[];\n\n /**\n * Every Release, newest first, on every page.\n *\n * @generated from field: repeated importhub.v1.ConfigurationRelease releases = 2;\n */\n releases: ConfigurationRelease[];\n\n /**\n * The page_token of the next page; empty on the last.\n *\n * @generated from field: string next_page_token = 3;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message importhub.v1.ListMappingHistoryResponse.\n * Use `create(ListMappingHistoryResponseSchema)` to create a new message.\n */\nexport const ListMappingHistoryResponseSchema: GenMessage<ListMappingHistoryResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 23);\n\n/**\n * @generated from message importhub.v1.CompareMappingRevisionsRequest\n */\nexport type CompareMappingRevisionsRequest = Message<\"importhub.v1.CompareMappingRevisionsRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: string from_revision_id = 2;\n */\n fromRevisionId: string;\n\n /**\n * @generated from field: string to_revision_id = 3;\n */\n toRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.CompareMappingRevisionsRequest.\n * Use `create(CompareMappingRevisionsRequestSchema)` to create a new message.\n */\nexport const CompareMappingRevisionsRequestSchema: GenMessage<CompareMappingRevisionsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 24);\n\n/**\n * @generated from message importhub.v1.CompareMappingRevisionsResponse\n */\nexport type CompareMappingRevisionsResponse = Message<\"importhub.v1.CompareMappingRevisionsResponse\"> & {\n /**\n * @generated from field: importhub.v1.Mapping from = 1;\n */\n from?: Mapping | undefined;\n\n /**\n * @generated from field: importhub.v1.Mapping to = 2;\n */\n to?: Mapping | undefined;\n\n /**\n * Each field, and how it differs from `from` to `to`.\n *\n * @generated from field: repeated importhub.v1.FieldComparison fields = 3;\n */\n fields: FieldComparison[];\n};\n\n/**\n * Describes the message importhub.v1.CompareMappingRevisionsResponse.\n * Use `create(CompareMappingRevisionsResponseSchema)` to create a new message.\n */\nexport const CompareMappingRevisionsResponseSchema: GenMessage<CompareMappingRevisionsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 25);\n\n/**\n * @generated from message importhub.v1.RestoreMappingRevisionRequest\n */\nexport type RestoreMappingRevisionRequest = Message<\"importhub.v1.RestoreMappingRevisionRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The older Revision whose content becomes the new draft.\n *\n * @generated from field: string revision_id = 2;\n */\n revisionId: string;\n\n /**\n * As UpdateMappingRequest's.\n *\n * @generated from field: string draft_revision_id = 3;\n */\n draftRevisionId: string;\n};\n\n/**\n * Describes the message importhub.v1.RestoreMappingRevisionRequest.\n * Use `create(RestoreMappingRevisionRequestSchema)` to create a new message.\n */\nexport const RestoreMappingRevisionRequestSchema: GenMessage<RestoreMappingRevisionRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 26);\n\n/**\n * @generated from message importhub.v1.RestoreMappingRevisionResponse\n */\nexport type RestoreMappingRevisionResponse = Message<\"importhub.v1.RestoreMappingRevisionResponse\"> & {\n /**\n * @generated from field: importhub.v1.Mapping mapping = 1;\n */\n mapping?: Mapping | undefined;\n};\n\n/**\n * Describes the message importhub.v1.RestoreMappingRevisionResponse.\n * Use `create(RestoreMappingRevisionResponseSchema)` to create a new message.\n */\nexport const RestoreMappingRevisionResponseSchema: GenMessage<RestoreMappingRevisionResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 27);\n\n/**\n * @generated from message importhub.v1.ListMappingImportProfilesRequest\n */\nexport type ListMappingImportProfilesRequest = Message<\"importhub.v1.ListMappingImportProfilesRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n};\n\n/**\n * Describes the message importhub.v1.ListMappingImportProfilesRequest.\n * Use `create(ListMappingImportProfilesRequestSchema)` to create a new message.\n */\nexport const ListMappingImportProfilesRequestSchema: GenMessage<ListMappingImportProfilesRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 28);\n\n/**\n * @generated from message importhub.v1.ListMappingImportProfilesResponse\n */\nexport type ListMappingImportProfilesResponse = Message<\"importhub.v1.ListMappingImportProfilesResponse\"> & {\n /**\n * @generated from field: repeated importhub.v1.ImportProfileRef import_profiles = 1;\n */\n importProfiles: ImportProfileRef[];\n};\n\n/**\n * Describes the message importhub.v1.ListMappingImportProfilesResponse.\n * Use `create(ListMappingImportProfilesResponseSchema)` to create a new message.\n */\nexport const ListMappingImportProfilesResponseSchema: GenMessage<ListMappingImportProfilesResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 29);\n\n/**\n * @generated from message importhub.v1.CheckMappingBlueprintReleaseRequest\n */\nexport type CheckMappingBlueprintReleaseRequest = Message<\"importhub.v1.CheckMappingBlueprintReleaseRequest\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * The Blueprint Release the draft would move to.\n *\n * @generated from field: string blueprint_release_id = 2;\n */\n blueprintReleaseId: string;\n};\n\n/**\n * Describes the message importhub.v1.CheckMappingBlueprintReleaseRequest.\n * Use `create(CheckMappingBlueprintReleaseRequestSchema)` to create a new message.\n */\nexport const CheckMappingBlueprintReleaseRequestSchema: GenMessage<CheckMappingBlueprintReleaseRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 30);\n\n/**\n * @generated from message importhub.v1.CheckMappingBlueprintReleaseResponse\n */\nexport type CheckMappingBlueprintReleaseResponse = Message<\"importhub.v1.CheckMappingBlueprintReleaseResponse\"> & {\n /**\n * The Blueprint that Release is of.\n *\n * @generated from field: string blueprint_id = 1;\n */\n blueprintId: string;\n\n /**\n * Every field path the draft maps (field mappings, Version Match content\n * fields) that the Release does not have, in the draft's order.\n *\n * @generated from field: repeated string missing_field_paths = 2;\n */\n missingFieldPaths: string[];\n\n /**\n * Every Release Spec field the draft reads or matches on that the\n * Release does not have.\n *\n * @generated from field: repeated string missing_release_spec_fields = 3;\n */\n missingReleaseSpecFields: string[];\n};\n\n/**\n * Describes the message importhub.v1.CheckMappingBlueprintReleaseResponse.\n * Use `create(CheckMappingBlueprintReleaseResponseSchema)` to create a new message.\n */\nexport const CheckMappingBlueprintReleaseResponseSchema: GenMessage<CheckMappingBlueprintReleaseResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_mapping, 31);\n\n/**\n * ChangedVersionHandling is what happens to a Source Version that matches an\n * existing Release but whose mapped data differs (CONTEXT.md \"Changed\n * Version\").\n *\n * @generated from enum importhub.v1.ChangedVersionHandling\n */\nexport enum ChangedVersionHandling {\n /**\n * Unset: Correct.\n *\n * @generated from enum value: CHANGED_VERSION_HANDLING_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * A Planned Release that Supersedes the matched one.\n *\n * @generated from enum value: CHANGED_VERSION_HANDLING_CORRECT = 1;\n */\n CORRECT = 1,\n\n /**\n * Keep the existing Release; skip the Source Version.\n *\n * @generated from enum value: CHANGED_VERSION_HANDLING_KEEP = 2;\n */\n KEEP = 2,\n\n /**\n * Fail the Import.\n *\n * @generated from enum value: CHANGED_VERSION_HANDLING_FAIL = 3;\n */\n FAIL = 3,\n}\n\n/**\n * Describes the enum importhub.v1.ChangedVersionHandling.\n */\nexport const ChangedVersionHandlingSchema: GenEnum<ChangedVersionHandling> = /*@__PURE__*/\n enumDesc(file_importhub_v1_mapping, 0);\n\n/**\n * TitleIntent is an intent a Title Contribution writes on the Title's tree.\n *\n * @generated from enum importhub.v1.TitleIntent\n */\nexport enum TitleIntent {\n /**\n * None.\n *\n * @generated from enum value: TITLE_INTENT_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: TITLE_INTENT_EXCLUDE = 1;\n */\n EXCLUDE = 1,\n\n /**\n * @generated from enum value: TITLE_INTENT_REPLACE = 2;\n */\n REPLACE = 2,\n\n /**\n * @generated from enum value: TITLE_INTENT_ANNOTATE = 3;\n */\n ANNOTATE = 3,\n}\n\n/**\n * Describes the enum importhub.v1.TitleIntent.\n */\nexport const TitleIntentSchema: GenEnum<TitleIntent> = /*@__PURE__*/\n enumDesc(file_importhub_v1_mapping, 1);\n\n/**\n * MappingService holds the workspace's Mappings: the rules that turn each\n * matching element of a Source File into one Content of one target Blueprint,\n * field by field (CONTEXT.md, manage-mappings). A Mapping stands on its own,\n * and any number of Import Profiles include it.\n *\n * Each Mapping pins one Blueprint Release (ADR 0002), read from blueprinthub\n * with the caller's token, and every field path it maps is checked against\n * that Release when it is saved. Moving it to a newer Release is an explicit\n * edit, which CheckMappingBlueprintRelease checks first.\n *\n * A Mapping is versioned configuration (ADR 0016): every create, update and\n * restore saves a draft Revision, and an admin cuts a Configuration Release\n * from a valid draft.\n *\n * Every RPC acts on the caller's workspace, which comes from the token's\n * active workspace and never from a request field. Reads need `viewer`;\n * every write needs `admin` (ADR 0010, control-who-may-import:AC3).\n *\n * The validity reason codes of a Mapping, decided when it is saved:\n *\n * - `no_blueprint_release`: it pins no Blueprint Release.\n * - `blueprint_gone`: blueprinthub does not know the Release it pins: the\n * Blueprint is gone, or the Release is of another workspace.\n * - `release_of_other_blueprint`: the pinned Release is not of\n * blueprint_id.\n * - `no_element_selector`, `no_source_key`: the element selector or the\n * Source Key is missing.\n * - `invalid_xpath`: a selector is not an XPath.\n * - `invalid_pattern`: an extract pattern is not a regular expression.\n * - `unknown_processor`, `wrong_processor_kind`,\n * `invalid_processor_settings`: a rich-text field's Preprocessors\n * (`richTextConfig.preprocessors`), checked against the catalogue as an\n * Import Profile's are.\n * - `unknown_option`: a field mapping holds a key xmlmapper does not read.\n * - `xmlmapper_schema`: a field mapping breaks xmlmapper's schema, such as\n * a select field without options; the message is xmlmapper's.\n * - `duplicate_field`: two field mappings write one field path.\n * - `unknown_field_path`: a field mapping writes a field path the pinned\n * Release does not have.\n * - `unknown_release_spec_field`: a Release Spec source or the Version\n * Match names a Release Spec field the pinned Release does not have.\n * - `unknown_version_match_field`: the Version Match compares a content\n * field the Mapping does not map.\n * - `incomplete_title_contribution`, `incomplete_placeholder_assets`: a\n * Title Contribution or Placeholder Asset setting misses a selector it\n * cannot work without.\n *\n * current_validity adds `blueprint_gone` when blueprinthub no longer knows\n * the Release the draft or the latest Release pins (manage-mappings:AC7).\n *\n * @generated from service importhub.v1.MappingService\n */\nexport const MappingService: GenService<{\n /**\n * ListMappings returns every Mapping of the workspace, by name, each with\n * its target Blueprint, its pinned Blueprint Release and whether it is\n * valid now (manage-mappings:AC1).\n *\n * @generated from rpc importhub.v1.MappingService.ListMappings\n */\n listMappings: {\n methodKind: \"unary\";\n input: typeof ListMappingsRequestSchema;\n output: typeof ListMappingsResponseSchema;\n },\n /**\n * GetMapping returns one Mapping with its draft, or with an older\n * Revision of it when one is named.\n *\n * @generated from rpc importhub.v1.MappingService.GetMapping\n */\n getMapping: {\n methodKind: \"unary\";\n input: typeof GetMappingRequestSchema;\n output: typeof GetMappingResponseSchema;\n },\n /**\n * CreateMapping creates a Mapping, its content the first draft. A Mapping\n * that breaks xmlmapper's schema or maps a field path its Release lacks\n * is saved and marked invalid with its reasons (manage-mappings:AC6); a\n * missing name, or one another Mapping of the workspace has, is refused\n * (InvalidArgument, AlreadyExists). blueprinthub not answering is\n * Unavailable, and nothing is saved.\n *\n * @generated from rpc importhub.v1.MappingService.CreateMapping\n */\n createMapping: {\n methodKind: \"unary\";\n input: typeof CreateMappingRequestSchema;\n output: typeof CreateMappingResponseSchema;\n },\n /**\n * UpdateMapping saves new content as a new draft Revision. It is refused\n * with FailedPrecondition when draft_revision_id is given and is no longer\n * the draft.\n *\n * @generated from rpc importhub.v1.MappingService.UpdateMapping\n */\n updateMapping: {\n methodKind: \"unary\";\n input: typeof UpdateMappingRequestSchema;\n output: typeof UpdateMappingResponseSchema;\n },\n /**\n * DeleteMapping deletes a Mapping. It is refused with FailedPrecondition\n * while an Import Profile includes it, naming the Profiles in the message\n * and in a ConfigurationInUse detail (manage-mappings:AC4).\n *\n * @generated from rpc importhub.v1.MappingService.DeleteMapping\n */\n deleteMapping: {\n methodKind: \"unary\";\n input: typeof DeleteMappingRequestSchema;\n output: typeof DeleteMappingResponseSchema;\n },\n /**\n * CutMappingRelease cuts a Configuration Release from the draft, and\n * returns the Import Profiles that include the Mapping, which take the\n * new Release at their next Import (release-a-configuration:AC4). It is\n * refused with FailedPrecondition, the Validity as a detail, when the\n * draft is not valid now, when it does not differ from the latest\n * Release, or when draft_revision_id is given and is no longer the draft.\n *\n * @generated from rpc importhub.v1.MappingService.CutMappingRelease\n */\n cutMappingRelease: {\n methodKind: \"unary\";\n input: typeof CutMappingReleaseRequestSchema;\n output: typeof CutMappingReleaseResponseSchema;\n },\n /**\n * ListMappingHistory lists a Mapping's Revisions, newest first and paged,\n * and all its Releases (release-a-configuration:AC6).\n *\n * @generated from rpc importhub.v1.MappingService.ListMappingHistory\n */\n listMappingHistory: {\n methodKind: \"unary\";\n input: typeof ListMappingHistoryRequestSchema;\n output: typeof ListMappingHistoryResponseSchema;\n },\n /**\n * CompareMappingRevisions compares two Revisions of one Mapping: both\n * contents, and how each field differs.\n *\n * @generated from rpc importhub.v1.MappingService.CompareMappingRevisions\n */\n compareMappingRevisions: {\n methodKind: \"unary\";\n input: typeof CompareMappingRevisionsRequestSchema;\n output: typeof CompareMappingRevisionsResponseSchema;\n },\n /**\n * RestoreMappingRevision saves an older Revision's content as a new draft\n * (release-a-configuration:AC7), its validity decided anew against the\n * Release it pins.\n *\n * @generated from rpc importhub.v1.MappingService.RestoreMappingRevision\n */\n restoreMappingRevision: {\n methodKind: \"unary\";\n input: typeof RestoreMappingRevisionRequestSchema;\n output: typeof RestoreMappingRevisionResponseSchema;\n },\n /**\n * ListMappingImportProfiles lists the Import Profiles that include a\n * Mapping, by name: those whose draft or latest Release includes it\n * (manage-mappings:AC3, and before a cut, release-a-configuration:AC4).\n *\n * @generated from rpc importhub.v1.MappingService.ListMappingImportProfiles\n */\n listMappingImportProfiles: {\n methodKind: \"unary\";\n input: typeof ListMappingImportProfilesRequestSchema;\n output: typeof ListMappingImportProfilesResponseSchema;\n },\n /**\n * CheckMappingBlueprintRelease checks moving a Mapping's draft to\n * another Blueprint Release, saving nothing: every field path the draft\n * maps that the other Release no longer has (manage-mappings:AC5). An\n * unknown Release is NotFound; a Release of another Blueprint than the\n * Mapping's is FailedPrecondition. The report is against the draft, not\n * the latest Release. Any Release of the Mapping's Blueprint may be\n * checked, an older one too: moving back is an edit like moving forward,\n * validated the same way when it is saved.\n *\n * @generated from rpc importhub.v1.MappingService.CheckMappingBlueprintRelease\n */\n checkMappingBlueprintRelease: {\n methodKind: \"unary\";\n input: typeof CheckMappingBlueprintReleaseRequestSchema;\n output: typeof CheckMappingBlueprintReleaseResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_importhub_v1_mapping, 0);\n\n","// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts\"\n// @generated from file importhub/v1/processor.proto (package importhub.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport { file_google_protobuf_struct } from \"@bufbuild/protobuf/wkt\";\nimport type { JsonObject, Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file importhub/v1/processor.proto.\n */\nexport const file_importhub_v1_processor: GenFile = /*@__PURE__*/\n fileDesc(\"ChxpbXBvcnRodWIvdjEvcHJvY2Vzc29yLnByb3RvEgxpbXBvcnRodWIudjEiFwoVTGlzdFByb2Nlc3NvcnNSZXF1ZXN0IkUKFkxpc3RQcm9jZXNzb3JzUmVzcG9uc2USKwoKcHJvY2Vzc29ycxgBIAMoCzIXLmltcG9ydGh1Yi52MS5Qcm9jZXNzb3IiuAEKCVByb2Nlc3NvchIMCgRuYW1lGAEgASgJEikKBGtpbmQYAiABKA4yGy5pbXBvcnRodWIudjEuUHJvY2Vzc29yS2luZBItCgZ0YXJnZXQYAyABKA4yHS5pbXBvcnRodWIudjEuUHJvY2Vzc29yVGFyZ2V0EhMKC2Rlc2NyaXB0aW9uGAQgASgJEi4KDXNldHRpbmdzX3NwZWMYBSADKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0KnMKDVByb2Nlc3NvcktpbmQSHgoaUFJPQ0VTU09SX0tJTkRfVU5TUEVDSUZJRUQQABIfChtQUk9DRVNTT1JfS0lORF9QUkVQUk9DRVNTT1IQARIhCh1QUk9DRVNTT1JfS0lORF9QT1NUX1BST0NFU1NPUhACKnsKD1Byb2Nlc3NvclRhcmdldBIgChxQUk9DRVNTT1JfVEFSR0VUX1VOU1BFQ0lGSUVEEAASIAocUFJPQ0VTU09SX1RBUkdFVF9TT1VSQ0VfRklMRRABEiQKIFBST0NFU1NPUl9UQVJHRVRfUklDSF9URVhUX0ZJRUxEEAIybwoQUHJvY2Vzc29yU2VydmljZRJbCg5MaXN0UHJvY2Vzc29ycxIjLmltcG9ydGh1Yi52MS5MaXN0UHJvY2Vzc29yc1JlcXVlc3QaJC5pbXBvcnRodWIudjEuTGlzdFByb2Nlc3NvcnNSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM\", [file_google_protobuf_struct]);\n\n/**\n * @generated from message importhub.v1.ListProcessorsRequest\n */\nexport type ListProcessorsRequest = Message<\"importhub.v1.ListProcessorsRequest\"> & {\n};\n\n/**\n * Describes the message importhub.v1.ListProcessorsRequest.\n * Use `create(ListProcessorsRequestSchema)` to create a new message.\n */\nexport const ListProcessorsRequestSchema: GenMessage<ListProcessorsRequest> = /*@__PURE__*/\n messageDesc(file_importhub_v1_processor, 0);\n\n/**\n * @generated from message importhub.v1.ListProcessorsResponse\n */\nexport type ListProcessorsResponse = Message<\"importhub.v1.ListProcessorsResponse\"> & {\n /**\n * @generated from field: repeated importhub.v1.Processor processors = 1;\n */\n processors: Processor[];\n};\n\n/**\n * Describes the message importhub.v1.ListProcessorsResponse.\n * Use `create(ListProcessorsResponseSchema)` to create a new message.\n */\nexport const ListProcessorsResponseSchema: GenMessage<ListProcessorsResponse> = /*@__PURE__*/\n messageDesc(file_importhub_v1_processor, 1);\n\n/**\n * Processor is one entry of the catalogue.\n *\n * @generated from message importhub.v1.Processor\n */\nexport type Processor = Message<\"importhub.v1.Processor\"> & {\n /**\n * How a Profile names it, such as `entity-element`. Stable.\n *\n * @generated from field: string name = 1;\n */\n name: string;\n\n /**\n * @generated from field: importhub.v1.ProcessorKind kind = 2;\n */\n kind: ProcessorKind;\n\n /**\n * What it works on, and so where it is configured.\n *\n * @generated from field: importhub.v1.ProcessorTarget target = 3;\n */\n target: ProcessorTarget;\n\n /**\n * What it does, in English, for a person.\n *\n * @generated from field: string description = 4;\n */\n description: string;\n\n /**\n * Its settings, in form order, each a fieldkit Field (`field_type`,\n * `config` with `api_accessor`, `required`, `name`, `instructions`, and\n * `settings`): a Profile's ProcessorStep.settings holds one value per\n * `config.api_accessor`. Empty for a Processor without settings.\n *\n * @generated from field: repeated google.protobuf.Struct settings_spec = 5;\n */\n settingsSpec: JsonObject[];\n};\n\n/**\n * Describes the message importhub.v1.Processor.\n * Use `create(ProcessorSchema)` to create a new message.\n */\nexport const ProcessorSchema: GenMessage<Processor> = /*@__PURE__*/\n messageDesc(file_importhub_v1_processor, 2);\n\n/**\n * ProcessorKind is where in a Profile's pipeline a Processor runs (ADR 0007).\n *\n * @generated from enum importhub.v1.ProcessorKind\n */\nexport enum ProcessorKind {\n /**\n * @generated from enum value: PROCESSOR_KIND_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * Rewrites the Source File before Mapping.\n *\n * @generated from enum value: PROCESSOR_KIND_PREPROCESSOR = 1;\n */\n PREPROCESSOR = 1,\n\n /**\n * Enriches mapped Source Versions before they are saved.\n *\n * @generated from enum value: PROCESSOR_KIND_POST_PROCESSOR = 2;\n */\n POST_PROCESSOR = 2,\n}\n\n/**\n * Describes the enum importhub.v1.ProcessorKind.\n */\nexport const ProcessorKindSchema: GenEnum<ProcessorKind> = /*@__PURE__*/\n enumDesc(file_importhub_v1_processor, 0);\n\n/**\n * ProcessorTarget is what a Processor works on.\n *\n * @generated from enum importhub.v1.ProcessorTarget\n */\nexport enum ProcessorTarget {\n /**\n * @generated from enum value: PROCESSOR_TARGET_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * The whole Source File: an Import Profile lists it among its\n * Preprocessors or Post-processors.\n *\n * @generated from enum value: PROCESSOR_TARGET_SOURCE_FILE = 1;\n */\n SOURCE_FILE = 1,\n\n /**\n * One rich-text field's XML before it is converted: a Mapping lists it\n * in that field's xmlmapper settings (`richTextConfig.preprocessors`),\n * never a Profile.\n *\n * @generated from enum value: PROCESSOR_TARGET_RICH_TEXT_FIELD = 2;\n */\n RICH_TEXT_FIELD = 2,\n}\n\n/**\n * Describes the enum importhub.v1.ProcessorTarget.\n */\nexport const ProcessorTargetSchema: GenEnum<ProcessorTarget> = /*@__PURE__*/\n enumDesc(file_importhub_v1_processor, 1);\n\n/**\n * ProcessorService is the Processor catalogue: every Processor an Import\n * Profile may list, with what it is for and the settings it takes\n * (manage-import-profiles:AC5). The UI generates each Processor's settings\n * form from its settings spec (manage-import-profiles:AC4), and a Profile's\n * settings are checked against the same spec when it is saved.\n *\n * The catalogue is the same for every workspace; reading it needs `viewer`\n * (ADR 0010).\n *\n * @generated from service importhub.v1.ProcessorService\n */\nexport const ProcessorService: GenService<{\n /**\n * ListProcessors returns every Processor, by name.\n *\n * @generated from rpc importhub.v1.ProcessorService.ListProcessors\n */\n listProcessors: {\n methodKind: \"unary\";\n input: typeof ListProcessorsRequestSchema;\n output: typeof ListProcessorsResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_importhub_v1_processor, 0);\n\n","import { create, fromJson, type JsonObject, type JsonValue, toJson } from \"@bufbuild/protobuf\";\nimport { Code, ConnectError, createClient, type Transport } from \"@connectrpc/connect\";\nimport { createConnectTransport } from \"@connectrpc/connect-web\";\nimport type { Schema } from \"@knkcs/fieldkit/schema\";\nimport {\n\tConfigurationInUseSchema,\n\ttype ConfigurationState as ConfigurationStatePb,\n\ttype Validity as ValidityPb,\n} from \"../../../../gen/ts/importhub/v1/configuration_pb\";\nimport {\n\ttype EntitySet as EntitySetPb,\n\tEntitySetService,\n} from \"../../../../gen/ts/importhub/v1/entity_set_pb\";\nimport {\n\tImportProfileContentSchema,\n\ttype ImportProfile as ImportProfilePb,\n\tImportProfileService,\n\ttype ProcessorStep as ProcessorStepPb,\n\tProcessorStepSchema,\n} from \"../../../../gen/ts/importhub/v1/import_profile_pb\";\nimport {\n\tMappingContentSchema,\n\ttype Mapping as MappingPb,\n\tMappingService,\n} from \"../../../../gen/ts/importhub/v1/mapping_pb\";\nimport {\n\tProcessorKind,\n\tProcessorService,\n\tProcessorTarget,\n} from \"../../../../gen/ts/importhub/v1/processor_pb\";\nimport {\n\tConfigurationInUseError,\n\ttype ConfigurationState,\n\ttype EntitySet,\n\ttype ImporthubClient,\n\ttype ImportProfile,\n\ttype ImportProfileContent,\n\ttype Mapping,\n\ttype MappingContent,\n\tNameTakenError,\n\ttype ProcessorStep,\n\ttype Validity,\n} from \"./importhub-client\";\n\nexport interface CreateConnectImporthubClientOptions {\n\t/**\n\t * Base URL on the host origin under which `/importhub.v1.…Service/…` is\n\t * served: \"\" when importhub serves the page itself (the Standalone App),\n\t * the mount prefix when a host proxies it.\n\t */\n\tbaseUrl: string;\n\t/**\n\t * The fetch the transport calls, e.g. one that adds `credentials:\n\t * \"include\"` so a session cookie travels, or a host's own token.\n\t */\n\tfetch?: typeof fetch;\n\t/** A pre-built transport (tests: `createRouterTransport`). Overrides baseUrl and fetch. */\n\ttransport?: Transport;\n}\n\nconst validityOf = (v: ValidityPb | undefined): Validity => ({\n\tvalid: v?.valid ?? false,\n\treasons: (v?.reasons ?? []).map((r) => ({ path: r.path, code: r.code, message: r.message })),\n});\n\nconst stateOf = (s: ConfigurationStatePb | undefined): ConfigurationState => ({\n\tdraftRevisionId: s?.draftRevisionId ?? \"\",\n\tdraftDiffersFromRelease: s?.draftDiffersFromRelease ?? true,\n\t...(s?.latestRelease\n\t\t? { latestRelease: { id: s.latestRelease.id, number: s.latestRelease.number } }\n\t\t: {}),\n});\n\nconst stepOf = (s: ProcessorStepPb): ProcessorStep => ({\n\tprocessor: s.processor,\n\tsettings: { ...(s.settings ?? {}) },\n});\n\nconst stepPb = (s: ProcessorStep) => ({\n\tprocessor: s.processor,\n\tsettings: s.settings as JsonObject,\n});\n\nfunction profileOf(p: ImportProfilePb): ImportProfile {\n\tconst c = p.content;\n\treturn {\n\t\tid: p.id,\n\t\tcontent: {\n\t\t\tname: c?.name ?? \"\",\n\t\t\tdescription: c?.description ?? \"\",\n\t\t\tentitySetId: c?.entitySetId ?? \"\",\n\t\t\tpreprocessors: (c?.preprocessors ?? []).map(stepOf),\n\t\t\tmappingIds: [...(c?.mappingIds ?? [])],\n\t\t\tpostProcessors: (c?.postProcessors ?? []).map(stepOf),\n\t\t\tautoPublish: c?.autoPublish ?? false,\n\t\t\tdeleteSourceFileOnSuccess: c?.deleteSourceFileOnSuccess ?? false,\n\t\t},\n\t\t// What an Import would meet now, not only what was decided at the save\n\t\t// (manage-import-profiles:AC6).\n\t\tvalidity: validityOf(p.currentValidity ?? p.validity),\n\t\tstate: stateOf(p.state),\n\t};\n}\n\nconst profileContentPb = (c: ImportProfileContent) =>\n\tcreate(ImportProfileContentSchema, {\n\t\t...c,\n\t\tpreprocessors: c.preprocessors.map((s) => create(ProcessorStepSchema, stepPb(s))),\n\t\tpostProcessors: c.postProcessors.map((s) => create(ProcessorStepSchema, stepPb(s))),\n\t});\n\n// A Mapping's content travels as its proto JSON: the screens edit a few\n// fields, and every other one (F4's) must come back exactly as it went out.\nfunction mappingOf(m: MappingPb): Mapping {\n\tconst content = m.content\n\t\t? (toJson(MappingContentSchema, m.content) as unknown as MappingContent)\n\t\t: ({ name: \"\", blueprintId: \"\", blueprintReleaseId: \"\" } as MappingContent);\n\treturn {\n\t\tid: m.id,\n\t\tcontent: {\n\t\t\t...content,\n\t\t\tname: content.name ?? \"\",\n\t\t\tblueprintId: content.blueprintId ?? \"\",\n\t\t\tblueprintReleaseId: content.blueprintReleaseId ?? \"\",\n\t\t},\n\t\tvalidity: validityOf(m.currentValidity ?? m.validity),\n\t\tstate: stateOf(m.state),\n\t};\n}\n\nconst mappingContentPb = (c: MappingContent) =>\n\tfromJson(MappingContentSchema, c as unknown as JsonValue, { ignoreUnknownFields: false });\n\nfunction entitySetOf(e: EntitySetPb): EntitySet {\n\treturn {\n\t\tid: e.id,\n\t\tcontent: {\n\t\t\tname: e.content?.name ?? \"\",\n\t\t\tdescription: e.content?.description ?? \"\",\n\t\t\tentities: { ...(e.content?.entities ?? {}) },\n\t\t},\n\t\tvalidity: validityOf(e.validity),\n\t\tstate: stateOf(e.state),\n\t};\n}\n\n/**\n * The errors a screen tells apart: a delete refused because Profiles use the\n * configuration, with them; and a name another one has. Anything else is\n * thrown as it came.\n */\nfunction translate(err: unknown): never {\n\tconst e = ConnectError.from(err);\n\tif (e.code === Code.FailedPrecondition) {\n\t\tconst [inUse] = e.findDetails(ConfigurationInUseSchema);\n\t\tif (inUse) {\n\t\t\tthrow new ConfigurationInUseError(\n\t\t\t\tinUse.importProfiles.map((p) => ({ id: p.id, name: p.name })),\n\t\t\t\te.rawMessage,\n\t\t\t);\n\t\t}\n\t}\n\tif (e.code === Code.AlreadyExists) throw new NameTakenError(e.rawMessage);\n\tthrow e;\n}\n\nasync function call<T>(run: () => Promise<T>): Promise<T> {\n\ttry {\n\t\treturn await run();\n\t} catch (err) {\n\t\ttranslate(err);\n\t}\n}\n\n/**\n * The one call a host makes to talk to importhub (knkcms/core ADR 0003):\n * an `ImporthubClient` over Connect.\n */\nexport function createConnectImporthubClient(\n\toptions: CreateConnectImporthubClientOptions,\n): ImporthubClient {\n\tconst transport =\n\t\toptions.transport ?? createConnectTransport({ baseUrl: options.baseUrl, fetch: options.fetch });\n\tconst profiles = createClient(ImportProfileService, transport);\n\tconst processors = createClient(ProcessorService, transport);\n\tconst mappings = createClient(MappingService, transport);\n\tconst entitySets = createClient(EntitySetService, transport);\n\treturn {\n\t\tlistImportProfiles: () =>\n\t\t\tcall(async () => (await profiles.listImportProfiles({})).importProfiles.map(profileOf)),\n\t\tgetImportProfile: (id) =>\n\t\t\tcall(async () =>\n\t\t\t\tprofileOf(requireMessage((await profiles.getImportProfile({ id })).importProfile)),\n\t\t\t),\n\t\tcreateImportProfile: (content) =>\n\t\t\tcall(async () =>\n\t\t\t\tprofileOf(\n\t\t\t\t\trequireMessage(\n\t\t\t\t\t\t(await profiles.createImportProfile({ content: profileContentPb(content) }))\n\t\t\t\t\t\t\t.importProfile,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\tupdateImportProfile: (id, content, draftRevisionId) =>\n\t\t\tcall(async () =>\n\t\t\t\tprofileOf(\n\t\t\t\t\trequireMessage(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tawait profiles.updateImportProfile({\n\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\tcontent: profileContentPb(content),\n\t\t\t\t\t\t\t\tdraftRevisionId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t).importProfile,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\tdeleteImportProfile: (id) =>\n\t\t\tcall(async () => {\n\t\t\t\tawait profiles.deleteImportProfile({ id });\n\t\t\t}),\n\n\t\tlistProcessors: () =>\n\t\t\tcall(async () =>\n\t\t\t\t(await processors.listProcessors({})).processors.map((p) => ({\n\t\t\t\t\tname: p.name,\n\t\t\t\t\tkind:\n\t\t\t\t\t\tp.kind === ProcessorKind.POST_PROCESSOR\n\t\t\t\t\t\t\t? (\"post_processor\" as const)\n\t\t\t\t\t\t\t: (\"preprocessor\" as const),\n\t\t\t\t\ttarget:\n\t\t\t\t\t\tp.target === ProcessorTarget.RICH_TEXT_FIELD\n\t\t\t\t\t\t\t? (\"rich_text_field\" as const)\n\t\t\t\t\t\t\t: (\"source_file\" as const),\n\t\t\t\t\tdescription: p.description,\n\t\t\t\t\tsettingsSpec: p.settingsSpec as unknown as Schema,\n\t\t\t\t})),\n\t\t\t),\n\n\t\tlistMappings: () => call(async () => (await mappings.listMappings({})).mappings.map(mappingOf)),\n\t\tgetMapping: (id) =>\n\t\t\tcall(async () => mappingOf(requireMessage((await mappings.getMapping({ id })).mapping))),\n\t\tcreateMapping: (content) =>\n\t\t\tcall(async () =>\n\t\t\t\tmappingOf(\n\t\t\t\t\trequireMessage(\n\t\t\t\t\t\t(await mappings.createMapping({ content: mappingContentPb(content) })).mapping,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\tupdateMapping: (id, content, draftRevisionId) =>\n\t\t\tcall(async () =>\n\t\t\t\tmappingOf(\n\t\t\t\t\trequireMessage(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tawait mappings.updateMapping({\n\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\tcontent: mappingContentPb(content),\n\t\t\t\t\t\t\t\tdraftRevisionId,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t).mapping,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\tdeleteMapping: (id) =>\n\t\t\tcall(async () => {\n\t\t\t\tawait mappings.deleteMapping({ id });\n\t\t\t}),\n\t\tlistMappingImportProfiles: (id) =>\n\t\t\tcall(async () =>\n\t\t\t\t(await mappings.listMappingImportProfiles({ id })).importProfiles.map((p) => ({\n\t\t\t\t\tid: p.id,\n\t\t\t\t\tname: p.name,\n\t\t\t\t})),\n\t\t\t),\n\t\tcheckMappingBlueprintRelease: (id, blueprintReleaseId) =>\n\t\t\tcall(async () => {\n\t\t\t\tconst res = await mappings.checkMappingBlueprintRelease({ id, blueprintReleaseId });\n\t\t\t\treturn {\n\t\t\t\t\tblueprintId: res.blueprintId,\n\t\t\t\t\tmissingFieldPaths: [...res.missingFieldPaths],\n\t\t\t\t\tmissingReleaseSpecFields: [...res.missingReleaseSpecFields],\n\t\t\t\t};\n\t\t\t}),\n\n\t\tlistEntitySets: () =>\n\t\t\tcall(async () => (await entitySets.listEntitySets({})).entitySets.map(entitySetOf)),\n\t\tgetEntitySet: (id) =>\n\t\t\tcall(async () =>\n\t\t\t\tentitySetOf(requireMessage((await entitySets.getEntitySet({ id })).entitySet)),\n\t\t\t),\n\t\tcreateEntitySet: (content) =>\n\t\t\tcall(async () =>\n\t\t\t\tentitySetOf(requireMessage((await entitySets.createEntitySet({ content })).entitySet)),\n\t\t\t),\n\t\tupdateEntitySet: (id, content, draftRevisionId) =>\n\t\t\tcall(async () =>\n\t\t\t\tentitySetOf(\n\t\t\t\t\trequireMessage(\n\t\t\t\t\t\t(await entitySets.updateEntitySet({ id, content, draftRevisionId })).entitySet,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\tdeleteEntitySet: (id) =>\n\t\t\tcall(async () => {\n\t\t\t\tawait entitySets.deleteEntitySet({ id });\n\t\t\t}),\n\t};\n}\n\n/** A response's one message, which importhub always sets. */\nfunction requireMessage<T>(m: T | undefined): T {\n\tif (m === undefined)\n\t\tthrow new ConnectError(\"importhub answered without a message\", Code.Internal);\n\treturn m;\n}\n","import de from \"./de.json\";\nimport en from \"./en.json\";\n\n/**\n * The i18next namespace every string in this package is looked up under. A\n * host merges `i18nResources` and lists this constant among its namespaces\n * (knkcms/core ADR 0005), never the literal, so a rename fails the host's\n * compile rather than rendering raw keys.\n */\nexport const IMPORTHUB_UI_NS = \"importhub-ui\";\n\n/** The package's bundled translations, keyed by language, then by namespace. */\nexport const i18nResources = {\n\ten: { [IMPORTHUB_UI_NS]: en },\n\tde: { [IMPORTHUB_UI_NS]: de },\n};\n","// importhub-ui's host contract: what a host decides that anker's own host\n// contract (@knkcs/anker/host) does not cover.\n//\n// anker's covers the page frame, the rail and identity: a screen reports its\n// title, breadcrumbs and actions, and reads the viewer and the active\n// workspace from `useHostIdentity()`, which the host provides once. What is\n// left is importhub's own: where the host mounts each section, for the links\n// a screen draws itself, and where a Change Set lives in contenthub, which\n// only the host knows (ADR 0005, amended: the contract has no seams only core\n// needed). Navigation a screen *asks* for (open an Import, start one) goes\n// through that screen's callbacks, since only the host knows its router.\nimport { createContext, type ReactNode, useContext } from \"react\";\n\n/**\n * importhub's sections: Imports, the host's own work, and the configuration\n * an admin manages (CONTEXT.md, \"Configuration\").\n */\nexport type ImporthubSection = \"imports\" | \"profiles\" | \"mappings\" | \"entitySets\" | \"processors\";\n\n/** Every section, in the order a host lists them. */\nexport const IMPORTHUB_SECTIONS: readonly ImporthubSection[] = [\n\t\"imports\",\n\t\"profiles\",\n\t\"mappings\",\n\t\"entitySets\",\n\t\"processors\",\n];\n\n/**\n * Where the host mounts each section's index. An item of a section (one\n * Import Profile, Mapping or Entity Set) lives under it, at\n * `<index>/<id>` (`itemPath`), so a host mounts one route per section and its\n * items, and the screens link to both without asking.\n */\nexport type ImporthubPaths = Record<ImporthubSection, string>;\n\n/** Where an item of a section lives: its index's path, then its id. */\nexport function itemPath(paths: ImporthubPaths, section: ImporthubSection, id: string): string {\n\treturn `${paths[section].replace(/\\/$/, \"\")}/${encodeURIComponent(id)}`;\n}\n\n/** A Blueprint, as a Mapping's target is picked and named. */\nexport interface ImporthubBlueprint {\n\tid: string;\n\tname: string;\n}\n\n/** A Blueprint Release, as a Mapping pins it: `label` names it, such as \"Release 3\". */\nexport interface ImporthubBlueprintRelease {\n\tid: string;\n\tlabel: string;\n}\n\n/**\n * Where the screens find Blueprints and their Releases, which live in\n * blueprinthub, not importhub: importhub stores only their ids. A host that\n * reaches blueprinthub (core does) answers from it; one that does not leaves\n * `ImporthubHost.blueprints` out, and the Mapping screens then take and show\n * the two as labelled ids, the technical detail anker's id rule allows.\n */\nexport interface ImporthubBlueprints {\n\t/** The workspace's Blueprints a Mapping may target, by name. */\n\tlistBlueprints(): Promise<ImporthubBlueprint[]>;\n\t/** A Blueprint's Releases, newest first. */\n\tlistReleases(blueprintId: string): Promise<ImporthubBlueprintRelease[]>;\n}\n\nexport interface ImporthubHost {\n\t/** Where the host mounts each section's index, for breadcrumbs and links. */\n\tpaths: ImporthubPaths;\n\t/**\n\t * The address of a Change Set in contenthub, which an Import's page links\n\t * out to (follow-an-import:AC5). null when the host has no contenthub to\n\t * link to: the screen then shows no link rather than a broken one.\n\t */\n\tchangeSetHref: (changeSetId: string) => string | null;\n\t/**\n\t * Whether the viewer may change configuration: importhub's `admin`\n\t * (ADR 0010), which only the host's session knows. Unset, the screens\n\t * show configuration read-only, as to a `viewer`; either way importhub\n\t * authorizes every write itself, so this hides actions and guards\n\t * nothing.\n\t */\n\tcanConfigure?: boolean;\n\t/** Where Blueprints and their Releases are found; see ImporthubBlueprints. */\n\tblueprints?: ImporthubBlueprints;\n}\n\n/**\n * The Standalone App's paths: Imports at the top, the configuration under\n * `/settings/<item>`, one page per item (odon's integration guide, \"Sidebar\n * layout\").\n */\nexport const STANDALONE_IMPORTHUB_PATHS: ImporthubPaths = {\n\timports: \"/imports\",\n\tprofiles: \"/settings/import-profiles\",\n\tmappings: \"/settings/mappings\",\n\tentitySets: \"/settings/entity-sets\",\n\tprocessors: \"/settings/processors\",\n};\n\nconst DEFAULT_HOST: ImporthubHost = {\n\tpaths: STANDALONE_IMPORTHUB_PATHS,\n\tchangeSetHref: () => null,\n};\n\nconst HostContext = createContext<ImporthubHost>(DEFAULT_HOST);\n\nexport interface ImporthubHostProviderProps {\n\thost: ImporthubHost;\n\tchildren: ReactNode;\n}\n\n/** Provides the host's decisions to every importhub screen beneath it. */\nexport function ImporthubHostProvider({ host, children }: ImporthubHostProviderProps) {\n\treturn <HostContext.Provider value={host}>{children}</HostContext.Provider>;\n}\n\n/**\n * The host's decisions; outside a provider, the Standalone App's paths and\n * no Change Set links.\n */\nexport function useImporthubHost(): ImporthubHost {\n\treturn useContext(HostContext);\n}\n","import { Link } from \"@knkcs/anker/primitives\";\nimport { ExternalLink } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\nimport { useImporthubHost } from \"./host\";\n\nexport interface ChangeSetLinkProps {\n\tchangeSetId: string;\n}\n\n/**\n * The link out to a Change Set in contenthub, where the host says it is\n * (`ImporthubHost.changeSetHref`). Nothing when the host has no address for\n * it: a link to nowhere is worse than none.\n */\nexport function ChangeSetLink({ changeSetId }: ChangeSetLinkProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst href = useImporthubHost().changeSetHref(changeSetId);\n\tif (!href) return null;\n\treturn (\n\t\t<Link href={href} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t{t(\"changeSet.open\")}\n\t\t\t<ExternalLink size={14} aria-hidden />\n\t\t</Link>\n\t);\n}\n","// Every query key starts with the active workspace, from the host's identity.\n// A host that switches workspace without remounting (an embedding solution's\n// picker, say) then reads the new workspace's data rather than the old one's\n// cache (use-the-importhub-standalone-app:AC3), and two workspaces' answers\n// never share an entry.\nexport const importhubKeys = {\n\tall: (workspaceId: string) => [\"importhub\", workspaceId] as const,\n\timportProfiles: (workspaceId: string) =>\n\t\t[...importhubKeys.all(workspaceId), \"importProfiles\"] as const,\n\timportProfile: (workspaceId: string, id: string) =>\n\t\t[...importhubKeys.importProfiles(workspaceId), id] as const,\n\tprocessors: (workspaceId: string) => [...importhubKeys.all(workspaceId), \"processors\"] as const,\n\tmappings: (workspaceId: string) => [...importhubKeys.all(workspaceId), \"mappings\"] as const,\n\tmapping: (workspaceId: string, id: string) =>\n\t\t[...importhubKeys.mappings(workspaceId), id] as const,\n\tmappingImportProfiles: (workspaceId: string, id: string) =>\n\t\t[...importhubKeys.mapping(workspaceId, id), \"importProfiles\"] as const,\n\tentitySets: (workspaceId: string) => [...importhubKeys.all(workspaceId), \"entitySets\"] as const,\n\tentitySet: (workspaceId: string, id: string) =>\n\t\t[...importhubKeys.entitySets(workspaceId), id] as const,\n\tblueprints: (workspaceId: string) => [...importhubKeys.all(workspaceId), \"blueprints\"] as const,\n\tblueprintReleases: (workspaceId: string, blueprintId: string) =>\n\t\t[...importhubKeys.blueprints(workspaceId), blueprintId, \"releases\"] as const,\n};\n","import { EmptyState } from \"@knkcs/anker/atoms\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { Box, Spinner } from \"@knkcs/anker/primitives\";\nimport { IndexPageTemplate } from \"@knkcs/anker/templates\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { Ampersand, Blocks, FileCog, FileUp, type LucideIcon, Waypoints } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { ImporthubClient } from \"../client/importhub-client\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\nimport type { ImporthubSection } from \"./host\";\nimport { importhubKeys } from \"./query-keys\";\n\nexport interface ImporthubStartPageProps {\n\tclient: ImporthubClient;\n\t/** The section whose start page this is. */\n\tsection: ImporthubSection;\n}\n\n/** Each section's icon, as the Standalone App's sidebar shows it too. */\nexport const IMPORTHUB_SECTION_ICONS: Record<ImporthubSection, LucideIcon> = {\n\timports: FileUp,\n\tprofiles: FileCog,\n\tmappings: Waypoints,\n\tentitySets: Ampersand,\n\tprocessors: Blocks,\n};\n\n/**\n * A section's start page, for a host that has no screen for it yet: the section's\n * title in the frame, and a body saying what the workspace holds of it. Where\n * importhub can already list a section it says how many there are, read for the host's active workspace; Imports have\n * nothing to read yet, and Mappings are counted on their own screen.\n */\nexport function ImporthubStartPage({ client, section }: ImporthubStartPageProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst Icon = IMPORTHUB_SECTION_ICONS[section];\n\treturn (\n\t\t<IndexPageTemplate title={t(`section.${section}.title`)}>\n\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t<EmptyState\n\t\t\t\t\ticon={<Icon size={32} aria-hidden />}\n\t\t\t\t\theader={t(`section.${section}.title`)}\n\t\t\t\t\tdescription={<SectionSummary client={client} section={section} />}\n\t\t\t\t/>\n\t\t\t</Box>\n\t\t</IndexPageTemplate>\n\t);\n}\n\nfunction SectionSummary({ client, section }: ImporthubStartPageProps) {\n\tswitch (section) {\n\t\tcase \"profiles\":\n\t\t\treturn (\n\t\t\t\t<CountSummary\n\t\t\t\t\tsection={section}\n\t\t\t\t\tqueryKey={importhubKeys.importProfiles}\n\t\t\t\t\tread={() => client.listImportProfiles()}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"entitySets\":\n\t\t\treturn (\n\t\t\t\t<CountSummary\n\t\t\t\t\tsection={section}\n\t\t\t\t\tqueryKey={importhubKeys.entitySets}\n\t\t\t\t\tread={() => client.listEntitySets()}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"processors\":\n\t\t\treturn (\n\t\t\t\t<CountSummary\n\t\t\t\t\tsection={section}\n\t\t\t\t\tqueryKey={importhubKeys.processors}\n\t\t\t\t\tread={() => client.listProcessors()}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn <NothingYet section={section} />;\n\t}\n}\n\nfunction NothingYet({ section }: { section: \"imports\" | \"mappings\" }) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\treturn <>{t(`section.${section}.empty`)}</>;\n}\n\nfunction CountSummary({\n\tsection,\n\tqueryKey,\n\tread,\n}: {\n\tsection: \"profiles\" | \"entitySets\" | \"processors\";\n\t/** The section's query key for a workspace (`importhubKeys`). */\n\tqueryKey: (workspaceId: string) => readonly unknown[];\n\tread: () => Promise<unknown[]>;\n}) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst query = useQuery({ queryKey: queryKey(workspaceId), queryFn: read });\n\tif (query.isPending) return <Spinner size=\"sm\" aria-label={t(\"startPage.loading\")} />;\n\t// Text, not an Alert: the summary is the EmptyState's description, a\n\t// paragraph, which can hold no block.\n\tif (query.isError) return <>{t(\"startPage.error\")}</>;\n\treturn <>{t(`section.${section}.summary`, { count: query.data.length })}</>;\n}\n","import { Button } from \"@knkcs/anker/atoms\";\nimport { Modal } from \"@knkcs/anker/components\";\nimport { Alert, HStack, Link, List, Stack, Text } from \"@knkcs/anker/primitives\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { useEffect } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link as RouterLink } from \"react-router\";\nimport { ConfigurationInUseError } from \"../client/importhub-client\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\nimport { itemPath, useImporthubHost } from \"./host\";\n\nexport interface DeleteDialogProps {\n\topen: boolean;\n\tonClose: () => void;\n\t/** The dialog's header, naming what is deleted. */\n\ttitle: string;\n\t/** What deleting it means. */\n\tmessage: string;\n\t/** Deletes it; a ConfigurationInUseError keeps the dialog open, naming the Profiles. */\n\tonDelete: () => Promise<void>;\n\t/** It is gone. */\n\tonDeleted: () => void;\n}\n\n/**\n * Confirms a delete, and shows why importhub refused one: the Import\n * Profiles that still include the Mapping or name the Entity Set\n * (manage-mappings:AC4, manage-entity-sets:AC3), each a link to its page.\n * Always mounted and driven by `open`, as anker's Modal rule says.\n */\nexport function DeleteDialog({\n\topen,\n\tonClose,\n\ttitle,\n\tmessage,\n\tonDelete,\n\tonDeleted,\n}: DeleteDialogProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { paths } = useImporthubHost();\n\tconst del = useMutation({ mutationFn: onDelete, onSuccess: onDeleted });\n\tconst { reset } = del;\n\t// A fresh session each time it opens, so last time's refusal is gone.\n\tuseEffect(() => {\n\t\tif (open) reset();\n\t}, [open, reset]);\n\tconst refusal = del.error instanceof ConfigurationInUseError ? del.error : null;\n\treturn (\n\t\t<Modal\n\t\t\topen={open}\n\t\t\tonClose={onClose}\n\t\t\theader={title}\n\t\t\tlazyMount\n\t\t\tunmountOnExit\n\t\t\tfooter={\n\t\t\t\t<HStack gap=\"2\">\n\t\t\t\t\t<Button variant=\"outline\" onClick={onClose}>\n\t\t\t\t\t\t{t(\"common.cancel\")}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"solid\"\n\t\t\t\t\t\tcolorPalette=\"red\"\n\t\t\t\t\t\tloading={del.isPending}\n\t\t\t\t\t\tdisabled={refusal !== null}\n\t\t\t\t\t\tonClick={() => del.mutate()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(\"common.delete\")}\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t}\n\t\t>\n\t\t\t<Stack gap=\"4\">\n\t\t\t\t<Text>{message}</Text>\n\t\t\t\t{refusal ? (\n\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"delete.inUse\")}>\n\t\t\t\t\t\t<List.Root ps=\"4\">\n\t\t\t\t\t\t\t{refusal.importProfiles.map((p) => (\n\t\t\t\t\t\t\t\t<List.Item key={p.id}>\n\t\t\t\t\t\t\t\t\t<Link asChild>\n\t\t\t\t\t\t\t\t\t\t<RouterLink to={itemPath(paths, \"profiles\", p.id)}>{p.name}</RouterLink>\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t</List.Item>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</List.Root>\n\t\t\t\t\t</Alert>\n\t\t\t\t) : del.isError ? (\n\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"delete.failed\")} />\n\t\t\t\t) : null}\n\t\t\t</Stack>\n\t\t</Modal>\n\t);\n}\n","import { EmptyState } from \"@knkcs/anker/atoms\";\nimport { Box, Center, Spinner } from \"@knkcs/anker/primitives\";\nimport { CircleAlert } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\n\n/** A page body while its data loads. */\nexport function Loading() {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\treturn (\n\t\t<Center py=\"12\">\n\t\t\t<Spinner aria-label={t(\"startPage.loading\")} />\n\t\t</Center>\n\t);\n}\n\n/** A page body whose data could not be read. */\nexport function LoadFailed() {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\treturn (\n\t\t<Box px=\"8\" py=\"6\">\n\t\t\t<EmptyState icon={<CircleAlert size={32} aria-hidden />} header={t(\"startPage.error\")} />\n\t\t</Box>\n\t);\n}\n","import { useImporthubHost } from \"./host\";\n\n/**\n * Whether to offer the viewer configuration's edit actions: the host's\n * `canConfigure`, read-only when it says nothing (control-who-may-import:AC1).\n */\nexport function useCanConfigure(): boolean {\n\treturn useImporthubHost().canConfigure ?? false;\n}\n","import type { StatusBadgeTone } from \"@knkcs/anker/atoms\";\nimport { StatusBadgeCell } from \"@knkcs/anker/components\";\nimport { Alert, List } from \"@knkcs/anker/primitives\";\nimport type { TFunction } from \"i18next\";\nimport { useTranslation } from \"react-i18next\";\nimport type { ConfigurationState, Validity } from \"../client/importhub-client\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\n\n/**\n * Why a configuration is invalid, on its page (manage-import-profiles:AC6,\n * CONTEXT.md \"Configuration\"): one line per reason, as importhub words it.\n * Nothing while it is valid.\n */\nexport function ValidityAlert({ validity }: { validity: Validity }) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tif (validity.valid) return null;\n\treturn (\n\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"validity.invalidTitle\")}>\n\t\t\t<List.Root ps=\"4\">\n\t\t\t\t{validity.reasons.map((r) => (\n\t\t\t\t\t<List.Item key={`${r.code}:${r.path}:${r.message}`}>{r.message}</List.Item>\n\t\t\t\t))}\n\t\t\t</List.Root>\n\t\t</Alert>\n\t);\n}\n\nconst TONES = (t: TFunction): Record<string, StatusBadgeTone> => ({\n\t[t(\"validity.valid\")]: \"success\",\n\t[t(\"validity.invalid\")]: \"danger\",\n});\n\n/**\n * A list's validity column: Valid, or Invalid with its reasons beneath, so\n * the list says what to fix without opening each one.\n */\nexport function ValidityCell({ validity }: { validity: Validity }) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\treturn (\n\t\t<StatusBadgeCell\n\t\t\tvalue={validity.valid ? t(\"validity.valid\") : t(\"validity.invalid\")}\n\t\t\ttoneMap={TONES(t)}\n\t\t\tdetail={validity.valid ? null : validity.reasons.map((r) => r.message).join(\" \")}\n\t\t/>\n\t);\n}\n\n/** \"Release 3\", or that there is none yet. */\nexport function releaseLabel(state: ConfigurationState, t: TFunction): string {\n\treturn state.latestRelease\n\t\t? t(\"release.number\", { number: state.latestRelease.number })\n\t\t: t(\"release.none\");\n}\n","import { Button, IconButton, StatusBadge } from \"@knkcs/anker/atoms\";\nimport { Card, ContextRail } from \"@knkcs/anker/components\";\nimport { InputField, TextareaField } from \"@knkcs/anker/forms\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { Alert, Badge, Box, Grid, HStack, Stack, Text } from \"@knkcs/anker/primitives\";\nimport { DetailPageTemplate, usePageRail } from \"@knkcs/anker/templates\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { Plus, Trash2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { FormProvider, useFieldArray, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport type { EntitySet, EntitySetContent, ImporthubClient } from \"../../client/importhub-client\";\nimport { DeleteDialog } from \"../../common/delete-dialog\";\nimport { useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { LoadFailed, Loading } from \"../../common/query-state\";\nimport { useCanConfigure } from \"../../common/use-can-configure\";\nimport { releaseLabel, ValidityAlert } from \"../../common/validity\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\nexport interface EntitySetDetailProps {\n\tclient: ImporthubClient;\n\t/** The Entity Set's id. */\n\tid: string;\n\t/** It was deleted: the host leaves its page. */\n\tonDeleted: () => void;\n}\n\n/** The entity table as form rows: a map has no order, a form needs one. */\ntype EntitySetValues = {\n\tname: string;\n\tdescription: string;\n\tentities: { name: string; text: string }[];\n};\n\nconst valuesOf = (c: EntitySetContent): EntitySetValues => ({\n\tname: c.name,\n\tdescription: c.description,\n\tentities: Object.entries(c.entities)\n\t\t.sort(([a], [b]) => a.localeCompare(b))\n\t\t.map(([name, text]) => ({ name, text })),\n});\n\n// A row without a name is dropped rather than saved as `\"\"`, which no\n// reference in a Source File could name.\nconst contentOf = (v: EntitySetValues): EntitySetContent => ({\n\tname: v.name,\n\tdescription: v.description,\n\tentities: Object.fromEntries(\n\t\tv.entities.filter((e) => e.name.trim() !== \"\").map((e) => [e.name.trim(), e.text]),\n\t),\n});\n\n/**\n * One Entity Set (manage-entity-sets:AC1): its name and its table of\n * entities, each with the text it stands for. An admin edits the table and\n * saves with the header's Save, and deletes from the rail, which importhub\n * refuses while a Profile names it, naming them (AC3).\n */\nexport function EntitySetDetail({ client, id, onDeleted }: EntitySetDetailProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst query = useQuery({\n\t\tqueryKey: importhubKeys.entitySet(workspaceId, id),\n\t\tqueryFn: () => client.getEntitySet(id),\n\t});\n\tif (query.isError || !query.data) {\n\t\treturn (\n\t\t\t<DetailPageTemplate title={t(\"section.entitySets.title\")}>\n\t\t\t\t{query.isError ? <LoadFailed /> : <Loading />}\n\t\t\t</DetailPageTemplate>\n\t\t);\n\t}\n\treturn <EntitySetPage client={client} entitySet={query.data} onDeleted={onDeleted} />;\n}\n\nfunction EntitySetPage({\n\tclient,\n\tentitySet,\n\tonDeleted,\n}: {\n\tclient: ImporthubClient;\n\tentitySet: EntitySet;\n\tonDeleted: () => void;\n}) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst { paths } = useImporthubHost();\n\tconst canConfigure = useCanConfigure();\n\tconst queryClient = useQueryClient();\n\tconst [deleting, setDeleting] = useState(false);\n\n\tconst form = useForm<EntitySetValues>({ defaultValues: valuesOf(entitySet.content) });\n\tconst { reset, formState, control } = form;\n\tconst rows = useFieldArray({ control, name: \"entities\" });\n\tuseEffect(() => {\n\t\tif (!formState.isDirty) reset(valuesOf(entitySet.content));\n\t}, [entitySet, reset, formState.isDirty]);\n\n\tconst save = useMutation({\n\t\tmutationFn: (values: EntitySetValues) =>\n\t\t\tclient.updateEntitySet(entitySet.id, contentOf(values), entitySet.state.draftRevisionId),\n\t\tonSuccess: (saved) => {\n\t\t\tqueryClient.setQueryData(importhubKeys.entitySet(workspaceId, saved.id), saved);\n\t\t\treset(valuesOf(saved.content));\n\t\t\tvoid queryClient.invalidateQueries({ queryKey: importhubKeys.entitySets(workspaceId) });\n\t\t},\n\t});\n\tconst onSave = form.handleSubmit((values) => save.mutate(values));\n\n\tusePageRail(\n\t\tcanConfigure ? (\n\t\t\t<ContextRail storageKey=\"importhub.entitySet.rail\">\n\t\t\t\t<ContextRail.Header title={t(\"rail.title\")} />\n\t\t\t\t<ContextRail.Section id=\"actions\" label={t(\"rail.actions\")}>\n\t\t\t\t\t<ContextRail.IconButton\n\t\t\t\t\t\tlabel={t(\"entitySets.delete\")}\n\t\t\t\t\t\ticon={<Trash2 size={16} />}\n\t\t\t\t\t\ttone=\"outline-red\"\n\t\t\t\t\t\tonClick={() => setDeleting(true)}\n\t\t\t\t\t/>\n\t\t\t\t</ContextRail.Section>\n\t\t\t</ContextRail>\n\t\t) : null,\n\t);\n\n\treturn (\n\t\t<DetailPageTemplate\n\t\t\ttitle={entitySet.content.name}\n\t\t\tbreadcrumbs={[{ label: t(\"section.entitySets.title\"), to: paths.entitySets }]}\n\t\t\tbadges={\n\t\t\t\t<HStack gap=\"2\">\n\t\t\t\t\t<StatusBadge\n\t\t\t\t\t\ttone={entitySet.validity.valid ? \"success\" : \"danger\"}\n\t\t\t\t\t\tlabel={entitySet.validity.valid ? t(\"validity.valid\") : t(\"validity.invalid\")}\n\t\t\t\t\t/>\n\t\t\t\t\t<Badge>{releaseLabel(entitySet.state, t)}</Badge>\n\t\t\t\t</HStack>\n\t\t\t}\n\t\t\tactions={\n\t\t\t\tcanConfigure ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"solid\"\n\t\t\t\t\t\tdisabled={!formState.isDirty}\n\t\t\t\t\t\tloading={save.isPending}\n\t\t\t\t\t\tonClick={() => void onSave()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(\"common.save\")}\n\t\t\t\t\t</Button>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t>\n\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t<FormProvider {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tif (canConfigure) void onSave();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t\t\t<ValidityAlert validity={entitySet.validity} />\n\t\t\t\t\t\t\t{save.isError ? (\n\t\t\t\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"save.failed\")}>\n\t\t\t\t\t\t\t\t\t{save.error.message}\n\t\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t<Card title={t(\"entitySets.general\")}>\n\t\t\t\t\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t\t\t\t\t<InputField<EntitySetValues>\n\t\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"fields.name\")}\n\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<TextareaField<EntitySetValues>\n\t\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"fields.description\")}\n\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t<Card title={t(\"entitySets.entities\")}>\n\t\t\t\t\t\t\t\t<Stack gap=\"3\">\n\t\t\t\t\t\t\t\t\t{rows.fields.length === 0 ? (\n\t\t\t\t\t\t\t\t\t\t<Text color=\"fg.muted\">{t(\"entitySets.noEntities\")}</Text>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{rows.fields.map((row, index) => (\n\t\t\t\t\t\t\t\t\t\t<Grid key={row.id} templateColumns=\"1fr 1fr auto\" gap=\"3\" alignItems=\"end\">\n\t\t\t\t\t\t\t\t\t\t\t<InputField<EntitySetValues>\n\t\t\t\t\t\t\t\t\t\t\t\tname={`entities.${index}.name`}\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={t(\"entitySets.entityName\", { index: index + 1 })}\n\t\t\t\t\t\t\t\t\t\t\t\tprepend=\"&\"\n\t\t\t\t\t\t\t\t\t\t\t\tappend=\";\"\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<InputField<EntitySetValues>\n\t\t\t\t\t\t\t\t\t\t\t\tname={`entities.${index}.text`}\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={t(\"entitySets.entityText\", { index: index + 1 })}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{canConfigure ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label={t(\"entitySets.removeEntity\", { index: index + 1 })}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolorPalette=\"red\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => rows.remove(index)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Trash2 size={16} />\n\t\t\t\t\t\t\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t{canConfigure ? (\n\t\t\t\t\t\t\t\t\t\t<Box>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => rows.append({ name: \"\", text: \"\" })}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Plus size={14} aria-hidden />\n\t\t\t\t\t\t\t\t\t\t\t\t{t(\"entitySets.addEntity\")}\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</form>\n\t\t\t\t</FormProvider>\n\t\t\t</Box>\n\t\t\t<DeleteDialog\n\t\t\t\topen={deleting}\n\t\t\t\tonClose={() => setDeleting(false)}\n\t\t\t\ttitle={t(\"entitySets.deleteTitle\", { name: entitySet.content.name })}\n\t\t\t\tmessage={t(\"entitySets.deleteMessage\")}\n\t\t\t\tonDelete={() => client.deleteEntitySet(entitySet.id)}\n\t\t\t\tonDeleted={() => {\n\t\t\t\t\tsetDeleting(false);\n\t\t\t\t\tqueryClient.removeQueries({\n\t\t\t\t\t\tqueryKey: importhubKeys.entitySet(workspaceId, entitySet.id),\n\t\t\t\t\t});\n\t\t\t\t\tvoid queryClient.invalidateQueries({ queryKey: importhubKeys.entitySets(workspaceId) });\n\t\t\t\t\tonDeleted();\n\t\t\t\t}}\n\t\t\t/>\n\t\t</DetailPageTemplate>\n\t);\n}\n","import { Modal } from \"@knkcs/anker/components\";\nimport { InputField, TextareaField } from \"@knkcs/anker/forms\";\nimport { Alert, Stack } from \"@knkcs/anker/primitives\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { type ReactNode, useEffect } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { NameTakenError } from \"../client/importhub-client\";\nimport { IMPORTHUB_UI_NS } from \"../i18n/resources\";\n\n/** What every create asks first: a name and what it is for. */\nexport type CreateValues = { name: string; description: string } & Record<string, string>;\n\nexport interface CreateDialogProps {\n\topen: boolean;\n\tonClose: () => void;\n\t/** The dialog's header: \"New Import Profile\". */\n\ttitle: string;\n\t/** Fields a kind asks besides name and description, over the same form. */\n\tchildren?: ReactNode;\n\t/** Their starting values; a stable object (a module constant), as it resets the form. */\n\tdefaultValues?: Record<string, string>;\n\t/** Creates it from the values; resolves to the new id. */\n\tonCreate: (values: CreateValues) => Promise<string>;\n\t/** It exists: the host opens its page. */\n\tonCreated: (id: string) => void;\n}\n\n/**\n * Creates a configuration from a name and a description in a Modal, never a\n * form above the list (anker's rule); the rest is set on its page. A name\n * another one of the kind has is said at the name.\n */\nexport function CreateDialog({\n\topen,\n\tonClose,\n\ttitle,\n\tchildren,\n\tdefaultValues,\n\tonCreate,\n\tonCreated,\n}: CreateDialogProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst form = useForm<CreateValues>({\n\t\tdefaultValues: { name: \"\", description: \"\", ...defaultValues },\n\t});\n\tconst create = useMutation({ mutationFn: onCreate, onSuccess: onCreated });\n\tconst { reset } = form;\n\tconst { reset: resetCreate } = create;\n\t// Each opening starts empty, whether or not the exit callback ran.\n\tuseEffect(() => {\n\t\tif (open) {\n\t\t\treset({ name: \"\", description: \"\", ...defaultValues });\n\t\t\tresetCreate();\n\t\t}\n\t}, [open, reset, resetCreate, defaultValues]);\n\tconst submit = form.handleSubmit((values) => {\n\t\tif (!values.name.trim()) {\n\t\t\tform.setError(\"name\", { message: t(\"create.nameRequired\") });\n\t\t\treturn;\n\t\t}\n\t\tcreate.mutate(values, {\n\t\t\tonError: (err) => {\n\t\t\t\tif (err instanceof NameTakenError) {\n\t\t\t\t\tform.setError(\"name\", { message: t(\"create.nameTaken\") });\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t});\n\treturn (\n\t\t<Modal\n\t\t\topen={open}\n\t\t\tonClose={onClose}\n\t\t\theader={title}\n\t\t\tlazyMount\n\t\t\tunmountOnExit\n\t\t\tsaveLabel={t(\"common.create\")}\n\t\t\tcancelLabel={t(\"common.cancel\")}\n\t\t\tonSave={() => void submit()}\n\t\t\tloading={create.isPending}\n\t\t>\n\t\t\t<FormProvider {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tvoid submit();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t\t<InputField<CreateValues> name=\"name\" label={t(\"fields.name\")} required />\n\t\t\t\t\t\t<TextareaField<CreateValues> name=\"description\" label={t(\"fields.description\")} />\n\t\t\t\t\t\t{children}\n\t\t\t\t\t\t{create.isError && !(create.error instanceof NameTakenError) ? (\n\t\t\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"create.failed\")} />\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t</Stack>\n\t\t\t\t</form>\n\t\t\t</FormProvider>\n\t\t</Modal>\n\t);\n}\n","import { Button } from \"@knkcs/anker/atoms\";\nimport { CountCell, DataTable, LinkCell, TruncatedTextCell } from \"@knkcs/anker/components\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { IndexPageTemplate } from \"@knkcs/anker/templates\";\nimport { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport type { ColumnDef } from \"@tanstack/react-table\";\nimport { Plus } from \"lucide-react\";\nimport { useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { EntitySet, ImporthubClient } from \"../../client/importhub-client\";\nimport { CreateDialog } from \"../../common/create-dialog\";\nimport { itemPath, useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { LoadFailed } from \"../../common/query-state\";\nimport { useCanConfigure } from \"../../common/use-can-configure\";\nimport { releaseLabel, ValidityCell } from \"../../common/validity\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\nexport interface EntitySetsIndexProps {\n\tclient: ImporthubClient;\n\t/** Opens an Entity Set's page: the host navigates, after a create too. */\n\tonOpen: (id: string) => void;\n}\n\n// DataTable takes rows that are records.\ntype Row = EntitySet & Record<string, unknown>;\n\n/**\n * Every Entity Set of the workspace, with how many entities each defines\n * (manage-entity-sets:AC1); an admin creates one from the header.\n */\nexport function EntitySetsIndex({ client, onOpen }: EntitySetsIndexProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst { paths } = useImporthubHost();\n\tconst canConfigure = useCanConfigure();\n\tconst queryClient = useQueryClient();\n\tconst [creating, setCreating] = useState(false);\n\tconst query = useQuery({\n\t\tqueryKey: importhubKeys.entitySets(workspaceId),\n\t\tqueryFn: () => client.listEntitySets(),\n\t});\n\tconst columns = useMemo<ColumnDef<Row, unknown>[]>(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: \"name\",\n\t\t\t\theader: t(\"fields.name\"),\n\t\t\t\tcell: (c) => (\n\t\t\t\t\t<LinkCell\n\t\t\t\t\t\tto={itemPath(paths, \"entitySets\", c.row.original.id)}\n\t\t\t\t\t\tlabel={c.row.original.content.name}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"entities\",\n\t\t\t\theader: t(\"entitySets.entities\"),\n\t\t\t\tsize: 120,\n\t\t\t\tcell: (c) => (\n\t\t\t\t\t<CountCell\n\t\t\t\t\t\tvalue={c.row.original.content.entities}\n\t\t\t\t\t\tsingular={t(\"entitySets.entity\")}\n\t\t\t\t\t\tplural={t(\"entitySets.entities\")}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"validity\",\n\t\t\t\theader: t(\"validity.column\"),\n\t\t\t\tcell: (c) => <ValidityCell validity={c.row.original.validity} />,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"release\",\n\t\t\t\theader: t(\"release.column\"),\n\t\t\t\tsize: 140,\n\t\t\t\tcell: (c) => <TruncatedTextCell value={releaseLabel(c.row.original.state, t)} />,\n\t\t\t},\n\t\t],\n\t\t[t, paths],\n\t);\n\treturn (\n\t\t<IndexPageTemplate\n\t\t\ttitle={t(\"section.entitySets.title\")}\n\t\t\tactions={\n\t\t\t\tcanConfigure ? (\n\t\t\t\t\t<Button variant=\"solid\" onClick={() => setCreating(true)}>\n\t\t\t\t\t\t<Plus size={16} aria-hidden />\n\t\t\t\t\t\t{t(\"entitySets.new\")}\n\t\t\t\t\t</Button>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t>\n\t\t\t{query.isError ? (\n\t\t\t\t<LoadFailed />\n\t\t\t) : (\n\t\t\t\t<DataTable\n\t\t\t\t\tcolumns={columns}\n\t\t\t\t\tdata={(query.data ?? []) as Row[]}\n\t\t\t\t\tloading={query.isPending}\n\t\t\t\t\tgetRowId={(e) => e.id}\n\t\t\t\t\temptyState={t(\"entitySets.empty\")}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<CreateDialog\n\t\t\t\topen={creating}\n\t\t\t\tonClose={() => setCreating(false)}\n\t\t\t\ttitle={t(\"entitySets.new\")}\n\t\t\t\tonCreate={async ({ name, description }) => {\n\t\t\t\t\tconst e = await client.createEntitySet({ name, description, entities: {} });\n\t\t\t\t\tawait queryClient.invalidateQueries({ queryKey: importhubKeys.entitySets(workspaceId) });\n\t\t\t\t\treturn e.id;\n\t\t\t\t}}\n\t\t\t\tonCreated={(id) => {\n\t\t\t\t\tsetCreating(false);\n\t\t\t\t\tonOpen(id);\n\t\t\t\t}}\n\t\t\t/>\n\t\t</IndexPageTemplate>\n\t);\n}\n","import { useHostIdentity } from \"@knkcs/anker/host\";\nimport { useQueries, useQuery } from \"@tanstack/react-query\";\nimport { useMemo } from \"react\";\nimport { useImporthubHost } from \"./host\";\nimport { importhubKeys } from \"./query-keys\";\n\nexport interface BlueprintNames {\n\t/** Whether the host can name Blueprints at all (ImporthubHost.blueprints). */\n\tavailable: boolean;\n\t/** A Blueprint's name; undefined while unknown. */\n\tblueprintName: (blueprintId: string) => string | undefined;\n\t/** A Release's label, such as \"Release 3\"; undefined while unknown. */\n\treleaseLabel: (blueprintId: string, releaseId: string) => string | undefined;\n}\n\n/**\n * Names the Blueprints and Releases Mappings target, through the host's\n * lookup: importhub holds only their ids, and an id never labels a thing\n * (anker's rule). Without a lookup, `available` is false and the screens\n * show the ids as the labelled technical detail they are.\n */\nexport function useBlueprintNames(blueprintIds: readonly string[]): BlueprintNames {\n\tconst { blueprints } = useImporthubHost();\n\tconst { workspaceId } = useHostIdentity();\n\tconst unique = [...new Set(blueprintIds.filter(Boolean))].sort();\n\tconst list = useQuery({\n\t\tqueryKey: importhubKeys.blueprints(workspaceId),\n\t\tqueryFn: () => blueprints?.listBlueprints() ?? Promise.resolve([]),\n\t\tenabled: blueprints !== undefined,\n\t});\n\tconst releases = useQueries({\n\t\tqueries: unique.map((blueprintId) => ({\n\t\t\tqueryKey: importhubKeys.blueprintReleases(workspaceId, blueprintId),\n\t\t\tqueryFn: () => blueprints?.listReleases(blueprintId) ?? Promise.resolve([]),\n\t\t\tenabled: blueprints !== undefined,\n\t\t})),\n\t});\n\t// One object per answer, not per render: a list's columns are memoised on\n\t// it, and new columns remount every cell.\n\tconst releaseData = releases.map((r) => r.data);\n\tconst releasesKey = releases.map((r) => r.dataUpdatedAt).join();\n\tconst uniqueKey = unique.join();\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: keyed on the answers' timestamps\n\treturn useMemo(\n\t\t() => ({\n\t\t\tavailable: blueprints !== undefined,\n\t\t\tblueprintName: (id: string) => list.data?.find((b) => b.id === id)?.name,\n\t\t\treleaseLabel: (blueprintId: string, releaseId: string) =>\n\t\t\t\treleaseData[unique.indexOf(blueprintId)]?.find((r) => r.id === releaseId)?.label,\n\t\t}),\n\t\t[blueprints, list.data, releasesKey, uniqueKey],\n\t);\n}\n","import { Button } from \"@knkcs/anker/atoms\";\nimport { Modal } from \"@knkcs/anker/components\";\nimport { BaseSelectField, InputField } from \"@knkcs/anker/forms\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { Alert, Code, HStack, List, Stack, Text } from \"@knkcs/anker/primitives\";\nimport { useMutation, useQuery } from \"@tanstack/react-query\";\nimport { useEffect } from \"react\";\nimport { FormProvider, useForm, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport type {\n\tBlueprintReleaseCheck,\n\tImporthubClient,\n\tMapping,\n} from \"../../client/importhub-client\";\nimport { useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\nexport interface MoveReleaseDialogProps {\n\topen: boolean;\n\tonClose: () => void;\n\tclient: ImporthubClient;\n\tmapping: Mapping;\n\t/** Saves the Mapping on the checked Release; resolves once saved. */\n\tonMove: (blueprintReleaseId: string) => Promise<unknown>;\n}\n\ntype Values = { blueprintReleaseId: string | null };\n\n/**\n * Moves a Mapping to another Release of its Blueprint (manage-mappings:AC5):\n * the admin picks the Release, importhub checks the draft against it, and\n * the dialog lists every mapped field path, and Release Spec field, the\n * Release no longer has, before anything is saved. Move saves only a Release\n * that was checked, and is offered only once it was.\n */\nexport function MoveReleaseDialog({\n\topen,\n\tonClose,\n\tclient,\n\tmapping,\n\tonMove,\n}: MoveReleaseDialogProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst form = useForm<Values>({ defaultValues: { blueprintReleaseId: null } });\n\tconst releaseId = useWatch({ control: form.control, name: \"blueprintReleaseId\" }) ?? \"\";\n\tconst check = useMutation({\n\t\tmutationFn: (id: string) => client.checkMappingBlueprintRelease(mapping.id, id),\n\t});\n\tconst move = useMutation({ mutationFn: onMove, onSuccess: onClose });\n\tconst { reset } = form;\n\tconst { reset: resetCheck } = check;\n\tconst { reset: resetMove } = move;\n\tuseEffect(() => {\n\t\tif (open) {\n\t\t\treset({ blueprintReleaseId: null });\n\t\t\tresetCheck();\n\t\t\tresetMove();\n\t\t}\n\t}, [open, reset, resetCheck, resetMove]);\n\t// A report is for the Release it was asked about; another choice asks again.\n\tconst checkedId = check.variables;\n\tconst report = check.data && checkedId === releaseId ? check.data : null;\n\tuseEffect(() => {\n\t\tif (checkedId !== undefined && checkedId !== releaseId) resetCheck();\n\t}, [checkedId, releaseId, resetCheck]);\n\n\treturn (\n\t\t<Modal\n\t\t\topen={open}\n\t\t\tonClose={onClose}\n\t\t\theader={t(\"mappings.moveTitle\")}\n\t\t\tlazyMount\n\t\t\tunmountOnExit\n\t\t\tfooter={\n\t\t\t\t<HStack gap=\"2\">\n\t\t\t\t\t<Button variant=\"outline\" onClick={onClose}>\n\t\t\t\t\t\t{t(\"common.cancel\")}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tdisabled={!releaseId || releaseId === mapping.content.blueprintReleaseId}\n\t\t\t\t\t\tloading={check.isPending}\n\t\t\t\t\t\tonClick={() => check.mutate(releaseId)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(\"mappings.check\")}\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"solid\"\n\t\t\t\t\t\tdisabled={!report}\n\t\t\t\t\t\tloading={move.isPending}\n\t\t\t\t\t\tonClick={() => move.mutate(releaseId)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(\"mappings.moveConfirm\")}\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t}\n\t\t>\n\t\t\t<FormProvider {...form}>\n\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t<ReleaseField mapping={mapping} />\n\t\t\t\t\t{check.isError ? (\n\t\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"mappings.checkFailed\")}>\n\t\t\t\t\t\t\t{check.error.message}\n\t\t\t\t\t\t</Alert>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{report ? <CheckReport report={report} /> : null}\n\t\t\t\t\t{move.isError ? (\n\t\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"save.failed\")}>\n\t\t\t\t\t\t\t{move.error.message}\n\t\t\t\t\t\t</Alert>\n\t\t\t\t\t) : null}\n\t\t\t\t</Stack>\n\t\t\t</FormProvider>\n\t\t</Modal>\n\t);\n}\n\nfunction ReleaseField({ mapping }: { mapping: Mapping }) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { blueprints } = useImporthubHost();\n\tconst { workspaceId } = useHostIdentity();\n\tconst releases = useQuery({\n\t\tqueryKey: importhubKeys.blueprintReleases(workspaceId, mapping.content.blueprintId),\n\t\tqueryFn: () => blueprints?.listReleases(mapping.content.blueprintId) ?? Promise.resolve([]),\n\t\tenabled: blueprints !== undefined,\n\t});\n\tif (!blueprints) {\n\t\treturn (\n\t\t\t<InputField<Values> name=\"blueprintReleaseId\" label={t(\"mappings.newReleaseId\")} required />\n\t\t);\n\t}\n\treturn (\n\t\t<BaseSelectField<Values>\n\t\t\tname=\"blueprintReleaseId\"\n\t\t\tlabel={t(\"mappings.newRelease\")}\n\t\t\trequired\n\t\t\toptions={(releases.data ?? [])\n\t\t\t\t.filter((r) => r.id !== mapping.content.blueprintReleaseId)\n\t\t\t\t.map((r) => ({ id: r.id, label: r.label }))}\n\t\t/>\n\t);\n}\n\nfunction CheckReport({ report }: { report: BlueprintReleaseCheck }) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst lost = report.missingFieldPaths.length + report.missingReleaseSpecFields.length;\n\tif (lost === 0) {\n\t\treturn <Alert status=\"success\" colorPalette=\"success\" title={t(\"mappings.nothingLost\")} />;\n\t}\n\treturn (\n\t\t<Alert status=\"warning\" colorPalette=\"warning\" title={t(\"mappings.lost\", { count: lost })}>\n\t\t\t<Stack gap=\"2\">\n\t\t\t\t{report.missingFieldPaths.length > 0 ? (\n\t\t\t\t\t<LostList label={t(\"mappings.lostFields\")} paths={report.missingFieldPaths} />\n\t\t\t\t) : null}\n\t\t\t\t{report.missingReleaseSpecFields.length > 0 ? (\n\t\t\t\t\t<LostList label={t(\"mappings.lostReleaseSpec\")} paths={report.missingReleaseSpecFields} />\n\t\t\t\t) : null}\n\t\t\t</Stack>\n\t\t</Alert>\n\t);\n}\n\nfunction LostList({ label, paths }: { label: string; paths: string[] }) {\n\treturn (\n\t\t<Stack gap=\"1\">\n\t\t\t<Text fontWeight=\"medium\">{label}</Text>\n\t\t\t<List.Root ps=\"4\" aria-label={label}>\n\t\t\t\t{paths.map((p) => (\n\t\t\t\t\t<List.Item key={p}>\n\t\t\t\t\t\t<Code>{p}</Code>\n\t\t\t\t\t</List.Item>\n\t\t\t\t))}\n\t\t\t</List.Root>\n\t\t</Stack>\n\t);\n}\n","import { Button, StatusBadge } from \"@knkcs/anker/atoms\";\nimport { Card, ContextRail } from \"@knkcs/anker/components\";\nimport { InputField, TextareaField } from \"@knkcs/anker/forms\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { Alert, Badge, Box, Code, HStack, Link, List, Stack, Text } from \"@knkcs/anker/primitives\";\nimport { DetailPageTemplate, usePageRail } from \"@knkcs/anker/templates\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { ArrowRightLeft, Trash2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link as RouterLink } from \"react-router\";\nimport type { ImporthubClient, Mapping, MappingContent } from \"../../client/importhub-client\";\nimport { useBlueprintNames } from \"../../common/blueprint-names\";\nimport { DeleteDialog } from \"../../common/delete-dialog\";\nimport { itemPath, useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { LoadFailed, Loading } from \"../../common/query-state\";\nimport { useCanConfigure } from \"../../common/use-can-configure\";\nimport { releaseLabel, ValidityAlert } from \"../../common/validity\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\nimport { MoveReleaseDialog } from \"./move-release-dialog\";\n\nexport interface MappingDetailProps {\n\tclient: ImporthubClient;\n\t/** The Mapping's id. */\n\tid: string;\n\t/** It was deleted: the host leaves its page. */\n\tonDeleted: () => void;\n}\n\n/**\n * What this page edits of a Mapping. Every other setting (the field\n * mappings, Version Match, Title Contributions, …) is the structured\n * editor's (F4) and is saved back exactly as it came.\n */\ntype MappingValues = {\n\tname: string;\n\tdescription: string;\n\telementSelector: string;\n\tsourceKeySelector: string;\n\tsourceKeyTemplate: string;\n};\n\nconst valuesOf = (c: MappingContent): MappingValues => ({\n\tname: c.name,\n\tdescription: c.description ?? \"\",\n\telementSelector: c.elementSelector ?? \"\",\n\tsourceKeySelector: c.sourceKey?.selector ?? \"\",\n\tsourceKeyTemplate: c.sourceKey?.template ?? \"\",\n});\n\nconst contentOf = (base: MappingContent, v: MappingValues): MappingContent => ({\n\t...base,\n\tname: v.name,\n\tdescription: v.description,\n\telementSelector: v.elementSelector,\n\tsourceKey: { ...base.sourceKey, selector: v.sourceKeySelector, template: v.sourceKeyTemplate },\n});\n\n/**\n * One Mapping (manage-mappings:AC2): its name, what it selects and its\n * Source Key, the Blueprint Release it pins with the move to another one\n * (AC5), the Import Profiles that include it (AC3), and why it is invalid.\n * An admin saves with the header's Save and deletes from the rail, which\n * importhub refuses while a Profile includes it, naming them (AC4).\n */\nexport function MappingDetail({ client, id, onDeleted }: MappingDetailProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst query = useQuery({\n\t\tqueryKey: importhubKeys.mapping(workspaceId, id),\n\t\tqueryFn: () => client.getMapping(id),\n\t});\n\tif (query.isError || !query.data) {\n\t\treturn (\n\t\t\t<DetailPageTemplate title={t(\"section.mappings.title\")}>\n\t\t\t\t{query.isError ? <LoadFailed /> : <Loading />}\n\t\t\t</DetailPageTemplate>\n\t\t);\n\t}\n\treturn <MappingPage client={client} mapping={query.data} onDeleted={onDeleted} />;\n}\n\nfunction MappingPage({\n\tclient,\n\tmapping,\n\tonDeleted,\n}: {\n\tclient: ImporthubClient;\n\tmapping: Mapping;\n\tonDeleted: () => void;\n}) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst { paths } = useImporthubHost();\n\tconst canConfigure = useCanConfigure();\n\tconst queryClient = useQueryClient();\n\tconst [deleting, setDeleting] = useState(false);\n\tconst [moving, setMoving] = useState(false);\n\tconst names = useBlueprintNames([mapping.content.blueprintId]);\n\tconst profiles = useQuery({\n\t\tqueryKey: importhubKeys.mappingImportProfiles(workspaceId, mapping.id),\n\t\tqueryFn: () => client.listMappingImportProfiles(mapping.id),\n\t});\n\n\tconst form = useForm<MappingValues>({ defaultValues: valuesOf(mapping.content) });\n\tconst { reset, formState } = form;\n\tuseEffect(() => {\n\t\tif (!formState.isDirty) reset(valuesOf(mapping.content));\n\t}, [mapping, reset, formState.isDirty]);\n\n\tconst saved = (m: Mapping) => {\n\t\tqueryClient.setQueryData(importhubKeys.mapping(workspaceId, m.id), m);\n\t\treset(valuesOf(m.content));\n\t\tvoid queryClient.invalidateQueries({ queryKey: importhubKeys.mappings(workspaceId) });\n\t\t// An included Mapping's validity is part of each Profile's.\n\t\tvoid queryClient.invalidateQueries({ queryKey: importhubKeys.importProfiles(workspaceId) });\n\t};\n\tconst save = useMutation({\n\t\tmutationFn: (content: MappingContent) =>\n\t\t\tclient.updateMapping(mapping.id, content, mapping.state.draftRevisionId),\n\t\tonSuccess: saved,\n\t});\n\tconst onSave = form.handleSubmit((values) => save.mutate(contentOf(mapping.content, values)));\n\n\tusePageRail(\n\t\tcanConfigure ? (\n\t\t\t<ContextRail storageKey=\"importhub.mapping.rail\">\n\t\t\t\t<ContextRail.Header title={t(\"rail.title\")} />\n\t\t\t\t<ContextRail.Section id=\"actions\" label={t(\"rail.actions\")}>\n\t\t\t\t\t<ContextRail.IconButton\n\t\t\t\t\t\tlabel={t(\"mappings.delete\")}\n\t\t\t\t\t\ticon={<Trash2 size={16} />}\n\t\t\t\t\t\ttone=\"outline-red\"\n\t\t\t\t\t\tonClick={() => setDeleting(true)}\n\t\t\t\t\t/>\n\t\t\t\t</ContextRail.Section>\n\t\t\t</ContextRail>\n\t\t) : null,\n\t);\n\n\tconst blueprintName = names.blueprintName(mapping.content.blueprintId);\n\tconst release = names.releaseLabel(\n\t\tmapping.content.blueprintId,\n\t\tmapping.content.blueprintReleaseId,\n\t);\n\tconst fieldCount = mapping.content.fields?.length ?? 0;\n\n\treturn (\n\t\t<DetailPageTemplate\n\t\t\ttitle={mapping.content.name}\n\t\t\tbreadcrumbs={[{ label: t(\"section.mappings.title\"), to: paths.mappings }]}\n\t\t\tbadges={\n\t\t\t\t<HStack gap=\"2\">\n\t\t\t\t\t<StatusBadge\n\t\t\t\t\t\ttone={mapping.validity.valid ? \"success\" : \"danger\"}\n\t\t\t\t\t\tlabel={mapping.validity.valid ? t(\"validity.valid\") : t(\"validity.invalid\")}\n\t\t\t\t\t/>\n\t\t\t\t\t<Badge>{releaseLabel(mapping.state, t)}</Badge>\n\t\t\t\t</HStack>\n\t\t\t}\n\t\t\tactions={\n\t\t\t\tcanConfigure ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"solid\"\n\t\t\t\t\t\tdisabled={!formState.isDirty}\n\t\t\t\t\t\tloading={save.isPending}\n\t\t\t\t\t\tonClick={() => void onSave()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(\"common.save\")}\n\t\t\t\t\t</Button>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t>\n\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t<ValidityAlert validity={mapping.validity} />\n\t\t\t\t\t{save.isError ? (\n\t\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"save.failed\")}>\n\t\t\t\t\t\t\t{save.error.message}\n\t\t\t\t\t\t</Alert>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<FormProvider {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tonSubmit={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tif (canConfigure) void onSave();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Card title={t(\"mappings.general\")}>\n\t\t\t\t\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t\t\t\t\t<InputField<MappingValues>\n\t\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"fields.name\")}\n\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<TextareaField<MappingValues>\n\t\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"fields.description\")}\n\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<InputField<MappingValues>\n\t\t\t\t\t\t\t\t\t\tname=\"elementSelector\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"mappings.elementSelector\")}\n\t\t\t\t\t\t\t\t\t\thelperText={t(\"mappings.elementSelectorHelp\")}\n\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<InputField<MappingValues>\n\t\t\t\t\t\t\t\t\t\tname=\"sourceKeySelector\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"mappings.sourceKeySelector\")}\n\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<InputField<MappingValues>\n\t\t\t\t\t\t\t\t\t\tname=\"sourceKeyTemplate\"\n\t\t\t\t\t\t\t\t\t\tlabel={t(\"mappings.sourceKeyTemplate\")}\n\t\t\t\t\t\t\t\t\t\thelperText={t(\"mappings.sourceKeyTemplateHelp\")}\n\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Text color=\"fg.muted\" fontSize=\"sm\">\n\t\t\t\t\t\t\t\t\t\t{t(\"mappings.fieldCount\", { count: fieldCount })}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</FormProvider>\n\t\t\t\t\t<Card title={t(\"mappings.target\")}>\n\t\t\t\t\t\t<Stack gap=\"3\">\n\t\t\t\t\t\t\t{names.available ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Fact label={t(\"mappings.blueprint\")}>{blueprintName ?? \"…\"}</Fact>\n\t\t\t\t\t\t\t\t\t<Fact label={t(\"mappings.release\")}>{release ?? \"…\"}</Fact>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Fact label={t(\"mappings.blueprintId\")}>\n\t\t\t\t\t\t\t\t\t\t<Code>{mapping.content.blueprintId}</Code>\n\t\t\t\t\t\t\t\t\t</Fact>\n\t\t\t\t\t\t\t\t\t<Fact label={t(\"mappings.releaseId\")}>\n\t\t\t\t\t\t\t\t\t\t<Code>{mapping.content.blueprintReleaseId}</Code>\n\t\t\t\t\t\t\t\t\t</Fact>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{canConfigure ? (\n\t\t\t\t\t\t\t\t<Box>\n\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" onClick={() => setMoving(true)}>\n\t\t\t\t\t\t\t\t\t\t<ArrowRightLeft size={14} aria-hidden />\n\t\t\t\t\t\t\t\t\t\t{t(\"mappings.move\")}\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</Card>\n\t\t\t\t\t<Card title={t(\"mappings.includedBy\")}>\n\t\t\t\t\t\t{profiles.isError ? (\n\t\t\t\t\t\t\t<Text color=\"fg.muted\">{t(\"startPage.error\")}</Text>\n\t\t\t\t\t\t) : !profiles.data ? (\n\t\t\t\t\t\t\t<Text color=\"fg.muted\">{t(\"startPage.loading\")}</Text>\n\t\t\t\t\t\t) : profiles.data.length === 0 ? (\n\t\t\t\t\t\t\t<Text color=\"fg.muted\">{t(\"mappings.noProfiles\")}</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<List.Root ps=\"4\" aria-label={t(\"mappings.includedBy\")}>\n\t\t\t\t\t\t\t\t{profiles.data.map((p) => (\n\t\t\t\t\t\t\t\t\t<List.Item key={p.id}>\n\t\t\t\t\t\t\t\t\t\t<Link asChild>\n\t\t\t\t\t\t\t\t\t\t\t<RouterLink to={itemPath(paths, \"profiles\", p.id)}>{p.name}</RouterLink>\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t</List.Item>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</List.Root>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Card>\n\t\t\t\t</Stack>\n\t\t\t</Box>\n\t\t\t<MoveReleaseDialog\n\t\t\t\topen={moving}\n\t\t\t\tonClose={() => setMoving(false)}\n\t\t\t\tclient={client}\n\t\t\t\tmapping={mapping}\n\t\t\t\tonMove={async (blueprintReleaseId) => {\n\t\t\t\t\t// The move carries the page's unsaved edits too: it is one save.\n\t\t\t\t\tconst content = {\n\t\t\t\t\t\t...contentOf(mapping.content, form.getValues()),\n\t\t\t\t\t\tblueprintReleaseId,\n\t\t\t\t\t};\n\t\t\t\t\tsaved(await client.updateMapping(mapping.id, content, mapping.state.draftRevisionId));\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<DeleteDialog\n\t\t\t\topen={deleting}\n\t\t\t\tonClose={() => setDeleting(false)}\n\t\t\t\ttitle={t(\"mappings.deleteTitle\", { name: mapping.content.name })}\n\t\t\t\tmessage={t(\"mappings.deleteMessage\")}\n\t\t\t\tonDelete={() => client.deleteMapping(mapping.id)}\n\t\t\t\tonDeleted={() => {\n\t\t\t\t\tsetDeleting(false);\n\t\t\t\t\tqueryClient.removeQueries({ queryKey: importhubKeys.mapping(workspaceId, mapping.id) });\n\t\t\t\t\tvoid queryClient.invalidateQueries({ queryKey: importhubKeys.mappings(workspaceId) });\n\t\t\t\t\tonDeleted();\n\t\t\t\t}}\n\t\t\t/>\n\t\t</DetailPageTemplate>\n\t);\n}\n\nfunction Fact({ label, children }: { label: string; children: React.ReactNode }) {\n\treturn (\n\t\t<HStack gap=\"4\" align=\"baseline\">\n\t\t\t<Text color=\"fg.muted\" minW=\"40\">\n\t\t\t\t{label}\n\t\t\t</Text>\n\t\t\t<Box>{children}</Box>\n\t\t</HStack>\n\t);\n}\n","import { BaseSelectField, InputField } from \"@knkcs/anker/forms\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useEffect, useRef } from \"react\";\nimport { useFormContext, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\ntype Values = { blueprintId: string; blueprintReleaseId: string };\n\n/**\n * A new Mapping's target Blueprint and the Release it pins\n * (manage-mappings:AC2): picked by name from the host's lookup, or, where the\n * host has none, entered as the ids they are, labelled as such.\n */\nexport function BlueprintFields() {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { blueprints } = useImporthubHost();\n\tif (!blueprints) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<InputField<Values> name=\"blueprintId\" label={t(\"mappings.blueprintId\")} required />\n\t\t\t\t<InputField<Values>\n\t\t\t\t\tname=\"blueprintReleaseId\"\n\t\t\t\t\tlabel={t(\"mappings.releaseId\")}\n\t\t\t\t\thelperText={t(\"mappings.idsHelp\")}\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n\treturn <BlueprintSelects />;\n}\n\nfunction BlueprintSelects() {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { blueprints } = useImporthubHost();\n\tconst { workspaceId } = useHostIdentity();\n\tconst { control, setValue } = useFormContext<Values>();\n\tconst blueprintId = useWatch({ control, name: \"blueprintId\" });\n\t// Another Blueprint empties the Release: one of the old Blueprint's would\n\t// make the Mapping invalid (`release_of_other_blueprint`).\n\tconst previous = useRef(blueprintId);\n\tuseEffect(() => {\n\t\tif (previous.current !== blueprintId) setValue(\"blueprintReleaseId\", \"\");\n\t\tprevious.current = blueprintId;\n\t}, [blueprintId, setValue]);\n\tconst list = useQuery({\n\t\tqueryKey: importhubKeys.blueprints(workspaceId),\n\t\tqueryFn: () => blueprints?.listBlueprints() ?? Promise.resolve([]),\n\t});\n\tconst releases = useQuery({\n\t\tqueryKey: importhubKeys.blueprintReleases(workspaceId, blueprintId ?? \"\"),\n\t\tqueryFn: () => blueprints?.listReleases(blueprintId) ?? Promise.resolve([]),\n\t\tenabled: Boolean(blueprintId),\n\t});\n\treturn (\n\t\t<>\n\t\t\t<BaseSelectField<Values>\n\t\t\t\tname=\"blueprintId\"\n\t\t\t\tlabel={t(\"mappings.blueprint\")}\n\t\t\t\trequired\n\t\t\t\toptions={(list.data ?? []).map((b) => ({ id: b.id, label: b.name }))}\n\t\t\t/>\n\t\t\t<BaseSelectField<Values>\n\t\t\t\tname=\"blueprintReleaseId\"\n\t\t\t\tlabel={t(\"mappings.release\")}\n\t\t\t\trequired\n\t\t\t\tdisabled={!blueprintId}\n\t\t\t\toptions={(releases.data ?? []).map((r) => ({ id: r.id, label: r.label }))}\n\t\t\t/>\n\t\t</>\n\t);\n}\n","import { Button } from \"@knkcs/anker/atoms\";\nimport { CodeCell, DataTable, LinkCell, TruncatedTextCell } from \"@knkcs/anker/components\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { IndexPageTemplate } from \"@knkcs/anker/templates\";\nimport { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport type { ColumnDef } from \"@tanstack/react-table\";\nimport { Plus } from \"lucide-react\";\nimport { useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { ImporthubClient, Mapping } from \"../../client/importhub-client\";\nimport { useBlueprintNames } from \"../../common/blueprint-names\";\nimport { CreateDialog } from \"../../common/create-dialog\";\nimport { itemPath, useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { LoadFailed } from \"../../common/query-state\";\nimport { useCanConfigure } from \"../../common/use-can-configure\";\nimport { ValidityCell } from \"../../common/validity\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\nimport { BlueprintFields } from \"./blueprint-fields\";\n\nexport interface MappingsIndexProps {\n\tclient: ImporthubClient;\n\t/** Opens a Mapping's page: the host navigates, after a create too. */\n\tonOpen: (id: string) => void;\n}\n\n// DataTable takes rows that are records.\ntype Row = Mapping & Record<string, unknown>;\n\nconst CREATE_DEFAULTS = { blueprintId: \"\", blueprintReleaseId: \"\" };\n\n/**\n * Every Mapping of the workspace with its target Blueprint, its pinned\n * Blueprint Release and its validity (manage-mappings:AC1); an admin creates\n * one, naming the Blueprint and the Release, from the header (AC2).\n */\nexport function MappingsIndex({ client, onOpen }: MappingsIndexProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst { paths } = useImporthubHost();\n\tconst canConfigure = useCanConfigure();\n\tconst queryClient = useQueryClient();\n\tconst [creating, setCreating] = useState(false);\n\tconst query = useQuery({\n\t\tqueryKey: importhubKeys.mappings(workspaceId),\n\t\tqueryFn: () => client.listMappings(),\n\t});\n\tconst names = useBlueprintNames((query.data ?? []).map((m) => m.content.blueprintId));\n\tconst columns = useMemo<ColumnDef<Row, unknown>[]>(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: \"name\",\n\t\t\t\theader: t(\"fields.name\"),\n\t\t\t\tcell: (c) => (\n\t\t\t\t\t<LinkCell\n\t\t\t\t\t\tto={itemPath(paths, \"mappings\", c.row.original.id)}\n\t\t\t\t\t\tlabel={c.row.original.content.name}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t\tnames.available\n\t\t\t\t? {\n\t\t\t\t\t\tid: \"blueprint\",\n\t\t\t\t\t\theader: t(\"mappings.blueprint\"),\n\t\t\t\t\t\tcell: (c) => (\n\t\t\t\t\t\t\t<TruncatedTextCell\n\t\t\t\t\t\t\t\tvalue={names.blueprintName(c.row.original.content.blueprintId) ?? \"\"}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tid: \"blueprint\",\n\t\t\t\t\t\theader: t(\"mappings.blueprintId\"),\n\t\t\t\t\t\tcell: (c) => <CodeCell value={c.row.original.content.blueprintId} />,\n\t\t\t\t\t},\n\t\t\tnames.available\n\t\t\t\t? {\n\t\t\t\t\t\tid: \"release\",\n\t\t\t\t\t\theader: t(\"mappings.release\"),\n\t\t\t\t\t\tcell: (c) => (\n\t\t\t\t\t\t\t<TruncatedTextCell\n\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\tnames.releaseLabel(\n\t\t\t\t\t\t\t\t\t\tc.row.original.content.blueprintId,\n\t\t\t\t\t\t\t\t\t\tc.row.original.content.blueprintReleaseId,\n\t\t\t\t\t\t\t\t\t) ?? \"\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tid: \"release\",\n\t\t\t\t\t\theader: t(\"mappings.releaseId\"),\n\t\t\t\t\t\tcell: (c) => <CodeCell value={c.row.original.content.blueprintReleaseId} />,\n\t\t\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"validity\",\n\t\t\t\theader: t(\"validity.column\"),\n\t\t\t\tcell: (c) => <ValidityCell validity={c.row.original.validity} />,\n\t\t\t},\n\t\t],\n\t\t[t, paths, names],\n\t);\n\treturn (\n\t\t<IndexPageTemplate\n\t\t\ttitle={t(\"section.mappings.title\")}\n\t\t\tactions={\n\t\t\t\tcanConfigure ? (\n\t\t\t\t\t<Button variant=\"solid\" onClick={() => setCreating(true)}>\n\t\t\t\t\t\t<Plus size={16} aria-hidden />\n\t\t\t\t\t\t{t(\"mappings.new\")}\n\t\t\t\t\t</Button>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t>\n\t\t\t{query.isError ? (\n\t\t\t\t<LoadFailed />\n\t\t\t) : (\n\t\t\t\t<DataTable\n\t\t\t\t\tcolumns={columns}\n\t\t\t\t\tdata={(query.data ?? []) as Row[]}\n\t\t\t\t\tloading={query.isPending}\n\t\t\t\t\tgetRowId={(m) => m.id}\n\t\t\t\t\temptyState={t(\"mappings.empty\")}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<CreateDialog\n\t\t\t\topen={creating}\n\t\t\t\tonClose={() => setCreating(false)}\n\t\t\t\ttitle={t(\"mappings.new\")}\n\t\t\t\tdefaultValues={CREATE_DEFAULTS}\n\t\t\t\tonCreate={async ({ name, description, blueprintId, blueprintReleaseId }) => {\n\t\t\t\t\tconst m = await client.createMapping({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\tblueprintId: blueprintId ?? \"\",\n\t\t\t\t\t\tblueprintReleaseId: blueprintReleaseId ?? \"\",\n\t\t\t\t\t});\n\t\t\t\t\tawait queryClient.invalidateQueries({ queryKey: importhubKeys.mappings(workspaceId) });\n\t\t\t\t\treturn m.id;\n\t\t\t\t}}\n\t\t\t\tonCreated={(id) => {\n\t\t\t\t\tsetCreating(false);\n\t\t\t\t\tonOpen(id);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<BlueprintFields />\n\t\t\t</CreateDialog>\n\t\t</IndexPageTemplate>\n\t);\n}\n","import { DataTable, SlugCell, TruncatedTextCell } from \"@knkcs/anker/components\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { IndexPageTemplate } from \"@knkcs/anker/templates\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport type { ColumnDef } from \"@tanstack/react-table\";\nimport { useMemo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { ImporthubClient, Processor } from \"../../client/importhub-client\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { LoadFailed } from \"../../common/query-state\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\nexport interface ProcessorCatalogueProps {\n\tclient: ImporthubClient;\n}\n\n// DataTable takes rows that are records.\ntype Row = Processor & Record<string, unknown>;\n\n/**\n * The Processor catalogue (manage-import-profiles:AC5): every Processor with\n * its kind, where it is configured, what it does and the settings it takes,\n * by their names. Read-only for everyone: the catalogue is importhub's.\n */\nexport function ProcessorCatalogue({ client }: ProcessorCatalogueProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst query = useQuery({\n\t\tqueryKey: importhubKeys.processors(workspaceId),\n\t\tqueryFn: () => client.listProcessors(),\n\t});\n\tconst columns = useMemo<ColumnDef<Row, unknown>[]>(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: \"name\",\n\t\t\t\theader: t(\"fields.name\"),\n\t\t\t\tsize: 180,\n\t\t\t\tcell: (c) => <SlugCell value={c.row.original.name} />,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"kind\",\n\t\t\t\theader: t(\"processors.kindColumn\"),\n\t\t\t\tsize: 140,\n\t\t\t\tcell: (c) => <TruncatedTextCell value={t(`processors.kind.${c.row.original.kind}`)} />,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"target\",\n\t\t\t\theader: t(\"processors.targetColumn\"),\n\t\t\t\tsize: 160,\n\t\t\t\tcell: (c) => <TruncatedTextCell value={t(`processors.target.${c.row.original.target}`)} />,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"description\",\n\t\t\t\theader: t(\"fields.description\"),\n\t\t\t\tcell: (c) => <TruncatedTextCell value={c.row.original.description} />,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"settings\",\n\t\t\t\theader: t(\"processors.settingsColumn\"),\n\t\t\t\tcell: (c) => (\n\t\t\t\t\t<TruncatedTextCell\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tc.row.original.settingsSpec.length === 0\n\t\t\t\t\t\t\t\t? t(\"processors.noSettings\")\n\t\t\t\t\t\t\t\t: c.row.original.settingsSpec\n\t\t\t\t\t\t\t\t\t\t.map((f) => f.config.name || f.config.api_accessor)\n\t\t\t\t\t\t\t\t\t\t.join(\", \")\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t],\n\t\t[t],\n\t);\n\treturn (\n\t\t<IndexPageTemplate title={t(\"section.processors.title\")}>\n\t\t\t{query.isError ? (\n\t\t\t\t<LoadFailed />\n\t\t\t) : (\n\t\t\t\t<DataTable\n\t\t\t\t\tcolumns={columns}\n\t\t\t\t\tdata={(query.data ?? []) as Row[]}\n\t\t\t\t\tloading={query.isPending}\n\t\t\t\t\tgetRowId={(p) => p.name}\n\t\t\t\t\temptyState={t(\"processors.empty\")}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</IndexPageTemplate>\n\t);\n}\n","import { Button, IconButton } from \"@knkcs/anker/atoms\";\nimport {\n\tBox,\n\tHStack,\n\tMenuContent,\n\tMenuItem,\n\tMenuRoot,\n\tMenuTrigger,\n\tStack,\n\tText,\n} from \"@knkcs/anker/primitives\";\nimport { ArrowDown, ArrowUp, Plus, Trash2 } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\n/** Moves the item at `from` to `to`, returning a new list. */\nexport function moved<T>(list: readonly T[], from: number, to: number): T[] {\n\tconst next = [...list];\n\tconst [item] = next.splice(from, 1);\n\tnext.splice(to, 0, item as T);\n\treturn next;\n}\n\nexport interface OrderedListProps<T> {\n\titems: readonly T[];\n\t/** Each row's content: its name and what else it shows. */\n\trenderItem: (item: T, index: number) => ReactNode;\n\t/** The row's name in the move and remove buttons' labels. */\n\tnameOf: (item: T) => string;\n\t/** Whether to offer moving, removing and adding: an admin's. */\n\teditable: boolean;\n\tonChange: (next: T[]) => void;\n\t/** Shown when the list is empty. */\n\temptyLabel: string;\n\t/** The add menu's button label, and what it offers. */\n\taddLabel: string;\n\taddOptions: { value: string; label: string }[];\n\tonAdd: (value: string) => void;\n}\n\n/**\n * An ordered list a Profile holds (its Preprocessors, Mappings and\n * Post-processors), in the order they run: an admin moves each up or down\n * with a button, which the keyboard reaches as well as the pointer, removes\n * it, and adds from a menu (manage-import-profiles:AC4).\n */\nexport function OrderedList<T>({\n\titems,\n\trenderItem,\n\tnameOf,\n\teditable,\n\tonChange,\n\temptyLabel,\n\taddLabel,\n\taddOptions,\n\tonAdd,\n}: OrderedListProps<T>) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\treturn (\n\t\t<Stack gap=\"2\">\n\t\t\t{items.length === 0 ? (\n\t\t\t\t<Text color=\"fg.muted\">{emptyLabel}</Text>\n\t\t\t) : (\n\t\t\t\t<Stack as=\"ol\" gap=\"0\" listStyleType=\"none\" ms=\"0\">\n\t\t\t\t\t{items.map((item, index) => {\n\t\t\t\t\t\tconst name = nameOf(item);\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tas=\"li\"\n\t\t\t\t\t\t\t\t// Items carry no id of their own; the same Processor may run twice.\n\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: the position is the identity here\n\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\tgap=\"3\"\n\t\t\t\t\t\t\t\tpy=\"2\"\n\t\t\t\t\t\t\t\tborderBottomWidth=\"1px\"\n\t\t\t\t\t\t\t\tborderColor=\"border\"\n\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text color=\"fg.muted\" minW=\"6\" textAlign=\"end\">\n\t\t\t\t\t\t\t\t\t{index + 1}.\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t<Box flex=\"1\" minW=\"0\">\n\t\t\t\t\t\t\t\t\t{renderItem(item, index)}\n\t\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t\t\t{editable ? (\n\t\t\t\t\t\t\t\t\t<HStack gap=\"1\">\n\t\t\t\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\t\t\t\taria-label={t(\"order.moveUp\", { name })}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={index === 0}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => onChange(moved(items, index, index - 1))}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<ArrowUp size={14} />\n\t\t\t\t\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\t\t\t\taria-label={t(\"order.moveDown\", { name })}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={index === items.length - 1}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => onChange(moved(items, index, index + 1))}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<ArrowDown size={14} />\n\t\t\t\t\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\t\t\t\taria-label={t(\"order.remove\", { name })}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tcolorPalette=\"red\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => onChange(items.filter((_, i) => i !== index))}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Trash2 size={14} />\n\t\t\t\t\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t\t{editable ? (\n\t\t\t\t<Box>\n\t\t\t\t\t<MenuRoot onSelect={(d) => onAdd(d.value)}>\n\t\t\t\t\t\t<MenuTrigger asChild>\n\t\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" disabled={addOptions.length === 0}>\n\t\t\t\t\t\t\t\t<Plus size={14} aria-hidden />\n\t\t\t\t\t\t\t\t{addLabel}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</MenuTrigger>\n\t\t\t\t\t\t<MenuContent>\n\t\t\t\t\t\t\t{addOptions.map((o) => (\n\t\t\t\t\t\t\t\t<MenuItem key={o.value} value={o.value}>\n\t\t\t\t\t\t\t\t\t{o.label}\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</MenuContent>\n\t\t\t\t\t</MenuRoot>\n\t\t\t\t</Box>\n\t\t\t) : null}\n\t\t</Stack>\n\t);\n}\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { Modal } from \"@knkcs/anker/components\";\nimport { FieldKitProvider, SpecForm } from \"@knkcs/fieldkit/renderer\";\nimport { builtInFieldTypes, specToZodSchema } from \"@knkcs/fieldkit/schema\";\nimport { useEffect, useMemo } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport type { Processor } from \"../../client/importhub-client\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\nexport interface ProcessorSettingsDialogProps {\n\topen: boolean;\n\tonClose: () => void;\n\t/** The Processor whose settings these are; null while nothing is open. */\n\tprocessor: Processor | null;\n\tsettings: Record<string, unknown>;\n\t/** Shows the settings without a way to change them: a viewer's. */\n\treadOnly: boolean;\n\t/** Applies the settings into the Profile's draft; the header's Save persists them. */\n\tonApply: (settings: Record<string, unknown>) => void;\n}\n\nconst NO_SETTINGS: Record<string, unknown> = {};\n\n/**\n * One Processor step's settings, in the form fieldkit generates from the\n * Processor's settings spec (manage-import-profiles:AC4): anker fields,\n * validated by the spec's own Zod schema, which is the shape importhub\n * checks on save. \"Apply\" puts them into the Profile's draft; nothing is\n * saved until the page's Save (anker ADR 0004).\n */\nexport function ProcessorSettingsDialog({\n\topen,\n\tonClose,\n\tprocessor,\n\tsettings,\n\treadOnly,\n\tonApply,\n}: ProcessorSettingsDialogProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst spec = processor?.settingsSpec ?? [];\n\tconst resolver = useMemo(() => zodResolver(specToZodSchema(spec, builtInFieldTypes)), [spec]);\n\tconst form = useForm<Record<string, unknown>>({ defaultValues: settings, resolver });\n\tconst { reset } = form;\n\t// Each opening starts from the step's settings as they are in the draft.\n\tuseEffect(() => {\n\t\tif (open) reset(settings ?? NO_SETTINGS);\n\t}, [open, settings, reset]);\n\tconst apply = form.handleSubmit((values) => onApply(values));\n\treturn (\n\t\t<Modal\n\t\t\topen={open}\n\t\t\tonClose={onClose}\n\t\t\theader={t(\"processors.settingsOf\", { name: processor?.name ?? \"\" })}\n\t\t\tlazyMount\n\t\t\tunmountOnExit\n\t\t\tcancelLabel={readOnly ? t(\"common.close\") : t(\"common.cancel\")}\n\t\t\tsaveLabel={t(\"common.apply\")}\n\t\t\tonSave={readOnly ? undefined : () => void apply()}\n\t\t>\n\t\t\t<FormProvider {...form}>\n\t\t\t\t<form\n\t\t\t\t\tonSubmit={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tvoid apply();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<FieldKitProvider plugins={builtInFieldTypes}>\n\t\t\t\t\t\t{readOnly ? (\n\t\t\t\t\t\t\t<SpecForm schema={spec} mode=\"read\" values={settings} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<SpecForm schema={spec} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</FieldKitProvider>\n\t\t\t\t</form>\n\t\t\t</FormProvider>\n\t\t</Modal>\n\t);\n}\n","import { Button, StatusBadge } from \"@knkcs/anker/atoms\";\nimport { Card, ContextRail } from \"@knkcs/anker/components\";\nimport { BaseSelectField, InputField, SwitchField, TextareaField } from \"@knkcs/anker/forms\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { Alert, Badge, Box, HStack, Link, Stack, Text } from \"@knkcs/anker/primitives\";\nimport { DetailPageTemplate, usePageRail } from \"@knkcs/anker/templates\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { Settings2, Trash2 } from \"lucide-react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { FormProvider, useForm, useFormContext, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link as RouterLink } from \"react-router\";\nimport type {\n\tImporthubClient,\n\tImportProfile,\n\tImportProfileContent,\n\tProcessor,\n\tProcessorKind,\n\tProcessorStep,\n} from \"../../client/importhub-client\";\nimport { DeleteDialog } from \"../../common/delete-dialog\";\nimport { itemPath, useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { LoadFailed, Loading } from \"../../common/query-state\";\nimport { useCanConfigure } from \"../../common/use-can-configure\";\nimport { releaseLabel, ValidityAlert } from \"../../common/validity\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\nimport { OrderedList } from \"./ordered-list\";\nimport { ProcessorSettingsDialog } from \"./processor-settings-dialog\";\n\nexport interface ImportProfileDetailProps {\n\tclient: ImporthubClient;\n\t/** The Import Profile's id. */\n\tid: string;\n\t/** It was deleted: the host leaves its page, for the list, say. */\n\tonDeleted: () => void;\n}\n\n/** The form's values: the content, with \"no Entity Set\" as null for the select. */\ntype ProfileValues = Omit<ImportProfileContent, \"entitySetId\"> & { entitySetId: string | null };\n\nconst valuesOf = (c: ImportProfileContent): ProfileValues => ({\n\t...c,\n\tentitySetId: c.entitySetId || null,\n});\n\nconst contentOf = (v: ProfileValues): ImportProfileContent => ({\n\t...v,\n\tentitySetId: v.entitySetId ?? \"\",\n});\n\n/**\n * One Import Profile with every setting (manage-import-profiles:AC3): its\n * Entity Set, its Preprocessors, Mappings and Post-processors in order, each\n * Processor configured in a form generated from its settings spec (AC4), and\n * what happens to the result. An admin edits all of it as one draft and\n * saves it with the header's one Save, and deletes the Profile from the rail\n * (anker ADR 0004); a viewer sees the same page read-only. Why it is invalid\n * heads the page (AC6).\n */\nexport function ImportProfileDetail({ client, id, onDeleted }: ImportProfileDetailProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst query = useQuery({\n\t\tqueryKey: importhubKeys.importProfile(workspaceId, id),\n\t\tqueryFn: () => client.getImportProfile(id),\n\t});\n\tif (query.isError) {\n\t\treturn (\n\t\t\t<DetailPageTemplate title={t(\"section.profiles.title\")}>\n\t\t\t\t<LoadFailed />\n\t\t\t</DetailPageTemplate>\n\t\t);\n\t}\n\tif (!query.data) {\n\t\treturn (\n\t\t\t<DetailPageTemplate title={t(\"section.profiles.title\")}>\n\t\t\t\t<Loading />\n\t\t\t</DetailPageTemplate>\n\t\t);\n\t}\n\treturn <ProfilePage client={client} profile={query.data} onDeleted={onDeleted} />;\n}\n\nfunction ProfilePage({\n\tclient,\n\tprofile,\n\tonDeleted,\n}: {\n\tclient: ImporthubClient;\n\tprofile: ImportProfile;\n\tonDeleted: () => void;\n}) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst { paths } = useImporthubHost();\n\tconst canConfigure = useCanConfigure();\n\tconst queryClient = useQueryClient();\n\tconst [deleting, setDeleting] = useState(false);\n\n\tconst processors = useQuery({\n\t\tqueryKey: importhubKeys.processors(workspaceId),\n\t\tqueryFn: () => client.listProcessors(),\n\t});\n\tconst mappings = useQuery({\n\t\tqueryKey: importhubKeys.mappings(workspaceId),\n\t\tqueryFn: () => client.listMappings(),\n\t});\n\tconst entitySets = useQuery({\n\t\tqueryKey: importhubKeys.entitySets(workspaceId),\n\t\tqueryFn: () => client.listEntitySets(),\n\t});\n\n\tconst form = useForm<ProfileValues>({ defaultValues: valuesOf(profile.content) });\n\tconst { reset, formState } = form;\n\t// A newer draft from the server (a save, a refetch) becomes the baseline\n\t// unless the admin is in the middle of an edit.\n\tuseEffect(() => {\n\t\tif (!formState.isDirty) reset(valuesOf(profile.content));\n\t}, [profile, reset, formState.isDirty]);\n\n\tconst save = useMutation({\n\t\tmutationFn: (values: ProfileValues) =>\n\t\t\tclient.updateImportProfile(profile.id, contentOf(values), profile.state.draftRevisionId),\n\t\tonSuccess: (saved) => {\n\t\t\tqueryClient.setQueryData(importhubKeys.importProfile(workspaceId, saved.id), saved);\n\t\t\treset(valuesOf(saved.content));\n\t\t\tvoid queryClient.invalidateQueries({ queryKey: importhubKeys.importProfiles(workspaceId) });\n\t\t},\n\t});\n\tconst onSave = form.handleSubmit((values) => save.mutate(values));\n\n\tconst name = useWatch({ control: form.control, name: \"name\" });\n\n\tusePageRail(\n\t\tcanConfigure ? (\n\t\t\t<ContextRail storageKey=\"importhub.profile.rail\">\n\t\t\t\t<ContextRail.Header title={t(\"rail.title\")} />\n\t\t\t\t<ContextRail.Section id=\"actions\" label={t(\"rail.actions\")}>\n\t\t\t\t\t<ContextRail.IconButton\n\t\t\t\t\t\tlabel={t(\"profiles.delete\")}\n\t\t\t\t\t\ticon={<Trash2 size={16} />}\n\t\t\t\t\t\ttone=\"outline-red\"\n\t\t\t\t\t\tonClick={() => setDeleting(true)}\n\t\t\t\t\t/>\n\t\t\t\t</ContextRail.Section>\n\t\t\t</ContextRail>\n\t\t) : null,\n\t);\n\n\treturn (\n\t\t<DetailPageTemplate\n\t\t\ttitle={profile.content.name}\n\t\t\tbreadcrumbs={[{ label: t(\"section.profiles.title\"), to: paths.profiles }]}\n\t\t\tbadges={\n\t\t\t\t<HStack gap=\"2\">\n\t\t\t\t\t<StatusBadge\n\t\t\t\t\t\ttone={profile.validity.valid ? \"success\" : \"danger\"}\n\t\t\t\t\t\tlabel={profile.validity.valid ? t(\"validity.valid\") : t(\"validity.invalid\")}\n\t\t\t\t\t/>\n\t\t\t\t\t<Badge>{releaseLabel(profile.state, t)}</Badge>\n\t\t\t\t</HStack>\n\t\t\t}\n\t\t\tactions={\n\t\t\t\tcanConfigure ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"solid\"\n\t\t\t\t\t\tdisabled={!formState.isDirty}\n\t\t\t\t\t\tloading={save.isPending}\n\t\t\t\t\t\tonClick={() => void onSave()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(\"common.save\")}\n\t\t\t\t\t</Button>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t>\n\t\t\t<Box px=\"8\" py=\"6\">\n\t\t\t\t{/* The lists the settings name things from: until they are read, a\n\t\t\t\t step would show as unknown and the Entity Set as its id. */}\n\t\t\t\t{processors.isPending || mappings.isPending || entitySets.isPending ? (\n\t\t\t\t\t<Loading />\n\t\t\t\t) : (\n\t\t\t\t\t<FormProvider {...form}>\n\t\t\t\t\t\t<form\n\t\t\t\t\t\t\tonSubmit={(e) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\tif (canConfigure) void onSave();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t\t\t\t<ValidityAlert validity={profile.validity} />\n\t\t\t\t\t\t\t\t{save.isError ? (\n\t\t\t\t\t\t\t\t\t<Alert status=\"error\" colorPalette=\"danger\" title={t(\"save.failed\")}>\n\t\t\t\t\t\t\t\t\t\t{save.error.message}\n\t\t\t\t\t\t\t\t\t</Alert>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t<Card title={t(\"profiles.general\")}>\n\t\t\t\t\t\t\t\t\t<Stack gap=\"4\">\n\t\t\t\t\t\t\t\t\t\t<InputField<ProfileValues>\n\t\t\t\t\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\t\t\t\t\tlabel={t(\"fields.name\")}\n\t\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<TextareaField<ProfileValues>\n\t\t\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\t\t\tlabel={t(\"fields.description\")}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<BaseSelectField<ProfileValues>\n\t\t\t\t\t\t\t\t\t\t\tname=\"entitySetId\"\n\t\t\t\t\t\t\t\t\t\t\tlabel={t(\"profiles.entitySet\")}\n\t\t\t\t\t\t\t\t\t\t\thelperText={t(\"profiles.entitySetHelp\")}\n\t\t\t\t\t\t\t\t\t\t\tplaceholder={t(\"profiles.noEntitySet\")}\n\t\t\t\t\t\t\t\t\t\t\toptions={(entitySets.data ?? []).map((e) => ({\n\t\t\t\t\t\t\t\t\t\t\t\tid: e.id,\n\t\t\t\t\t\t\t\t\t\t\t\tlabel: e.content.name,\n\t\t\t\t\t\t\t\t\t\t\t}))}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<SwitchField<ProfileValues>\n\t\t\t\t\t\t\t\t\t\t\tname=\"autoPublish\"\n\t\t\t\t\t\t\t\t\t\t\tlabel={t(\"profiles.autoPublish\")}\n\t\t\t\t\t\t\t\t\t\t\thelperText={t(\"profiles.autoPublishHelp\")}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<SwitchField<ProfileValues>\n\t\t\t\t\t\t\t\t\t\t\tname=\"deleteSourceFileOnSuccess\"\n\t\t\t\t\t\t\t\t\t\t\tlabel={t(\"profiles.deleteOnSuccess\")}\n\t\t\t\t\t\t\t\t\t\t\thelperText={t(\"profiles.deleteOnSuccessHelp\")}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!canConfigure}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t<Card title={t(\"profiles.preprocessors\")}>\n\t\t\t\t\t\t\t\t\t<StepsField\n\t\t\t\t\t\t\t\t\t\tname=\"preprocessors\"\n\t\t\t\t\t\t\t\t\t\tkind=\"preprocessor\"\n\t\t\t\t\t\t\t\t\t\tcatalogue={processors.data ?? []}\n\t\t\t\t\t\t\t\t\t\teditable={canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t<Card title={t(\"profiles.mappings\")}>\n\t\t\t\t\t\t\t\t\t<MappingsField\n\t\t\t\t\t\t\t\t\t\tmappings={(mappings.data ?? []).map((m) => ({\n\t\t\t\t\t\t\t\t\t\t\tid: m.id,\n\t\t\t\t\t\t\t\t\t\t\tname: m.content.name,\n\t\t\t\t\t\t\t\t\t\t\tvalid: m.validity.valid,\n\t\t\t\t\t\t\t\t\t\t}))}\n\t\t\t\t\t\t\t\t\t\teditable={canConfigure}\n\t\t\t\t\t\t\t\t\t\threfOf={(mappingId) => itemPath(paths, \"mappings\", mappingId)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t\t<Card title={t(\"profiles.postProcessors\")}>\n\t\t\t\t\t\t\t\t\t<StepsField\n\t\t\t\t\t\t\t\t\t\tname=\"postProcessors\"\n\t\t\t\t\t\t\t\t\t\tkind=\"post_processor\"\n\t\t\t\t\t\t\t\t\t\tcatalogue={processors.data ?? []}\n\t\t\t\t\t\t\t\t\t\teditable={canConfigure}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</FormProvider>\n\t\t\t\t)}\n\t\t\t</Box>\n\t\t\t<DeleteDialog\n\t\t\t\topen={deleting}\n\t\t\t\tonClose={() => setDeleting(false)}\n\t\t\t\ttitle={t(\"profiles.deleteTitle\", { name: name || profile.content.name })}\n\t\t\t\tmessage={t(\"profiles.deleteMessage\")}\n\t\t\t\tonDelete={() => client.deleteImportProfile(profile.id)}\n\t\t\t\tonDeleted={() => {\n\t\t\t\t\tsetDeleting(false);\n\t\t\t\t\tqueryClient.removeQueries({\n\t\t\t\t\t\tqueryKey: importhubKeys.importProfile(workspaceId, profile.id),\n\t\t\t\t\t});\n\t\t\t\t\tvoid queryClient.invalidateQueries({\n\t\t\t\t\t\tqueryKey: importhubKeys.importProfiles(workspaceId),\n\t\t\t\t\t});\n\t\t\t\t\tonDeleted();\n\t\t\t\t}}\n\t\t\t/>\n\t\t</DetailPageTemplate>\n\t);\n}\n\n/**\n * A Profile's Preprocessors or Post-processors: the Processors of that kind\n * that work on the whole Source File are offered (a rich-text field's are a\n * Mapping's, ADR 0007), and each step's settings open in a dialog.\n */\nfunction StepsField({\n\tname,\n\tkind,\n\tcatalogue,\n\teditable,\n}: {\n\tname: \"preprocessors\" | \"postProcessors\";\n\tkind: ProcessorKind;\n\tcatalogue: Processor[];\n\teditable: boolean;\n}) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { control, setValue } = useFormContextTyped();\n\tconst steps = useWatch({ control, name }) ?? [];\n\tconst [open, setOpen] = useState<number | null>(null);\n\tconst set = (next: ProcessorStep[]) => setValue(name, next, { shouldDirty: true });\n\tconst processorOf = (step: ProcessorStep) => catalogue.find((p) => p.name === step.processor);\n\tconst openStep = open === null ? undefined : steps[open];\n\tconst offered = catalogue.filter((p) => p.kind === kind && p.target === \"source_file\");\n\treturn (\n\t\t<>\n\t\t\t<OrderedList<ProcessorStep>\n\t\t\t\titems={steps}\n\t\t\t\tnameOf={(s) => s.processor}\n\t\t\t\teditable={editable}\n\t\t\t\tonChange={set}\n\t\t\t\temptyLabel={t(\n\t\t\t\t\tkind === \"preprocessor\" ? \"profiles.noPreprocessors\" : \"profiles.noPostProcessors\",\n\t\t\t\t)}\n\t\t\t\taddLabel={t(\n\t\t\t\t\tkind === \"preprocessor\" ? \"profiles.addPreprocessor\" : \"profiles.addPostProcessor\",\n\t\t\t\t)}\n\t\t\t\taddOptions={offered.map((p) => ({ value: p.name, label: p.name }))}\n\t\t\t\tonAdd={(processor) => {\n\t\t\t\t\tset([...steps, { processor, settings: {} }]);\n\t\t\t\t\t// A Processor with settings opens them at once: most need some.\n\t\t\t\t\tif ((offered.find((p) => p.name === processor)?.settingsSpec.length ?? 0) > 0) {\n\t\t\t\t\t\tsetOpen(steps.length);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\trenderItem={(step, index) => {\n\t\t\t\t\tconst p = processorOf(step);\n\t\t\t\t\tconst count = Object.keys(step.settings).length;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<HStack justify=\"space-between\" gap=\"3\">\n\t\t\t\t\t\t\t<Stack gap=\"0\" minW=\"0\">\n\t\t\t\t\t\t\t\t<Text fontFamily=\"mono\" fontSize=\"sm\">\n\t\t\t\t\t\t\t\t\t{step.processor}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t<Text color=\"fg.muted\" fontSize=\"sm\">\n\t\t\t\t\t\t\t\t\t{p ? p.description : t(\"processors.unknown\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t{p && p.settingsSpec.length > 0 ? (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tonClick={() => setOpen(index)}\n\t\t\t\t\t\t\t\t\taria-label={t(editable ? \"processors.configure\" : \"processors.viewSettings\", {\n\t\t\t\t\t\t\t\t\t\tname: step.processor,\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Settings2 size={14} aria-hidden />\n\t\t\t\t\t\t\t\t\t{t(\"processors.settingsCount\", { count })}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<ProcessorSettingsDialog\n\t\t\t\topen={openStep !== undefined}\n\t\t\t\tonClose={() => setOpen(null)}\n\t\t\t\tprocessor={openStep ? (processorOf(openStep) ?? null) : null}\n\t\t\t\tsettings={openStep?.settings ?? EMPTY}\n\t\t\t\treadOnly={!editable}\n\t\t\t\tonApply={(settings) => {\n\t\t\t\t\tif (open === null) return;\n\t\t\t\t\tset(steps.map((s, i) => (i === open ? { ...s, settings } : s)));\n\t\t\t\t\tsetOpen(null);\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nconst EMPTY: Record<string, unknown> = {};\n\n/** The Mappings a Profile includes, in the order they run, each a link to its page. */\nfunction MappingsField({\n\tmappings,\n\teditable,\n\threfOf,\n}: {\n\tmappings: { id: string; name: string; valid: boolean }[];\n\teditable: boolean;\n\threfOf: (id: string) => string;\n}) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { control, setValue } = useFormContextTyped();\n\tconst ids = useWatch({ control, name: \"mappingIds\" }) ?? [];\n\tconst byId = useMemo(() => new Map(mappings.map((m) => [m.id, m])), [mappings]);\n\tconst set = (next: string[]) => setValue(\"mappingIds\", next, { shouldDirty: true });\n\tconst nameOf = (id: string) => byId.get(id)?.name ?? t(\"profiles.missingMapping\");\n\treturn (\n\t\t<OrderedList<string>\n\t\t\titems={ids}\n\t\t\tnameOf={nameOf}\n\t\t\teditable={editable}\n\t\t\tonChange={set}\n\t\t\temptyLabel={t(\"profiles.noMappings\")}\n\t\t\taddLabel={t(\"profiles.addMapping\")}\n\t\t\taddOptions={mappings\n\t\t\t\t.filter((m) => !ids.includes(m.id))\n\t\t\t\t.map((m) => ({ value: m.id, label: m.name }))}\n\t\t\tonAdd={(mappingId) => set([...ids, mappingId])}\n\t\t\trenderItem={(mappingId) => {\n\t\t\t\tconst m = byId.get(mappingId);\n\t\t\t\tif (!m) return <Text color=\"fg.muted\">{t(\"profiles.missingMapping\")}</Text>;\n\t\t\t\treturn (\n\t\t\t\t\t<HStack gap=\"2\">\n\t\t\t\t\t\t<Link asChild>\n\t\t\t\t\t\t\t<RouterLink to={hrefOf(m.id)}>{m.name}</RouterLink>\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t{m.valid ? null : <StatusBadge tone=\"danger\" label={t(\"validity.invalid\")} />}\n\t\t\t\t\t</HStack>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nconst useFormContextTyped = () => useFormContext<ProfileValues>();\n","import { Button } from \"@knkcs/anker/atoms\";\nimport { DataTable, LinkCell, TruncatedTextCell } from \"@knkcs/anker/components\";\nimport { useHostIdentity } from \"@knkcs/anker/host\";\nimport { IndexPageTemplate } from \"@knkcs/anker/templates\";\nimport { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport type { ColumnDef } from \"@tanstack/react-table\";\nimport { Plus } from \"lucide-react\";\nimport { useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { ImporthubClient, ImportProfile } from \"../../client/importhub-client\";\nimport { CreateDialog } from \"../../common/create-dialog\";\nimport { itemPath, useImporthubHost } from \"../../common/host\";\nimport { importhubKeys } from \"../../common/query-keys\";\nimport { LoadFailed } from \"../../common/query-state\";\nimport { useCanConfigure } from \"../../common/use-can-configure\";\nimport { releaseLabel, ValidityCell } from \"../../common/validity\";\nimport { IMPORTHUB_UI_NS } from \"../../i18n/resources\";\n\nexport interface ImportProfilesIndexProps {\n\tclient: ImporthubClient;\n\t/** Opens an Import Profile's page: the host navigates, after a create too. */\n\tonOpen: (id: string) => void;\n}\n\n// DataTable takes rows that are records.\ntype Row = ImportProfile & Record<string, unknown>;\n\n/**\n * Every Import Profile of the workspace, with its validity and its latest\n * Release (manage-import-profiles:AC1, AC6); an admin creates one from the\n * header (AC2).\n */\nexport function ImportProfilesIndex({ client, onOpen }: ImportProfilesIndexProps) {\n\tconst { t } = useTranslation(IMPORTHUB_UI_NS);\n\tconst { workspaceId } = useHostIdentity();\n\tconst { paths } = useImporthubHost();\n\tconst canConfigure = useCanConfigure();\n\tconst queryClient = useQueryClient();\n\tconst [creating, setCreating] = useState(false);\n\tconst query = useQuery({\n\t\tqueryKey: importhubKeys.importProfiles(workspaceId),\n\t\tqueryFn: () => client.listImportProfiles(),\n\t});\n\tconst columns = useMemo<ColumnDef<Row, unknown>[]>(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: \"name\",\n\t\t\t\theader: t(\"fields.name\"),\n\t\t\t\tcell: (c) => (\n\t\t\t\t\t<LinkCell\n\t\t\t\t\t\tto={itemPath(paths, \"profiles\", c.row.original.id)}\n\t\t\t\t\t\tlabel={c.row.original.content.name}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"validity\",\n\t\t\t\theader: t(\"validity.column\"),\n\t\t\t\tcell: (c) => <ValidityCell validity={c.row.original.validity} />,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"release\",\n\t\t\t\theader: t(\"release.column\"),\n\t\t\t\tsize: 140,\n\t\t\t\tcell: (c) => <TruncatedTextCell value={releaseLabel(c.row.original.state, t)} />,\n\t\t\t},\n\t\t],\n\t\t[t, paths],\n\t);\n\treturn (\n\t\t<IndexPageTemplate\n\t\t\ttitle={t(\"section.profiles.title\")}\n\t\t\tactions={\n\t\t\t\tcanConfigure ? (\n\t\t\t\t\t<Button variant=\"solid\" onClick={() => setCreating(true)}>\n\t\t\t\t\t\t<Plus size={16} aria-hidden />\n\t\t\t\t\t\t{t(\"profiles.new\")}\n\t\t\t\t\t</Button>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t>\n\t\t\t{query.isError ? (\n\t\t\t\t<LoadFailed />\n\t\t\t) : (\n\t\t\t\t<DataTable\n\t\t\t\t\tcolumns={columns}\n\t\t\t\t\tdata={(query.data ?? []) as Row[]}\n\t\t\t\t\tloading={query.isPending}\n\t\t\t\t\tgetRowId={(p) => p.id}\n\t\t\t\t\temptyState={t(\"profiles.empty\")}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<CreateDialog\n\t\t\t\topen={creating}\n\t\t\t\tonClose={() => setCreating(false)}\n\t\t\t\ttitle={t(\"profiles.new\")}\n\t\t\t\tonCreate={async ({ name, description }) => {\n\t\t\t\t\tconst p = await client.createImportProfile({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tdescription,\n\t\t\t\t\t\tentitySetId: \"\",\n\t\t\t\t\t\tpreprocessors: [],\n\t\t\t\t\t\tmappingIds: [],\n\t\t\t\t\t\tpostProcessors: [],\n\t\t\t\t\t\tautoPublish: false,\n\t\t\t\t\t\tdeleteSourceFileOnSuccess: false,\n\t\t\t\t\t});\n\t\t\t\t\tawait queryClient.invalidateQueries({\n\t\t\t\t\t\tqueryKey: importhubKeys.importProfiles(workspaceId),\n\t\t\t\t\t});\n\t\t\t\t\treturn p.id;\n\t\t\t\t}}\n\t\t\t\tonCreated={(id) => {\n\t\t\t\t\tsetCreating(false);\n\t\t\t\t\tonOpen(id);\n\t\t\t\t}}\n\t\t\t/>\n\t\t</IndexPageTemplate>\n\t);\n}\n"],"names":["file_importhub_v1_configuration","fileDesc","file_google_protobuf_timestamp","ConfigurationInUseSchema","messageDesc","file_importhub_v1_entity_set","EntitySetService","serviceDesc","file_importhub_v1_import_profile","file_google_protobuf_struct","ImportProfileContentSchema","ProcessorStepSchema","ImportProfileService","file_importhub_v1_mapping","MappingContentSchema","MappingService","file_importhub_v1_processor","ProcessorKind","ProcessorTarget","ProcessorService","validityOf","v","r","stateOf","s","stepOf","stepPb","profileOf","p","c","profileContentPb","create","mappingOf","m","content","toJson","mappingContentPb","fromJson","entitySetOf","translate","err","e","ConnectError","Code","inUse","ConfigurationInUseError","NameTakenError","call","run","createConnectImporthubClient","options","transport","createConnectTransport","profiles","createClient","processors","mappings","entitySets","id","requireMessage","draftRevisionId","blueprintReleaseId","res","IMPORTHUB_UI_NS","i18nResources","en","de","IMPORTHUB_SECTIONS","itemPath","paths","section","STANDALONE_IMPORTHUB_PATHS","DEFAULT_HOST","HostContext","createContext","ImporthubHostProvider","host","children","useImporthubHost","useContext","ChangeSetLink","changeSetId","t","useTranslation","href","Link","jsx","ExternalLink","importhubKeys","workspaceId","blueprintId","IMPORTHUB_SECTION_ICONS","FileUp","FileCog","Waypoints","Ampersand","Blocks","ImporthubStartPage","client","Icon","IndexPageTemplate","Box","EmptyState","SectionSummary","CountSummary","NothingYet","Fragment","queryKey","read","useHostIdentity","query","useQuery","Spinner","DeleteDialog","open","onClose","title","message","onDelete","onDeleted","del","useMutation","reset","useEffect","refusal","Modal","jsxs","HStack","Button","Stack","Text","Alert","List","RouterLink","Loading","Center","LoadFailed","CircleAlert","useCanConfigure","ValidityAlert","validity","TONES","ValidityCell","StatusBadgeCell","releaseLabel","state","valuesOf","a","b","name","text","contentOf","EntitySetDetail","DetailPageTemplate","EntitySetPage","entitySet","canConfigure","queryClient","useQueryClient","deleting","setDeleting","useState","form","useForm","formState","control","rows","useFieldArray","save","values","saved","onSave","usePageRail","ContextRail","Trash2","StatusBadge","Badge","FormProvider","Card","InputField","TextareaField","row","index","Grid","IconButton","Plus","CreateDialog","defaultValues","onCreate","onCreated","resetCreate","submit","EntitySetsIndex","onOpen","creating","setCreating","columns","useMemo","LinkCell","CountCell","TruncatedTextCell","DataTable","description","useBlueprintNames","blueprintIds","blueprints","unique","list","releases","useQueries","releaseData","releasesKey","uniqueKey","releaseId","MoveReleaseDialog","mapping","onMove","useWatch","check","move","resetCheck","resetMove","checkedId","report","ReleaseField","CheckReport","BaseSelectField","lost","LostList","label","base","MappingDetail","MappingPage","moving","setMoving","names","blueprintName","release","fieldCount","Fact","ArrowRightLeft","BlueprintFields","BlueprintSelects","setValue","useFormContext","previous","useRef","CREATE_DEFAULTS","MappingsIndex","CodeCell","ProcessorCatalogue","SlugCell","f","moved","from","to","next","item","OrderedList","items","renderItem","nameOf","editable","onChange","emptyLabel","addLabel","addOptions","onAdd","ArrowUp","ArrowDown","_","i","MenuRoot","d","MenuTrigger","MenuContent","o","MenuItem","NO_SETTINGS","ProcessorSettingsDialog","processor","settings","readOnly","onApply","spec","resolver","zodResolver","specToZodSchema","builtInFieldTypes","apply","FieldKitProvider","SpecForm","ImportProfileDetail","ProfilePage","profile","SwitchField","StepsField","MappingsField","mappingId","kind","catalogue","useFormContextTyped","steps","setOpen","set","processorOf","step","openStep","offered","count","Settings2","EMPTY","hrefOf","ids","byId","ImportProfilesIndex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaO,MAAMA,KACX,gBAAAC,GAAS,+jDAA+jD,CAACC,EAA8B,CAAC,GAwS7lDC,KACX,gBAAAC,GAAYJ,IAAiC,CAAC,GCxSnCK,KACX,gBAAAJ,GAAS,o4HAAo4H,CAACC,IAAgCF,EAA+B,CAAC,GAqhBn8HM,KAkHX,gBAAAC,GAAYF,IAA8B,CAAC,GCxoBhCG,KACX,gBAAAP,GAAS,uhJAAuhJ,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