@cfxlabsinc/b2b-services
    Preparing search index...

    Type Alias CustomerOnboardingInput

    CustomerOnboardingInput: Omit<
        CreateCustomerWorkflowArgs,
        "customerId"
        | "customer"
        | "owner",
    > & { id?: string } & (
        | {
            customer: OnboardingCustomer & { workspaceId?: undefined };
            owner: OnboardingOwner;
        }
        | {
            customer: OnboardingCustomer & {
                workspaceId: NonNullable<OnboardingCustomer["workspaceId"]>;
            };
            owner?: OnboardingOwner;
        }
    )

    Everything the caller supplies to start onboarding. The customer's external id is minted here rather than by the caller, so id is optional (supply it only to pin the workflow id — used by tests).

    Type Declaration

    • Optionalid?: string

      Pre-minted external customer id (cust_…). Defaults to a fresh nanoId("cust"). It doubles as the Temporal workflowId, which is what makes a repeated start idempotent rather than a second provisioning run.

    • {
          customer: OnboardingCustomer & { workspaceId?: undefined };
          owner: OnboardingOwner;
      }
      • customer: OnboardingCustomer & { workspaceId?: undefined }
      • owner: OnboardingOwner

        Required with a new workspace: without it the customer has no Owner.

    • {
          customer: OnboardingCustomer & {
              workspaceId: NonNullable<OnboardingCustomer["workspaceId"]>;
          };
          owner?: OnboardingOwner;
      }
      • customer: OnboardingCustomer & {
            workspaceId: NonNullable<OnboardingCustomer["workspaceId"]>;
        }
      • Optionalowner?: OnboardingOwner

        A reused workspace already has its owner as a member.