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

    Escrow texts go to a third party. Customer-team texts go to that customer's dashboard members. A disabled template sends nothing. Otherwise the live body sends, or the registry default when no live version exists.

    Index
    instance: (...args: []) => CustomerSmsNotificationSender = ...

    The process default: built from each dependency's own instance().

    • Send an SMS notification to each recipient, unless its template is switched off.

      Routing: US numbers → Vibes; non-US / unparseable → Twilio. Recipients are sent sequentially; a provider error propagates immediately. A stored body the validator rejects throws rather than sending.

      Parameters

      • __namedParameters: {
            idempotencyKey: string;
            notification: SmsNotification;
            recipients: { phoneNumber: string }[];
        }
        • idempotencyKey: string

          Stable per-send id; passed to Vibes as submitterMessageId.

        • notification: SmsNotification
        • recipients: { phoneNumber: string }[]

          E.164 phone numbers.

      Returns Promise<void>

    • The admin test send: one saved version of notification.template, named by its smstv_… id, validated, rendered for notification and sent with a [TEST] prefix. Sends even when the template is DISABLED, so a switched-off text can be tried before it is switched back on.

      Parameters

      • __namedParameters: {
            idempotencyKey: string;
            notification: SmsNotification;
            recipients: { phoneNumber: string }[];
            versionId: string;
        }
        • idempotencyKey: string
        • notification: SmsNotification
        • recipients: { phoneNumber: string }[]
        • versionId: string

          smstv_…

      Returns Promise<
          | { ok: true; value: void }
          | {
              error:
                  | ServiceError<"SMS_TEMPLATE_VERSION_NOT_FOUND">
                  | ServiceError<"SMS_TEMPLATE_VERSION_KEY_MISMATCH">
                  | ServiceError<
                      "SMS_TEMPLATE_INVALID",
                      {
                          issues: Readonly<
                              {
                                  code: SmsTemplateIssueCode;
                                  message: string;
                                  offset?: number;
                                  value?: string;
                              },
                          >[];
                      },
                  >;
              ok: false;
          },
      >