@bitblit/ratchet-misc 4.0.315-alpha → 4.0.318-alpha
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/README.md +16 -0
- package/lib/brevo/brevo-keys.d.ts +7 -0
- package/lib/brevo/brevo-mail-sending-provider.d.ts +8 -0
- package/lib/brevo/brevo-ratchet.d.ts +14 -0
- package/lib/brevo/brevo-ratchet.spec.d.ts +1 -0
- package/lib/brevo/openapi-generated/apis/AccountApi.d.ts +10 -0
- package/lib/brevo/openapi-generated/apis/AttributesApi.d.ts +55 -0
- package/lib/brevo/openapi-generated/apis/ContactsApi.d.ts +271 -0
- package/lib/brevo/openapi-generated/apis/EmailCampaignsApi.d.ts +134 -0
- package/lib/brevo/openapi-generated/apis/FoldersApi.d.ts +62 -0
- package/lib/brevo/openapi-generated/apis/ListsApi.d.ts +93 -0
- package/lib/brevo/openapi-generated/apis/ProcessApi.d.ts +21 -0
- package/lib/brevo/openapi-generated/apis/ResellerApi.d.ts +129 -0
- package/lib/brevo/openapi-generated/apis/SMSCampaignsApi.d.ts +93 -0
- package/lib/brevo/openapi-generated/apis/SMTPApi.d.ts +187 -0
- package/lib/brevo/openapi-generated/apis/SendersApi.d.ts +47 -0
- package/lib/brevo/openapi-generated/apis/TransactionalSMSApi.d.ts +69 -0
- package/lib/brevo/openapi-generated/apis/WebhooksApi.d.ts +51 -0
- package/lib/brevo/openapi-generated/apis/WhatsAppCampaignsApi.d.ts +50 -0
- package/lib/brevo/openapi-generated/models/AbTestCampaignResult.d.ts +27 -0
- package/lib/brevo/openapi-generated/models/AbTestCampaignResultClickedLinks.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/AbTestCampaignResultStatistics.d.ts +13 -0
- package/lib/brevo/openapi-generated/models/AbTestVersionClicksInner.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/AbTestVersionStats.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/AddChildDomain.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/AddContactToList.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/AddCredits.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/BlockDomain.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/ComponentItems.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/CreateAttribute.d.ts +18 -0
- package/lib/brevo/openapi-generated/models/CreateAttributeEnumerationInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/CreateChild.d.ts +20 -0
- package/lib/brevo/openapi-generated/models/CreateContact.d.ts +13 -0
- package/lib/brevo/openapi-generated/models/CreateDoiContact.d.ts +12 -0
- package/lib/brevo/openapi-generated/models/CreateEmailCampaign.d.ts +40 -0
- package/lib/brevo/openapi-generated/models/CreateEmailCampaignRecipients.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/CreateEmailCampaignSender.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/CreateList.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/CreateModel.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/CreateReseller.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/CreateSender.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/CreateSenderIpsInner.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/CreateSenderModel.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/CreateSmsCampaign.d.ts +12 -0
- package/lib/brevo/openapi-generated/models/CreateSmsCampaignRecipients.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/CreateSmtpEmail.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/CreateSmtpTemplate.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/CreateSmtpTemplateSender.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/CreateUpdateContactModel.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/CreateUpdateFolder.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/CreateWebhook.d.ts +32 -0
- package/lib/brevo/openapi-generated/models/CreatedProcessId.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/DeleteHardbounces.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/EmailExportRecipients.d.ts +18 -0
- package/lib/brevo/openapi-generated/models/ErrorModel.d.ts +25 -0
- package/lib/brevo/openapi-generated/models/GetAccount.d.ts +18 -0
- package/lib/brevo/openapi-generated/models/GetAccountAllOfMarketingAutomation.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetAccountAllOfPlan.d.ts +22 -0
- package/lib/brevo/openapi-generated/models/GetAccountAllOfRelay.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetAccountAllOfRelayData.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetAggregatedReport.d.ts +19 -0
- package/lib/brevo/openapi-generated/models/GetAttributes.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetAttributesAttributesInner.d.ts +26 -0
- package/lib/brevo/openapi-generated/models/GetAttributesAttributesInnerEnumerationInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetBlockedDomains.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/GetCampaignOverview.d.ts +31 -0
- package/lib/brevo/openapi-generated/models/GetCampaignRecipients.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetCampaignStats.d.ts +20 -0
- package/lib/brevo/openapi-generated/models/GetChildAccountCreationStatus.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/GetChildDomain.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetChildInfo.d.ts +18 -0
- package/lib/brevo/openapi-generated/models/GetChildInfoAllOfApiKeys.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetChildInfoAllOfApiKeysV2.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetChildInfoAllOfApiKeysV3.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetChildInfoAllOfCredits.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetChildInfoAllOfStatistics.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetChildrenList.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetChildrenListChildrenInner.d.ts +19 -0
- package/lib/brevo/openapi-generated/models/GetClient.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetContactCampaignStats.d.ts +19 -0
- package/lib/brevo/openapi-generated/models/GetContactCampaignStatsClickedInner.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetContactCampaignStatsOpenedInner.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetContactCampaignStatsTransacAttributesInner.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetContactCampaignStatsUnsubscriptions.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetContactDetails.d.ts +15 -0
- package/lib/brevo/openapi-generated/models/GetContacts.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetDeviceBrowserStats.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetEmailCampaign.d.ts +52 -0
- package/lib/brevo/openapi-generated/models/GetEmailCampaigns.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetEmailCampaignsCampaignsInner.d.ts +52 -0
- package/lib/brevo/openapi-generated/models/GetEmailEventReport.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetEmailEventReportEventsInner.d.ts +30 -0
- package/lib/brevo/openapi-generated/models/GetExtendedCampaignOverview.d.ts +48 -0
- package/lib/brevo/openapi-generated/models/GetExtendedCampaignOverviewAllOfSender.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetExtendedCampaignStats.d.ts +21 -0
- package/lib/brevo/openapi-generated/models/GetExtendedClient.d.ts +12 -0
- package/lib/brevo/openapi-generated/models/GetExtendedClientAllOfAddress.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetails.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatistics.d.ts +18 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatisticsClicked.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatisticsLinks.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatisticsMessagesSent.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatisticsOpened.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatisticsUnsubscriptions.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetExtendedList.d.ts +15 -0
- package/lib/brevo/openapi-generated/models/GetExtendedListAllOfCampaignStats.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetFolder.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/GetFolderLists.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetFolders.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetIp.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetIpFromSender.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetIps.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetIpsFromSender.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetList.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetLists.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetListsListsInner.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/GetProcess.d.ts +15 -0
- package/lib/brevo/openapi-generated/models/GetProcesses.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetReports.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetReportsReportsInner.d.ts +19 -0
- package/lib/brevo/openapi-generated/models/GetSegments.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetSegmentsSegments.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/GetSendersList.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetSendersListSendersInner.d.ts +12 -0
- package/lib/brevo/openapi-generated/models/GetSendersListSendersInnerIpsInner.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetSharedTemplateUrl.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/GetSmsCampaign.d.ts +26 -0
- package/lib/brevo/openapi-generated/models/GetSmsCampaignOverview.d.ts +22 -0
- package/lib/brevo/openapi-generated/models/GetSmsCampaignStats.d.ts +13 -0
- package/lib/brevo/openapi-generated/models/GetSmsCampaigns.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetSmsCampaignsCampaignsInner.d.ts +26 -0
- package/lib/brevo/openapi-generated/models/GetSmsEventReport.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetSmsEventReportEventsInner.d.ts +25 -0
- package/lib/brevo/openapi-generated/models/GetSmtpTemplateOverview.d.ts +20 -0
- package/lib/brevo/openapi-generated/models/GetSmtpTemplateOverviewSender.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetSmtpTemplates.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetSsoToken.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/GetStatsByDevice.d.ts +19 -0
- package/lib/brevo/openapi-generated/models/GetTransacAggregatedSmsReport.d.ts +16 -0
- package/lib/brevo/openapi-generated/models/GetTransacBlockedContacts.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetTransacBlockedContactsContactsInner.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/GetTransacBlockedContactsContactsInnerReason.d.ts +16 -0
- package/lib/brevo/openapi-generated/models/GetTransacEmailContent.d.ts +14 -0
- package/lib/brevo/openapi-generated/models/GetTransacEmailContentEventsInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetTransacEmailsList.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetTransacEmailsListTransactionalEmailsInner.d.ts +14 -0
- package/lib/brevo/openapi-generated/models/GetTransacSmsReport.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetTransacSmsReportReportsInner.d.ts +16 -0
- package/lib/brevo/openapi-generated/models/GetWATemplates.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetWATemplatesTemplatesInner.d.ts +14 -0
- package/lib/brevo/openapi-generated/models/GetWebhook.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/GetWebhooks.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/GetWhatsappCampaignOverview.d.ts +27 -0
- package/lib/brevo/openapi-generated/models/GetWhatsappCampaigns.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/GetWhatsappCampaignsCampaignsInner.d.ts +28 -0
- package/lib/brevo/openapi-generated/models/ManageIp.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/PostContactInfo.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/PostContactInfoContacts.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/PostSendFailed.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/PostSendSmsTestFailed.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/RemainingCreditModel.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/RemainingCreditModelChild.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/RemainingCreditModelReseller.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/RemoveContactFromList.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/RemoveCredits.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/RequestContactExport.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/RequestContactExportCustomContactFilter.d.ts +32 -0
- package/lib/brevo/openapi-generated/models/RequestContactImport.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/RequestContactImportNewList.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/RequestSmsRecipientExport.d.ts +16 -0
- package/lib/brevo/openapi-generated/models/SendEmail.d.ts +16 -0
- package/lib/brevo/openapi-generated/models/SendEmailAttachmentInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/SendReport.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/SendReportEmail.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/SendSms.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/SendSmtpEmail.d.ts +25 -0
- package/lib/brevo/openapi-generated/models/SendSmtpEmailAttachmentInner.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/SendSmtpEmailBccInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/SendSmtpEmailCcInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/SendSmtpEmailReplyTo.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/SendSmtpEmailSender.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/SendSmtpEmailToInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/SendTemplateEmail.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/SendTestEmail.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/SendTestSms.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/SendTransacSms.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/UpdateAttribute.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/UpdateAttributeEnumerationInner.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/UpdateCampaignStatus.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/UpdateChild.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/UpdateChildAccountStatus.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/UpdateChildDomain.d.ts +7 -0
- package/lib/brevo/openapi-generated/models/UpdateContact.d.ts +12 -0
- package/lib/brevo/openapi-generated/models/UpdateEmailCampaign.d.ts +40 -0
- package/lib/brevo/openapi-generated/models/UpdateEmailCampaignRecipients.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/UpdateEmailCampaignSender.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/UpdateList.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/UpdateSender.d.ts +10 -0
- package/lib/brevo/openapi-generated/models/UpdateSmsCampaign.d.ts +12 -0
- package/lib/brevo/openapi-generated/models/UpdateSmtpTemplate.d.ts +17 -0
- package/lib/brevo/openapi-generated/models/UpdateSmtpTemplateSender.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/UpdateWebhook.d.ts +26 -0
- package/lib/brevo/openapi-generated/models/UploadImageToGallery.d.ts +8 -0
- package/lib/brevo/openapi-generated/models/VariablesItems.d.ts +9 -0
- package/lib/brevo/openapi-generated/models/WhatsappCampStats.d.ts +11 -0
- package/lib/brevo/openapi-generated/models/WhatsappCampTemplate.d.ts +19 -0
- package/lib/brevo/openapi-generated/models/index.d.ts +189 -0
- package/lib/brevo/openapi-generated/runtime.d.ts +154 -0
- package/lib/index.d.ts +19 -0
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +37 -9
package/lib/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{NumberRatchet as e,StringRatchet as t,ErrorRatchet as a,Logger as r,MapRatchet as s,TimeoutToken as l}from"@bitblit/ratchet-common";import n from"handlebars";import i from"cross-fetch";import o from"handlebars-layouts";import c from"swagger-model-validator";import u from"js-yaml";import{race as m,Observable as h}from"rxjs";class d{constructor(){}static buildInformation(){return{version:"315",hash:"760b503304582500c0d2f3f90cb3105afe82f636",branch:"alpha-2024-02-13-4",tag:"alpha-2024-02-13-4",timeBuiltISO:"2024-02-13T21:59:22-0800",notes:"No notes"}}}class f{constructor(){}static functionMap(){return{eq:f.equal,ne:f.notEqual,lt:f.lessThan,gt:f.greaterThan,lte:f.lessThanEqual,gte:f.greaterThanEqual,and:f.and,or:f.or,formatBytes:f.formatBytes,rpn:f.reversePolishNotation,add:f.add,sub:f.sub,mul:f.mul,div:f.div,mod:f.mod,maxNum:f.maxNum,minNum:f.minNum}}static registerAll(e){e.registerHelper(f.functionMap())}static add(t,a){return e.safeNumber(t)+e.safeNumber(a)}static sub(t,a){return e.safeNumber(t)-e.safeNumber(a)}static mul(t,a){return e.safeNumber(t)*e.safeNumber(a)}static div(t,a){return e.safeNumber(t)/e.safeNumber(a)}static mod(t,a){return e.safeNumber(t)%e.safeNumber(a)}static equal(e,t){return e===t}static notEqual(e,t){return e!==t}static lessThan(e,t){return e<t}static lessThanEqual(e,t){return e<=t}static greaterThan(e,t){return e>t}static greaterThanEqual(e,t){return e>=t}static maxNum(...e){return Math.max(...e.slice(0,-1))}static minNum(...e){return Math.min(...e.slice(0,-1))}static and(...e){return Array.prototype.every.call(e,Boolean)}static or(...e){return Array.prototype.slice.call(e,0,-1).some(Boolean)}static formatBytes(e){return t.formatBytes(e)}static reversePolishNotation(...e){let t=null;try{const r=Object.assign({},f.functionMap());delete r.formatBytes;const s=[];for(let t=0;t<e.length-1;t++){const l=e[t];if(r[l])if(s.length>1){const e=s.pop(),t=s.pop(),a=r[l](t,e,{});s.push(a)}else a.throwFormattedErr("Cannot execute operation %s - not enough args",l);else s.push(l)}t=s.pop()}catch(e){r.error("Failed to execute RPN: %s",e,e),t=a.asErr(e)?.message||"Failure"}return t}}class p{prefix;suffix;maxCacheTemplates;cache;constructor(e="",t="",a=10){this.prefix=e,this.suffix=t,this.maxCacheTemplates=a,this.maxCacheTemplates>0&&(this.cache=new Map)}async renderTemplate(e,t,a=null){return this.renderRemoteTemplate(e,t,a)}async renderRemoteTemplate(e,t,a=null){const r=await this.fetchTemplate(e),s=a?await this.fetchTemplateText(a):null;s&&(await o.register(n),n.registerPartial(a,s));return r?r(t||{}):null}async renderTemplateDirect(e,t,a=null){return n.compile(e)(t)}async fetchTemplate(e){let t=null;try{if(this.cache&&this.cache.has(e))r.silly("Cache hit for template : %s",e),t=this.cache.get(e);else{r.debug("Cache miss for template : %s",e);const a=await this.fetchTemplateText(e);a&&(t=n.compile(a),this.cache&&t&&(this.cache.set(e,t),this.cache.size>this.maxCacheTemplates&&this.cache.delete(Array.from(this.cache.keys())[0])))}}catch(a){r.warn("Could not fetch and compile template : %s : %s",e,a,a),t=null}return t}async fetchTemplateText(e){let a=null;const s=t.trimToEmpty(this.prefix)+e+t.trimToEmpty(this.suffix);try{const e=await i(s);a=await e.text()}catch(e){r.warn("Could not fetch url : %s : %s",s,e,e),a=null}return a}}class b{allModels;constructor(e){this.allModels=e,e&&0!=Object.keys(e).length||a.throwFormattedErr("Cannot create model validator, passed models was null/empty : %j",e)}static createFromYamlString(e,t){const a=u.load(e),r=t&&t.length>0?s.findValue(a,t):a;return b.createFromParsedObject(r)}static createFromParsedObject(e){return new b(e)}get modelNames(){return Object.keys(this.allModels)}addModel(e,t){this.allModels[e]=t}fetchModel(e){return this.allModels[e]}validate(e,t,a=!1,s=!0){let l=[];r.silly("Validating model %s all definitions are : %j",e,this.allModels);if(!t||0===Object.keys(t).length)a||l.push("Empty / null object sent, but empty not allowed here");else if(this.allModels&&e&&this.allModels[e]){const r=(new c).validate(t,this.allModels[e],this.allModels,a,s);r.errorCount>0&&(l=r.errors.map((e=>e.message)))}else l=['Model named "'+e+'" not present in schema'];return l}}class T{static timeout(e,t,a){return m(e,this.createTimeoutObservable(t,a))}static createTimeoutObservable(e,t){return h.create((a=>{const r=setTimeout((()=>{clearTimeout(r),a.next(new l(e,t))}),t)}))}}class y{static safeUnsubscribe(e){return s.safeCallFunction(e,"unsubscribe")}static async waitForNonNullOnSubject(e){return e.value?e.value:new Promise(((t,a)=>{const r=e.subscribe((e=>{e&&(y.safeUnsubscribe(r),t(e))}))}))}static async waitForTargetValueOnSubject(e,t){return e.value===t?e.value:new Promise(((a,r)=>{const s=e.subscribe((e=>{e===t&&(y.safeUnsubscribe(s),a(e))}))}))}}export{f as HandlebarsRatchet,b as ModelValidator,T as ObservableRatchet,d as RatchetMiscInfo,p as RemoteHandlebarsTemplateRenderer,y as RxjsRatchet};
|
|
1
|
+
import{ErrorRatchet as e,Logger as t,NumberRatchet as n,StringRatchet as i,MapRatchet as a,TimeoutToken as r}from"@bitblit/ratchet-common";import s from"handlebars";import o from"cross-fetch";import u from"handlebars-layouts";import l from"swagger-model-validator";import d from"js-yaml";import{race as c,Observable as m}from"rxjs";class p{brevo;constructor(e){this.brevo=e}async sendEmail(n){try{const t=await this.brevo.smtpApi();if(n?.attachments?.length)throw e.fErr("Cannot send email with attachments yet, not supported");const i={subject:n.subject,htmlContent:n.htmlMessage,sender:{name:n.fromName,email:n.fromAddress||"a@a.com"},to:(n.destinationAddresses||[]).map((e=>({email:e}))),bcc:n?.bccAddresses?.length?n.bccAddresses.map((e=>({email:e}))):void 0};return await t.sendTransacEmail({sendSmtpEmail:i})}catch(e){throw t.error("Failed to send email: %s",e,e),e}}}const f="https://api.sendinblue.com/v3".replace(/\/+$/,"");class h{configuration;constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return null!=this.configuration.basePath?this.configuration.basePath:f}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||k}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return"function"==typeof e?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return"function"==typeof e?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const g=new h;class w{configuration;static jsonRegex=new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$","i");middleware;constructor(e=g){this.configuration=e,this.middleware=e.middleware}withMiddleware(...e){const t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){const t=e.map((e=>({pre:e})));return this.withMiddleware(...t)}withPostMiddleware(...e){const t=e.map((e=>({post:e})));return this.withMiddleware(...t)}isJsonMime(e){return!!e&&w.jsonRegex.test(e)}async request(e,t){const{url:n,init:i}=await this.createFetchParams(e,t),a=await this.fetchApi(n,i);if(a&&a.status>=200&&a.status<300)return a;throw new y(a,"Response returned an error code")}async createFetchParams(e,t){let n=this.configuration.basePath+e.path;void 0!==e.query&&0!==Object.keys(e.query).length&&(n+="?"+this.configuration.queryParamsStringify(e.query));const i=Object.assign({},this.configuration.headers,e.headers);Object.keys(i).forEach((e=>void 0===i[e]?delete i[e]:{}));const a="function"==typeof t?t:async()=>t,r={method:e.method,headers:i,body:e.body,credentials:this.configuration.credentials},s={...r,...await a({init:r,context:e})};let o;var u;u=s.body,o="undefined"!=typeof FormData&&u instanceof FormData||s.body instanceof URLSearchParams||function(e){return"undefined"!=typeof Blob&&e instanceof Blob}(s.body)?s.body:this.isJsonMime(i["Content-Type"])?JSON.stringify(s.body):s.body;return{url:n,init:{...s,body:o}}}fetchApi=async(e,t)=>{let n,i={url:e,init:t};for(const e of this.middleware)e.pre&&(i=await e.pre({fetch:this.fetchApi,...i})||i);try{n=await(this.configuration.fetchApi||fetch)(i.url,i.init)}catch(e){for(const t of this.middleware)t.onError&&(n=await t.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:e,response:n?n.clone():void 0})||n);if(void 0===n)throw e instanceof Error?new v(e,"The request failed and the interceptors did not return an alternative response"):e}for(const e of this.middleware)e.post&&(n=await e.post({fetch:this.fetchApi,url:i.url,init:i.init,response:n.clone()})||n);return n};clone(){const e=new(0,this.constructor)(this.configuration);return e.middleware=this.middleware.slice(),e}}class y extends Error{response;name="ResponseError";constructor(e,t){super(t),this.response=e}}class v extends Error{cause;name="FetchError";constructor(e,t){super(t),this.cause=e}}class b extends Error{field;name="RequiredError";constructor(e,t){super(t),this.field=e}}const I={csv:",",ssv:" ",tsv:"\t",pipes:"|"};function C(e,t){const n=e[t];return null!=n}function k(e,t=""){return Object.keys(e).map((n=>R(n,e[n],t))).filter((e=>e.length>0)).join("&")}function R(e,t,n=""){const i=n+(n.length?`[${e}]`:e);if(t instanceof Array){const e=t.map((e=>encodeURIComponent(String(e)))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${e}`}if(t instanceof Set){return R(e,Array.from(t),n)}return t instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?k(t,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(t))}`}function q(e,t){return Object.keys(e).reduce(((n,i)=>({...n,[i]:t(e[i])})),{})}function S(e){for(const t of e)if("multipart/form-data"===t.contentType)return!0;return!1}class A{raw;transformer;constructor(e,t=(e=>e)){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}}class T{raw;constructor(e){this.raw=e}async value(){}}class B{raw;constructor(e){this.raw=e}async value(){return await this.raw.blob()}}class D{raw;constructor(e){this.raw=e}async value(){return await this.raw.text()}}function E(e){let t=!0;return t=t&&"link"in e,t=t&&"clicksCount"in e,t=t&&"clickRate"in e,t}function N(e){return P(e)}function P(e,t){return null==e?e:{link:e.link,clicksCount:e.clicksCount,clickRate:e.clickRate}}function K(e){if(void 0!==e)return null===e?null:{link:e.link,clicksCount:e.clicksCount,clickRate:e.clickRate}}function U(e){let t=!0;return t=t&&"versionA"in e,t=t&&"versionB"in e,t}function L(e){return j(e)}function j(e,t){return null==e?e:{versionA:e["Version A"].map(N),versionB:e["Version B"].map(N)}}function F(e){if(void 0!==e)return null===e?null:{"Version A":e.versionA.map(K),"Version B":e.versionB.map(K)}}function O(e){let t=!0;return t=t&&"versionA"in e,t=t&&"versionB"in e,t}function x(e){return G(e)}function G(e,t){return null==e?e:{versionA:e["Version A"],versionB:e["Version B"]}}function M(e){if(void 0!==e)return null===e?null:{"Version A":e.versionA,"Version B":e.versionB}}function V(e){let t=!0;return t=t&&"openers"in e,t=t&&"clicks"in e,t=t&&"unsubscribed"in e,t=t&&"hardBounces"in e,t=t&&"softBounces"in e,t=t&&"complaints"in e,t}function W(e){return _(e)}function _(e,t){return null==e?e:{openers:x(e.openers),clicks:x(e.clicks),unsubscribed:x(e.unsubscribed),hardBounces:x(e.hardBounces),softBounces:x(e.softBounces),complaints:x(e.complaints)}}function H(e){if(void 0!==e)return null===e?null:{openers:M(e.openers),clicks:M(e.clicks),unsubscribed:M(e.unsubscribed),hardBounces:M(e.hardBounces),softBounces:M(e.softBounces),complaints:M(e.complaints)}}var Q,$,z,J,Y,X,Z,ee,te,ne,ie,ae,re,se,oe,ue,le,de,ce,me,pe,fe,he,ge,we,ye,ve,be,Ie,Ce,ke,Re,qe,Se,Ae,Te,Be,De,Ee,Ne,Pe,Ke,Ue,Le,je,Fe,Oe,xe,Ge,Me,Ve,We,_e,He,Qe,$e,ze,Je,Ye,Xe,Ze,et,tt,nt,it,at,rt,st,ot,ut;function lt(e){return!0}function dt(e){return ct(e)}function ct(e,t){return null==e?e:{winningVersion:C(e,"winningVersion")?e.winningVersion:void 0,winningCriteria:C(e,"winningCriteria")?e.winningCriteria:void 0,winningSubjectLine:C(e,"winningSubjectLine")?e.winningSubjectLine:void 0,openRate:C(e,"openRate")?e.openRate:void 0,clickRate:C(e,"clickRate")?e.clickRate:void 0,winningVersionRate:C(e,"winningVersionRate")?e.winningVersionRate:void 0,statistics:C(e,"statistics")?W(e.statistics):void 0,clickedLinks:C(e,"clickedLinks")?L(e.clickedLinks):void 0}}function mt(e){if(void 0!==e)return null===e?null:{winningVersion:e.winningVersion,winningCriteria:e.winningCriteria,winningSubjectLine:e.winningSubjectLine,openRate:e.openRate,clickRate:e.clickRate,winningVersionRate:e.winningVersionRate,statistics:H(e.statistics),clickedLinks:F(e.clickedLinks)}}function pt(e){return!0}function ft(e){return ht(e)}function ht(e,t){return null==e?e:{domain:C(e,"domain")?e.domain:void 0}}function gt(e){if(void 0!==e)return null===e?null:{domain:e.domain}}function wt(e){return!0}function yt(e){return vt(e)}function vt(e,t){return null==e?e:{emails:C(e,"emails")?e.emails:void 0}}function bt(e){if(void 0!==e)return null===e?null:{emails:e.emails}}function It(e){return!0}function Ct(e){return kt(e)}function kt(e,t){return null==e?e:{sms:C(e,"sms")?e.sms:void 0,email:C(e,"email")?e.email:void 0}}function Rt(e){if(void 0!==e)return null===e?null:{sms:e.sms,email:e.email}}function qt(e){let t=!0;return t=t&&"domain"in e,t}function St(e){return At(e)}function At(e,t){return null==e?e:{domain:e.domain}}function Tt(e){if(void 0!==e)return null===e?null:{domain:e.domain}}function Bt(e){return!0}function Dt(e){return Et(e)}function Et(e,t){return null==e?e:{type:C(e,"type")?e.type:void 0,text:C(e,"text")?e.text:void 0}}function Nt(e){if(void 0!==e)return null===e?null:{type:e.type,text:e.text}}function Pt(e){let t=!0;return t=t&&"value"in e,t=t&&"label"in e,t}function Kt(e){return Ut(e)}function Ut(e,t){return null==e?e:{value:e.value,label:e.label}}function Lt(e){if(void 0!==e)return null===e?null:{value:e.value,label:e.label}}function jt(e){return!0}function Ft(e){return Ot(e)}function Ot(e,t){return null==e?e:{value:C(e,"value")?e.value:void 0,enumeration:C(e,"enumeration")?e.enumeration.map(Kt):void 0,type:C(e,"type")?e.type:void 0}}function xt(e){if(void 0!==e)return null===e?null:{value:e.value,enumeration:void 0===e.enumeration?void 0:e.enumeration.map(Lt),type:e.type}}function Gt(e){let t=!0;return t=t&&"email"in e,t=t&&"firstName"in e,t=t&&"lastName"in e,t=t&&"companyName"in e,t=t&&"password"in e,t}function Mt(e){return Vt(e)}function Vt(e,t){return null==e?e:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,password:e.password,language:C(e,"language")?e.language:void 0}}function Wt(e){if(void 0!==e)return null===e?null:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,password:e.password,language:e.language}}function _t(e){return!0}function Ht(e){return Qt(e)}function Qt(e,t){return null==e?e:{email:C(e,"email")?e.email:void 0,attributes:C(e,"attributes")?e.attributes:void 0,emailBlacklisted:C(e,"emailBlacklisted")?e.emailBlacklisted:void 0,smsBlacklisted:C(e,"smsBlacklisted")?e.smsBlacklisted:void 0,listIds:C(e,"listIds")?e.listIds:void 0,updateEnabled:C(e,"updateEnabled")?e.updateEnabled:void 0,smtpBlacklistSender:C(e,"smtpBlacklistSender")?e.smtpBlacklistSender:void 0}}function $t(e){if(void 0!==e)return null===e?null:{email:e.email,attributes:e.attributes,emailBlacklisted:e.emailBlacklisted,smsBlacklisted:e.smsBlacklisted,listIds:e.listIds,updateEnabled:e.updateEnabled,smtpBlacklistSender:e.smtpBlacklistSender}}function zt(e){let t=!0;return t=t&&"email"in e,t=t&&"includeListIds"in e,t=t&&"templateId"in e,t=t&&"redirectionUrl"in e,t}function Jt(e){return Yt(e)}function Yt(e,t){return null==e?e:{email:e.email,attributes:C(e,"attributes")?e.attributes:void 0,includeListIds:e.includeListIds,excludeListIds:C(e,"excludeListIds")?e.excludeListIds:void 0,templateId:e.templateId,redirectionUrl:e.redirectionUrl}}function Xt(e){if(void 0!==e)return null===e?null:{email:e.email,attributes:e.attributes,includeListIds:e.includeListIds,excludeListIds:e.excludeListIds,templateId:e.templateId,redirectionUrl:e.redirectionUrl}}function Zt(e){return!0}function en(e){return tn(e)}function tn(e,t){return null==e?e:{exclusionListIds:C(e,"exclusionListIds")?e.exclusionListIds:void 0,listIds:C(e,"listIds")?e.listIds:void 0}}function nn(e){if(void 0!==e)return null===e?null:{exclusionListIds:e.exclusionListIds,listIds:e.listIds}}function an(e){return!0}function rn(e){return sn(e)}function sn(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:C(e,"email")?e.email:void 0,id:C(e,"id")?e.id:void 0}}function on(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,id:e.id}}function un(e){let t=!0;return t=t&&"sender"in e,t=t&&"name"in e,t}function ln(e){return dn(e)}function dn(e,t){return null==e?e:{tag:C(e,"tag")?e.tag:void 0,sender:rn(e.sender),name:e.name,htmlContent:C(e,"htmlContent")?e.htmlContent:void 0,htmlUrl:C(e,"htmlUrl")?e.htmlUrl:void 0,templateId:C(e,"templateId")?e.templateId:void 0,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0,subject:C(e,"subject")?e.subject:void 0,replyTo:C(e,"replyTo")?e.replyTo:void 0,toField:C(e,"toField")?e.toField:void 0,recipients:C(e,"recipients")?en(e.recipients):void 0,attachmentUrl:C(e,"attachmentUrl")?e.attachmentUrl:void 0,inlineImageActivation:C(e,"inlineImageActivation")?e.inlineImageActivation:void 0,mirrorActive:C(e,"mirrorActive")?e.mirrorActive:void 0,footer:C(e,"footer")?e.footer:void 0,header:C(e,"header")?e.header:void 0,utmCampaign:C(e,"utmCampaign")?e.utmCampaign:void 0,params:C(e,"params")?e.params:void 0,sendAtBestTime:C(e,"sendAtBestTime")?e.sendAtBestTime:void 0,abTesting:C(e,"abTesting")?e.abTesting:void 0,subjectA:C(e,"subjectA")?e.subjectA:void 0,subjectB:C(e,"subjectB")?e.subjectB:void 0,splitRule:C(e,"splitRule")?e.splitRule:void 0,winnerCriteria:C(e,"winnerCriteria")?e.winnerCriteria:void 0,winnerDelay:C(e,"winnerDelay")?e.winnerDelay:void 0,ipWarmupEnable:C(e,"ipWarmupEnable")?e.ipWarmupEnable:void 0,initialQuota:C(e,"initialQuota")?e.initialQuota:void 0,increaseRate:C(e,"increaseRate")?e.increaseRate:void 0}}function cn(e){if(void 0!==e)return null===e?null:{tag:e.tag,sender:on(e.sender),name:e.name,htmlContent:e.htmlContent,htmlUrl:e.htmlUrl,templateId:e.templateId,scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString(),subject:e.subject,replyTo:e.replyTo,toField:e.toField,recipients:nn(e.recipients),attachmentUrl:e.attachmentUrl,inlineImageActivation:e.inlineImageActivation,mirrorActive:e.mirrorActive,footer:e.footer,header:e.header,utmCampaign:e.utmCampaign,params:e.params,sendAtBestTime:e.sendAtBestTime,abTesting:e.abTesting,subjectA:e.subjectA,subjectB:e.subjectB,splitRule:e.splitRule,winnerCriteria:e.winnerCriteria,winnerDelay:e.winnerDelay,ipWarmupEnable:e.ipWarmupEnable,initialQuota:e.initialQuota,increaseRate:e.increaseRate}}function mn(e){let t=!0;return t=t&&"name"in e,t=t&&"folderId"in e,t}function pn(e){return fn(e)}function fn(e,t){return null==e?e:{name:e.name,folderId:e.folderId}}function hn(e){if(void 0!==e)return null===e?null:{name:e.name,folderId:e.folderId}}function gn(e){let t=!0;return t=t&&"id"in e,t}function wn(e){return yn(e)}function yn(e,t){return null==e?e:{id:e.id}}function vn(e){if(void 0!==e)return null===e?null:{id:e.id}}function bn(e){let t=!0;return t=t&&"authKey"in e,t}function In(e){return Cn(e)}function Cn(e,t){return null==e?e:{authKey:e.authKey,id:C(e,"id")?e.id:void 0}}function kn(e){if(void 0!==e)return null===e?null:{authKey:e.authKey,id:e.id}}function Rn(e){let t=!0;return t=t&&"ip"in e,t=t&&"domain"in e,t}function qn(e){return Sn(e)}function Sn(e,t){return null==e?e:{ip:e.ip,domain:e.domain,weight:C(e,"weight")?e.weight:void 0}}function An(e){if(void 0!==e)return null===e?null:{ip:e.ip,domain:e.domain,weight:e.weight}}function Tn(e){let t=!0;return t=t&&"name"in e,t=t&&"email"in e,t}function Bn(e){return Dn(e)}function Dn(e,t){return null==e?e:{name:e.name,email:e.email,ips:C(e,"ips")?e.ips.map(qn):void 0}}function En(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,ips:void 0===e.ips?void 0:e.ips.map(An)}}function Nn(e){let t=!0;return t=t&&"id"in e,t}function Pn(e){return Kn(e)}function Kn(e,t){return null==e?e:{id:e.id,spfError:C(e,"spfError")?e.spfError:void 0,dkimError:C(e,"dkimError")?e.dkimError:void 0}}function Un(e){if(void 0!==e)return null===e?null:{id:e.id,spfError:e.spfError,dkimError:e.dkimError}}function Ln(e){let t=!0;return t=t&&"listIds"in e,t}function jn(e){return Fn(e)}function Fn(e,t){return null==e?e:{listIds:e.listIds,exclusionListIds:C(e,"exclusionListIds")?e.exclusionListIds:void 0}}function On(e){if(void 0!==e)return null===e?null:{listIds:e.listIds,exclusionListIds:e.exclusionListIds}}function xn(e){let t=!0;return t=t&&"name"in e,t=t&&"sender"in e,t=t&&"content"in e,t}function Gn(e){return Mn(e)}function Mn(e,t){return null==e?e:{name:e.name,sender:e.sender,content:e.content,recipients:C(e,"recipients")?jn(e.recipients):void 0,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0}}function Vn(e){if(void 0!==e)return null===e?null:{name:e.name,sender:e.sender,content:e.content,recipients:On(e.recipients),scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString()}}function Wn(e){let t=!0;return t=t&&"messageId"in e,t}function _n(e){return Hn(e)}function Hn(e,t){return null==e?e:{messageId:e.messageId}}function Qn(e){if(void 0!==e)return null===e?null:{messageId:e.messageId}}function $n(e){return!0}function zn(e){return Jn(e)}function Jn(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:C(e,"email")?e.email:void 0,id:C(e,"id")?e.id:void 0}}function Yn(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,id:e.id}}function Xn(e){let t=!0;return t=t&&"sender"in e,t=t&&"templateName"in e,t=t&&"subject"in e,t}function Zn(e){return ei(e)}function ei(e,t){return null==e?e:{tag:C(e,"tag")?e.tag:void 0,sender:zn(e.sender),templateName:e.templateName,htmlContent:C(e,"htmlContent")?e.htmlContent:void 0,htmlUrl:C(e,"htmlUrl")?e.htmlUrl:void 0,subject:e.subject,replyTo:C(e,"replyTo")?e.replyTo:void 0,toField:C(e,"toField")?e.toField:void 0,attachmentUrl:C(e,"attachmentUrl")?e.attachmentUrl:void 0,isActive:C(e,"isActive")?e.isActive:void 0}}function ti(e){if(void 0!==e)return null===e?null:{tag:e.tag,sender:Yn(e.sender),templateName:e.templateName,htmlContent:e.htmlContent,htmlUrl:e.htmlUrl,subject:e.subject,replyTo:e.replyTo,toField:e.toField,attachmentUrl:e.attachmentUrl,isActive:e.isActive}}function ni(e){return!0}function ii(e){return ai(e)}function ai(e,t){return null==e?e:{id:C(e,"id")?e.id:void 0}}function ri(e){if(void 0!==e)return null===e?null:{id:e.id}}function si(e){return!0}function oi(e){return ui(e)}function ui(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0}}function li(e){if(void 0!==e)return null===e?null:{name:e.name}}function di(e){let t=!0;return t=t&&"url"in e,t=t&&"events"in e,t}function ci(e){return mi(e)}function mi(e,t){return null==e?e:{url:e.url,description:C(e,"description")?e.description:void 0,events:e.events,type:C(e,"type")?e.type:void 0}}function pi(e){if(void 0!==e)return null===e?null:{url:e.url,description:e.description,events:e.events,type:e.type}}function fi(e){let t=!0;return t=t&&"processId"in e,t}function hi(e){return gi(e)}function gi(e,t){return null==e?e:{processId:e.processId}}function wi(e){if(void 0!==e)return null===e?null:{processId:e.processId}}function yi(e){return!0}function vi(e){return bi(e)}function bi(e,t){return null==e?e:{startDate:C(e,"startDate")?e.startDate:void 0,endDate:C(e,"endDate")?e.endDate:void 0,contactEmail:C(e,"contactEmail")?e.contactEmail:void 0}}function Ii(e){if(void 0!==e)return null===e?null:{startDate:e.startDate,endDate:e.endDate,contactEmail:e.contactEmail}}function Ci(e){let t=!0;return t=t&&"recipientsType"in e,t}function ki(e){return Ri(e)}function Ri(e,t){return null==e?e:{notifyURL:C(e,"notifyURL")?e.notifyURL:void 0,recipientsType:e.recipientsType}}function qi(e){if(void 0!==e)return null===e?null:{notifyURL:e.notifyURL,recipientsType:e.recipientsType}}function Si(e){let t=!0;return t=t&&"code"in e,t=t&&"message"in e,t}function Ai(e){return Ti(e)}function Ti(e,t){return null==e?e:{code:e.code,message:e.message}}function Bi(e){if(void 0!==e)return null===e?null:{code:e.code,message:e.message}}function Di(e){let t=!0;return t=t&&"enabled"in e,t}function Ei(e){return Ni(e)}function Ni(e,t){return null==e?e:{key:C(e,"key")?e.key:void 0,enabled:e.enabled}}function Pi(e){if(void 0!==e)return null===e?null:{key:e.key,enabled:e.enabled}}function Ki(e){let t=!0;return t=t&&"type"in e,t=t&&"creditsType"in e,t=t&&"credits"in e,t}function Ui(e){return Li(e)}function Li(e,t){return null==e?e:{type:e.type,creditsType:e.creditsType,credits:e.credits,startDate:C(e,"startDate")?new Date(e.startDate):void 0,endDate:C(e,"endDate")?new Date(e.endDate):void 0,userLimit:C(e,"userLimit")?e.userLimit:void 0}}function ji(e){if(void 0!==e)return null===e?null:{type:e.type,creditsType:e.creditsType,credits:e.credits,startDate:void 0===e.startDate?void 0:e.startDate.toISOString().substring(0,10),endDate:void 0===e.endDate?void 0:e.endDate.toISOString().substring(0,10),userLimit:e.userLimit}}function Fi(e){let t=!0;return t=t&&"userName"in e,t=t&&"relay"in e,t=t&&"port"in e,t}function Oi(e){return xi(e)}function xi(e,t){return null==e?e:{userName:e.userName,relay:e.relay,port:e.port}}function Gi(e){if(void 0!==e)return null===e?null:{userName:e.userName,relay:e.relay,port:e.port}}function Mi(e){let t=!0;return t=t&&"enabled"in e,t=t&&"data"in e,t}function Vi(e){return Wi(e)}function Wi(e,t){return null==e?e:{enabled:e.enabled,data:Oi(e.data)}}function _i(e){if(void 0!==e)return null===e?null:{enabled:e.enabled,data:Gi(e.data)}}function Hi(e){let t=!0;return t=t&&"street"in e,t=t&&"city"in e,t=t&&"zipCode"in e,t=t&&"country"in e,t}function Qi(e){return $i(e)}function $i(e,t){return null==e?e:{street:e.street,city:e.city,zipCode:e.zipCode,country:e.country}}function zi(e){if(void 0!==e)return null===e?null:{street:e.street,city:e.city,zipCode:e.zipCode,country:e.country}}function Ji(e){let t=!0;return t=t&&"email"in e,t=t&&"firstName"in e,t=t&&"lastName"in e,t=t&&"companyName"in e,t=t&&"address"in e,t=t&&"plan"in e,t=t&&"relay"in e,t}function Yi(e){return Xi(e)}function Xi(e,t){return null==e?e:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,address:Qi(e.address),plan:e.plan.map(Ui),relay:Vi(e.relay),marketingAutomation:C(e,"marketingAutomation")?Ei(e.marketingAutomation):void 0}}function Zi(e){if(void 0!==e)return null===e?null:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,address:zi(e.address),plan:e.plan.map(ji),relay:_i(e.relay),marketingAutomation:Pi(e.marketingAutomation)}}function ea(e){let t=!0;return t=t&&"range"in e,t=t&&"requests"in e,t=t&&"delivered"in e,t=t&&"hardBounces"in e,t=t&&"softBounces"in e,t=t&&"clicks"in e,t=t&&"uniqueClicks"in e,t=t&&"opens"in e,t=t&&"uniqueOpens"in e,t=t&&"spamReports"in e,t=t&&"blocked"in e,t=t&&"invalid"in e,t=t&&"unsubscribed"in e,t}function ta(e){return na(e)}function na(e,t){return null==e?e:{range:e.range,requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,clicks:e.clicks,uniqueClicks:e.uniqueClicks,opens:e.opens,uniqueOpens:e.uniqueOpens,spamReports:e.spamReports,blocked:e.blocked,invalid:e.invalid,unsubscribed:e.unsubscribed}}function ia(e){if(void 0!==e)return null===e?null:{range:e.range,requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,clicks:e.clicks,uniqueClicks:e.uniqueClicks,opens:e.opens,uniqueOpens:e.uniqueOpens,spamReports:e.spamReports,blocked:e.blocked,invalid:e.invalid,unsubscribed:e.unsubscribed}}function aa(e){let t=!0;return t=t&&"value"in e,t=t&&"label"in e,t}function ra(e){return sa(e)}function sa(e,t){return null==e?e:{value:e.value,label:e.label}}function oa(e){if(void 0!==e)return null===e?null:{value:e.value,label:e.label}}function ua(e){let t=!0;return t=t&&"name"in e,t=t&&"category"in e,t}function la(e){return da(e)}function da(e,t){return null==e?e:{name:e.name,category:e.category,type:C(e,"type")?e.type:void 0,enumeration:C(e,"enumeration")?e.enumeration.map(ra):void 0,calculatedValue:C(e,"calculatedValue")?e.calculatedValue:void 0}}function ca(e){if(void 0!==e)return null===e?null:{name:e.name,category:e.category,type:e.type,enumeration:void 0===e.enumeration?void 0:e.enumeration.map(oa),calculatedValue:e.calculatedValue}}function ma(e){let t=!0;return t=t&&"attributes"in e,t}function pa(e){return fa(e)}function fa(e,t){return null==e?e:{attributes:e.attributes.map(la)}}function ha(e){if(void 0!==e)return null===e?null:{attributes:e.attributes.map(ca)}}function ga(e){let t=!0;return t=t&&"domains"in e,t}function wa(e){return ya(e)}function ya(e,t){return null==e?e:{domains:e.domains}}function va(e){if(void 0!==e)return null===e?null:{domains:e.domains}}function ba(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"type"in e,t=t&&"status"in e,t}function Ia(e){return Ca(e)}function Ca(e,t){return null==e?e:{id:e.id,name:e.name,subject:C(e,"subject")?e.subject:void 0,type:e.type,status:e.status,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0,abTesting:C(e,"abTesting")?e.abTesting:void 0,subjectA:C(e,"subjectA")?e.subjectA:void 0,subjectB:C(e,"subjectB")?e.subjectB:void 0,splitRule:C(e,"splitRule")?e.splitRule:void 0,winnerCriteria:C(e,"winnerCriteria")?e.winnerCriteria:void 0,winnerDelay:C(e,"winnerDelay")?e.winnerDelay:void 0,sendAtBestTime:C(e,"sendAtBestTime")?e.sendAtBestTime:void 0}}function ka(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,subject:e.subject,type:e.type,status:e.status,scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString(),abTesting:e.abTesting,subjectA:e.subjectA,subjectB:e.subjectB,splitRule:e.splitRule,winnerCriteria:e.winnerCriteria,winnerDelay:e.winnerDelay,sendAtBestTime:e.sendAtBestTime}}function Ra(e){let t=!0;return t=t&&"lists"in e,t=t&&"exclusionLists"in e,t}function qa(e){return Sa(e)}function Sa(e,t){return null==e?e:{lists:e.lists,exclusionLists:e.exclusionLists}}function Aa(e){if(void 0!==e)return null===e?null:{lists:e.lists,exclusionLists:e.exclusionLists}}function Ta(e){let t=!0;return t=t&&"uniqueClicks"in e,t=t&&"clickers"in e,t=t&&"complaints"in e,t=t&&"delivered"in e,t=t&&"sent"in e,t=t&&"softBounces"in e,t=t&&"hardBounces"in e,t=t&&"uniqueViews"in e,t=t&&"trackableViews"in e,t=t&&"unsubscriptions"in e,t=t&&"viewed"in e,t}function Ba(e){return Da(e)}function Da(e,t){return null==e?e:{listId:C(e,"listId")?e.listId:void 0,uniqueClicks:e.uniqueClicks,clickers:e.clickers,complaints:e.complaints,delivered:e.delivered,sent:e.sent,softBounces:e.softBounces,hardBounces:e.hardBounces,uniqueViews:e.uniqueViews,trackableViews:e.trackableViews,unsubscriptions:e.unsubscriptions,viewed:e.viewed,deferred:C(e,"deferred")?e.deferred:void 0,returnBounce:C(e,"returnBounce")?e.returnBounce:void 0}}function Ea(e){if(void 0!==e)return null===e?null:{listId:e.listId,uniqueClicks:e.uniqueClicks,clickers:e.clickers,complaints:e.complaints,delivered:e.delivered,sent:e.sent,softBounces:e.softBounces,hardBounces:e.hardBounces,uniqueViews:e.uniqueViews,trackableViews:e.trackableViews,unsubscriptions:e.unsubscriptions,viewed:e.viewed,deferred:e.deferred,returnBounce:e.returnBounce}}function Na(e){let t=!0;return t=t&&"childAccountCreated"in e,t}function Pa(e){return Ka(e)}function Ka(e,t){return null==e?e:{childAccountCreated:e.childAccountCreated}}function Ua(e){if(void 0!==e)return null===e?null:{childAccountCreated:e.childAccountCreated}}function La(e){let t=!0;return t=t&&"domain"in e,t=t&&"active"in e,t}function ja(e){return Fa(e)}function Fa(e,t){return null==e?e:{domain:e.domain,active:e.active}}function Oa(e){if(void 0!==e)return null===e?null:{domain:e.domain,active:e.active}}function xa(e){let t=!0;return t=t&&"name"in e,t=t&&"key"in e,t}function Ga(e){return Ma(e)}function Ma(e,t){return null==e?e:{name:e.name,key:e.key}}function Va(e){if(void 0!==e)return null===e?null:{name:e.name,key:e.key}}function Wa(e){let t=!0;return t=t&&"name"in e,t=t&&"key"in e,t}function _a(e){return Ha(e)}function Ha(e,t){return null==e?e:{name:e.name,key:e.key}}function Qa(e){if(void 0!==e)return null===e?null:{name:e.name,key:e.key}}function $a(e){let t=!0;return t=t&&"v2"in e,t}function za(e){return Ja(e)}function Ja(e,t){return null==e?e:{v2:e.v2.map(Ga),v3:C(e,"v3")?e.v3.map(_a):void 0}}function Ya(e){if(void 0!==e)return null===e?null:{v2:e.v2.map(Va),v3:void 0===e.v3?void 0:e.v3.map(Qa)}}function Xa(e){return!0}function Za(e){return er(e)}function er(e,t){return null==e?e:{emailCredits:C(e,"emailCredits")?e.emailCredits:void 0,smsCredits:C(e,"smsCredits")?e.smsCredits:void 0}}function tr(e){if(void 0!==e)return null===e?null:{emailCredits:e.emailCredits,smsCredits:e.smsCredits}}function nr(e){return!0}function ir(e){return ar(e)}function ar(e,t){return null==e?e:{previousMonthTotalSent:C(e,"previousMonthTotalSent")?e.previousMonthTotalSent:void 0,currentMonthTotalSent:C(e,"currentMonthTotalSent")?e.currentMonthTotalSent:void 0,totalSent:C(e,"totalSent")?e.totalSent:void 0}}function rr(e){if(void 0!==e)return null===e?null:{previousMonthTotalSent:e.previousMonthTotalSent,currentMonthTotalSent:e.currentMonthTotalSent,totalSent:e.totalSent}}function sr(e){let t=!0;return t=t&&"email"in e,t=t&&"firstName"in e,t=t&&"lastName"in e,t=t&&"companyName"in e,t=t&&"password"in e,t}function or(e){return ur(e)}function ur(e,t){return null==e?e:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,credits:C(e,"credits")?Za(e.credits):void 0,statistics:C(e,"statistics")?ir(e.statistics):void 0,password:e.password,ips:C(e,"ips")?e.ips:void 0,apiKeys:C(e,"apiKeys")?za(e.apiKeys):void 0}}function lr(e){if(void 0!==e)return null===e?null:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,credits:tr(e.credits),statistics:rr(e.statistics),password:e.password,ips:e.ips,apiKeys:Ya(e.apiKeys)}}function dr(e){let t=!0;return t=t&&"email"in e,t=t&&"firstName"in e,t=t&&"lastName"in e,t=t&&"companyName"in e,t=t&&"password"in e,t}function cr(e){return mr(e)}function mr(e,t){return null==e?e:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,credits:C(e,"credits")?Za(e.credits):void 0,statistics:C(e,"statistics")?ir(e.statistics):void 0,password:e.password,ips:C(e,"ips")?e.ips:void 0,apiKeys:C(e,"apiKeys")?za(e.apiKeys):void 0,id:C(e,"id")?e.id:void 0}}function pr(e){if(void 0!==e)return null===e?null:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,credits:tr(e.credits),statistics:rr(e.statistics),password:e.password,ips:e.ips,apiKeys:Ya(e.apiKeys),id:e.id}}function fr(e){let t=!0;return t=t&&"count"in e,t}function hr(e){return gr(e)}function gr(e,t){return null==e?e:{children:C(e,"children")?e.children.map(cr):void 0,count:e.count}}function wr(e){if(void 0!==e)return null===e?null:{children:void 0===e.children?void 0:e.children.map(pr),count:e.count}}function yr(e){let t=!0;return t=t&&"email"in e,t=t&&"firstName"in e,t=t&&"lastName"in e,t=t&&"companyName"in e,t}function vr(e){return br(e)}function br(e,t){return null==e?e:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName}}function Ir(e){if(void 0!==e)return null===e?null:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName}}function Cr(e){let t=!0;return t=t&&"count"in e,t=t&&"eventTime"in e,t=t&&"ip"in e,t=t&&"url"in e,t}function kr(e){return Rr(e)}function Rr(e,t){return null==e?e:{count:e.count,eventTime:new Date(e.eventTime),ip:e.ip,url:e.url}}function qr(e){if(void 0!==e)return null===e?null:{count:e.count,eventTime:e.eventTime.toISOString(),ip:e.ip,url:e.url}}function Sr(e){let t=!0;return t=t&&"campaignId"in e,t=t&&"links"in e,t}function Ar(e){return Tr(e)}function Tr(e,t){return null==e?e:{campaignId:e.campaignId,links:e.links.map(kr)}}function Br(e){if(void 0!==e)return null===e?null:{campaignId:e.campaignId,links:e.links.map(qr)}}function Dr(e){let t=!0;return t=t&&"campaignId"in e,t=t&&"count"in e,t=t&&"eventTime"in e,t=t&&"ip"in e,t}function Er(e){return Nr(e)}function Nr(e,t){return null==e?e:{campaignId:e.campaignId,count:e.count,eventTime:new Date(e.eventTime),ip:e.ip}}function Pr(e){if(void 0!==e)return null===e?null:{campaignId:e.campaignId,count:e.count,eventTime:e.eventTime.toISOString(),ip:e.ip}}function Kr(e){let t=!0;return t=t&&"orderDate"in e,t=t&&"orderPrice"in e,t=t&&"orderId"in e,t}function Ur(e){return Lr(e)}function Lr(e,t){return null==e?e:{orderDate:new Date(e.orderDate),orderPrice:e.orderPrice,orderId:e.orderId}}function jr(e){if(void 0!==e)return null===e?null:{orderDate:e.orderDate.toISOString().substring(0,10),orderPrice:e.orderPrice,orderId:e.orderId}}function Fr(e){let t=!0;return t=t&&"eventTime"in e,t}function Or(e){return xr(e)}function xr(e,t){return null==e?e:{eventTime:new Date(e.eventTime),ip:C(e,"ip")?e.ip:void 0}}function Gr(e){if(void 0!==e)return null===e?null:{eventTime:e.eventTime.toISOString(),ip:e.ip}}function Mr(e){let t=!0;return t=t&&"campaignId"in e,t=t&&"eventTime"in e,t}function Vr(e){return Wr(e)}function Wr(e,t){return null==e?e:{campaignId:e.campaignId,eventTime:new Date(e.eventTime),ip:C(e,"ip")?e.ip:void 0}}function _r(e){if(void 0!==e)return null===e?null:{campaignId:e.campaignId,eventTime:e.eventTime.toISOString(),ip:e.ip}}function Hr(e){let t=!0;return t=t&&"userUnsubscription"in e,t=t&&"adminUnsubscription"in e,t}function Qr(e){return $r(e)}function $r(e,t){return null==e?e:{userUnsubscription:e.userUnsubscription.map(Vr),adminUnsubscription:e.adminUnsubscription.map(Or)}}function zr(e){if(void 0!==e)return null===e?null:{userUnsubscription:e.userUnsubscription.map(_r),adminUnsubscription:e.adminUnsubscription.map(Gr)}}function Jr(e){let t=!0;return t=t&&"campaignId"in e,t=t&&"eventTime"in e,t}function Yr(e){return Xr(e)}function Xr(e,t){return null==e?e:{campaignId:e.campaignId,eventTime:new Date(e.eventTime)}}function Zr(e){if(void 0!==e)return null===e?null:{campaignId:e.campaignId,eventTime:e.eventTime.toISOString()}}function es(e){return!0}function ts(e){return ns(e)}function ns(e,t){return null==e?e:{messagesSent:C(e,"messagesSent")?e.messagesSent.map(Yr):void 0,hardBounces:C(e,"hardBounces")?e.hardBounces.map(Yr):void 0,softBounces:C(e,"softBounces")?e.softBounces.map(Yr):void 0,complaints:C(e,"complaints")?e.complaints.map(Yr):void 0,unsubscriptions:C(e,"unsubscriptions")?Qr(e.unsubscriptions):void 0,opened:C(e,"opened")?e.opened.map(Er):void 0,clicked:C(e,"clicked")?e.clicked.map(Ar):void 0,transacAttributes:C(e,"transacAttributes")?e.transacAttributes.map(Ur):void 0}}function is(e){if(void 0!==e)return null===e?null:{messagesSent:void 0===e.messagesSent?void 0:e.messagesSent.map(Zr),hardBounces:void 0===e.hardBounces?void 0:e.hardBounces.map(Zr),softBounces:void 0===e.softBounces?void 0:e.softBounces.map(Zr),complaints:void 0===e.complaints?void 0:e.complaints.map(Zr),unsubscriptions:zr(e.unsubscriptions),opened:void 0===e.opened?void 0:e.opened.map(Pr),clicked:void 0===e.clicked?void 0:e.clicked.map(Br),transacAttributes:void 0===e.transacAttributes?void 0:e.transacAttributes.map(jr)}}function as(e){let t=!0;return t=t&&"id"in e,t=t&&"emailBlacklisted"in e,t=t&&"smsBlacklisted"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t=t&&"listIds"in e,t=t&&"attributes"in e,t}function rs(e){return ss(e)}function ss(e,t){return null==e?e:{email:C(e,"email")?e.email:void 0,id:e.id,emailBlacklisted:e.emailBlacklisted,smsBlacklisted:e.smsBlacklisted,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),listIds:e.listIds,listUnsubscribed:C(e,"listUnsubscribed")?e.listUnsubscribed:void 0,attributes:e.attributes}}function os(e){if(void 0!==e)return null===e?null:{email:e.email,id:e.id,emailBlacklisted:e.emailBlacklisted,smsBlacklisted:e.smsBlacklisted,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),listIds:e.listIds,listUnsubscribed:e.listUnsubscribed,attributes:e.attributes}}function us(e){let t=!0;return t=t&&"contacts"in e,t=t&&"count"in e,t}function ls(e){return ds(e)}function ds(e,t){return null==e?e:{contacts:e.contacts.map(rs),count:e.count}}function cs(e){if(void 0!==e)return null===e?null:{contacts:e.contacts.map(os),count:e.count}}function ms(e){let t=!0;return t=t&&"clickers"in e,t=t&&"uniqueClicks"in e,t=t&&"viewed"in e,t=t&&"uniqueViews"in e,t}function ps(e){return fs(e)}function fs(e,t){return null==e?e:{clickers:e.clickers,uniqueClicks:e.uniqueClicks,viewed:e.viewed,uniqueViews:e.uniqueViews}}function hs(e){if(void 0!==e)return null===e?null:{clickers:e.clickers,uniqueClicks:e.uniqueClicks,viewed:e.viewed,uniqueViews:e.uniqueViews}}function gs(e){return!0}function ws(e){return ys(e)}function ys(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:C(e,"email")?e.email:void 0,id:C(e,"id")?e.id:void 0}}function vs(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,id:e.id}}function bs(e){return!0}function Is(e){return Cs(e)}function Cs(e,t){return null==e?e:{desktop:C(e,"desktop")?q(e.desktop,ps):void 0,mobile:C(e,"mobile")?q(e.mobile,ps):void 0,tablet:C(e,"tablet")?q(e.tablet,ps):void 0,unknown:C(e,"unknown")?q(e.unknown,ps):void 0}}function ks(e){if(void 0!==e)return null===e?null:{desktop:void 0===e.desktop?void 0:q(e.desktop,hs),mobile:void 0===e.mobile?void 0:q(e.mobile,hs),tablet:void 0===e.tablet?void 0:q(e.tablet,hs),unknown:void 0===e.unknown?void 0:q(e.unknown,hs)}}function Rs(e){let t=!0;return t=t&&"globalStats"in e,t=t&&"campaignStats"in e,t=t&&"mirrorClick"in e,t=t&&"remaining"in e,t=t&&"linksStats"in e,t=t&&"statsByDomain"in e,t=t&&"statsByDevice"in e,t=t&&"statsByBrowser"in e,t}function qs(e){return Ss(e)}function Ss(e,t){return null==e?e:{globalStats:Ba(e.globalStats),campaignStats:e.campaignStats.map(Ba),mirrorClick:e.mirrorClick,remaining:e.remaining,linksStats:e.linksStats,statsByDomain:q(e.statsByDomain,Ba),statsByDevice:Is(e.statsByDevice),statsByBrowser:q(e.statsByBrowser,ps)}}function As(e){if(void 0!==e)return null===e?null:{globalStats:Ea(e.globalStats),campaignStats:e.campaignStats.map(Ea),mirrorClick:e.mirrorClick,remaining:e.remaining,linksStats:e.linksStats,statsByDomain:q(e.statsByDomain,Ea),statsByDevice:ks(e.statsByDevice),statsByBrowser:q(e.statsByBrowser,hs)}}function Ts(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"type"in e,t=t&&"status"in e,t=t&&"testSent"in e,t=t&&"header"in e,t=t&&"footer"in e,t=t&&"sender"in e,t=t&&"replyTo"in e,t=t&&"toField"in e,t=t&&"htmlContent"in e,t=t&&"tag"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t=t&&"recipients"in e,t=t&&"statistics"in e,t}function Bs(e){return Ds(e)}function Ds(e,t){return null==e?e:{id:e.id,name:e.name,subject:C(e,"subject")?e.subject:void 0,type:e.type,status:e.status,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0,abTesting:C(e,"abTesting")?e.abTesting:void 0,subjectA:C(e,"subjectA")?e.subjectA:void 0,subjectB:C(e,"subjectB")?e.subjectB:void 0,splitRule:C(e,"splitRule")?e.splitRule:void 0,winnerCriteria:C(e,"winnerCriteria")?e.winnerCriteria:void 0,winnerDelay:C(e,"winnerDelay")?e.winnerDelay:void 0,sendAtBestTime:C(e,"sendAtBestTime")?e.sendAtBestTime:void 0,testSent:e.testSent,header:e.header,footer:e.footer,sender:ws(e.sender),replyTo:e.replyTo,toField:e.toField,htmlContent:e.htmlContent,shareLink:C(e,"shareLink")?e.shareLink:void 0,tag:e.tag,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),inlineImageActivation:C(e,"inlineImageActivation")?e.inlineImageActivation:void 0,mirrorActive:C(e,"mirrorActive")?e.mirrorActive:void 0,recurring:C(e,"recurring")?e.recurring:void 0,sentDate:C(e,"sentDate")?new Date(e.sentDate):void 0,returnBounce:C(e,"returnBounce")?e.returnBounce:void 0,recipients:qa(e.recipients),statistics:qs(e.statistics)}}function Es(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,subject:e.subject,type:e.type,status:e.status,scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString(),abTesting:e.abTesting,subjectA:e.subjectA,subjectB:e.subjectB,splitRule:e.splitRule,winnerCriteria:e.winnerCriteria,winnerDelay:e.winnerDelay,sendAtBestTime:e.sendAtBestTime,testSent:e.testSent,header:e.header,footer:e.footer,sender:vs(e.sender),replyTo:e.replyTo,toField:e.toField,htmlContent:e.htmlContent,shareLink:e.shareLink,tag:e.tag,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),inlineImageActivation:e.inlineImageActivation,mirrorActive:e.mirrorActive,recurring:e.recurring,sentDate:void 0===e.sentDate?void 0:e.sentDate.toISOString(),returnBounce:e.returnBounce,recipients:Aa(e.recipients),statistics:As(e.statistics)}}function Ns(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"type"in e,t=t&&"status"in e,t=t&&"testSent"in e,t=t&&"header"in e,t=t&&"footer"in e,t=t&&"sender"in e,t=t&&"replyTo"in e,t=t&&"toField"in e,t=t&&"htmlContent"in e,t=t&&"tag"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t=t&&"recipients"in e,t=t&&"statistics"in e,t}function Ps(e){return Ks(e)}function Ks(e,t){return null==e?e:{id:e.id,name:e.name,subject:C(e,"subject")?e.subject:void 0,type:e.type,status:e.status,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0,abTesting:C(e,"abTesting")?e.abTesting:void 0,subjectA:C(e,"subjectA")?e.subjectA:void 0,subjectB:C(e,"subjectB")?e.subjectB:void 0,splitRule:C(e,"splitRule")?e.splitRule:void 0,winnerCriteria:C(e,"winnerCriteria")?e.winnerCriteria:void 0,winnerDelay:C(e,"winnerDelay")?e.winnerDelay:void 0,sendAtBestTime:C(e,"sendAtBestTime")?e.sendAtBestTime:void 0,testSent:e.testSent,header:e.header,footer:e.footer,sender:ws(e.sender),replyTo:e.replyTo,toField:e.toField,htmlContent:e.htmlContent,shareLink:C(e,"shareLink")?e.shareLink:void 0,tag:e.tag,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),inlineImageActivation:C(e,"inlineImageActivation")?e.inlineImageActivation:void 0,mirrorActive:C(e,"mirrorActive")?e.mirrorActive:void 0,recurring:C(e,"recurring")?e.recurring:void 0,sentDate:C(e,"sentDate")?new Date(e.sentDate):void 0,returnBounce:C(e,"returnBounce")?e.returnBounce:void 0,recipients:qa(e.recipients),statistics:qs(e.statistics)}}function Us(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,subject:e.subject,type:e.type,status:e.status,scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString(),abTesting:e.abTesting,subjectA:e.subjectA,subjectB:e.subjectB,splitRule:e.splitRule,winnerCriteria:e.winnerCriteria,winnerDelay:e.winnerDelay,sendAtBestTime:e.sendAtBestTime,testSent:e.testSent,header:e.header,footer:e.footer,sender:vs(e.sender),replyTo:e.replyTo,toField:e.toField,htmlContent:e.htmlContent,shareLink:e.shareLink,tag:e.tag,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),inlineImageActivation:e.inlineImageActivation,mirrorActive:e.mirrorActive,recurring:e.recurring,sentDate:void 0===e.sentDate?void 0:e.sentDate.toISOString(),returnBounce:e.returnBounce,recipients:Aa(e.recipients),statistics:As(e.statistics)}}function Ls(e){let t=!0;return t=t&&"count"in e,t}function js(e){return Fs(e)}function Fs(e,t){return null==e?e:{campaigns:C(e,"campaigns")?e.campaigns.map(Ps):void 0,count:e.count}}function Os(e){if(void 0!==e)return null===e?null:{campaigns:void 0===e.campaigns?void 0:e.campaigns.map(Us),count:e.count}}function xs(e){let t=!0;return t=t&&"email"in e,t=t&&"date"in e,t=t&&"messageId"in e,t=t&&"event"in e,t}function Gs(e){return Ms(e)}function Ms(e,t){return null==e?e:{email:e.email,date:new Date(e.date),subject:C(e,"subject")?e.subject:void 0,messageId:e.messageId,event:e.event,reason:C(e,"reason")?e.reason:void 0,tag:C(e,"tag")?e.tag:void 0,ip:C(e,"ip")?e.ip:void 0,link:C(e,"link")?e.link:void 0,from:C(e,"from")?e.from:void 0}}function Vs(e){if(void 0!==e)return null===e?null:{email:e.email,date:e.date.toISOString(),subject:e.subject,messageId:e.messageId,event:e.event,reason:e.reason,tag:e.tag,ip:e.ip,link:e.link,from:e.from}}function Ws(e){return!0}function _s(e){return Hs(e)}function Hs(e,t){return null==e?e:{events:C(e,"events")?e.events.map(Gs):void 0}}function Qs(e){if(void 0!==e)return null===e?null:{events:void 0===e.events?void 0:e.events.map(Vs)}}function $s(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"type"in e,t=t&&"status"in e,t=t&&"testSent"in e,t=t&&"header"in e,t=t&&"footer"in e,t=t&&"sender"in e,t=t&&"replyTo"in e,t=t&&"toField"in e,t=t&&"htmlContent"in e,t=t&&"tag"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t}function zs(e){return Js(e)}function Js(e,t){return null==e?e:{id:e.id,name:e.name,subject:C(e,"subject")?e.subject:void 0,type:e.type,status:e.status,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0,abTesting:C(e,"abTesting")?e.abTesting:void 0,subjectA:C(e,"subjectA")?e.subjectA:void 0,subjectB:C(e,"subjectB")?e.subjectB:void 0,splitRule:C(e,"splitRule")?e.splitRule:void 0,winnerCriteria:C(e,"winnerCriteria")?e.winnerCriteria:void 0,winnerDelay:C(e,"winnerDelay")?e.winnerDelay:void 0,sendAtBestTime:C(e,"sendAtBestTime")?e.sendAtBestTime:void 0,testSent:e.testSent,header:e.header,footer:e.footer,sender:ws(e.sender),replyTo:e.replyTo,toField:e.toField,htmlContent:e.htmlContent,shareLink:C(e,"shareLink")?e.shareLink:void 0,tag:e.tag,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),inlineImageActivation:C(e,"inlineImageActivation")?e.inlineImageActivation:void 0,mirrorActive:C(e,"mirrorActive")?e.mirrorActive:void 0,recurring:C(e,"recurring")?e.recurring:void 0,sentDate:C(e,"sentDate")?new Date(e.sentDate):void 0,returnBounce:C(e,"returnBounce")?e.returnBounce:void 0}}function Ys(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,subject:e.subject,type:e.type,status:e.status,scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString(),abTesting:e.abTesting,subjectA:e.subjectA,subjectB:e.subjectB,splitRule:e.splitRule,winnerCriteria:e.winnerCriteria,winnerDelay:e.winnerDelay,sendAtBestTime:e.sendAtBestTime,testSent:e.testSent,header:e.header,footer:e.footer,sender:vs(e.sender),replyTo:e.replyTo,toField:e.toField,htmlContent:e.htmlContent,shareLink:e.shareLink,tag:e.tag,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),inlineImageActivation:e.inlineImageActivation,mirrorActive:e.mirrorActive,recurring:e.recurring,sentDate:void 0===e.sentDate?void 0:e.sentDate.toISOString(),returnBounce:e.returnBounce}}function Xs(e){let t=!0;return t=t&&"email"in e,t=t&&"firstName"in e,t=t&&"lastName"in e,t=t&&"companyName"in e,t=t&&"address"in e,t}function Zs(e){return eo(e)}function eo(e,t){return null==e?e:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,address:Qi(e.address)}}function to(e){if(void 0!==e)return null===e?null:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,address:zi(e.address)}}function no(e){let t=!0;return t=t&&"campaignId"in e,t=t&&"links"in e,t}function io(e){return ao(e)}function ao(e,t){return null==e?e:{campaignId:e.campaignId,links:e.links.map(kr)}}function ro(e){if(void 0!==e)return null===e?null:{campaignId:e.campaignId,links:e.links.map(qr)}}function so(e){let t=!0;return t=t&&"campaignId"in e,t=t&&"count"in e,t=t&&"eventTime"in e,t=t&&"ip"in e,t}function oo(e){return uo(e)}function uo(e,t){return null==e?e:{campaignId:e.campaignId,count:e.count,eventTime:new Date(e.eventTime),ip:e.ip}}function lo(e){if(void 0!==e)return null===e?null:{campaignId:e.campaignId,count:e.count,eventTime:e.eventTime.toISOString(),ip:e.ip}}function co(e){let t=!0;return t=t&&"userUnsubscription"in e,t=t&&"adminUnsubscription"in e,t}function mo(e){return po(e)}function po(e,t){return null==e?e:{userUnsubscription:e.userUnsubscription.map(Vr),adminUnsubscription:e.adminUnsubscription.map(Or)}}function fo(e){if(void 0!==e)return null===e?null:{userUnsubscription:e.userUnsubscription.map(_r),adminUnsubscription:e.adminUnsubscription.map(Gr)}}function ho(e){return!0}function go(e){return wo(e)}function wo(e,t){return null==e?e:{messagesSent:C(e,"messagesSent")?e.messagesSent.map(Yr):void 0,hardBounces:C(e,"hardBounces")?e.hardBounces.map(Yr):void 0,softBounces:C(e,"softBounces")?e.softBounces.map(Yr):void 0,complaints:C(e,"complaints")?e.complaints.map(Yr):void 0,unsubscriptions:C(e,"unsubscriptions")?mo(e.unsubscriptions):void 0,opened:C(e,"opened")?e.opened.map(oo):void 0,clicked:C(e,"clicked")?e.clicked.map(io):void 0,transacAttributes:C(e,"transacAttributes")?e.transacAttributes:void 0}}function yo(e){if(void 0!==e)return null===e?null:{messagesSent:void 0===e.messagesSent?void 0:e.messagesSent.map(Zr),hardBounces:void 0===e.hardBounces?void 0:e.hardBounces.map(Zr),softBounces:void 0===e.softBounces?void 0:e.softBounces.map(Zr),complaints:void 0===e.complaints?void 0:e.complaints.map(Zr),unsubscriptions:fo(e.unsubscriptions),opened:void 0===e.opened?void 0:e.opened.map(lo),clicked:void 0===e.clicked?void 0:e.clicked.map(ro),transacAttributes:e.transacAttributes}}function vo(e){let t=!0;return t=t&&"id"in e,t=t&&"emailBlacklisted"in e,t=t&&"smsBlacklisted"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t=t&&"listIds"in e,t=t&&"attributes"in e,t=t&&"statistics"in e,t}function bo(e){return Io(e)}function Io(e,t){return null==e?e:{email:C(e,"email")?e.email:void 0,id:e.id,emailBlacklisted:e.emailBlacklisted,smsBlacklisted:e.smsBlacklisted,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),listIds:e.listIds,listUnsubscribed:C(e,"listUnsubscribed")?e.listUnsubscribed:void 0,attributes:e.attributes,statistics:go(e.statistics)}}function Co(e){if(void 0!==e)return null===e?null:{email:e.email,id:e.id,emailBlacklisted:e.emailBlacklisted,smsBlacklisted:e.smsBlacklisted,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),listIds:e.listIds,listUnsubscribed:e.listUnsubscribed,attributes:e.attributes,statistics:yo(e.statistics)}}function ko(e){let t=!0;return t=t&&"campaignId"in e,t=t&&"stats"in e,t}function Ro(e){return qo(e)}function qo(e,t){return null==e?e:{campaignId:e.campaignId,stats:Ba(e.stats)}}function So(e){if(void 0!==e)return null===e?null:{campaignId:e.campaignId,stats:Ea(e.stats)}}function Ao(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"totalBlacklisted"in e,t=t&&"totalSubscribers"in e,t=t&&"folderId"in e,t=t&&"createdAt"in e,t}function To(e){return Bo(e)}function Bo(e,t){return null==e?e:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers,folderId:e.folderId,createdAt:new Date(e.createdAt),campaignStats:C(e,"campaignStats")?e.campaignStats.map(Ro):void 0,dynamicList:C(e,"dynamicList")?e.dynamicList:void 0}}function Do(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers,folderId:e.folderId,createdAt:e.createdAt.toISOString(),campaignStats:void 0===e.campaignStats?void 0:e.campaignStats.map(So),dynamicList:e.dynamicList}}function Eo(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"totalBlacklisted"in e,t=t&&"totalSubscribers"in e,t=t&&"uniqueSubscribers"in e,t}function No(e){return Po(e)}function Po(e,t){return null==e?e:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers,uniqueSubscribers:e.uniqueSubscribers}}function Ko(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers,uniqueSubscribers:e.uniqueSubscribers}}function Uo(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"totalBlacklisted"in e,t=t&&"totalSubscribers"in e,t}function Lo(e){return jo(e)}function jo(e,t){return null==e?e:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers}}function Fo(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers}}function Oo(e){let t=!0;return t=t&&"lists"in e,t=t&&"count"in e,t}function xo(e){return Go(e)}function Go(e,t){return null==e?e:{lists:e.lists.map(Lo),count:e.count}}function Mo(e){if(void 0!==e)return null===e?null:{lists:e.lists.map(Fo),count:e.count}}function Vo(e){return!0}function Wo(e){return _o(e)}function _o(e,t){return null==e?e:{folders:C(e,"folders")?e.folders.map(No):void 0,count:C(e,"count")?e.count:void 0}}function Ho(e){if(void 0!==e)return null===e?null:{folders:void 0===e.folders?void 0:e.folders.map(Ko),count:e.count}}function Qo(e){let t=!0;return t=t&&"id"in e,t=t&&"ip"in e,t=t&&"active"in e,t=t&&"domain"in e,t}function $o(e){return zo(e)}function zo(e,t){return null==e?e:{id:e.id,ip:e.ip,active:e.active,domain:e.domain}}function Jo(e){if(void 0!==e)return null===e?null:{id:e.id,ip:e.ip,active:e.active,domain:e.domain}}function Yo(e){let t=!0;return t=t&&"id"in e,t=t&&"ip"in e,t=t&&"domain"in e,t=t&&"weight"in e,t}function Xo(e){return Zo(e)}function Zo(e,t){return null==e?e:{id:e.id,ip:e.ip,domain:e.domain,weight:e.weight}}function eu(e){if(void 0!==e)return null===e?null:{id:e.id,ip:e.ip,domain:e.domain,weight:e.weight}}function tu(e){let t=!0;return t=t&&"ips"in e,t}function nu(e){return iu(e)}function iu(e,t){return null==e?e:{ips:e.ips.map($o)}}function au(e){if(void 0!==e)return null===e?null:{ips:e.ips.map(Jo)}}function ru(e){let t=!0;return t=t&&"ips"in e,t}function su(e){return ou(e)}function ou(e,t){return null==e?e:{ips:e.ips.map(Xo)}}function uu(e){if(void 0!==e)return null===e?null:{ips:e.ips.map(eu)}}function lu(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"totalBlacklisted"in e,t=t&&"totalSubscribers"in e,t=t&&"folderId"in e,t}function du(e){return cu(e)}function cu(e,t){return null==e?e:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers,folderId:e.folderId}}function mu(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,totalBlacklisted:e.totalBlacklisted,totalSubscribers:e.totalSubscribers,folderId:e.folderId}}function pu(e){let t=!0;return t=t&&"lists"in e,t=t&&"count"in e,t}function fu(e){return hu(e)}function hu(e,t){return null==e?e:{lists:e.lists.map(du),count:e.count}}function gu(e){if(void 0!==e)return null===e?null:{lists:e.lists.map(mu),count:e.count}}function wu(e){let t=!0;return t=t&&"id"in e,t=t&&"status"in e,t=t&&"name"in e,t}function yu(e){return vu(e)}function vu(e,t){return null==e?e:{id:e.id,status:e.status,name:e.name,exportUrl:C(e,"export_url")?e.export_url:void 0}}function bu(e){if(void 0!==e)return null===e?null:{id:e.id,status:e.status,name:e.name,export_url:e.exportUrl}}function Iu(e){let t=!0;return t=t&&"count"in e,t}function Cu(e){return ku(e)}function ku(e,t){return null==e?e:{processes:C(e,"processes")?e.processes.map(yu):void 0,count:e.count}}function Ru(e){if(void 0!==e)return null===e?null:{processes:void 0===e.processes?void 0:e.processes.map(bu),count:e.count}}function qu(e){let t=!0;return t=t&&"date"in e,t=t&&"requests"in e,t=t&&"delivered"in e,t=t&&"hardBounces"in e,t=t&&"softBounces"in e,t=t&&"clicks"in e,t=t&&"uniqueClicks"in e,t=t&&"opens"in e,t=t&&"uniqueOpens"in e,t=t&&"spamReports"in e,t=t&&"blocked"in e,t=t&&"invalid"in e,t=t&&"unsubscribed"in e,t}function Su(e){return Au(e)}function Au(e,t){return null==e?e:{date:new Date(e.date),requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,clicks:e.clicks,uniqueClicks:e.uniqueClicks,opens:e.opens,uniqueOpens:e.uniqueOpens,spamReports:e.spamReports,blocked:e.blocked,invalid:e.invalid,unsubscribed:e.unsubscribed}}function Tu(e){if(void 0!==e)return null===e?null:{date:e.date.toISOString().substring(0,10),requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,clicks:e.clicks,uniqueClicks:e.uniqueClicks,opens:e.opens,uniqueOpens:e.uniqueOpens,spamReports:e.spamReports,blocked:e.blocked,invalid:e.invalid,unsubscribed:e.unsubscribed}}function Bu(e){return!0}function Du(e){return Eu(e)}function Eu(e,t){return null==e?e:{reports:C(e,"reports")?e.reports.map(Su):void 0}}function Nu(e){if(void 0!==e)return null===e?null:{reports:void 0===e.reports?void 0:e.reports.map(Tu)}}function Pu(e){return!0}function Ku(e){return Uu(e)}function Uu(e,t){return null==e?e:{id:C(e,"id")?e.id:void 0,segmentName:C(e,"segmentName")?e.segmentName:void 0,categoryName:C(e,"categoryName")?e.categoryName:void 0,updatedAt:C(e,"updatedAt")?e.updatedAt:void 0}}function Lu(e){if(void 0!==e)return null===e?null:{id:e.id,segmentName:e.segmentName,categoryName:e.categoryName,updatedAt:e.updatedAt}}function ju(e){return!0}function Fu(e){return Ou(e)}function Ou(e,t){return null==e?e:{segments:C(e,"segments")?Ku(e.segments):void 0,count:C(e,"count")?e.count:void 0}}function xu(e){if(void 0!==e)return null===e?null:{segments:Lu(e.segments),count:e.count}}function Gu(e){let t=!0;return t=t&&"ip"in e,t=t&&"domain"in e,t=t&&"weight"in e,t}function Mu(e){return Vu(e)}function Vu(e,t){return null==e?e:{ip:e.ip,domain:e.domain,weight:e.weight}}function Wu(e){if(void 0!==e)return null===e?null:{ip:e.ip,domain:e.domain,weight:e.weight}}function _u(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"email"in e,t=t&&"active"in e,t}function Hu(e){return Qu(e)}function Qu(e,t){return null==e?e:{id:e.id,name:e.name,email:e.email,active:e.active,ips:C(e,"ips")?e.ips.map(Mu):void 0}}function $u(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,email:e.email,active:e.active,ips:void 0===e.ips?void 0:e.ips.map(Wu)}}function zu(e){return!0}function Ju(e){return Yu(e)}function Yu(e,t){return null==e?e:{senders:C(e,"senders")?e.senders.map(Hu):void 0}}function Xu(e){if(void 0!==e)return null===e?null:{senders:void 0===e.senders?void 0:e.senders.map($u)}}function Zu(e){let t=!0;return t=t&&"sharedUrl"in e,t}function el(e){return tl(e)}function tl(e,t){return null==e?e:{sharedUrl:e.sharedUrl}}function nl(e){if(void 0!==e)return null===e?null:{sharedUrl:e.sharedUrl}}function il(e){let t=!0;return t=t&&"delivered"in e,t=t&&"sent"in e,t=t&&"processing"in e,t=t&&"softBounces"in e,t=t&&"hardBounces"in e,t=t&&"unsubscriptions"in e,t=t&&"answered"in e,t}function al(e){return rl(e)}function rl(e,t){return null==e?e:{delivered:e.delivered,sent:e.sent,processing:e.processing,softBounces:e.softBounces,hardBounces:e.hardBounces,unsubscriptions:e.unsubscriptions,answered:e.answered}}function sl(e){if(void 0!==e)return null===e?null:{delivered:e.delivered,sent:e.sent,processing:e.processing,softBounces:e.softBounces,hardBounces:e.hardBounces,unsubscriptions:e.unsubscriptions,answered:e.answered}}function ol(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"status"in e,t=t&&"content"in e,t=t&&"scheduledAt"in e,t=t&&"sender"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t=t&&"recipients"in e,t=t&&"statistics"in e,t}function ul(e){return ll(e)}function ll(e,t){return null==e?e:{id:e.id,name:e.name,status:e.status,content:e.content,scheduledAt:new Date(e.scheduledAt),sender:e.sender,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),recipients:qa(e.recipients),statistics:al(e.statistics)}}function dl(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,status:e.status,content:e.content,scheduledAt:e.scheduledAt.toISOString(),sender:e.sender,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),recipients:Aa(e.recipients),statistics:sl(e.statistics)}}function cl(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"status"in e,t=t&&"content"in e,t=t&&"scheduledAt"in e,t=t&&"sender"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t}function ml(e){return pl(e)}function pl(e,t){return null==e?e:{id:e.id,name:e.name,status:e.status,content:e.content,scheduledAt:new Date(e.scheduledAt),sender:e.sender,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt)}}function fl(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,status:e.status,content:e.content,scheduledAt:e.scheduledAt.toISOString(),sender:e.sender,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString()}}function hl(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"status"in e,t=t&&"content"in e,t=t&&"scheduledAt"in e,t=t&&"sender"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t=t&&"recipients"in e,t=t&&"statistics"in e,t}function gl(e){return wl(e)}function wl(e,t){return null==e?e:{id:e.id,name:e.name,status:e.status,content:e.content,scheduledAt:new Date(e.scheduledAt),sender:e.sender,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),recipients:qa(e.recipients),statistics:al(e.statistics)}}function yl(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,status:e.status,content:e.content,scheduledAt:e.scheduledAt.toISOString(),sender:e.sender,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),recipients:Aa(e.recipients),statistics:sl(e.statistics)}}function vl(e){let t=!0;return t=t&&"count"in e,t}function bl(e){return Il(e)}function Il(e,t){return null==e?e:{campaigns:C(e,"campaigns")?e.campaigns.map(gl):void 0,count:e.count}}function Cl(e){if(void 0!==e)return null===e?null:{campaigns:void 0===e.campaigns?void 0:e.campaigns.map(yl),count:e.count}}function kl(e){let t=!0;return t=t&&"phoneNumber"in e,t=t&&"date"in e,t=t&&"messageId"in e,t=t&&"event"in e,t}function Rl(e){return ql(e)}function ql(e,t){return null==e?e:{phoneNumber:e.phoneNumber,date:new Date(e.date),messageId:e.messageId,event:e.event,reason:C(e,"reason")?e.reason:void 0,reply:C(e,"reply")?e.reply:void 0,tag:C(e,"tag")?e.tag:void 0}}function Sl(e){if(void 0!==e)return null===e?null:{phoneNumber:e.phoneNumber,date:e.date.toISOString(),messageId:e.messageId,event:e.event,reason:e.reason,reply:e.reply,tag:e.tag}}function Al(e){return!0}function Tl(e){return Bl(e)}function Bl(e,t){return null==e?e:{events:C(e,"events")?e.events.map(Rl):void 0}}function Dl(e){if(void 0!==e)return null===e?null:{events:void 0===e.events?void 0:e.events.map(Sl)}}function El(e){return!0}function Nl(e){return Pl(e)}function Pl(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:C(e,"email")?e.email:void 0,id:C(e,"id")?e.id:void 0}}function Kl(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,id:e.id}}function Ul(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"subject"in e,t=t&&"isActive"in e,t=t&&"testSent"in e,t=t&&"sender"in e,t=t&&"replyTo"in e,t=t&&"toField"in e,t=t&&"tag"in e,t=t&&"htmlContent"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t}function Ll(e){return jl(e)}function jl(e,t){return null==e?e:{id:e.id,name:e.name,subject:e.subject,isActive:e.isActive,testSent:e.testSent,sender:Nl(e.sender),replyTo:e.replyTo,toField:e.toField,tag:e.tag,htmlContent:e.htmlContent,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt),doiTemplate:C(e,"doiTemplate")?e.doiTemplate:void 0}}function Fl(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,subject:e.subject,isActive:e.isActive,testSent:e.testSent,sender:Kl(e.sender),replyTo:e.replyTo,toField:e.toField,tag:e.tag,htmlContent:e.htmlContent,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString(),doiTemplate:e.doiTemplate}}function Ol(e){return!0}function xl(e){return Gl(e)}function Gl(e,t){return null==e?e:{count:C(e,"count")?e.count:void 0,templates:C(e,"templates")?e.templates.map(Ll):void 0}}function Ml(e){if(void 0!==e)return null===e?null:{count:e.count,templates:void 0===e.templates?void 0:e.templates.map(Fl)}}function Vl(e){let t=!0;return t=t&&"token"in e,t}function Wl(e){return _l(e)}function _l(e,t){return null==e?e:{token:e.token}}function Hl(e){if(void 0!==e)return null===e?null:{token:e.token}}function Ql(e){let t=!0;return t=t&&"range"in e,t=t&&"requests"in e,t=t&&"delivered"in e,t=t&&"hardBounces"in e,t=t&&"softBounces"in e,t=t&&"blocked"in e,t=t&&"unsubscribed"in e,t=t&&"replied"in e,t=t&&"accepted"in e,t=t&&"rejected"in e,t}function $l(e){return zl(e)}function zl(e,t){return null==e?e:{range:e.range,requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,blocked:e.blocked,unsubscribed:e.unsubscribed,replied:e.replied,accepted:e.accepted,rejected:e.rejected}}function Jl(e){if(void 0!==e)return null===e?null:{range:e.range,requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,blocked:e.blocked,unsubscribed:e.unsubscribed,replied:e.replied,accepted:e.accepted,rejected:e.rejected}}function Yl(e){return!0}function Xl(e){return Zl(e)}function Zl(e,t){return null==e?e:{code:C(e,"code")?e.code:void 0,message:C(e,"message")?e.message:void 0}}function ed(e){if(void 0!==e)return null===e?null:{code:e.code,message:e.message}}function td(e){let t=!0;return t=t&&"email"in e,t=t&&"senderEmail"in e,t=t&&"reason"in e,t=t&&"blockedAt"in e,t}function nd(e){return id(e)}function id(e,t){return null==e?e:{email:e.email,senderEmail:e.senderEmail,reason:Xl(e.reason),blockedAt:new Date(e.blockedAt)}}function ad(e){if(void 0!==e)return null===e?null:{email:e.email,senderEmail:e.senderEmail,reason:ed(e.reason),blockedAt:e.blockedAt.toISOString()}}function rd(e){return!0}function sd(e){return od(e)}function od(e,t){return null==e?e:{count:C(e,"count")?e.count:void 0,contacts:C(e,"contacts")?e.contacts.map(nd):void 0}}function ud(e){if(void 0!==e)return null===e?null:{count:e.count,contacts:void 0===e.contacts?void 0:e.contacts.map(ad)}}function ld(e){let t=!0;return t=t&&"name"in e,t=t&&"time"in e,t}function dd(e){return cd(e)}function cd(e,t){return null==e?e:{name:e.name,time:new Date(e.time)}}function md(e){if(void 0!==e)return null===e?null:{name:e.name,time:e.time.toISOString()}}function pd(e){let t=!0;return t=t&&"email"in e,t=t&&"subject"in e,t=t&&"date"in e,t=t&&"events"in e,t=t&&"body"in e,t=t&&"attachmentCount"in e,t}function fd(e){return hd(e)}function hd(e,t){return null==e?e:{email:e.email,subject:e.subject,templateId:C(e,"templateId")?e.templateId:void 0,date:new Date(e.date),events:e.events.map(dd),body:e.body,attachmentCount:e.attachmentCount}}function gd(e){if(void 0!==e)return null===e?null:{email:e.email,subject:e.subject,templateId:e.templateId,date:e.date.toISOString(),events:e.events.map(md),body:e.body,attachmentCount:e.attachmentCount}}function wd(e){let t=!0;return t=t&&"email"in e,t=t&&"subject"in e,t=t&&"messageId"in e,t=t&&"uuid"in e,t=t&&"date"in e,t}function yd(e){return vd(e)}function vd(e,t){return null==e?e:{email:e.email,subject:e.subject,templateId:C(e,"templateId")?e.templateId:void 0,messageId:e.messageId,uuid:e.uuid,date:new Date(e.date),from:C(e,"from")?e.from:void 0,tags:C(e,"tags")?e.tags:void 0}}function bd(e){if(void 0!==e)return null===e?null:{email:e.email,subject:e.subject,templateId:e.templateId,messageId:e.messageId,uuid:e.uuid,date:e.date.toISOString(),from:e.from,tags:e.tags}}function Id(e){return!0}function Cd(e){return kd(e)}function kd(e,t){return null==e?e:{transactionalEmails:C(e,"transactionalEmails")?e.transactionalEmails.map(yd):void 0}}function Rd(e){if(void 0!==e)return null===e?null:{transactionalEmails:void 0===e.transactionalEmails?void 0:e.transactionalEmails.map(bd)}}function qd(e){let t=!0;return t=t&&"date"in e,t=t&&"requests"in e,t=t&&"delivered"in e,t=t&&"hardBounces"in e,t=t&&"softBounces"in e,t=t&&"blocked"in e,t=t&&"unsubscribed"in e,t=t&&"replied"in e,t=t&&"accepted"in e,t=t&&"rejected"in e,t}function Sd(e){return Ad(e)}function Ad(e,t){return null==e?e:{date:new Date(e.date),requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,blocked:e.blocked,unsubscribed:e.unsubscribed,replied:e.replied,accepted:e.accepted,rejected:e.rejected}}function Td(e){if(void 0!==e)return null===e?null:{date:e.date.toISOString().substring(0,10),requests:e.requests,delivered:e.delivered,hardBounces:e.hardBounces,softBounces:e.softBounces,blocked:e.blocked,unsubscribed:e.unsubscribed,replied:e.replied,accepted:e.accepted,rejected:e.rejected}}function Bd(e){return!0}function Dd(e){return Ed(e)}function Ed(e,t){return null==e?e:{reports:C(e,"reports")?e.reports.map(Sd):void 0}}function Nd(e){if(void 0!==e)return null===e?null:{reports:void 0===e.reports?void 0:e.reports.map(Td)}}function Pd(e){let t=!0;return t=t&&"id"in e,t=t&&"name"in e,t=t&&"status"in e,t=t&&"language"in e,t=t&&"category"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t}function Kd(e){return Ud(e)}function Ud(e,t){return null==e?e:{id:e.id,name:e.name,status:e.status,language:e.language,category:e.category,errorReason:C(e,"errorReason")?e.errorReason:void 0,createdAt:e.createdAt,modifiedAt:e.modifiedAt}}function Ld(e){if(void 0!==e)return null===e?null:{id:e.id,name:e.name,status:e.status,language:e.language,category:e.category,errorReason:e.errorReason,createdAt:e.createdAt,modifiedAt:e.modifiedAt}}function jd(e){let t=!0;return t=t&&"templates"in e,t=t&&"count"in e,t}function Fd(e){return Od(e)}function Od(e,t){return null==e?e:{templates:e.templates.map(Kd),count:e.count}}function xd(e){if(void 0!==e)return null===e?null:{templates:e.templates.map(Ld),count:e.count}}function Gd(e){let t=!0;return t=t&&"url"in e,t=t&&"id"in e,t=t&&"description"in e,t=t&&"events"in e,t=t&&"type"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t}function Md(e){return Vd(e)}function Vd(e,t){return null==e?e:{url:e.url,id:e.id,description:e.description,events:e.events,type:e.type,createdAt:new Date(e.createdAt),modifiedAt:new Date(e.modifiedAt)}}function Wd(e){if(void 0!==e)return null===e?null:{url:e.url,id:e.id,description:e.description,events:e.events,type:e.type,createdAt:e.createdAt.toISOString(),modifiedAt:e.modifiedAt.toISOString()}}function _d(e){let t=!0;return t=t&&"webhooks"in e,t}function Hd(e){return Qd(e)}function Qd(e,t){return null==e?e:{webhooks:e.webhooks.map(Md)}}function $d(e){if(void 0!==e)return null===e?null:{webhooks:e.webhooks.map(Wd)}}function zd(e){let t=!0;return t=t&&"sent"in e,t=t&&"delivered"in e,t=t&&"read"in e,t=t&&"unsubscribe"in e,t=t&&"notSent"in e,t}function Jd(e){return Yd(e)}function Yd(e,t){return null==e?e:{sent:e.sent,delivered:e.delivered,read:e.read,unsubscribe:e.unsubscribe,notSent:e.notSent}}function Xd(e){if(void 0!==e)return null===e?null:{sent:e.sent,delivered:e.delivered,read:e.read,unsubscribe:e.unsubscribe,notSent:e.notSent}}function Zd(e){return!0}function ec(e){return tc(e)}function tc(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,_default:C(e,"default")?e.default:void 0,datatype:C(e,"datatype")?e.datatype:void 0}}function nc(e){if(void 0!==e)return null===e?null:{name:e.name,default:e._default,datatype:e.datatype}}function ic(e){return!0}function ac(e){return rc(e)}function rc(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,category:C(e,"category")?e.category:void 0,language:C(e,"language")?e.language:void 0,containsButton:C(e,"contains_button")?e.contains_button:void 0,displayHeader:C(e,"display_header")?e.display_header:void 0,headerType:C(e,"header_type")?e.header_type:void 0,components:C(e,"components")?e.components.map(Dt):void 0,headerVariables:C(e,"header_variables")?e.header_variables.map(ec):void 0,bodyVariables:C(e,"body_variables")?e.body_variables.map(ec):void 0,buttonType:C(e,"button_type")?e.button_type:void 0,hideFooter:C(e,"hide_footer")?e.hide_footer:void 0}}function sc(e){if(void 0!==e)return null===e?null:{name:e.name,category:e.category,language:e.language,contains_button:e.containsButton,display_header:e.displayHeader,header_type:e.headerType,components:void 0===e.components?void 0:e.components.map(Nt),header_variables:void 0===e.headerVariables?void 0:e.headerVariables.map(nc),body_variables:void 0===e.bodyVariables?void 0:e.bodyVariables.map(nc),button_type:e.buttonType,hide_footer:e.hideFooter}}function oc(e){let t=!0;return t=t&&"id"in e,t=t&&"campaignName"in e,t=t&&"campaignStatus"in e,t=t&&"senderNumber"in e,t=t&&"template"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t}function uc(e){return lc(e)}function lc(e,t){return null==e?e:{id:e.id,campaignName:e.campaignName,campaignStatus:e.campaignStatus,scheduledAt:C(e,"scheduledAt")?e.scheduledAt:void 0,senderNumber:e.senderNumber,stats:C(e,"stats")?Jd(e.stats):void 0,template:ac(e.template),createdAt:e.createdAt,modifiedAt:e.modifiedAt}}function dc(e){if(void 0!==e)return null===e?null:{id:e.id,campaignName:e.campaignName,campaignStatus:e.campaignStatus,scheduledAt:e.scheduledAt,senderNumber:e.senderNumber,stats:Xd(e.stats),template:sc(e.template),createdAt:e.createdAt,modifiedAt:e.modifiedAt}}function cc(e){let t=!0;return t=t&&"id"in e,t=t&&"campaignName"in e,t=t&&"templateId"in e,t=t&&"campaignStatus"in e,t=t&&"scheduledAt"in e,t=t&&"createdAt"in e,t=t&&"modifiedAt"in e,t}function mc(e){return pc(e)}function pc(e,t){return null==e?e:{id:e.id,campaignName:e.campaignName,templateId:e.templateId,campaignStatus:e.campaignStatus,scheduledAt:e.scheduledAt,errorReason:C(e,"errorReason")?e.errorReason:void 0,invalidatedContacts:C(e,"invalidatedContacts")?e.invalidatedContacts:void 0,readPercentage:C(e,"readPercentage")?e.readPercentage:void 0,stats:C(e,"stats")?Jd(e.stats):void 0,createdAt:e.createdAt,modifiedAt:e.modifiedAt}}function fc(e){if(void 0!==e)return null===e?null:{id:e.id,campaignName:e.campaignName,templateId:e.templateId,campaignStatus:e.campaignStatus,scheduledAt:e.scheduledAt,errorReason:e.errorReason,invalidatedContacts:e.invalidatedContacts,readPercentage:e.readPercentage,stats:Xd(e.stats),createdAt:e.createdAt,modifiedAt:e.modifiedAt}}function hc(e){return!0}function gc(e){return wc(e)}function wc(e,t){return null==e?e:{campaigns:C(e,"campaigns")?e.campaigns.map(mc):void 0,count:C(e,"count")?e.count:void 0}}function yc(e){if(void 0!==e)return null===e?null:{campaigns:void 0===e.campaigns?void 0:e.campaigns.map(fc),count:e.count}}function vc(e){return!0}function bc(e){return Ic(e)}function Ic(e,t){return null==e?e:{ip:C(e,"ip")?e.ip:void 0}}function Cc(e){if(void 0!==e)return null===e?null:{ip:e.ip}}function kc(e){return!0}function Rc(e){return qc(e)}function qc(e,t){return null==e?e:{success:C(e,"success")?e.success:void 0,failure:C(e,"failure")?e.failure:void 0,total:C(e,"total")?e.total:void 0,processId:C(e,"processId")?e.processId:void 0}}function Sc(e){if(void 0!==e)return null===e?null:{success:e.success,failure:e.failure,total:e.total,processId:e.processId}}function Ac(e){let t=!0;return t=t&&"contacts"in e,t}function Tc(e){return Bc(e)}function Bc(e,t){return null==e?e:{contacts:Rc(e.contacts)}}function Dc(e){if(void 0!==e)return null===e?null:{contacts:Sc(e.contacts)}}function Ec(e){let t=!0;return t=t&&"code"in e,t=t&&"message"in e,t}function Nc(e){return Pc(e)}function Pc(e,t){return null==e?e:{code:e.code,message:e.message,unexistingEmails:C(e,"unexistingEmails")?e.unexistingEmails:void 0,withoutListEmails:C(e,"withoutListEmails")?e.withoutListEmails:void 0,blackListedEmails:C(e,"blackListedEmails")?e.blackListedEmails:void 0}}function Kc(e){if(void 0!==e)return null===e?null:{code:e.code,message:e.message,unexistingEmails:e.unexistingEmails,withoutListEmails:e.withoutListEmails,blackListedEmails:e.blackListedEmails}}function Uc(e){let t=!0;return t=t&&"code"in e,t=t&&"message"in e,t}function Lc(e){return jc(e)}function jc(e,t){return null==e?e:{code:e.code,message:e.message,unexistingSms:C(e,"unexistingSms")?e.unexistingSms:void 0,withoutListSms:C(e,"withoutListSms")?e.withoutListSms:void 0}}function Fc(e){if(void 0!==e)return null===e?null:{code:e.code,message:e.message,unexistingSms:e.unexistingSms,withoutListSms:e.withoutListSms}}function Oc(e){let t=!0;return t=t&&"sms"in e,t=t&&"email"in e,t}function xc(e){return Gc(e)}function Gc(e,t){return null==e?e:{sms:e.sms,email:e.email}}function Mc(e){if(void 0!==e)return null===e?null:{sms:e.sms,email:e.email}}function Vc(e){let t=!0;return t=t&&"sms"in e,t=t&&"email"in e,t}function Wc(e){return _c(e)}function _c(e,t){return null==e?e:{sms:e.sms,email:e.email}}function Hc(e){if(void 0!==e)return null===e?null:{sms:e.sms,email:e.email}}function Qc(e){let t=!0;return t=t&&"child"in e,t=t&&"reseller"in e,t}function $c(e){return zc(e)}function zc(e,t){return null==e?e:{child:xc(e.child),reseller:Wc(e.reseller)}}function Jc(e){if(void 0!==e)return null===e?null:{child:Mc(e.child),reseller:Hc(e.reseller)}}function Yc(e){return!0}function Xc(e){return Zc(e)}function Zc(e,t){return null==e?e:{emails:C(e,"emails")?e.emails:void 0,all:C(e,"all")?e.all:void 0}}function em(e){if(void 0!==e)return null===e?null:{emails:e.emails,all:e.all}}function tm(e){return!0}function nm(e){return im(e)}function im(e,t){return null==e?e:{sms:C(e,"sms")?e.sms:void 0,email:C(e,"email")?e.email:void 0}}function am(e){if(void 0!==e)return null===e?null:{sms:e.sms,email:e.email}}function rm(e){return!0}function sm(e){return om(e)}function om(e,t){return null==e?e:{actionForContacts:C(e,"actionForContacts")?e.actionForContacts:void 0,actionForEmailCampaigns:C(e,"actionForEmailCampaigns")?e.actionForEmailCampaigns:void 0,actionForSmsCampaigns:C(e,"actionForSmsCampaigns")?e.actionForSmsCampaigns:void 0,listId:C(e,"listId")?e.listId:void 0,emailCampaignId:C(e,"emailCampaignId")?e.emailCampaignId:void 0,smsCampaignId:C(e,"smsCampaignId")?e.smsCampaignId:void 0}}function um(e){if(void 0!==e)return null===e?null:{actionForContacts:e.actionForContacts,actionForEmailCampaigns:e.actionForEmailCampaigns,actionForSmsCampaigns:e.actionForSmsCampaigns,listId:e.listId,emailCampaignId:e.emailCampaignId,smsCampaignId:e.smsCampaignId}}function lm(e){return!0}function dm(e){return cm(e)}function cm(e,t){return null==e?e:{exportAttributes:C(e,"exportAttributes")?e.exportAttributes:void 0,contactFilter:C(e,"contactFilter")?e.contactFilter:void 0,customContactFilter:C(e,"customContactFilter")?sm(e.customContactFilter):void 0,notifyUrl:C(e,"notifyUrl")?e.notifyUrl:void 0}}function mm(e){if(void 0!==e)return null===e?null:{exportAttributes:e.exportAttributes,contactFilter:e.contactFilter,customContactFilter:um(e.customContactFilter),notifyUrl:e.notifyUrl}}function pm(e){return!0}function fm(e){return hm(e)}function hm(e,t){return null==e?e:{listName:C(e,"listName")?e.listName:void 0,folderId:C(e,"folderId")?e.folderId:void 0}}function gm(e){if(void 0!==e)return null===e?null:{listName:e.listName,folderId:e.folderId}}function wm(e){return!0}function ym(e){return vm(e)}function vm(e,t){return null==e?e:{fileUrl:C(e,"fileUrl")?e.fileUrl:void 0,fileBody:C(e,"fileBody")?e.fileBody:void 0,listIds:C(e,"listIds")?e.listIds:void 0,notifyUrl:C(e,"notifyUrl")?e.notifyUrl:void 0,newList:C(e,"newList")?fm(e.newList):void 0,emailBlacklist:C(e,"emailBlacklist")?e.emailBlacklist:void 0,disableNotification:C(e,"disableNotification")?e.disableNotification:void 0,smsBlacklist:C(e,"smsBlacklist")?e.smsBlacklist:void 0,updateExistingContacts:C(e,"updateExistingContacts")?e.updateExistingContacts:void 0,emptyContactsAttributes:C(e,"emptyContactsAttributes")?e.emptyContactsAttributes:void 0}}function bm(e){if(void 0!==e)return null===e?null:{fileUrl:e.fileUrl,fileBody:e.fileBody,listIds:e.listIds,notifyUrl:e.notifyUrl,newList:gm(e.newList),emailBlacklist:e.emailBlacklist,disableNotification:e.disableNotification,smsBlacklist:e.smsBlacklist,updateExistingContacts:e.updateExistingContacts,emptyContactsAttributes:e.emptyContactsAttributes}}function Im(e){let t=!0;return t=t&&"recipientsType"in e,t}function Cm(e){return km(e)}function km(e,t){return null==e?e:{notifyURL:C(e,"notifyURL")?e.notifyURL:void 0,recipientsType:e.recipientsType}}function Rm(e){if(void 0!==e)return null===e?null:{notifyURL:e.notifyURL,recipientsType:e.recipientsType}}function qm(e){let t=!0;return t=t&&"content"in e,t=t&&"name"in e,t}function Sm(e){return Am(e)}function Am(e,t){return null==e?e:{content:e.content,name:e.name}}function Tm(e){if(void 0!==e)return null===e?null:{content:e.content,name:e.name}}function Bm(e){let t=!0;return t=t&&"emailTo"in e,t}function Dm(e){return Em(e)}function Em(e,t){return null==e?e:{emailTo:e.emailTo,emailBcc:C(e,"emailBcc")?e.emailBcc:void 0,emailCc:C(e,"emailCc")?e.emailCc:void 0,replyTo:C(e,"replyTo")?e.replyTo:void 0,attachmentUrl:C(e,"attachmentUrl")?e.attachmentUrl:void 0,attachment:C(e,"attachment")?e.attachment.map(Sm):void 0,headers:C(e,"headers")?e.headers:void 0,attributes:C(e,"attributes")?e.attributes:void 0,tags:C(e,"tags")?e.tags:void 0}}function Nm(e){if(void 0!==e)return null===e?null:{emailTo:e.emailTo,emailBcc:e.emailBcc,emailCc:e.emailCc,replyTo:e.replyTo,attachmentUrl:e.attachmentUrl,attachment:void 0===e.attachment?void 0:e.attachment.map(Tm),headers:e.headers,attributes:e.attributes,tags:e.tags}}function Pm(e){let t=!0;return t=t&&"to"in e,t=t&&"body"in e,t}function Km(e){return Um(e)}function Um(e,t){return null==e?e:{to:e.to,body:e.body}}function Lm(e){if(void 0!==e)return null===e?null:{to:e.to,body:e.body}}function jm(e){let t=!0;return t=t&&"email"in e,t}function Fm(e){return Om(e)}function Om(e,t){return null==e?e:{language:C(e,"language")?e.language:void 0,email:Km(e.email)}}function xm(e){if(void 0!==e)return null===e?null:{language:e.language,email:Lm(e.email)}}function Gm(e){let t=!0;return t=t&&"reference"in e,t=t&&"messageId"in e,t}function Mm(e){return Vm(e)}function Vm(e,t){return null==e?e:{reference:e.reference,messageId:e.messageId,smsCount:C(e,"smsCount")?e.smsCount:void 0,usedCredits:C(e,"usedCredits")?e.usedCredits:void 0,remainingCredits:C(e,"remainingCredits")?e.remainingCredits:void 0}}function Wm(e){if(void 0!==e)return null===e?null:{reference:e.reference,messageId:e.messageId,smsCount:e.smsCount,usedCredits:e.usedCredits,remainingCredits:e.remainingCredits}}function _m(e){return!0}function Hm(e){return Qm(e)}function Qm(e,t){return null==e?e:{url:C(e,"url")?e.url:void 0,content:C(e,"content")?e.content:void 0,name:C(e,"name")?e.name:void 0}}function $m(e){if(void 0!==e)return null===e?null:{url:e.url,content:e.content,name:e.name}}function zm(e){let t=!0;return t=t&&"email"in e,t}function Jm(e){return Ym(e)}function Ym(e,t){return null==e?e:{email:e.email,name:C(e,"name")?e.name:void 0}}function Xm(e){if(void 0!==e)return null===e?null:{email:e.email,name:e.name}}function Zm(e){let t=!0;return t=t&&"email"in e,t}function ep(e){return tp(e)}function tp(e,t){return null==e?e:{email:e.email,name:C(e,"name")?e.name:void 0}}function np(e){if(void 0!==e)return null===e?null:{email:e.email,name:e.name}}function ip(e){let t=!0;return t=t&&"email"in e,t}function ap(e){return rp(e)}function rp(e,t){return null==e?e:{email:e.email,name:C(e,"name")?e.name:void 0}}function sp(e){if(void 0!==e)return null===e?null:{email:e.email,name:e.name}}function op(e){let t=!0;return t=t&&"email"in e,t}function up(e){return lp(e)}function lp(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:e.email}}function dp(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email}}function cp(e){let t=!0;return t=t&&"email"in e,t}function mp(e){return pp(e)}function pp(e,t){return null==e?e:{email:e.email,name:C(e,"name")?e.name:void 0}}function fp(e){if(void 0!==e)return null===e?null:{email:e.email,name:e.name}}function hp(e){let t=!0;return t=t&&"to"in e,t}function gp(e){return wp(e)}function wp(e,t){return null==e?e:{sender:C(e,"sender")?up(e.sender):void 0,to:e.to.map(mp),bcc:C(e,"bcc")?e.bcc.map(Jm):void 0,cc:C(e,"cc")?e.cc.map(ep):void 0,htmlContent:C(e,"htmlContent")?e.htmlContent:void 0,textContent:C(e,"textContent")?e.textContent:void 0,subject:C(e,"subject")?e.subject:void 0,replyTo:C(e,"replyTo")?ap(e.replyTo):void 0,attachment:C(e,"attachment")?e.attachment.map(Hm):void 0,headers:C(e,"headers")?e.headers:void 0,templateId:C(e,"templateId")?e.templateId:void 0,params:C(e,"params")?e.params:void 0,tags:C(e,"tags")?e.tags:void 0}}function yp(e){if(void 0!==e)return null===e?null:{sender:dp(e.sender),to:e.to.map(fp),bcc:void 0===e.bcc?void 0:e.bcc.map(Xm),cc:void 0===e.cc?void 0:e.cc.map(np),htmlContent:e.htmlContent,textContent:e.textContent,subject:e.subject,replyTo:sp(e.replyTo),attachment:void 0===e.attachment?void 0:e.attachment.map($m),headers:e.headers,templateId:e.templateId,params:e.params,tags:e.tags}}function vp(e){let t=!0;return t=t&&"messageId"in e,t}function bp(e){return Ip(e)}function Ip(e,t){return null==e?e:{messageId:e.messageId}}function Cp(e){if(void 0!==e)return null===e?null:{messageId:e.messageId}}function kp(e){return!0}function Rp(e){return qp(e)}function qp(e,t){return null==e?e:{emailTo:C(e,"emailTo")?e.emailTo:void 0}}function Sp(e){if(void 0!==e)return null===e?null:{emailTo:e.emailTo}}function Ap(e){return!0}function Tp(e){return Bp(e)}function Bp(e,t){return null==e?e:{phoneNumber:C(e,"phoneNumber")?e.phoneNumber:void 0}}function Dp(e){if(void 0!==e)return null===e?null:{phoneNumber:e.phoneNumber}}function Ep(e){let t=!0;return t=t&&"sender"in e,t=t&&"recipient"in e,t=t&&"content"in e,t}function Np(e){return Pp(e)}function Pp(e,t){return null==e?e:{sender:e.sender,recipient:e.recipient,content:e.content,type:C(e,"type")?e.type:void 0,tag:C(e,"tag")?e.tag:void 0,webUrl:C(e,"webUrl")?e.webUrl:void 0,organisationPrefix:C(e,"organisationPrefix")?e.organisationPrefix:void 0}}function Kp(e){if(void 0!==e)return null===e?null:{sender:e.sender,recipient:e.recipient,content:e.content,type:e.type,tag:e.tag,webUrl:e.webUrl,organisationPrefix:e.organisationPrefix}}function Up(e){let t=!0;return t=t&&"value"in e,t=t&&"label"in e,t}function Lp(e){return jp(e)}function jp(e,t){return null==e?e:{value:e.value,label:e.label}}function Fp(e){if(void 0!==e)return null===e?null:{value:e.value,label:e.label}}function Op(e){return!0}function xp(e){return Gp(e)}function Gp(e,t){return null==e?e:{value:C(e,"value")?e.value:void 0,enumeration:C(e,"enumeration")?e.enumeration.map(Lp):void 0}}function Mp(e){if(void 0!==e)return null===e?null:{value:e.value,enumeration:void 0===e.enumeration?void 0:e.enumeration.map(Fp)}}function Vp(e){return!0}function Wp(e){return _p(e)}function _p(e,t){return null==e?e:{status:C(e,"status")?e.status:void 0}}function Hp(e){if(void 0!==e)return null===e?null:{status:e.status}}function Qp(e){return!0}function $p(e){return zp(e)}function zp(e,t){return null==e?e:{email:C(e,"email")?e.email:void 0,firstName:C(e,"firstName")?e.firstName:void 0,lastName:C(e,"lastName")?e.lastName:void 0,companyName:C(e,"companyName")?e.companyName:void 0,password:C(e,"password")?e.password:void 0}}function Jp(e){if(void 0!==e)return null===e?null:{email:e.email,firstName:e.firstName,lastName:e.lastName,companyName:e.companyName,password:e.password}}function Yp(e){return!0}function Xp(e){return Zp(e)}function Zp(e,t){return null==e?e:{transactionalEmail:C(e,"transactionalEmail")?e.transactionalEmail:void 0,transactionalSms:C(e,"transactionalSms")?e.transactionalSms:void 0,marketingAutomation:C(e,"marketingAutomation")?e.marketingAutomation:void 0,smsCampaign:C(e,"smsCampaign")?e.smsCampaign:void 0}}function ef(e){if(void 0!==e)return null===e?null:{transactionalEmail:e.transactionalEmail,transactionalSms:e.transactionalSms,marketingAutomation:e.marketingAutomation,smsCampaign:e.smsCampaign}}function tf(e){return!0}function nf(e){return af(e)}function af(e,t){return null==e?e:{domain:C(e,"domain")?e.domain:void 0}}function rf(e){if(void 0!==e)return null===e?null:{domain:e.domain}}function sf(e){return!0}function of(e){return uf(e)}function uf(e,t){return null==e?e:{attributes:C(e,"attributes")?e.attributes:void 0,emailBlacklisted:C(e,"emailBlacklisted")?e.emailBlacklisted:void 0,smsBlacklisted:C(e,"smsBlacklisted")?e.smsBlacklisted:void 0,listIds:C(e,"listIds")?e.listIds:void 0,unlinkListIds:C(e,"unlinkListIds")?e.unlinkListIds:void 0,smtpBlacklistSender:C(e,"smtpBlacklistSender")?e.smtpBlacklistSender:void 0}}function lf(e){if(void 0!==e)return null===e?null:{attributes:e.attributes,emailBlacklisted:e.emailBlacklisted,smsBlacklisted:e.smsBlacklisted,listIds:e.listIds,unlinkListIds:e.unlinkListIds,smtpBlacklistSender:e.smtpBlacklistSender}}function df(e){return!0}function cf(e){return mf(e)}function mf(e,t){return null==e?e:{exclusionListIds:C(e,"exclusionListIds")?e.exclusionListIds:void 0,listIds:C(e,"listIds")?e.listIds:void 0}}function pf(e){if(void 0!==e)return null===e?null:{exclusionListIds:e.exclusionListIds,listIds:e.listIds}}function ff(e){return!0}function hf(e){return gf(e)}function gf(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:C(e,"email")?e.email:void 0,id:C(e,"id")?e.id:void 0}}function wf(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,id:e.id}}function yf(e){return!0}function vf(e){return bf(e)}function bf(e,t){return null==e?e:{tag:C(e,"tag")?e.tag:void 0,sender:C(e,"sender")?hf(e.sender):void 0,name:C(e,"name")?e.name:void 0,htmlContent:C(e,"htmlContent")?e.htmlContent:void 0,htmlUrl:C(e,"htmlUrl")?e.htmlUrl:void 0,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0,subject:C(e,"subject")?e.subject:void 0,replyTo:C(e,"replyTo")?e.replyTo:void 0,toField:C(e,"toField")?e.toField:void 0,recipients:C(e,"recipients")?cf(e.recipients):void 0,attachmentUrl:C(e,"attachmentUrl")?e.attachmentUrl:void 0,inlineImageActivation:C(e,"inlineImageActivation")?e.inlineImageActivation:void 0,mirrorActive:C(e,"mirrorActive")?e.mirrorActive:void 0,recurring:C(e,"recurring")?e.recurring:void 0,footer:C(e,"footer")?e.footer:void 0,header:C(e,"header")?e.header:void 0,utmCampaign:C(e,"utmCampaign")?e.utmCampaign:void 0,params:C(e,"params")?e.params:void 0,sendAtBestTime:C(e,"sendAtBestTime")?e.sendAtBestTime:void 0,abTesting:C(e,"abTesting")?e.abTesting:void 0,subjectA:C(e,"subjectA")?e.subjectA:void 0,subjectB:C(e,"subjectB")?e.subjectB:void 0,splitRule:C(e,"splitRule")?e.splitRule:void 0,winnerCriteria:C(e,"winnerCriteria")?e.winnerCriteria:void 0,winnerDelay:C(e,"winnerDelay")?e.winnerDelay:void 0,ipWarmupEnable:C(e,"ipWarmupEnable")?e.ipWarmupEnable:void 0,initialQuota:C(e,"initialQuota")?e.initialQuota:void 0,increaseRate:C(e,"increaseRate")?e.increaseRate:void 0}}function If(e){if(void 0!==e)return null===e?null:{tag:e.tag,sender:wf(e.sender),name:e.name,htmlContent:e.htmlContent,htmlUrl:e.htmlUrl,scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString(),subject:e.subject,replyTo:e.replyTo,toField:e.toField,recipients:pf(e.recipients),attachmentUrl:e.attachmentUrl,inlineImageActivation:e.inlineImageActivation,mirrorActive:e.mirrorActive,recurring:e.recurring,footer:e.footer,header:e.header,utmCampaign:e.utmCampaign,params:e.params,sendAtBestTime:e.sendAtBestTime,abTesting:e.abTesting,subjectA:e.subjectA,subjectB:e.subjectB,splitRule:e.splitRule,winnerCriteria:e.winnerCriteria,winnerDelay:e.winnerDelay,ipWarmupEnable:e.ipWarmupEnable,initialQuota:e.initialQuota,increaseRate:e.increaseRate}}function Cf(e){return!0}function kf(e){return Rf(e)}function Rf(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,folderId:C(e,"folderId")?e.folderId:void 0}}function qf(e){if(void 0!==e)return null===e?null:{name:e.name,folderId:e.folderId}}function Sf(e){return!0}function Af(e){return Tf(e)}function Tf(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:C(e,"email")?e.email:void 0,ips:C(e,"ips")?e.ips.map(qn):void 0}}function Bf(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,ips:void 0===e.ips?void 0:e.ips.map(An)}}function Df(e){return!0}function Ef(e){return Nf(e)}function Nf(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,sender:C(e,"sender")?e.sender:void 0,content:C(e,"content")?e.content:void 0,recipients:C(e,"recipients")?jn(e.recipients):void 0,scheduledAt:C(e,"scheduledAt")?new Date(e.scheduledAt):void 0}}function Pf(e){if(void 0!==e)return null===e?null:{name:e.name,sender:e.sender,content:e.content,recipients:On(e.recipients),scheduledAt:void 0===e.scheduledAt?void 0:e.scheduledAt.toISOString()}}function Kf(e){return!0}function Uf(e){return Lf(e)}function Lf(e,t){return null==e?e:{name:C(e,"name")?e.name:void 0,email:C(e,"email")?e.email:void 0,id:C(e,"id")?e.id:void 0}}function jf(e){if(void 0!==e)return null===e?null:{name:e.name,email:e.email,id:e.id}}function Ff(e){return!0}function Of(e){return xf(e)}function xf(e,t){return null==e?e:{tag:C(e,"tag")?e.tag:void 0,sender:C(e,"sender")?Uf(e.sender):void 0,templateName:C(e,"templateName")?e.templateName:void 0,htmlContent:C(e,"htmlContent")?e.htmlContent:void 0,htmlUrl:C(e,"htmlUrl")?e.htmlUrl:void 0,subject:C(e,"subject")?e.subject:void 0,replyTo:C(e,"replyTo")?e.replyTo:void 0,toField:C(e,"toField")?e.toField:void 0,attachmentUrl:C(e,"attachmentUrl")?e.attachmentUrl:void 0,isActive:C(e,"isActive")?e.isActive:void 0}}function Gf(e){if(void 0!==e)return null===e?null:{tag:e.tag,sender:jf(e.sender),templateName:e.templateName,htmlContent:e.htmlContent,htmlUrl:e.htmlUrl,subject:e.subject,replyTo:e.replyTo,toField:e.toField,attachmentUrl:e.attachmentUrl,isActive:e.isActive}}function Mf(e){return!0}function Vf(e){return Wf(e)}function Wf(e,t){return null==e?e:{url:C(e,"url")?e.url:void 0,description:C(e,"description")?e.description:void 0,events:C(e,"events")?e.events:void 0}}function _f(e){if(void 0!==e)return null===e?null:{url:e.url,description:e.description,events:e.events}}function Hf(e){let t=!0;return t=t&&"imageUrl"in e,t}function Qf(e){return $f(e)}function $f(e,t){return null==e?e:{imageUrl:e.imageUrl,name:C(e,"name")?e.name:void 0}}function zf(e){if(void 0!==e)return null===e?null:{imageUrl:e.imageUrl,name:e.name}}!function(e){e.NotAvailable="notAvailable",e.Pending="pending",e.Tie="tie",e.A="A",e.B="B"}(Q||(Q={})),function(e){e.Open="Open",e.Click="Click"}($||($={})),function(e){e.Text="text",e.Date="date",e.Float="float",e.Boolean="boolean",e.Id="id",e.Category="category"}(z||(z={})),function(e){e.Fr="fr",e.Es="es",e.Pt="pt",e.It="it",e.De="de",e.En="en"}(J||(J={})),function(e){e.Open="open",e.Click="click"}(Y||(Y={})),function(e){e.Sent="sent",e.HardBounce="hardBounce",e.SoftBounce="softBounce",e.Blocked="blocked",e.Spam="spam",e.Delivered="delivered",e.Request="request",e.Click="click",e.Invalid="invalid",e.Deferred="deferred",e.Opened="opened",e.UniqueOpened="uniqueOpened",e.Unsubscribed="unsubscribed",e.ListAddition="listAddition",e.ContactUpdated="contactUpdated",e.ContactDeleted="contactDeleted"}(X||(X={})),function(e){e.Transactional="transactional",e.Marketing="marketing"}(Z||(Z={})),function(e){e.All="all",e.NonClickers="nonClickers",e.NonOpeners="nonOpeners",e.Clickers="clickers",e.Openers="openers",e.SoftBounces="softBounces",e.HardBounces="hardBounces",e.Unsubscribed="unsubscribed"}(ee||(ee={})),function(e){e.InvalidParameter="invalid_parameter",e.MissingParameter="missing_parameter",e.OutOfRange="out_of_range",e.CampaignProcessing="campaign_processing",e.CampaignSent="campaign_sent",e.DocumentNotFound="document_not_found",e.ResellerPermissionDenied="reseller_permission_denied",e.NotEnoughCredits="not_enough_credits",e.PermissionDenied="permission_denied",e.DuplicateParameter="duplicate_parameter",e.DuplicateRequest="duplicate_request",e.MethodNotAllowed="method_not_allowed",e.Unauthorized="unauthorized",e.AccountUnderValidation="account_under_validation",e.NotAcceptable="not_acceptable"}(te||(te={})),function(e){e.PayAsYouGo="payAsYouGo",e.Free="free",e.Subscription="subscription",e.Sms="sms",e.Reseller="reseller"}(ne||(ne={})),function(e){e.SendLimit="sendLimit"}(ie||(ie={})),function(e){e.Normal="normal",e.Transactional="transactional",e.Category="category",e.Calculated="calculated",e.Global="global"}(ae||(ae={})),function(e){e.Text="text",e.Date="date",e.Float="float",e.Id="id",e.Boolean="boolean"}(re||(re={})),function(e){e.Classic="classic",e.Trigger="trigger"}(se||(se={})),function(e){e.Draft="draft",e.Sent="sent",e.Archive="archive",e.Queued="queued",e.Suspended="suspended",e.InProcess="in_process"}(oe||(oe={})),function(e){e.Classic="classic",e.Trigger="trigger"}(ue||(ue={})),function(e){e.Draft="draft",e.Sent="sent",e.Archive="archive",e.Queued="queued",e.Suspended="suspended",e.InProcess="in_process"}(le||(le={})),function(e){e.Classic="classic",e.Trigger="trigger"}(de||(de={})),function(e){e.Draft="draft",e.Sent="sent",e.Archive="archive",e.Queued="queued",e.Suspended="suspended",e.InProcess="in_process"}(ce||(ce={})),function(e){e.Bounces="bounces",e.HardBounces="hardBounces",e.SoftBounces="softBounces",e.Delivered="delivered",e.Spam="spam",e.Requests="requests",e.Opened="opened",e.Clicks="clicks",e.Invalid="invalid",e.Deferred="deferred",e.Blocked="blocked",e.Unsubscribed="unsubscribed"}(me||(me={})),function(e){e.Classic="classic",e.Trigger="trigger"}(pe||(pe={})),function(e){e.Draft="draft",e.Sent="sent",e.Archive="archive",e.Queued="queued",e.Suspended="suspended",e.InProcess="in_process"}(fe||(fe={})),function(e){e.Queued="queued",e.InProcess="in_process",e.Completed="completed"}(he||(he={})),function(e){e.Draft="draft",e.Sent="sent",e.Archive="archive",e.Queued="queued",e.Suspended="suspended",e.InProcess="inProcess"}(ge||(ge={})),function(e){e.Draft="draft",e.Sent="sent",e.Archive="archive",e.Queued="queued",e.Suspended="suspended",e.InProcess="inProcess"}(we||(we={})),function(e){e.Draft="draft",e.Sent="sent",e.Archive="archive",e.Queued="queued",e.Suspended="suspended",e.InProcess="inProcess"}(ye||(ye={})),function(e){e.Bounces="bounces",e.HardBounces="hardBounces",e.SoftBounces="softBounces",e.Delivered="delivered",e.Sent="sent",e.Accepted="accepted",e.Unsubscription="unsubscription",e.Replies="replies",e.Blocked="blocked",e.Rejected="rejected"}(ve||(ve={})),function(e){e.UnsubscribedViaMa="unsubscribedViaMA",e.UnsubscribedViaEmail="unsubscribedViaEmail",e.AdminBlocked="adminBlocked",e.UnsubscribedViaApi="unsubscribedViaApi",e.HardBounce="hardBounce",e.ContactFlaggedAsSpam="contactFlaggedAsSpam"}(be||(be={})),function(e){e.Marketing="marketing",e.Transac="transac"}(Ie||(Ie={})),function(e){e.Draft="draft",e.Scheduled="scheduled",e.Pending="pending",e.Approved="approved",e.Running="running",e.Suspended="suspended",e.Rejected="rejected",e.Sent="sent"}(Ce||(Ce={})),function(e){e.Draft="draft",e.Scheduled="scheduled",e.Pending="pending",e.Approved="approved",e.Running="running",e.Suspended="suspended",e.Rejected="rejected",e.Sent="sent"}(ke||(ke={})),function(e){e.AllContacts="allContacts",e.Subscribed="subscribed",e.Unsubscribed="unsubscribed",e.UnsubscribedPerList="unsubscribedPerList"}(Re||(Re={})),function(e){e.Openers="openers",e.NonOpeners="nonOpeners",e.Clickers="clickers",e.NonClickers="nonClickers",e.Unsubscribed="unsubscribed",e.HardBounces="hardBounces",e.SoftBounces="softBounces"}(qe||(qe={})),function(e){e.HardBounces="hardBounces",e.SoftBounces="softBounces",e.Unsubscribed="unsubscribed"}(Se||(Se={})),function(e){e.All="all",e.Delivered="delivered",e.Answered="answered",e.SoftBounces="softBounces",e.HardBounces="hardBounces",e.Unsubscribed="unsubscribed"}(Ae||(Ae={})),function(e){e.Fr="fr",e.Es="es",e.Pt="pt",e.It="it",e.De="de",e.En="en"}(Te||(Te={})),function(e){e.Transactional="transactional",e.Marketing="marketing"}(Be||(Be={})),function(e){e.Suspended="suspended",e.Archive="archive",e.Darchive="darchive",e.Sent="sent",e.Queued="queued",e.Replicate="replicate",e.ReplicateTemplate="replicateTemplate",e.Draft="draft"}(De||(De={})),function(e){e.Open="open",e.Click="click"}(Ee||(Ee={})),function(e){e.HardBounce="hardBounce",e.SoftBounce="softBounce",e.Blocked="blocked",e.Spam="spam",e.Delivered="delivered",e.Request="request",e.Click="click",e.Invalid="invalid",e.Deferred="deferred",e.Opened="opened",e.UniqueOpened="uniqueOpened",e.Unsubscribed="unsubscribed",e.ListAddition="listAddition",e.ContactUpdated="contactUpdated",e.ContactDeleted="contactDeleted"}(Ne||(Ne={}));class Jf extends w{async getAccountRaw(e){const t={};this.configuration&&this.configuration.apiKey&&(t["api-key"]=await this.configuration.apiKey("api-key"));const n=await this.request({path:"/account",method:"GET",headers:t,query:{}},e);return new A(n,(e=>Yi(e)))}async getAccount(e){const t=await this.getAccountRaw(e);return await t.value()}}class Yf extends w{async blockNewDomainRaw(e,t){if(null===e.blockDomain||void 0===e.blockDomain)throw new b("blockDomain","Required parameter requestParameters.blockDomain was null or undefined when calling blockNewDomain.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/blockedDomains",method:"POST",headers:n,query:{},body:Tt(e.blockDomain)},t);return new T(i)}async blockNewDomain(e,t){await this.blockNewDomainRaw(e,t)}async createSmtpTemplateRaw(e,t){if(null===e.smtpTemplate||void 0===e.smtpTemplate)throw new b("smtpTemplate","Required parameter requestParameters.smtpTemplate was null or undefined when calling createSmtpTemplate.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/templates",method:"POST",headers:n,query:{},body:ti(e.smtpTemplate)},t);return new A(i,(e=>wn(e)))}async createSmtpTemplate(e,t){const n=await this.createSmtpTemplateRaw(e,t);return await n.value()}async deleteBlockedDomainRaw(e,t){if(null===e.domain||void 0===e.domain)throw new b("domain","Required parameter requestParameters.domain was null or undefined when calling deleteBlockedDomain.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/blockedDomains/{domain}".replace("{domain}",encodeURIComponent(String(e.domain))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteBlockedDomain(e,t){await this.deleteBlockedDomainRaw(e,t)}async deleteHardbouncesRaw(e,t){const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/deleteHardbounces",method:"POST",headers:n,query:{},body:Ii(e.deleteHardbounces)},t);return new T(i)}async deleteHardbounces(e={},t){await this.deleteHardbouncesRaw(e,t)}async deleteSmtpTemplateRaw(e,t){if(null===e.templateId||void 0===e.templateId)throw new b("templateId","Required parameter requestParameters.templateId was null or undefined when calling deleteSmtpTemplate.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/templates/{templateId}".replace("{templateId}",encodeURIComponent(String(e.templateId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteSmtpTemplate(e,t){await this.deleteSmtpTemplateRaw(e,t)}async getAggregatedSmtpReportRaw(e,t){const n={};void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.days&&(n.days=e.days),void 0!==e.tag&&(n.tag=e.tag);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/smtp/statistics/aggregatedReport",method:"GET",headers:i,query:n},t);return new A(a,(e=>ta(e)))}async getAggregatedSmtpReport(e={},t){const n=await this.getAggregatedSmtpReportRaw(e,t);return await n.value()}async getBlockedDomainsRaw(e){const t={};this.configuration&&this.configuration.apiKey&&(t["api-key"]=await this.configuration.apiKey("api-key"));const n=await this.request({path:"/smtp/blockedDomains",method:"GET",headers:t,query:{}},e);return new A(n,(e=>wa(e)))}async getBlockedDomains(e){const t=await this.getBlockedDomainsRaw(e);return await t.value()}async getEmailEventReportRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.days&&(n.days=e.days),void 0!==e.email&&(n.email=e.email),void 0!==e.event&&(n.event=e.event),void 0!==e.tags&&(n.tags=e.tags),void 0!==e.messageId&&(n.messageId=e.messageId),void 0!==e.templateId&&(n.templateId=e.templateId);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/smtp/statistics/events",method:"GET",headers:i,query:n},t);return new A(a,(e=>_s(e)))}async getEmailEventReport(e={},t){const n=await this.getEmailEventReportRaw(e,t);return await n.value()}async getSmtpReportRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.days&&(n.days=e.days),void 0!==e.tag&&(n.tag=e.tag);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/smtp/statistics/reports",method:"GET",headers:i,query:n},t);return new A(a,(e=>Du(e)))}async getSmtpReport(e={},t){const n=await this.getSmtpReportRaw(e,t);return await n.value()}async getSmtpTemplateRaw(e,t){if(null===e.templateId||void 0===e.templateId)throw new b("templateId","Required parameter requestParameters.templateId was null or undefined when calling getSmtpTemplate.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/templates/{templateId}".replace("{templateId}",encodeURIComponent(String(e.templateId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>Ll(e)))}async getSmtpTemplate(e,t){const n=await this.getSmtpTemplateRaw(e,t);return await n.value()}async getSmtpTemplatesRaw(e,t){const n={};void 0!==e.templateStatus&&(n.templateStatus=e.templateStatus),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/smtp/templates",method:"GET",headers:i,query:n},t);return new A(a,(e=>xl(e)))}async getSmtpTemplates(e={},t){const n=await this.getSmtpTemplatesRaw(e,t);return await n.value()}async getTransacBlockedContactsRaw(e,t){const n={};void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),e.senders&&(n.senders=e.senders.join(I.csv));const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/smtp/blockedContacts",method:"GET",headers:i,query:n},t);return new A(a,(e=>sd(e)))}async getTransacBlockedContacts(e={},t){const n=await this.getTransacBlockedContactsRaw(e,t);return await n.value()}async getTransacEmailContentRaw(e,t){if(null===e.uuid||void 0===e.uuid)throw new b("uuid","Required parameter requestParameters.uuid was null or undefined when calling getTransacEmailContent.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/emails/{uuid}".replace("{uuid}",encodeURIComponent(String(e.uuid))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>fd(e)))}async getTransacEmailContent(e,t){const n=await this.getTransacEmailContentRaw(e,t);return await n.value()}async getTransacEmailsListRaw(e,t){const n={};void 0!==e.email&&(n.email=e.email),void 0!==e.templateId&&(n.templateId=e.templateId),void 0!==e.messageId&&(n.messageId=e.messageId),void 0!==e.startDate&&(n.startDate=e.startDate.toISOString().substring(0,10)),void 0!==e.endDate&&(n.endDate=e.endDate.toISOString().substring(0,10));const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/smtp/emails",method:"GET",headers:i,query:n},t);return new A(a,(e=>Cd(e)))}async getTransacEmailsList(e={},t){const n=await this.getTransacEmailsListRaw(e,t);return await n.value()}async sendTemplateRaw(e,t){if(null===e.templateId||void 0===e.templateId)throw new b("templateId","Required parameter requestParameters.templateId was null or undefined when calling sendTemplate.");if(null===e.sendEmail||void 0===e.sendEmail)throw new b("sendEmail","Required parameter requestParameters.sendEmail was null or undefined when calling sendTemplate.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/templates/{templateId}/send".replace("{templateId}",encodeURIComponent(String(e.templateId))),method:"POST",headers:n,query:{},body:Nm(e.sendEmail)},t);return new A(i,(e=>bp(e)))}async sendTemplate(e,t){const n=await this.sendTemplateRaw(e,t);return await n.value()}async sendTestTemplateRaw(e,t){if(null===e.templateId||void 0===e.templateId)throw new b("templateId","Required parameter requestParameters.templateId was null or undefined when calling sendTestTemplate.");if(null===e.sendTestEmail||void 0===e.sendTestEmail)throw new b("sendTestEmail","Required parameter requestParameters.sendTestEmail was null or undefined when calling sendTestTemplate.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/templates/{templateId}/sendTest".replace("{templateId}",encodeURIComponent(String(e.templateId))),method:"POST",headers:n,query:{},body:Sp(e.sendTestEmail)},t);return new T(i)}async sendTestTemplate(e,t){await this.sendTestTemplateRaw(e,t)}async sendTransacEmailRaw(e,t){if(null===e.sendSmtpEmail||void 0===e.sendSmtpEmail)throw new b("sendSmtpEmail","Required parameter requestParameters.sendSmtpEmail was null or undefined when calling sendTransacEmail.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/email",method:"POST",headers:n,query:{},body:yp(e.sendSmtpEmail)},t);return new A(i,(e=>_n(e)))}async sendTransacEmail(e,t){const n=await this.sendTransacEmailRaw(e,t);return await n.value()}async smtpBlockedContactsEmailDeleteRaw(e,t){if(null===e.email||void 0===e.email)throw new b("email","Required parameter requestParameters.email was null or undefined when calling smtpBlockedContactsEmailDelete.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/blockedContacts/{email}".replace("{email}",encodeURIComponent(String(e.email))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async smtpBlockedContactsEmailDelete(e,t){await this.smtpBlockedContactsEmailDeleteRaw(e,t)}async smtpLogMessageIdDeleteRaw(e,t){if(null===e.messageId||void 0===e.messageId)throw new b("messageId","Required parameter requestParameters.messageId was null or undefined when calling smtpLogMessageIdDelete.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/log/{messageId}".replace("{messageId}",encodeURIComponent(String(e.messageId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async smtpLogMessageIdDelete(e,t){await this.smtpLogMessageIdDeleteRaw(e,t)}async updateSmtpTemplateRaw(e,t){if(null===e.templateId||void 0===e.templateId)throw new b("templateId","Required parameter requestParameters.templateId was null or undefined when calling updateSmtpTemplate.");if(null===e.smtpTemplate||void 0===e.smtpTemplate)throw new b("smtpTemplate","Required parameter requestParameters.smtpTemplate was null or undefined when calling updateSmtpTemplate.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smtp/templates/{templateId}".replace("{templateId}",encodeURIComponent(String(e.templateId))),method:"PUT",headers:n,query:{},body:Gf(e.smtpTemplate)},t);return new T(i)}async updateSmtpTemplate(e,t){await this.updateSmtpTemplateRaw(e,t)}}!function(e){e.Bounces="bounces",e.HardBounces="hardBounces",e.SoftBounces="softBounces",e.Delivered="delivered",e.Spam="spam",e.Requests="requests",e.Opened="opened",e.Clicks="clicks",e.Invalid="invalid",e.Deferred="deferred",e.Blocked="blocked",e.Unsubscribed="unsubscribed"}(Pe||(Pe={}));class Xf{keys;configParamTemplate;constructor(e,t){this.keys=e,this.configParamTemplate=t}async buildConfig(){const e=await this.keys,n=this.configParamTemplate?Object.assign({},this.configParamTemplate):{},i={pre:async e=>{t.silly("Context: %j",e)}};return n.apiKey=e.apiKey,n.middleware=[i],n}async accountApi(){const e=await this.buildConfig();return new Jf(new h(e))}async smtpApi(){const e=await this.buildConfig();return new Yf(new h(e))}async fetchAccountData(){const e=await this.accountApi();return await e.getAccount()}}class Zf extends w{async createAttributeRaw(e,t){if(null===e.attributeCategory||void 0===e.attributeCategory)throw new b("attributeCategory","Required parameter requestParameters.attributeCategory was null or undefined when calling createAttribute.");if(null===e.attributeName||void 0===e.attributeName)throw new b("attributeName","Required parameter requestParameters.attributeName was null or undefined when calling createAttribute.");if(null===e.createAttribute||void 0===e.createAttribute)throw new b("createAttribute","Required parameter requestParameters.createAttribute was null or undefined when calling createAttribute.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/attributes/{attributeCategory}/{attributeName}".replace("{attributeCategory}",encodeURIComponent(String(e.attributeCategory))).replace("{attributeName}",encodeURIComponent(String(e.attributeName))),method:"POST",headers:n,query:{},body:xt(e.createAttribute)},t);return new T(i)}async createAttribute(e,t){await this.createAttributeRaw(e,t)}async deleteAttributeRaw(e,t){if(null===e.attributeCategory||void 0===e.attributeCategory)throw new b("attributeCategory","Required parameter requestParameters.attributeCategory was null or undefined when calling deleteAttribute.");if(null===e.attributeName||void 0===e.attributeName)throw new b("attributeName","Required parameter requestParameters.attributeName was null or undefined when calling deleteAttribute.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/attributes/{attributeCategory}/{attributeName}".replace("{attributeCategory}",encodeURIComponent(String(e.attributeCategory))).replace("{attributeName}",encodeURIComponent(String(e.attributeName))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteAttribute(e,t){await this.deleteAttributeRaw(e,t)}async getAttributesRaw(e){const t={};this.configuration&&this.configuration.apiKey&&(t["api-key"]=await this.configuration.apiKey("api-key"));const n=await this.request({path:"/contacts/attributes",method:"GET",headers:t,query:{}},e);return new A(n,(e=>pa(e)))}async getAttributes(e){const t=await this.getAttributesRaw(e);return await t.value()}async updateAttributeRaw(e,t){if(null===e.attributeCategory||void 0===e.attributeCategory)throw new b("attributeCategory","Required parameter requestParameters.attributeCategory was null or undefined when calling updateAttribute.");if(null===e.attributeName||void 0===e.attributeName)throw new b("attributeName","Required parameter requestParameters.attributeName was null or undefined when calling updateAttribute.");if(null===e.updateAttribute||void 0===e.updateAttribute)throw new b("updateAttribute","Required parameter requestParameters.updateAttribute was null or undefined when calling updateAttribute.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/attributes/{attributeCategory}/{attributeName}".replace("{attributeCategory}",encodeURIComponent(String(e.attributeCategory))).replace("{attributeName}",encodeURIComponent(String(e.attributeName))),method:"PUT",headers:n,query:{},body:Mp(e.updateAttribute)},t);return new T(i)}async updateAttribute(e,t){await this.updateAttributeRaw(e,t)}}!function(e){e.Normal="normal",e.Transactional="transactional",e.Category="category",e.Calculated="calculated",e.Global="global"}(Ke||(Ke={})),function(e){e.Normal="normal",e.Transactional="transactional",e.Category="category",e.Calculated="calculated",e.Global="global"}(Ue||(Ue={})),function(e){e.Category="category",e.Calculated="calculated",e.Global="global"}(Le||(Le={}));class eh extends w{async addContactToListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling addContactToList.");if(null===e.contactEmails||void 0===e.contactEmails)throw new b("contactEmails","Required parameter requestParameters.contactEmails was null or undefined when calling addContactToList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}/contacts/add".replace("{listId}",encodeURIComponent(String(e.listId))),method:"POST",headers:n,query:{},body:bt(e.contactEmails)},t);return new A(i,(e=>Tc(e)))}async addContactToList(e,t){const n=await this.addContactToListRaw(e,t);return await n.value()}async createAttributeRaw(e,t){if(null===e.attributeCategory||void 0===e.attributeCategory)throw new b("attributeCategory","Required parameter requestParameters.attributeCategory was null or undefined when calling createAttribute.");if(null===e.attributeName||void 0===e.attributeName)throw new b("attributeName","Required parameter requestParameters.attributeName was null or undefined when calling createAttribute.");if(null===e.createAttribute||void 0===e.createAttribute)throw new b("createAttribute","Required parameter requestParameters.createAttribute was null or undefined when calling createAttribute.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/attributes/{attributeCategory}/{attributeName}".replace("{attributeCategory}",encodeURIComponent(String(e.attributeCategory))).replace("{attributeName}",encodeURIComponent(String(e.attributeName))),method:"POST",headers:n,query:{},body:xt(e.createAttribute)},t);return new T(i)}async createAttribute(e,t){await this.createAttributeRaw(e,t)}async createContactRaw(e,t){if(null===e.createContact||void 0===e.createContact)throw new b("createContact","Required parameter requestParameters.createContact was null or undefined when calling createContact.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts",method:"POST",headers:n,query:{},body:$t(e.createContact)},t);return new A(i,(e=>ii(e)))}async createContact(e,t){const n=await this.createContactRaw(e,t);return await n.value()}async createDoiContactRaw(e,t){if(null===e.createDoiContact||void 0===e.createDoiContact)throw new b("createDoiContact","Required parameter requestParameters.createDoiContact was null or undefined when calling createDoiContact.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/doubleOptinConfirmation",method:"POST",headers:n,query:{},body:Xt(e.createDoiContact)},t);return new T(i)}async createDoiContact(e,t){await this.createDoiContactRaw(e,t)}async createFolderRaw(e,t){if(null===e.createFolder||void 0===e.createFolder)throw new b("createFolder","Required parameter requestParameters.createFolder was null or undefined when calling createFolder.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders",method:"POST",headers:n,query:{},body:li(e.createFolder)},t);return new A(i,(e=>wn(e)))}async createFolder(e,t){const n=await this.createFolderRaw(e,t);return await n.value()}async createListRaw(e,t){if(null===e.createList||void 0===e.createList)throw new b("createList","Required parameter requestParameters.createList was null or undefined when calling createList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists",method:"POST",headers:n,query:{},body:hn(e.createList)},t);return new A(i,(e=>wn(e)))}async createList(e,t){const n=await this.createListRaw(e,t);return await n.value()}async deleteAttributeRaw(e,t){if(null===e.attributeCategory||void 0===e.attributeCategory)throw new b("attributeCategory","Required parameter requestParameters.attributeCategory was null or undefined when calling deleteAttribute.");if(null===e.attributeName||void 0===e.attributeName)throw new b("attributeName","Required parameter requestParameters.attributeName was null or undefined when calling deleteAttribute.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/attributes/{attributeCategory}/{attributeName}".replace("{attributeCategory}",encodeURIComponent(String(e.attributeCategory))).replace("{attributeName}",encodeURIComponent(String(e.attributeName))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteAttribute(e,t){await this.deleteAttributeRaw(e,t)}async deleteContactRaw(e,t){if(null===e.email||void 0===e.email)throw new b("email","Required parameter requestParameters.email was null or undefined when calling deleteContact.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/{email}".replace("{email}",encodeURIComponent(String(e.email))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteContact(e,t){await this.deleteContactRaw(e,t)}async deleteFolderRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling deleteFolder.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders/{folderId}".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteFolder(e,t){await this.deleteFolderRaw(e,t)}async deleteListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling deleteList.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}".replace("{listId}",encodeURIComponent(String(e.listId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteList(e,t){await this.deleteListRaw(e,t)}async getAttributesRaw(e){const t={};this.configuration&&this.configuration.apiKey&&(t["api-key"]=await this.configuration.apiKey("api-key"));const n=await this.request({path:"/contacts/attributes",method:"GET",headers:t,query:{}},e);return new A(n,(e=>pa(e)))}async getAttributes(e){const t=await this.getAttributesRaw(e);return await t.value()}async getContactInfoRaw(e,t){if(null===e.email||void 0===e.email)throw new b("email","Required parameter requestParameters.email was null or undefined when calling getContactInfo.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/{email}".replace("{email}",encodeURIComponent(String(e.email))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>bo(e)))}async getContactInfo(e,t){const n=await this.getContactInfoRaw(e,t);return await n.value()}async getContactStatsRaw(e,t){if(null===e.email||void 0===e.email)throw new b("email","Required parameter requestParameters.email was null or undefined when calling getContactStats.");const n={};void 0!==e.startDate&&(n.startDate=e.startDate.toISOString().substring(0,10)),void 0!==e.endDate&&(n.endDate=e.endDate.toISOString().substring(0,10));const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/{email}/campaignStats".replace("{email}",encodeURIComponent(String(e.email))),method:"GET",headers:i,query:n},t);return new A(a,(e=>ts(e)))}async getContactStats(e,t){const n=await this.getContactStatsRaw(e,t);return await n.value()}async getContactsRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.modifiedSince&&(n.modifiedSince=e.modifiedSince.toISOString()),void 0!==e.createdSince&&(n.createdSince=e.createdSince.toISOString()),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts",method:"GET",headers:i,query:n},t);return new A(a,(e=>ls(e)))}async getContacts(e={},t){const n=await this.getContactsRaw(e,t);return await n.value()}async getContactsFromListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling getContactsFromList.");const n={};void 0!==e.modifiedSince&&(n.modifiedSince=e.modifiedSince.toISOString()),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/lists/{listId}/contacts".replace("{listId}",encodeURIComponent(String(e.listId))),method:"GET",headers:i,query:n},t);return new A(a,(e=>ls(e)))}async getContactsFromList(e,t){const n=await this.getContactsFromListRaw(e,t);return await n.value()}async getFolderRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling getFolder.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders/{folderId}".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>No(e)))}async getFolder(e,t){const n=await this.getFolderRaw(e,t);return await n.value()}async getFolderListsRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling getFolderLists.");const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/folders/{folderId}/lists".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"GET",headers:i,query:n},t);return new A(a,(e=>xo(e)))}async getFolderLists(e,t){const n=await this.getFolderListsRaw(e,t);return await n.value()}async getFoldersRaw(e,t){if(null===e.limit||void 0===e.limit)throw new b("limit","Required parameter requestParameters.limit was null or undefined when calling getFolders.");if(null===e.offset||void 0===e.offset)throw new b("offset","Required parameter requestParameters.offset was null or undefined when calling getFolders.");const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/folders",method:"GET",headers:i,query:n},t);return new A(a,(e=>Wo(e)))}async getFolders(e,t){const n=await this.getFoldersRaw(e,t);return await n.value()}async getListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling getList.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}".replace("{listId}",encodeURIComponent(String(e.listId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>To(e)))}async getList(e,t){const n=await this.getListRaw(e,t);return await n.value()}async getListsRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/lists",method:"GET",headers:i,query:n},t);return new A(a,(e=>fu(e)))}async getLists(e={},t){const n=await this.getListsRaw(e,t);return await n.value()}async getSegmentsRaw(e,t){if(null===e.limit||void 0===e.limit)throw new b("limit","Required parameter requestParameters.limit was null or undefined when calling getSegments.");if(null===e.offset||void 0===e.offset)throw new b("offset","Required parameter requestParameters.offset was null or undefined when calling getSegments.");const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/segments",method:"GET",headers:i,query:n},t);return new A(a,(e=>Fu(e)))}async getSegments(e,t){const n=await this.getSegmentsRaw(e,t);return await n.value()}async importContactsRaw(e,t){if(null===e.requestContactImport||void 0===e.requestContactImport)throw new b("requestContactImport","Required parameter requestParameters.requestContactImport was null or undefined when calling importContacts.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/import",method:"POST",headers:n,query:{},body:bm(e.requestContactImport)},t);return new A(i,(e=>hi(e)))}async importContacts(e,t){const n=await this.importContactsRaw(e,t);return await n.value()}async removeContactFromListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling removeContactFromList.");if(null===e.contactEmails||void 0===e.contactEmails)throw new b("contactEmails","Required parameter requestParameters.contactEmails was null or undefined when calling removeContactFromList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}/contacts/remove".replace("{listId}",encodeURIComponent(String(e.listId))),method:"POST",headers:n,query:{},body:em(e.contactEmails)},t);return new A(i,(e=>Tc(e)))}async removeContactFromList(e,t){const n=await this.removeContactFromListRaw(e,t);return await n.value()}async requestContactExportRaw(e,t){if(null===e.requestContactExport||void 0===e.requestContactExport)throw new b("requestContactExport","Required parameter requestParameters.requestContactExport was null or undefined when calling requestContactExport.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/export",method:"POST",headers:n,query:{},body:mm(e.requestContactExport)},t);return new A(i,(e=>hi(e)))}async requestContactExport(e,t){const n=await this.requestContactExportRaw(e,t);return await n.value()}async updateAttributeRaw(e,t){if(null===e.attributeCategory||void 0===e.attributeCategory)throw new b("attributeCategory","Required parameter requestParameters.attributeCategory was null or undefined when calling updateAttribute.");if(null===e.attributeName||void 0===e.attributeName)throw new b("attributeName","Required parameter requestParameters.attributeName was null or undefined when calling updateAttribute.");if(null===e.updateAttribute||void 0===e.updateAttribute)throw new b("updateAttribute","Required parameter requestParameters.updateAttribute was null or undefined when calling updateAttribute.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/attributes/{attributeCategory}/{attributeName}".replace("{attributeCategory}",encodeURIComponent(String(e.attributeCategory))).replace("{attributeName}",encodeURIComponent(String(e.attributeName))),method:"PUT",headers:n,query:{},body:Mp(e.updateAttribute)},t);return new T(i)}async updateAttribute(e,t){await this.updateAttributeRaw(e,t)}async updateContactRaw(e,t){if(null===e.email||void 0===e.email)throw new b("email","Required parameter requestParameters.email was null or undefined when calling updateContact.");if(null===e.updateContact||void 0===e.updateContact)throw new b("updateContact","Required parameter requestParameters.updateContact was null or undefined when calling updateContact.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/{email}".replace("{email}",encodeURIComponent(String(e.email))),method:"PUT",headers:n,query:{},body:lf(e.updateContact)},t);return new T(i)}async updateContact(e,t){await this.updateContactRaw(e,t)}async updateFolderRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling updateFolder.");if(null===e.updateFolder||void 0===e.updateFolder)throw new b("updateFolder","Required parameter requestParameters.updateFolder was null or undefined when calling updateFolder.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders/{folderId}".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"PUT",headers:n,query:{},body:li(e.updateFolder)},t);return new T(i)}async updateFolder(e,t){await this.updateFolderRaw(e,t)}async updateListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling updateList.");if(null===e.updateList||void 0===e.updateList)throw new b("updateList","Required parameter requestParameters.updateList was null or undefined when calling updateList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}".replace("{listId}",encodeURIComponent(String(e.listId))),method:"PUT",headers:n,query:{},body:qf(e.updateList)},t);return new T(i)}async updateList(e,t){await this.updateListRaw(e,t)}}!function(e){e.Normal="normal",e.Transactional="transactional",e.Category="category",e.Calculated="calculated",e.Global="global"}(je||(je={})),function(e){e.Normal="normal",e.Transactional="transactional",e.Category="category",e.Calculated="calculated",e.Global="global"}(Fe||(Fe={})),function(e){e.Asc="asc",e.Desc="desc"}(Oe||(Oe={})),function(e){e.Asc="asc",e.Desc="desc"}(xe||(xe={})),function(e){e.Asc="asc",e.Desc="desc"}(Ge||(Ge={})),function(e){e.Asc="asc",e.Desc="desc"}(Me||(Me={})),function(e){e.Asc="asc",e.Desc="desc"}(Ve||(Ve={})),function(e){e.Asc="asc",e.Desc="desc"}(We||(We={})),function(e){e.Category="category",e.Calculated="calculated",e.Global="global"}(_e||(_e={}));class th extends w{async createEmailCampaignRaw(e,t){if(null===e.emailCampaigns||void 0===e.emailCampaigns)throw new b("emailCampaigns","Required parameter requestParameters.emailCampaigns was null or undefined when calling createEmailCampaign.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns",method:"POST",headers:n,query:{},body:cn(e.emailCampaigns)},t);return new A(i,(e=>wn(e)))}async createEmailCampaign(e,t){const n=await this.createEmailCampaignRaw(e,t);return await n.value()}async deleteEmailCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling deleteEmailCampaign.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteEmailCampaign(e,t){await this.deleteEmailCampaignRaw(e,t)}async emailExportRecipientsRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling emailExportRecipients.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}/exportRecipients".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{},body:qi(e.recipientExport)},t);return new A(i,(e=>hi(e)))}async emailExportRecipients(e,t){const n=await this.emailExportRecipientsRaw(e,t);return await n.value()}async getAbTestCampaignResultRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling getAbTestCampaignResult.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}/abTestCampaignResult".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>dt(e)))}async getAbTestCampaignResult(e,t){const n=await this.getAbTestCampaignResultRaw(e,t);return await n.value()}async getEmailCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling getEmailCampaign.");const n={};void 0!==e.statistics&&(n.statistics=e.statistics);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/emailCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"GET",headers:i,query:n},t);return new A(a,(e=>Bs(e)))}async getEmailCampaign(e,t){const n=await this.getEmailCampaignRaw(e,t);return await n.value()}async getEmailCampaignsRaw(e,t){const n={};void 0!==e.type&&(n.type=e.type),void 0!==e.status&&(n.status=e.status),void 0!==e.statistics&&(n.statistics=e.statistics),void 0!==e.startDate&&(n.startDate=e.startDate.toISOString()),void 0!==e.endDate&&(n.endDate=e.endDate.toISOString()),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.excludeHtmlContent&&(n.excludeHtmlContent=e.excludeHtmlContent);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/emailCampaigns",method:"GET",headers:i,query:n},t);return new A(a,(e=>js(e)))}async getEmailCampaigns(e={},t){const n=await this.getEmailCampaignsRaw(e,t);return await n.value()}async getSharedTemplateUrlRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling getSharedTemplateUrl.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}/sharedUrl".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>el(e)))}async getSharedTemplateUrl(e,t){const n=await this.getSharedTemplateUrlRaw(e,t);return await n.value()}async sendEmailCampaignNowRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling sendEmailCampaignNow.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}/sendNow".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{}},t);return new T(i)}async sendEmailCampaignNow(e,t){await this.sendEmailCampaignNowRaw(e,t)}async sendReportRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling sendReport.");if(null===e.sendReport||void 0===e.sendReport)throw new b("sendReport","Required parameter requestParameters.sendReport was null or undefined when calling sendReport.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}/sendReport".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{},body:xm(e.sendReport)},t);return new T(i)}async sendReport(e,t){await this.sendReportRaw(e,t)}async sendTestEmailRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling sendTestEmail.");if(null===e.emailTo||void 0===e.emailTo)throw new b("emailTo","Required parameter requestParameters.emailTo was null or undefined when calling sendTestEmail.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}/sendTest".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{},body:Sp(e.emailTo)},t);return new T(i)}async sendTestEmail(e,t){await this.sendTestEmailRaw(e,t)}async updateCampaignStatusRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling updateCampaignStatus.");if(null===e.status||void 0===e.status)throw new b("status","Required parameter requestParameters.status was null or undefined when calling updateCampaignStatus.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}/status".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"PUT",headers:n,query:{},body:Hp(e.status)},t);return new T(i)}async updateCampaignStatus(e,t){await this.updateCampaignStatusRaw(e,t)}async updateEmailCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling updateEmailCampaign.");if(null===e.emailCampaign||void 0===e.emailCampaign)throw new b("emailCampaign","Required parameter requestParameters.emailCampaign was null or undefined when calling updateEmailCampaign.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"PUT",headers:n,query:{},body:If(e.emailCampaign)},t);return new T(i)}async updateEmailCampaign(e,t){await this.updateEmailCampaignRaw(e,t)}async uploadImageToGalleryRaw(e,t){if(null===e.uploadImage||void 0===e.uploadImage)throw new b("uploadImage","Required parameter requestParameters.uploadImage was null or undefined when calling uploadImageToGallery.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/emailCampaigns/images",method:"POST",headers:n,query:{},body:zf(e.uploadImage)},t);return new T(i)}async uploadImageToGallery(e,t){await this.uploadImageToGalleryRaw(e,t)}}!function(e){e.GlobalStats="globalStats",e.LinksStats="linksStats",e.StatsByDomain="statsByDomain",e.StatsByDevice="statsByDevice",e.StatsByBrowser="statsByBrowser"}(He||(He={})),function(e){e.Classic="classic",e.Trigger="trigger"}(Qe||(Qe={})),function(e){e.Suspended="suspended",e.Archive="archive",e.Sent="sent",e.Queued="queued",e.Draft="draft",e.InProcess="inProcess"}($e||($e={})),function(e){e.GlobalStats="globalStats",e.LinksStats="linksStats",e.StatsByDomain="statsByDomain"}(ze||(ze={}));class nh extends w{async createFolderRaw(e,t){if(null===e.createFolder||void 0===e.createFolder)throw new b("createFolder","Required parameter requestParameters.createFolder was null or undefined when calling createFolder.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders",method:"POST",headers:n,query:{},body:li(e.createFolder)},t);return new A(i,(e=>wn(e)))}async createFolder(e,t){const n=await this.createFolderRaw(e,t);return await n.value()}async deleteFolderRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling deleteFolder.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders/{folderId}".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteFolder(e,t){await this.deleteFolderRaw(e,t)}async getFolderRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling getFolder.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders/{folderId}".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>No(e)))}async getFolder(e,t){const n=await this.getFolderRaw(e,t);return await n.value()}async getFolderListsRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling getFolderLists.");const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/folders/{folderId}/lists".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"GET",headers:i,query:n},t);return new A(a,(e=>xo(e)))}async getFolderLists(e,t){const n=await this.getFolderListsRaw(e,t);return await n.value()}async getFoldersRaw(e,t){if(null===e.limit||void 0===e.limit)throw new b("limit","Required parameter requestParameters.limit was null or undefined when calling getFolders.");if(null===e.offset||void 0===e.offset)throw new b("offset","Required parameter requestParameters.offset was null or undefined when calling getFolders.");const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/folders",method:"GET",headers:i,query:n},t);return new A(a,(e=>Wo(e)))}async getFolders(e,t){const n=await this.getFoldersRaw(e,t);return await n.value()}async updateFolderRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling updateFolder.");if(null===e.updateFolder||void 0===e.updateFolder)throw new b("updateFolder","Required parameter requestParameters.updateFolder was null or undefined when calling updateFolder.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/folders/{folderId}".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"PUT",headers:n,query:{},body:li(e.updateFolder)},t);return new T(i)}async updateFolder(e,t){await this.updateFolderRaw(e,t)}}!function(e){e.Asc="asc",e.Desc="desc"}(Je||(Je={})),function(e){e.Asc="asc",e.Desc="desc"}(Ye||(Ye={}));class ih extends w{async addContactToListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling addContactToList.");if(null===e.contactEmails||void 0===e.contactEmails)throw new b("contactEmails","Required parameter requestParameters.contactEmails was null or undefined when calling addContactToList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}/contacts/add".replace("{listId}",encodeURIComponent(String(e.listId))),method:"POST",headers:n,query:{},body:bt(e.contactEmails)},t);return new A(i,(e=>Tc(e)))}async addContactToList(e,t){const n=await this.addContactToListRaw(e,t);return await n.value()}async createListRaw(e,t){if(null===e.createList||void 0===e.createList)throw new b("createList","Required parameter requestParameters.createList was null or undefined when calling createList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists",method:"POST",headers:n,query:{},body:hn(e.createList)},t);return new A(i,(e=>wn(e)))}async createList(e,t){const n=await this.createListRaw(e,t);return await n.value()}async deleteListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling deleteList.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}".replace("{listId}",encodeURIComponent(String(e.listId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteList(e,t){await this.deleteListRaw(e,t)}async getContactsFromListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling getContactsFromList.");const n={};void 0!==e.modifiedSince&&(n.modifiedSince=e.modifiedSince.toISOString()),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/lists/{listId}/contacts".replace("{listId}",encodeURIComponent(String(e.listId))),method:"GET",headers:i,query:n},t);return new A(a,(e=>ls(e)))}async getContactsFromList(e,t){const n=await this.getContactsFromListRaw(e,t);return await n.value()}async getFolderListsRaw(e,t){if(null===e.folderId||void 0===e.folderId)throw new b("folderId","Required parameter requestParameters.folderId was null or undefined when calling getFolderLists.");const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/folders/{folderId}/lists".replace("{folderId}",encodeURIComponent(String(e.folderId))),method:"GET",headers:i,query:n},t);return new A(a,(e=>xo(e)))}async getFolderLists(e,t){const n=await this.getFolderListsRaw(e,t);return await n.value()}async getListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling getList.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}".replace("{listId}",encodeURIComponent(String(e.listId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>To(e)))}async getList(e,t){const n=await this.getListRaw(e,t);return await n.value()}async getListsRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/contacts/lists",method:"GET",headers:i,query:n},t);return new A(a,(e=>fu(e)))}async getLists(e={},t){const n=await this.getListsRaw(e,t);return await n.value()}async removeContactFromListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling removeContactFromList.");if(null===e.contactEmails||void 0===e.contactEmails)throw new b("contactEmails","Required parameter requestParameters.contactEmails was null or undefined when calling removeContactFromList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}/contacts/remove".replace("{listId}",encodeURIComponent(String(e.listId))),method:"POST",headers:n,query:{},body:em(e.contactEmails)},t);return new A(i,(e=>Tc(e)))}async removeContactFromList(e,t){const n=await this.removeContactFromListRaw(e,t);return await n.value()}async updateListRaw(e,t){if(null===e.listId||void 0===e.listId)throw new b("listId","Required parameter requestParameters.listId was null or undefined when calling updateList.");if(null===e.updateList||void 0===e.updateList)throw new b("updateList","Required parameter requestParameters.updateList was null or undefined when calling updateList.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/contacts/lists/{listId}".replace("{listId}",encodeURIComponent(String(e.listId))),method:"PUT",headers:n,query:{},body:qf(e.updateList)},t);return new T(i)}async updateList(e,t){await this.updateListRaw(e,t)}}!function(e){e.Asc="asc",e.Desc="desc"}(Xe||(Xe={})),function(e){e.Asc="asc",e.Desc="desc"}(Ze||(Ze={})),function(e){e.Asc="asc",e.Desc="desc"}(et||(et={}));class ah extends w{async getProcessRaw(e,t){if(null===e.processId||void 0===e.processId)throw new b("processId","Required parameter requestParameters.processId was null or undefined when calling getProcess.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/processes/{processId}".replace("{processId}",encodeURIComponent(String(e.processId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>yu(e)))}async getProcess(e,t){const n=await this.getProcessRaw(e,t);return await n.value()}async getProcessesRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/processes",method:"GET",headers:i,query:n},t);return new A(a,(e=>Cu(e)))}async getProcesses(e={},t){const n=await this.getProcessesRaw(e,t);return await n.value()}}class rh extends w{async addCreditsRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling addCredits.");if(null===e.addCredits||void 0===e.addCredits)throw new b("addCredits","Required parameter requestParameters.addCredits was null or undefined when calling addCredits.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/credits/add".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"POST",headers:n,query:{},body:Rt(e.addCredits)},t);return new A(i,(e=>$c(e)))}async addCredits(e,t){const n=await this.addCreditsRaw(e,t);return await n.value()}async associateIpToChildRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling associateIpToChild.");if(null===e.ip||void 0===e.ip)throw new b("ip","Required parameter requestParameters.ip was null or undefined when calling associateIpToChild.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/ips/associate".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"POST",headers:n,query:{},body:Cc(e.ip)},t);return new T(i)}async associateIpToChild(e,t){await this.associateIpToChildRaw(e,t)}async createChildDomainRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling createChildDomain.");if(null===e.addChildDomain||void 0===e.addChildDomain)throw new b("addChildDomain","Required parameter requestParameters.addChildDomain was null or undefined when calling createChildDomain.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/domains".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"POST",headers:n,query:{},body:gt(e.addChildDomain)},t);return new T(i)}async createChildDomain(e,t){await this.createChildDomainRaw(e,t)}async createResellerChildRaw(e,t){const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children",method:"POST",headers:n,query:{},body:Wt(e.resellerChild)},t);return new A(i,(e=>In(e)))}async createResellerChild(e={},t){const n=await this.createResellerChildRaw(e,t);return await n.value()}async deleteChildDomainRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling deleteChildDomain.");if(null===e.domainName||void 0===e.domainName)throw new b("domainName","Required parameter requestParameters.domainName was null or undefined when calling deleteChildDomain.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/domains/{domainName}".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))).replace("{domainName}",encodeURIComponent(String(e.domainName))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteChildDomain(e,t){await this.deleteChildDomainRaw(e,t)}async deleteResellerChildRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling deleteResellerChild.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteResellerChild(e,t){await this.deleteResellerChildRaw(e,t)}async dissociateIpFromChildRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling dissociateIpFromChild.");if(null===e.ip||void 0===e.ip)throw new b("ip","Required parameter requestParameters.ip was null or undefined when calling dissociateIpFromChild.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/ips/dissociate".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"POST",headers:n,query:{},body:Cc(e.ip)},t);return new T(i)}async dissociateIpFromChild(e,t){await this.dissociateIpFromChildRaw(e,t)}async getChildAccountCreationStatusRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling getChildAccountCreationStatus.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/accountCreationStatus".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>Pa(e)))}async getChildAccountCreationStatus(e,t){const n=await this.getChildAccountCreationStatusRaw(e,t);return await n.value()}async getChildDomainsRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling getChildDomains.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/domains".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>e.map(ja)))}async getChildDomains(e,t){const n=await this.getChildDomainsRaw(e,t);return await n.value()}async getChildInfoRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling getChildInfo.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>or(e)))}async getChildInfo(e,t){const n=await this.getChildInfoRaw(e,t);return await n.value()}async getResellerChildsRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/reseller/children",method:"GET",headers:i,query:n},t);return new A(a,(e=>hr(e)))}async getResellerChilds(e={},t){const n=await this.getResellerChildsRaw(e,t);return await n.value()}async getSsoTokenRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling getSsoToken.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/auth".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>Wl(e)))}async getSsoToken(e,t){const n=await this.getSsoTokenRaw(e,t);return await n.value()}async removeCreditsRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling removeCredits.");if(null===e.removeCredits||void 0===e.removeCredits)throw new b("removeCredits","Required parameter requestParameters.removeCredits was null or undefined when calling removeCredits.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/credits/remove".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"POST",headers:n,query:{},body:am(e.removeCredits)},t);return new A(i,(e=>$c(e)))}async removeCredits(e,t){const n=await this.removeCreditsRaw(e,t);return await n.value()}async updateChildAccountStatusRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling updateChildAccountStatus.");if(null===e.updateChildAccountStatus||void 0===e.updateChildAccountStatus)throw new b("updateChildAccountStatus","Required parameter requestParameters.updateChildAccountStatus was null or undefined when calling updateChildAccountStatus.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/accountStatus".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"PUT",headers:n,query:{},body:ef(e.updateChildAccountStatus)},t);return new T(i)}async updateChildAccountStatus(e,t){await this.updateChildAccountStatusRaw(e,t)}async updateChildDomainRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling updateChildDomain.");if(null===e.domainName||void 0===e.domainName)throw new b("domainName","Required parameter requestParameters.domainName was null or undefined when calling updateChildDomain.");if(null===e.updateChildDomain||void 0===e.updateChildDomain)throw new b("updateChildDomain","Required parameter requestParameters.updateChildDomain was null or undefined when calling updateChildDomain.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}/domains/{domainName}".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))).replace("{domainName}",encodeURIComponent(String(e.domainName))),method:"PUT",headers:n,query:{},body:rf(e.updateChildDomain)},t);return new T(i)}async updateChildDomain(e,t){await this.updateChildDomainRaw(e,t)}async updateResellerChildRaw(e,t){if(null===e.childIdentifier||void 0===e.childIdentifier)throw new b("childIdentifier","Required parameter requestParameters.childIdentifier was null or undefined when calling updateResellerChild.");if(null===e.resellerChild||void 0===e.resellerChild)throw new b("resellerChild","Required parameter requestParameters.resellerChild was null or undefined when calling updateResellerChild.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/reseller/children/{childIdentifier}".replace("{childIdentifier}",encodeURIComponent(String(e.childIdentifier))),method:"PUT",headers:n,query:{},body:Jp(e.resellerChild)},t);return new T(i)}async updateResellerChild(e,t){await this.updateResellerChildRaw(e,t)}}class sh extends w{async createSmsCampaignRaw(e,t){if(null===e.createSmsCampaign||void 0===e.createSmsCampaign)throw new b("createSmsCampaign","Required parameter requestParameters.createSmsCampaign was null or undefined when calling createSmsCampaign.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns",method:"POST",headers:n,query:{},body:Vn(e.createSmsCampaign)},t);return new A(i,(e=>wn(e)))}async createSmsCampaign(e,t){const n=await this.createSmsCampaignRaw(e,t);return await n.value()}async deleteSmsCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling deleteSmsCampaign.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteSmsCampaign(e,t){await this.deleteSmsCampaignRaw(e,t)}async getSmsCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling getSmsCampaign.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>ul(e)))}async getSmsCampaign(e,t){const n=await this.getSmsCampaignRaw(e,t);return await n.value()}async getSmsCampaignsRaw(e,t){const n={};void 0!==e.status&&(n.status=e.status),void 0!==e.startDate&&(n.startDate=e.startDate.toISOString()),void 0!==e.endDate&&(n.endDate=e.endDate.toISOString()),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/smsCampaigns",method:"GET",headers:i,query:n},t);return new A(a,(e=>bl(e)))}async getSmsCampaigns(e={},t){const n=await this.getSmsCampaignsRaw(e,t);return await n.value()}async requestSmsRecipientExportRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling requestSmsRecipientExport.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}/exportRecipients".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{},body:Rm(e.recipientExport)},t);return new A(i,(e=>hi(e)))}async requestSmsRecipientExport(e,t){const n=await this.requestSmsRecipientExportRaw(e,t);return await n.value()}async sendSmsCampaignNowRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling sendSmsCampaignNow.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}/sendNow".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{}},t);return new T(i)}async sendSmsCampaignNow(e,t){await this.sendSmsCampaignNowRaw(e,t)}async sendSmsReportRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling sendSmsReport.");if(null===e.sendReport||void 0===e.sendReport)throw new b("sendReport","Required parameter requestParameters.sendReport was null or undefined when calling sendSmsReport.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}/sendReport".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{},body:xm(e.sendReport)},t);return new T(i)}async sendSmsReport(e,t){await this.sendSmsReportRaw(e,t)}async sendTestSmsRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling sendTestSms.");if(null===e.phoneNumber||void 0===e.phoneNumber)throw new b("phoneNumber","Required parameter requestParameters.phoneNumber was null or undefined when calling sendTestSms.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}/sendTest".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"POST",headers:n,query:{},body:Dp(e.phoneNumber)},t);return new T(i)}async sendTestSms(e,t){await this.sendTestSmsRaw(e,t)}async updateSmsCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling updateSmsCampaign.");if(null===e.updateSmsCampaign||void 0===e.updateSmsCampaign)throw new b("updateSmsCampaign","Required parameter requestParameters.updateSmsCampaign was null or undefined when calling updateSmsCampaign.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"PUT",headers:n,query:{},body:Pf(e.updateSmsCampaign)},t);return new T(i)}async updateSmsCampaign(e,t){await this.updateSmsCampaignRaw(e,t)}async updateSmsCampaignStatusRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling updateSmsCampaignStatus.");if(null===e.status||void 0===e.status)throw new b("status","Required parameter requestParameters.status was null or undefined when calling updateSmsCampaignStatus.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/smsCampaigns/{campaignId}/status".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"PUT",headers:n,query:{},body:Hp(e.status)},t);return new T(i)}async updateSmsCampaignStatus(e,t){await this.updateSmsCampaignStatusRaw(e,t)}}!function(e){e.Suspended="suspended",e.Archive="archive",e.Sent="sent",e.Queued="queued",e.Draft="draft",e.InProcess="inProcess"}(tt||(tt={}));class oh extends w{async createSenderRaw(e,t){const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/senders",method:"POST",headers:n,query:{},body:En(e.sender)},t);return new A(i,(e=>Pn(e)))}async createSender(e={},t){const n=await this.createSenderRaw(e,t);return await n.value()}async deleteSenderRaw(e,t){if(null===e.senderId||void 0===e.senderId)throw new b("senderId","Required parameter requestParameters.senderId was null or undefined when calling deleteSender.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/senders/{senderId}".replace("{senderId}",encodeURIComponent(String(e.senderId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteSender(e,t){await this.deleteSenderRaw(e,t)}async getIpsRaw(e){const t={};this.configuration&&this.configuration.apiKey&&(t["api-key"]=await this.configuration.apiKey("api-key"));const n=await this.request({path:"/senders/ips",method:"GET",headers:t,query:{}},e);return new A(n,(e=>nu(e)))}async getIps(e){const t=await this.getIpsRaw(e);return await t.value()}async getIpsFromSenderRaw(e,t){if(null===e.senderId||void 0===e.senderId)throw new b("senderId","Required parameter requestParameters.senderId was null or undefined when calling getIpsFromSender.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/senders/{senderId}/ips".replace("{senderId}",encodeURIComponent(String(e.senderId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>su(e)))}async getIpsFromSender(e,t){const n=await this.getIpsFromSenderRaw(e,t);return await n.value()}async getSendersRaw(e,t){const n={};void 0!==e.ip&&(n.ip=e.ip),void 0!==e.domain&&(n.domain=e.domain);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/senders",method:"GET",headers:i,query:n},t);return new A(a,(e=>Ju(e)))}async getSenders(e={},t){const n=await this.getSendersRaw(e,t);return await n.value()}async updateSenderRaw(e,t){if(null===e.senderId||void 0===e.senderId)throw new b("senderId","Required parameter requestParameters.senderId was null or undefined when calling updateSender.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/senders/{senderId}".replace("{senderId}",encodeURIComponent(String(e.senderId))),method:"PUT",headers:n,query:{},body:Bf(e.sender)},t);return new T(i)}async updateSender(e,t){await this.updateSenderRaw(e,t)}}class uh extends w{async getSmsEventsRaw(e,t){const n={};void 0!==e.limit&&(n.limit=e.limit),void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.days&&(n.days=e.days),void 0!==e.phoneNumber&&(n.phoneNumber=e.phoneNumber),void 0!==e.event&&(n.event=e.event),void 0!==e.tags&&(n.tags=e.tags),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/transactionalSMS/statistics/events",method:"GET",headers:i,query:n},t);return new A(a,(e=>Tl(e)))}async getSmsEvents(e={},t){const n=await this.getSmsEventsRaw(e,t);return await n.value()}async getTransacAggregatedSmsReportRaw(e,t){const n={};void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.days&&(n.days=e.days),void 0!==e.tag&&(n.tag=e.tag);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/transactionalSMS/statistics/aggregatedReport",method:"GET",headers:i,query:n},t);return new A(a,(e=>$l(e)))}async getTransacAggregatedSmsReport(e={},t){const n=await this.getTransacAggregatedSmsReportRaw(e,t);return await n.value()}async getTransacSmsReportRaw(e,t){const n={};void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.days&&(n.days=e.days),void 0!==e.tag&&(n.tag=e.tag),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/transactionalSMS/statistics/reports",method:"GET",headers:i,query:n},t);return new A(a,(e=>Dd(e)))}async getTransacSmsReport(e={},t){const n=await this.getTransacSmsReportRaw(e,t);return await n.value()}async sendTransacSmsRaw(e,t){if(null===e.sendTransacSms||void 0===e.sendTransacSms)throw new b("sendTransacSms","Required parameter requestParameters.sendTransacSms was null or undefined when calling sendTransacSms.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/transactionalSMS/sms",method:"POST",headers:n,query:{},body:Kp(e.sendTransacSms)},t);return new A(i,(e=>Mm(e)))}async sendTransacSms(e,t){const n=await this.sendTransacSmsRaw(e,t);return await n.value()}}!function(e){e.Bounces="bounces",e.HardBounces="hardBounces",e.SoftBounces="softBounces",e.Delivered="delivered",e.Sent="sent",e.Accepted="accepted",e.Unsubscription="unsubscription",e.Replies="replies",e.Blocked="blocked",e.Rejected="rejected"}(nt||(nt={})),function(e){e.Asc="asc",e.Desc="desc"}(it||(it={})),function(e){e.Asc="asc",e.Desc="desc"}(at||(at={}));class lh extends w{async createWebhookRaw(e,t){if(null===e.createWebhook||void 0===e.createWebhook)throw new b("createWebhook","Required parameter requestParameters.createWebhook was null or undefined when calling createWebhook.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/webhooks",method:"POST",headers:n,query:{},body:pi(e.createWebhook)},t);return new A(i,(e=>wn(e)))}async createWebhook(e,t){const n=await this.createWebhookRaw(e,t);return await n.value()}async deleteWebhookRaw(e,t){if(null===e.webhookId||void 0===e.webhookId)throw new b("webhookId","Required parameter requestParameters.webhookId was null or undefined when calling deleteWebhook.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/webhooks/{webhookId}".replace("{webhookId}",encodeURIComponent(String(e.webhookId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteWebhook(e,t){await this.deleteWebhookRaw(e,t)}async getWebhookRaw(e,t){if(null===e.webhookId||void 0===e.webhookId)throw new b("webhookId","Required parameter requestParameters.webhookId was null or undefined when calling getWebhook.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/webhooks/{webhookId}".replace("{webhookId}",encodeURIComponent(String(e.webhookId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>Md(e)))}async getWebhook(e,t){const n=await this.getWebhookRaw(e,t);return await n.value()}async getWebhooksRaw(e,t){const n={};void 0!==e.type&&(n.type=e.type),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/webhooks",method:"GET",headers:i,query:n},t);return new A(a,(e=>Hd(e)))}async getWebhooks(e={},t){const n=await this.getWebhooksRaw(e,t);return await n.value()}async updateWebhookRaw(e,t){if(null===e.webhookId||void 0===e.webhookId)throw new b("webhookId","Required parameter requestParameters.webhookId was null or undefined when calling updateWebhook.");if(null===e.updateWebhook||void 0===e.updateWebhook)throw new b("updateWebhook","Required parameter requestParameters.updateWebhook was null or undefined when calling updateWebhook.");const n={"Content-Type":"application/json"};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/webhooks/{webhookId}".replace("{webhookId}",encodeURIComponent(String(e.webhookId))),method:"PUT",headers:n,query:{},body:_f(e.updateWebhook)},t);return new T(i)}async updateWebhook(e,t){await this.updateWebhookRaw(e,t)}}!function(e){e.Marketing="marketing",e.Transactional="transactional"}(rt||(rt={})),function(e){e.Asc="asc",e.Desc="desc"}(st||(st={}));class dh extends w{async deleteWhatsAppCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling deleteWhatsAppCampaign.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/whatsappCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"DELETE",headers:n,query:{}},t);return new T(i)}async deleteWhatsAppCampaign(e,t){await this.deleteWhatsAppCampaignRaw(e,t)}async getWhatsAppCampaignRaw(e,t){if(null===e.campaignId||void 0===e.campaignId)throw new b("campaignId","Required parameter requestParameters.campaignId was null or undefined when calling getWhatsAppCampaign.");const n={};this.configuration&&this.configuration.apiKey&&(n["api-key"]=await this.configuration.apiKey("api-key"));const i=await this.request({path:"/whatsappCampaigns/{campaignId}".replace("{campaignId}",encodeURIComponent(String(e.campaignId))),method:"GET",headers:n,query:{}},t);return new A(i,(e=>uc(e)))}async getWhatsAppCampaign(e,t){const n=await this.getWhatsAppCampaignRaw(e,t);return await n.value()}async getWhatsAppCampaignsRaw(e,t){const n={};void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/whatsappCampaigns",method:"GET",headers:i,query:n},t);return new A(a,(e=>gc(e)))}async getWhatsAppCampaigns(e={},t){const n=await this.getWhatsAppCampaignsRaw(e,t);return await n.value()}async getWhatsAppTemplatesRaw(e,t){const n={};void 0!==e.startDate&&(n.startDate=e.startDate),void 0!==e.endDate&&(n.endDate=e.endDate),void 0!==e.limit&&(n.limit=e.limit),void 0!==e.offset&&(n.offset=e.offset),void 0!==e.sort&&(n.sort=e.sort);const i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));const a=await this.request({path:"/whatsappCampaigns/template-list",method:"GET",headers:i,query:n},t);return new A(a,(e=>Fd(e)))}async getWhatsAppTemplates(e={},t){const n=await this.getWhatsAppTemplatesRaw(e,t);return await n.value()}}!function(e){e.Asc="asc",e.Desc="desc"}(ot||(ot={})),function(e){e.Asc="asc",e.Desc="desc"}(ut||(ut={}));class ch{constructor(){}static buildInformation(){return{version:"318",hash:"0a0f56910d99d3840ce352ad7bb0606727e6be18",branch:"alpha-2024-02-15-1",tag:"alpha-2024-02-15-1",timeBuiltISO:"2024-02-15T22:16:44-0800",notes:"No notes"}}}class mh{constructor(){}static functionMap(){return{eq:mh.equal,ne:mh.notEqual,lt:mh.lessThan,gt:mh.greaterThan,lte:mh.lessThanEqual,gte:mh.greaterThanEqual,and:mh.and,or:mh.or,formatBytes:mh.formatBytes,rpn:mh.reversePolishNotation,add:mh.add,sub:mh.sub,mul:mh.mul,div:mh.div,mod:mh.mod,maxNum:mh.maxNum,minNum:mh.minNum}}static registerAll(e){e.registerHelper(mh.functionMap())}static add(e,t){return n.safeNumber(e)+n.safeNumber(t)}static sub(e,t){return n.safeNumber(e)-n.safeNumber(t)}static mul(e,t){return n.safeNumber(e)*n.safeNumber(t)}static div(e,t){return n.safeNumber(e)/n.safeNumber(t)}static mod(e,t){return n.safeNumber(e)%n.safeNumber(t)}static equal(e,t){return e===t}static notEqual(e,t){return e!==t}static lessThan(e,t){return e<t}static lessThanEqual(e,t){return e<=t}static greaterThan(e,t){return e>t}static greaterThanEqual(e,t){return e>=t}static maxNum(...e){return Math.max(...e.slice(0,-1))}static minNum(...e){return Math.min(...e.slice(0,-1))}static and(...e){return Array.prototype.every.call(e,Boolean)}static or(...e){return Array.prototype.slice.call(e,0,-1).some(Boolean)}static formatBytes(e){return i.formatBytes(e)}static reversePolishNotation(...n){let i=null;try{const t=Object.assign({},mh.functionMap());delete t.formatBytes;const a=[];for(let i=0;i<n.length-1;i++){const r=n[i];if(t[r])if(a.length>1){const e=a.pop(),n=a.pop(),i=t[r](n,e,{});a.push(i)}else e.throwFormattedErr("Cannot execute operation %s - not enough args",r);else a.push(r)}i=a.pop()}catch(n){t.error("Failed to execute RPN: %s",n,n),i=e.asErr(n)?.message||"Failure"}return i}}class ph{prefix;suffix;maxCacheTemplates;cache;constructor(e="",t="",n=10){this.prefix=e,this.suffix=t,this.maxCacheTemplates=n,this.maxCacheTemplates>0&&(this.cache=new Map)}async renderTemplate(e,t,n=null){return this.renderRemoteTemplate(e,t,n)}async renderRemoteTemplate(e,t,n=null){const i=await this.fetchTemplate(e),a=n?await this.fetchTemplateText(n):null;a&&(await u.register(s),s.registerPartial(n,a));return i?i(t||{}):null}async renderTemplateDirect(e,t,n=null){return s.compile(e)(t)}async fetchTemplate(e){let n=null;try{if(this.cache&&this.cache.has(e))t.silly("Cache hit for template : %s",e),n=this.cache.get(e);else{t.debug("Cache miss for template : %s",e);const i=await this.fetchTemplateText(e);i&&(n=s.compile(i),this.cache&&n&&(this.cache.set(e,n),this.cache.size>this.maxCacheTemplates&&this.cache.delete(Array.from(this.cache.keys())[0])))}}catch(i){t.warn("Could not fetch and compile template : %s : %s",e,i,i),n=null}return n}async fetchTemplateText(e){let n=null;const a=i.trimToEmpty(this.prefix)+e+i.trimToEmpty(this.suffix);try{const e=await o(a);n=await e.text()}catch(e){t.warn("Could not fetch url : %s : %s",a,e,e),n=null}return n}}class fh{allModels;constructor(t){this.allModels=t,t&&0!=Object.keys(t).length||e.throwFormattedErr("Cannot create model validator, passed models was null/empty : %j",t)}static createFromYamlString(e,t){const n=d.load(e),i=t&&t.length>0?a.findValue(n,t):n;return fh.createFromParsedObject(i)}static createFromParsedObject(e){return new fh(e)}get modelNames(){return Object.keys(this.allModels)}addModel(e,t){this.allModels[e]=t}fetchModel(e){return this.allModels[e]}validate(e,n,i=!1,a=!0){let r=[];t.silly("Validating model %s all definitions are : %j",e,this.allModels);if(!n||0===Object.keys(n).length)i||r.push("Empty / null object sent, but empty not allowed here");else if(this.allModels&&e&&this.allModels[e]){const t=(new l).validate(n,this.allModels[e],this.allModels,i,a);t.errorCount>0&&(r=t.errors.map((e=>e.message)))}else r=['Model named "'+e+'" not present in schema'];return r}}class hh{static timeout(e,t,n){return c(e,this.createTimeoutObservable(t,n))}static createTimeoutObservable(e,t){return m.create((n=>{const i=setTimeout((()=>{clearTimeout(i),n.next(new r(e,t))}),t)}))}}class gh{static safeUnsubscribe(e){return a.safeCallFunction(e,"unsubscribe")}static async waitForNonNullOnSubject(e){return e.value?e.value:new Promise(((t,n)=>{const i=e.subscribe((e=>{e&&(gh.safeUnsubscribe(i),t(e))}))}))}static async waitForTargetValueOnSubject(e,t){return e.value===t?e.value:new Promise(((n,i)=>{const a=e.subscribe((e=>{e===t&&(gh.safeUnsubscribe(a),n(e))}))}))}}export{L as AbTestCampaignResultClickedLinksFromJSON,j as AbTestCampaignResultClickedLinksFromJSONTyped,F as AbTestCampaignResultClickedLinksToJSON,dt as AbTestCampaignResultFromJSON,ct as AbTestCampaignResultFromJSONTyped,W as AbTestCampaignResultStatisticsFromJSON,_ as AbTestCampaignResultStatisticsFromJSONTyped,H as AbTestCampaignResultStatisticsToJSON,mt as AbTestCampaignResultToJSON,$ as AbTestCampaignResultWinningCriteriaEnum,Q as AbTestCampaignResultWinningVersionEnum,N as AbTestVersionClicksInnerFromJSON,P as AbTestVersionClicksInnerFromJSONTyped,K as AbTestVersionClicksInnerToJSON,x as AbTestVersionStatsFromJSON,G as AbTestVersionStatsFromJSONTyped,M as AbTestVersionStatsToJSON,Jf as AccountApi,ft as AddChildDomainFromJSON,ht as AddChildDomainFromJSONTyped,gt as AddChildDomainToJSON,yt as AddContactToListFromJSON,vt as AddContactToListFromJSONTyped,bt as AddContactToListToJSON,Ct as AddCreditsFromJSON,kt as AddCreditsFromJSONTyped,Rt as AddCreditsToJSON,Zf as AttributesApi,f as BASE_PATH,w as BaseAPI,B as BlobApiResponse,St as BlockDomainFromJSON,At as BlockDomainFromJSONTyped,Tt as BlockDomainToJSON,p as BrevoMailSendingProvider,Xf as BrevoRatchet,I as COLLECTION_FORMATS,Dt as ComponentItemsFromJSON,Et as ComponentItemsFromJSONTyped,Nt as ComponentItemsToJSON,h as Configuration,eh as ContactsApi,Kt as CreateAttributeEnumerationInnerFromJSON,Ut as CreateAttributeEnumerationInnerFromJSONTyped,Lt as CreateAttributeEnumerationInnerToJSON,Ft as CreateAttributeFromJSON,Ot as CreateAttributeFromJSONTyped,xt as CreateAttributeToJSON,z as CreateAttributeTypeEnum,Mt as CreateChildFromJSON,Vt as CreateChildFromJSONTyped,J as CreateChildLanguageEnum,Wt as CreateChildToJSON,Ht as CreateContactFromJSON,Qt as CreateContactFromJSONTyped,$t as CreateContactToJSON,Jt as CreateDoiContactFromJSON,Yt as CreateDoiContactFromJSONTyped,Xt as CreateDoiContactToJSON,ln as CreateEmailCampaignFromJSON,dn as CreateEmailCampaignFromJSONTyped,en as CreateEmailCampaignRecipientsFromJSON,tn as CreateEmailCampaignRecipientsFromJSONTyped,nn as CreateEmailCampaignRecipientsToJSON,rn as CreateEmailCampaignSenderFromJSON,sn as CreateEmailCampaignSenderFromJSONTyped,on as CreateEmailCampaignSenderToJSON,cn as CreateEmailCampaignToJSON,Y as CreateEmailCampaignWinnerCriteriaEnum,pn as CreateListFromJSON,fn as CreateListFromJSONTyped,hn as CreateListToJSON,wn as CreateModelFromJSON,yn as CreateModelFromJSONTyped,vn as CreateModelToJSON,In as CreateResellerFromJSON,Cn as CreateResellerFromJSONTyped,kn as CreateResellerToJSON,Bn as CreateSenderFromJSON,Dn as CreateSenderFromJSONTyped,qn as CreateSenderIpsInnerFromJSON,Sn as CreateSenderIpsInnerFromJSONTyped,An as CreateSenderIpsInnerToJSON,Pn as CreateSenderModelFromJSON,Kn as CreateSenderModelFromJSONTyped,Un as CreateSenderModelToJSON,En as CreateSenderToJSON,Gn as CreateSmsCampaignFromJSON,Mn as CreateSmsCampaignFromJSONTyped,jn as CreateSmsCampaignRecipientsFromJSON,Fn as CreateSmsCampaignRecipientsFromJSONTyped,On as CreateSmsCampaignRecipientsToJSON,Vn as CreateSmsCampaignToJSON,_n as CreateSmtpEmailFromJSON,Hn as CreateSmtpEmailFromJSONTyped,Qn as CreateSmtpEmailToJSON,Zn as CreateSmtpTemplateFromJSON,ei as CreateSmtpTemplateFromJSONTyped,zn as CreateSmtpTemplateSenderFromJSON,Jn as CreateSmtpTemplateSenderFromJSONTyped,Yn as CreateSmtpTemplateSenderToJSON,ti as CreateSmtpTemplateToJSON,ii as CreateUpdateContactModelFromJSON,ai as CreateUpdateContactModelFromJSONTyped,ri as CreateUpdateContactModelToJSON,oi as CreateUpdateFolderFromJSON,ui as CreateUpdateFolderFromJSONTyped,li as CreateUpdateFolderToJSON,X as CreateWebhookEventsEnum,ci as CreateWebhookFromJSON,mi as CreateWebhookFromJSONTyped,pi as CreateWebhookToJSON,Z as CreateWebhookTypeEnum,hi as CreatedProcessIdFromJSON,gi as CreatedProcessIdFromJSONTyped,wi as CreatedProcessIdToJSON,g as DefaultConfig,vi as DeleteHardbouncesFromJSON,bi as DeleteHardbouncesFromJSONTyped,Ii as DeleteHardbouncesToJSON,th as EmailCampaignsApi,ki as EmailExportRecipientsFromJSON,Ri as EmailExportRecipientsFromJSONTyped,ee as EmailExportRecipientsRecipientsTypeEnum,qi as EmailExportRecipientsToJSON,te as ErrorModelCodeEnum,Ai as ErrorModelFromJSON,Ti as ErrorModelFromJSONTyped,Bi as ErrorModelToJSON,v as FetchError,nh as FoldersApi,Ei as GetAccountAllOfMarketingAutomationFromJSON,Ni as GetAccountAllOfMarketingAutomationFromJSONTyped,Pi as GetAccountAllOfMarketingAutomationToJSON,ie as GetAccountAllOfPlanCreditsTypeEnum,Ui as GetAccountAllOfPlanFromJSON,Li as GetAccountAllOfPlanFromJSONTyped,ji as GetAccountAllOfPlanToJSON,ne as GetAccountAllOfPlanTypeEnum,Oi as GetAccountAllOfRelayDataFromJSON,xi as GetAccountAllOfRelayDataFromJSONTyped,Gi as GetAccountAllOfRelayDataToJSON,Vi as GetAccountAllOfRelayFromJSON,Wi as GetAccountAllOfRelayFromJSONTyped,_i as GetAccountAllOfRelayToJSON,Yi as GetAccountFromJSON,Xi as GetAccountFromJSONTyped,Zi as GetAccountToJSON,ta as GetAggregatedReportFromJSON,na as GetAggregatedReportFromJSONTyped,ia as GetAggregatedReportToJSON,ae as GetAttributesAttributesInnerCategoryEnum,ra as GetAttributesAttributesInnerEnumerationInnerFromJSON,sa as GetAttributesAttributesInnerEnumerationInnerFromJSONTyped,oa as GetAttributesAttributesInnerEnumerationInnerToJSON,la as GetAttributesAttributesInnerFromJSON,da as GetAttributesAttributesInnerFromJSONTyped,ca as GetAttributesAttributesInnerToJSON,re as GetAttributesAttributesInnerTypeEnum,pa as GetAttributesFromJSON,fa as GetAttributesFromJSONTyped,ha as GetAttributesToJSON,wa as GetBlockedDomainsFromJSON,ya as GetBlockedDomainsFromJSONTyped,va as GetBlockedDomainsToJSON,Ia as GetCampaignOverviewFromJSON,Ca as GetCampaignOverviewFromJSONTyped,oe as GetCampaignOverviewStatusEnum,ka as GetCampaignOverviewToJSON,se as GetCampaignOverviewTypeEnum,qa as GetCampaignRecipientsFromJSON,Sa as GetCampaignRecipientsFromJSONTyped,Aa as GetCampaignRecipientsToJSON,Ba as GetCampaignStatsFromJSON,Da as GetCampaignStatsFromJSONTyped,Ea as GetCampaignStatsToJSON,Pa as GetChildAccountCreationStatusFromJSON,Ka as GetChildAccountCreationStatusFromJSONTyped,Ua as GetChildAccountCreationStatusToJSON,ja as GetChildDomainFromJSON,Fa as GetChildDomainFromJSONTyped,Oa as GetChildDomainToJSON,za as GetChildInfoAllOfApiKeysFromJSON,Ja as GetChildInfoAllOfApiKeysFromJSONTyped,Ya as GetChildInfoAllOfApiKeysToJSON,Ga as GetChildInfoAllOfApiKeysV2FromJSON,Ma as GetChildInfoAllOfApiKeysV2FromJSONTyped,Va as GetChildInfoAllOfApiKeysV2ToJSON,_a as GetChildInfoAllOfApiKeysV3FromJSON,Ha as GetChildInfoAllOfApiKeysV3FromJSONTyped,Qa as GetChildInfoAllOfApiKeysV3ToJSON,Za as GetChildInfoAllOfCreditsFromJSON,er as GetChildInfoAllOfCreditsFromJSONTyped,tr as GetChildInfoAllOfCreditsToJSON,ir as GetChildInfoAllOfStatisticsFromJSON,ar as GetChildInfoAllOfStatisticsFromJSONTyped,rr as GetChildInfoAllOfStatisticsToJSON,or as GetChildInfoFromJSON,ur as GetChildInfoFromJSONTyped,lr as GetChildInfoToJSON,cr as GetChildrenListChildrenInnerFromJSON,mr as GetChildrenListChildrenInnerFromJSONTyped,pr as GetChildrenListChildrenInnerToJSON,hr as GetChildrenListFromJSON,gr as GetChildrenListFromJSONTyped,wr as GetChildrenListToJSON,vr as GetClientFromJSON,br as GetClientFromJSONTyped,Ir as GetClientToJSON,Ar as GetContactCampaignStatsClickedInnerFromJSON,Tr as GetContactCampaignStatsClickedInnerFromJSONTyped,Br as GetContactCampaignStatsClickedInnerToJSON,ts as GetContactCampaignStatsFromJSON,ns as GetContactCampaignStatsFromJSONTyped,Er as GetContactCampaignStatsOpenedInnerFromJSON,Nr as GetContactCampaignStatsOpenedInnerFromJSONTyped,Pr as GetContactCampaignStatsOpenedInnerToJSON,is as GetContactCampaignStatsToJSON,Ur as GetContactCampaignStatsTransacAttributesInnerFromJSON,Lr as GetContactCampaignStatsTransacAttributesInnerFromJSONTyped,jr as GetContactCampaignStatsTransacAttributesInnerToJSON,Qr as GetContactCampaignStatsUnsubscriptionsFromJSON,$r as GetContactCampaignStatsUnsubscriptionsFromJSONTyped,zr as GetContactCampaignStatsUnsubscriptionsToJSON,rs as GetContactDetailsFromJSON,ss as GetContactDetailsFromJSONTyped,os as GetContactDetailsToJSON,ls as GetContactsFromJSON,ds as GetContactsFromJSONTyped,Oe as GetContactsSortEnum,cs as GetContactsToJSON,ps as GetDeviceBrowserStatsFromJSON,fs as GetDeviceBrowserStatsFromJSONTyped,hs as GetDeviceBrowserStatsToJSON,Bs as GetEmailCampaignFromJSON,Ds as GetEmailCampaignFromJSONTyped,He as GetEmailCampaignStatisticsEnum,le as GetEmailCampaignStatusEnum,Es as GetEmailCampaignToJSON,ue as GetEmailCampaignTypeEnum,Ps as GetEmailCampaignsCampaignsInnerFromJSON,Ks as GetEmailCampaignsCampaignsInnerFromJSONTyped,ce as GetEmailCampaignsCampaignsInnerStatusEnum,Us as GetEmailCampaignsCampaignsInnerToJSON,de as GetEmailCampaignsCampaignsInnerTypeEnum,js as GetEmailCampaignsFromJSON,Fs as GetEmailCampaignsFromJSONTyped,ze as GetEmailCampaignsStatisticsEnum,$e as GetEmailCampaignsStatusEnum,Os as GetEmailCampaignsToJSON,Qe as GetEmailCampaignsTypeEnum,Pe as GetEmailEventReportEventEnum,me as GetEmailEventReportEventsInnerEventEnum,Gs as GetEmailEventReportEventsInnerFromJSON,Ms as GetEmailEventReportEventsInnerFromJSONTyped,Vs as GetEmailEventReportEventsInnerToJSON,_s as GetEmailEventReportFromJSON,Hs as GetEmailEventReportFromJSONTyped,Qs as GetEmailEventReportToJSON,ws as GetExtendedCampaignOverviewAllOfSenderFromJSON,ys as GetExtendedCampaignOverviewAllOfSenderFromJSONTyped,vs as GetExtendedCampaignOverviewAllOfSenderToJSON,zs as GetExtendedCampaignOverviewFromJSON,Js as GetExtendedCampaignOverviewFromJSONTyped,fe as GetExtendedCampaignOverviewStatusEnum,Ys as GetExtendedCampaignOverviewToJSON,pe as GetExtendedCampaignOverviewTypeEnum,qs as GetExtendedCampaignStatsFromJSON,Ss as GetExtendedCampaignStatsFromJSONTyped,As as GetExtendedCampaignStatsToJSON,Qi as GetExtendedClientAllOfAddressFromJSON,$i as GetExtendedClientAllOfAddressFromJSONTyped,zi as GetExtendedClientAllOfAddressToJSON,Zs as GetExtendedClientFromJSON,eo as GetExtendedClientFromJSONTyped,to as GetExtendedClientToJSON,io as GetExtendedContactDetailsAllOfStatisticsClickedFromJSON,ao as GetExtendedContactDetailsAllOfStatisticsClickedFromJSONTyped,ro as GetExtendedContactDetailsAllOfStatisticsClickedToJSON,go as GetExtendedContactDetailsAllOfStatisticsFromJSON,wo as GetExtendedContactDetailsAllOfStatisticsFromJSONTyped,kr as GetExtendedContactDetailsAllOfStatisticsLinksFromJSON,Rr as GetExtendedContactDetailsAllOfStatisticsLinksFromJSONTyped,qr as GetExtendedContactDetailsAllOfStatisticsLinksToJSON,Yr as GetExtendedContactDetailsAllOfStatisticsMessagesSentFromJSON,Xr as GetExtendedContactDetailsAllOfStatisticsMessagesSentFromJSONTyped,Zr as GetExtendedContactDetailsAllOfStatisticsMessagesSentToJSON,oo as GetExtendedContactDetailsAllOfStatisticsOpenedFromJSON,uo as GetExtendedContactDetailsAllOfStatisticsOpenedFromJSONTyped,lo as GetExtendedContactDetailsAllOfStatisticsOpenedToJSON,yo as GetExtendedContactDetailsAllOfStatisticsToJSON,Or as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscriptionFromJSON,xr as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscriptionFromJSONTyped,Gr as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscriptionToJSON,mo as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsFromJSON,po as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsFromJSONTyped,fo as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsToJSON,Vr as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscriptionFromJSON,Wr as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscriptionFromJSONTyped,_r as GetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscriptionToJSON,bo as GetExtendedContactDetailsFromJSON,Io as GetExtendedContactDetailsFromJSONTyped,Co as GetExtendedContactDetailsToJSON,Ro as GetExtendedListAllOfCampaignStatsFromJSON,qo as GetExtendedListAllOfCampaignStatsFromJSONTyped,So as GetExtendedListAllOfCampaignStatsToJSON,To as GetExtendedListFromJSON,Bo as GetExtendedListFromJSONTyped,Do as GetExtendedListToJSON,No as GetFolderFromJSON,Po as GetFolderFromJSONTyped,xo as GetFolderListsFromJSON,Go as GetFolderListsFromJSONTyped,Mo as GetFolderListsToJSON,Ko as GetFolderToJSON,Wo as GetFoldersFromJSON,_o as GetFoldersFromJSONTyped,Ho as GetFoldersToJSON,$o as GetIpFromJSON,zo as GetIpFromJSONTyped,Xo as GetIpFromSenderFromJSON,Zo as GetIpFromSenderFromJSONTyped,eu as GetIpFromSenderToJSON,Jo as GetIpToJSON,nu as GetIpsFromJSON,iu as GetIpsFromJSONTyped,su as GetIpsFromSenderFromJSON,ou as GetIpsFromSenderFromJSONTyped,uu as GetIpsFromSenderToJSON,au as GetIpsToJSON,Lo as GetListFromJSON,jo as GetListFromJSONTyped,Fo as GetListToJSON,fu as GetListsFromJSON,hu as GetListsFromJSONTyped,du as GetListsListsInnerFromJSON,cu as GetListsListsInnerFromJSONTyped,mu as GetListsListsInnerToJSON,gu as GetListsToJSON,yu as GetProcessFromJSON,vu as GetProcessFromJSONTyped,he as GetProcessStatusEnum,bu as GetProcessToJSON,Cu as GetProcessesFromJSON,ku as GetProcessesFromJSONTyped,Ru as GetProcessesToJSON,Du as GetReportsFromJSON,Eu as GetReportsFromJSONTyped,Su as GetReportsReportsInnerFromJSON,Au as GetReportsReportsInnerFromJSONTyped,Tu as GetReportsReportsInnerToJSON,Nu as GetReportsToJSON,Fu as GetSegmentsFromJSON,Ou as GetSegmentsFromJSONTyped,Ku as GetSegmentsSegmentsFromJSON,Uu as GetSegmentsSegmentsFromJSONTyped,Lu as GetSegmentsSegmentsToJSON,We as GetSegmentsSortEnum,xu as GetSegmentsToJSON,Ju as GetSendersListFromJSON,Yu as GetSendersListFromJSONTyped,Hu as GetSendersListSendersInnerFromJSON,Qu as GetSendersListSendersInnerFromJSONTyped,Mu as GetSendersListSendersInnerIpsInnerFromJSON,Vu as GetSendersListSendersInnerIpsInnerFromJSONTyped,Wu as GetSendersListSendersInnerIpsInnerToJSON,$u as GetSendersListSendersInnerToJSON,Xu as GetSendersListToJSON,el as GetSharedTemplateUrlFromJSON,tl as GetSharedTemplateUrlFromJSONTyped,nl as GetSharedTemplateUrlToJSON,ul as GetSmsCampaignFromJSON,ll as GetSmsCampaignFromJSONTyped,ml as GetSmsCampaignOverviewFromJSON,pl as GetSmsCampaignOverviewFromJSONTyped,we as GetSmsCampaignOverviewStatusEnum,fl as GetSmsCampaignOverviewToJSON,al as GetSmsCampaignStatsFromJSON,rl as GetSmsCampaignStatsFromJSONTyped,sl as GetSmsCampaignStatsToJSON,ge as GetSmsCampaignStatusEnum,dl as GetSmsCampaignToJSON,gl as GetSmsCampaignsCampaignsInnerFromJSON,wl as GetSmsCampaignsCampaignsInnerFromJSONTyped,ye as GetSmsCampaignsCampaignsInnerStatusEnum,yl as GetSmsCampaignsCampaignsInnerToJSON,bl as GetSmsCampaignsFromJSON,Il as GetSmsCampaignsFromJSONTyped,tt as GetSmsCampaignsStatusEnum,Cl as GetSmsCampaignsToJSON,ve as GetSmsEventReportEventsInnerEventEnum,Rl as GetSmsEventReportEventsInnerFromJSON,ql as GetSmsEventReportEventsInnerFromJSONTyped,Sl as GetSmsEventReportEventsInnerToJSON,Tl as GetSmsEventReportFromJSON,Bl as GetSmsEventReportFromJSONTyped,Dl as GetSmsEventReportToJSON,nt as GetSmsEventsEventEnum,it as GetSmsEventsSortEnum,Ll as GetSmtpTemplateOverviewFromJSON,jl as GetSmtpTemplateOverviewFromJSONTyped,Nl as GetSmtpTemplateOverviewSenderFromJSON,Pl as GetSmtpTemplateOverviewSenderFromJSONTyped,Kl as GetSmtpTemplateOverviewSenderToJSON,Fl as GetSmtpTemplateOverviewToJSON,xl as GetSmtpTemplatesFromJSON,Gl as GetSmtpTemplatesFromJSONTyped,Ml as GetSmtpTemplatesToJSON,Wl as GetSsoTokenFromJSON,_l as GetSsoTokenFromJSONTyped,Hl as GetSsoTokenToJSON,Is as GetStatsByDeviceFromJSON,Cs as GetStatsByDeviceFromJSONTyped,ks as GetStatsByDeviceToJSON,$l as GetTransacAggregatedSmsReportFromJSON,zl as GetTransacAggregatedSmsReportFromJSONTyped,Jl as GetTransacAggregatedSmsReportToJSON,nd as GetTransacBlockedContactsContactsInnerFromJSON,id as GetTransacBlockedContactsContactsInnerFromJSONTyped,be as GetTransacBlockedContactsContactsInnerReasonCodeEnum,Xl as GetTransacBlockedContactsContactsInnerReasonFromJSON,Zl as GetTransacBlockedContactsContactsInnerReasonFromJSONTyped,ed as GetTransacBlockedContactsContactsInnerReasonToJSON,ad as GetTransacBlockedContactsContactsInnerToJSON,sd as GetTransacBlockedContactsFromJSON,od as GetTransacBlockedContactsFromJSONTyped,ud as GetTransacBlockedContactsToJSON,dd as GetTransacEmailContentEventsInnerFromJSON,cd as GetTransacEmailContentEventsInnerFromJSONTyped,md as GetTransacEmailContentEventsInnerToJSON,fd as GetTransacEmailContentFromJSON,hd as GetTransacEmailContentFromJSONTyped,gd as GetTransacEmailContentToJSON,Cd as GetTransacEmailsListFromJSON,kd as GetTransacEmailsListFromJSONTyped,Rd as GetTransacEmailsListToJSON,yd as GetTransacEmailsListTransactionalEmailsInnerFromJSON,vd as GetTransacEmailsListTransactionalEmailsInnerFromJSONTyped,bd as GetTransacEmailsListTransactionalEmailsInnerToJSON,Dd as GetTransacSmsReportFromJSON,Ed as GetTransacSmsReportFromJSONTyped,Sd as GetTransacSmsReportReportsInnerFromJSON,Ad as GetTransacSmsReportReportsInnerFromJSONTyped,Td as GetTransacSmsReportReportsInnerToJSON,at as GetTransacSmsReportSortEnum,Nd as GetTransacSmsReportToJSON,Fd as GetWATemplatesFromJSON,Od as GetWATemplatesFromJSONTyped,Kd as GetWATemplatesTemplatesInnerFromJSON,Ud as GetWATemplatesTemplatesInnerFromJSONTyped,Ld as GetWATemplatesTemplatesInnerToJSON,xd as GetWATemplatesToJSON,Md as GetWebhookFromJSON,Vd as GetWebhookFromJSONTyped,Wd as GetWebhookToJSON,Ie as GetWebhookTypeEnum,Hd as GetWebhooksFromJSON,Qd as GetWebhooksFromJSONTyped,st as GetWebhooksSortEnum,$d as GetWebhooksToJSON,rt as GetWebhooksTypeEnum,ot as GetWhatsAppCampaignsSortEnum,ut as GetWhatsAppTemplatesSortEnum,Ce as GetWhatsappCampaignOverviewCampaignStatusEnum,uc as GetWhatsappCampaignOverviewFromJSON,lc as GetWhatsappCampaignOverviewFromJSONTyped,dc as GetWhatsappCampaignOverviewToJSON,ke as GetWhatsappCampaignsCampaignsInnerCampaignStatusEnum,mc as GetWhatsappCampaignsCampaignsInnerFromJSON,pc as GetWhatsappCampaignsCampaignsInnerFromJSONTyped,fc as GetWhatsappCampaignsCampaignsInnerToJSON,gc as GetWhatsappCampaignsFromJSON,wc as GetWhatsappCampaignsFromJSONTyped,yc as GetWhatsappCampaignsToJSON,mh as HandlebarsRatchet,A as JSONApiResponse,ih as ListsApi,bc as ManageIpFromJSON,Ic as ManageIpFromJSONTyped,Cc as ManageIpToJSON,fh as ModelValidator,hh as ObservableRatchet,Rc as PostContactInfoContactsFromJSON,qc as PostContactInfoContactsFromJSONTyped,Sc as PostContactInfoContactsToJSON,Tc as PostContactInfoFromJSON,Bc as PostContactInfoFromJSONTyped,Dc as PostContactInfoToJSON,Nc as PostSendFailedFromJSON,Pc as PostSendFailedFromJSONTyped,Kc as PostSendFailedToJSON,Lc as PostSendSmsTestFailedFromJSON,jc as PostSendSmsTestFailedFromJSONTyped,Fc as PostSendSmsTestFailedToJSON,ah as ProcessApi,ch as RatchetMiscInfo,xc as RemainingCreditModelChildFromJSON,Gc as RemainingCreditModelChildFromJSONTyped,Mc as RemainingCreditModelChildToJSON,$c as RemainingCreditModelFromJSON,zc as RemainingCreditModelFromJSONTyped,Wc as RemainingCreditModelResellerFromJSON,_c as RemainingCreditModelResellerFromJSONTyped,Hc as RemainingCreditModelResellerToJSON,Jc as RemainingCreditModelToJSON,ph as RemoteHandlebarsTemplateRenderer,Xc as RemoveContactFromListFromJSON,Zc as RemoveContactFromListFromJSONTyped,em as RemoveContactFromListToJSON,nm as RemoveCreditsFromJSON,im as RemoveCreditsFromJSONTyped,am as RemoveCreditsToJSON,Re as RequestContactExportCustomContactFilterActionForContactsEnum,qe as RequestContactExportCustomContactFilterActionForEmailCampaignsEnum,Se as RequestContactExportCustomContactFilterActionForSmsCampaignsEnum,sm as RequestContactExportCustomContactFilterFromJSON,om as RequestContactExportCustomContactFilterFromJSONTyped,um as RequestContactExportCustomContactFilterToJSON,dm as RequestContactExportFromJSON,cm as RequestContactExportFromJSONTyped,mm as RequestContactExportToJSON,ym as RequestContactImportFromJSON,vm as RequestContactImportFromJSONTyped,fm as RequestContactImportNewListFromJSON,hm as RequestContactImportNewListFromJSONTyped,gm as RequestContactImportNewListToJSON,bm as RequestContactImportToJSON,Cm as RequestSmsRecipientExportFromJSON,km as RequestSmsRecipientExportFromJSONTyped,Ae as RequestSmsRecipientExportRecipientsTypeEnum,Rm as RequestSmsRecipientExportToJSON,b as RequiredError,rh as ResellerApi,y as ResponseError,gh as RxjsRatchet,sh as SMSCampaignsApi,Yf as SMTPApi,Sm as SendEmailAttachmentInnerFromJSON,Am as SendEmailAttachmentInnerFromJSONTyped,Tm as SendEmailAttachmentInnerToJSON,Dm as SendEmailFromJSON,Em as SendEmailFromJSONTyped,Nm as SendEmailToJSON,Km as SendReportEmailFromJSON,Um as SendReportEmailFromJSONTyped,Lm as SendReportEmailToJSON,Fm as SendReportFromJSON,Om as SendReportFromJSONTyped,Te as SendReportLanguageEnum,xm as SendReportToJSON,Mm as SendSmsFromJSON,Vm as SendSmsFromJSONTyped,Wm as SendSmsToJSON,Hm as SendSmtpEmailAttachmentInnerFromJSON,Qm as SendSmtpEmailAttachmentInnerFromJSONTyped,$m as SendSmtpEmailAttachmentInnerToJSON,Jm as SendSmtpEmailBccInnerFromJSON,Ym as SendSmtpEmailBccInnerFromJSONTyped,Xm as SendSmtpEmailBccInnerToJSON,ep as SendSmtpEmailCcInnerFromJSON,tp as SendSmtpEmailCcInnerFromJSONTyped,np as SendSmtpEmailCcInnerToJSON,gp as SendSmtpEmailFromJSON,wp as SendSmtpEmailFromJSONTyped,ap as SendSmtpEmailReplyToFromJSON,rp as SendSmtpEmailReplyToFromJSONTyped,sp as SendSmtpEmailReplyToToJSON,up as SendSmtpEmailSenderFromJSON,lp as SendSmtpEmailSenderFromJSONTyped,dp as SendSmtpEmailSenderToJSON,mp as SendSmtpEmailToInnerFromJSON,pp as SendSmtpEmailToInnerFromJSONTyped,fp as SendSmtpEmailToInnerToJSON,yp as SendSmtpEmailToJSON,bp as SendTemplateEmailFromJSON,Ip as SendTemplateEmailFromJSONTyped,Cp as SendTemplateEmailToJSON,Rp as SendTestEmailFromJSON,qp as SendTestEmailFromJSONTyped,Sp as SendTestEmailToJSON,Tp as SendTestSmsFromJSON,Bp as SendTestSmsFromJSONTyped,Dp as SendTestSmsToJSON,Np as SendTransacSmsFromJSON,Pp as SendTransacSmsFromJSONTyped,Kp as SendTransacSmsToJSON,Be as SendTransacSmsTypeEnum,oh as SendersApi,D as TextApiResponse,uh as TransactionalSMSApi,Lp as UpdateAttributeEnumerationInnerFromJSON,jp as UpdateAttributeEnumerationInnerFromJSONTyped,Fp as UpdateAttributeEnumerationInnerToJSON,xp as UpdateAttributeFromJSON,Gp as UpdateAttributeFromJSONTyped,Mp as UpdateAttributeToJSON,Wp as UpdateCampaignStatusFromJSON,_p as UpdateCampaignStatusFromJSONTyped,De as UpdateCampaignStatusStatusEnum,Hp as UpdateCampaignStatusToJSON,Xp as UpdateChildAccountStatusFromJSON,Zp as UpdateChildAccountStatusFromJSONTyped,ef as UpdateChildAccountStatusToJSON,nf as UpdateChildDomainFromJSON,af as UpdateChildDomainFromJSONTyped,rf as UpdateChildDomainToJSON,$p as UpdateChildFromJSON,zp as UpdateChildFromJSONTyped,Jp as UpdateChildToJSON,of as UpdateContactFromJSON,uf as UpdateContactFromJSONTyped,lf as UpdateContactToJSON,vf as UpdateEmailCampaignFromJSON,bf as UpdateEmailCampaignFromJSONTyped,cf as UpdateEmailCampaignRecipientsFromJSON,mf as UpdateEmailCampaignRecipientsFromJSONTyped,pf as UpdateEmailCampaignRecipientsToJSON,hf as UpdateEmailCampaignSenderFromJSON,gf as UpdateEmailCampaignSenderFromJSONTyped,wf as UpdateEmailCampaignSenderToJSON,If as UpdateEmailCampaignToJSON,Ee as UpdateEmailCampaignWinnerCriteriaEnum,kf as UpdateListFromJSON,Rf as UpdateListFromJSONTyped,qf as UpdateListToJSON,Af as UpdateSenderFromJSON,Tf as UpdateSenderFromJSONTyped,Bf as UpdateSenderToJSON,Ef as UpdateSmsCampaignFromJSON,Nf as UpdateSmsCampaignFromJSONTyped,Pf as UpdateSmsCampaignToJSON,Of as UpdateSmtpTemplateFromJSON,xf as UpdateSmtpTemplateFromJSONTyped,Uf as UpdateSmtpTemplateSenderFromJSON,Lf as UpdateSmtpTemplateSenderFromJSONTyped,jf as UpdateSmtpTemplateSenderToJSON,Gf as UpdateSmtpTemplateToJSON,Ne as UpdateWebhookEventsEnum,Vf as UpdateWebhookFromJSON,Wf as UpdateWebhookFromJSONTyped,_f as UpdateWebhookToJSON,Qf as UploadImageToGalleryFromJSON,$f as UploadImageToGalleryFromJSONTyped,zf as UploadImageToGalleryToJSON,ec as VariablesItemsFromJSON,tc as VariablesItemsFromJSONTyped,nc as VariablesItemsToJSON,T as VoidApiResponse,lh as WebhooksApi,dh as WhatsAppCampaignsApi,Jd as WhatsappCampStatsFromJSON,Yd as WhatsappCampStatsFromJSONTyped,Xd as WhatsappCampStatsToJSON,ac as WhatsappCampTemplateFromJSON,rc as WhatsappCampTemplateFromJSONTyped,sc as WhatsappCampTemplateToJSON,S as canConsumeForm,C as exists,lt as instanceOfAbTestCampaignResult,U as instanceOfAbTestCampaignResultClickedLinks,V as instanceOfAbTestCampaignResultStatistics,E as instanceOfAbTestVersionClicksInner,O as instanceOfAbTestVersionStats,pt as instanceOfAddChildDomain,wt as instanceOfAddContactToList,It as instanceOfAddCredits,qt as instanceOfBlockDomain,Bt as instanceOfComponentItems,jt as instanceOfCreateAttribute,Pt as instanceOfCreateAttributeEnumerationInner,Gt as instanceOfCreateChild,_t as instanceOfCreateContact,zt as instanceOfCreateDoiContact,un as instanceOfCreateEmailCampaign,Zt as instanceOfCreateEmailCampaignRecipients,an as instanceOfCreateEmailCampaignSender,mn as instanceOfCreateList,gn as instanceOfCreateModel,bn as instanceOfCreateReseller,Tn as instanceOfCreateSender,Rn as instanceOfCreateSenderIpsInner,Nn as instanceOfCreateSenderModel,xn as instanceOfCreateSmsCampaign,Ln as instanceOfCreateSmsCampaignRecipients,Wn as instanceOfCreateSmtpEmail,Xn as instanceOfCreateSmtpTemplate,$n as instanceOfCreateSmtpTemplateSender,ni as instanceOfCreateUpdateContactModel,si as instanceOfCreateUpdateFolder,di as instanceOfCreateWebhook,fi as instanceOfCreatedProcessId,yi as instanceOfDeleteHardbounces,Ci as instanceOfEmailExportRecipients,Si as instanceOfErrorModel,Ji as instanceOfGetAccount,Di as instanceOfGetAccountAllOfMarketingAutomation,Ki as instanceOfGetAccountAllOfPlan,Mi as instanceOfGetAccountAllOfRelay,Fi as instanceOfGetAccountAllOfRelayData,ea as instanceOfGetAggregatedReport,ma as instanceOfGetAttributes,ua as instanceOfGetAttributesAttributesInner,aa as instanceOfGetAttributesAttributesInnerEnumerationInner,ga as instanceOfGetBlockedDomains,ba as instanceOfGetCampaignOverview,Ra as instanceOfGetCampaignRecipients,Ta as instanceOfGetCampaignStats,Na as instanceOfGetChildAccountCreationStatus,La as instanceOfGetChildDomain,sr as instanceOfGetChildInfo,$a as instanceOfGetChildInfoAllOfApiKeys,xa as instanceOfGetChildInfoAllOfApiKeysV2,Wa as instanceOfGetChildInfoAllOfApiKeysV3,Xa as instanceOfGetChildInfoAllOfCredits,nr as instanceOfGetChildInfoAllOfStatistics,fr as instanceOfGetChildrenList,dr as instanceOfGetChildrenListChildrenInner,yr as instanceOfGetClient,es as instanceOfGetContactCampaignStats,Sr as instanceOfGetContactCampaignStatsClickedInner,Dr as instanceOfGetContactCampaignStatsOpenedInner,Kr as instanceOfGetContactCampaignStatsTransacAttributesInner,Hr as instanceOfGetContactCampaignStatsUnsubscriptions,as as instanceOfGetContactDetails,us as instanceOfGetContacts,ms as instanceOfGetDeviceBrowserStats,Ts as instanceOfGetEmailCampaign,Ls as instanceOfGetEmailCampaigns,Ns as instanceOfGetEmailCampaignsCampaignsInner,Ws as instanceOfGetEmailEventReport,xs as instanceOfGetEmailEventReportEventsInner,$s as instanceOfGetExtendedCampaignOverview,gs as instanceOfGetExtendedCampaignOverviewAllOfSender,Rs as instanceOfGetExtendedCampaignStats,Xs as instanceOfGetExtendedClient,Hi as instanceOfGetExtendedClientAllOfAddress,vo as instanceOfGetExtendedContactDetails,ho as instanceOfGetExtendedContactDetailsAllOfStatistics,no as instanceOfGetExtendedContactDetailsAllOfStatisticsClicked,Cr as instanceOfGetExtendedContactDetailsAllOfStatisticsLinks,Jr as instanceOfGetExtendedContactDetailsAllOfStatisticsMessagesSent,so as instanceOfGetExtendedContactDetailsAllOfStatisticsOpened,co as instanceOfGetExtendedContactDetailsAllOfStatisticsUnsubscriptions,Fr as instanceOfGetExtendedContactDetailsAllOfStatisticsUnsubscriptionsAdminUnsubscription,Mr as instanceOfGetExtendedContactDetailsAllOfStatisticsUnsubscriptionsUserUnsubscription,Ao as instanceOfGetExtendedList,ko as instanceOfGetExtendedListAllOfCampaignStats,Eo as instanceOfGetFolder,Oo as instanceOfGetFolderLists,Vo as instanceOfGetFolders,Qo as instanceOfGetIp,Yo as instanceOfGetIpFromSender,tu as instanceOfGetIps,ru as instanceOfGetIpsFromSender,Uo as instanceOfGetList,pu as instanceOfGetLists,lu as instanceOfGetListsListsInner,wu as instanceOfGetProcess,Iu as instanceOfGetProcesses,Bu as instanceOfGetReports,qu as instanceOfGetReportsReportsInner,ju as instanceOfGetSegments,Pu as instanceOfGetSegmentsSegments,zu as instanceOfGetSendersList,_u as instanceOfGetSendersListSendersInner,Gu as instanceOfGetSendersListSendersInnerIpsInner,Zu as instanceOfGetSharedTemplateUrl,ol as instanceOfGetSmsCampaign,cl as instanceOfGetSmsCampaignOverview,il as instanceOfGetSmsCampaignStats,vl as instanceOfGetSmsCampaigns,hl as instanceOfGetSmsCampaignsCampaignsInner,Al as instanceOfGetSmsEventReport,kl as instanceOfGetSmsEventReportEventsInner,Ul as instanceOfGetSmtpTemplateOverview,El as instanceOfGetSmtpTemplateOverviewSender,Ol as instanceOfGetSmtpTemplates,Vl as instanceOfGetSsoToken,bs as instanceOfGetStatsByDevice,Ql as instanceOfGetTransacAggregatedSmsReport,rd as instanceOfGetTransacBlockedContacts,td as instanceOfGetTransacBlockedContactsContactsInner,Yl as instanceOfGetTransacBlockedContactsContactsInnerReason,pd as instanceOfGetTransacEmailContent,ld as instanceOfGetTransacEmailContentEventsInner,Id as instanceOfGetTransacEmailsList,wd as instanceOfGetTransacEmailsListTransactionalEmailsInner,Bd as instanceOfGetTransacSmsReport,qd as instanceOfGetTransacSmsReportReportsInner,jd as instanceOfGetWATemplates,Pd as instanceOfGetWATemplatesTemplatesInner,Gd as instanceOfGetWebhook,_d as instanceOfGetWebhooks,oc as instanceOfGetWhatsappCampaignOverview,hc as instanceOfGetWhatsappCampaigns,cc as instanceOfGetWhatsappCampaignsCampaignsInner,vc as instanceOfManageIp,Ac as instanceOfPostContactInfo,kc as instanceOfPostContactInfoContacts,Ec as instanceOfPostSendFailed,Uc as instanceOfPostSendSmsTestFailed,Qc as instanceOfRemainingCreditModel,Oc as instanceOfRemainingCreditModelChild,Vc as instanceOfRemainingCreditModelReseller,Yc as instanceOfRemoveContactFromList,tm as instanceOfRemoveCredits,lm as instanceOfRequestContactExport,rm as instanceOfRequestContactExportCustomContactFilter,wm as instanceOfRequestContactImport,pm as instanceOfRequestContactImportNewList,Im as instanceOfRequestSmsRecipientExport,Bm as instanceOfSendEmail,qm as instanceOfSendEmailAttachmentInner,jm as instanceOfSendReport,Pm as instanceOfSendReportEmail,Gm as instanceOfSendSms,hp as instanceOfSendSmtpEmail,_m as instanceOfSendSmtpEmailAttachmentInner,zm as instanceOfSendSmtpEmailBccInner,Zm as instanceOfSendSmtpEmailCcInner,ip as instanceOfSendSmtpEmailReplyTo,op as instanceOfSendSmtpEmailSender,cp as instanceOfSendSmtpEmailToInner,vp as instanceOfSendTemplateEmail,kp as instanceOfSendTestEmail,Ap as instanceOfSendTestSms,Ep as instanceOfSendTransacSms,Op as instanceOfUpdateAttribute,Up as instanceOfUpdateAttributeEnumerationInner,Vp as instanceOfUpdateCampaignStatus,Qp as instanceOfUpdateChild,Yp as instanceOfUpdateChildAccountStatus,tf as instanceOfUpdateChildDomain,sf as instanceOfUpdateContact,yf as instanceOfUpdateEmailCampaign,df as instanceOfUpdateEmailCampaignRecipients,ff as instanceOfUpdateEmailCampaignSender,Cf as instanceOfUpdateList,Sf as instanceOfUpdateSender,Df as instanceOfUpdateSmsCampaign,Ff as instanceOfUpdateSmtpTemplate,Kf as instanceOfUpdateSmtpTemplateSender,Mf as instanceOfUpdateWebhook,Hf as instanceOfUploadImageToGallery,Zd as instanceOfVariablesItems,zd as instanceOfWhatsappCampStats,ic as instanceOfWhatsappCampTemplate,q as mapValues,k as querystring};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|