import {z} from 'zod' export type CreateApiV1ProjectsProjectIdRcsSendersSenderIdLaunchArgs = {projectId: string, senderId: string}; export type CreateApiV1ProjectsProjectIdRcsSendersSenderIdLaunchOptions = {baseUrl?: string | undefined, BasicAuth?: {username: string, password: string} | undefined, BearerAuth?: string | undefined, OAuth2Production?: string | undefined, fetch?: typeof fetch | undefined}; export const rcsConversationApiAppRegionsEnum = z.enum(["BR", "EU", "US", "UNRECOGNIZED"]); export const rcsConversationAppChannelIntegrationStatusEnum = z.enum(["ACTIVE", "FAILING", "PENDING", "UNRECOGNIZED"]); export const rcsConversationApiAppDto = z.object({id: z.string(), projectId: z.string(), region: rcsConversationApiAppRegionsEnum, channelStatus: rcsConversationAppChannelIntegrationStatusEnum.optional()}); export const rcsSenderStatesEnum = z.enum(["DRAFT", "IN_PROGRESS", "IN_TEST", "LAUNCHED", "LAUNCHING", "PREPARING_LAUNCH", "UNLAUNCHED", "UNKNOWN"]); export const rcsTestNumberStatesEnum = z.enum(["DECLINED", "EXPIRED", "FAILED", "INVALID", "PENDING", "REJECTED", "UNVERIFIED", "VERIFIED", "UNRECOGNIZED"]); export const rcsTestNumberStateDto = z.object({number: z.string(), state: rcsTestNumberStatesEnum, submitted: z.string()}); export const rcsCountryCodesEnum = z.enum(["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GT", "GU", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW", "UNRECOGNIZED"]); export const rcsOperatorStatusEnum = z.enum(["LAUNCHED", "NOT_LAUNCHED", "PENDING", "PENDING_UNLAUNCHED", "REJECTED", "SUSPENDED", "UNLAUNCHED", "INVALID_IN_GOOGLE_MY_BUSINESS", "UNRECOGNIZED"]); export const rcsOperatorDto = z.object({name: z.string(), status: rcsOperatorStatusEnum, remark: z.string().optional(), modified: z.string().optional()}); export const rcsCountryStatusDto = z.object({country: rcsCountryCodesEnum, status: rcsOperatorStatusEnum, operators: z.array(rcsOperatorDto)}); export const rcsEmailDto = z.object({label: z.string(), address: z.string()}); export const rcsPhoneDto = z.object({label: z.string(), number: z.string()}); export const rcsWebsiteDto = z.object({label: z.string(), url: z.string()}); export const rcsSenderDetailsBrandDto = z.object({name: z.string().optional(), emails: z.array(rcsEmailDto).optional(), phones: z.array(rcsPhoneDto).optional(), websites: z.array(rcsWebsiteDto).optional(), color: z.string().optional(), description: z.string().optional(), bannerUrl: z.string().optional(), logoUrl: z.string().optional(), privacyPolicyUrl: z.string().optional(), termsOfServiceUrl: z.string().optional()}); export const rcsSenderDetailsQuestionnaireQuestionObjectDto = z.object({question: z.string(), suggestedAnswers: z.array(z.string())}); export const rcsSenderDetailsQuestionnaireGeneralQuestionsDto = z.object({optInDescription: rcsSenderDetailsQuestionnaireQuestionObjectDto, triggerDescription: rcsSenderDetailsQuestionnaireQuestionObjectDto, interactionsDescription: rcsSenderDetailsQuestionnaireQuestionObjectDto, optOutDescription: rcsSenderDetailsQuestionnaireQuestionObjectDto, videoUris: rcsSenderDetailsQuestionnaireQuestionObjectDto, screenshotUris: rcsSenderDetailsQuestionnaireQuestionObjectDto}); export const rcsSenderDetailsQuestionnaireAnswerMetadataDto = z.object({ignore: z.string().optional()}); export const rcsSenderDetailsQuestionnaireGeneralAnswersDto = z.object({optInDescription: z.string().optional(), optInDescriptionMetadata: rcsSenderDetailsQuestionnaireAnswerMetadataDto.optional(), triggerDescription: z.string().optional(), triggerDescriptionMetadata: rcsSenderDetailsQuestionnaireAnswerMetadataDto.optional(), interactionsDescription: z.string().optional(), interactionsDescriptionMetadata: rcsSenderDetailsQuestionnaireAnswerMetadataDto.optional(), optOutDescription: z.string().optional(), optOutDescriptionMetadata: rcsSenderDetailsQuestionnaireAnswerMetadataDto.optional(), videoUris: z.array(z.string()).optional(), screenshotUris: z.array(z.string()).optional()}); export const rcsSenderDetailsQuestionnaireGeneralDto = z.object({questions: rcsSenderDetailsQuestionnaireGeneralQuestionsDto, answers: rcsSenderDetailsQuestionnaireGeneralAnswersDto}); export const rcsSenderDetailsQuestionnaireVerificationPartnerQuestionsDto = z.object({companyName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactEmailAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto}); export const rcsSenderDetailsQuestionnaireVerificationQuestionsDto = z.object({name: rcsSenderDetailsQuestionnaireQuestionObjectDto, email: rcsSenderDetailsQuestionnaireQuestionObjectDto, title: rcsSenderDetailsQuestionnaireQuestionObjectDto, website: rcsSenderDetailsQuestionnaireQuestionObjectDto, phone: rcsSenderDetailsQuestionnaireQuestionObjectDto, partner: rcsSenderDetailsQuestionnaireVerificationPartnerQuestionsDto}); export const rcsSenderDetailsQuestionnaireVerificationPartnerAnswersDto = z.object({companyName: z.string().optional(), contactName: z.string().optional(), contactEmailAddress: z.string().optional()}); export const rcsSenderDetailsQuestionnaireVerificationAnswersDto = z.object({name: z.string().optional(), email: z.string().optional(), title: z.string().optional(), website: z.string().optional(), phone: z.string().optional(), partner: rcsSenderDetailsQuestionnaireVerificationPartnerAnswersDto.optional()}); export const rcsSenderDetailsQuestionnaireVerificationDto = z.object({questions: rcsSenderDetailsQuestionnaireVerificationQuestionsDto, answers: rcsSenderDetailsQuestionnaireVerificationAnswersDto}); export const rcsSenderDetailsQuestionnaireGBQuestionsDto = z.object({brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyRegistrationNumber: rcsSenderDetailsQuestionnaireQuestionObjectDto, fullCompanyAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesFrequency: rcsSenderDetailsQuestionnaireQuestionObjectDto, campaignLength: rcsSenderDetailsQuestionnaireQuestionObjectDto}); export const rcsSenderDetailsQuestionnaireGBAnswersDto = z.object({brandIndustry: z.string().optional(), companyLegalName: z.string().optional(), companyRegistrationNumber: z.string().optional(), fullCompanyAddress: z.string().optional(), fullCompanyAddressMetadata: rcsSenderDetailsQuestionnaireAnswerMetadataDto.optional(), messagesVolume: z.string().optional(), messagesFrequency: z.string().optional(), campaignLength: z.string().optional()}); export const rcsSenderDetailsQuestionnaireGBDto = z.object({questions: rcsSenderDetailsQuestionnaireGBQuestionsDto, answers: rcsSenderDetailsQuestionnaireGBAnswersDto}); export const rcsSenderDetailsQuestionnaireFRQuestionsDto = z.object({fullCompanyAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, siren: rcsSenderDetailsQuestionnaireQuestionObjectDto}); export const rcsSenderDetailsQuestionnaireFRAnswersDto = z.object({fullCompanyAddress: z.string().optional(), fullCompanyAddressMetadata: rcsSenderDetailsQuestionnaireAnswerMetadataDto.optional(), siren: z.string().optional()}); export const rcsSenderDetailsQuestionnaireFRDto = z.object({questions: rcsSenderDetailsQuestionnaireFRQuestionsDto, answers: rcsSenderDetailsQuestionnaireFRAnswersDto}); export const rcsUsQuestionnaireOwnershipTypeEnum = z.enum(["PRIVATE", "PUBLIC"]); export const rcsUsQuestionnaireBrandIndustriesEnum = z.enum(["AGRICULTURE", "COMMUNICATION", "CONSTRUCTION", "EDUCATION", "ENERGY", "ENTERTAINMENT", "FINANCIAL", "GAMBLING", "GOVERNMENT", "HEALTHCARE", "HOSPITALITY", "HUMAN_RESOURCES", "INSURANCE", "LEGAL", "MANUFACTURING", "NON_GOVERNMENTAL_ORGANIZATION", "POLITICAL", "POSTAL", "PROFESSIONAL", "REAL_ESTATE", "RETAIL", "TECHNOLOGY", "TRANSPORTATION"]); export const rcsUsQuestionnaireBrandLegalFormsEnum = z.enum(["CORPORATION", "LIMITED_LIABILITY_COMPANY", "PARTNERSHIP", "S_CORPORATION"]); export const rcsInputCountryCodesEnum = z.enum(["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GT", "GU", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"]); export const rcsUsStatesEnum = z.enum(["AK", "AL", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"]); export const rcsBrandCampaignSenderDetailsQuestionnaireUSAnswersDto = z.object({ownershipType: rcsUsQuestionnaireOwnershipTypeEnum.optional(), companyLegalName: z.string().optional(), companyPhoneNumber: z.string().optional(), companyEmailAddress: z.string().optional(), brandName: z.string().optional(), brandIndustry: rcsUsQuestionnaireBrandIndustriesEnum.optional(), legalForm: rcsUsQuestionnaireBrandLegalFormsEnum.optional(), taxIdCountry: rcsInputCountryCodesEnum.optional(), taxId: z.string().optional(), addressLine: z.string().optional(), addressCity: z.string().optional(), addressCountry: rcsInputCountryCodesEnum.optional(), addressState: rcsUsStatesEnum.optional(), addressPostalCode: z.string().optional(), websiteUrl: z.string().optional(), contactFirstName: z.string().optional(), contactSurname: z.string().optional(), stockExchange: z.string().optional(), stockSymbol: z.string().optional(), sampleMessages: z.array(z.string()).optional(), messagesVolume: z.number().optional(), embeddedLink: z.boolean().optional(), embeddedPhone: z.boolean().optional(), ageGatedContent: z.boolean().optional(), directLending: z.boolean().optional(), optInConfirmationMessage: z.string().optional(), helpMessage: z.string().optional(), callToActionMessage: z.string().optional()}); export const rcsDefaultSenderDetailsQuestionnaireUSQuestionsDto = z.object({ownershipType: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyPhoneNumber: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyEmailAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandName: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, legalForm: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxIdCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxId: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressLine: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCity: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressState: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressPostalCode: rcsSenderDetailsQuestionnaireQuestionObjectDto, websiteUrl: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactFirstName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactSurname: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockExchange: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockSymbol: rcsSenderDetailsQuestionnaireQuestionObjectDto, sampleMessages: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedLink: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedPhone: rcsSenderDetailsQuestionnaireQuestionObjectDto, ageGatedContent: rcsSenderDetailsQuestionnaireQuestionObjectDto, directLending: rcsSenderDetailsQuestionnaireQuestionObjectDto, optInConfirmationMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, helpMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, callToActionMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, ein: rcsSenderDetailsQuestionnaireQuestionObjectDto, fullCompanyAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, smsCampaign: rcsSenderDetailsQuestionnaireQuestionObjectDto}); export const rcsSenderDetailsQuestionnaireUSQuestionsDto = z.object({companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, ein: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, fullCompanyAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, smsCampaign: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto}); export const rcsSenderDetailsQuestionnaireUSAnswersDto = z.object({companyLegalName: z.string().optional(), ein: z.string().optional(), brandIndustry: z.string().optional(), fullCompanyAddress: z.string().optional(), fullCompanyAddressMetadata: rcsSenderDetailsQuestionnaireAnswerMetadataDto.optional(), smsCampaign: z.string().optional(), messagesVolume: z.string().optional()}); export const rcsSenderDetailsQuestionnaireDto = z.object({general: rcsSenderDetailsQuestionnaireGeneralDto, verification: rcsSenderDetailsQuestionnaireVerificationDto, gb: rcsSenderDetailsQuestionnaireGBDto.optional(), fr: rcsSenderDetailsQuestionnaireFRDto.optional(), us: z.union([z.object({questions: z.union([z.object({ownershipType: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyPhoneNumber: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyEmailAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandName: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, legalForm: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxIdCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxId: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressLine: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCity: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressState: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressPostalCode: rcsSenderDetailsQuestionnaireQuestionObjectDto, websiteUrl: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactFirstName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactSurname: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockExchange: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockSymbol: rcsSenderDetailsQuestionnaireQuestionObjectDto, sampleMessages: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedLink: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedPhone: rcsSenderDetailsQuestionnaireQuestionObjectDto, ageGatedContent: rcsSenderDetailsQuestionnaireQuestionObjectDto, directLending: rcsSenderDetailsQuestionnaireQuestionObjectDto, optInConfirmationMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, helpMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, callToActionMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto}), z.object({ownershipType: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyPhoneNumber: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyEmailAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandName: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, legalForm: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxIdCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxId: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressLine: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCity: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressState: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressPostalCode: rcsSenderDetailsQuestionnaireQuestionObjectDto, websiteUrl: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactFirstName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactSurname: rcsSenderDetailsQuestionnaireQuestionObjectDto, sampleMessages: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedLink: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedPhone: rcsSenderDetailsQuestionnaireQuestionObjectDto, ageGatedContent: rcsSenderDetailsQuestionnaireQuestionObjectDto, directLending: rcsSenderDetailsQuestionnaireQuestionObjectDto, optInConfirmationMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, helpMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, callToActionMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto}), z.object({ownershipType: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyPhoneNumber: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyEmailAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandName: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, legalForm: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxIdCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxId: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressLine: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCity: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressPostalCode: rcsSenderDetailsQuestionnaireQuestionObjectDto, websiteUrl: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactFirstName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactSurname: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockExchange: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockSymbol: rcsSenderDetailsQuestionnaireQuestionObjectDto, sampleMessages: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedLink: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedPhone: rcsSenderDetailsQuestionnaireQuestionObjectDto, ageGatedContent: rcsSenderDetailsQuestionnaireQuestionObjectDto, directLending: rcsSenderDetailsQuestionnaireQuestionObjectDto, optInConfirmationMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, helpMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, callToActionMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto}), z.object({ownershipType: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyPhoneNumber: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyEmailAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandName: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, legalForm: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxIdCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxId: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressLine: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCity: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressPostalCode: rcsSenderDetailsQuestionnaireQuestionObjectDto, websiteUrl: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactFirstName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactSurname: rcsSenderDetailsQuestionnaireQuestionObjectDto, sampleMessages: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedLink: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedPhone: rcsSenderDetailsQuestionnaireQuestionObjectDto, ageGatedContent: rcsSenderDetailsQuestionnaireQuestionObjectDto, directLending: rcsSenderDetailsQuestionnaireQuestionObjectDto, optInConfirmationMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, helpMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, callToActionMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto}), z.object({ownershipType: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyLegalName: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyPhoneNumber: rcsSenderDetailsQuestionnaireQuestionObjectDto, companyEmailAddress: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandName: rcsSenderDetailsQuestionnaireQuestionObjectDto, brandIndustry: rcsSenderDetailsQuestionnaireQuestionObjectDto, legalForm: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxIdCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, taxId: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressLine: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCity: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressCountry: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressState: rcsSenderDetailsQuestionnaireQuestionObjectDto, addressPostalCode: rcsSenderDetailsQuestionnaireQuestionObjectDto, websiteUrl: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactFirstName: rcsSenderDetailsQuestionnaireQuestionObjectDto, contactSurname: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockExchange: rcsSenderDetailsQuestionnaireQuestionObjectDto, stockSymbol: rcsSenderDetailsQuestionnaireQuestionObjectDto, sampleMessages: rcsSenderDetailsQuestionnaireQuestionObjectDto, messagesVolume: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedLink: rcsSenderDetailsQuestionnaireQuestionObjectDto, embeddedPhone: rcsSenderDetailsQuestionnaireQuestionObjectDto, ageGatedContent: rcsSenderDetailsQuestionnaireQuestionObjectDto, directLending: rcsSenderDetailsQuestionnaireQuestionObjectDto, optInConfirmationMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, helpMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto, callToActionMessage: rcsSenderDetailsQuestionnaireQuestionObjectDto})]), answers: rcsBrandCampaignSenderDetailsQuestionnaireUSAnswersDto}), z.object({questions: rcsDefaultSenderDetailsQuestionnaireUSQuestionsDto, answers: rcsBrandCampaignSenderDetailsQuestionnaireUSAnswersDto}), z.object({questions: rcsSenderDetailsQuestionnaireUSQuestionsDto, answers: rcsSenderDetailsQuestionnaireUSAnswersDto})]).optional()}); export const rcsSenderDetailsDto = z.object({brand: rcsSenderDetailsBrandDto.optional(), callbackUrl: z.string().optional(), testNumbers: z.array(z.string()).optional(), countries: z.array(rcsCountryCodesEnum).optional(), questionnaire: rcsSenderDetailsQuestionnaireDto}); export const rcsSenderRegionsEnum = z.enum(["BR", "EU", "US"]); export const rcsSenderBillingCategoriesEnum = z.enum(["CONVERSATIONAL", "NON_CONVERSATIONAL", "BASIC_MESSAGE", "CONVERSATIONAL_LEGACY", "SINGLE_MESSAGE"]); export const rcsSenderUseCasesEnum = z.enum(["MULTIUSE", "OTP", "PROMOTIONAL", "TRANSACTIONAL"]); export const rcsSenderHostingRegionsEnum = z.enum(["ASIA_PACIFIC", "EUROPE", "NORTH_AMERICA"]); export const rcsSupplierDetailsGoogleDto = z.object({agentId: z.string().optional(), brandId: z.string().optional()}); export const rcsSupplierDetailsDto = z.object({google: rcsSupplierDetailsGoogleDto.optional()}); export const rcsBrandRegistrationStatusesEnum = z.enum(["ARCHIVED", "COMPLETED", "DRAFT", "UNRECOGNIZED", "UNSPECIFIED"]); export const rcsBrandRegistrationProcessStatusesEnum = z.enum(["ARCHIVED", "COMPLETED", "INCOMPLETE", "MANUAL_REVIEW", "NEW", "PENDING", "PENDING_REVIEW", "REJECTED", "UNRECOGNIZED", "UNSPECIFIED"]); export const rcsBrandRegistrationProcessDto = z.object({id: z.string(), status: rcsBrandRegistrationProcessStatusesEnum}); export const rcsBrandRegistrationDto = z.object({id: z.string(), status: rcsBrandRegistrationStatusesEnum, registration: rcsBrandRegistrationProcessDto}); export const rcsCampaignRegistrationDto = z.object({id: z.string(), campaignName: z.string(), requestId: z.string()}); export const rcsSenderDto = z.object({id: z.string(), conversationApiApp: z.string().optional(), conversationApiAppDetails: rcsConversationApiAppDto.optional(), state: rcsSenderStatesEnum.optional(), testNumberStates: z.array(rcsTestNumberStateDto).optional(), countryStatus: z.array(rcsCountryStatusDto).optional(), details: rcsSenderDetailsDto.optional(), region: rcsSenderRegionsEnum, billingCategory: rcsSenderBillingCategoriesEnum, useCase: rcsSenderUseCasesEnum, hostingRegion: rcsSenderHostingRegionsEnum, authName: z.string().optional(), authToken: z.string().optional(), created: z.string().optional(), modified: z.string().optional(), supplierDetails: rcsSupplierDetailsDto.optional(), launched: z.string().optional(), brandDetails: rcsBrandRegistrationDto.optional(), campaignDetails: rcsCampaignRegistrationDto.optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Begin launch process for sender * * POST /v1/projects/{projectId}/rcs/senders/{senderId}/launch */ export const createApiV1ProjectsProjectIdRcsSendersSenderIdLaunch = async (args: CreateApiV1ProjectsProjectIdRcsSendersSenderIdLaunchArgs, options?: CreateApiV1ProjectsProjectIdRcsSendersSenderIdLaunchOptions) => { const {baseUrl = "https://provisioning.api.sinch.com", fetch: fetchFn = fetch, BasicAuth, BearerAuth, OAuth2Production} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") if (BasicAuth !== undefined) headers.set('authorization', `Basic ${btoa(`${BasicAuth.username}:${BasicAuth.password}`)}`) if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) if (OAuth2Production !== undefined) headers.set('authorization', `Bearer ${OAuth2Production}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/projects/${encodeURIComponent(String(args.projectId))}/rcs/senders/${encodeURIComponent(String(args.senderId))}/launch${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(rcsSenderDto, await res.json()) };