@corsair-dev/activecampaign 0.1.0

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.
Files changed (63) hide show
  1. package/LICENSE +191 -0
  2. package/dist/behaviour.test.d.ts +2 -0
  3. package/dist/behaviour.test.d.ts.map +1 -0
  4. package/dist/client.d.ts +29 -0
  5. package/dist/client.d.ts.map +1 -0
  6. package/dist/client.test.d.ts +2 -0
  7. package/dist/client.test.d.ts.map +1 -0
  8. package/dist/endpoints/accounts.d.ts +107 -0
  9. package/dist/endpoints/accounts.d.ts.map +1 -0
  10. package/dist/endpoints/contacts.d.ts +166 -0
  11. package/dist/endpoints/contacts.d.ts.map +1 -0
  12. package/dist/endpoints/content.d.ts +178 -0
  13. package/dist/endpoints/content.d.ts.map +1 -0
  14. package/dist/endpoints/deals.d.ts +89 -0
  15. package/dist/endpoints/deals.d.ts.map +1 -0
  16. package/dist/endpoints/fields.d.ts +44 -0
  17. package/dist/endpoints/fields.d.ts.map +1 -0
  18. package/dist/endpoints/imports.d.ts +31 -0
  19. package/dist/endpoints/imports.d.ts.map +1 -0
  20. package/dist/endpoints/index.d.ts +21 -0
  21. package/dist/endpoints/index.d.ts.map +1 -0
  22. package/dist/endpoints/lists.d.ts +21 -0
  23. package/dist/endpoints/lists.d.ts.map +1 -0
  24. package/dist/endpoints/logging.d.ts +20 -0
  25. package/dist/endpoints/logging.d.ts.map +1 -0
  26. package/dist/endpoints/persist.d.ts +57 -0
  27. package/dist/endpoints/persist.d.ts.map +1 -0
  28. package/dist/endpoints/platform.d.ts +239 -0
  29. package/dist/endpoints/platform.d.ts.map +1 -0
  30. package/dist/endpoints/resource.d.ts +81 -0
  31. package/dist/endpoints/resource.d.ts.map +1 -0
  32. package/dist/endpoints/segments-v2.d.ts +71 -0
  33. package/dist/endpoints/segments-v2.d.ts.map +1 -0
  34. package/dist/endpoints/shared.d.ts +55 -0
  35. package/dist/endpoints/shared.d.ts.map +1 -0
  36. package/dist/endpoints/tags.d.ts +17 -0
  37. package/dist/endpoints/tags.d.ts.map +1 -0
  38. package/dist/endpoints/types.d.ts +10533 -0
  39. package/dist/endpoints/types.d.ts.map +1 -0
  40. package/dist/endpoints.test.d.ts +2 -0
  41. package/dist/endpoints.test.d.ts.map +1 -0
  42. package/dist/error-handlers.d.ts +85 -0
  43. package/dist/error-handlers.d.ts.map +1 -0
  44. package/dist/index.d.ts +7901 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +25 -0
  47. package/dist/integration.test.d.ts +2 -0
  48. package/dist/integration.test.d.ts.map +1 -0
  49. package/dist/persist.test.d.ts +2 -0
  50. package/dist/persist.test.d.ts.map +1 -0
  51. package/dist/routing.test.d.ts +2 -0
  52. package/dist/routing.test.d.ts.map +1 -0
  53. package/dist/schema/database.d.ts +874 -0
  54. package/dist/schema/database.d.ts.map +1 -0
  55. package/dist/schema/index.d.ts +731 -0
  56. package/dist/schema/index.d.ts.map +1 -0
  57. package/dist/schema.test.d.ts +2 -0
  58. package/dist/schema.test.d.ts.map +1 -0
  59. package/dist/segments-v2.test.d.ts +2 -0
  60. package/dist/segments-v2.test.d.ts.map +1 -0
  61. package/dist/tsup.config.d.ts +3 -0
  62. package/dist/tsup.config.d.ts.map +1 -0
  63. package/package.json +44 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,QAAQ,EAER,uBAAuB,EAGvB,MAAM,cAAc,CAAC;AActB,OAAO,KAAK,EACX,4BAA4B,EAC5B,6BAA6B,EAC7B,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,2BAA2B,GAAG;IACzC,QAAQ,CAAC,EAAE,QAAQ,C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B,GAC3C,CAAyC,GACxC,4BAA4B,CAAC,CAAC,CAAC,CAmCjC;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC;AACtC,YAAY,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ var Ks=Object.defineProperty;var X=(e,a)=>{for(var o in a)Ks(e,o,{get:a[o],enumerable:!0})};import{AuthMissingError as $s}from"corsair/core";var qe={};X(qe,{addContactNote:()=>Oo,create:()=>Xs,createAccountNote:()=>wo,createContact:()=>so,createDealNote:()=>Go,createFieldData:()=>go,createFieldDataBulk:()=>ho,createFieldMeta:()=>ro,createNote:()=>yo,get:()=>Ys,getContact:()=>ao,getFieldData:()=>mo,getFieldMeta:()=>co,getNote:()=>ko,list:()=>Zs,listContacts:()=>eo,listFieldData:()=>lo,listFieldMeta:()=>io,listNotes:()=>Ao,remove:()=>to,removeBulk:()=>Lo,removeContact:()=>no,removeFieldData:()=>vo,removeFieldMeta:()=>uo,removeNote:()=>fo,update:()=>Js,updateAccountNote:()=>xo,updateContact:()=>oo,updateDealNote:()=>To,updateFieldData:()=>Co,updateFieldDataBulk:()=>Do,updateFieldMeta:()=>po,updateNote:()=>bo,upsert:()=>Eo});import{logEventFromContext as Zt}from"corsair/core";import{request as ja}from"corsair/http";var Jt=class extends Error{constructor(o,n){super(o);this.code=n;this.name="ActiveCampaignAPIError"}};function qs(e){return`https://${e}.api-us1.com/api/3`}var Ma={enabled:!0,maxRetries:5,initialRetryDelay:1e3,backoffMultiplier:2,headerNames:{retryAfter:"Retry-After"}};function _a(e,a){return{BASE:qs(a),VERSION:"3",WITH_CREDENTIALS:!1,CREDENTIALS:"omit",TOKEN:void 0,HEADERS:{"Content-Type":"application/json",Accept:"application/json","Api-Token":e}}}function Ba(e,a){if(!e)throw new Jt("An API token is required for the ActiveCampaign integration","MISSING_API_TOKEN");if(!a)throw new Jt("An account name is required for the ActiveCampaign integration - it is the subdomain of your API URL, https://<account>.api-us1.com","MISSING_ACCOUNT");if(!/^[a-zA-Z0-9-]+$/.test(a))throw new Jt("The ActiveCampaign account name must contain only letters, numbers and hyphens","INVALID_ACCOUNT")}async function r(e,a,o,n={}){Ba(a,o);let{method:u="GET",body:C,query:w}=n,U={method:u,url:e,body:u==="POST"||u==="PUT"||u==="PATCH"?C:void 0,mediaType:"application/json; charset=utf-8",query:w};return await ja(_a(a,o),U,{rateLimitConfig:Ma})}async function Va(e,a,o,n){Ba(a,o);let u={method:"POST",url:"ecom/graphql",body:n?{query:e,variables:n}:{query:e},mediaType:"application/json; charset=utf-8"};return await ja(_a(a,o),u,{rateLimitConfig:Ma})}import{z as l}from"zod";var s=l.string().nullable().optional(),B=l.union([l.string(),l.number()]).nullable().optional(),Ws=l.union([l.boolean(),l.string(),l.number()]).nullable().optional(),v=l.unknown().nullable().optional(),Z=l.object({id:l.string(),email:s,firstName:s,lastName:s,phone:s,orgid:s,orgname:s,organization:s,cdate:s,udate:s,adate:s,edate:s,hash:s,ip:s,ua:s,gravatar:s,deleted:s,deleted_at:s,anonymized:s,email_local:s,email_domain:s,segmentio_id:s,bounced_hard:s,bounced_soft:s,bounced_date:s,sentcnt:s,rating_tstamp:s,socialdata_lastcheck:s,created_by:s,updated_by:s,created_utc_timestamp:s,updated_utc_timestamp:s,created_timestamp:s,updated_timestamp:s,mpp_tracking:s,last_click_date:s,last_open_date:s,last_mpp_open_date:s,best_send_hour:s,sms_consent:s,sms_consent_updated_at:s,whatsapp_id:s,whatsapp_username:s,scoreValues:v,accountContacts:v,links:v}).loose(),ct=l.object({id:l.string(),name:s,stringid:s,userid:s,user:s,description:s,cdate:s,udate:s,channel:s,private:s,deletestamp:s,active_subscribers:s,non_deleted_subscribers:s,subscription_notify:s,unsubscription_notify:s,require_name:s,get_unsubscribe_reason:s,to_name:s,optinoptout:s,optinmessageid:s,optoutconf:s,carboncopy:s,fulladdress:s,sender_name:s,sender_addr1:s,sender_addr2:s,sender_city:s,sender_state:s,sender_zip:s,sender_country:s,sender_phone:s,sender_url:s,sender_reminder:s,send_last_broadcast:s,analytics_domains:s,analytics_source:s,analytics_ua:s,twitter_token:s,twitter_token_secret:s,facebook_session:s,p_use_tracking:s,p_use_analytics_read:s,p_use_analytics_link:s,p_use_twitter:s,p_use_facebook:s,p_embed_image:s,p_use_captcha:s,created_by:s,updated_by:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),J=l.object({id:l.string(),tag:s,tagType:s,description:s,subscriber_count:s,deleted:s,cdate:s,created_by:s,updated_by:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),tt=l.object({id:l.string(),title:s,descript:s,type:s,perstag:s,defval:s,isrequired:s,show_in_list:s,visible:s,service:s,ordernum:s,rows:s,cols:s,cdate:s,udate:s,created_by:s,updated_by:s,created_timestamp:s,updated_timestamp:s,options:v,relations:v,links:v}).loose(),et=l.object({id:l.string(),contact:s,list:s,status:s,form:s,seriesid:s,sdate:s,udate:s,responder:s,sync:s,unsubreason:s,campaign:s,message:s,first_name:s,last_name:s,ip4Sub:s,ip4Unsub:s,ip4_last:s,sourceid:s,autosyncLog:s,unsubscribeAutomation:s,automation:s,channel:s,created_by:s,updated_by:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),at=l.object({id:l.string(),contact:s,tag:s,cdate:s,created_by:s,updated_by:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),st=l.object({id:l.string(),contact:s,field:s,value:s,owner:s,cdate:s,udate:s,created_by:s,updated_by:s,links:v}).loose(),qt=l.object({id:l.string(),field:s,label:s,value:s,orderid:s,isdefault:s,cdate:s,udate:s,links:v}).loose(),lt=l.object({id:l.string(),field:s,relid:s,dorder:s,cdate:s,links:v}).loose(),rt=l.object({id:l.coerce.string(),rel_id:B,group_id:B,ordernum:B,links:v}).loose(),Wt=l.object({id:l.string(),list:s,group:s,p_list_add:s,p_list_edit:s,p_list_delete:s,p_list_filter:s,p_list_sync:s,p_message_add:s,p_message_edit:s,p_message_delete:s,p_message_send:s,p_subscriber_add:s,p_subscriber_edit:s,p_subscriber_delete:s,p_subscriber_import:s,p_subscriber_approve:s,links:v}).loose(),yt=l.object({id:l.string(),title:s,description:s,value:B,currency:s,status:B,contact:s,organization:s,group:s,stage:s,owner:s,percent:B,nextdate:s,cdate:s,mdate:s,edate:s,hash:s,nextdealid:s,nexttaskid:s,activitycount:s,winProbability:B,winProbabilityMdate:s,isDisabled:Ws,account:B,customerAccount:B,fields:v,customFieldSaveStatus:v,links:v}).loose(),bt=l.object({id:l.string(),title:s,currency:s,allgroups:s,allusers:s,autoassign:s,source:s,count:s,stages:v,win_probability_initialize_date:s,cdate:s,udate:s,links:v}).loose(),ft=l.object({id:l.string(),title:s,group:s,order:s,width:s,color:s,dealOrder:s,cardRegion1:s,cardRegion2:s,cardRegion3:s,cardRegion4:s,cardRegion5:s,cdate:s,udate:s,links:v}).loose(),pt=l.object({id:l.string(),title:s,note:s,relid:s,reltype:s,dealtasktype:s,duedate:s,done:s,status:s,owner:s,cdate:s,edate:s,links:v}).loose(),Et=l.object({id:l.string(),title:s,defduration:s,display_order:s,status:s,cdate:s,udate:s,created_by:s,updated_by:s,created_utc_timestamp:s,updated_utc_timestamp:s,outcomes:v,links:v}).loose(),Lt=l.object({id:l.string(),title:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),ht=l.object({id:l.string(),title:s,sentiment:s,disabled:s,created_by:s,updated_by:s,created_utc_timestamp:s,updated_utc_timestamp:s,dealTasktype_ids:v,links:v}).loose(),mt=l.object({id:l.coerce.string(),fieldLabel:s,fieldType:s,fieldDefault:s,fieldDefaultCurrency:s,fieldOptions:v,isFormVisible:B,isRequired:B,displayOrder:B,knownFieldId:B,hideFieldFlag:B,personalization:s,createdBy:B,updatedBy:B,createdTimestamp:s,updatedTimestamp:s,links:v}).loose(),Dt=mt,gt=l.object({id:l.coerce.string(),name:s,accountUrl:s,owner:s,contactCount:B,dealCount:B,createdTimestamp:s,updatedTimestamp:s,fields:v,customFieldSaveStatus:v,links:v}).loose(),Ot=l.object({id:l.coerce.string(),contact:s,account:s,jobTitle:s,createdTimestamp:s,updatedTimestamp:s,links:v}).loose(),dt=l.object({id:l.string(),note:s,reltype:s,relid:s,cdate:s,mdate:s,userid:s,user:s,is_draft:s,owner:v,links:v}).loose(),wt=l.object({id:l.string(),name:s,type:s,status:s,sdate:s,mdate:s,ldate:s,send_amt:s,total_amt:s,opens:s,uniqueopens:s,linkclicks:s,uniquelinkclicks:s,subscriberclicks:s,unsubscribes:s,hardbounces:s,softbounces:s,links:v}).loose(),Gt=l.object({id:l.string(),name:s,subject:s,preheader_text:s,fromname:s,fromemail:s,reply2:s,html:s,text:s,htmlfetch:s,textfetch:s,charset:s,encoding:s,format:s,language_code:s,priority:s,source:s,hidden:s,user:s,userid:s,cdate:s,mdate:s,ed_instanceid:s,ed_version:s,has_predictive_content:s,preview_data:v,preview_mime:s,links:v}).loose(),Ht=l.object({id:l.string(),name:s,subject:s,content:s,categoryid:s,userid:s,cdate:s,mdate:s,links:v}).loose(),xt=l.object({id:l.string(),title:s,subject:s,body:s,userid:s,cdate:s,mdate:s,links:v}).loose(),Tt=l.object({id:l.string(),name:s,action:s,layout:s,style:s,cdate:s,udate:s,links:v}).loose(),St=l.object({id:l.string(),name:s,tag:s,content:s,format:s,locked:s,cdate:s,udate:s,links:v}).loose(),Qt=l.object({id:l.string(),name:s,status:s,entered:s,exited:s,cdate:s,mdate:s,links:v}).loose(),It=l.object({id:l.string(),name:s,logic:s,hidden:s,seriesid:s,segmentid_v2:s,created_by:s,updated_by:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),Ut=l.object({id:l.string(),service:s,serviceName:s,externalid:s,name:s,logoUrl:s,linkUrl:s,status:s,syncStatus:s,connectionType:s,isInternal:B,listId:B,planTier:s,lastSync:s,sync_request_time:s,sync_start_time:s,credentialExpiration:s,disconnectDate:s,cdate:s,udate:s,links:v}).loose(),Rt=l.object({id:l.string(),connectionid:s,externalid:s,email:s,totalRevenue:s,totalOrders:s,totalProducts:s,avgRevenuePerOrder:s,avgProductCategory:s,acceptsMarketing:s,links:v}).loose(),Ft=l.object({id:l.string(),username:s,email:s,firstName:s,lastName:s,phone:s,signature:s,lang:s,localZoneid:s,mfaEnabled:B,roles:v,links:v}).loose(),jt=l.object({id:l.string(),title:s,descript:s,p_admin:s,sdate:s,unsubscribelink:s,optinconfirm:s,socialdata:s,reqApproval:s,links:v}).loose(),xe=l.object({id:l.string(),group:s,groupid:s,limitContact:s,limitList:s,limitCampaign:s,limitCampaignType:s,limitMail:s,limitMailType:s,limitUser:s,limitAttachment:s,abuseRatio:s,forceSenderInfo:s,links:v}).loose(),Mt=l.object({id:l.string(),companyName:s,address1:s,address2:s,city:s,state:s,district:s,zip:s,country:s,isDefault:B,allgroup:s,smsName:s,created_by:s,updated_by:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),_t=l.object({id:l.string(),title:s,type:s,token:s,userid:s,notification:s,cdate:s,mdate:s,links:v}).loose(),Te=l.object({id:l.string(),name:s,descript:s,reltype:s,status:s,cdate:s,mdate:s,links:v}).loose(),Se=l.object({id:l.string(),siteName:s,groupid:s,siteLogo:s,siteLogoSmall:s,favicon:s,copyright:s,license:s,help:s,version:s,headerHtmlValue:s,headerTextValue:s,footerHtmlValue:s,footerTextValue:s,publicTemplateCss:s,publicTemplateHtm:s,adminTemplateCss:s,adminTemplateHtm:s,admin_template_css_backup:s,admin_template_htm_backup:s,zendeskWidgetEnabled:s,created_timestamp:s,updated_timestamp:s,links:v}).loose(),Bt=l.object({id:l.coerce.string(),slug:s,name:s,description:s,labels:v,fields:v,relationships:v,createdTimestamp:s,updatedTimestamp:s,links:v}).loose(),Vt=l.object({id:l.string(),name:s,url:s,events:v,sources:v,listid:s,cdate:s,state:s,deactivated_date:s,links:v}).loose(),Pt=l.object({id:l.string(),name:s,links:v}).loose();async function D(e,a,o,n){if(!e||o===null||o===void 0)return;let u=a.safeParse(o);if(!u.success){console.warn(`[ACTIVECAMPAIGN] Skipped caching a ${n} row that did not match the entity schema: ${u.error.issues.map(U=>`${U.path.join(".")}: ${U.message}`).join("; ")}`);return}let C=u.data,w=C.id;if(typeof w!="string"||w.length===0){console.warn(`[ACTIVECAMPAIGN] Skipped caching a ${n} row with no usable id`);return}try{await e.upsertByEntityId(w,C)}catch(U){console.warn(`[ACTIVECAMPAIGN] Failed to cache ${n}:`,U)}}async function V(e,a,o,n){if(!(!e||!Array.isArray(o)||o.length===0))for(let u=0;u<o.length;u+=16){let C=o.slice(u,u+16);await Promise.all(C.map(w=>D(e,a,w,n)))}}async function K(e,a,o){if(!(!e?.deleteByEntityId||!a))try{await e.deleteByEntityId(a)}catch(n){console.warn(`[ACTIVECAMPAIGN] Failed to evict ${o} ${a} from the cache:`,n)}}async function Ie(e,a,o,n){if(!e?.search||!e.deleteByEntityId||!o)return;let u=e.deleteByEntityId;try{let C=await e.search({data:{[a]:o},limit:1e3});if(!Array.isArray(C)||C.length===0)return;let w=[];for(let U of C){let b=U?.entity_id;typeof b!="string"||b.length===0||w.push(b)}for(let U=0;U<w.length;U+=16){let b=w.slice(U,U+16);await Promise.all(b.map(async R=>{try{await u(R)}catch(F){console.warn(`[ACTIVECAMPAIGN] Failed to evict ${n} ${R} after its parent was deleted:`,F)}}))}}catch(C){console.warn(`[ACTIVECAMPAIGN] Could not look up ${n} rows to evict after a parent delete:`,C)}}import{logEventFromContext as te}from"corsair/core";function m(e,a){let o={},n=[];for(let[u,C]of Object.entries(e))C!==void 0&&(a.includes(u)?o[u]=C:n.push(u));return n.length>0&&(o.fields=n.sort()),o}function G(e,a,o){return{...m(e,a),returnedCount:o}}import{AuthMissingError as Hs}from"corsair/core";function x(e){let a={};for(let[o,n]of Object.entries(e))n!==void 0&&(a[o]=n);return a}function j(e){let a={};for(let[o,n]of Object.entries(e))n!==void 0&&(a[o]=n);return a}var ot=100;function L(e){let a=e.limit===void 0?void 0:Math.min(Math.max(e.limit,1),ot);return j({limit:a,offset:e.offset})}async function p(e){let a=e.options?.account??await e.keys?.get_account?.()??"";if(!a)throw new Hs("activecampaign","account","[auth-missing:activecampaign:account]: an ActiveCampaign account slug is required - it is the subdomain of your API URL, https://<account>.api-us1.com");return a}async function ee(e){return p(e)}function Ke(e,a){let o={};for(let n of a)o[n]=e[n];return o}function Qs(e,a){let o={};for(let[n,u]of Object.entries(a)){let C=e[n];(C===void 0||typeof C=="string"||typeof C=="number"||typeof C=="boolean")&&(o[u]=C)}return j(o)}function f(e){let a=e.label??e.one,o=e.logKeys??["id","limit","offset"];return{list:async(b,R)=>{let F=R,N=await r(e.path,b.key,await ee(b),{method:"GET",query:{...L(F),...j(Ke(F,e.queryKeys??[])),...Qs(F,e.queryMap??{})}}),it=N[e.many];return e.entity&&e.store&&await V(b.db[e.store],e.entity,it,a),await te(b,`${e.event}.list`,G(F,o,Array.isArray(it)?it.length:0),"completed"),N},get:async(b,R)=>{let F=R,N=await r(`${e.path}/${encodeURIComponent(F.id)}`,b.key,await ee(b),{method:"GET"});return e.entity&&e.store&&await D(b.db[e.store],e.entity,N[e.one],a),await te(b,`${e.event}.get`,m(F,["id"]),"completed"),N},create:async(b,R)=>{let F=R,N=await r(e.path,b.key,await ee(b),{method:"POST",body:{[e.one]:x(Ke(F,e.bodyKeys??[]))}});return e.entity&&e.store&&await D(b.db[e.store],e.entity,N[e.one],a),await te(b,`${e.event}.create`,m(F,o),"completed"),N},update:async(b,R)=>{let F=R,N=F.id;if(typeof N!="string"||N.length===0)throw new Error("An id is required to update this resource");let it=await r(`${e.path}/${encodeURIComponent(N)}`,b.key,await ee(b),{method:"PUT",body:{[e.one]:x(Ke(F,e.bodyKeys??[]))}});return e.entity&&e.store&&await D(b.db[e.store],e.entity,it[e.one],a),await te(b,`${e.event}.update`,m(F,o),"completed"),it},remove:async(b,R)=>{let F=R;return await r(`${e.path}/${encodeURIComponent(F.id)}`,b.key,await ee(b),{method:"DELETE"}),e.store&&await K(b.db[e.store],F.id,a),await te(b,`${e.event}.delete`,m(F,["id"]),"completed"),{id:F.id}}}}var ae=f({path:"accounts",one:"account",many:"accounts",event:"activecampaign.accounts",entity:gt,store:"accounts",label:"account",logKeys:["id","limit","offset","owner"],queryMap:{search:"search"},bodyKeys:["name","accountUrl","owner","fields"]}),se=f({path:"accountContacts",one:"accountContact",many:"accountContacts",event:"activecampaign.accountContacts",entity:Ot,store:"accountContacts",label:"accountContact",logKeys:["id","limit","offset","contact","account"],queryMap:{contact:"filters[contact]",account:"filters[account]"},bodyKeys:["contact","account","jobTitle"]}),oe=f({path:"accountCustomFieldMeta",one:"accountCustomFieldMetum",many:"accountCustomFieldMeta",event:"activecampaign.accountCustomFieldMeta",entity:Dt,store:"accountCustomFieldMeta",label:"accountCustomFieldMeta",bodyKeys:["fieldLabel","fieldType","fieldOptions","fieldDefault","fieldDefaultCurrency","isFormVisible","isRequired","displayOrder"]}),ne=f({path:"accountCustomFieldData",one:"accountCustomFieldDatum",many:"accountCustomFieldData",event:"activecampaign.accountCustomFieldData",label:"accountCustomFieldData",logKeys:["id","limit","offset","accountId","customFieldId"],bodyKeys:["accountId","customFieldId","fieldValue"]}),zt=f({path:"notes",one:"note",many:"notes",event:"activecampaign.notes",entity:dt,store:"notes",label:"note",logKeys:["id","limit","offset","reltype","relid"],bodyKeys:["note","reltype","relid"]}),Zs=ae.list,Ys=ae.get,Xs=ae.create,Js=ae.update,to=ae.remove,eo=se.list,ao=se.get,so=se.create,oo=se.update,no=se.remove,io=oe.list,co=oe.get,ro=oe.create,po=oe.update,uo=oe.remove,lo=ne.list,mo=ne.get,go=ne.create,Co=ne.update,vo=ne.remove,Ao=zt.list,ko=zt.get,yo=zt.create,bo=zt.update,fo=zt.remove,Eo=async(e,a)=>{let o=await p(e),n;for(let w=0;;){let U=await r("accounts",e.key,o,{method:"GET",query:{search:a.name,limit:ot,offset:w}});if(n=U.accounts?.find(R=>R.name===a.name),n)break;let b=U.accounts?.length??0;if(b<ot)break;w+=b}let u={account:{name:a.name,...a.accountUrl!==void 0&&{accountUrl:a.accountUrl},...a.owner!==void 0&&{owner:a.owner},...a.fields!==void 0&&{fields:a.fields}}},C=n?.id?await r(`accounts/${n.id}`,e.key,o,{method:"PUT",body:u}):await r("accounts",e.key,o,{method:"POST",body:u});return await D(e.db.accounts,gt,C.account,"account"),await Zt(e,"activecampaign.accounts.upsert",{created:n?.id===void 0,owner:a.owner,fields:["name"]},"completed"),C},Lo=async(e,a)=>{let o=await p(e);await r("accounts/bulk_delete",e.key,o,{method:"POST",body:{ids:a.ids}});for(let n of a.ids){let u=e.db.accounts;if(u?.deleteByEntityId)try{await u.deleteByEntityId(String(n))}catch(C){console.warn(`[ACTIVECAMPAIGN] Failed to evict account ${n} from the cache:`,C)}}return await Zt(e,"activecampaign.accounts.deleteBulk",{accountCount:a.ids.length,fields:["ids"]},"completed"),{ids:a.ids}},ho=async(e,a)=>{let o=await p(e),n=await r("accountCustomFieldData/bulkCreate",e.key,o,{method:"POST",body:a.items});return await Zt(e,"activecampaign.accountCustomFieldData.createBulk",{itemCount:a.items.length,fields:["items"]},"completed"),n},Do=async(e,a)=>{let o=await p(e),n=await r("accountCustomFieldData/bulkUpdate",e.key,o,{method:"PATCH",body:a.items});return await Zt(e,"activecampaign.accountCustomFieldData.updateBulk",{itemCount:a.items.length,fields:["items"]},"completed"),n},Oo=async(e,a)=>{let o=await p(e),u=(await r("contacts",e.key,o,{method:"GET",query:{email:a.email}})).contacts?.[0]?.id;if(!u)throw new Error("No ActiveCampaign contact matches the supplied email address");let C=await r("notes",e.key,o,{method:"POST",body:{note:{note:a.note,reltype:"Subscriber",relid:u}}});return await D(e.db.notes,dt,C.note,"note"),await Zt(e,"activecampaign.notes.addToContact",{relid:u,reltype:"Subscriber",fields:["email","note"]},"completed"),C};function Pa(e,a){return(async(o,n)=>{let u=await p(o),C=await r("notes",o.key,u,{method:"POST",body:{note:{note:n.note,reltype:e,relid:n.id}}});return await D(o.db.notes,dt,C.note,"note"),await Zt(o,a,{relid:n.id,reltype:e,fields:["note"]},"completed"),C})}var wo=Pa("Account","activecampaign.notes.createForAccount"),Go=Pa("Deal","activecampaign.notes.createForDeal"),xo=zt.update,To=zt.update;var He={};X(He,{createOrUpdate:()=>Ro,find:()=>Uo,get:()=>Io,getAccountContacts:()=>Wo,getAutomations:()=>Vo,getData:()=>Qo,getDeals:()=>No,getFieldValues:()=>Bo,getGeoIps:()=>Po,getGoals:()=>qo,getLists:()=>Mo,getLogs:()=>$o,getNotes:()=>Ho,getOrganization:()=>Zo,getPlusAppend:()=>Yo,getScoreValues:()=>zo,getTags:()=>_o,getTrackingLogs:()=>Ko,list:()=>So,listActivities:()=>Xo,remove:()=>jo,update:()=>Fo});import{logEventFromContext as Y}from"corsair/core";var So=async(e,a)=>{let o=await p(e),n=await r("contacts",e.key,o,{method:"GET",query:{...L(a),...j({email:a.email,search:a.search,listid:a.listid,tagid:a.tagid,segmentid:a.segmentid,status:a.status,id_greater:a.id_greater,"orders[id]":a.orders_id})}});return await V(e.db.contacts,Z,n.contacts,"contact"),await Y(e,"activecampaign.contacts.list",G(a,["limit","offset","listid","tagid","segmentid","status"],n.contacts?.length??0),"completed"),n},Io=async(e,a)=>{let o=await p(e),n=await r(`contacts/${encodeURIComponent(a.id)}`,e.key,o,{method:"GET",query:j({automations:a.automations})});return await D(e.db.contacts,Z,n.contact,"contact"),await Y(e,"activecampaign.contacts.get",m(a,["id"]),"completed"),n},Uo=async(e,a)=>{let o=await p(e),n=await r("contacts",e.key,o,{method:"GET",query:{email:a.email}});return await V(e.db.contacts,Z,n.contacts,"contact"),await Y(e,"activecampaign.contacts.find",{matched:n.contacts?.length??0,fields:["email"]},"completed"),n},Ro=async(e,a)=>{let o=await p(e),n=await r("contact/sync",e.key,o,{method:"POST",body:{contact:x({email:a.email,firstName:a.firstName,lastName:a.lastName,phone:a.phone,fieldValues:a.fieldValues})}});return await D(e.db.contacts,Z,n.contact,"contact"),await Y(e,"activecampaign.contacts.createOrUpdate",m(a,[]),"completed"),n},Fo=async(e,a)=>{let o=await p(e),n=await r(`contacts/${a.id}`,e.key,o,{method:"PUT",body:{contact:x({email:a.email,firstName:a.firstName,lastName:a.lastName,phone:a.phone,fieldValues:a.fieldValues})}});return await D(e.db.contacts,Z,n.contact,"contact"),await Y(e,"activecampaign.contacts.update",m(a,["id"]),"completed"),n},jo=async(e,a)=>{let o=await p(e);return await r(`contacts/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.contacts,a.id,"contact"),await Y(e,"activecampaign.contacts.delete",m(a,["id"]),"completed"),{id:a.id}},Mo=async(e,a)=>{let o=await p(e),n=await r(`contacts/${a.id}/contactLists`,e.key,o,{method:"GET",query:L(a)});return await V(e.db.contactLists,et,n.contactLists,"contactList"),await Y(e,"activecampaign.contacts.getLists",G(a,["id","limit","offset"],n.contactLists?.length??0),"completed"),n},_o=async(e,a)=>{let o=await p(e),n=await r(`contacts/${a.id}/contactTags`,e.key,o,{method:"GET",query:L(a)});return await V(e.db.contactTags,at,n.contactTags,"contactTag"),await Y(e,"activecampaign.contacts.getTags",G(a,["id","limit","offset"],n.contactTags?.length??0),"completed"),n};function nt(e,a){return(async(o,n)=>{let u=await p(o),C=await r(`contacts/${encodeURIComponent(n.id)}/${e}`,o.key,u,{method:"GET",query:L(n)});return await Y(o,a,m(n,["id","limit","offset"]),"completed"),C})}var Bo=nt("fieldValues","activecampaign.contacts.getFieldValues"),Vo=nt("contactAutomations","activecampaign.contacts.getAutomations"),Po=nt("geoIps","activecampaign.contacts.getGeoIps"),zo=nt("scoreValues","activecampaign.contacts.getScoreValues"),No=nt("deals","activecampaign.contacts.getDeals"),$o=nt("contactLogs","activecampaign.contacts.getLogs"),Ko=nt("trackingLogs","activecampaign.contacts.getTrackingLogs"),qo=nt("contactGoals","activecampaign.contacts.getGoals"),Wo=nt("accountContacts","activecampaign.contacts.getAccountContacts"),Ho=nt("notes","activecampaign.contacts.getNotes");function We(e,a){return(async(o,n)=>{let u=await p(o),C=await r(`contacts/${encodeURIComponent(n.id)}/${e}`,o.key,u,{method:"GET"});return await Y(o,a,m(n,["id"]),"completed"),C})}var Qo=We("contactData","activecampaign.contacts.getData"),Zo=We("organization","activecampaign.contacts.getOrganization"),Yo=We("plusAppend","activecampaign.contacts.getPlusAppend"),Xo=async(e,a)=>{let o=await p(e),n=await r("activities",e.key,o,{method:"GET",query:{...L(a),...j({contact:a.contact,after:a.after})}});return await Y(e,"activecampaign.activities.list",G(a,["contact","limit","offset","after"],n.activities?.length??0),"completed"),n};var Ze={};X(Ze,{addContactToAutomation:()=>Kn,createCampaign:()=>sn,createFormOptin:()=>Mn,createMessage:()=>rn,createSavedResponse:()=>mn,createSegment:()=>wn,createTemplateShareLink:()=>jn,createVariable:()=>_n,duplicateCampaign:()=>Fn,getAutomationEntryCounts:()=>$n,getCampaign:()=>an,getCampaignAutomationLists:()=>Un,getCampaignAutomations:()=>In,getCampaignLinks:()=>Tn,getCampaignMessages:()=>Sn,getCampaignUser:()=>Rn,getContactAutomation:()=>Nn,getForm:()=>An,getMessage:()=>cn,getSavedResponse:()=>ln,getSegment:()=>On,getTemplate:()=>Ln,getVariable:()=>bn,listAudiences:()=>Wn,listAutomations:()=>hn,listCampaigns:()=>en,listContactAutomations:()=>zn,listForms:()=>vn,listMessages:()=>nn,listSavedResponses:()=>un,listSegments:()=>Dn,listVariables:()=>yn,lockVariable:()=>Vn,removeContactFromAutomation:()=>qn,removeForm:()=>kn,removeMessage:()=>dn,removeSavedResponse:()=>Cn,removeSegment:()=>xn,removeVariable:()=>En,removeVariablesBulk:()=>Bn,unlockVariable:()=>Pn,updateCampaign:()=>on,updateMessage:()=>pn,updateSavedResponse:()=>gn,updateSegment:()=>Gn,updateVariable:()=>fn});import{logEventFromContext as q}from"corsair/core";var Ue=f({path:"campaigns",one:"campaign",many:"campaigns",event:"activecampaign.campaigns",entity:wt,store:"campaigns",label:"campaign",logKeys:["id","limit","offset","type","status"],queryMap:{type:"filters[type]",status:"filters[status]"},bodyKeys:["type","name","status","sdate","segmentid","p","m"]}),ie=f({path:"messages",one:"message",many:"messages",event:"activecampaign.messages",entity:Gt,store:"messages",label:"message",logKeys:["id","limit","offset","format","user"],bodyKeys:["subject","fromname","fromemail","reply2","html","text","name","format","user","preheader_text"]}),ce=f({path:"savedResponses",one:"savedResponse",many:"savedResponses",event:"activecampaign.savedResponses",entity:xt,store:"savedResponses",label:"savedResponse",logKeys:["id","limit","offset"],bodyKeys:["title","subject","body","userid"]}),Qe=f({path:"forms",one:"form",many:"forms",event:"activecampaign.forms",entity:Tt,store:"forms",label:"form",bodyKeys:["name","action","layout","style"]}),Re=f({path:"personalizations",one:"personalization",many:"personalizations",event:"activecampaign.personalizations",entity:St,store:"personalizations",label:"personalization",logKeys:["id","limit","offset","tag","format"],bodyKeys:["name","tag","content","format","lists"]}),Jo=f({path:"templates",one:"template",many:"templates",event:"activecampaign.templates",entity:Ht,store:"templates",label:"template"}),tn=f({path:"automations",one:"automation",many:"automations",event:"activecampaign.automations",entity:Qt,store:"automations",label:"automation"}),re=f({path:"segments",one:"segment",many:"segments",event:"activecampaign.segments",entity:It,store:"segments",label:"segment",bodyKeys:["name","logic"]}),en=Ue.list,an=Ue.get,sn=Ue.create,on=Ue.update,nn=ie.list,cn=ie.get,rn=ie.create,pn=ie.update,dn=ie.remove,un=ce.list,ln=ce.get,mn=ce.create,gn=ce.update,Cn=ce.remove,vn=Qe.list,An=Qe.get,kn=Qe.remove,yn=Re.list,bn=Re.get,fn=Re.update,En=Re.remove,Ln=Jo.get,hn=tn.list,Dn=re.list,On=re.get,wn=re.create,Gn=re.update,xn=re.remove;function pe(e,a){return(async(o,n)=>{let u=await p(o),C=await r(`campaigns/${n.id}/${e}`,o.key,u,{method:"GET",query:L(n)});return await q(o,a,m(n,["id","limit","offset"]),"completed"),C})}var Tn=pe("links","activecampaign.campaigns.getLinks"),Sn=pe("campaignMessages","activecampaign.campaigns.getMessages"),In=pe("automations","activecampaign.campaigns.getAutomations"),Un=pe("campaignLists","activecampaign.campaigns.getAutomationLists"),Rn=pe("user","activecampaign.campaigns.getUser"),Fn=async(e,a)=>{let o=await p(e),n=await r(`campaigns/${a.id}/duplicate`,e.key,o,{method:"POST"});return await q(e,"activecampaign.campaigns.duplicate",m(a,["id"]),"completed"),n},jn=async(e,a)=>{let o=await p(e),n=await r(`templates/${a.id}/generateShareLink`,e.key,o,{method:"POST"});return await q(e,"activecampaign.templates.createShareLink",m(a,["id"]),"completed"),n},Mn=async(e,a)=>{let o=await p(e),n=await r("forms/optin",e.key,o,{method:"POST",body:{optin:{formid:a.formid,email:a.email,...a.firstName!==void 0&&{firstName:a.firstName},...a.lastName!==void 0&&{lastName:a.lastName}}}});return await q(e,"activecampaign.forms.createOptin",{formid:a.formid,fields:["email","firstName","lastName"]},"completed"),n},_n=async(e,a)=>{let o=await p(e),n=await r("personalizations",e.key,o,{method:"POST",body:{personalization:{name:a.name,tag:a.tag,content:a.content,...a.format!==void 0&&{format:a.format},...a.lists!==void 0&&{lists:a.lists}}}});return await q(e,"activecampaign.personalizations.create",m(a,["tag","format"]),"completed"),n},Bn=async(e,a)=>{let o=await p(e);await r("personalizations/bulkDelete",e.key,o,{method:"POST",body:{ids:a.ids}});let n=e.db.personalizations;for(let u of a.ids)if(n?.deleteByEntityId)try{await n.deleteByEntityId(String(u))}catch(C){console.warn(`[ACTIVECAMPAIGN] Failed to evict personalization ${u} from the cache:`,C)}return await q(e,"activecampaign.personalizations.deleteBulk",{variableCount:a.ids.length,fields:["ids"]},"completed"),{ids:a.ids}};function za(e,a){return(async(o,n)=>{let u=await p(o),C=await r(`personalizations/${n.id}`,o.key,u,{method:"PUT",body:{personalization:{locked:e?1:0}}});return await q(o,a,m(n,["id"]),"completed"),C})}var Vn=za(!0,"activecampaign.personalizations.lock"),Pn=za(!1,"activecampaign.personalizations.unlock"),zn=async(e,a)=>{let o=await p(e),n=await r("contactAutomations",e.key,o,{method:"GET",query:L(a)});return await q(e,"activecampaign.contactAutomations.list",G(a,["limit","offset"],n.contactAutomations?.length??0),"completed"),n},Nn=async(e,a)=>{let o=await p(e),n=await r(`contactAutomations/${a.id}`,e.key,o,{method:"GET"});return await q(e,"activecampaign.contactAutomations.get",m(a,["id"]),"completed"),n},$n=async(e,a)=>{let o=await p(e),n=await r(`contacts/${a.id}/automationEntryCounts`,e.key,o,{method:"GET"});return await q(e,"activecampaign.contactAutomations.entryCounts",m(a,["id"]),"completed"),n},Kn=async(e,a)=>{let o=await p(e),u=(await r("contacts",e.key,o,{method:"GET",query:{email:a.email}})).contacts?.[0]?.id;if(!u)throw new Error("No ActiveCampaign contact matches the supplied email address");let C=await r("contactAutomations",e.key,o,{method:"POST",body:{contactAutomation:{contact:u,automation:a.automation_id}}});return await q(e,"activecampaign.contactAutomations.add",{contact:u,automation:a.automation_id,fields:["email"]},"completed"),C},qn=async(e,a)=>{let o=await p(e),u=(await r("contacts",e.key,o,{method:"GET",query:{email:a.email}})).contacts?.[0]?.id;if(!u)throw new Error("No ActiveCampaign contact matches the supplied email address");let C=[];for(let R=0;;){let F=await r(`contacts/${u}/contactAutomations`,e.key,o,{method:"GET",query:{limit:ot,offset:R}}),N=F.contactAutomations??[];C.push(...N),R+=N.length;let it=Number(F.meta?.total);if(N.length===0||N.length<ot||Number.isFinite(it)&&R>=it)break}let w=C.filter(R=>R.automation===a.automation_id&&R.id);w.sort((R,F)=>String(R.adddate??"").localeCompare(String(F.adddate??"")));let U=a.run_remove_option==="last"?w.slice(-1):w,b=0;try{for(let R of U)await r(`contactAutomations/${R.id}`,e.key,o,{method:"DELETE"}),b++}catch(R){throw await q(e,"activecampaign.contactAutomations.remove",{contact:u,automation:a.automation_id,removed:b,fields:["email"]},"failed"),R}return await q(e,"activecampaign.contactAutomations.remove",{contact:u,automation:a.automation_id,removed:b,fields:["email"]},"completed"),{removed:b}},Wn=async(e,a)=>{let o=await p(e),n=await r("segments",e.key,o,{method:"GET",query:{...L(a),...j({"filters[name]":a.name})}});return await q(e,"activecampaign.segments.listAudiences",G(a,["limit","offset"],n.segments?.length??0),"completed"),n};var Je={};X(Je,{addSecondaryContact:()=>Oi,createContactTask:()=>zi,createFieldMeta:()=>Si,createGroup:()=>ei,createOutcome:()=>bi,createRole:()=>Ei,createStage:()=>ii,createTask:()=>ui,createTaskType:()=>vi,findContactTask:()=>Ni,get:()=>Zn,getFieldData:()=>Fi,getFieldMeta:()=>Ti,getGroup:()=>ti,getOutcome:()=>yi,getSecondaryContact:()=>Di,getStage:()=>ni,getTask:()=>di,getTaskType:()=>Ci,list:()=>Hn,listActivities:()=>_i,listFieldData:()=>Ri,listFieldMeta:()=>xi,listFiltered:()=>Qn,listGroups:()=>Jn,listOutcomes:()=>ki,listRoles:()=>fi,listSecondaryContacts:()=>hi,listStages:()=>oi,listTaskTypes:()=>gi,listTasks:()=>pi,moveStageDeals:()=>Vi,remove:()=>Xn,removeFieldData:()=>Mi,removeFieldMeta:()=>Ui,removeGroup:()=>si,removeRole:()=>Li,removeSecondaryContact:()=>Gi,removeStage:()=>ri,removeStageWithDeals:()=>Pi,removeTask:()=>mi,update:()=>Yn,updateFieldData:()=>ji,updateFieldMeta:()=>Ii,updateGroup:()=>ai,updateOwnersBulk:()=>Bi,updateSecondaryContact:()=>wi,updateStage:()=>ci,updateTask:()=>li,updateTaskType:()=>Ai});import{logEventFromContext as Yt}from"corsair/core";var de=f({path:"deals",one:"deal",many:"deals",event:"activecampaign.deals",entity:yt,store:"deals",label:"deal",logKeys:["id","limit","offset","status","stage","group","owner"],queryMap:{search:"filters[search]",search_field:"filters[search_field]",title:"filters[title]",stage:"filters[stage]",group:"filters[group]",status:"filters[status]",owner:"filters[owner]",nextdate_range:"filters[nextdate_range]",tag:"filters[tag]",tasktype:"filters[tasktype]",created_before:"filters[created_before]",created_after:"filters[created_after]",updated_before:"filters[updated_before]",updated_after:"filters[updated_after]",organization:"filters[organization]",minimum_value:"filters[minimum_value]",maximum_value:"filters[maximum_value]",score_greater_than:"filters[score_greater_than]",score_less_than:"filters[score_less_than]",score:"filters[score]",order_id:"orders[id]",order_title:"orders[title]",order_value:"orders[value]",order_created:"orders[cdate]",order_updated:"orders[mdate]",order_contact_name:"orders[contact_name]",order_contact_orgname:"orders[contact_orgname]",order_next_action:"orders[next-action]"},bodyKeys:["title","description","value","currency","group","stage","owner","contact","organization","status","percent","fields"]}),ue=f({path:"dealGroups",one:"dealGroup",many:"dealGroups",event:"activecampaign.dealGroups",entity:bt,store:"dealGroups",label:"dealGroup",queryMap:{title:"filters[title]"},bodyKeys:["title","currency","allgroups","autoassign","allusers","users","groups"]}),le=f({path:"dealStages",one:"dealStage",many:"dealStages",event:"activecampaign.dealStages",entity:ft,store:"dealStages",label:"dealStage",queryMap:{title:"filters[title]",group:"filters[d_groupid]",order_title:"orders[title]"},bodyKeys:["title","group","order","width","color","cardRegion1"]}),me=f({path:"dealTasks",one:"dealTask",many:"dealTasks",event:"activecampaign.dealTasks",entity:pt,store:"dealTasks",label:"dealTask",logKeys:["id","limit","offset","relid","reltype","dealTasktype"],queryMap:{title:"filters[title]",reltype:"filters[reltype]",relid:"filters[relid]",status:"filters[status]",note:"filters[note]",duedate:"filters[duedate]",dealTasktype:"filters[d_tasktypeid]",userid:"filters[userid]",due_after:"filters[due_after]",due_before:"filters[due_before]",duedate_range:"filters[duedate_range]",assignee_userid:"filters[assignee_userid]",outcome_id:"filters[outcome_id]"},bodyKeys:["title","relid","reltype","dealTasktype","ownerType","status","note","duedate","edate","assignee","triggerAutomationOnCreate","doneAutomation","outcomeId","outcomeInfo"]}),Fe=f({path:"dealTasktypes",one:"dealTasktype",many:"dealTasktypes",event:"activecampaign.dealTaskTypes",entity:Et,store:"dealTaskTypes",label:"dealTaskType",bodyKeys:["title","defduration","status","display_order","outcomes"]}),Ye=f({path:"dealRoles",one:"dealRole",many:"dealRoles",event:"activecampaign.dealRoles",entity:Lt,store:"dealRoles",label:"dealRole",bodyKeys:["title"]}),Xe=f({path:"taskOutcomes",one:"taskOutcome",many:"taskOutcomes",event:"activecampaign.taskOutcomes",entity:ht,store:"taskOutcomes",label:"taskOutcome",bodyKeys:["title","sentiment","status","dealTasktypes"]}),ge=f({path:"dealCustomFieldMeta",one:"dealCustomFieldMetum",many:"dealCustomFieldMeta",event:"activecampaign.dealCustomFieldMeta",entity:mt,store:"dealCustomFieldMeta",label:"dealCustomFieldMeta",bodyKeys:["fieldLabel","fieldType","fieldOptions","fieldDefault","fieldDefaultCurrency","isFormVisible","isRequired","displayOrder"]}),je=f({path:"dealCustomFieldData",one:"dealCustomFieldDatum",many:"dealCustomFieldData",event:"activecampaign.dealCustomFieldData",label:"dealCustomFieldData",logKeys:["id","limit","offset","dealId","customFieldId"],queryMap:{dealId:"filters[dealId]"},bodyKeys:["dealId","customFieldId","fieldValue","fieldCurrency"]}),Ce=f({path:"contactDeals",one:"contactDeal",many:"contactDeals",event:"activecampaign.contactDeals",label:"contactDeal",logKeys:["id","limit","offset","contact","deal","role"],bodyKeys:["contact","deal","role","jobTitle"]}),Hn=de.list,Qn=de.list,Zn=de.get,Yn=de.update,Xn=de.remove,Jn=ue.list,ti=ue.get,ei=ue.create,ai=ue.update,si=ue.remove,oi=le.list,ni=le.get,ii=le.create,ci=le.update,ri=le.remove,pi=me.list,di=me.get,ui=me.create,li=me.update,mi=me.remove,gi=Fe.list,Ci=Fe.get,vi=Fe.create,Ai=Fe.update,ki=Xe.list,yi=Xe.get,bi=Xe.create,fi=Ye.list,Ei=Ye.create,Li=Ye.remove,hi=Ce.list,Di=Ce.get,Oi=Ce.create,wi=Ce.update,Gi=Ce.remove,xi=ge.list,Ti=ge.get,Si=ge.create,Ii=ge.update,Ui=ge.remove,Ri=je.list,Fi=je.get,ji=je.update,Mi=je.remove,_i=async(e,a)=>{let o=await p(e),n=await r("dealActivities",e.key,o,{method:"GET",query:{...L(a),...j({deal:a.deal,exclude:a.exclude,"filters[data_type]":a.data_type,"filters[data_id]":a.data_id})}});return await Yt(e,"activecampaign.dealActivities.list",G(a,["deal","exclude","data_type","data_id","limit","offset"],n.dealActivities?.length??0),"completed"),n},Bi=async(e,a)=>{let o=await p(e),n=await r("deals/bulkUpdate",e.key,o,{method:"PATCH",body:{deals:a.deals}});return await Yt(e,"activecampaign.deals.updateOwnersBulk",{dealCount:a.deals.length,fields:["deals"]},"completed"),n},Vi=async(e,a)=>{let o=await p(e),n=await r(`dealStages/${a.id}/deals`,e.key,o,{method:"PUT",body:{deals:{stage:a.stage}}});return await Yt(e,"activecampaign.dealStages.moveDeals",m(a,["id","stage"]),"completed"),n},Pi=async(e,a)=>{let o=await p(e);return a.action_type==="Move"&&await r(`dealStages/${a.id}/deals`,e.key,o,{method:"PUT",body:{deals:{stage:a.new_stage_id}}}),await r(`dealStages/${a.id}`,e.key,o,{method:"DELETE"}),await Yt(e,"activecampaign.dealStages.deleteWithDeals",m(a,["id","action_type","new_pipeline_id","new_stage_id"]),"completed"),{id:a.id}},zi=async(e,a)=>{let o=await p(e),n=await r("dealTasks",e.key,o,{method:"POST",body:{dealTask:{title:a.title,relid:a.contactId,reltype:"Subscriber",dealtasktype:a.taskTypeId,duedate:a.dueDate,...a.note!==void 0&&{note:a.note},...a.assignee!==void 0&&{assignee:a.assignee}}}});return await D(e.db.dealTasks,pt,n.dealTask,"dealTask"),await Yt(e,"activecampaign.contactTasks.create",m(a,["contactId","taskTypeId","dueDate","assignee"]),"completed"),n},Ni=async(e,a)=>{let o=await p(e),n=[];for(let C=0;;){let U=(await r("dealTasks",e.key,o,{method:"GET",query:j({"filters[reltype]":"Subscriber","filters[relid]":a.contactId,limit:ot,offset:C})})).dealTasks??[];if(n.push(...U),U.length<ot)break;C+=U.length}let u=n.filter(C=>C.title===a.title&&C.reltype==="Subscriber");return await Yt(e,"activecampaign.contactTasks.find",{contactId:a.contactId,matched:u.length,fields:["title"]},"completed"),{dealTasks:u}};var ta={};X(ta,{create:()=>qi,createGroupMember:()=>nc,createOptionsBulk:()=>Qi,createRel:()=>ac,get:()=>Ki,getValue:()=>Yi,list:()=>$i,listGroupMembers:()=>oc,listRels:()=>ec,listValues:()=>Zi,remove:()=>Hi,removeGroupMember:()=>cc,removeRel:()=>sc,removeValue:()=>tc,setValueForContact:()=>Xi,update:()=>Wi,updateGroupMember:()=>ic,updateValue:()=>Ji});import{logEventFromContext as z}from"corsair/core";var $i=async(e,a)=>{let o=await p(e),n=await r("fields",e.key,o,{method:"GET",query:L(a)});return await V(e.db.fields,tt,n.fields,"field"),await z(e,"activecampaign.fields.list",G(a,["limit","offset"],n.fields?.length??0),"completed"),n},Ki=async(e,a)=>{let o=await p(e),n=await r(`fields/${a.id}`,e.key,o,{method:"GET"});return await D(e.db.fields,tt,n.field,"field"),await z(e,"activecampaign.fields.get",m(a,["id"]),"completed"),n},qi=async(e,a)=>{let o=await p(e),n=await r("fields",e.key,o,{method:"POST",body:{field:x({title:a.title,type:a.type,descript:a.descript,perstag:a.perstag,defval:a.defval,isrequired:a.isrequired===void 0?void 0:a.isrequired?1:0,visible:a.visible===void 0?void 0:a.visible?1:0,ordernum:a.ordernum})}});return await D(e.db.fields,tt,n.field,"field"),await z(e,"activecampaign.fields.create",m(a,["type","isrequired","visible","ordernum"]),"completed"),n},Wi=async(e,a)=>{let o=await p(e),n=await r(`fields/${a.id}`,e.key,o,{method:"PUT",body:{field:x({title:a.title,type:a.type,descript:a.descript,perstag:a.perstag,defval:a.defval,isrequired:a.isrequired===void 0?void 0:a.isrequired?1:0,visible:a.visible===void 0?void 0:a.visible?1:0,ordernum:a.ordernum})}});return await D(e.db.fields,tt,n.field,"field"),await z(e,"activecampaign.fields.update",m(a,["id","type","isrequired","visible","ordernum"]),"completed"),n},Hi=async(e,a)=>{let o=await p(e);return await r(`fields/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.fields,a.id,"field"),await Ie(e.db.fieldValues,"field",a.id,"fieldValue"),await z(e,"activecampaign.fields.delete",m(a,["id"]),"completed"),{id:a.id}},Qi=async(e,a)=>{let o=await p(e),n=await r("fieldOption/bulk",e.key,o,{method:"POST",body:{fieldOptions:a.options.map(u=>x({field:u.field,label:u.label,value:u.value,orderid:u.orderid,isdefault:u.isdefault===void 0?void 0:u.isdefault?1:0}))}});return await V(e.db.fieldOptions,qt,n.fieldOptions,"fieldOption"),await z(e,"activecampaign.fieldOptions.createBulk",{optionCount:a.options.length,fields:["options"]},"completed"),n},Zi=async(e,a)=>{let o=await p(e),n=await r("fieldValues",e.key,o,{method:"GET",query:L(a)});return await V(e.db.fieldValues,st,n.fieldValues,"fieldValue"),await z(e,"activecampaign.fieldValues.list",G(a,["limit","offset"],n.fieldValues?.length??0),"completed"),n},Yi=async(e,a)=>{let o=await p(e),n=await r(`fieldValues/${a.id}`,e.key,o,{method:"GET"});return await D(e.db.fieldValues,st,n.fieldValue,"fieldValue"),await z(e,"activecampaign.fieldValues.get",m(a,["id"]),"completed"),n},Xi=async(e,a)=>{let o=await p(e),n=await r("fieldValues",e.key,o,{method:"POST",body:{fieldValue:{contact:a.contact,field:a.field,value:a.value},useDefaults:a.useDefaults??!1}});return await D(e.db.fieldValues,st,n.fieldValue,"fieldValue"),await z(e,"activecampaign.fieldValues.setForContact",m(a,["contact","field","useDefaults"]),"completed"),n},Ji=async(e,a)=>{let o=await p(e),n=await r(`fieldValues/${a.id}`,e.key,o,{method:"PUT",body:{fieldValue:{value:a.value},useDefaults:a.useDefaults??!1}});return await D(e.db.fieldValues,st,n.fieldValue,"fieldValue"),await z(e,"activecampaign.fieldValues.update",m(a,["id","useDefaults"]),"completed"),n},tc=async(e,a)=>{let o=await p(e);return await r(`fieldValues/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.fieldValues,a.id,"fieldValue"),await z(e,"activecampaign.fieldValues.delete",m(a,["id"]),"completed"),{id:a.id}},ec=async(e,a)=>{let o=await p(e),n=await r("fieldRels",e.key,o,{method:"GET",query:L(a)});return await V(e.db.fieldRels,lt,n.fieldRels,"fieldRel"),await z(e,"activecampaign.fieldRels.list",G(a,["limit","offset"],n.fieldRels?.length??0),"completed"),n},ac=async(e,a)=>{let o=await p(e),n=await r("fieldRels",e.key,o,{method:"POST",body:{fieldRel:{field:a.field,relid:a.relid}}});return await D(e.db.fieldRels,lt,n.fieldRel,"fieldRel"),await z(e,"activecampaign.fieldRels.create",m(a,["field","relid"]),"completed"),n},sc=async(e,a)=>{let o=await p(e);return await r(`fieldRels/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.fieldRels,a.id,"fieldRel"),await z(e,"activecampaign.fieldRels.delete",m(a,["id"]),"completed"),{id:a.id}},oc=async(e,a)=>{let o=await p(e),n=await r("groupMembers",e.key,o,{method:"GET",query:L(a)});return await V(e.db.groupMembers,rt,n.groupMembers,"groupMember"),await z(e,"activecampaign.groupMembers.list",G(a,["limit","offset"],n.groupMembers?.length??0),"completed"),n},nc=async(e,a)=>{let o=await p(e),n=await r("groupMembers",e.key,o,{method:"POST",body:{groupMember:x({rel_id:a.rel_id,group_id:a.group_id,ordernum:a.ordernum})}});return await D(e.db.groupMembers,rt,n.groupMember,"groupMember"),await z(e,"activecampaign.groupMembers.create",m(a,["rel_id","group_id","ordernum"]),"completed"),n},ic=async(e,a)=>{let o=await p(e),n=await r(`groupMembers/${a.id}`,e.key,o,{method:"PUT",body:{groupMember:x({rel_id:a.rel_id,group_id:a.group_id,ordernum:a.ordernum})}});return await D(e.db.groupMembers,rt,n.groupMember,"groupMember"),await z(e,"activecampaign.groupMembers.update",m(a,["id","rel_id","group_id","ordernum"]),"completed"),n},cc=async(e,a)=>{let o=await p(e);return await r(`groupMembers/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.groupMembers,a.id,"groupMember"),await z(e,"activecampaign.groupMembers.delete",m(a,["id"]),"completed"),{id:a.id}};var aa={};X(aa,{createBulk:()=>rc,getStatus:()=>dc,list:()=>pc});import{logEventFromContext as ea}from"corsair/core";var rc=async(e,a)=>{let o=await p(e),n=await r("import/bulk_import",e.key,o,{method:"POST",body:x({contacts:a.contacts,exclude_automations:a.exclude_automations??!0,callback:a.callback})});return await ea(e,"activecampaign.imports.createBulk",{contactCount:a.contacts.length,listCount:a.contacts.reduce((u,C)=>u+(C.subscribe?.length??0),0),excludeAutomations:a.exclude_automations??!0,hasCallback:a.callback!==void 0,fields:["contacts"]},"completed"),n},pc=async(e,a)=>{let o=await p(e),n=await r("import/bulk_import",e.key,o,{method:"GET"});return await ea(e,"activecampaign.imports.list",m(a,[]),"completed"),n},dc=async(e,a)=>{let o=await p(e),n=await r("import/info",e.key,o,{method:"GET",query:{batchId:a.batchId}});return await ea(e,"activecampaign.imports.getStatus",m(a,["batchId"]),"completed"),n};var sa={};X(sa,{create:()=>mc,createListGroup:()=>Ac,get:()=>lc,list:()=>uc,listContactLists:()=>Cc,remove:()=>gc,updateSubscription:()=>vc});import{logEventFromContext as Nt}from"corsair/core";var uc=async(e,a)=>{let o=await p(e),n=await r("lists",e.key,o,{method:"GET",query:{...L(a),...j({"filters[name]":a.name})}});return await V(e.db.lists,ct,n.lists,"list"),await Nt(e,"activecampaign.lists.list",G(a,["limit","offset"],n.lists?.length??0),"completed"),n},lc=async(e,a)=>{let o=await p(e),n=await r(`lists/${a.id}`,e.key,o,{method:"GET"});return await D(e.db.lists,ct,n.list,"list"),await Nt(e,"activecampaign.lists.get",m(a,["id"]),"completed"),n},mc=async(e,a)=>{let o=await p(e),n=await r("lists",e.key,o,{method:"POST",body:{list:x({name:a.name,stringid:a.stringid,sender_url:a.sender_url,sender_reminder:a.sender_reminder,send_last_broadcast:a.send_last_broadcast??!1,carboncopy:a.carboncopy,subscription_notify:a.subscription_notify,unsubscription_notify:a.unsubscription_notify,user:a.user})}});return await D(e.db.lists,ct,n.list,"list"),await Nt(e,"activecampaign.lists.create",m(a,["name","stringid","send_last_broadcast"]),"completed"),n},gc=async(e,a)=>{let o=await p(e);return await r(`lists/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.lists,a.id,"list"),await Nt(e,"activecampaign.lists.delete",m(a,["id"]),"completed"),{id:a.id}},Cc=async(e,a)=>{let o=await p(e),n=await r("contactLists",e.key,o,{method:"GET",query:L(a)});return await V(e.db.contactLists,et,n.contactLists,"contactList"),await Nt(e,"activecampaign.contactLists.list",G(a,["limit","offset"],n.contactLists?.length??0),"completed"),n},vc=async(e,a)=>{let o=await p(e),n=await r("contactLists",e.key,o,{method:"POST",body:{contactList:{list:a.list,contact:a.contact,status:a.status}}});return await D(e.db.contactLists,et,n.contactList,"contactList"),await Nt(e,"activecampaign.lists.updateSubscription",m(a,["list","contact","status"]),"completed"),n},Ac=async(e,a)=>{let o=await p(e),n=await r("listGroups",e.key,o,{method:"POST",body:{listGroup:{listid:a.listid,groupid:a.groupid}}});return await D(e.db.listGroups,Wt,n.listGroup,"listGroup"),await Nt(e,"activecampaign.listGroups.create",m(a,["listid","groupid"]),"completed"),n};var na={};X(na,{addBrowseSessionToCart:()=>wr,addWhitelistedDomain:()=>Rr,createAddress:()=>or,createCalendar:()=>pr,createChildSchema:()=>dp,createConnection:()=>fc,createCustomer:()=>Oc,createEvent:()=>mr,createGroup:()=>Jc,createOrder:()=>Sc,createProduct:()=>Ar,createSchema:()=>_c,createSmsMetricsSnapshot:()=>Jr,createTaskReminder:()=>pp,createUser:()=>Hc,createWebhook:()=>Nc,findOrder:()=>ip,getAddress:()=>sr,getBranding:()=>Pr,getCalendar:()=>rr,getConnection:()=>bc,getCustomer:()=>Dc,getEventTrackingStatus:()=>xr,getGroup:()=>Xc,getLoggedInUser:()=>jr,getOrder:()=>Tc,getOrderProduct:()=>Fc,getProduct:()=>vr,getRecord:()=>qr,getRecordByExternalId:()=>Wr,getSchema:()=>Mc,getSiteTrackingCode:()=>sp,getSiteTrackingStatus:()=>Gr,getSmsCredits:()=>Yr,getSmsFailures:()=>ep,getSmsMetrics:()=>tp,getSmsMetricsSnapshot:()=>Xr,getSmsRecipients:()=>ap,getUser:()=>Wc,getUserByUsername:()=>Mr,getWebhook:()=>zc,listAddresses:()=>ar,listCalendars:()=>cr,listConnections:()=>yc,listCustomers:()=>hc,listEmailActivities:()=>Vr,listEvents:()=>lr,listGroupLimits:()=>_r,listGroups:()=>Yc,listImportAggregate:()=>up,listOrderProducts:()=>Rc,listOrders:()=>xc,listProductsForOrder:()=>rp,listRecords:()=>Kr,listSchemas:()=>jc,listScores:()=>Br,listSmsBroadcastLists:()=>op,listSmsBroadcasts:()=>Zr,listUsers:()=>qc,listWebhooks:()=>Pc,listWhitelistedDomains:()=>Ur,removeAddress:()=>ir,removeAddressGroup:()=>np,removeCalendar:()=>ur,removeConnection:()=>Lc,removeCustomer:()=>Gc,removeEvent:()=>gr,removeGroup:()=>er,removeOrder:()=>Uc,removeProduct:()=>yr,removeRecord:()=>Hr,removeRecordByExternalId:()=>Qr,removeSchema:()=>Vc,removeUser:()=>Zc,removeWebhook:()=>Kc,removeWhitelistedDomain:()=>Fr,saveBrowseSession:()=>Or,searchBrowseSessions:()=>Dr,searchProducts:()=>Cr,searchRecurringPayments:()=>Lr,setEventTrackingStatus:()=>Sr,setSiteTrackingStatus:()=>Tr,testTrackingEvent:()=>lp,trackEvent:()=>Ir,updateAddress:()=>nr,updateBranding:()=>zr,updateCalendar:()=>dr,updateConfig:()=>Nr,updateConnection:()=>Ec,updateCustomer:()=>wc,updateGroup:()=>tr,updateOrder:()=>Ic,updateProduct:()=>kr,updateSchema:()=>Bc,updateUser:()=>Qc,updateWebhook:()=>$c,upsertOrder:()=>cp,upsertOrdersBulk:()=>fr,upsertOrdersBulkAsync:()=>Er,upsertProductsBulk:()=>br,upsertRecord:()=>$r,upsertRecurringPaymentsBulk:()=>hr});import{logEventFromContext as y}from"corsair/core";import{ApiError as kc}from"corsair/http";var ve=f({path:"connections",one:"connection",many:"connections",event:"activecampaign.connections",entity:Ut,store:"connections",label:"connection",logKeys:["id","limit","offset","service","externalid"],bodyKeys:["service","externalid","name","logoUrl","linkUrl"]}),Ae=f({path:"ecomCustomers",one:"ecomCustomer",many:"ecomCustomers",event:"activecampaign.ecomCustomers",entity:Rt,store:"ecomCustomers",label:"ecomCustomer",logKeys:["id","limit","offset","connectionid","externalid"],bodyKeys:["connectionid","externalid","email","acceptsMarketing"]}),ke=f({path:"ecomOrders",one:"ecomOrder",many:"ecomOrders",event:"activecampaign.ecomOrders",label:"ecomOrder",logKeys:["id","limit","offset","connectionid","customerid"],bodyKeys:["externalid","source","email","orderProducts","orderDiscounts","totalPrice","shippingAmount","taxAmount","discountAmount","currency","orderDate","externalUpdatedDate","abandonedDate","externalcheckoutid","connectionid","customerid","orderNumber","shippingMethod"]}),Na=f({path:"ecomOrderProducts",one:"ecomOrderProduct",many:"ecomOrderProducts",event:"activecampaign.ecomOrderProducts",label:"ecomOrderProduct"}),ye=f({path:"customObjects/schemas",one:"schema",many:"schemas",event:"activecampaign.customObjectSchemas",entity:Bt,store:"customObjectSchemas",label:"customObjectSchema",bodyKeys:["slug","name","description","labels","fields","relationships"]}),be=f({path:"webhooks",one:"webhook",many:"webhooks",event:"activecampaign.webhooks",entity:Vt,store:"webhooks",label:"webhook",logKeys:["id","limit","offset","listid"],bodyKeys:["name","url","events","sources","listid"]}),fe=f({path:"users",one:"user",many:"users",event:"activecampaign.users",entity:Ft,store:"users",label:"user",logKeys:["id","limit","offset","group"],bodyKeys:["username","email","firstName","lastName","password","group","phone","signature","lang","localZoneid"]}),Ee=f({path:"groups",one:"group",many:"groups",event:"activecampaign.groups",entity:jt,store:"groups",label:"group",bodyKeys:["title","descript"]}),Le=f({path:"addresses",one:"address",many:"addresses",event:"activecampaign.addresses",entity:Mt,store:"addresses",label:"address",logKeys:["id","limit","offset","country"],bodyKeys:["companyName","address1","address2","city","state","zip","country","allgroups","groupid"]}),he=f({path:"calendars",one:"calendar",many:"calendars",event:"activecampaign.calendars",entity:_t,store:"calendars",label:"calendar",bodyKeys:["title","type","description","isglobal","inviteusers"]}),oa=f({path:"eventTrackingEvents",one:"eventTrackingEvent",many:"eventTrackingEvents",event:"activecampaign.eventTrackingEvents",entity:Pt,store:"eventTrackingEvents",label:"eventTrackingEvent",bodyKeys:["name"]}),yc=ve.list,bc=ve.get,fc=ve.create,Ec=ve.update,Lc=ve.remove,hc=Ae.list,Dc=Ae.get,Oc=Ae.create,wc=Ae.update,Gc=Ae.remove,xc=ke.list,Tc=ke.get,Sc=ke.create,Ic=ke.update,Uc=ke.remove,Rc=Na.list,Fc=Na.get,jc=ye.list,Mc=ye.get,_c=ye.create,Bc=ye.update,Vc=ye.remove,Pc=be.list,zc=be.get,Nc=be.create,$c=be.update,Kc=be.remove,qc=fe.list,Wc=fe.get,Hc=fe.create,Qc=fe.update,Zc=fe.remove,Yc=Ee.list,Xc=Ee.get,Jc=Ee.create,tr=Ee.update,er=Ee.remove,ar=Le.list,sr=Le.get,or=Le.create,nr=Le.update,ir=Le.remove,cr=he.list,rr=he.get,pr=he.create,dr=he.update,ur=he.remove,lr=oa.list,mr=oa.create,gr=oa.remove;async function Q(e,a,o){let n=await p(e),u=await Va(a,e.key,n,o);if(u.errors?.length){let C=u.errors.map(w=>w.message??"unknown error").join("; ");throw new Error(`ActiveCampaign GraphQL error: ${C}`)}return u.data??{}}var Me="id name description imageUrl productUrl price currency sku isVariant",Cr=async(e,a)=>{let o=await Q(e,`query SearchProducts($filter: ProductFilter, $limit: Int, $offset: Int) {
2
+ products(filter: $filter, limit: $limit, offset: $offset) { ${Me} }
3
+ }`,x({filter:a.filter,limit:a.limit,offset:a.offset}));return await y(e,"activecampaign.products.search",m(a,["limit","offset"]),"completed"),o},vr=async(e,a)=>{let o=await Q(e,`query GetProduct($id: ID!) { product(id: $id) { ${Me} } }`,{id:a.id});return await y(e,"activecampaign.products.get",m(a,["id"]),"completed"),o},Ar=async(e,a)=>{let o=await Q(e,`mutation CreateProduct($input: CreateProductInput!) {
4
+ createProduct(input: $input) { ${Me} }
5
+ }`,{input:x({...a})});return await y(e,"activecampaign.products.create",m(a,["legacyConnectionId","sku","currency"]),"completed"),o},kr=async(e,a)=>{let o=await Q(e,`mutation UpdateProduct($input: UpdateProductInput!) {
6
+ updateProduct(input: $input) { ${Me} }
7
+ }`,{input:x({...a})});return await y(e,"activecampaign.products.update",m(a,["id","legacyConnectionId","sku"]),"completed"),o},yr=async(e,a)=>{let o=await Q(e,"mutation DeleteProduct($id: ID!) { deleteProduct(id: $id) { id } }",{id:a.id});return await y(e,"activecampaign.products.delete",m(a,["id"]),"completed"),o},br=async(e,a)=>{let o=await Q(e,`mutation BulkUpsertProducts($input: BulkUpsertProductsInput!) {
8
+ bulkUpsertProducts(input: $input) { id }
9
+ }`,{input:{products:a.products}});return await y(e,"activecampaign.products.upsertBulk",{productCount:a.products.length,fields:["products"]},"completed"),o};function $a(e,a){return(async(o,n)=>{let u=await Q(o,`mutation UpsertOrders($input: ${e}Input!) {
10
+ ${e}(input: $input) { id }
11
+ }`,{input:{orders:n.orders}});return await y(o,a,{orderCount:n.orders.length,fields:["orders"]},"completed"),u})}var fr=$a("bulkUpsertOrders","activecampaign.orders.upsertBulk"),Er=$a("bulkUpsertOrdersAsync","activecampaign.orders.upsertBulkAsync"),Lr=async(e,a)=>{let o=await Q(e,`query SearchRecurringPayments($filter: RecurringPaymentFilter, $limit: Int, $offset: Int) {
12
+ recurringPayments(filter: $filter, limit: $limit, offset: $offset) {
13
+ id status currency amount
14
+ }
15
+ }`,x({filter:a.filter,limit:a.limit,offset:a.offset}));return await y(e,"activecampaign.recurringPayments.search",m(a,["limit","offset"]),"completed"),o},hr=async(e,a)=>{let o=await Q(e,`mutation BulkUpsertRecurringPayments($input: BulkUpsertRecurringPaymentsInput!) {
16
+ bulkUpsertRecurringPayments(input: $input) { id }
17
+ }`,{input:{recurringPayments:a.recurringPayments}});return await y(e,"activecampaign.recurringPayments.upsertBulk",{paymentCount:a.recurringPayments.length,fields:["recurringPayments"]},"completed"),o},Dr=async(e,a)=>{let o=await Q(e,`query SearchBrowseSessions($filter: BrowseSessionFilter!) {
18
+ browseSessions(filter: $filter) { id status addedToCart }
19
+ }`,{filter:x({...a})});return await y(e,"activecampaign.browseSessions.search",m(a,["connectionId","status"]),"completed"),o},Or=async(e,a)=>{let o=await Q(e,`mutation SaveBrowseSession($input: SaveBrowseSessionInput!) {
20
+ saveBrowseSession(input: $input) { id status }
21
+ }`,{input:x({...a})});return await y(e,"activecampaign.browseSessions.save",m(a,["connectionId","status"]),"completed"),o},wr=async(e,a)=>{let o=await Q(e,`mutation AddBrowseSessionToCart($input: AddToCartInput!) {
22
+ addBrowseSessionToCart(input: $input) { id addedToCart }
23
+ }`,{input:x({...a})});return await y(e,"activecampaign.browseSessions.addToCart",m(a,["connectionId"]),"completed"),o};function Ka(e,a){return(async o=>{let n=await p(o),u=await r(e,o.key,n,{method:"GET"});return await y(o,a,{},"completed"),u})}var Gr=Ka("siteTracking","activecampaign.tracking.getSiteStatus"),xr=Ka("eventTracking","activecampaign.tracking.getEventStatus");function qa(e,a,o){return(async(n,u)=>{let C=await p(n),w=await r(e,n.key,C,{method:"PUT",body:{[a]:{enabled:u.enabled}}});return await y(n,o,m(u,["enabled"]),"completed"),w})}var Tr=qa("siteTracking","siteTracking","activecampaign.tracking.setSiteStatus"),Sr=qa("eventTracking","eventTracking","activecampaign.tracking.setEventStatus"),Ir=async(e,a)=>{let o=new URLSearchParams({actid:a.actid,key:a.key,event:a.event,visit:JSON.stringify({email:a.email}),...a.eventdata!==void 0&&{eventdata:a.eventdata}}),n=await fetch("https://trackcmp.net/event",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:o,signal:AbortSignal.timeout(2e4)});if(!n.ok){let C=await n.text();throw new kc({method:"POST",url:"https://trackcmp.net/event"},{url:"https://trackcmp.net/event",ok:!1,status:n.status,statusText:n.statusText,body:C},`ActiveCampaign tracking request failed: ${n.status}`)}let u=await n.json();return await y(e,"activecampaign.tracking.trackEvent",{status:n.status,fields:["actid","key","event","email"]},"completed"),u},Ur=async(e,a)=>{let o=await p(e),n=await r("siteTrackingWhitelist",e.key,o,{method:"GET",query:L(a)});return await y(e,"activecampaign.tracking.listWhitelist",G(a,["limit","offset"],n.siteTrackingWhitelist?.length??0),"completed"),n},Rr=async(e,a)=>{let o=await p(e),n=await r("siteTracking/whitelist",e.key,o,{method:"POST",body:{siteTrackingWhitelist:{name:a.name}}});return await y(e,"activecampaign.tracking.addWhitelist",m(a,["name"]),"completed"),n},Fr=async(e,a)=>{let o=await p(e);return await r(`siteTracking/whitelist/${a.id}`,e.key,o,{method:"DELETE"}),await y(e,"activecampaign.tracking.removeWhitelist",m(a,["id"]),"completed"),{id:a.id}},jr=async e=>{let a=await p(e),o=await r("users/me",e.key,a,{method:"GET"});return await y(e,"activecampaign.users.getMe",{},"completed"),o},Mr=async(e,a)=>{let o=await p(e),n=await r(`users/username/${encodeURIComponent(a.username)}`,e.key,o,{method:"GET"});return await y(e,"activecampaign.users.getByUsername",{fields:["username"]},"completed"),n},_r=async(e,a)=>{let o=await p(e),n=await r("groupLimits",e.key,o,{method:"GET",query:L(a)});return await y(e,"activecampaign.groupLimits.list",G(a,["limit","offset"],n.groupLimits?.length??0),"completed"),n},Br=async(e,a)=>{let o=await p(e),n=await r("scores",e.key,o,{method:"GET",query:L(a)});return await y(e,"activecampaign.scores.list",G(a,["limit","offset"],n.scores?.length??0),"completed"),n},Vr=async(e,a)=>{let o=await p(e),n=await r("emailActivities",e.key,o,{method:"GET",query:{...L(a),...j({"filters[subscriberid]":a.subscriberid,"filters[dealId]":a.dealId})}});return await y(e,"activecampaign.emailActivities.list",G(a,["subscriberid","dealId","limit","offset"],n.emailActivities?.length??0),"completed"),n},Pr=async(e,a)=>{let o=await p(e),n=await r(`brandings/${a.id}`,e.key,o,{method:"GET"});return await y(e,"activecampaign.brandings.get",m(a,["id"]),"completed"),n},zr=async(e,a)=>{let o=await p(e),n=await r(`brandings/${a.id}`,e.key,o,{method:"PUT",body:{branding:x({siteName:a.siteName,siteLogo:a.siteLogo,favicon:a.favicon,copyright:a.copyright})}});return await y(e,"activecampaign.brandings.update",m(a,["id"]),"completed"),n},Nr=async(e,a)=>{let o=await p(e),n=await r(`configs/${a.id}`,e.key,o,{method:"PUT",body:{config:{value:a.value}}});return await y(e,"activecampaign.configs.update",m(a,["id"]),"completed"),n},$r=async(e,a)=>{let o=await p(e),n=await r(`customObjects/records/${a.schemaId}`,e.key,o,{method:"POST",body:x({externalId:a.externalId,fields:a.fields})});return await y(e,"activecampaign.customObjectRecords.upsert",m(a,["schemaId","externalId"]),"completed"),n},Kr=async(e,a)=>{let o=await p(e),n=await r(`customObjects/records/${a.schemaId}`,e.key,o,{method:"GET",query:L(a)});return await y(e,"activecampaign.customObjectRecords.list",m(a,["schemaId","limit","offset"]),"completed"),n};function _e(e,a,o){return(async(n,u)=>{let C=await p(n),w=e==="id"?u.id:u.externalId;if(typeof w!="string"||w.length===0)throw new Error(e==="id"?"A custom object record id is required":"A custom object record externalId is required");let U=e==="id"?`customObjects/records/${u.schemaId}/${encodeURIComponent(w)}`:`customObjects/records/${u.schemaId}/externalid/${encodeURIComponent(w)}`,b=await r(U,n.key,C,{method:a});return await y(n,o,m(u,["schemaId","id","externalId"]),"completed"),a==="DELETE"?{schemaId:u.schemaId,...e==="id"?{id:w}:{externalId:w}}:b})}var qr=_e("id","GET","activecampaign.customObjectRecords.get"),Wr=_e("externalId","GET","activecampaign.customObjectRecords.getByExternalId"),Hr=_e("id","DELETE","activecampaign.customObjectRecords.delete"),Qr=_e("externalId","DELETE","activecampaign.customObjectRecords.deleteByExternalId"),Zr=async(e,a)=>{let o=await p(e),n=await r("sms/broadcasts",e.key,o,{method:"GET",query:{...L(a),...j({name:a.name,status:a.status})}});return await y(e,"activecampaign.smsBroadcasts.list",G(a,["limit","offset","status"],n.broadcasts?.length??0),"completed"),n},Yr=async e=>{let a=await p(e),o=await r("sms/credits",e.key,a,{method:"GET"});return await y(e,"activecampaign.smsCredits.get",{},"completed"),o},Xr=async e=>{let a=await p(e),o=await r("sms/broadcasts/metrics/snapshot",e.key,a,{method:"GET"});return await y(e,"activecampaign.smsBroadcasts.getSnapshot",{},"completed"),o},Jr=async(e,a)=>{let o=await p(e),n=await r("sms/broadcasts/metrics/snapshot",e.key,o,{method:"POST",body:{broadcastIds:a.broadcastIds}});return await y(e,"activecampaign.smsBroadcasts.createSnapshot",{broadcastCount:a.broadcastIds.length},"completed"),n},tp=async(e,a)=>{let o=await p(e),n=await r("sms/broadcasts/metrics",e.key,o,{method:"GET",query:j({broadcastIds:a.broadcastIds?.join(",")})});return await y(e,"activecampaign.smsBroadcasts.getMetrics",{broadcastCount:a.broadcastIds?.length??0},"completed"),n},ep=async(e,a)=>{let o=await p(e),n=await r("sms/broadcasts/metrics/failures",e.key,o,{method:"GET",query:j({broadcastId:a.broadcastId,startDate:a.startDate,endDate:a.endDate})});return await y(e,"activecampaign.smsBroadcasts.getFailures",m(a,["broadcastId","startDate","endDate"]),"completed"),n},ap=async(e,a)=>{let o=await p(e),n=await r(`sms/broadcasts/${a.id}/recipients`,e.key,o,{method:"GET",query:L(a)});return await y(e,"activecampaign.smsBroadcasts.getRecipients",G(a,["id","limit","offset"],0),"completed"),n},sp=async e=>{let a=await p(e),o=await r("siteTracking/code",e.key,a,{method:"GET"});return await y(e,"activecampaign.tracking.getCode",{},"completed"),o},op=async(e,a)=>{let o=await p(e),n=await r("sms/lists",e.key,o,{method:"GET",query:{...L(a),...j({name:a.name})}});return await y(e,"activecampaign.smsBroadcastLists.list",G(a,["limit","offset"],n.lists?.length??0),"completed"),n},np=async(e,a)=>{let o=await p(e);return await r(`addressGroups/${a.id}`,e.key,o,{method:"DELETE"}),await y(e,"activecampaign.addressGroups.delete",m(a,["id"]),"completed"),{id:a.id}},ip=async(e,a)=>{let o=await p(e),u=((await r("ecomOrders",e.key,o,{method:"GET",query:j({"filters[externalid]":a.storeOrderId,"filters[connectionid]":a.connectionId})})).ecomOrders??[]).find(C=>C.externalid===a.storeOrderId);return await y(e,"activecampaign.ecomOrders.find",{connectionId:a.connectionId,matched:u!==void 0,fields:["storeOrderId"]},"completed"),{ecomOrder:u??null}},cp=async(e,a)=>{let o=await p(e),u=((await r("ecomOrders",e.key,o,{method:"GET",query:j({"filters[externalid]":a.externalid,"filters[connectionid]":a.connectionid})})).ecomOrders??[]).find(U=>U.externalid===a.externalid),C={ecomOrder:x({...a})},w=u?.id?await r(`ecomOrders/${u.id}`,e.key,o,{method:"PUT",body:C}):await r("ecomOrders",e.key,o,{method:"POST",body:C});return await y(e,"activecampaign.ecomOrders.upsert",{connectionid:a.connectionid,created:u?.id===void 0,fields:["externalid","email"]},"completed"),w},rp=async(e,a)=>{let o=await p(e),n=await r("ecomOrderProducts",e.key,o,{method:"GET",query:{...L(a),...j({"filters[orderid]":a.orderId})}});return await y(e,"activecampaign.ecomOrderProducts.listForOrder",G(a,["orderId","limit","offset"],n.ecomOrderProducts?.length??0),"completed"),n},pp=async(e,a)=>{let o=await p(e),n=await r("taskNotifications",e.key,o,{method:"POST",body:{taskNotification:{dealTask:a.dealTask,interval:a.interval}}});return await y(e,"activecampaign.taskReminders.create",m(a,["dealTask","interval"]),"completed"),n},dp=async(e,a)=>{let o=await p(e),n=await r("customObjects/schemas",e.key,o,{method:"POST",body:x({parentId:a.parentId,applicationId:a.applicationId,slug:a.slug,name:a.name,description:a.description})});return await y(e,"activecampaign.customObjectSchemas.createChild",m(a,["parentId","applicationId","slug"]),"completed"),n},up=async e=>{let a=await p(e),o=await r("import/bulk_import/aggregate",e.key,a,{method:"GET"});return await y(e,"activecampaign.imports.listAggregate",{},"completed"),o},lp=async(e,a)=>{let o=await Q(e,`mutation TestTrackingEvent($input: TestTrackingEventInput!) {
24
+ testTrackingEvent(input: $input) { matched debug }
25
+ }`,{input:x({...a})});return await y(e,"activecampaign.browseSessions.testEvent",m(a,["connectionId"]),"completed"),o};var ia={};X(ia,{UNVERIFIED_ROUTES:()=>mp,countAtTimestamp:()=>Ep,countHistory:()=>fp,create:()=>gp,get:()=>Cp,getAtTimestamp:()=>kp,match:()=>Lp,matchAll:()=>Dp,matchAllResult:()=>Op,matchByExternalId:()=>hp,matchSomeResult:()=>wp,recentCounts:()=>bp,remove:()=>Ap,revertToTimestamp:()=>yp,update:()=>vp});import{logEventFromContext as W}from"corsair/core";var mp=new Set(["segmentsV2Create","segmentsV2Get","segmentsV2Update","segmentsV2Delete","segmentsV2GetAtTimestamp","segmentsV2RevertToTimestamp","segmentsV2RecentCounts","segmentsV2CountHistory","segmentsV2CountAtTimestamp","segmentsV2Match","segmentsV2MatchByExternalId","segmentsV2MatchAll","segmentsV2MatchAllResult","segmentsV2MatchSomeResult"]),H="segments",gp=async(e,a)=>{let o=await p(e),n=await r(H,e.key,o,{method:"POST",body:{segment:{name:a.name,...a.description!==void 0&&{description:a.description},...a.conditions!==void 0&&{conditions:a.conditions}}}});return await W(e,"activecampaign.segmentsV2.create",m(a,[]),"completed"),n},Cp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.get",m(a,["id"]),"completed"),n},vp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}`,e.key,o,{method:"PUT",body:{segment:{...a.name!==void 0&&{name:a.name},...a.description!==void 0&&{description:a.description},...a.conditions!==void 0&&{conditions:a.conditions}}}});return await W(e,"activecampaign.segmentsV2.update",m(a,["id"]),"completed"),n},Ap=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}`,e.key,o,{method:"DELETE"});return await W(e,"activecampaign.segmentsV2.delete",m(a,["id"]),"completed"),n},kp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}/${a.timestamp}`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.getAtTimestamp",m(a,["id","timestamp"]),"completed"),n},yp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}/${a.timestamp}`,e.key,o,{method:"PUT"});return await W(e,"activecampaign.segmentsV2.revertToTimestamp",m(a,["id","timestamp"]),"completed"),n},bp=async(e,a)=>{let o=await p(e),n=await r(`${H}/counts`,e.key,o,{method:"GET",query:L(a)});return await W(e,"activecampaign.segmentsV2.recentCounts",m(a,["limit","offset"]),"completed"),n},fp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}/counts`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.countHistory",m(a,["id"]),"completed"),n},Ep=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}/counts/${a.timestamp}`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.countAtTimestamp",m(a,["id","timestamp"]),"completed"),n},Lp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}/match/${a.contactId}`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.match",m(a,["id","contactId"]),"completed"),n},hp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}/match/external/${encodeURIComponent(a.externalId)}`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.matchByExternalId",{id:a.id,fields:["externalId"]},"completed"),n},Dp=async(e,a)=>{let o=await p(e),n=await r(`${H}/${a.id}/matchAll`,e.key,o,{method:"POST"});return await W(e,"activecampaign.segmentsV2.matchAll",m(a,["id"]),"completed"),n},Op=async(e,a)=>{let o=await p(e),n=await r(`${H}/matchAll/${a.runId}`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.matchAllResult",m(a,["runId"]),"completed"),n},wp=async(e,a)=>{let o=await p(e),n=await r(`${H}/matchSome/${a.runId}`,e.key,o,{method:"GET"});return await W(e,"activecampaign.segmentsV2.matchSomeResult",m(a,["runId"]),"completed"),n};var ca={};X(ca,{addToContact:()=>Up,create:()=>Tp,get:()=>xp,list:()=>Gp,listContactTags:()=>Fp,remove:()=>Ip,removeFromContact:()=>Rp,update:()=>Sp});import{logEventFromContext as Ct}from"corsair/core";var Gp=async(e,a)=>{let o=await p(e),n=await r("tags",e.key,o,{method:"GET",query:{...L(a),...j({"filters[search][contains]":a.search})}});return await V(e.db.tags,J,n.tags,"tag"),await Ct(e,"activecampaign.tags.list",G(a,["limit","offset"],n.tags?.length??0),"completed"),n},xp=async(e,a)=>{let o=await p(e),n=await r(`tags/${a.id}`,e.key,o,{method:"GET"});return await D(e.db.tags,J,n.tag,"tag"),await Ct(e,"activecampaign.tags.get",m(a,["id"]),"completed"),n},Tp=async(e,a)=>{let o=await p(e),n=await r("tags",e.key,o,{method:"POST",body:{tag:x({tag:a.tag,tagType:a.tagType,description:a.description})}});return await D(e.db.tags,J,n.tag,"tag"),await Ct(e,"activecampaign.tags.create",m(a,["tag","tagType"]),"completed"),n},Sp=async(e,a)=>{let o=await p(e),n=await r(`tags/${a.id}`,e.key,o,{method:"PUT",body:{tag:x({tag:a.tag,tagType:a.tagType,description:a.description})}});return await D(e.db.tags,J,n.tag,"tag"),await Ct(e,"activecampaign.tags.update",m(a,["id","tag","tagType"]),"completed"),n},Ip=async(e,a)=>{let o=await p(e);return await r(`tags/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.tags,a.id,"tag"),await Ie(e.db.contactTags,"tag",a.id,"contactTag"),await Ct(e,"activecampaign.tags.delete",m(a,["id"]),"completed"),{id:a.id}},Up=async(e,a)=>{let o=await p(e),n=await r("contactTags",e.key,o,{method:"POST",body:{contactTag:{contact:a.contact,tag:a.tag}}});return await D(e.db.contactTags,at,n.contactTag,"contactTag"),await Ct(e,"activecampaign.tags.addToContact",m(a,["contact","tag"]),"completed"),n},Rp=async(e,a)=>{let o=await p(e);return await r(`contactTags/${a.id}`,e.key,o,{method:"DELETE"}),await K(e.db.contactTags,a.id,"contactTag"),await Ct(e,"activecampaign.tags.removeFromContact",m(a,["id"]),"completed"),{id:a.id}},Fp=async(e,a)=>{let o=await p(e),n=await r("contactTags",e.key,o,{method:"GET",query:L(a)});return await V(e.db.contactTags,at,n.contactTags,"contactTag"),await Ct(e,"activecampaign.contactTags.list",G(a,["limit","offset"],n.contactTags?.length??0),"completed"),n};var O=qe,_=He,k=Ze,A=Je,vt=sa,d=na,$=ia,ut=ca,P=ta,Be=aa;import{z as t}from"zod";var E=t.object({total:t.union([t.string(),t.number()]).nullable().optional()}).loose().nullable().optional(),h={limit:t.number().int().min(1).max(100).optional(),offset:t.number().int().min(0).optional()},jp=t.object({...h,email:t.email().optional(),search:t.string().optional(),listid:t.string().optional(),tagid:t.string().optional(),segmentid:t.string().optional(),status:t.number().int().optional(),id_greater:t.string().optional(),orders_id:t.enum(["ASC","DESC"]).optional()}),Qa=t.object({contacts:t.array(Z),meta:E}).loose(),Mp=t.object({id:t.string(),automations:t.boolean().optional()}),_p=t.object({contact:Z,contactLists:t.unknown().optional(),fieldValues:t.unknown().optional(),geoIps:t.unknown().optional(),deals:t.unknown().optional(),accountContacts:t.unknown().optional()}).loose(),Bp=t.object({email:t.email()}),Vp=Qa,Pp=t.object({email:t.email(),firstName:t.string().optional(),lastName:t.string().optional(),phone:t.string().optional(),fieldValues:t.array(t.object({field:t.string(),value:t.string()})).optional()}),Za=t.object({contact:Z}).loose(),zp=t.object({id:t.string(),email:t.email().optional(),firstName:t.string().optional(),lastName:t.string().optional(),phone:t.string().optional(),fieldValues:t.array(t.object({field:t.string(),value:t.string()})).optional()}),Np=Za,$p=t.object({id:t.string()}),Kp=t.object({id:t.string()}).loose(),$t=t.object({id:t.string(),...h}),qp=$t,Ya=t.object({contactLists:t.array(et),meta:E}).loose(),Wp=$t,Xa=t.object({contactTags:t.array(at),meta:E}).loose(),Hp=$t,Qp=t.object({fieldValues:t.array(t.unknown()),meta:E}).loose(),Zp=$t,Yp=t.object({contactAutomations:t.array(t.unknown()),meta:E}).loose(),Xp=$t,Jp=t.object({geoIps:t.array(t.unknown()),meta:E}).loose(),td=$t,ed=t.object({scoreValues:t.array(t.unknown()),meta:E}).loose(),ad=$t,sd=t.object({deals:t.array(t.unknown()),meta:E}).loose(),od=t.object({...h,name:t.string().optional()}),nd=t.object({lists:t.array(ct),meta:E}).loose(),id=t.object({id:t.string()}),Ja=t.object({list:ct}).loose(),cd=t.object({name:t.string().min(1),stringid:t.string().min(1),sender_url:t.string().min(1),sender_reminder:t.string().min(1),send_last_broadcast:t.boolean().optional(),carboncopy:t.string().optional(),subscription_notify:t.string().optional(),unsubscription_notify:t.string().optional(),user:t.string().optional()}),rd=Ja,pd=t.object({id:t.string()}),dd=t.object({id:t.string()}).loose(),ud=t.object({...h}),ld=Ya,md=t.object({list:t.string(),contact:t.string(),status:t.union([t.literal(1),t.literal(2)])}),gd=t.object({contactList:et}).loose(),Cd=t.object({...h,search:t.string().optional()}),vd=t.object({tags:t.array(J),meta:E}).loose(),Ad=t.object({id:t.string()}),ra=t.object({tag:J}).loose(),kd=t.object({tag:t.string().min(1),tagType:t.enum(["contact","template"]),description:t.string().optional()}),yd=ra,bd=t.object({id:t.string(),tag:t.string().min(1).optional(),tagType:t.enum(["contact","template"]).optional(),description:t.string().optional()}),fd=ra,Ed=t.object({id:t.string()}),Ld=t.object({id:t.string()}).loose(),hd=t.object({contact:t.string(),tag:t.string()}),Dd=t.object({contactTag:at}).loose(),Od=t.object({id:t.string()}),wd=t.object({id:t.string()}).loose(),Gd=t.object({...h}),xd=Xa,Td=t.object({...h}),Sd=t.object({fields:t.array(tt),meta:E}).loose(),Id=t.object({id:t.string()}),pa=t.object({field:tt}).loose(),ts=t.enum(["text","textarea","date","multiselect","number","datetime","dropdown","listbox","radio","checkbox","hidden"]),Ud=t.object({title:t.string().min(1),type:ts,descript:t.string().optional(),perstag:t.string().optional(),defval:t.string().optional(),isrequired:t.boolean().optional(),visible:t.boolean().optional(),ordernum:t.number().int().optional()}),Rd=pa,Fd=t.object({id:t.string(),title:t.string().min(1).optional(),type:ts.optional(),descript:t.string().optional(),perstag:t.string().optional(),defval:t.string().optional(),isrequired:t.boolean().optional(),visible:t.boolean().optional(),ordernum:t.number().int().optional()}),jd=pa,Md=t.object({id:t.string()}),_d=t.object({id:t.string()}).loose(),Bd=t.object({options:t.array(t.object({field:t.string(),label:t.string().min(1),value:t.string(),orderid:t.number().int().optional(),isdefault:t.boolean().optional()})).min(1)}),Vd=t.object({fieldOptions:t.array(qt)}).loose(),Pd=t.object({...h}),zd=t.object({fieldValues:t.array(st),meta:E}).loose(),Nd=t.object({id:t.string()}),da=t.object({fieldValue:st}).loose(),$d=t.object({contact:t.string(),field:t.string(),value:t.string(),useDefaults:t.boolean().optional()}),Kd=da,qd=t.object({id:t.string(),value:t.string(),useDefaults:t.boolean().optional()}),Wd=da,Hd=t.object({id:t.string()}),Qd=t.object({id:t.string()}).loose(),Zd=t.object({...h}),Yd=t.object({fieldRels:t.array(lt),meta:E}).loose(),Xd=t.object({field:t.string(),relid:t.string()}),Jd=t.object({fieldRel:lt}).loose(),tu=t.object({id:t.string()}),eu=t.object({id:t.string()}).loose(),au=t.object({...h}),su=t.object({groupMembers:t.array(rt),meta:E}).loose(),ou=t.object({rel_id:t.string(),group_id:t.string(),ordernum:t.number().int().optional()}),es=t.object({groupMember:rt}).loose(),nu=t.object({id:t.string(),rel_id:t.string().optional(),group_id:t.string().optional(),ordernum:t.number().int().optional()}),iu=es,cu=t.object({id:t.string()}),ru=t.object({id:t.string()}).loose(),De=t.object({id:t.string(),...h}),pu=De,du=t.object({contactLogs:t.array(t.unknown()),meta:E}).loose(),uu=De,lu=t.object({trackingLogs:t.array(t.unknown()),meta:E}).loose(),mu=De,gu=t.object({contactGoals:t.array(t.unknown()),meta:E}).loose(),Cu=De,vu=t.object({accountContacts:t.array(t.unknown()),meta:E}).loose(),Au=De,ku=t.object({notes:t.array(t.unknown()),meta:E}).loose(),yu=t.object({id:t.string()}),bu=t.object({contactDatum:t.unknown().optional()}).loose(),fu=t.object({id:t.string()}),Eu=t.object({organization:t.unknown().optional()}).loose(),Lu=t.object({id:t.string()}),hu=t.object({plusAppend:t.unknown().optional()}).loose(),Du=t.object({...h,contact:t.string().optional(),after:t.string().optional()}),Ou=t.object({activities:t.array(t.unknown()),meta:E}).loose(),wu=t.object({contacts:t.array(t.object({email:t.email(),first_name:t.string().optional(),last_name:t.string().optional(),phone:t.string().optional(),customer_acct_name:t.string().optional(),tags:t.array(t.string()).optional(),fields:t.array(t.object({id:t.number().int(),value:t.string()})).optional(),subscribe:t.array(t.object({listid:t.number().int()})).optional(),unsubscribe:t.array(t.object({listid:t.number().int()})).optional()})).min(1).max(250),exclude_automations:t.boolean().optional(),callback:t.object({url:t.url(),requestType:t.enum(["GET","POST","PUT","PATCH"]).optional(),detailed_results:t.union([t.boolean(),t.enum(["true","false"])]).optional(),params:t.record(t.string(),t.unknown()).optional(),headers:t.record(t.string(),t.string()).optional()}).optional()}),Gu=t.object({Success:t.union([t.string(),t.number()]).nullable().optional(),success:t.union([t.string(),t.number(),t.boolean()]).nullable().optional(),batchId:t.string().nullable().optional(),queued_contacts:t.number().nullable().optional(),queuedContacts:t.number().nullable().optional(),message:t.string().nullable().optional()}).loose(),xu=t.object({}),Tu=t.object({outstanding:t.array(t.unknown()).optional(),recentlyCompleted:t.array(t.unknown()).optional()}).loose(),Su=t.object({batchId:t.string()}),Iu=t.object({status:t.unknown().optional(),success:t.unknown().optional(),failure:t.unknown().optional()}).loose(),Uu=t.object({listid:t.string(),groupid:t.string()}),Ru=t.object({listGroup:Wt}).loose();function S(e,a){return t.object({[e]:t.array(a),meta:E}).loose()}function I(e,a){return t.object({[e]:a}).loose()}var g=t.object({id:t.string()}),T=t.object({id:t.string()}).loose(),M=t.object({...h}),Wa=t.object({...h,search:t.string().optional(),search_field:t.enum(["all","title","contact","org"]).optional(),title:t.string().optional(),stage:t.string().optional(),group:t.string().optional(),status:t.union([t.literal(0),t.literal(1),t.literal(2)]).optional(),owner:t.string().optional(),nextdate_range:t.enum(["upcoming","scheduled","overdue","no-task"]).optional(),tag:t.string().optional(),tasktype:t.string().optional(),created_before:t.string().optional(),created_after:t.string().optional(),updated_before:t.string().optional(),updated_after:t.string().optional(),organization:t.string().optional(),minimum_value:t.number().optional(),maximum_value:t.number().optional(),score_greater_than:t.number().optional(),score_less_than:t.number().optional(),score:t.number().optional(),order_id:t.enum(["ASC","DESC"]).optional(),order_title:t.enum(["ASC","DESC"]).optional(),order_value:t.enum(["ASC","DESC"]).optional(),order_created:t.enum(["ASC","DESC"]).optional(),order_updated:t.enum(["ASC","DESC"]).optional(),order_contact_name:t.enum(["ASC","DESC"]).optional(),order_contact_orgname:t.enum(["ASC","DESC"]).optional(),order_next_action:t.enum(["ASC","DESC"]).optional()}),Ha=S("deals",yt),Fu=g,as=I("deal",yt),ju=t.object({id:t.string(),title:t.string().optional(),description:t.string().optional(),value:t.number().int().optional(),currency:t.string().optional(),group:t.string().optional(),stage:t.string().optional(),owner:t.string().optional(),contact:t.string().optional(),organization:t.string().optional(),status:t.number().int().optional(),percent:t.number().int().optional(),fields:t.array(t.object({customFieldId:t.number().int(),fieldValue:t.union([t.string(),t.number(),t.array(t.string())])})).optional()}),Mu=as,_u=g,Bu=T,Vu=t.object({deals:t.array(t.object({id:t.number().int(),ownerId:t.number().int()})).min(1)}),Pu=t.object({}).loose(),zu=t.object({...h,title:t.string().optional()}),Nu=S("dealGroups",bt),$u=g,ua=I("dealGroup",bt),ss=t.object({title:t.string().min(1),currency:t.string().optional(),allgroups:t.union([t.literal(0),t.literal(1)]).optional(),allusers:t.union([t.literal(0),t.literal(1)]).optional(),autoassign:t.union([t.literal(0),t.literal(1)]).optional(),users:t.array(t.union([t.string(),t.number().int()])).optional(),groups:t.array(t.union([t.string(),t.number().int()])).optional()}),Ku=ua,qu=ss.partial().extend({id:t.string()}),Wu=ua,Hu=g,Qu=T,Zu=t.object({...h,title:t.string().optional(),group:t.string().optional()}),Yu=S("dealStages",ft),Xu=g,la=I("dealStage",ft),os=t.object({title:t.string().min(1),group:t.string(),order:t.number().int().optional(),width:t.number().int().optional(),color:t.string().optional(),cardRegion1:t.string().optional()}),Ju=la,tl=os.partial().extend({id:t.string()}),el=la,al=g,sl=T,ol=t.object({id:t.string(),stage:t.string()}),nl=t.object({}).loose(),il=t.object({id:t.string(),action_type:t.enum(["Move","Delete"]),new_pipeline_id:t.string().optional(),new_stage_id:t.string().optional()}).refine(e=>e.action_type!=="Move"||e.new_pipeline_id!==void 0&&e.new_stage_id!==void 0,{message:"action_type 'Move' requires both new_pipeline_id and new_stage_id",path:["new_stage_id"]}),cl=T,rl=t.object({...h,title:t.string().optional(),reltype:t.string().optional(),relid:t.string().optional(),status:t.number().int().optional(),note:t.string().optional(),duedate:t.string().optional(),dealTasktype:t.string().optional(),userid:t.string().optional(),due_after:t.string().optional(),due_before:t.string().optional(),duedate_range:t.string().optional(),assignee_userid:t.string().optional(),outcome_id:t.string().optional()}),pl=S("dealTasks",pt),dl=g,ma=I("dealTask",pt),ns=t.object({title:t.string().nullable().optional(),relid:t.string(),reltype:t.enum(["Deal","Subscriber","Account"]),dealTasktype:t.string(),ownerType:t.string().optional(),status:t.number().int().optional(),note:t.string().optional(),duedate:t.string(),edate:t.string().optional(),assignee:t.string().optional(),triggerAutomationOnCreate:t.boolean().optional(),doneAutomation:t.boolean().optional(),outcomeId:t.string().optional(),outcomeInfo:t.string().optional()}),ul=ma,ll=ns.partial().extend({id:t.string()}),ml=ma,gl=g,Cl=T,vl=M,Al=S("dealTasktypes",Et),kl=g,ga=I("dealTasktype",Et),is=t.object({title:t.string().min(1),defduration:t.string().optional(),status:t.number().int().optional(),display_order:t.number().int().optional(),outcomes:t.array(t.string()).optional()}),yl=ga,bl=is.partial().extend({id:t.string()}),fl=ga,El=M,Ll=S("taskOutcomes",ht),hl=g,cs=I("taskOutcome",ht),Dl=t.object({title:t.string().min(1),sentiment:t.enum(["positive","neutral","negative"]).optional(),status:t.number().int().optional(),dealTasktypes:t.array(t.string()).optional()}),Ol=cs,wl=M,Gl=S("dealRoles",Lt),xl=t.object({title:t.string().min(1)}),Tl=I("dealRole",Lt),Sl=g,Il=T,Ul=t.object({...h}),Rl=t.object({contactDeals:t.array(t.unknown()),meta:E}).loose(),Fl=g,Ca=t.object({contactDeal:t.unknown()}).loose(),rs=t.object({contact:t.string(),deal:t.string(),role:t.string().optional(),jobTitle:t.string().optional()}),jl=Ca,Ml=rs.partial().extend({id:t.string()}),_l=Ca,Bl=g,Vl=T,Pl=M,zl=S("dealCustomFieldMeta",mt),Nl=g,va=I("dealCustomFieldMetum",mt),ps=t.object({fieldLabel:t.string().min(1),fieldType:t.enum(["text","textarea","date","dropdown","multiselect","radio","checkbox","hidden","number","currency","datetime"]),fieldOptions:t.array(t.string()).optional(),fieldDefault:t.union([t.string(),t.number(),t.array(t.string())]).optional(),fieldDefaultCurrency:t.string().optional(),isFormVisible:t.number().int().optional(),isRequired:t.number().int().optional(),displayOrder:t.number().int().optional()}),$l=va,Kl=ps.partial().extend({id:t.string()}),ql=va,Wl=g,Hl=T,Ql=t.object({...h,dealId:t.string().optional()}),Zl=t.object({dealCustomFieldData:t.array(t.unknown()),meta:E}).loose(),Yl=g,ds=t.object({dealCustomFieldDatum:t.unknown()}).loose(),Xl=t.object({id:t.string(),dealId:t.number().int().optional(),customFieldId:t.number().int().optional(),fieldValue:t.union([t.string(),t.number(),t.array(t.string())]),fieldCurrency:t.string().optional()}),Jl=ds,tm=g,em=T,am=t.object({...h,deal:t.string().optional(),exclude:t.string().optional(),data_type:t.string().optional(),data_id:t.string().optional()}),sm=t.object({dealActivities:t.array(t.unknown()),meta:E}).loose(),om=t.object({...h,search:t.string().optional()}),nm=S("accounts",gt),im=g,Ve=I("account",gt),Aa=t.object({name:t.string().min(1),accountUrl:t.string().optional(),owner:t.string().optional(),fields:t.array(t.object({customFieldId:t.number().int(),fieldValue:t.string()})).optional()}),cm=Ve,rm=Aa.partial().extend({id:t.string()}),pm=Ve,dm=g,um=T,lm=Aa,mm=Ve,gm=t.object({ids:t.array(t.union([t.string(),t.number().int()])).min(1)}),Cm=t.object({ids:t.array(t.union([t.string(),t.number().int()]))}).loose(),vm=t.object({...h,contact:t.string().optional(),account:t.string().optional()}),Am=S("accountContacts",Ot),km=g,ka=I("accountContact",Ot),us=t.object({contact:t.string(),account:t.string(),jobTitle:t.string().optional()}),ym=ka,bm=us.partial().extend({id:t.string()}),fm=ka,Em=g,Lm=T,hm=M,Dm=S("accountCustomFieldMeta",Dt),Om=g,ya=I("accountCustomFieldMetum",Dt),ls=t.object({fieldLabel:t.string().min(1),fieldType:t.string(),fieldOptions:t.array(t.string()).optional(),fieldDefault:t.string().optional(),fieldDefaultCurrency:t.string().optional(),isFormVisible:t.number().int().optional(),isRequired:t.number().int().optional(),displayOrder:t.number().int().optional()}),wm=ya,Gm=ls.partial().extend({id:t.string()}),xm=ya,Tm=g,Sm=T,Im=t.object({...h,accountId:t.string().optional()}),Um=t.object({accountCustomFieldData:t.array(t.unknown()),meta:E}).loose(),Rm=g,ba=t.object({accountCustomFieldDatum:t.unknown()}).loose(),Fm=t.object({accountId:t.number().int(),customFieldId:t.number().int(),fieldValue:t.string()}),jm=ba,Mm=t.object({id:t.string(),fieldValue:t.string()}),_m=ba,Bm=g,Vm=T,ms=t.object({accountId:t.number().int(),customFieldId:t.number().int(),fieldValue:t.string()}),Pm=t.object({items:t.array(ms).min(1)}),zm=t.object({}).loose(),Nm=t.object({items:t.array(ms.partial().extend({id:t.number().int()})).min(1)}),$m=t.object({}).loose(),Km=t.object({...h,reltype:t.string().optional(),relid:t.string().optional()}),qm=S("notes",dt),Wm=g,At=I("note",dt),Hm=t.object({note:t.string().min(1),reltype:t.enum(["Subscriber","Deal","Account"]),relid:t.string()}),Qm=At,fa=t.object({id:t.string(),note:t.string().min(1)}),Zm=At,Ym=g,Xm=T,Jm=t.object({email:t.email(),note:t.string().min(1)}),tg=At,eg=t.object({...h,type:t.string().optional(),status:t.string().optional()}),ag=S("campaigns",wt),sg=g,Pe=I("campaign",wt),og=t.object({type:t.string(),name:t.string().min(1),status:t.number().int().optional(),sdate:t.string().optional(),segmentid:t.number().int().optional(),p:t.record(t.string(),t.unknown()).optional(),m:t.record(t.string(),t.unknown()).optional()}),ng=Pe,ig=t.object({id:t.string(),name:t.string().min(1).optional(),status:t.number().int().optional()}),cg=Pe,rg=g,pg=Pe,Oe=t.object({id:t.string(),...h}),dg=Oe,ug=t.object({links:t.array(t.unknown()),meta:E}).loose(),lg=Oe,mg=t.object({campaignMessages:t.array(t.unknown()),meta:E}).loose(),gg=Oe,Cg=t.object({automations:t.array(t.unknown()),meta:E}).loose(),vg=Oe,Ag=t.object({campaignLists:t.array(t.unknown()),meta:E}).loose(),kg=Oe,yg=t.object({user:t.unknown()}).loose(),bg=M,fg=S("messages",Gt),Eg=g,Ea=I("message",Gt),gs=t.object({subject:t.string().min(1),fromname:t.string().min(1),fromemail:t.email(),reply2:t.email(),html:t.string().optional(),text:t.string().optional(),name:t.string().optional(),format:t.enum(["html","text","mime"]).optional(),user:t.string().optional(),preheader_text:t.string().optional()}),Lg=Ea,hg=gs.partial().extend({id:t.string()}),Dg=Ea,Og=g,wg=T,Gg=M,xg=S("savedResponses",xt),Tg=g,La=I("savedResponse",xt),Cs=t.object({title:t.string().min(1),subject:t.string().min(1),body:t.string().min(1),userid:t.string().optional()}),Sg=La,Ig=Cs.partial().extend({id:t.string()}),Ug=La,Rg=g,Fg=T,jg=M,Mg=S("forms",Tt),_g=g,Bg=I("form",Tt),Vg=g,Pg=T,zg=t.object({formid:t.string(),email:t.email(),firstName:t.string().optional(),lastName:t.string().optional()}),Ng=t.object({}).loose(),$g=M,Kg=S("personalizations",St),qg=g,we=I("personalization",St),vs=t.object({name:t.string().min(1),tag:t.string().min(1),content:t.string(),format:t.string().optional(),lists:t.array(t.string()).optional()}),Wg=we,Hg=vs.partial().extend({id:t.string()}),Qg=we,Zg=g,Yg=T,Xg=t.object({ids:t.array(t.union([t.string(),t.number().int()])).min(1)}),Jg=t.object({ids:t.array(t.union([t.string(),t.number().int()]))}).loose(),tC=g,eC=we,aC=g,sC=we,oC=g,nC=I("template",Ht),iC=g,cC=t.object({}).loose(),rC=M,pC=S("automations",Qt),dC=M,uC=t.object({contactAutomations:t.array(t.unknown()),meta:E}).loose(),lC=g,As=t.object({contactAutomation:t.unknown()}).loose(),mC=g,gC=t.object({}).loose(),CC=t.object({email:t.email(),automation_id:t.string()}),vC=As,AC=t.object({email:t.email(),automation_id:t.string(),run_remove_option:t.enum(["all","last"]).optional()}),kC=t.object({removed:t.number()}).loose(),yC=M,ks=S("segments",It),bC=g,ha=I("segment",It),ys=t.object({name:t.string().min(1),logic:t.string().optional()}),fC=ha,EC=ys.partial().extend({id:t.string()}),LC=ha,hC=g,DC=T,OC=t.object({...h,name:t.string().optional()}),wC=ks,GC=t.object({...h,service:t.string().optional(),externalid:t.string().optional()}),xC=GC,TC=S("connections",Ut),SC=g,Da=I("connection",Ut),bs=t.object({service:t.string().min(1),externalid:t.string().min(1),name:t.string().min(1),logoUrl:t.url().optional(),linkUrl:t.url().optional()}),IC=Da,UC=bs.partial().extend({id:t.string()}),RC=Da,FC=g,jC=T,MC=t.object({...h,connectionid:t.string().optional(),externalid:t.string().optional()}),_C=S("ecomCustomers",Rt),BC=g,Oa=I("ecomCustomer",Rt),fs=t.object({connectionid:t.string(),externalid:t.string(),email:t.email(),acceptsMarketing:t.string().optional()}),VC=Oa,PC=fs.partial().extend({id:t.string()}),zC=Oa,NC=g,$C=T,KC=t.object({...h,connectionid:t.string().optional(),customerid:t.string().optional()}),qC=t.object({ecomOrders:t.array(t.unknown()),meta:E}).loose(),WC=g,ze=t.object({ecomOrder:t.unknown()}).loose(),wa=t.object({externalid:t.string(),source:t.number().int(),email:t.email(),orderProducts:t.array(t.record(t.string(),t.unknown())),orderDiscounts:t.array(t.record(t.string(),t.unknown())).optional(),totalPrice:t.number().int(),shippingAmount:t.number().int().optional(),taxAmount:t.number().int().optional(),discountAmount:t.number().int().optional(),currency:t.string(),orderDate:t.string(),externalUpdatedDate:t.string().optional(),abandonedDate:t.string().optional(),externalcheckoutid:t.string().optional(),connectionid:t.string(),customerid:t.string(),orderNumber:t.string().optional(),shippingMethod:t.string().optional()}),HC=ze,QC=wa.partial().extend({id:t.string()}),ZC=ze,YC=g,XC=T,JC=M,Es=t.object({ecomOrderProducts:t.array(t.unknown()),meta:E}).loose(),tv=g,ev=t.object({ecomOrderProduct:t.unknown()}).loose(),av=M,sv=S("schemas",Bt),ov=g,Ne=I("schema",Bt),Ls=t.object({slug:t.string().min(1),name:t.string().min(1),description:t.string().optional(),labels:t.record(t.string(),t.unknown()).optional(),fields:t.array(t.record(t.string(),t.unknown())).optional(),relationships:t.array(t.record(t.string(),t.unknown())).optional()}),nv=Ne,iv=Ls.partial().extend({id:t.string()}),cv=Ne,rv=g,pv=T,dv=t.object({schemaId:t.string(),...h}),uv=t.object({records:t.array(t.unknown()),meta:E}).loose(),lv=t.object({schemaId:t.string(),externalId:t.string().optional(),fields:t.array(t.record(t.string(),t.unknown()))}),Ga=t.object({record:t.unknown()}).loose(),hs=t.object({schemaId:t.string(),id:t.string()}),mv=Ga,Ds=t.object({schemaId:t.string(),externalId:t.string()}),gv=Ga,Cv=hs,vv=t.object({schemaId:t.string(),id:t.string().optional()}).loose(),Av=Ds,kv=t.object({schemaId:t.string(),externalId:t.string().optional()}).loose(),yv=M,bv=S("webhooks",Vt),fv=g,xa=I("webhook",Vt),Os=t.object({name:t.string().min(1),url:t.url(),events:t.array(t.string()).min(1),sources:t.array(t.enum(["public","admin","api","system"])).min(1),listid:t.string().optional()}),Ev=xa,Lv=Os.partial().extend({id:t.string()}),hv=xa,Dv=g,Ov=T,wv=M,Gv=S("users",Ft),xv=g,Ge=I("user",Ft),ws=t.object({username:t.string().min(1),email:t.email(),firstName:t.string().min(1),lastName:t.string().min(1),password:t.string().min(1),group:t.string(),phone:t.string().optional(),signature:t.string().optional(),lang:t.string().optional(),localZoneid:t.string().optional()}),Tv=Ge,Sv=ws.partial().extend({id:t.string()}),Iv=Ge,Uv=g,Rv=T,Fv=t.object({}),jv=Ge,Mv=t.object({username:t.string().min(1)}),_v=Ge,Bv=M,Vv=S("groups",jt),Pv=g,Ta=I("group",jt),Gs=t.object({title:t.string().min(1),descript:t.string().optional()}),zv=Ta,Nv=Gs.partial().extend({id:t.string()}),$v=Ta,Kv=g,qv=T,Wv=M,Hv=S("groupLimits",xe),Qv=M,Zv=S("addresses",Mt),Yv=g,Sa=I("address",Mt),xs=t.object({companyName:t.string().min(1),address1:t.string().min(1),address2:t.string().optional(),city:t.string().min(1),state:t.string().optional(),zip:t.string().optional(),country:t.string().min(2),allgroups:t.boolean().optional(),groupid:t.string().optional()}),Xv=Sa,Jv=xs.partial().extend({id:t.string()}),tA=Sa,eA=g,aA=T,sA=M,oA=S("calendars",_t),nA=g,Ia=I("calendar",_t),Ts=t.object({title:t.string().min(1),type:t.string().optional(),description:t.string().optional(),isglobal:t.boolean().optional(),inviteusers:t.array(t.string()).optional()}),iA=Ia,cA=Ts.partial().extend({id:t.string()}),rA=Ia,pA=g,dA=T,uA=M,lA=S("eventTrackingEvents",Pt),mA=t.object({name:t.string().min(1)}),gA=I("eventTrackingEvent",Pt),CA=g,vA=T,$e=t.object({enabled:t.boolean()}),AA=t.object({}),Ss=t.object({siteTracking:$e.loose()}).loose(),kA=t.object({}),Is=t.object({eventTracking:$e.loose()}).loose(),yA=$e,bA=Ss,fA=$e,EA=Is,LA=t.object({actid:t.string(),key:t.string(),event:t.string().min(1),email:t.email(),eventdata:t.string().optional()}),hA=t.object({}).loose(),DA=M,OA=t.object({siteTrackingWhitelist:t.array(t.unknown()).optional(),meta:E}).loose(),wA=t.object({name:t.string().min(1)}),GA=t.object({}).loose(),xA=g,TA=T,SA=M,IA=S("scores",Te),UA=t.object({...h,subscriberid:t.string().optional(),dealId:t.string().optional()}),RA=t.object({emailActivities:t.array(t.unknown()),meta:E}).loose(),FA=g,Us=I("branding",Se),jA=t.object({id:t.string(),siteName:t.string().optional(),siteLogo:t.string().optional(),favicon:t.string().optional(),copyright:t.string().optional()}),MA=Us,_A=t.object({id:t.string(),value:t.string()}),BA=t.object({config:t.unknown()}).loose(),Rs=t.object({filter:t.record(t.string(),t.unknown()).optional(),limit:t.number().int().min(1).max(100).optional(),offset:t.number().int().min(0).optional()}),VA=t.object({products:t.array(t.unknown()).optional()}).loose(),PA=g,zA=t.object({product:t.unknown().optional()}).loose(),Fs=t.object({legacyConnectionId:t.string(),name:t.string().min(1),sku:t.string().optional(),price:t.number().optional(),currency:t.string().optional(),description:t.string().optional(),imageUrl:t.url().optional(),productUrl:t.url().optional(),isVariant:t.boolean().optional()}),NA=t.object({createProduct:t.unknown().optional()}).loose(),$A=Fs.partial().extend({id:t.string()}),KA=t.object({updateProduct:t.unknown().optional()}).loose(),qA=g,WA=t.object({deleteProduct:t.unknown().optional()}).loose(),HA=t.object({products:t.array(t.record(t.string(),t.unknown())).min(1)}),QA=t.object({}).loose(),js=t.object({orders:t.array(t.record(t.string(),t.unknown())).min(1)}),ZA=t.object({}).loose(),YA=js,XA=t.object({}).loose(),JA=Rs,tk=t.object({recurringPayments:t.array(t.unknown()).optional()}).loose(),ek=t.object({recurringPayments:t.array(t.record(t.string(),t.unknown())).min(1)}),ak=t.object({}).loose(),sk=t.object({connectionId:t.string(),email:t.email().optional(),status:t.string().optional()}),ok=t.object({browseSessions:t.array(t.unknown()).optional()}).loose(),nk=t.object({connectionId:t.string(),email:t.email(),status:t.string(),products:t.array(t.record(t.string(),t.unknown())).optional()}),ik=t.object({}).loose(),ck=t.object({connectionId:t.string(),email:t.email()}),rk=t.object({}).loose(),pk=t.object({...h,name:t.string().optional(),status:t.string().optional()}),dk=t.object({broadcasts:t.array(t.unknown()).optional(),meta:E}).loose(),uk=t.object({broadcastIds:t.array(t.string()).optional()}),lk=t.object({}).loose(),mk=t.object({}),gk=t.object({snapshot:t.unknown().optional()}).loose(),Ck=t.object({broadcastIds:t.array(t.string()).min(1)}),vk=t.object({}).loose(),Ak=t.object({broadcastId:t.string(),startDate:t.string().optional(),endDate:t.string().optional()}),kk=t.object({}).loose(),yk=t.object({id:t.string(),...h}),bk=t.object({}).loose(),fk=t.object({}),Ek=t.object({smsCredits:t.unknown().optional()}).loose(),Lk=t.object({}),hk=t.object({}).loose(),Dk=t.object({...h,name:t.string().optional()}),Ok=t.object({lists:t.array(t.unknown()).optional(),meta:E}).loose(),wk=g,Gk=T,xk=t.object({connectionId:t.string(),storeOrderId:t.string()}),Tk=t.object({ecomOrder:t.unknown().nullable()}).loose(),Sk=wa,Ik=ze,Uk=t.object({orderId:t.string(),...h}),Rk=Es,Ms=t.object({id:t.string(),note:t.string().min(1)}),Fk=Ms,jk=At,Mk=Ms,_k=At,Bk=fa,Vk=At,Pk=fa,zk=At,Nk=t.object({contactId:t.string(),title:t.string().min(1),taskTypeId:t.string(),dueDate:t.string(),note:t.string().optional(),assignee:t.string().optional()}),$k=t.object({dealTask:pt}).loose(),Kk=t.object({title:t.string().min(1),contactId:t.string().optional()}),qk=t.object({dealTasks:t.array(t.unknown())}).loose(),kt=t.string().min(1),_s=t.object({name:t.string().min(1),description:t.string().optional(),conditions:t.array(t.record(t.string(),t.unknown())).optional()}),Xt=t.object({segment:t.unknown()}).loose(),Wk=t.object({id:kt}),Hk=Xt,Qk=_s.partial().extend({id:kt}),Zk=Xt,Yk=t.object({id:kt}),Xk=Xt,Ua=t.object({id:kt,timestamp:t.string().min(1)}),Jk=Xt,ty=Ua,ey=Xt,ay=M,Ra=t.object({segmentCounts:t.array(t.unknown()).optional(),meta:E}).loose(),sy=t.object({id:kt}),oy=Ra,ny=Ua,iy=Ra,cy=t.object({id:kt,contactId:t.string()}),ry=t.object({}).loose(),py=t.object({id:kt,externalId:t.string().min(1)}),dy=t.object({}).loose(),uy=t.object({id:kt}),Fa=t.object({is_ready:t.boolean().optional(),run_id:t.unknown().optional()}).loose(),Bs=t.object({runId:t.string()}),ly=Fa,my=Bs,gy=Fa,Cy=t.object({dealTask:t.string(),interval:t.number().int().min(1)}),vy=t.object({taskNotification:t.unknown()}).loose(),Ay=t.object({parentId:t.string(),applicationId:t.string(),slug:t.string().min(1),name:t.string().min(1),description:t.string().optional()}),ky=Ne,yy=t.object({}),by=t.object({}).loose(),fy=t.object({connectionId:t.string(),url:t.url(),email:t.email().optional()}),Ey=t.object({}).loose(),Vs={contactsList:jp,contactsGet:Mp,contactsFind:Bp,contactsCreateOrUpdate:Pp,contactsUpdate:zp,contactsDelete:$p,contactsGetLists:qp,contactsGetTags:Wp,contactsGetFieldValues:Hp,contactsGetAutomations:Zp,contactsGetGeoIps:Xp,contactsGetScoreValues:td,contactsGetDeals:ad,listsList:od,listsGet:id,listsCreate:cd,listsDelete:pd,listsUpdateSubscription:md,contactListsList:ud,tagsList:Cd,tagsGet:Ad,tagsCreate:kd,tagsUpdate:bd,tagsDelete:Ed,tagsAddToContact:hd,tagsRemoveFromContact:Od,contactTagsList:Gd,fieldsList:Td,fieldsGet:Id,fieldsCreate:Ud,fieldsUpdate:Fd,fieldsDelete:Md,fieldOptionsCreateBulk:Bd,fieldValuesList:Pd,fieldValuesGet:Nd,fieldValuesSetForContact:$d,fieldValuesUpdate:qd,fieldValuesDelete:Hd,fieldRelsList:Zd,fieldRelsCreate:Xd,fieldRelsDelete:tu,groupMembersList:au,groupMembersCreate:ou,groupMembersUpdate:nu,groupMembersDelete:cu,contactsGetLogs:pu,contactsGetTrackingLogs:uu,contactsGetGoals:mu,contactsGetAccountContacts:Cu,contactsGetNotes:Au,contactsGetData:yu,contactsGetOrganization:fu,contactsGetPlusAppend:Lu,activitiesList:Du,importsCreateBulk:wu,importsList:xu,importsGetStatus:Su,listGroupsCreate:Uu,dealsList:Wa,dealsListFiltered:Wa,dealsGet:Fu,dealsUpdate:ju,dealsDelete:_u,dealsUpdateOwnersBulk:Vu,dealGroupsList:zu,dealGroupsGet:$u,dealGroupsCreate:ss,dealGroupsUpdate:qu,dealGroupsDelete:Hu,dealStagesList:Zu,dealStagesGet:Xu,dealStagesCreate:os,dealStagesUpdate:tl,dealStagesDelete:al,dealStagesMoveDeals:ol,dealStagesDeleteWithDeals:il,dealTasksList:rl,dealTasksGet:dl,dealTasksCreate:ns,dealTasksUpdate:ll,dealTasksDelete:gl,dealTaskTypesList:vl,dealTaskTypesGet:kl,dealTaskTypesCreate:is,dealTaskTypesUpdate:bl,taskOutcomesList:El,taskOutcomesGet:hl,taskOutcomesCreate:Dl,dealRolesList:wl,dealRolesCreate:xl,dealRolesDelete:Sl,contactDealsList:Ul,contactDealsGet:Fl,contactDealsCreate:rs,contactDealsUpdate:Ml,contactDealsDelete:Bl,dealCustomFieldMetaList:Pl,dealCustomFieldMetaGet:Nl,dealCustomFieldMetaCreate:ps,dealCustomFieldMetaUpdate:Kl,dealCustomFieldMetaDelete:Wl,dealCustomFieldDataList:Ql,dealCustomFieldDataGet:Yl,dealCustomFieldDataUpdate:Xl,dealCustomFieldDataDelete:tm,dealActivitiesList:am,accountsList:om,accountsGet:im,accountsCreate:Aa,accountsUpdate:rm,accountsDelete:dm,accountsUpsert:lm,accountsDeleteBulk:gm,accountContactsList:vm,accountContactsGet:km,accountContactsCreate:us,accountContactsUpdate:bm,accountContactsDelete:Em,accountCustomFieldMetaList:hm,accountCustomFieldMetaGet:Om,accountCustomFieldMetaCreate:ls,accountCustomFieldMetaUpdate:Gm,accountCustomFieldMetaDelete:Tm,accountCustomFieldDataList:Im,accountCustomFieldDataGet:Rm,accountCustomFieldDataCreate:Fm,accountCustomFieldDataUpdate:Mm,accountCustomFieldDataDelete:Bm,accountCustomFieldDataCreateBulk:Pm,accountCustomFieldDataUpdateBulk:Nm,notesList:Km,notesGet:Wm,notesCreate:Hm,notesUpdate:fa,notesDelete:Ym,notesAddToContact:Jm,campaignsList:eg,campaignsGet:sg,campaignsCreate:og,campaignsUpdate:ig,campaignsDuplicate:rg,campaignsGetLinks:dg,campaignsGetMessages:lg,campaignsGetAutomations:gg,campaignsGetAutomationLists:vg,campaignsGetUser:kg,messagesList:bg,messagesGet:Eg,messagesCreate:gs,messagesUpdate:hg,messagesDelete:Og,savedResponsesList:Gg,savedResponsesGet:Tg,savedResponsesCreate:Cs,savedResponsesUpdate:Ig,savedResponsesDelete:Rg,formsList:jg,formsGet:_g,formsDelete:Vg,formsCreateOptin:zg,personalizationsList:$g,personalizationsGet:qg,personalizationsCreate:vs,personalizationsUpdate:Hg,personalizationsDelete:Zg,personalizationsDeleteBulk:Xg,personalizationsLock:tC,personalizationsUnlock:aC,templatesGet:oC,templatesCreateShareLink:iC,automationsList:rC,contactAutomationsList:dC,contactAutomationsGet:lC,contactAutomationsEntryCounts:mC,contactAutomationsAdd:CC,contactAutomationsRemove:AC,segmentsList:yC,segmentsGet:bC,segmentsCreate:ys,segmentsUpdate:EC,segmentsDelete:hC,segmentsListAudiences:OC,connectionsList:xC,connectionsGet:SC,connectionsCreate:bs,connectionsUpdate:UC,connectionsDelete:FC,ecomCustomersList:MC,ecomCustomersGet:BC,ecomCustomersCreate:fs,ecomCustomersUpdate:PC,ecomCustomersDelete:NC,ecomOrdersList:KC,ecomOrdersGet:WC,ecomOrdersCreate:wa,ecomOrdersUpdate:QC,ecomOrdersDelete:YC,ecomOrderProductsList:JC,ecomOrderProductsGet:tv,customObjectSchemasList:av,customObjectSchemasGet:ov,customObjectSchemasCreate:Ls,customObjectSchemasUpdate:iv,customObjectSchemasDelete:rv,customObjectRecordsList:dv,customObjectRecordsUpsert:lv,customObjectRecordsGet:hs,customObjectRecordsGetByExternalId:Ds,customObjectRecordsDelete:Cv,customObjectRecordsDeleteByExternalId:Av,webhooksList:yv,webhooksGet:fv,webhooksCreate:Os,webhooksUpdate:Lv,webhooksDelete:Dv,usersList:wv,usersGet:xv,usersCreate:ws,usersUpdate:Sv,usersDelete:Uv,usersGetMe:Fv,usersGetByUsername:Mv,groupsList:Bv,groupsGet:Pv,groupsCreate:Gs,groupsUpdate:Nv,groupsDelete:Kv,groupLimitsList:Wv,addressesList:Qv,addressesGet:Yv,addressesCreate:xs,addressesUpdate:Jv,addressesDelete:eA,calendarsList:sA,calendarsGet:nA,calendarsCreate:Ts,calendarsUpdate:cA,calendarsDelete:pA,eventTrackingEventsList:uA,eventTrackingEventsCreate:mA,eventTrackingEventsDelete:CA,trackingGetSiteStatus:AA,trackingGetEventStatus:kA,trackingSetSiteStatus:yA,trackingSetEventStatus:fA,trackingTrackEvent:LA,trackingListWhitelist:DA,trackingAddWhitelist:wA,trackingRemoveWhitelist:xA,scoresList:SA,emailActivitiesList:UA,brandingsGet:FA,brandingsUpdate:jA,configsUpdate:_A,productsSearch:Rs,productsGet:PA,productsCreate:Fs,productsUpdate:$A,productsDelete:qA,productsUpsertBulk:HA,ordersUpsertBulk:js,ordersUpsertBulkAsync:YA,recurringPaymentsSearch:JA,recurringPaymentsUpsertBulk:ek,browseSessionsSearch:sk,browseSessionsSave:nk,browseSessionsAddToCart:ck,smsBroadcastsList:pk,smsBroadcastsGetMetrics:uk,smsBroadcastsGetSnapshot:mk,smsBroadcastsCreateSnapshot:Ck,smsBroadcastsGetFailures:Ak,smsBroadcastsGetRecipients:yk,smsCreditsGet:fk,trackingGetCode:Lk,smsBroadcastListsList:Dk,addressGroupsDelete:wk,ecomOrdersFind:xk,ecomOrdersUpsert:Sk,ecomOrderProductsListForOrder:Uk,notesCreateForAccount:Fk,notesCreateForDeal:Mk,notesUpdateForAccount:Bk,notesUpdateForDeal:Pk,contactTasksCreate:Nk,contactTasksFind:Kk,segmentsV2Create:_s,segmentsV2Get:Wk,segmentsV2Update:Qk,segmentsV2Delete:Yk,segmentsV2GetAtTimestamp:Ua,segmentsV2RevertToTimestamp:ty,segmentsV2RecentCounts:ay,segmentsV2CountHistory:sy,segmentsV2CountAtTimestamp:ny,segmentsV2Match:cy,segmentsV2MatchByExternalId:py,segmentsV2MatchAll:uy,segmentsV2MatchAllResult:Bs,segmentsV2MatchSomeResult:my,taskRemindersCreate:Cy,customObjectSchemasCreateChild:Ay,importsListAggregate:yy,browseSessionsTestEvent:fy},Ps={contactsList:Qa,contactsGet:_p,contactsFind:Vp,contactsCreateOrUpdate:Za,contactsUpdate:Np,contactsDelete:Kp,contactsGetLists:Ya,contactsGetTags:Xa,contactsGetFieldValues:Qp,contactsGetAutomations:Yp,contactsGetGeoIps:Jp,contactsGetScoreValues:ed,contactsGetDeals:sd,listsList:nd,listsGet:Ja,listsCreate:rd,listsDelete:dd,listsUpdateSubscription:gd,contactListsList:ld,tagsList:vd,tagsGet:ra,tagsCreate:yd,tagsUpdate:fd,tagsDelete:Ld,tagsAddToContact:Dd,tagsRemoveFromContact:wd,contactTagsList:xd,fieldsList:Sd,fieldsGet:pa,fieldsCreate:Rd,fieldsUpdate:jd,fieldsDelete:_d,fieldOptionsCreateBulk:Vd,fieldValuesList:zd,fieldValuesGet:da,fieldValuesSetForContact:Kd,fieldValuesUpdate:Wd,fieldValuesDelete:Qd,fieldRelsList:Yd,fieldRelsCreate:Jd,fieldRelsDelete:eu,groupMembersList:su,groupMembersCreate:es,groupMembersUpdate:iu,groupMembersDelete:ru,contactsGetLogs:du,contactsGetTrackingLogs:lu,contactsGetGoals:gu,contactsGetAccountContacts:vu,contactsGetNotes:ku,contactsGetData:bu,contactsGetOrganization:Eu,contactsGetPlusAppend:hu,activitiesList:Ou,importsCreateBulk:Gu,importsList:Tu,importsGetStatus:Iu,listGroupsCreate:Ru,dealsList:Ha,dealsListFiltered:Ha,dealsGet:as,dealsUpdate:Mu,dealsDelete:Bu,dealsUpdateOwnersBulk:Pu,dealGroupsList:Nu,dealGroupsGet:ua,dealGroupsCreate:Ku,dealGroupsUpdate:Wu,dealGroupsDelete:Qu,dealStagesList:Yu,dealStagesGet:la,dealStagesCreate:Ju,dealStagesUpdate:el,dealStagesDelete:sl,dealStagesMoveDeals:nl,dealStagesDeleteWithDeals:cl,dealTasksList:pl,dealTasksGet:ma,dealTasksCreate:ul,dealTasksUpdate:ml,dealTasksDelete:Cl,dealTaskTypesList:Al,dealTaskTypesGet:ga,dealTaskTypesCreate:yl,dealTaskTypesUpdate:fl,taskOutcomesList:Ll,taskOutcomesGet:cs,taskOutcomesCreate:Ol,dealRolesList:Gl,dealRolesCreate:Tl,dealRolesDelete:Il,contactDealsList:Rl,contactDealsGet:Ca,contactDealsCreate:jl,contactDealsUpdate:_l,contactDealsDelete:Vl,dealCustomFieldMetaList:zl,dealCustomFieldMetaGet:va,dealCustomFieldMetaCreate:$l,dealCustomFieldMetaUpdate:ql,dealCustomFieldMetaDelete:Hl,dealCustomFieldDataList:Zl,dealCustomFieldDataGet:ds,dealCustomFieldDataUpdate:Jl,dealCustomFieldDataDelete:em,dealActivitiesList:sm,accountsList:nm,accountsGet:Ve,accountsCreate:cm,accountsUpdate:pm,accountsDelete:um,accountsUpsert:mm,accountsDeleteBulk:Cm,accountContactsList:Am,accountContactsGet:ka,accountContactsCreate:ym,accountContactsUpdate:fm,accountContactsDelete:Lm,accountCustomFieldMetaList:Dm,accountCustomFieldMetaGet:ya,accountCustomFieldMetaCreate:wm,accountCustomFieldMetaUpdate:xm,accountCustomFieldMetaDelete:Sm,accountCustomFieldDataList:Um,accountCustomFieldDataGet:ba,accountCustomFieldDataCreate:jm,accountCustomFieldDataUpdate:_m,accountCustomFieldDataDelete:Vm,accountCustomFieldDataCreateBulk:zm,accountCustomFieldDataUpdateBulk:$m,notesList:qm,notesGet:At,notesCreate:Qm,notesUpdate:Zm,notesDelete:Xm,notesAddToContact:tg,campaignsList:ag,campaignsGet:Pe,campaignsCreate:ng,campaignsUpdate:cg,campaignsDuplicate:pg,campaignsGetLinks:ug,campaignsGetMessages:mg,campaignsGetAutomations:Cg,campaignsGetAutomationLists:Ag,campaignsGetUser:yg,messagesList:fg,messagesGet:Ea,messagesCreate:Lg,messagesUpdate:Dg,messagesDelete:wg,savedResponsesList:xg,savedResponsesGet:La,savedResponsesCreate:Sg,savedResponsesUpdate:Ug,savedResponsesDelete:Fg,formsList:Mg,formsGet:Bg,formsDelete:Pg,formsCreateOptin:Ng,personalizationsList:Kg,personalizationsGet:we,personalizationsCreate:Wg,personalizationsUpdate:Qg,personalizationsDelete:Yg,personalizationsDeleteBulk:Jg,personalizationsLock:eC,personalizationsUnlock:sC,templatesGet:nC,templatesCreateShareLink:cC,automationsList:pC,contactAutomationsList:uC,contactAutomationsGet:As,contactAutomationsEntryCounts:gC,contactAutomationsAdd:vC,contactAutomationsRemove:kC,segmentsList:ks,segmentsGet:ha,segmentsCreate:fC,segmentsUpdate:LC,segmentsDelete:DC,segmentsListAudiences:wC,connectionsList:TC,connectionsGet:Da,connectionsCreate:IC,connectionsUpdate:RC,connectionsDelete:jC,ecomCustomersList:_C,ecomCustomersGet:Oa,ecomCustomersCreate:VC,ecomCustomersUpdate:zC,ecomCustomersDelete:$C,ecomOrdersList:qC,ecomOrdersGet:ze,ecomOrdersCreate:HC,ecomOrdersUpdate:ZC,ecomOrdersDelete:XC,ecomOrderProductsList:Es,ecomOrderProductsGet:ev,customObjectSchemasList:sv,customObjectSchemasGet:Ne,customObjectSchemasCreate:nv,customObjectSchemasUpdate:cv,customObjectSchemasDelete:pv,customObjectRecordsList:uv,customObjectRecordsUpsert:Ga,customObjectRecordsGet:mv,customObjectRecordsGetByExternalId:gv,customObjectRecordsDelete:vv,customObjectRecordsDeleteByExternalId:kv,webhooksList:bv,webhooksGet:xa,webhooksCreate:Ev,webhooksUpdate:hv,webhooksDelete:Ov,usersList:Gv,usersGet:Ge,usersCreate:Tv,usersUpdate:Iv,usersDelete:Rv,usersGetMe:jv,usersGetByUsername:_v,groupsList:Vv,groupsGet:Ta,groupsCreate:zv,groupsUpdate:$v,groupsDelete:qv,groupLimitsList:Hv,addressesList:Zv,addressesGet:Sa,addressesCreate:Xv,addressesUpdate:tA,addressesDelete:aA,calendarsList:oA,calendarsGet:Ia,calendarsCreate:iA,calendarsUpdate:rA,calendarsDelete:dA,eventTrackingEventsList:lA,eventTrackingEventsCreate:gA,eventTrackingEventsDelete:vA,trackingGetSiteStatus:Ss,trackingGetEventStatus:Is,trackingSetSiteStatus:bA,trackingSetEventStatus:EA,trackingTrackEvent:hA,trackingListWhitelist:OA,trackingAddWhitelist:GA,trackingRemoveWhitelist:TA,scoresList:IA,emailActivitiesList:RA,brandingsGet:Us,brandingsUpdate:MA,configsUpdate:BA,productsSearch:VA,productsGet:zA,productsCreate:NA,productsUpdate:KA,productsDelete:WA,productsUpsertBulk:QA,ordersUpsertBulk:ZA,ordersUpsertBulkAsync:XA,recurringPaymentsSearch:tk,recurringPaymentsUpsertBulk:ak,browseSessionsSearch:ok,browseSessionsSave:ik,browseSessionsAddToCart:rk,smsBroadcastsList:dk,smsBroadcastsGetMetrics:lk,smsBroadcastsGetSnapshot:gk,smsBroadcastsCreateSnapshot:vk,smsBroadcastsGetFailures:kk,smsBroadcastsGetRecipients:bk,smsCreditsGet:Ek,trackingGetCode:hk,smsBroadcastListsList:Ok,addressGroupsDelete:Gk,ecomOrdersFind:Tk,ecomOrdersUpsert:Ik,ecomOrderProductsListForOrder:Rk,notesCreateForAccount:jk,notesCreateForDeal:_k,notesUpdateForAccount:Vk,notesUpdateForDeal:zk,contactTasksCreate:$k,contactTasksFind:qk,segmentsV2Create:Xt,segmentsV2Get:Hk,segmentsV2Update:Zk,segmentsV2Delete:Xk,segmentsV2GetAtTimestamp:Jk,segmentsV2RevertToTimestamp:ey,segmentsV2RecentCounts:Ra,segmentsV2CountHistory:oy,segmentsV2CountAtTimestamp:iy,segmentsV2Match:ry,segmentsV2MatchByExternalId:dy,segmentsV2MatchAll:Fa,segmentsV2MatchAllResult:ly,segmentsV2MatchSomeResult:gy,taskRemindersCreate:vy,customObjectSchemasCreateChild:ky,importsListAggregate:by,browseSessionsTestEvent:Ey};import{AuthMissingError as Ly}from"corsair/core";import{ApiError as Kt}from"corsair/http";var hy=new Set(["contactsCreateOrUpdate","contactsUpdate","contactsDelete","listsCreate","listsDelete","listsUpdateSubscription","tagsCreate","tagsUpdate","tagsDelete","tagsAddToContact","tagsRemoveFromContact","fieldsCreate","fieldsUpdate","fieldsDelete","fieldOptionsCreateBulk","fieldValuesSetForContact","fieldValuesUpdate","fieldValuesDelete","fieldRelsCreate","fieldRelsDelete","groupMembersCreate","groupMembersUpdate","groupMembersDelete","importsCreateBulk","listGroupsCreate","dealsUpdate","dealsDelete","dealsUpdateOwnersBulk","dealGroupsCreate","dealGroupsUpdate","dealGroupsDelete","dealStagesCreate","dealStagesUpdate","dealStagesDelete","dealStagesMoveDeals","dealStagesDeleteWithDeals","dealTasksCreate","dealTasksUpdate","dealTasksDelete","dealTaskTypesCreate","dealTaskTypesUpdate","taskOutcomesCreate","dealRolesCreate","dealRolesDelete","contactDealsCreate","contactDealsUpdate","contactDealsDelete","dealCustomFieldMetaCreate","dealCustomFieldMetaUpdate","dealCustomFieldMetaDelete","dealCustomFieldDataUpdate","dealCustomFieldDataDelete","accountsCreate","accountsUpdate","accountsDelete","accountsUpsert","accountsDeleteBulk","accountContactsCreate","accountContactsUpdate","accountContactsDelete","accountCustomFieldMetaCreate","accountCustomFieldMetaUpdate","accountCustomFieldMetaDelete","accountCustomFieldDataCreate","accountCustomFieldDataUpdate","accountCustomFieldDataDelete","accountCustomFieldDataCreateBulk","accountCustomFieldDataUpdateBulk","notesCreate","notesUpdate","notesDelete","notesAddToContact","campaignsCreate","campaignsUpdate","campaignsDuplicate","messagesCreate","messagesUpdate","messagesDelete","savedResponsesCreate","savedResponsesUpdate","savedResponsesDelete","formsDelete","formsCreateOptin","personalizationsCreate","personalizationsUpdate","personalizationsDelete","personalizationsDeleteBulk","personalizationsLock","personalizationsUnlock","templatesCreateShareLink","contactAutomationsAdd","contactAutomationsRemove","segmentsCreate","segmentsUpdate","segmentsDelete","connectionsCreate","connectionsUpdate","connectionsDelete","ecomCustomersCreate","ecomCustomersUpdate","ecomCustomersDelete","ecomOrdersCreate","ecomOrdersUpdate","ecomOrdersDelete","customObjectSchemasCreate","customObjectSchemasUpdate","customObjectSchemasDelete","customObjectRecordsUpsert","customObjectRecordsDelete","customObjectRecordsDeleteByExternalId","webhooksCreate","webhooksUpdate","webhooksDelete","usersCreate","usersUpdate","usersDelete","groupsCreate","groupsUpdate","groupsDelete","addressesCreate","addressesUpdate","addressesDelete","calendarsCreate","calendarsUpdate","calendarsDelete","eventTrackingEventsCreate","eventTrackingEventsDelete","trackingSetSiteStatus","trackingSetEventStatus","trackingTrackEvent","trackingAddWhitelist","trackingRemoveWhitelist","brandingsUpdate","configsUpdate","productsCreate","productsUpdate","productsDelete","productsUpsertBulk","ordersUpsertBulk","ordersUpsertBulkAsync","recurringPaymentsUpsertBulk","browseSessionsSave","browseSessionsAddToCart","smsBroadcastsCreateSnapshot","addressGroupsDelete","ecomOrdersUpsert","notesCreateForAccount","notesCreateForDeal","notesUpdateForAccount","notesUpdateForDeal","contactTasksCreate","segmentsV2Create","segmentsV2Update","segmentsV2Delete","segmentsV2RevertToTimestamp","segmentsV2MatchAll","taskRemindersCreate","customObjectSchemasCreateChild","browseSessionsTestEvent"]);function Dy(e){return hy.has(e)}var zs={CONFIGURATION_ERROR:{match:e=>{if(e instanceof Ly)return!0;let a=e.code;return a==="MISSING_API_TOKEN"||a==="MISSING_ACCOUNT"||a==="INVALID_ACCOUNT"},handler:async(e,a)=>(console.error(`[ACTIVECAMPAIGN:${a.operation}] Configuration error: ${e.message}`),{maxRetries:0})},RATE_LIMIT_ERROR:{match:e=>{if(e instanceof Kt&&e.status===429)return!0;let a=e.message.toLowerCase();return a.includes("too many requests")||a.includes("rate limit")},handler:async e=>{let a;return e instanceof Kt&&e.retryAfter!==void 0&&(a=e.retryAfter),{maxRetries:5,headersRetryAfterMs:a}}},AUTH_ERROR:{match:e=>e instanceof Kt&&e.status===401?!0:e.message.toLowerCase().includes("authentication"),handler:async(e,a)=>(console.warn(`[ACTIVECAMPAIGN:${a.operation}] Authentication failed - check the API token and account name under Settings > Developer`),{maxRetries:0})},PERMISSION_ERROR:{match:e=>e instanceof Kt&&e.status===403,handler:async(e,a)=>(console.warn(`[ACTIVECAMPAIGN:${a.operation}] Permission denied: ${e.message}`),{maxRetries:0})},NOT_FOUND_ERROR:{match:e=>e instanceof Kt&&e.status===404?!0:e instanceof Kt?e.message.toLowerCase().includes("not found"):!1,handler:async(e,a)=>(console.warn(`[ACTIVECAMPAIGN:${a.operation}] Resource not found: ${e.message}`),{maxRetries:0})},VALIDATION_ERROR:{match:e=>e instanceof Kt&&(e.status===400||e.status===422),handler:async(e,a)=>(console.warn(`[ACTIVECAMPAIGN:${a.operation}] Invalid request: ${e.message}`),{maxRetries:0})},NETWORK_ERROR:{match:e=>{let a=e.message.toLowerCase();return a.includes("network")||a.includes("connection")||a.includes("econnrefused")||a.includes("enotfound")||a.includes("etimedout")||a.includes("fetch failed")||a.includes("aborted")},handler:async(e,a)=>Dy(a.operation)?(console.warn(`[ACTIVECAMPAIGN:${a.operation}] Network error on a write operation - not retried, because ActiveCampaign offers no idempotency key and the write may already have been applied: ${e.message}`),{maxRetries:0}):(console.warn(`[ACTIVECAMPAIGN:${a.operation}] Network error: ${e.message}`),{maxRetries:3})},DEFAULT:{match:()=>!0,handler:async(e,a)=>(console.error(`[ACTIVECAMPAIGN:${a.operation}] Unhandled error: ${e.message}`),{maxRetries:0})}};var Ns={version:"1.0.0",entities:{contacts:Z,lists:ct,tags:J,fields:tt,contactLists:et,contactTags:at,fieldValues:st,fieldOptions:qt,fieldRels:lt,groupMembers:rt,listGroups:Wt,deals:yt,dealGroups:bt,dealStages:ft,dealTasks:pt,dealTaskTypes:Et,dealRoles:Lt,taskOutcomes:ht,dealCustomFieldMeta:mt,accounts:gt,accountContacts:Ot,accountCustomFieldMeta:Dt,notes:dt,campaigns:wt,messages:Gt,templates:Ht,savedResponses:xt,forms:Tt,personalizations:St,automations:Qt,segments:It,connections:Ut,ecomCustomers:Rt,customObjectSchemas:Bt,users:Ft,groups:jt,groupLimits:xe,addresses:Mt,calendars:_t,scores:Te,brandings:Se,webhooks:Vt,eventTrackingEvents:Pt}};var Oy={api_key:{account:["account"]}},wy={contacts:{list:_.list,get:_.get,find:_.find,createOrUpdate:_.createOrUpdate,update:_.update,delete:_.remove,getLists:_.getLists,getTags:_.getTags,getFieldValues:_.getFieldValues,getAutomations:_.getAutomations,getGeoIps:_.getGeoIps,getScoreValues:_.getScoreValues,getDeals:_.getDeals,getLogs:_.getLogs,getTrackingLogs:_.getTrackingLogs,getGoals:_.getGoals,getAccountContacts:_.getAccountContacts,getNotes:_.getNotes,getData:_.getData,getOrganization:_.getOrganization,getPlusAppend:_.getPlusAppend},lists:{list:vt.list,get:vt.get,create:vt.create,delete:vt.remove,updateSubscription:vt.updateSubscription},contactLists:{list:vt.listContactLists},tags:{list:ut.list,get:ut.get,create:ut.create,update:ut.update,delete:ut.remove,addToContact:ut.addToContact,removeFromContact:ut.removeFromContact},contactTags:{list:ut.listContactTags},fields:{list:P.list,get:P.get,create:P.create,update:P.update,delete:P.remove},fieldOptions:{createBulk:P.createOptionsBulk},fieldValues:{list:P.listValues,get:P.getValue,setForContact:P.setValueForContact,update:P.updateValue,delete:P.removeValue},fieldRels:{list:P.listRels,create:P.createRel,delete:P.removeRel},groupMembers:{list:P.listGroupMembers,create:P.createGroupMember,update:P.updateGroupMember,delete:P.removeGroupMember},activities:{list:_.listActivities},imports:{listAggregate:d.listImportAggregate,createBulk:Be.createBulk,list:Be.list,getStatus:Be.getStatus},listGroups:{create:vt.createListGroup},deals:{list:A.list,listFiltered:A.listFiltered,get:A.get,update:A.update,delete:A.remove,updateOwnersBulk:A.updateOwnersBulk},dealGroups:{list:A.listGroups,get:A.getGroup,create:A.createGroup,update:A.updateGroup,delete:A.removeGroup},dealStages:{list:A.listStages,get:A.getStage,create:A.createStage,update:A.updateStage,delete:A.removeStage,moveDeals:A.moveStageDeals,deleteWithDeals:A.removeStageWithDeals},dealTasks:{list:A.listTasks,get:A.getTask,create:A.createTask,update:A.updateTask,delete:A.removeTask},dealTaskTypes:{list:A.listTaskTypes,get:A.getTaskType,create:A.createTaskType,update:A.updateTaskType},taskOutcomes:{list:A.listOutcomes,get:A.getOutcome,create:A.createOutcome},dealRoles:{list:A.listRoles,create:A.createRole,delete:A.removeRole},contactDeals:{list:A.listSecondaryContacts,get:A.getSecondaryContact,create:A.addSecondaryContact,update:A.updateSecondaryContact,delete:A.removeSecondaryContact},dealCustomFieldMeta:{list:A.listFieldMeta,get:A.getFieldMeta,create:A.createFieldMeta,update:A.updateFieldMeta,delete:A.removeFieldMeta},dealCustomFieldData:{list:A.listFieldData,get:A.getFieldData,update:A.updateFieldData,delete:A.removeFieldData},dealActivities:{list:A.listActivities},accounts:{list:O.list,get:O.get,create:O.create,update:O.update,delete:O.remove,upsert:O.upsert,deleteBulk:O.removeBulk},accountContacts:{list:O.listContacts,get:O.getContact,create:O.createContact,update:O.updateContact,delete:O.removeContact},accountCustomFieldMeta:{list:O.listFieldMeta,get:O.getFieldMeta,create:O.createFieldMeta,update:O.updateFieldMeta,delete:O.removeFieldMeta},accountCustomFieldData:{list:O.listFieldData,get:O.getFieldData,create:O.createFieldData,update:O.updateFieldData,delete:O.removeFieldData,createBulk:O.createFieldDataBulk,updateBulk:O.updateFieldDataBulk},notes:{createForAccount:O.createAccountNote,createForDeal:O.createDealNote,updateForAccount:O.updateAccountNote,updateForDeal:O.updateDealNote,list:O.listNotes,get:O.getNote,create:O.createNote,update:O.updateNote,delete:O.removeNote,addToContact:O.addContactNote},campaigns:{list:k.listCampaigns,get:k.getCampaign,create:k.createCampaign,update:k.updateCampaign,duplicate:k.duplicateCampaign,getLinks:k.getCampaignLinks,getMessages:k.getCampaignMessages,getAutomations:k.getCampaignAutomations,getAutomationLists:k.getCampaignAutomationLists,getUser:k.getCampaignUser},messages:{list:k.listMessages,get:k.getMessage,create:k.createMessage,update:k.updateMessage,delete:k.removeMessage},savedResponses:{list:k.listSavedResponses,get:k.getSavedResponse,create:k.createSavedResponse,update:k.updateSavedResponse,delete:k.removeSavedResponse},forms:{list:k.listForms,get:k.getForm,delete:k.removeForm,createOptin:k.createFormOptin},personalizations:{list:k.listVariables,get:k.getVariable,create:k.createVariable,update:k.updateVariable,delete:k.removeVariable,deleteBulk:k.removeVariablesBulk,lock:k.lockVariable,unlock:k.unlockVariable},templates:{get:k.getTemplate,createShareLink:k.createTemplateShareLink},automations:{list:k.listAutomations},contactAutomations:{list:k.listContactAutomations,get:k.getContactAutomation,entryCounts:k.getAutomationEntryCounts,add:k.addContactToAutomation,remove:k.removeContactFromAutomation},segments:{list:k.listSegments,get:k.getSegment,create:k.createSegment,update:k.updateSegment,delete:k.removeSegment,listAudiences:k.listAudiences},connections:{list:d.listConnections,get:d.getConnection,create:d.createConnection,update:d.updateConnection,delete:d.removeConnection},ecomCustomers:{list:d.listCustomers,get:d.getCustomer,create:d.createCustomer,update:d.updateCustomer,delete:d.removeCustomer},ecomOrders:{find:d.findOrder,upsert:d.upsertOrder,list:d.listOrders,get:d.getOrder,create:d.createOrder,update:d.updateOrder,delete:d.removeOrder},ecomOrderProducts:{listForOrder:d.listProductsForOrder,list:d.listOrderProducts,get:d.getOrderProduct},customObjectSchemas:{createChild:d.createChildSchema,list:d.listSchemas,get:d.getSchema,create:d.createSchema,update:d.updateSchema,delete:d.removeSchema},customObjectRecords:{list:d.listRecords,upsert:d.upsertRecord,get:d.getRecord,getByExternalId:d.getRecordByExternalId,delete:d.removeRecord,deleteByExternalId:d.removeRecordByExternalId},webhooks:{list:d.listWebhooks,get:d.getWebhook,create:d.createWebhook,update:d.updateWebhook,delete:d.removeWebhook},users:{list:d.listUsers,get:d.getUser,create:d.createUser,update:d.updateUser,delete:d.removeUser,getMe:d.getLoggedInUser,getByUsername:d.getUserByUsername},groups:{list:d.listGroups,get:d.getGroup,create:d.createGroup,update:d.updateGroup,delete:d.removeGroup},groupLimits:{list:d.listGroupLimits},addresses:{list:d.listAddresses,get:d.getAddress,create:d.createAddress,update:d.updateAddress,delete:d.removeAddress},calendars:{list:d.listCalendars,get:d.getCalendar,create:d.createCalendar,update:d.updateCalendar,delete:d.removeCalendar},eventTrackingEvents:{list:d.listEvents,create:d.createEvent,delete:d.removeEvent},tracking:{getCode:d.getSiteTrackingCode,getSiteStatus:d.getSiteTrackingStatus,getEventStatus:d.getEventTrackingStatus,setSiteStatus:d.setSiteTrackingStatus,setEventStatus:d.setEventTrackingStatus,trackEvent:d.trackEvent,listWhitelist:d.listWhitelistedDomains,addWhitelist:d.addWhitelistedDomain,removeWhitelist:d.removeWhitelistedDomain},scores:{list:d.listScores},emailActivities:{list:d.listEmailActivities},brandings:{get:d.getBranding,update:d.updateBranding},configs:{update:d.updateConfig},products:{search:d.searchProducts,get:d.getProduct,create:d.createProduct,update:d.updateProduct,delete:d.removeProduct,upsertBulk:d.upsertProductsBulk},orders:{upsertBulk:d.upsertOrdersBulk,upsertBulkAsync:d.upsertOrdersBulkAsync},recurringPayments:{search:d.searchRecurringPayments,upsertBulk:d.upsertRecurringPaymentsBulk},browseSessions:{testEvent:d.testTrackingEvent,search:d.searchBrowseSessions,save:d.saveBrowseSession,addToCart:d.addBrowseSessionToCart},smsBroadcasts:{list:d.listSmsBroadcasts,getMetrics:d.getSmsMetrics,getSnapshot:d.getSmsMetricsSnapshot,createSnapshot:d.createSmsMetricsSnapshot,getFailures:d.getSmsFailures,getRecipients:d.getSmsRecipients},smsCredits:{get:d.getSmsCredits},smsBroadcastLists:{list:d.listSmsBroadcastLists},addressGroups:{delete:d.removeAddressGroup},contactTasks:{create:A.createContactTask,find:A.findContactTask},segmentsV2:{create:$.create,get:$.get,update:$.update,delete:$.remove,getAtTimestamp:$.getAtTimestamp,revertToTimestamp:$.revertToTimestamp,recentCounts:$.recentCounts,countHistory:$.countHistory,countAtTimestamp:$.countAtTimestamp,match:$.match,matchByExternalId:$.matchByExternalId,matchAll:$.matchAll,matchAllResult:$.matchAllResult,matchSomeResult:$.matchSomeResult},taskReminders:{create:d.createTaskReminder}},i=Vs,c=Ps,Gy={"contacts.list":{input:i.contactsList,output:c.contactsList},"contacts.get":{input:i.contactsGet,output:c.contactsGet},"contacts.find":{input:i.contactsFind,output:c.contactsFind},"contacts.createOrUpdate":{input:i.contactsCreateOrUpdate,output:c.contactsCreateOrUpdate},"contacts.update":{input:i.contactsUpdate,output:c.contactsUpdate},"contacts.delete":{input:i.contactsDelete,output:c.contactsDelete},"contacts.getLists":{input:i.contactsGetLists,output:c.contactsGetLists},"contacts.getTags":{input:i.contactsGetTags,output:c.contactsGetTags},"contacts.getFieldValues":{input:i.contactsGetFieldValues,output:c.contactsGetFieldValues},"contacts.getAutomations":{input:i.contactsGetAutomations,output:c.contactsGetAutomations},"contacts.getGeoIps":{input:i.contactsGetGeoIps,output:c.contactsGetGeoIps},"contacts.getScoreValues":{input:i.contactsGetScoreValues,output:c.contactsGetScoreValues},"contacts.getDeals":{input:i.contactsGetDeals,output:c.contactsGetDeals},"lists.list":{input:i.listsList,output:c.listsList},"lists.get":{input:i.listsGet,output:c.listsGet},"lists.create":{input:i.listsCreate,output:c.listsCreate},"lists.delete":{input:i.listsDelete,output:c.listsDelete},"lists.updateSubscription":{input:i.listsUpdateSubscription,output:c.listsUpdateSubscription},"contactLists.list":{input:i.contactListsList,output:c.contactListsList},"tags.list":{input:i.tagsList,output:c.tagsList},"tags.get":{input:i.tagsGet,output:c.tagsGet},"tags.create":{input:i.tagsCreate,output:c.tagsCreate},"tags.update":{input:i.tagsUpdate,output:c.tagsUpdate},"tags.delete":{input:i.tagsDelete,output:c.tagsDelete},"tags.addToContact":{input:i.tagsAddToContact,output:c.tagsAddToContact},"tags.removeFromContact":{input:i.tagsRemoveFromContact,output:c.tagsRemoveFromContact},"contactTags.list":{input:i.contactTagsList,output:c.contactTagsList},"fields.list":{input:i.fieldsList,output:c.fieldsList},"fields.get":{input:i.fieldsGet,output:c.fieldsGet},"fields.create":{input:i.fieldsCreate,output:c.fieldsCreate},"fields.update":{input:i.fieldsUpdate,output:c.fieldsUpdate},"fields.delete":{input:i.fieldsDelete,output:c.fieldsDelete},"fieldOptions.createBulk":{input:i.fieldOptionsCreateBulk,output:c.fieldOptionsCreateBulk},"fieldValues.list":{input:i.fieldValuesList,output:c.fieldValuesList},"fieldValues.get":{input:i.fieldValuesGet,output:c.fieldValuesGet},"fieldValues.setForContact":{input:i.fieldValuesSetForContact,output:c.fieldValuesSetForContact},"fieldValues.update":{input:i.fieldValuesUpdate,output:c.fieldValuesUpdate},"fieldValues.delete":{input:i.fieldValuesDelete,output:c.fieldValuesDelete},"fieldRels.list":{input:i.fieldRelsList,output:c.fieldRelsList},"fieldRels.create":{input:i.fieldRelsCreate,output:c.fieldRelsCreate},"fieldRels.delete":{input:i.fieldRelsDelete,output:c.fieldRelsDelete},"groupMembers.list":{input:i.groupMembersList,output:c.groupMembersList},"groupMembers.create":{input:i.groupMembersCreate,output:c.groupMembersCreate},"groupMembers.update":{input:i.groupMembersUpdate,output:c.groupMembersUpdate},"groupMembers.delete":{input:i.groupMembersDelete,output:c.groupMembersDelete},"contacts.getLogs":{input:i.contactsGetLogs,output:c.contactsGetLogs},"contacts.getTrackingLogs":{input:i.contactsGetTrackingLogs,output:c.contactsGetTrackingLogs},"contacts.getGoals":{input:i.contactsGetGoals,output:c.contactsGetGoals},"contacts.getAccountContacts":{input:i.contactsGetAccountContacts,output:c.contactsGetAccountContacts},"contacts.getNotes":{input:i.contactsGetNotes,output:c.contactsGetNotes},"contacts.getData":{input:i.contactsGetData,output:c.contactsGetData},"contacts.getOrganization":{input:i.contactsGetOrganization,output:c.contactsGetOrganization},"contacts.getPlusAppend":{input:i.contactsGetPlusAppend,output:c.contactsGetPlusAppend},"activities.list":{input:i.activitiesList,output:c.activitiesList},"imports.createBulk":{input:i.importsCreateBulk,output:c.importsCreateBulk},"imports.list":{input:i.importsList,output:c.importsList},"imports.getStatus":{input:i.importsGetStatus,output:c.importsGetStatus},"listGroups.create":{input:i.listGroupsCreate,output:c.listGroupsCreate},"deals.list":{input:i.dealsList,output:c.dealsList},"deals.listFiltered":{input:i.dealsListFiltered,output:c.dealsListFiltered},"deals.get":{input:i.dealsGet,output:c.dealsGet},"deals.update":{input:i.dealsUpdate,output:c.dealsUpdate},"deals.delete":{input:i.dealsDelete,output:c.dealsDelete},"deals.updateOwnersBulk":{input:i.dealsUpdateOwnersBulk,output:c.dealsUpdateOwnersBulk},"dealGroups.list":{input:i.dealGroupsList,output:c.dealGroupsList},"dealGroups.get":{input:i.dealGroupsGet,output:c.dealGroupsGet},"dealGroups.create":{input:i.dealGroupsCreate,output:c.dealGroupsCreate},"dealGroups.update":{input:i.dealGroupsUpdate,output:c.dealGroupsUpdate},"dealGroups.delete":{input:i.dealGroupsDelete,output:c.dealGroupsDelete},"dealStages.list":{input:i.dealStagesList,output:c.dealStagesList},"dealStages.get":{input:i.dealStagesGet,output:c.dealStagesGet},"dealStages.create":{input:i.dealStagesCreate,output:c.dealStagesCreate},"dealStages.update":{input:i.dealStagesUpdate,output:c.dealStagesUpdate},"dealStages.delete":{input:i.dealStagesDelete,output:c.dealStagesDelete},"dealStages.moveDeals":{input:i.dealStagesMoveDeals,output:c.dealStagesMoveDeals},"dealStages.deleteWithDeals":{input:i.dealStagesDeleteWithDeals,output:c.dealStagesDeleteWithDeals},"dealTasks.list":{input:i.dealTasksList,output:c.dealTasksList},"dealTasks.get":{input:i.dealTasksGet,output:c.dealTasksGet},"dealTasks.create":{input:i.dealTasksCreate,output:c.dealTasksCreate},"dealTasks.update":{input:i.dealTasksUpdate,output:c.dealTasksUpdate},"dealTasks.delete":{input:i.dealTasksDelete,output:c.dealTasksDelete},"dealTaskTypes.list":{input:i.dealTaskTypesList,output:c.dealTaskTypesList},"dealTaskTypes.get":{input:i.dealTaskTypesGet,output:c.dealTaskTypesGet},"dealTaskTypes.create":{input:i.dealTaskTypesCreate,output:c.dealTaskTypesCreate},"dealTaskTypes.update":{input:i.dealTaskTypesUpdate,output:c.dealTaskTypesUpdate},"taskOutcomes.list":{input:i.taskOutcomesList,output:c.taskOutcomesList},"taskOutcomes.get":{input:i.taskOutcomesGet,output:c.taskOutcomesGet},"taskOutcomes.create":{input:i.taskOutcomesCreate,output:c.taskOutcomesCreate},"dealRoles.list":{input:i.dealRolesList,output:c.dealRolesList},"dealRoles.create":{input:i.dealRolesCreate,output:c.dealRolesCreate},"dealRoles.delete":{input:i.dealRolesDelete,output:c.dealRolesDelete},"contactDeals.list":{input:i.contactDealsList,output:c.contactDealsList},"contactDeals.get":{input:i.contactDealsGet,output:c.contactDealsGet},"contactDeals.create":{input:i.contactDealsCreate,output:c.contactDealsCreate},"contactDeals.update":{input:i.contactDealsUpdate,output:c.contactDealsUpdate},"contactDeals.delete":{input:i.contactDealsDelete,output:c.contactDealsDelete},"dealCustomFieldMeta.list":{input:i.dealCustomFieldMetaList,output:c.dealCustomFieldMetaList},"dealCustomFieldMeta.get":{input:i.dealCustomFieldMetaGet,output:c.dealCustomFieldMetaGet},"dealCustomFieldMeta.create":{input:i.dealCustomFieldMetaCreate,output:c.dealCustomFieldMetaCreate},"dealCustomFieldMeta.update":{input:i.dealCustomFieldMetaUpdate,output:c.dealCustomFieldMetaUpdate},"dealCustomFieldMeta.delete":{input:i.dealCustomFieldMetaDelete,output:c.dealCustomFieldMetaDelete},"dealCustomFieldData.list":{input:i.dealCustomFieldDataList,output:c.dealCustomFieldDataList},"dealCustomFieldData.get":{input:i.dealCustomFieldDataGet,output:c.dealCustomFieldDataGet},"dealCustomFieldData.update":{input:i.dealCustomFieldDataUpdate,output:c.dealCustomFieldDataUpdate},"dealCustomFieldData.delete":{input:i.dealCustomFieldDataDelete,output:c.dealCustomFieldDataDelete},"dealActivities.list":{input:i.dealActivitiesList,output:c.dealActivitiesList},"accounts.list":{input:i.accountsList,output:c.accountsList},"accounts.get":{input:i.accountsGet,output:c.accountsGet},"accounts.create":{input:i.accountsCreate,output:c.accountsCreate},"accounts.update":{input:i.accountsUpdate,output:c.accountsUpdate},"accounts.delete":{input:i.accountsDelete,output:c.accountsDelete},"accounts.upsert":{input:i.accountsUpsert,output:c.accountsUpsert},"accounts.deleteBulk":{input:i.accountsDeleteBulk,output:c.accountsDeleteBulk},"accountContacts.list":{input:i.accountContactsList,output:c.accountContactsList},"accountContacts.get":{input:i.accountContactsGet,output:c.accountContactsGet},"accountContacts.create":{input:i.accountContactsCreate,output:c.accountContactsCreate},"accountContacts.update":{input:i.accountContactsUpdate,output:c.accountContactsUpdate},"accountContacts.delete":{input:i.accountContactsDelete,output:c.accountContactsDelete},"accountCustomFieldMeta.list":{input:i.accountCustomFieldMetaList,output:c.accountCustomFieldMetaList},"accountCustomFieldMeta.get":{input:i.accountCustomFieldMetaGet,output:c.accountCustomFieldMetaGet},"accountCustomFieldMeta.create":{input:i.accountCustomFieldMetaCreate,output:c.accountCustomFieldMetaCreate},"accountCustomFieldMeta.update":{input:i.accountCustomFieldMetaUpdate,output:c.accountCustomFieldMetaUpdate},"accountCustomFieldMeta.delete":{input:i.accountCustomFieldMetaDelete,output:c.accountCustomFieldMetaDelete},"accountCustomFieldData.list":{input:i.accountCustomFieldDataList,output:c.accountCustomFieldDataList},"accountCustomFieldData.get":{input:i.accountCustomFieldDataGet,output:c.accountCustomFieldDataGet},"accountCustomFieldData.create":{input:i.accountCustomFieldDataCreate,output:c.accountCustomFieldDataCreate},"accountCustomFieldData.update":{input:i.accountCustomFieldDataUpdate,output:c.accountCustomFieldDataUpdate},"accountCustomFieldData.delete":{input:i.accountCustomFieldDataDelete,output:c.accountCustomFieldDataDelete},"accountCustomFieldData.createBulk":{input:i.accountCustomFieldDataCreateBulk,output:c.accountCustomFieldDataCreateBulk},"accountCustomFieldData.updateBulk":{input:i.accountCustomFieldDataUpdateBulk,output:c.accountCustomFieldDataUpdateBulk},"notes.list":{input:i.notesList,output:c.notesList},"notes.get":{input:i.notesGet,output:c.notesGet},"notes.create":{input:i.notesCreate,output:c.notesCreate},"notes.update":{input:i.notesUpdate,output:c.notesUpdate},"notes.delete":{input:i.notesDelete,output:c.notesDelete},"notes.addToContact":{input:i.notesAddToContact,output:c.notesAddToContact},"campaigns.list":{input:i.campaignsList,output:c.campaignsList},"campaigns.get":{input:i.campaignsGet,output:c.campaignsGet},"campaigns.create":{input:i.campaignsCreate,output:c.campaignsCreate},"campaigns.update":{input:i.campaignsUpdate,output:c.campaignsUpdate},"campaigns.duplicate":{input:i.campaignsDuplicate,output:c.campaignsDuplicate},"campaigns.getLinks":{input:i.campaignsGetLinks,output:c.campaignsGetLinks},"campaigns.getMessages":{input:i.campaignsGetMessages,output:c.campaignsGetMessages},"campaigns.getAutomations":{input:i.campaignsGetAutomations,output:c.campaignsGetAutomations},"campaigns.getAutomationLists":{input:i.campaignsGetAutomationLists,output:c.campaignsGetAutomationLists},"campaigns.getUser":{input:i.campaignsGetUser,output:c.campaignsGetUser},"messages.list":{input:i.messagesList,output:c.messagesList},"messages.get":{input:i.messagesGet,output:c.messagesGet},"messages.create":{input:i.messagesCreate,output:c.messagesCreate},"messages.update":{input:i.messagesUpdate,output:c.messagesUpdate},"messages.delete":{input:i.messagesDelete,output:c.messagesDelete},"savedResponses.list":{input:i.savedResponsesList,output:c.savedResponsesList},"savedResponses.get":{input:i.savedResponsesGet,output:c.savedResponsesGet},"savedResponses.create":{input:i.savedResponsesCreate,output:c.savedResponsesCreate},"savedResponses.update":{input:i.savedResponsesUpdate,output:c.savedResponsesUpdate},"savedResponses.delete":{input:i.savedResponsesDelete,output:c.savedResponsesDelete},"forms.list":{input:i.formsList,output:c.formsList},"forms.get":{input:i.formsGet,output:c.formsGet},"forms.delete":{input:i.formsDelete,output:c.formsDelete},"forms.createOptin":{input:i.formsCreateOptin,output:c.formsCreateOptin},"personalizations.list":{input:i.personalizationsList,output:c.personalizationsList},"personalizations.get":{input:i.personalizationsGet,output:c.personalizationsGet},"personalizations.create":{input:i.personalizationsCreate,output:c.personalizationsCreate},"personalizations.update":{input:i.personalizationsUpdate,output:c.personalizationsUpdate},"personalizations.delete":{input:i.personalizationsDelete,output:c.personalizationsDelete},"personalizations.deleteBulk":{input:i.personalizationsDeleteBulk,output:c.personalizationsDeleteBulk},"personalizations.lock":{input:i.personalizationsLock,output:c.personalizationsLock},"personalizations.unlock":{input:i.personalizationsUnlock,output:c.personalizationsUnlock},"templates.get":{input:i.templatesGet,output:c.templatesGet},"templates.createShareLink":{input:i.templatesCreateShareLink,output:c.templatesCreateShareLink},"automations.list":{input:i.automationsList,output:c.automationsList},"contactAutomations.list":{input:i.contactAutomationsList,output:c.contactAutomationsList},"contactAutomations.get":{input:i.contactAutomationsGet,output:c.contactAutomationsGet},"contactAutomations.entryCounts":{input:i.contactAutomationsEntryCounts,output:c.contactAutomationsEntryCounts},"contactAutomations.add":{input:i.contactAutomationsAdd,output:c.contactAutomationsAdd},"contactAutomations.remove":{input:i.contactAutomationsRemove,output:c.contactAutomationsRemove},"segments.list":{input:i.segmentsList,output:c.segmentsList},"segments.get":{input:i.segmentsGet,output:c.segmentsGet},"segments.create":{input:i.segmentsCreate,output:c.segmentsCreate},"segments.update":{input:i.segmentsUpdate,output:c.segmentsUpdate},"segments.delete":{input:i.segmentsDelete,output:c.segmentsDelete},"segments.listAudiences":{input:i.segmentsListAudiences,output:c.segmentsListAudiences},"connections.list":{input:i.connectionsList,output:c.connectionsList},"connections.get":{input:i.connectionsGet,output:c.connectionsGet},"connections.create":{input:i.connectionsCreate,output:c.connectionsCreate},"connections.update":{input:i.connectionsUpdate,output:c.connectionsUpdate},"connections.delete":{input:i.connectionsDelete,output:c.connectionsDelete},"ecomCustomers.list":{input:i.ecomCustomersList,output:c.ecomCustomersList},"ecomCustomers.get":{input:i.ecomCustomersGet,output:c.ecomCustomersGet},"ecomCustomers.create":{input:i.ecomCustomersCreate,output:c.ecomCustomersCreate},"ecomCustomers.update":{input:i.ecomCustomersUpdate,output:c.ecomCustomersUpdate},"ecomCustomers.delete":{input:i.ecomCustomersDelete,output:c.ecomCustomersDelete},"ecomOrders.list":{input:i.ecomOrdersList,output:c.ecomOrdersList},"ecomOrders.get":{input:i.ecomOrdersGet,output:c.ecomOrdersGet},"ecomOrders.create":{input:i.ecomOrdersCreate,output:c.ecomOrdersCreate},"ecomOrders.update":{input:i.ecomOrdersUpdate,output:c.ecomOrdersUpdate},"ecomOrders.delete":{input:i.ecomOrdersDelete,output:c.ecomOrdersDelete},"ecomOrderProducts.list":{input:i.ecomOrderProductsList,output:c.ecomOrderProductsList},"ecomOrderProducts.get":{input:i.ecomOrderProductsGet,output:c.ecomOrderProductsGet},"customObjectSchemas.list":{input:i.customObjectSchemasList,output:c.customObjectSchemasList},"customObjectSchemas.get":{input:i.customObjectSchemasGet,output:c.customObjectSchemasGet},"customObjectSchemas.create":{input:i.customObjectSchemasCreate,output:c.customObjectSchemasCreate},"customObjectSchemas.update":{input:i.customObjectSchemasUpdate,output:c.customObjectSchemasUpdate},"customObjectSchemas.delete":{input:i.customObjectSchemasDelete,output:c.customObjectSchemasDelete},"customObjectRecords.list":{input:i.customObjectRecordsList,output:c.customObjectRecordsList},"customObjectRecords.upsert":{input:i.customObjectRecordsUpsert,output:c.customObjectRecordsUpsert},"customObjectRecords.get":{input:i.customObjectRecordsGet,output:c.customObjectRecordsGet},"customObjectRecords.getByExternalId":{input:i.customObjectRecordsGetByExternalId,output:c.customObjectRecordsGetByExternalId},"customObjectRecords.delete":{input:i.customObjectRecordsDelete,output:c.customObjectRecordsDelete},"customObjectRecords.deleteByExternalId":{input:i.customObjectRecordsDeleteByExternalId,output:c.customObjectRecordsDeleteByExternalId},"webhooks.list":{input:i.webhooksList,output:c.webhooksList},"webhooks.get":{input:i.webhooksGet,output:c.webhooksGet},"webhooks.create":{input:i.webhooksCreate,output:c.webhooksCreate},"webhooks.update":{input:i.webhooksUpdate,output:c.webhooksUpdate},"webhooks.delete":{input:i.webhooksDelete,output:c.webhooksDelete},"users.list":{input:i.usersList,output:c.usersList},"users.get":{input:i.usersGet,output:c.usersGet},"users.create":{input:i.usersCreate,output:c.usersCreate},"users.update":{input:i.usersUpdate,output:c.usersUpdate},"users.delete":{input:i.usersDelete,output:c.usersDelete},"users.getMe":{input:i.usersGetMe,output:c.usersGetMe},"users.getByUsername":{input:i.usersGetByUsername,output:c.usersGetByUsername},"groups.list":{input:i.groupsList,output:c.groupsList},"groups.get":{input:i.groupsGet,output:c.groupsGet},"groups.create":{input:i.groupsCreate,output:c.groupsCreate},"groups.update":{input:i.groupsUpdate,output:c.groupsUpdate},"groups.delete":{input:i.groupsDelete,output:c.groupsDelete},"groupLimits.list":{input:i.groupLimitsList,output:c.groupLimitsList},"addresses.list":{input:i.addressesList,output:c.addressesList},"addresses.get":{input:i.addressesGet,output:c.addressesGet},"addresses.create":{input:i.addressesCreate,output:c.addressesCreate},"addresses.update":{input:i.addressesUpdate,output:c.addressesUpdate},"addresses.delete":{input:i.addressesDelete,output:c.addressesDelete},"calendars.list":{input:i.calendarsList,output:c.calendarsList},"calendars.get":{input:i.calendarsGet,output:c.calendarsGet},"calendars.create":{input:i.calendarsCreate,output:c.calendarsCreate},"calendars.update":{input:i.calendarsUpdate,output:c.calendarsUpdate},"calendars.delete":{input:i.calendarsDelete,output:c.calendarsDelete},"eventTrackingEvents.list":{input:i.eventTrackingEventsList,output:c.eventTrackingEventsList},"eventTrackingEvents.create":{input:i.eventTrackingEventsCreate,output:c.eventTrackingEventsCreate},"eventTrackingEvents.delete":{input:i.eventTrackingEventsDelete,output:c.eventTrackingEventsDelete},"tracking.getSiteStatus":{input:i.trackingGetSiteStatus,output:c.trackingGetSiteStatus},"tracking.getEventStatus":{input:i.trackingGetEventStatus,output:c.trackingGetEventStatus},"tracking.setSiteStatus":{input:i.trackingSetSiteStatus,output:c.trackingSetSiteStatus},"tracking.setEventStatus":{input:i.trackingSetEventStatus,output:c.trackingSetEventStatus},"tracking.trackEvent":{input:i.trackingTrackEvent,output:c.trackingTrackEvent},"tracking.listWhitelist":{input:i.trackingListWhitelist,output:c.trackingListWhitelist},"tracking.addWhitelist":{input:i.trackingAddWhitelist,output:c.trackingAddWhitelist},"tracking.removeWhitelist":{input:i.trackingRemoveWhitelist,output:c.trackingRemoveWhitelist},"scores.list":{input:i.scoresList,output:c.scoresList},"emailActivities.list":{input:i.emailActivitiesList,output:c.emailActivitiesList},"brandings.get":{input:i.brandingsGet,output:c.brandingsGet},"brandings.update":{input:i.brandingsUpdate,output:c.brandingsUpdate},"configs.update":{input:i.configsUpdate,output:c.configsUpdate},"products.search":{input:i.productsSearch,output:c.productsSearch},"products.get":{input:i.productsGet,output:c.productsGet},"products.create":{input:i.productsCreate,output:c.productsCreate},"products.update":{input:i.productsUpdate,output:c.productsUpdate},"products.delete":{input:i.productsDelete,output:c.productsDelete},"products.upsertBulk":{input:i.productsUpsertBulk,output:c.productsUpsertBulk},"orders.upsertBulk":{input:i.ordersUpsertBulk,output:c.ordersUpsertBulk},"orders.upsertBulkAsync":{input:i.ordersUpsertBulkAsync,output:c.ordersUpsertBulkAsync},"recurringPayments.search":{input:i.recurringPaymentsSearch,output:c.recurringPaymentsSearch},"recurringPayments.upsertBulk":{input:i.recurringPaymentsUpsertBulk,output:c.recurringPaymentsUpsertBulk},"browseSessions.search":{input:i.browseSessionsSearch,output:c.browseSessionsSearch},"browseSessions.save":{input:i.browseSessionsSave,output:c.browseSessionsSave},"browseSessions.addToCart":{input:i.browseSessionsAddToCart,output:c.browseSessionsAddToCart},"smsBroadcasts.list":{input:i.smsBroadcastsList,output:c.smsBroadcastsList},"smsBroadcasts.getMetrics":{input:i.smsBroadcastsGetMetrics,output:c.smsBroadcastsGetMetrics},"smsBroadcasts.getSnapshot":{input:i.smsBroadcastsGetSnapshot,output:c.smsBroadcastsGetSnapshot},"smsBroadcasts.createSnapshot":{input:i.smsBroadcastsCreateSnapshot,output:c.smsBroadcastsCreateSnapshot},"smsBroadcasts.getFailures":{input:i.smsBroadcastsGetFailures,output:c.smsBroadcastsGetFailures},"smsBroadcasts.getRecipients":{input:i.smsBroadcastsGetRecipients,output:c.smsBroadcastsGetRecipients},"smsCredits.get":{input:i.smsCreditsGet,output:c.smsCreditsGet},"tracking.getCode":{input:i.trackingGetCode,output:c.trackingGetCode},"smsBroadcastLists.list":{input:i.smsBroadcastListsList,output:c.smsBroadcastListsList},"addressGroups.delete":{input:i.addressGroupsDelete,output:c.addressGroupsDelete},"ecomOrders.find":{input:i.ecomOrdersFind,output:c.ecomOrdersFind},"ecomOrders.upsert":{input:i.ecomOrdersUpsert,output:c.ecomOrdersUpsert},"ecomOrderProducts.listForOrder":{input:i.ecomOrderProductsListForOrder,output:c.ecomOrderProductsListForOrder},"notes.createForAccount":{input:i.notesCreateForAccount,output:c.notesCreateForAccount},"notes.createForDeal":{input:i.notesCreateForDeal,output:c.notesCreateForDeal},"notes.updateForAccount":{input:i.notesUpdateForAccount,output:c.notesUpdateForAccount},"notes.updateForDeal":{input:i.notesUpdateForDeal,output:c.notesUpdateForDeal},"contactTasks.create":{input:i.contactTasksCreate,output:c.contactTasksCreate},"contactTasks.find":{input:i.contactTasksFind,output:c.contactTasksFind},"segmentsV2.create":{input:i.segmentsV2Create,output:c.segmentsV2Create},"segmentsV2.get":{input:i.segmentsV2Get,output:c.segmentsV2Get},"segmentsV2.update":{input:i.segmentsV2Update,output:c.segmentsV2Update},"segmentsV2.delete":{input:i.segmentsV2Delete,output:c.segmentsV2Delete},"segmentsV2.getAtTimestamp":{input:i.segmentsV2GetAtTimestamp,output:c.segmentsV2GetAtTimestamp},"segmentsV2.revertToTimestamp":{input:i.segmentsV2RevertToTimestamp,output:c.segmentsV2RevertToTimestamp},"segmentsV2.recentCounts":{input:i.segmentsV2RecentCounts,output:c.segmentsV2RecentCounts},"segmentsV2.countHistory":{input:i.segmentsV2CountHistory,output:c.segmentsV2CountHistory},"segmentsV2.countAtTimestamp":{input:i.segmentsV2CountAtTimestamp,output:c.segmentsV2CountAtTimestamp},"segmentsV2.match":{input:i.segmentsV2Match,output:c.segmentsV2Match},"segmentsV2.matchByExternalId":{input:i.segmentsV2MatchByExternalId,output:c.segmentsV2MatchByExternalId},"segmentsV2.matchAll":{input:i.segmentsV2MatchAll,output:c.segmentsV2MatchAll},"segmentsV2.matchAllResult":{input:i.segmentsV2MatchAllResult,output:c.segmentsV2MatchAllResult},"segmentsV2.matchSomeResult":{input:i.segmentsV2MatchSomeResult,output:c.segmentsV2MatchSomeResult},"taskReminders.create":{input:i.taskRemindersCreate,output:c.taskRemindersCreate},"customObjectSchemas.createChild":{input:i.customObjectSchemasCreateChild,output:c.customObjectSchemasCreateChild},"imports.listAggregate":{input:i.importsListAggregate,output:c.importsListAggregate},"browseSessions.testEvent":{input:i.browseSessionsTestEvent,output:c.browseSessionsTestEvent}},xy={},Ty="api_key",Sy={"contacts.list":{riskLevel:"read",description:"List contacts with pagination and filters"},"contacts.get":{riskLevel:"read",description:"Retrieve a contact by its ID"},"contacts.find":{riskLevel:"read",description:"Find a contact by email address"},"contacts.createOrUpdate":{riskLevel:"write",description:"Create a contact, or update it if the email already exists"},"contacts.update":{riskLevel:"write",description:"Update an existing contact by its ID"},"contacts.delete":{riskLevel:"destructive",description:"Delete a contact by its ID"},"contacts.getLists":{riskLevel:"read",description:"List the list memberships of a contact"},"contacts.getTags":{riskLevel:"read",description:"List the tags applied to a contact"},"contacts.getFieldValues":{riskLevel:"read",description:"List the custom field values of a contact"},"contacts.getAutomations":{riskLevel:"read",description:"List the automations a contact is enrolled in"},"contacts.getGeoIps":{riskLevel:"read",description:"List the geo IP records associated with a contact"},"contacts.getScoreValues":{riskLevel:"read",description:"List the score values of a contact"},"contacts.getDeals":{riskLevel:"read",description:"List the deals associated with a contact"},"lists.list":{riskLevel:"read",description:"List mailing lists with pagination"},"lists.get":{riskLevel:"read",description:"Retrieve a mailing list by its ID"},"lists.create":{riskLevel:"write",description:"Create a new mailing list"},"lists.delete":{riskLevel:"destructive",description:"Delete a mailing list by its ID"},"lists.updateSubscription":{riskLevel:"write",description:"Subscribe or unsubscribe a contact to or from a list"},"contactLists.list":{riskLevel:"read",description:"List all contact-to-list memberships"},"tags.list":{riskLevel:"read",description:"List tags with pagination and search"},"tags.get":{riskLevel:"read",description:"Retrieve a tag by its ID"},"tags.create":{riskLevel:"write",description:"Create a new tag"},"tags.update":{riskLevel:"write",description:"Update an existing tag by its ID"},"tags.delete":{riskLevel:"destructive",description:"Delete a tag by its ID"},"tags.addToContact":{riskLevel:"write",description:"Apply a tag to a contact"},"tags.removeFromContact":{riskLevel:"destructive",description:"Remove a tag from a contact by its contactTag ID"},"contactTags.list":{riskLevel:"read",description:"List all contact-to-tag associations"},"fields.list":{riskLevel:"read",description:"List custom field definitions with pagination"},"fields.get":{riskLevel:"read",description:"Retrieve a custom field definition by its ID"},"fields.create":{riskLevel:"write",description:"Create a new custom contact field"},"fields.update":{riskLevel:"write",description:"Update an existing custom field definition"},"fields.delete":{riskLevel:"destructive",description:"Delete a custom field and every value stored against it"},"fieldOptions.createBulk":{riskLevel:"write",description:"Create options in bulk for a dropdown or listbox field"},"fieldValues.list":{riskLevel:"read",description:"List custom field values across all contacts"},"fieldValues.get":{riskLevel:"read",description:"Retrieve a single custom field value by its ID"},"fieldValues.setForContact":{riskLevel:"write",description:"Set a custom field value on a contact"},"fieldValues.update":{riskLevel:"write",description:"Update an existing custom field value by its ID"},"fieldValues.delete":{riskLevel:"destructive",description:"Delete a custom field value by its ID"},"fieldRels.list":{riskLevel:"read",description:"List relationships between custom fields and lists"},"fieldRels.create":{riskLevel:"write",description:"Associate a custom field with a list"},"fieldRels.delete":{riskLevel:"destructive",description:"Remove the association between a custom field and a list"},"groupMembers.list":{riskLevel:"read",description:"List which custom fields belong to which display groups"},"groupMembers.create":{riskLevel:"write",description:"Add a custom field to a display group so it becomes visible"},"groupMembers.update":{riskLevel:"write",description:"Change the display group or ordering of a custom field"},"groupMembers.delete":{riskLevel:"destructive",description:"Remove a custom field from its display group"},"contacts.getLogs":{riskLevel:"read",description:"List the activity log entries for a contact"},"contacts.getTrackingLogs":{riskLevel:"read",description:"List site and event tracking records for a contact"},"contacts.getGoals":{riskLevel:"read",description:"List the automation goals a contact has completed"},"contacts.getAccountContacts":{riskLevel:"read",description:"List the accounts a contact is associated with"},"contacts.getNotes":{riskLevel:"read",description:"List the notes attached to a contact"},"contacts.getData":{riskLevel:"read",description:"Retrieve the geographic and tracking data of a contact"},"contacts.getOrganization":{riskLevel:"read",description:"Retrieve the organization a contact belongs to"},"contacts.getPlusAppend":{riskLevel:"read",description:"Retrieve third-party enrichment data for a contact"},"activities.list":{riskLevel:"read",description:"List account activity, optionally narrowed to one contact"},"imports.createBulk":{riskLevel:"write",description:"Queue up to 250 contacts per call (payload under 400 KB) for asynchronous import"},"imports.list":{riskLevel:"read",description:"List outstanding and recently completed import batches"},"imports.getStatus":{riskLevel:"read",description:"Retrieve the progress of a single import batch by its ID"},"listGroups.create":{riskLevel:"write",description:"Grant a user group permissions over a mailing list"},"deals.list":{riskLevel:"read",description:"List deals with pagination and filters"},"deals.listFiltered":{riskLevel:"read",description:"Search deals by title or filter by stage, pipeline, owner or status"},"deals.get":{riskLevel:"read",description:"Retrieve a deal by its ID"},"deals.update":{riskLevel:"write",description:"Update an existing deal by its ID"},"deals.delete":{riskLevel:"destructive",description:"Delete a deal by its ID"},"deals.updateOwnersBulk":{riskLevel:"write",description:"Reassign many deals to new owners in one request"},"dealGroups.list":{riskLevel:"read",description:"List deal pipelines, optionally filtered by title"},"dealGroups.get":{riskLevel:"read",description:"Retrieve a deal pipeline by its ID"},"dealGroups.create":{riskLevel:"write",description:"Create a deal pipeline with its three default stages"},"dealGroups.update":{riskLevel:"write",description:"Update a deal pipeline by its ID"},"dealGroups.delete":{riskLevel:"destructive",description:"Delete a pipeline and every stage and deal in it"},"dealStages.list":{riskLevel:"read",description:"List deal pipeline stages"},"dealStages.get":{riskLevel:"read",description:"Retrieve a pipeline stage by its ID"},"dealStages.create":{riskLevel:"write",description:"Create a stage in a deal pipeline"},"dealStages.update":{riskLevel:"write",description:"Update a pipeline stage by its ID"},"dealStages.delete":{riskLevel:"destructive",description:"Delete a pipeline stage by its ID"},"dealStages.moveDeals":{riskLevel:"write",description:"Move every deal in one stage to another stage"},"dealStages.deleteWithDeals":{riskLevel:"destructive",description:"Delete a stage, optionally relocating its deals first"},"dealTasks.list":{riskLevel:"read",description:"List deal tasks with pagination"},"dealTasks.get":{riskLevel:"read",description:"Retrieve a deal task by its ID"},"dealTasks.create":{riskLevel:"write",description:"Create a task against a deal, contact or account"},"dealTasks.update":{riskLevel:"write",description:"Update an existing deal task by its ID"},"dealTasks.delete":{riskLevel:"destructive",description:"Delete a deal task by its ID"},"dealTaskTypes.list":{riskLevel:"read",description:"List the task types available for deals"},"dealTaskTypes.get":{riskLevel:"read",description:"Retrieve a deal task type by its ID"},"dealTaskTypes.create":{riskLevel:"write",description:"Create a task type for categorising deal tasks"},"dealTaskTypes.update":{riskLevel:"write",description:"Update a deal task type by its ID"},"taskOutcomes.list":{riskLevel:"read",description:"List the outcomes that can be assigned to tasks"},"taskOutcomes.get":{riskLevel:"read",description:"Retrieve a task outcome by its ID"},"taskOutcomes.create":{riskLevel:"write",description:"Create a task outcome with an associated sentiment"},"dealRoles.list":{riskLevel:"read",description:"List the roles a contact can hold on a deal"},"dealRoles.create":{riskLevel:"write",description:"Create a deal role such as Decision Maker"},"dealRoles.delete":{riskLevel:"destructive",description:"Delete a deal role by its ID"},"contactDeals.list":{riskLevel:"read",description:"List secondary contacts associated with deals"},"contactDeals.get":{riskLevel:"read",description:"Retrieve a secondary contact association by its ID"},"contactDeals.create":{riskLevel:"write",description:"Add a secondary contact to a deal"},"contactDeals.update":{riskLevel:"write",description:"Update a secondary contact association"},"contactDeals.delete":{riskLevel:"destructive",description:"Remove a secondary contact from a deal"},"dealCustomFieldMeta.list":{riskLevel:"read",description:"List custom field definitions for deals"},"dealCustomFieldMeta.get":{riskLevel:"read",description:"Retrieve a deal custom field definition by its ID"},"dealCustomFieldMeta.create":{riskLevel:"write",description:"Create a custom field definition for deals"},"dealCustomFieldMeta.update":{riskLevel:"write",description:"Update a deal custom field definition"},"dealCustomFieldMeta.delete":{riskLevel:"destructive",description:"Delete a deal custom field definition"},"dealCustomFieldData.list":{riskLevel:"read",description:"List custom field values stored against deals"},"dealCustomFieldData.get":{riskLevel:"read",description:"Retrieve a deal custom field value by its ID"},"dealCustomFieldData.update":{riskLevel:"write",description:"Update a custom field value on a deal"},"dealCustomFieldData.delete":{riskLevel:"destructive",description:"Delete a custom field value from a deal"},"dealActivities.list":{riskLevel:"read",description:"List recent activity across deals"},"accounts.list":{riskLevel:"read",description:"List CRM accounts, optionally filtered by name"},"accounts.get":{riskLevel:"read",description:"Retrieve a CRM account by its ID"},"accounts.create":{riskLevel:"write",description:"Create a CRM account with a unique name"},"accounts.update":{riskLevel:"write",description:"Update an existing CRM account by its ID"},"accounts.delete":{riskLevel:"destructive",description:"Delete a CRM account and its associated data"},"accounts.upsert":{riskLevel:"write",description:"Create a CRM account, or update the one with the same name"},"accounts.deleteBulk":{riskLevel:"destructive",description:"Delete many CRM accounts in one request"},"accountContacts.list":{riskLevel:"read",description:"List associations between accounts and contacts"},"accountContacts.get":{riskLevel:"read",description:"Retrieve an account-contact association by its ID"},"accountContacts.create":{riskLevel:"write",description:"Link a contact to an account with an optional job title"},"accountContacts.update":{riskLevel:"write",description:"Update an account-contact association"},"accountContacts.delete":{riskLevel:"destructive",description:"Remove the link between an account and a contact"},"accountCustomFieldMeta.list":{riskLevel:"read",description:"List custom field definitions for accounts"},"accountCustomFieldMeta.get":{riskLevel:"read",description:"Retrieve an account custom field definition by its ID"},"accountCustomFieldMeta.create":{riskLevel:"write",description:"Define a new custom field for accounts"},"accountCustomFieldMeta.update":{riskLevel:"write",description:"Update an account custom field definition"},"accountCustomFieldMeta.delete":{riskLevel:"destructive",description:"Delete an account custom field definition"},"accountCustomFieldData.list":{riskLevel:"read",description:"List custom field values stored against accounts"},"accountCustomFieldData.get":{riskLevel:"read",description:"Retrieve an account custom field value by its ID"},"accountCustomFieldData.create":{riskLevel:"write",description:"Set a custom field value on an account"},"accountCustomFieldData.update":{riskLevel:"write",description:"Update a custom field value on an account"},"accountCustomFieldData.delete":{riskLevel:"destructive",description:"Delete a custom field value from an account"},"accountCustomFieldData.createBulk":{riskLevel:"write",description:"Set many account custom field values in one request"},"accountCustomFieldData.updateBulk":{riskLevel:"write",description:"Update many account custom field values in one request"},"notes.list":{riskLevel:"read",description:"List notes across contacts, deals and accounts"},"notes.get":{riskLevel:"read",description:"Retrieve a note by its ID"},"notes.create":{riskLevel:"write",description:"Create a note against a contact, deal or account"},"notes.update":{riskLevel:"write",description:"Update the body of an existing note"},"notes.delete":{riskLevel:"destructive",description:"Delete a note by its ID"},"notes.addToContact":{riskLevel:"write",description:"Add a note to a contact identified by email address"},"campaigns.list":{riskLevel:"read",description:"List campaigns with pagination and filters"},"campaigns.get":{riskLevel:"read",description:"Retrieve a campaign by its ID with engagement metrics"},"campaigns.create":{riskLevel:"write",description:"Create a broadcast or automation campaign"},"campaigns.update":{riskLevel:"write",description:"Edit an existing campaign, such as its name"},"campaigns.duplicate":{riskLevel:"write",description:"Duplicate a campaign with its content and configuration"},"campaigns.getLinks":{riskLevel:"read",description:"List the tracked links belonging to a campaign"},"campaigns.getMessages":{riskLevel:"read",description:"List the messages attached to a campaign"},"campaigns.getAutomations":{riskLevel:"read",description:"List automations linked to a campaign"},"campaigns.getAutomationLists":{riskLevel:"read",description:"List the lists a campaign automation sends to"},"campaigns.getUser":{riskLevel:"read",description:"Retrieve the user who owns a campaign"},"messages.list":{riskLevel:"read",description:"List email messages with pagination"},"messages.get":{riskLevel:"read",description:"Retrieve an email message by its ID"},"messages.create":{riskLevel:"write",description:"Create an email message with subject, sender and content"},"messages.update":{riskLevel:"write",description:"Update an existing email message"},"messages.delete":{riskLevel:"destructive",description:"Delete an email message by its ID"},"savedResponses.list":{riskLevel:"read",description:"List saved response templates"},"savedResponses.get":{riskLevel:"read",description:"Retrieve a saved response by its ID"},"savedResponses.create":{riskLevel:"write",description:"Create a reusable saved response template"},"savedResponses.update":{riskLevel:"write",description:"Update a saved response template"},"savedResponses.delete":{riskLevel:"destructive",description:"Delete a saved response template"},"forms.list":{riskLevel:"read",description:"List forms with their field configuration"},"forms.get":{riskLevel:"read",description:"Retrieve a form by its ID"},"forms.delete":{riskLevel:"destructive",description:"Delete a form and its associated data"},"forms.createOptin":{riskLevel:"write",description:"Record a form opt-in on behalf of a contact"},"personalizations.list":{riskLevel:"read",description:"List personalization variables"},"personalizations.get":{riskLevel:"read",description:"Retrieve a personalization variable by its ID"},"personalizations.create":{riskLevel:"write",description:"Create a personalization variable"},"personalizations.update":{riskLevel:"write",description:"Edit an existing personalization variable"},"personalizations.delete":{riskLevel:"destructive",description:"Delete a personalization variable"},"personalizations.deleteBulk":{riskLevel:"destructive",description:"Delete many personalization variables at once"},"personalizations.lock":{riskLevel:"write",description:"Lock a personalization variable against edits"},"personalizations.unlock":{riskLevel:"write",description:"Unlock a personalization variable for editing"},"templates.get":{riskLevel:"read",description:"Retrieve a campaign template by its ID"},"templates.createShareLink":{riskLevel:"write",description:"Create a shareable link for a campaign template"},"automations.list":{riskLevel:"read",description:"List automation workflows"},"contactAutomations.list":{riskLevel:"read",description:"List contact enrolments across automations"},"contactAutomations.get":{riskLevel:"read",description:"Retrieve a contact automation enrolment by its ID"},"contactAutomations.entryCounts":{riskLevel:"read",description:"Count how many times a contact entered each automation"},"contactAutomations.add":{riskLevel:"write",description:"Enrol a contact in an automation by email address"},"contactAutomations.remove":{riskLevel:"destructive",description:"Remove a contact from an automation, one run or all"},"segments.list":{riskLevel:"read",description:"List contact segments"},"segments.get":{riskLevel:"read",description:"Retrieve a segment by its ID"},"segments.create":{riskLevel:"write",description:"Create a segment with filtering conditions"},"segments.update":{riskLevel:"write",description:"Update a segment definition"},"segments.delete":{riskLevel:"destructive",description:"Delete a segment and its history"},"segments.listAudiences":{riskLevel:"read",description:"List saved segment summaries, known as audiences"},"connections.list":{riskLevel:"read",description:"List Deep Data connections to external services"},"connections.get":{riskLevel:"read",description:"Retrieve a connection by its ID"},"connections.create":{riskLevel:"write",description:"Create a connection to an external e-commerce service"},"connections.update":{riskLevel:"write",description:"Update an existing connection"},"connections.delete":{riskLevel:"destructive",description:"Delete a connection by its ID"},"ecomCustomers.list":{riskLevel:"read",description:"List e-commerce customers with revenue metrics"},"ecomCustomers.get":{riskLevel:"read",description:"Retrieve an e-commerce customer by its ID"},"ecomCustomers.create":{riskLevel:"write",description:"Register an e-commerce customer against a connection"},"ecomCustomers.update":{riskLevel:"write",description:"Update an e-commerce customer record"},"ecomCustomers.delete":{riskLevel:"destructive",description:"Delete an e-commerce customer and its data"},"ecomOrders.list":{riskLevel:"read",description:"List e-commerce orders with pagination"},"ecomOrders.get":{riskLevel:"read",description:"Retrieve an e-commerce order by its ID"},"ecomOrders.create":{riskLevel:"write",description:"Record an e-commerce order for automation triggers"},"ecomOrders.update":{riskLevel:"write",description:"Update an existing e-commerce order"},"ecomOrders.delete":{riskLevel:"destructive",description:"Delete an e-commerce order by its ID"},"ecomOrderProducts.list":{riskLevel:"read",description:"List the products attached to e-commerce orders"},"ecomOrderProducts.get":{riskLevel:"read",description:"Retrieve an order product line by its ID"},"customObjectSchemas.list":{riskLevel:"read",description:"List custom object schema definitions"},"customObjectSchemas.get":{riskLevel:"read",description:"Retrieve a custom object schema by its ID"},"customObjectSchemas.create":{riskLevel:"write",description:"Create a custom object schema"},"customObjectSchemas.update":{riskLevel:"write",description:"Update a custom object schema or add field options"},"customObjectSchemas.delete":{riskLevel:"destructive",description:"Delete a custom object schema and all its records"},"customObjectRecords.list":{riskLevel:"read",description:"List the records belonging to a custom object schema"},"customObjectRecords.upsert":{riskLevel:"write",description:"Create or update a custom object record by external ID"},"customObjectRecords.get":{riskLevel:"read",description:"Retrieve a custom object record by its ID"},"customObjectRecords.getByExternalId":{riskLevel:"read",description:"Retrieve a custom object record by its external ID"},"customObjectRecords.delete":{riskLevel:"destructive",description:"Delete a custom object record by its ID"},"customObjectRecords.deleteByExternalId":{riskLevel:"destructive",description:"Delete a custom object record by its external ID"},"webhooks.list":{riskLevel:"read",description:"List configured webhook subscriptions"},"webhooks.get":{riskLevel:"read",description:"Retrieve a webhook subscription by its ID"},"webhooks.create":{riskLevel:"write",description:"Create a webhook subscription for account events"},"webhooks.update":{riskLevel:"write",description:"Update a webhook subscription"},"webhooks.delete":{riskLevel:"destructive",description:"Delete a webhook subscription by its ID"},"users.list":{riskLevel:"read",description:"List account users with pagination and sorting"},"users.get":{riskLevel:"read",description:"Retrieve an account user by their ID"},"users.create":{riskLevel:"write",description:"Create an account user who can sign in"},"users.update":{riskLevel:"write",description:"Update an account user, including group assignment"},"users.delete":{riskLevel:"destructive",description:"Delete an account user by their ID"},"users.getMe":{riskLevel:"read",description:"Retrieve the user the API token belongs to"},"users.getByUsername":{riskLevel:"read",description:"Retrieve an account user by their username"},"groups.list":{riskLevel:"read",description:"List permission groups with their settings"},"groups.get":{riskLevel:"read",description:"Retrieve a permission group by its ID"},"groups.create":{riskLevel:"write",description:"Create a permission group"},"groups.update":{riskLevel:"write",description:"Update a permission group title or description"},"groups.delete":{riskLevel:"destructive",description:"Delete a permission group by its ID"},"groupLimits.list":{riskLevel:"read",description:"List the resource limits configured per group"},"addresses.list":{riskLevel:"read",description:"List the company addresses used in campaigns"},"addresses.get":{riskLevel:"read",description:"Retrieve a company address by its ID"},"addresses.create":{riskLevel:"write",description:"Create a company address for campaign footers"},"addresses.update":{riskLevel:"write",description:"Update an existing company address"},"addresses.delete":{riskLevel:"destructive",description:"Delete a company address by its ID"},"calendars.list":{riskLevel:"read",description:"List calendar feeds configured on the account"},"calendars.get":{riskLevel:"read",description:"Retrieve a calendar feed by its ID"},"calendars.create":{riskLevel:"write",description:"Create a calendar feed for external calendar apps"},"calendars.update":{riskLevel:"write",description:"Update a calendar feed by its ID"},"calendars.delete":{riskLevel:"destructive",description:"Delete a calendar feed by its ID"},"eventTrackingEvents.list":{riskLevel:"read",description:"List the whitelisted event tracking event names"},"eventTrackingEvents.create":{riskLevel:"write",description:"Whitelist a new event name for tracking"},"eventTrackingEvents.delete":{riskLevel:"destructive",description:"Remove an event name from the tracking whitelist"},"tracking.getSiteStatus":{riskLevel:"read",description:"Check whether site tracking is enabled"},"tracking.getEventStatus":{riskLevel:"read",description:"Check whether event tracking is enabled"},"tracking.setSiteStatus":{riskLevel:"write",description:"Enable or disable site tracking for the account"},"tracking.setEventStatus":{riskLevel:"write",description:"Enable or disable event tracking for the account"},"tracking.trackEvent":{riskLevel:"write",description:"Record a custom event against a contact"},"tracking.listWhitelist":{riskLevel:"read",description:"List the domains allowed for site tracking"},"tracking.addWhitelist":{riskLevel:"write",description:"Add a domain to the site tracking whitelist"},"tracking.removeWhitelist":{riskLevel:"destructive",description:"Remove a domain from the site tracking whitelist"},"scores.list":{riskLevel:"read",description:"List the scoring rules configured on the account"},"emailActivities.list":{riskLevel:"read",description:"List email activity for a subscriber or deal"},"brandings.get":{riskLevel:"read",description:"Retrieve a branding configuration by its ID"},"brandings.update":{riskLevel:"write",description:"Update branding such as site name, logo and favicon"},"configs.update":{riskLevel:"write",description:"Update an account configuration value"},"products.search":{riskLevel:"read",description:"Search the e-commerce product catalog"},"products.get":{riskLevel:"read",description:"Retrieve a catalog product by its ID"},"products.create":{riskLevel:"write",description:"Create a product in the e-commerce catalog"},"products.update":{riskLevel:"write",description:"Update a catalog product"},"products.delete":{riskLevel:"destructive",description:"Delete a product from the e-commerce catalog"},"products.upsertBulk":{riskLevel:"write",description:"Create or update many catalog products in one request"},"orders.upsertBulk":{riskLevel:"write",description:"Create or update many orders synchronously"},"orders.upsertBulkAsync":{riskLevel:"write",description:"Create or update many orders asynchronously"},"recurringPayments.search":{riskLevel:"read",description:"Search recurring payment records by filter"},"recurringPayments.upsertBulk":{riskLevel:"write",description:"Create or update many recurring payments at once"},"browseSessions.search":{riskLevel:"read",description:"Search browse sessions for a contact and connection"},"browseSessions.save":{riskLevel:"write",description:"Create a browse session in a specified state"},"browseSessions.addToCart":{riskLevel:"write",description:"Flag a browse session as having items added to cart"},"smsBroadcasts.list":{riskLevel:"read",description:"List SMS broadcasts with optional name and status filters"},"smsBroadcasts.getMetrics":{riskLevel:"read",description:"Retrieve delivery metrics for specific SMS broadcasts"},"smsBroadcasts.getSnapshot":{riskLevel:"read",description:"Retrieve aggregate metrics across all SMS broadcasts"},"smsBroadcasts.createSnapshot":{riskLevel:"write",description:"Request a metrics snapshot for specific SMS broadcasts"},"smsBroadcasts.getFailures":{riskLevel:"read",description:"Group and count SMS delivery failures for a broadcast"},"smsBroadcasts.getRecipients":{riskLevel:"read",description:"List the contacts an SMS broadcast was sent to"},"smsCredits.get":{riskLevel:"read",description:"Retrieve SMS credit usage and remaining balance"},"tracking.getCode":{riskLevel:"read",description:"Retrieve the site tracking JavaScript snippet"},"smsBroadcastLists.list":{riskLevel:"read",description:"List the SMS broadcast lists available on the account"},"addressGroups.delete":{riskLevel:"destructive",description:"Delete an address group by its ID"},"ecomOrders.find":{riskLevel:"read",description:"Find one order by its store order ID within a connection"},"ecomOrders.upsert":{riskLevel:"write",description:"Create an order, or update the one with the same store order ID. Concurrent upserts for the same connectionid and externalid can duplicate; serialize them or use orders.upsertBulk"},"ecomOrderProducts.listForOrder":{riskLevel:"read",description:"List the product lines belonging to one order"},"notes.createForAccount":{riskLevel:"write",description:"Add a note to a CRM account"},"notes.createForDeal":{riskLevel:"write",description:"Add a note to a deal"},"notes.updateForAccount":{riskLevel:"write",description:"Update a note attached to a CRM account"},"notes.updateForDeal":{riskLevel:"write",description:"Update a note attached to a deal"},"contactTasks.create":{riskLevel:"write",description:"Create a task against a contact"},"contactTasks.find":{riskLevel:"read",description:"Find contact tasks by title, optionally for one contact"},"segmentsV2.create":{riskLevel:"write",description:"Create an advanced segment with filtering conditions"},"segmentsV2.get":{riskLevel:"read",description:"Retrieve a V2 segment by its UUID"},"segmentsV2.update":{riskLevel:"write",description:"Update a V2 segment definition"},"segmentsV2.delete":{riskLevel:"destructive",description:"Delete a segment and every historic version of it"},"segmentsV2.getAtTimestamp":{riskLevel:"read",description:"Retrieve a segment as it stood at a point in time"},"segmentsV2.revertToTimestamp":{riskLevel:"write",description:"Revert a segment to how it looked at a point in time"},"segmentsV2.recentCounts":{riskLevel:"read",description:"Retrieve the most recent result count per segment"},"segmentsV2.countHistory":{riskLevel:"read",description:"List historic result counts for one segment"},"segmentsV2.countAtTimestamp":{riskLevel:"read",description:"Retrieve segment counts recorded before a timestamp"},"segmentsV2.match":{riskLevel:"read",description:"Check whether a contact matches a segment"},"segmentsV2.matchByExternalId":{riskLevel:"read",description:"Check segment membership using an external contact ID"},"segmentsV2.matchAll":{riskLevel:"write",description:"Start a match-all evaluation for every contact in a segment"},"segmentsV2.matchAllResult":{riskLevel:"read",description:"Fetch a match-all result set by its run ID"},"segmentsV2.matchSomeResult":{riskLevel:"read",description:"Fetch a partial segment match result set by run ID"},"taskReminders.create":{riskLevel:"write",description:"Create a reminder ahead of a deal task due date"},"customObjectSchemas.createChild":{riskLevel:"write",description:"Create a child schema under a public parent schema"},"imports.listAggregate":{riskLevel:"read",description:"Retrieve aggregate progress across all bulk import batches"},"browseSessions.testEvent":{riskLevel:"write",description:"Simulate a tracking event and return its debug output"}};function lf(e={}){let a={...e,authType:e.authType??Ty};return{id:"activecampaign",schema:Ns,options:a,hooks:a.hooks,endpoints:wy,webhooks:xy,authConfig:Oy,endpointMeta:Sy,endpointSchemas:Gy,webhookSchemas:{},pluginWebhookMatcher:()=>!1,errorHandlers:{...zs,...a.errorHandlers},keyBuilder:async(o,n)=>{if(n==="endpoint"&&a.key)return a.key;if(n==="endpoint"&&o.authType==="api_key"){let u=await o.keys.get_api_key();if(!u)throw new $s("activecampaign","api_key");return u}throw new $s("activecampaign","api_key")}}}export{lf as activecampaign,Oy as activecampaignAuthConfig,Sy as activecampaignEndpointMeta,Gy as activecampaignEndpointSchemas};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.test.d.ts","sourceRoot":"","sources":["../integration.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=persist.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persist.test.d.ts","sourceRoot":"","sources":["../persist.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=routing.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.test.d.ts","sourceRoot":"","sources":["../routing.test.ts"],"names":[],"mappings":""}