import { SecureIdTypesIndividual } from 'gdc-common-utils-ts'; export { buildIndividualMemberDidWebFromPrivateIdentifiers } from 'gdc-common-utils-ts'; import type { FamilyRegistrationStatus } from 'gdc-common-utils-ts/utils/family-organization-summary'; import type { IndividualOnboardingDraftResult } from 'gdc-common-utils-ts/models/individual-onboarding'; import type { PollOptions, SubmitAndPollResult } from './orchestration/client-port.js'; import type { RouteContext } from './individual-onboarding.js'; import type { OfferPreview } from './order-offer-summary.js'; export type IndividualOrganizationRegistrationInput = { /** * Explicitly saves an owner-private, cardless registration draft. * * This is intended for accessible channels that captured a birth year/date * but could not reliably capture the subject's name. It never authorizes an * Order or public card by itself. */ registrationIntent?: 'activate' | 'save-private-draft'; /** * Preferred high-level input produced by `createIndividualOnboardingEditor()`. * * The SDK converts this draft into the GW Bundle and signed-PDF attachment. * Registration remains separate from Order confirmation, enrollment and * opening a profile. */ onboardingDraft?: IndividualOnboardingDraftResult; /** * Preferred route identifier for the selected personal indexing service provider. * * This is not the tax ID of a professional organization. In the individual * indexing journey it should identify the selected service provider that will * host or activate the individual's index. */ serviceProviderDid?: string; /** * @deprecated Use `serviceProviderDid`. */ tenantId?: string; jurisdiction?: string; sector?: string; /** * Friendly alias/nickname shown in the frontend for the individual profile. * * This is not the technical subject identifier. It is the nearby name the * controller uses to refer to the person in the UI, for example `Charly`. */ alternateName?: string; /** * CORE-canonical controller contact channel for individual bootstrap. * * In the individual/family bootstrap flow the contact channel is published * as `org.schema.Organization.owner.email`, because the person is acting as * owner/controller of a subject index organization. * * This differs from legal-organization activation, where the human * representative is modeled as a `Person` member/representative of the legal * organization and the VC/policy contract uses `credentialSubject.memberOf` * plus `credentialSubject.hasOccupation`. * * Prefer email in shared examples and docs. It is stable as a general CORE * GW identifier and does not assume a phone-notification extension. */ controllerEmail?: string; /** * Compatibility/extension field. * * In the individual/family bootstrap flow this maps to * `org.schema.Organization.owner.telephone`. * * Telephone-driven onboarding is not required by CORE GW. Keep this only for * deployments that add phone-first notification or consent extensions such as * a product gateway extension. */ controllerTelephone?: string; /** * Stable UUID of the principal controller/RESPRSN assignment. In a self * registration this may be the same UUID already assigned to the person. * Omit only for a brand-new assignment so the SDK creates it once. */ controllerIdentifier?: string; controllerRole?: string; additionalClaims?: Record; timeoutSeconds?: number; intervalSeconds?: number; }; /** @deprecated Use `IndividualOrganizationRegistrationInput`. */ export type IndividualOrganizationBootstrapInput = IndividualOrganizationRegistrationInput; export type IndividualOrganizationRegistrationResult = { registration: SubmitAndPollResult; /** * Owner-private Organization UUID returned by GW for a saved draft. * * It is not a public card identifier or DID and is present only when * `registrationIntent` was `save-private-draft`. */ draftId?: string; /** Absent only for an explicitly requested owner-private draft. */ offerId?: string; /** Absent only for an explicitly requested owner-private draft. */ offerPreview?: OfferPreview; /** Lifecycle state returned by GW for this registration receipt. */ registrationStatus?: FamilyRegistrationStatus; /** False when the same family registration is already active. */ orderConfirmationRequired: boolean; /** * Canonical subject identity projected from the GW registration receipt. * * It is optional only for compatibility with older/non-conforming GW * responses. Current GW responses expose both `resource.id` and * `Offer.offeredBy`, allowing every BFF/channel to consume the same derived * identity without rebuilding a provider DID from route fragments or VAT. */ identity?: IndividualOrganizationBootstrapIdentity; }; /** @deprecated Use `IndividualOrganizationRegistrationResult`. */ export type IndividualOrganizationStartResult = IndividualOrganizationRegistrationResult; export type IndividualOrganizationBootstrapIdentity = { /** Technical UUID returned as `Bundle.data[0].resource.id`. */ resourceId: string; /** Explicit governed identifier type serialized in the hosted DID path. */ secureIdTypeIndividual: typeof SecureIdTypesIndividual.Uuid; /** SHA3-384 multihash of the UUID's canonical 16 bytes, as base58btc multibase. */ secureIdValueIndividual: string; /** Authoritative provider DID returned by GW in `Offer.offeredBy`. */ providerDidWeb: string; /** Canonical child DID built beneath the exact provider DID returned by GW. */ subjectDid: string; /** * Canonical principal-controller member DID accepted by individual DCR. * Optional only for compatibility with older registration receipts that did * not expose the controller contact needed to derive it. */ controllerActorDid?: string; }; type RegisterIndividualOrganizationDeps = { input: IndividualOrganizationRegistrationInput; routeCtx: RouteContext; defaultTimeoutMs?: number; defaultIntervalMs?: number; individualFamilyOrganizationBatchPath: (ctx: RouteContext) => string; individualFamilyOrganizationPollPath: (ctx: RouteContext) => string; submitAndPoll: (submitPath: string, pollPath: string, payload: { thid?: string; } & Record, options?: PollOptions) => Promise; assertFirstDidcommEntrySuccess?: (result: SubmitAndPollResult, contextLabel: string) => void; getOfferIdFromResponse: (result: SubmitAndPollResult) => string | undefined; getOfferPreviewFromResponse: (result: SubmitAndPollResult) => OfferPreview; }; /** * Registers the hosted personal organization/subject index and returns its * commercial Offer. This phase does not create a managed wallet, exchange an * activation code, register DCR keys, or open a profile session. */ export declare function registerIndividualOrganizationWithDeps(deps: RegisterIndividualOrganizationDeps): Promise; /** @deprecated Use `registerIndividualOrganizationWithDeps`. */ export declare function startIndividualOrganizationWithDeps(deps: RegisterIndividualOrganizationDeps): Promise; /** * Projects the reusable subject identity from an individual bootstrap receipt. * * `providerDidWeb` is deliberately read from `Offer.offeredBy` and preserved * byte-for-byte. The provider root uses the colon-delimited * `:organization:taxid:` DID path. `buildIndividualDidWeb(...)` only adds the * individual suffix and never rewrites that provider lineage. */ export declare function readIndividualOrganizationBootstrapIdentity(responseBody: unknown, controller?: Readonly<{ controllerEmail?: string; controllerTelephone?: string; }>): IndividualOrganizationBootstrapIdentity | undefined;