glitch-javascript-sdk 3.2.17 → 3.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +88 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Crm.d.ts +48 -0
- package/dist/esm/index.js +88 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +48 -0
- package/package.json +1 -1
- package/src/api/Crm.ts +85 -1
- package/src/routes/CrmRoute.ts +15 -1
package/dist/esm/api/Crm.d.ts
CHANGED
|
@@ -85,5 +85,53 @@ declare class Crm {
|
|
|
85
85
|
* Remove a contact from a lead.
|
|
86
86
|
*/
|
|
87
87
|
static deleteContact<T>(contact_id: string): AxiosPromise<Response<T>>;
|
|
88
|
+
/**
|
|
89
|
+
* List CRM newsletter and mass-email campaigns.
|
|
90
|
+
*/
|
|
91
|
+
static listCampaigns<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
92
|
+
/**
|
|
93
|
+
* Create a CRM campaign draft with filters, exclusions, and optional variants.
|
|
94
|
+
*/
|
|
95
|
+
static createCampaign<T>(data: object): AxiosPromise<Response<T>>;
|
|
96
|
+
/**
|
|
97
|
+
* View a CRM campaign. Pass include_recipients in params for a small recipient sample.
|
|
98
|
+
*/
|
|
99
|
+
static viewCampaign<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
100
|
+
/**
|
|
101
|
+
* Update an editable CRM campaign draft or paused campaign.
|
|
102
|
+
*/
|
|
103
|
+
static updateCampaign<T>(campaign_id: string, data: object): AxiosPromise<Response<T>>;
|
|
104
|
+
/**
|
|
105
|
+
* Delete an unsent CRM campaign draft.
|
|
106
|
+
*/
|
|
107
|
+
static deleteCampaign<T>(campaign_id: string): AxiosPromise<Response<T>>;
|
|
108
|
+
/**
|
|
109
|
+
* Preview campaign audience filters and exclusions without creating recipients.
|
|
110
|
+
*/
|
|
111
|
+
static previewCampaignAudience<T>(data: object): AxiosPromise<Response<T>>;
|
|
112
|
+
/**
|
|
113
|
+
* Read CRM campaign queue depth and Azure/system email rate-limit windows.
|
|
114
|
+
*/
|
|
115
|
+
static getCampaignDeliveryStatus<T>(): AxiosPromise<Response<T>>;
|
|
116
|
+
/**
|
|
117
|
+
* Materialize and queue a CRM campaign, optionally with a limit or dispatch=false.
|
|
118
|
+
*/
|
|
119
|
+
static sendCampaign<T>(campaign_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
120
|
+
/**
|
|
121
|
+
* Refresh and read CRM campaign engagement, reply, and conversion stats.
|
|
122
|
+
*/
|
|
123
|
+
static getCampaignStats<T>(campaign_id: string): AxiosPromise<Response<T>>;
|
|
124
|
+
/**
|
|
125
|
+
* List campaign recipient audit rows with optional status or variant filters.
|
|
126
|
+
*/
|
|
127
|
+
static listCampaignRecipients<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
128
|
+
/**
|
|
129
|
+
* Validate external prospect rows and preview field mapping/dedupe outcomes.
|
|
130
|
+
*/
|
|
131
|
+
static previewCampaignProspectImport<T>(prospects: object[], options?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
132
|
+
/**
|
|
133
|
+
* Import external prospects into CRM leads and contacts for future campaigns.
|
|
134
|
+
*/
|
|
135
|
+
static importCampaignProspects<T>(prospects: object[], options?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
88
136
|
}
|
|
89
137
|
export default Crm;
|
package/dist/esm/index.js
CHANGED
|
@@ -18461,6 +18461,19 @@ var CrmRoute = /** @class */ (function () {
|
|
|
18461
18461
|
bulkApprove: { url: '/admin/crm/contacts/bulk-approve', method: HTTP_METHODS.POST },
|
|
18462
18462
|
updateContact: { url: '/admin/crm/contacts/{contact_id}', method: HTTP_METHODS.PUT },
|
|
18463
18463
|
deleteContact: { url: '/admin/crm/contacts/{contact_id}', method: HTTP_METHODS.DELETE },
|
|
18464
|
+
// Newsletter and Campaign Management
|
|
18465
|
+
listCampaigns: { url: '/admin/crm/campaigns', method: HTTP_METHODS.GET },
|
|
18466
|
+
createCampaign: { url: '/admin/crm/campaigns', method: HTTP_METHODS.POST },
|
|
18467
|
+
viewCampaign: { url: '/admin/crm/campaigns/{campaign_id}', method: HTTP_METHODS.GET },
|
|
18468
|
+
updateCampaign: { url: '/admin/crm/campaigns/{campaign_id}', method: HTTP_METHODS.PUT },
|
|
18469
|
+
deleteCampaign: { url: '/admin/crm/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
|
|
18470
|
+
previewCampaignAudience: { url: '/admin/crm/campaigns/preview', method: HTTP_METHODS.POST },
|
|
18471
|
+
getCampaignDeliveryStatus: { url: '/admin/crm/campaigns/delivery-status', method: HTTP_METHODS.GET },
|
|
18472
|
+
sendCampaign: { url: '/admin/crm/campaigns/{campaign_id}/send', method: HTTP_METHODS.POST },
|
|
18473
|
+
getCampaignStats: { url: '/admin/crm/campaigns/{campaign_id}/stats', method: HTTP_METHODS.GET },
|
|
18474
|
+
listCampaignRecipients: { url: '/admin/crm/campaigns/{campaign_id}/recipients', method: HTTP_METHODS.GET },
|
|
18475
|
+
previewCampaignProspectImport: { url: '/admin/crm/campaigns/import-prospects/preview', method: HTTP_METHODS.POST },
|
|
18476
|
+
importCampaignProspects: { url: '/admin/crm/campaigns/import-prospects', method: HTTP_METHODS.POST },
|
|
18464
18477
|
// Automation Triggers
|
|
18465
18478
|
triggerSourcing: { url: '/admin/crm/automation/source', method: HTTP_METHODS.POST },
|
|
18466
18479
|
triggerSync: { url: '/admin/crm/automation/sync', method: HTTP_METHODS.POST },
|
|
@@ -18601,6 +18614,81 @@ var Crm = /** @class */ (function () {
|
|
|
18601
18614
|
Crm.deleteContact = function (contact_id) {
|
|
18602
18615
|
return Requests.processRoute(CrmRoute.routes.deleteContact, {}, { contact_id: contact_id });
|
|
18603
18616
|
};
|
|
18617
|
+
/**
|
|
18618
|
+
* List CRM newsletter and mass-email campaigns.
|
|
18619
|
+
*/
|
|
18620
|
+
Crm.listCampaigns = function (params) {
|
|
18621
|
+
return Requests.processRoute(CrmRoute.routes.listCampaigns, undefined, undefined, params);
|
|
18622
|
+
};
|
|
18623
|
+
/**
|
|
18624
|
+
* Create a CRM campaign draft with filters, exclusions, and optional variants.
|
|
18625
|
+
*/
|
|
18626
|
+
Crm.createCampaign = function (data) {
|
|
18627
|
+
return Requests.processRoute(CrmRoute.routes.createCampaign, data);
|
|
18628
|
+
};
|
|
18629
|
+
/**
|
|
18630
|
+
* View a CRM campaign. Pass include_recipients in params for a small recipient sample.
|
|
18631
|
+
*/
|
|
18632
|
+
Crm.viewCampaign = function (campaign_id, params) {
|
|
18633
|
+
return Requests.processRoute(CrmRoute.routes.viewCampaign, {}, { campaign_id: campaign_id }, params);
|
|
18634
|
+
};
|
|
18635
|
+
/**
|
|
18636
|
+
* Update an editable CRM campaign draft or paused campaign.
|
|
18637
|
+
*/
|
|
18638
|
+
Crm.updateCampaign = function (campaign_id, data) {
|
|
18639
|
+
return Requests.processRoute(CrmRoute.routes.updateCampaign, data, { campaign_id: campaign_id });
|
|
18640
|
+
};
|
|
18641
|
+
/**
|
|
18642
|
+
* Delete an unsent CRM campaign draft.
|
|
18643
|
+
*/
|
|
18644
|
+
Crm.deleteCampaign = function (campaign_id) {
|
|
18645
|
+
return Requests.processRoute(CrmRoute.routes.deleteCampaign, {}, { campaign_id: campaign_id });
|
|
18646
|
+
};
|
|
18647
|
+
/**
|
|
18648
|
+
* Preview campaign audience filters and exclusions without creating recipients.
|
|
18649
|
+
*/
|
|
18650
|
+
Crm.previewCampaignAudience = function (data) {
|
|
18651
|
+
return Requests.processRoute(CrmRoute.routes.previewCampaignAudience, data);
|
|
18652
|
+
};
|
|
18653
|
+
/**
|
|
18654
|
+
* Read CRM campaign queue depth and Azure/system email rate-limit windows.
|
|
18655
|
+
*/
|
|
18656
|
+
Crm.getCampaignDeliveryStatus = function () {
|
|
18657
|
+
return Requests.processRoute(CrmRoute.routes.getCampaignDeliveryStatus);
|
|
18658
|
+
};
|
|
18659
|
+
/**
|
|
18660
|
+
* Materialize and queue a CRM campaign, optionally with a limit or dispatch=false.
|
|
18661
|
+
*/
|
|
18662
|
+
Crm.sendCampaign = function (campaign_id, data) {
|
|
18663
|
+
if (data === void 0) { data = {}; }
|
|
18664
|
+
return Requests.processRoute(CrmRoute.routes.sendCampaign, data, { campaign_id: campaign_id });
|
|
18665
|
+
};
|
|
18666
|
+
/**
|
|
18667
|
+
* Refresh and read CRM campaign engagement, reply, and conversion stats.
|
|
18668
|
+
*/
|
|
18669
|
+
Crm.getCampaignStats = function (campaign_id) {
|
|
18670
|
+
return Requests.processRoute(CrmRoute.routes.getCampaignStats, {}, { campaign_id: campaign_id });
|
|
18671
|
+
};
|
|
18672
|
+
/**
|
|
18673
|
+
* List campaign recipient audit rows with optional status or variant filters.
|
|
18674
|
+
*/
|
|
18675
|
+
Crm.listCampaignRecipients = function (campaign_id, params) {
|
|
18676
|
+
return Requests.processRoute(CrmRoute.routes.listCampaignRecipients, {}, { campaign_id: campaign_id }, params);
|
|
18677
|
+
};
|
|
18678
|
+
/**
|
|
18679
|
+
* Validate external prospect rows and preview field mapping/dedupe outcomes.
|
|
18680
|
+
*/
|
|
18681
|
+
Crm.previewCampaignProspectImport = function (prospects, options) {
|
|
18682
|
+
if (options === void 0) { options = {}; }
|
|
18683
|
+
return Requests.processRoute(CrmRoute.routes.previewCampaignProspectImport, __assign({ prospects: prospects }, options));
|
|
18684
|
+
};
|
|
18685
|
+
/**
|
|
18686
|
+
* Import external prospects into CRM leads and contacts for future campaigns.
|
|
18687
|
+
*/
|
|
18688
|
+
Crm.importCampaignProspects = function (prospects, options) {
|
|
18689
|
+
if (options === void 0) { options = {}; }
|
|
18690
|
+
return Requests.processRoute(CrmRoute.routes.importCampaignProspects, __assign({ prospects: prospects }, options));
|
|
18691
|
+
};
|
|
18604
18692
|
return Crm;
|
|
18605
18693
|
}());
|
|
18606
18694
|
|