@voplus/morpho-csp 11.2.8 → 11.3.0-dev.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/es/components/LegalContactSelect/index.d.ts +7 -0
- package/es/components/LegalContactSelect/index.js +127 -12
- package/es/components/LegalContactSelect/index.js.map +1 -1
- package/es/data/clda-form/conversion.d.ts +9 -6
- package/es/data/clda-form/conversion.js +11 -18
- package/es/data/clda-form/conversion.js.map +1 -1
- package/es/data/clda-form/identityAdapter.d.ts +60 -0
- package/es/data/clda-form/identityAdapter.js +196 -0
- package/es/data/clda-form/identityAdapter.js.map +1 -0
- package/es/data/clda-form/interfaces.d.ts +20 -1
- package/es/data/clda-form/saveFormDraft.d.ts +4 -0
- package/es/data/clda-form/saveFormDraft.js +21 -0
- package/es/data/clda-form/saveFormDraft.js.map +1 -0
- package/es/data/clda-form/types.d.ts +31 -2
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.d.ts +35 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.js +53 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/IdentityShapeFields.js.map +1 -0
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/index.js +41 -15
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/index.js.map +1 -1
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.d.ts +59 -1
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.js +244 -15
- package/es/modules/corporate/background-investigation/risk-profile/components/IdentityProperties/state.js.map +1 -1
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.d.ts +5 -0
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js +13 -7
- package/es/modules/corporate/company/components/CorporateOfficerSelect/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.js +20 -24
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step3.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.js +38 -11
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/Step4.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.d.ts +3 -3
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.d.ts +25 -4
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.js +88 -5
- package/es/modules/corporate/company/identity/components/NewLegalContactDialog/state.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.d.ts +13 -0
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.js +20 -0
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/DialogShell.js.map +1 -0
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page1.js +28 -28
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page1.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page2.js +3 -4
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page2.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page3.js +16 -9
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page3.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.js +128 -61
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page4.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.d.ts +2 -2
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.js +119 -24
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/Page5.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.d.ts +0 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.js +16 -8
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/index.js.map +1 -1
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.d.ts +274 -23
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.js +560 -210
- package/es/modules/corporate/company/identity/components/SelectLegalContactDialog/state.js.map +1 -1
- package/es/modules/corporate/components/CorporateSelect/index.d.ts +12 -1
- package/es/modules/corporate/components/CorporateSelect/index.js +19 -5
- package/es/modules/corporate/components/CorporateSelect/index.js.map +1 -1
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeReminderScheduleList/index.js +9 -6
- package/es/modules/corporate/filing-record/filing-type/components/FilingTypeReminderScheduleList/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/AppointOfficer/index.d.ts +6 -1
- package/es/modules/corporate/legal-generation/components/AppointOfficer/index.js +3 -2
- package/es/modules/corporate/legal-generation/components/AppointOfficer/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.d.ts +6 -1
- package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.js +3 -2
- package/es/modules/corporate/legal-generation/components/CorporateRepresentative/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/IssueShares/Fields.js +3 -3
- package/es/modules/corporate/legal-generation/components/IssueShares/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/IssueShares/interface.d.ts +1 -1
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.d.ts +16 -1
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.js +27 -9
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/PowerOfAttroney/interface.d.ts +5 -2
- package/es/modules/corporate/legal-generation/components/ResignationLetter/Fields.js +1 -1
- package/es/modules/corporate/legal-generation/components/ResignationLetter/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.d.ts +13 -1
- package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.js +24 -6
- package/es/modules/corporate/legal-generation/components/ShareTransfer/Fields.js.map +1 -1
- package/es/modules/corporate/legal-generation/components/ShareTransfer/interface.d.ts +5 -2
- package/es/modules/corporate/legal-generation/components/SubmitButton/index.d.ts +11 -3
- package/es/modules/corporate/legal-generation/components/SubmitButton/index.js +9 -3
- package/es/modules/corporate/legal-generation/components/SubmitButton/index.js.map +1 -1
- package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.d.ts +31 -2
- package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.js +52 -37
- package/es/modules/corporate/legal-generation/fields/AppointOfficerFields.js.map +1 -1
- package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.d.ts +27 -2
- package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.js +78 -21
- package/es/modules/corporate/legal-generation/fields/CorporateRepresentativeFields.js.map +1 -1
- package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.d.ts +17 -0
- package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.js +36 -0
- package/es/modules/corporate/legal-generation/fields/ParentCompanyDetailsFields.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.d.ts +11 -0
- package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.js +25 -0
- package/es/modules/corporate/legal-generation/fields/renderCapturedIdentityColumn.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/index.d.ts +7 -0
- package/es/modules/corporate/legal-generation/fields/state/index.js +5 -0
- package/es/modules/corporate/legal-generation/fields/state/index.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/types.d.ts +37 -0
- package/es/modules/corporate/legal-generation/fields/state/types.js +27 -0
- package/es/modules/corporate/legal-generation/fields/state/types.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.d.ts +28 -0
- package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.js +45 -0
- package/es/modules/corporate/legal-generation/fields/state/useCapturedIdentityField.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.d.ts +31 -0
- package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.js +47 -0
- package/es/modules/corporate/legal-generation/fields/state/useIdentityShapeCapture.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.d.ts +35 -0
- package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.js +36 -0
- package/es/modules/corporate/legal-generation/fields/state/useLegalGenerationIdentityCapture.js.map +1 -0
- package/es/modules/corporate/legal-generation/fields/state/useOperateField.d.ts +15 -0
- package/es/modules/corporate/legal-generation/fields/state/useOperateField.js +27 -0
- package/es/modules/corporate/legal-generation/fields/state/useOperateField.js.map +1 -0
- package/es/modules/corporate/legal-generation/form/AppointOfficerForm.d.ts +18 -9
- package/es/modules/corporate/legal-generation/form/AppointOfficerForm.js +130 -28
- package/es/modules/corporate/legal-generation/form/AppointOfficerForm.js.map +1 -1
- package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.d.ts +27 -17
- package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.js +112 -24
- package/es/modules/corporate/legal-generation/form/CorporateRepresentativeForm.js.map +1 -1
- package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.d.ts +637 -0
- package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.js +840 -0
- package/es/modules/corporate/legal-generation/form/legalGenerationSubmit.js.map +1 -0
- package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.d.ts +23 -0
- package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.js +55 -0
- package/es/modules/corporate/legal-generation/form/useLegalGenerationDocument.js.map +1 -0
- package/es/modules/corporate/legal-generation/pages/CorporateLegalGeneration/index.js +38 -8
- package/es/modules/corporate/legal-generation/pages/CorporateLegalGeneration/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/CLDAContactList/index.js +50 -33
- package/es/modules/self-registration/clda-form/components/CLDAContactList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/ContactFields/index.d.ts +5 -2
- package/es/modules/self-registration/clda-form/components/ContactFields/index.js +6 -3
- package/es/modules/self-registration/clda-form/components/ContactFields/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/DataProtectionOfficer/NewDPODialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/NewDirectorDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/NewSecretaryDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js +7 -18
- package/es/modules/self-registration/clda-form/components/NewShareholderDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/components/useContactEditSession.d.ts +35 -0
- package/es/modules/self-registration/clda-form/components/useContactEditSession.js +51 -0
- package/es/modules/self-registration/clda-form/components/useContactEditSession.js.map +1 -0
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.js +60 -12
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js +3 -5
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/components/NewOfficerDetailList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js +7 -21
- package/es/modules/self-registration/clda-form/incorporation/appoint-representative/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js +6 -5
- package/es/modules/self-registration/clda-form/incorporation/company-general/CompanyGeneralForm.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js +23 -28
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddAllotmentDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js +11 -24
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddBankOpeningDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js +13 -8
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddDivideDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js +11 -24
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddOfficerDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.js +18 -9
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRedonminationDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js +11 -24
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddRemoveOfficerDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js +23 -28
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AddTransferDialog/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js +81 -14
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js +11 -15
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/AllotmentList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js +34 -5
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningContactItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js +4 -5
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/BankOpeningList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js +5 -4
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/CapitalReceiptSelect/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js +32 -12
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/OfficerDetailItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.d.ts +2 -3
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js +80 -13
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferItem/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.d.ts +1 -2
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js +7 -9
- package/es/modules/self-registration/clda-form/incorporation/company-general/components/TransferList/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.d.ts +3 -0
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js +4 -2
- package/es/modules/self-registration/clda-form/incorporation/components/FormContactEditor/index.js.map +1 -1
- package/es/modules/self-registration/clda-form/pages/CLDAFormDefaultView/Content.js +16 -1
- package/es/modules/self-registration/clda-form/pages/CLDAFormDefaultView/Content.js.map +1 -1
- package/es/routes.d.ts +1 -1
- package/es/routes.js +4 -2
- package/es/routes.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
import { ApiEndPoint } from "@voplus/api";
|
|
2
|
+
import type { IIdentityShape } from "@voplus/morpho-compliance/es/data/identityShape";
|
|
3
|
+
import type { IAddress } from "@voplus/morpho-ui/es/data";
|
|
4
|
+
import type { Dayjs } from "dayjs";
|
|
5
|
+
import type { IIdentityCapture } from "../fields/state";
|
|
6
|
+
/** The route a legal-generation form's composed payload is posted to (spec:3850). */
|
|
7
|
+
export declare const LEGAL_GENERATION_SUBMIT_ROUTE = "/api/document-assistants/legal-generation/submit";
|
|
8
|
+
/** The existing gallery templates support exactly these appointment positions. */
|
|
9
|
+
export declare const SUPPORTED_OFFICER_POSITIONS: readonly ["Director", "Secretary"];
|
|
10
|
+
/** Reports whether an input position is supported by the existing gallery templates. */
|
|
11
|
+
export declare function isSupportedOfficerPosition(position?: string): boolean;
|
|
12
|
+
/** The two branches a legal-generation form can submit (spec:1930). */
|
|
13
|
+
export type LegalGenerationMode = "select-existing" | "manual";
|
|
14
|
+
/**
|
|
15
|
+
* The frozen identity-shape snapshot as the submit contract carries it: the shape's `source`,
|
|
16
|
+
* `name`, `family`, `subject` and its three per-field policies, copied onto the payload at capture
|
|
17
|
+
* time. It is built from the capture, never from a catalog lookup (spec:3848).
|
|
18
|
+
*/
|
|
19
|
+
export interface ILegalGenerationShapeSnapshot {
|
|
20
|
+
/** The shape's `source` — built-ins are 1-3 (spec:3712). */
|
|
21
|
+
sourceNumber: number;
|
|
22
|
+
/** The frozen display name shown for the captured shape. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** The frozen document family. */
|
|
25
|
+
family: IIdentityShape["family"];
|
|
26
|
+
/** The frozen subject applicability. */
|
|
27
|
+
subject: IIdentityShape["subject"];
|
|
28
|
+
/** The frozen alias policy. */
|
|
29
|
+
aliasPolicy: IIdentityShape["policies"]["alias"];
|
|
30
|
+
/** The frozen issuing-country policy. */
|
|
31
|
+
issuingCountryPolicy: IIdentityShape["policies"]["issuingCountry"];
|
|
32
|
+
/** The frozen expiry-date policy. */
|
|
33
|
+
expiryPolicy: IIdentityShape["policies"]["expiryDate"];
|
|
34
|
+
}
|
|
35
|
+
/** The identity values a manual person supplied, honouring the captured shape's policies. */
|
|
36
|
+
export interface ILegalGenerationIdentityValues {
|
|
37
|
+
/** The typed full name. */
|
|
38
|
+
fullName?: string;
|
|
39
|
+
/** The typed document number. */
|
|
40
|
+
number?: string;
|
|
41
|
+
/** The typed nationality / issuing country of the document. */
|
|
42
|
+
country?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Captured alias — present only where the captured shape does not omit it. A save writes `null`
|
|
45
|
+
* to clear an alias the replacement shape no longer captures (spec:3713).
|
|
46
|
+
*/
|
|
47
|
+
alias?: string | null;
|
|
48
|
+
/** Captured issuing country — present only where the captured shape does not omit it. */
|
|
49
|
+
issuingCountry?: string | null;
|
|
50
|
+
/** Captured expiry date — present only where the captured shape does not omit it. */
|
|
51
|
+
expiryDate?: string | null;
|
|
52
|
+
}
|
|
53
|
+
/** The manual branch's person, as the submit contract carries it. */
|
|
54
|
+
export interface ILegalGenerationSubmitPerson {
|
|
55
|
+
/** The typed full name. */
|
|
56
|
+
name?: string;
|
|
57
|
+
/** The captured representative name used by the existing CHO template. */
|
|
58
|
+
representative?: string;
|
|
59
|
+
/** The captured representative document number used by the existing CHO template. */
|
|
60
|
+
representativePassport?: string;
|
|
61
|
+
/** The typed email. */
|
|
62
|
+
email?: string;
|
|
63
|
+
/** The typed contact number. */
|
|
64
|
+
phone?: string;
|
|
65
|
+
/** The person kind this manual branch captures. */
|
|
66
|
+
type?: "Person" | "Organization";
|
|
67
|
+
/** The officer types the manual branch picked. */
|
|
68
|
+
types?: string[];
|
|
69
|
+
/** The typed address. */
|
|
70
|
+
address?: IAddress;
|
|
71
|
+
/** The typed identity values plus the values captured under the shape's policies. */
|
|
72
|
+
identity: ILegalGenerationIdentityValues;
|
|
73
|
+
/** The complete captured snapshot; omitted by a mode that captures no document type. */
|
|
74
|
+
identityShape?: ILegalGenerationShapeSnapshot;
|
|
75
|
+
}
|
|
76
|
+
/** 仅属于本份文书的母公司显示补丁:null/缺属性保留,空串清空。 */
|
|
77
|
+
export interface ILegalGenerationParentDetails {
|
|
78
|
+
/** 文书中的母公司名称。 */
|
|
79
|
+
name?: string | null;
|
|
80
|
+
/** 文书中的注册或证件号码。 */
|
|
81
|
+
number?: string | null;
|
|
82
|
+
/** 文书中的自由文本地址。 */
|
|
83
|
+
address?: string | null;
|
|
84
|
+
/** 文书中的邮箱显示值。 */
|
|
85
|
+
email?: string | null;
|
|
86
|
+
/** 文书中的电话显示值。 */
|
|
87
|
+
phone?: string | null;
|
|
88
|
+
}
|
|
89
|
+
/** 保存响应中用于重新编辑的母公司副本;身份成员与联系人 id 分开。 */
|
|
90
|
+
export interface ILegalGenerationParentData {
|
|
91
|
+
/** 已保存名称。 */
|
|
92
|
+
name?: string | null;
|
|
93
|
+
/** 已保存自由文本地址。 */
|
|
94
|
+
address?: string | null;
|
|
95
|
+
/** 已保存邮箱显示值。 */
|
|
96
|
+
email?: string | null;
|
|
97
|
+
/** 已保存电话显示值。 */
|
|
98
|
+
phone?: string | null;
|
|
99
|
+
/** 仅从转换后的身份对象读取号码。 */
|
|
100
|
+
identity?: {
|
|
101
|
+
number?: string | null;
|
|
102
|
+
} | null;
|
|
103
|
+
}
|
|
104
|
+
/** The submit request body. */
|
|
105
|
+
export interface ILegalGenerationSubmitBody {
|
|
106
|
+
/** The gallery document name, e.g. `"Appoint Officer"`. */
|
|
107
|
+
documentName: string;
|
|
108
|
+
/** The branch the user submitted. */
|
|
109
|
+
mode: LegalGenerationMode;
|
|
110
|
+
/** The picked entity's id in select-existing mode; `null` in manual mode. */
|
|
111
|
+
entityId: string | null;
|
|
112
|
+
/** The company the document is composed for. */
|
|
113
|
+
company?: {
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
/** The foreign parent, separate from the Singapore company and representative. */
|
|
118
|
+
parentCompany?: {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
};
|
|
122
|
+
/** The country of the foreign parent. */
|
|
123
|
+
parentCompanyCountry?: string;
|
|
124
|
+
/** 仅包含用户编辑的文书显示值,不携带原始 ParentCompanyData。 */
|
|
125
|
+
parentCompanyDetails?: ILegalGenerationParentDetails | null;
|
|
126
|
+
/** The date printed on the document (`YYYY-MM-DD`). */
|
|
127
|
+
documentDate: string | null;
|
|
128
|
+
/** The date the document takes effect (`YYYY-MM-DD`). */
|
|
129
|
+
effectiveDate: string | null;
|
|
130
|
+
/** The typed person in manual mode; `undefined` in select-existing mode. */
|
|
131
|
+
person?: ILegalGenerationSubmitPerson;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The branch-composed payload one legal-generation form's `onFinish` builds (spec:1930).
|
|
135
|
+
*
|
|
136
|
+
* Select-existing carries exactly one of the id members and no typed person value; manual carries
|
|
137
|
+
* the typed person values plus the capture seam's complete `Identity` snapshot and no id.
|
|
138
|
+
*/
|
|
139
|
+
export interface ILegalGenerationBranchValues {
|
|
140
|
+
/** The picked officer's id (AppointOfficer / PowerOfAttroney / ShareTransfer). */
|
|
141
|
+
OfficerId?: string;
|
|
142
|
+
/** The picked contact identity's id (CorporateRepresentative). */
|
|
143
|
+
IdentityId?: string;
|
|
144
|
+
/** The typed full name; the AppointOfficer branch calls it `FullName`. */
|
|
145
|
+
FullName?: string;
|
|
146
|
+
/** The typed full name; the CorporateRepresentative branch calls it `IdentityName`. */
|
|
147
|
+
IdentityName?: string;
|
|
148
|
+
/** The typed nationality of the person, where the branch captures one. */
|
|
149
|
+
Country?: string;
|
|
150
|
+
/** The officer type the manual branch picked. */
|
|
151
|
+
OfficerType?: string;
|
|
152
|
+
/** The typed email. */
|
|
153
|
+
Email?: string;
|
|
154
|
+
/** The typed contact number. */
|
|
155
|
+
Contact?: string;
|
|
156
|
+
/** The typed document number. */
|
|
157
|
+
IdentityNumber?: string | number;
|
|
158
|
+
/** The typed address. */
|
|
159
|
+
Address?: IAddress;
|
|
160
|
+
/** The picked shape's `source` number, mirrored from the capture seam (spec:1929). */
|
|
161
|
+
IdentityShape?: number;
|
|
162
|
+
/** The complete capture the seam wrote: the frozen shape plus the values captured under its policies (spec:3848). */
|
|
163
|
+
Identity?: IIdentityCapture;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* The company one submission is composed for: the camelCase `ICorporate` a form's Company picker
|
|
167
|
+
* hands over, or the PascalCase pair a reopened document's restore seeds.
|
|
168
|
+
*/
|
|
169
|
+
export interface ILegalGenerationCompany {
|
|
170
|
+
/** The corporate's id, as the picker's `ICorporate` carries it. */
|
|
171
|
+
id?: string;
|
|
172
|
+
/** The corporate's name, as the picker's `ICorporate` carries it. */
|
|
173
|
+
name?: string;
|
|
174
|
+
/** The corporate's id, as {@link ILegalGenerationRestoreValues.Company} carries it. */
|
|
175
|
+
Id?: string;
|
|
176
|
+
/** The corporate's name, as {@link ILegalGenerationRestoreValues.Company} carries it. */
|
|
177
|
+
Name?: string;
|
|
178
|
+
}
|
|
179
|
+
/** One legal-generation form submission: the document it is composed for plus the branch payload. */
|
|
180
|
+
export interface ILegalGenerationSubmission {
|
|
181
|
+
/** The gallery document name, e.g. `"Appoint Officer"`. */
|
|
182
|
+
documentName: string;
|
|
183
|
+
/** The branch the user submitted (spec:1930). */
|
|
184
|
+
mode: LegalGenerationMode;
|
|
185
|
+
/** The branch-composed payload (spec:1930). */
|
|
186
|
+
branch: ILegalGenerationBranchValues;
|
|
187
|
+
/** The company the document is composed for. */
|
|
188
|
+
company?: ILegalGenerationCompany;
|
|
189
|
+
/** The foreign parent, separate from the Singapore company and representative. */
|
|
190
|
+
parentCompany?: ILegalGenerationCompany;
|
|
191
|
+
/** The country of the foreign parent. */
|
|
192
|
+
parentCompanyCountry?: string;
|
|
193
|
+
/** 仅包含用户编辑的文书显示值,不携带原始 ParentCompanyData。 */
|
|
194
|
+
parentCompanyDetails?: ILegalGenerationParentDetails | null;
|
|
195
|
+
/** The date printed on the document, already normalised to `YYYY-MM-DD`. */
|
|
196
|
+
documentDate?: string;
|
|
197
|
+
/** The date the document takes effect, already normalised to `YYYY-MM-DD`. */
|
|
198
|
+
effectiveDate?: string;
|
|
199
|
+
}
|
|
200
|
+
/** The document the conversion produced, as the client needs it for the download action. */
|
|
201
|
+
export interface ILegalGenerationDocument {
|
|
202
|
+
/** The id of the persisted legal-generation form. */
|
|
203
|
+
id: string;
|
|
204
|
+
/** The document name. */
|
|
205
|
+
name: string;
|
|
206
|
+
/** The document's content type. */
|
|
207
|
+
contentType: string;
|
|
208
|
+
/** The relative route the document is downloaded from. */
|
|
209
|
+
downloadUrl: string;
|
|
210
|
+
}
|
|
211
|
+
/** The submit endpoint's success body. */
|
|
212
|
+
export interface ILegalGenerationSubmitResult {
|
|
213
|
+
/** The id of the persisted legal-generation form. */
|
|
214
|
+
id: string;
|
|
215
|
+
/** The CLDA meta key the backend resolved from the document name. */
|
|
216
|
+
metaKey: string;
|
|
217
|
+
/** The echoed document name. */
|
|
218
|
+
documentName: string;
|
|
219
|
+
/** The echoed branch. */
|
|
220
|
+
mode: LegalGenerationMode;
|
|
221
|
+
/** The persisted form content. */
|
|
222
|
+
content: ILegalGenerationFormContent;
|
|
223
|
+
/** The generated document. */
|
|
224
|
+
document: ILegalGenerationDocument;
|
|
225
|
+
}
|
|
226
|
+
/** The outcome of a submit handoff: the generated document, or the failure the form re-renders. */
|
|
227
|
+
export type ILegalGenerationHandoff = {
|
|
228
|
+
ok: true;
|
|
229
|
+
result: ILegalGenerationSubmitResult;
|
|
230
|
+
document: ILegalGenerationDocument;
|
|
231
|
+
} | {
|
|
232
|
+
ok: false;
|
|
233
|
+
message: string;
|
|
234
|
+
result?: ILegalGenerationSubmitResult;
|
|
235
|
+
document?: ILegalGenerationDocument;
|
|
236
|
+
};
|
|
237
|
+
/** The CLDA meta key every legal-generation submission persists under (contract §1). */
|
|
238
|
+
export declare const LEGAL_GENERATION_META_KEY = "CHO";
|
|
239
|
+
/** One form person as the persisted content carries it (camelCase read model of `FormPeopleOptions`). */
|
|
240
|
+
export interface ILegalGenerationFormPerson {
|
|
241
|
+
/** The form person's id — a contact id the document addresses its people by. */
|
|
242
|
+
id?: string;
|
|
243
|
+
/** `"NewId"` for a person the composition entered, `"ExistingContactId"` for one it picked. */
|
|
244
|
+
idType?: string;
|
|
245
|
+
/** The original picker id; distinct from the contact owner id. */
|
|
246
|
+
selectedEntityId?: string | null;
|
|
247
|
+
/** The exact identity captured for an existing selection. */
|
|
248
|
+
selectedIdentityId?: string | null;
|
|
249
|
+
/** The person's name. */
|
|
250
|
+
name?: string;
|
|
251
|
+
/** The person's email. */
|
|
252
|
+
email?: string;
|
|
253
|
+
/** The person's contact number. */
|
|
254
|
+
phone?: string;
|
|
255
|
+
/** The person kind. */
|
|
256
|
+
type?: string;
|
|
257
|
+
/** The officer types. */
|
|
258
|
+
types?: string[];
|
|
259
|
+
/** The person's representative, where one was captured. */
|
|
260
|
+
representative?: string;
|
|
261
|
+
/** The picked identity's number, carried as the representative's passport. */
|
|
262
|
+
representativePassport?: string | null;
|
|
263
|
+
/** The person's address. */
|
|
264
|
+
address?: IAddress;
|
|
265
|
+
/** The identity values. */
|
|
266
|
+
identity?: ILegalGenerationIdentityValues;
|
|
267
|
+
/** The frozen identity-shape snapshot. */
|
|
268
|
+
identityShape?: ILegalGenerationShapeSnapshot;
|
|
269
|
+
}
|
|
270
|
+
/** One officer appointment the persisted `NewOfficerAppointments` section carries. */
|
|
271
|
+
export interface ILegalGenerationOfficerPosition {
|
|
272
|
+
/** The positions the officer is appointed to. */
|
|
273
|
+
positions?: string[];
|
|
274
|
+
/** The appointed contact's id — always the id of an entry in `contacts` (contract §3). */
|
|
275
|
+
officerId?: string;
|
|
276
|
+
}
|
|
277
|
+
/** One officer appointment as the PascalCase `NewOfficerAppointmentDetails` save payload carries it. */
|
|
278
|
+
export interface ILegalGenerationOfficerEdit {
|
|
279
|
+
/** The positions the officer is appointed to. */
|
|
280
|
+
Positions: string[];
|
|
281
|
+
/** The appointed contact's id. */
|
|
282
|
+
OfficerId?: string;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* The persisted `CompanyGeneral.SGP.Models.FormContent` a submit composes and a load returns
|
|
286
|
+
* (camelCase read model, contract §1/§2): the people the composition supplied, the officers the
|
|
287
|
+
* Appoint Officer section appoints, the company and the document date.
|
|
288
|
+
*
|
|
289
|
+
* The document name identifies the gallery item; `idType` identifies the captured branch.
|
|
290
|
+
* Dates, parent organization and owned template keys travel beside the captured people.
|
|
291
|
+
*/
|
|
292
|
+
export interface ILegalGenerationFormContent {
|
|
293
|
+
/** Gallery-owned template keys; absent on an identifiable standalone legacy form. */
|
|
294
|
+
generationTemplateKeys?: string[] | null;
|
|
295
|
+
/** The separately captured foreign parent organization. */
|
|
296
|
+
parentCompany?: {
|
|
297
|
+
id?: string;
|
|
298
|
+
name?: string;
|
|
299
|
+
} | null;
|
|
300
|
+
/** The separately captured foreign parent country. */
|
|
301
|
+
parentCompanyCountry?: string | null;
|
|
302
|
+
/** Server-captured parent organization data, retained by the server on regeneration. */
|
|
303
|
+
parentCompanyData?: ILegalGenerationParentData | null;
|
|
304
|
+
/** The people the composition supplied. */
|
|
305
|
+
contacts?: ILegalGenerationFormPerson[];
|
|
306
|
+
/** The company the document is composed for; never written back on save (contract §4). */
|
|
307
|
+
corporate?: {
|
|
308
|
+
id?: string;
|
|
309
|
+
name?: string;
|
|
310
|
+
} | null;
|
|
311
|
+
/** The document date the shared contact content carries. */
|
|
312
|
+
date?: string | null;
|
|
313
|
+
/** The editable appointment effective date. */
|
|
314
|
+
effectiveDate?: string | null;
|
|
315
|
+
/** The officers the document appoints — Appoint Officer only. */
|
|
316
|
+
newOfficerAppointments?: {
|
|
317
|
+
officers?: ILegalGenerationOfficerPosition[];
|
|
318
|
+
} | null;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* The persisted form document as the platform load route answers it (contract §4): the document's
|
|
322
|
+
* own members plus the `FormContent` above.
|
|
323
|
+
*/
|
|
324
|
+
export interface ILegalGenerationFormDocument {
|
|
325
|
+
/** A legacy form with an existing host cannot be adopted by the gallery. */
|
|
326
|
+
parentNode?: {
|
|
327
|
+
id?: string;
|
|
328
|
+
} | null;
|
|
329
|
+
/** The document read model may carry the host as an id alone. */
|
|
330
|
+
parentNodeId?: string | null;
|
|
331
|
+
/** The persisted form document's id. */
|
|
332
|
+
id: string;
|
|
333
|
+
/** The document's name. */
|
|
334
|
+
name?: string;
|
|
335
|
+
/** Always {@link LEGAL_GENERATION_META_KEY} for a document this endpoint composed. */
|
|
336
|
+
metaKey?: string;
|
|
337
|
+
/** Always `"SGP"` for the Company General document these forms compose. */
|
|
338
|
+
country?: string;
|
|
339
|
+
/** The composed content. */
|
|
340
|
+
content?: ILegalGenerationFormContent;
|
|
341
|
+
}
|
|
342
|
+
/** One person as the PascalCase `FormPeopleOptions` save payload carries it (contract §2). */
|
|
343
|
+
export interface ILegalGenerationPersonEdit {
|
|
344
|
+
Id: string;
|
|
345
|
+
IdType: string;
|
|
346
|
+
/** Server-authoritative owner selected for this loaded contact, when it is not manual. */
|
|
347
|
+
SelectedEntityId: string | null;
|
|
348
|
+
/** Server-authoritative identity selected for this loaded contact, when it is not manual. */
|
|
349
|
+
SelectedIdentityId: string | null;
|
|
350
|
+
Name: string;
|
|
351
|
+
Email: string | null;
|
|
352
|
+
Phone: string | null;
|
|
353
|
+
Type: string | null;
|
|
354
|
+
Types: string[] | null;
|
|
355
|
+
Representative: string | null;
|
|
356
|
+
RepresentativePassport: string | null;
|
|
357
|
+
Address: {
|
|
358
|
+
Line1: string | undefined;
|
|
359
|
+
Line2: string | null;
|
|
360
|
+
City: string | null;
|
|
361
|
+
State: string | null;
|
|
362
|
+
PostalCode: string | null;
|
|
363
|
+
Country: string | undefined;
|
|
364
|
+
} | null;
|
|
365
|
+
Identity: {
|
|
366
|
+
FullName: string | null;
|
|
367
|
+
Number: string | null;
|
|
368
|
+
Country: string | null;
|
|
369
|
+
Alias: string | null;
|
|
370
|
+
IssuingCountry: string | null;
|
|
371
|
+
ExpiryDate: string | null;
|
|
372
|
+
} | null;
|
|
373
|
+
IdentityShape: {
|
|
374
|
+
SourceNumber: number;
|
|
375
|
+
Name: string;
|
|
376
|
+
Family: IIdentityShape["family"];
|
|
377
|
+
Subject: IIdentityShape["subject"];
|
|
378
|
+
AliasPolicy: IIdentityShape["policies"]["alias"];
|
|
379
|
+
IssuingCountryPolicy: IIdentityShape["policies"]["issuingCountry"];
|
|
380
|
+
ExpiryPolicy: IIdentityShape["policies"]["expiryDate"];
|
|
381
|
+
} | null;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* The PascalCase `Morpho.CSP.DocumentAssistants.CompanyGeneral.SGP.FormEditOptions` members a
|
|
385
|
+
* reopened document's save writes (contract §4). `Corporate` is deliberately absent — sending one
|
|
386
|
+
* tells the document it moved to another company and unions the whole roster into `Contacts`.
|
|
387
|
+
*/
|
|
388
|
+
export interface ILegalGenerationFormEditOptions {
|
|
389
|
+
/** The document date the shared contact content carries. */
|
|
390
|
+
Date: string | null;
|
|
391
|
+
/** Every person the loaded content carried, each copied unchanged; replaced wholesale. */
|
|
392
|
+
Contacts?: ILegalGenerationPersonEdit[];
|
|
393
|
+
/** The officer appointments, mapped onto the contract's PascalCase members — Appoint Officer only. */
|
|
394
|
+
NewOfficerAppointments?: {
|
|
395
|
+
Officers: ILegalGenerationOfficerEdit[];
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* The frozen snapshot of `shape` as the payload carries it (spec:3848): a copy of the members a
|
|
400
|
+
* snapshot owns, taken from the capture's own shape and never resolved against the shared catalog.
|
|
401
|
+
*
|
|
402
|
+
* @param shape the capture's frozen shape.
|
|
403
|
+
* @returns the snapshot the submit body and the form-content JSON column carry.
|
|
404
|
+
*/
|
|
405
|
+
export declare function toIdentityShapeSnapshot(shape: IIdentityShape): ILegalGenerationShapeSnapshot;
|
|
406
|
+
/**
|
|
407
|
+
* Builds the submit request body from one form's composed submission (spec:1930): select-existing
|
|
408
|
+
* carries the picked entity's id and omits every typed person field, manual carries the typed
|
|
409
|
+
* person with its captured snapshot and omits the id.
|
|
410
|
+
*
|
|
411
|
+
* @param submission the document name plus the branch the form composed.
|
|
412
|
+
* @returns the body the conversion endpoint reads.
|
|
413
|
+
*/
|
|
414
|
+
export declare function buildLegalGenerationSubmitBody(submission: ILegalGenerationSubmission): ILegalGenerationSubmitBody;
|
|
415
|
+
/**
|
|
416
|
+
* The message a failed submit carries (spec:3850). `ApiEndPoint` rejects with
|
|
417
|
+
* `` `${status} - ${bodyText}` `` and the conversion endpoint answers its failure message as a JSON
|
|
418
|
+
* string literal, so the body is unwrapped and anything else falls back to the raw text.
|
|
419
|
+
*
|
|
420
|
+
* @param error the rejection the endpoint raised.
|
|
421
|
+
* @returns the message the form shows.
|
|
422
|
+
*/
|
|
423
|
+
export declare function legalGenerationFailureMessage(error: unknown): string;
|
|
424
|
+
/** Per-field validation errors from the captured snapshot, never the live catalog. */
|
|
425
|
+
export type LegalGenerationIdentityErrors = Partial<Record<keyof IIdentityCapture["values"], string>>;
|
|
426
|
+
/** Validate required and omitted values against the immutable policies before create or same-id save. */
|
|
427
|
+
export declare function validateLegalGenerationCapture(capture?: IIdentityCapture): LegalGenerationIdentityErrors;
|
|
428
|
+
/** Fetch the ZIP with a bearer header and open a short-lived local URL, keeping credentials out of browser URLs. */
|
|
429
|
+
export declare function downloadLegalGenerationDocument(document: ILegalGenerationDocument, accessToken: string, endpoint: ApiEndPoint, open?: (url: string) => void): Promise<void>;
|
|
430
|
+
/**
|
|
431
|
+
* Submits a legal-generation form's composed payload to the document conversion and delivers both
|
|
432
|
+
* continuations (spec:3850): on success the generated document is opened for download, and on
|
|
433
|
+
* failure the endpoint's message is shown and nothing is downloaded or reset — the caller's entered
|
|
434
|
+
* values and captured snapshot stay exactly as they were, so the form stays open for a correction
|
|
435
|
+
* and a retry.
|
|
436
|
+
*
|
|
437
|
+
* @param options the endpoint, the caller's access token and the composed submission.
|
|
438
|
+
* @returns the handoff outcome.
|
|
439
|
+
*/
|
|
440
|
+
export declare function submitLegalGeneration(options: {
|
|
441
|
+
/** The CSP web area endpoint the payload is posted to. */
|
|
442
|
+
endpoint: ApiEndPoint;
|
|
443
|
+
/** The caller's bearer token for the authenticated ZIP request. */
|
|
444
|
+
accessToken: string;
|
|
445
|
+
/** The composed submission the form built. */
|
|
446
|
+
submission: ILegalGenerationSubmission;
|
|
447
|
+
/** Opens the generated document; defaults to a new browser tab. */
|
|
448
|
+
open?: (url: string) => void;
|
|
449
|
+
}): Promise<ILegalGenerationHandoff>;
|
|
450
|
+
/**
|
|
451
|
+
* Restores the capture a saved form value holds, from the frozen snapshot alone: no catalog lookup
|
|
452
|
+
* runs, so a source shape later renamed, re-policied or deleted still restores exactly what was
|
|
453
|
+
* captured (spec:3848). The snapshot omits the catalog's `builtIn` flag and its concurrency token,
|
|
454
|
+
* so the restored shape marks itself built-in from its `source` — built-ins are 1-3 (spec:3712).
|
|
455
|
+
*
|
|
456
|
+
* @param person the form person a load route returned.
|
|
457
|
+
* @returns the capture the manual-entry block reopens on, or undefined for a legacy value.
|
|
458
|
+
*/
|
|
459
|
+
export declare function toIdentityCapture(person: ILegalGenerationFormPerson): IIdentityCapture | undefined;
|
|
460
|
+
/** The two gallery items this endpoint composes (contract §3). */
|
|
461
|
+
export type LegalGenerationDocumentName = "Appoint Officer" | "Corporate Representative";
|
|
462
|
+
/** The typed values a reopened document seeds its gallery form's fields with. */
|
|
463
|
+
export interface ILegalGenerationRestoreValues {
|
|
464
|
+
/** The Appoint Officer branch's typed name (`FullName`). */
|
|
465
|
+
FullName?: string;
|
|
466
|
+
/** The Corporate Representative branch's typed name (`IdentityName`). */
|
|
467
|
+
IdentityName?: string;
|
|
468
|
+
/** The typed email. */
|
|
469
|
+
Email?: string;
|
|
470
|
+
/** The Appoint Officer branch's typed contact number (`Contact`). */
|
|
471
|
+
Contact?: string;
|
|
472
|
+
/** The officer type the manual branch picked. */
|
|
473
|
+
OfficerType?: string;
|
|
474
|
+
/** The typed document number. */
|
|
475
|
+
IdentityNumber?: string;
|
|
476
|
+
/** Appointment identity country, or the representative form's parent company country. */
|
|
477
|
+
Country?: string;
|
|
478
|
+
/** The representative's independently persisted identity country. */
|
|
479
|
+
RepresentativeCountry?: string;
|
|
480
|
+
/** The typed address. */
|
|
481
|
+
Address?: IAddress;
|
|
482
|
+
/** The company the document is composed for. */
|
|
483
|
+
Company?: {
|
|
484
|
+
Id: string;
|
|
485
|
+
Name: string;
|
|
486
|
+
};
|
|
487
|
+
/** The separately persisted foreign parent organization. */
|
|
488
|
+
ParentCompany?: {
|
|
489
|
+
Id: string;
|
|
490
|
+
Name: string;
|
|
491
|
+
};
|
|
492
|
+
/** The Appoint Officer branch's document date, as the UTC picker reads it. */
|
|
493
|
+
DocumentDate?: Dayjs;
|
|
494
|
+
/** The saved appointment effective date, in the picker format. */
|
|
495
|
+
EffectiveDate?: Dayjs;
|
|
496
|
+
/** The restored officer picker value, retaining its picker id. */
|
|
497
|
+
Officer?: {
|
|
498
|
+
id: string;
|
|
499
|
+
name: string;
|
|
500
|
+
};
|
|
501
|
+
/** The restored representative picker value, retaining the exact identity id. */
|
|
502
|
+
LegalContact?: {
|
|
503
|
+
id: string;
|
|
504
|
+
name: string;
|
|
505
|
+
};
|
|
506
|
+
/** The Corporate Representative branch's document date (`Date`), as the UTC picker reads it. */
|
|
507
|
+
Date?: Dayjs;
|
|
508
|
+
}
|
|
509
|
+
/** What a persisted legal-generation document restores into the gallery form that composed it. */
|
|
510
|
+
export interface ILegalGenerationRestore {
|
|
511
|
+
/** 已保存母公司显示基线,与 touched 字段补丁分离。 */
|
|
512
|
+
parentCompanyBaseline?: {
|
|
513
|
+
parentId: string;
|
|
514
|
+
details: ILegalGenerationParentDetails;
|
|
515
|
+
};
|
|
516
|
+
/** The gallery item the populated section identifies (contract §1). */
|
|
517
|
+
documentName: LegalGenerationDocumentName;
|
|
518
|
+
/** The branch the document's contact carries: a composed person, or one the endpoint resolved. */
|
|
519
|
+
mode: LegalGenerationMode;
|
|
520
|
+
/** The section's person, as the persisted content carries it. */
|
|
521
|
+
person: ILegalGenerationFormPerson;
|
|
522
|
+
/** The capture the person's snapshot restores, or undefined for a person with no snapshot. */
|
|
523
|
+
identity?: IIdentityCapture;
|
|
524
|
+
/** The typed values the reopened form seeds its fields with. */
|
|
525
|
+
values: ILegalGenerationRestoreValues;
|
|
526
|
+
}
|
|
527
|
+
/** The persisted document one gallery form was reopened on. */
|
|
528
|
+
export interface ILegalGenerationReopened extends ILegalGenerationRestore {
|
|
529
|
+
/** The persisted form document's id — what its save is written back to. */
|
|
530
|
+
id: string;
|
|
531
|
+
/** The document's own content, the base a save re-writes. */
|
|
532
|
+
content: ILegalGenerationFormContent;
|
|
533
|
+
}
|
|
534
|
+
/** The route a persisted form document is loaded from and written back to (contract §4). */
|
|
535
|
+
export declare function legalGenerationFormRoute(id: string): string;
|
|
536
|
+
/**
|
|
537
|
+
* Maps a supported named gallery document onto its first relevant captured person (spec:3848).
|
|
538
|
+
* The frozen snapshot restores its shape and values verbatim without a catalog lookup.
|
|
539
|
+
* The foreign parent remains separate from the Singapore company and representative identity.
|
|
540
|
+
*
|
|
541
|
+
* @param content the camelCase content a loaded Company General document carries.
|
|
542
|
+
* @returns what the gallery form reopens with, or undefined when no section of this endpoint's two
|
|
543
|
+
* is populated (a document another surface composed).
|
|
544
|
+
*/
|
|
545
|
+
export declare function toLegalGenerationRestore(content: ILegalGenerationFormContent, documentName?: string): ILegalGenerationRestore | undefined;
|
|
546
|
+
/** 用规范模板识别逻辑类型;未标记旧文书仍需原有名称及独立内容证据。 */
|
|
547
|
+
export declare function resolveGalleryDocumentKind(document: ILegalGenerationFormDocument): "Appoint Officer" | "Corporate Representative" | undefined;
|
|
548
|
+
/**
|
|
549
|
+
* The document a legal-generation page was opened on, when the id it carries names a persisted
|
|
550
|
+
* Company General document this endpoint composed (contract §1/§4). Anything else — another id, a
|
|
551
|
+
* document family this gallery does not compose, a content whose sections are both empty — answers
|
|
552
|
+
* undefined; the saved-id load gate treats unsupported responses as a failure.
|
|
553
|
+
*
|
|
554
|
+
* @param document the document a load returned, when one was loaded at all.
|
|
555
|
+
* @returns the reopened document, or undefined when the page composes a new one.
|
|
556
|
+
*/
|
|
557
|
+
export declare function toReopenedLegalGeneration(document?: ILegalGenerationFormDocument): ILegalGenerationReopened | undefined;
|
|
558
|
+
/**
|
|
559
|
+
* Maps the form content a load route returned onto the PascalCase
|
|
560
|
+
* `CompanyGeneral.SGP.FormEditOptions` the platform save route reads (contract §4). Every value is
|
|
561
|
+
* copied unchanged — in particular the frozen `IdentityShape` snapshot — so save → reopen → resubmit
|
|
562
|
+
* round-trips the snapshot byte-identically, with no catalog resolution and no dependence on the
|
|
563
|
+
* source shape still existing (spec:3848).
|
|
564
|
+
*
|
|
565
|
+
* Two members are deliberately shaped by the route's own semantics: `Corporate` is never sent,
|
|
566
|
+
* because a company whose id differs from the stored one reads as "the document moved company" and
|
|
567
|
+
* unions the whole roster into `Contacts`; and `Contacts` carries the **complete** list, because a
|
|
568
|
+
* sent list replaces the stored one wholesale — omitting an entry would delete it.
|
|
569
|
+
*
|
|
570
|
+
* @param content the camelCase content a loaded legal-generation form carries.
|
|
571
|
+
* @returns the payload the double-encoded save body carries.
|
|
572
|
+
*/
|
|
573
|
+
export declare function toFormContentEditPayload(content: ILegalGenerationFormContent): ILegalGenerationFormEditOptions;
|
|
574
|
+
/**
|
|
575
|
+
* The content a reopened form's save writes back (contract §4): the document's own content with the
|
|
576
|
+
* branch the user re-composed folded into the section's contact, and every other contact, the officer
|
|
577
|
+
* appointments and the document date copied unchanged — so the list the save replaces wholesale is
|
|
578
|
+
* still the complete one (spec:3848).
|
|
579
|
+
*
|
|
580
|
+
* Only a manual branch folds. A select-existing save keeps the contact the endpoint resolved when it
|
|
581
|
+
* composed the document: the id the picker posts is an officer / legal-contact id, and only the
|
|
582
|
+
* server can resolve it to the contact id the document addresses its people by (contract §3.1).
|
|
583
|
+
*
|
|
584
|
+
* @param reopened the document the form was reopened on.
|
|
585
|
+
* @param branch the branch the form re-composed.
|
|
586
|
+
* @param documentDate the date the form carries, already normalised to `YYYY-MM-DD`.
|
|
587
|
+
* @returns the content {@link toFormContentEditPayload} writes back.
|
|
588
|
+
*/
|
|
589
|
+
export declare function toLegalGenerationSavedContent(reopened: ILegalGenerationReopened, branch: ILegalGenerationBranchValues, documentDate?: string): ILegalGenerationFormContent;
|
|
590
|
+
/** The message a load failure other than a missing document surfaces (spec:3848). */
|
|
591
|
+
export declare const LEGAL_GENERATION_LOAD_FAILURE_MESSAGE = "Failed to load the saved document. Please reopen it from the document list and try again.";
|
|
592
|
+
/** Load a saved CHO composition; only 404 is missing, other failures remain failures. */
|
|
593
|
+
export declare function loadLegalGenerationForm(options: {
|
|
594
|
+
/** The endpoint that owns the saved form. */
|
|
595
|
+
endpoint: ApiEndPoint;
|
|
596
|
+
/** The exact persisted form being opened. */
|
|
597
|
+
id: string;
|
|
598
|
+
/** Cancels a load after navigation or unmount. */
|
|
599
|
+
signal?: AbortSignal;
|
|
600
|
+
}): Promise<ILegalGenerationFormDocument | undefined>;
|
|
601
|
+
/**
|
|
602
|
+
* Fixture/legacy generic-save helper writing re-composed content to its existing document
|
|
603
|
+
* (contract §4): the PascalCase payload of {@link toFormContentEditPayload}, sent as the JSON **text**
|
|
604
|
+
* the platform save route binds with case-sensitive `System.Text.Json`.
|
|
605
|
+
*
|
|
606
|
+
* This generic route remains for fixture/legacy callers. Production gallery editors call
|
|
607
|
+
* saveLegalGeneration, whose dedicated /save route owns selected composition and regeneration.
|
|
608
|
+
*
|
|
609
|
+
* @param options the endpoint, the persisted document's id and the content to write back.
|
|
610
|
+
* @returns the save outcome; a failure is surfaced through the same channel the submit uses.
|
|
611
|
+
*/
|
|
612
|
+
export declare function saveLegalGenerationContent(options: {
|
|
613
|
+
/** The CSP web area endpoint the payload is posted to. */
|
|
614
|
+
endpoint: ApiEndPoint;
|
|
615
|
+
/** The persisted form document's id. */
|
|
616
|
+
id: string;
|
|
617
|
+
/** The complete content the save replaces the document's own with. */
|
|
618
|
+
content: ILegalGenerationFormContent;
|
|
619
|
+
}): Promise<{
|
|
620
|
+
ok: true;
|
|
621
|
+
} | {
|
|
622
|
+
ok: false;
|
|
623
|
+
message: string;
|
|
624
|
+
}>;
|
|
625
|
+
/** Production gallery save: resolve the complete edited branch through the dedicated /save route, then download the regenerated existing ZIP. */
|
|
626
|
+
export declare function saveLegalGeneration(options: {
|
|
627
|
+
/** The endpoint owning the saved document. */
|
|
628
|
+
endpoint: ApiEndPoint;
|
|
629
|
+
/** The same persisted id, never a create request. */
|
|
630
|
+
id: string;
|
|
631
|
+
/** The current user's download access token. */
|
|
632
|
+
accessToken: string;
|
|
633
|
+
/** The complete form composition, including mode, selected id, company and dates. */
|
|
634
|
+
submission: ILegalGenerationSubmission;
|
|
635
|
+
/** Optional browser opener used by hosts and tests. */
|
|
636
|
+
open?: (url: string) => void;
|
|
637
|
+
}): Promise<ILegalGenerationHandoff>;
|