glitch-javascript-sdk 3.2.18 → 3.2.20
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 +32 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Crm.d.ts +17 -1
- package/dist/esm/index.js +32 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +17 -1
- package/package.json +1 -1
- package/src/api/Crm.ts +30 -2
- package/src/routes/CrmRoute.ts +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -8406,6 +8406,18 @@ declare class Crm {
|
|
|
8406
8406
|
* Preview campaign audience filters and exclusions without creating recipients.
|
|
8407
8407
|
*/
|
|
8408
8408
|
static previewCampaignAudience<T>(data: object): AxiosPromise<Response<T>>;
|
|
8409
|
+
/**
|
|
8410
|
+
* List the backend-supported CRM campaign merge fields for the composer.
|
|
8411
|
+
*/
|
|
8412
|
+
static getCampaignMergeFields<T>(): AxiosPromise<Response<T>>;
|
|
8413
|
+
/**
|
|
8414
|
+
* Render CRM campaign content with the same merge-field engine used at send time.
|
|
8415
|
+
*/
|
|
8416
|
+
static renderCampaignTemplatePreview<T>(data: object): AxiosPromise<Response<T>>;
|
|
8417
|
+
/**
|
|
8418
|
+
* Read CRM campaign queue depth and Azure/system email rate-limit windows.
|
|
8419
|
+
*/
|
|
8420
|
+
static getCampaignDeliveryStatus<T>(): AxiosPromise<Response<T>>;
|
|
8409
8421
|
/**
|
|
8410
8422
|
* Materialize and queue a CRM campaign, optionally with a limit or dispatch=false.
|
|
8411
8423
|
*/
|
|
@@ -8418,10 +8430,14 @@ declare class Crm {
|
|
|
8418
8430
|
* List campaign recipient audit rows with optional status or variant filters.
|
|
8419
8431
|
*/
|
|
8420
8432
|
static listCampaignRecipients<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
8433
|
+
/**
|
|
8434
|
+
* Validate external prospect rows and preview field mapping/dedupe outcomes.
|
|
8435
|
+
*/
|
|
8436
|
+
static previewCampaignProspectImport<T>(prospects: object[], options?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
8421
8437
|
/**
|
|
8422
8438
|
* Import external prospects into CRM leads and contacts for future campaigns.
|
|
8423
8439
|
*/
|
|
8424
|
-
static importCampaignProspects<T>(prospects: object[]): AxiosPromise<Response<T>>;
|
|
8440
|
+
static importCampaignProspects<T>(prospects: object[], options?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
8425
8441
|
}
|
|
8426
8442
|
|
|
8427
8443
|
type MultiplayerLobbyType = 'public' | 'invisible' | 'friends_only' | 'private';
|
package/package.json
CHANGED
package/src/api/Crm.ts
CHANGED
|
@@ -193,6 +193,27 @@ class Crm {
|
|
|
193
193
|
return Requests.processRoute(CrmRoute.routes.previewCampaignAudience, data);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
/**
|
|
197
|
+
* List the backend-supported CRM campaign merge fields for the composer.
|
|
198
|
+
*/
|
|
199
|
+
public static getCampaignMergeFields<T>(): AxiosPromise<Response<T>> {
|
|
200
|
+
return Requests.processRoute(CrmRoute.routes.getCampaignMergeFields);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Render CRM campaign content with the same merge-field engine used at send time.
|
|
205
|
+
*/
|
|
206
|
+
public static renderCampaignTemplatePreview<T>(data: object): AxiosPromise<Response<T>> {
|
|
207
|
+
return Requests.processRoute(CrmRoute.routes.renderCampaignTemplatePreview, data);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Read CRM campaign queue depth and Azure/system email rate-limit windows.
|
|
212
|
+
*/
|
|
213
|
+
public static getCampaignDeliveryStatus<T>(): AxiosPromise<Response<T>> {
|
|
214
|
+
return Requests.processRoute(CrmRoute.routes.getCampaignDeliveryStatus);
|
|
215
|
+
}
|
|
216
|
+
|
|
196
217
|
/**
|
|
197
218
|
* Materialize and queue a CRM campaign, optionally with a limit or dispatch=false.
|
|
198
219
|
*/
|
|
@@ -214,11 +235,18 @@ class Crm {
|
|
|
214
235
|
return Requests.processRoute(CrmRoute.routes.listCampaignRecipients, {}, { campaign_id }, params);
|
|
215
236
|
}
|
|
216
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Validate external prospect rows and preview field mapping/dedupe outcomes.
|
|
240
|
+
*/
|
|
241
|
+
public static previewCampaignProspectImport<T>(prospects: object[], options: Record<string, any> = {}): AxiosPromise<Response<T>> {
|
|
242
|
+
return Requests.processRoute(CrmRoute.routes.previewCampaignProspectImport, { prospects, ...options });
|
|
243
|
+
}
|
|
244
|
+
|
|
217
245
|
/**
|
|
218
246
|
* Import external prospects into CRM leads and contacts for future campaigns.
|
|
219
247
|
*/
|
|
220
|
-
public static importCampaignProspects<T>(prospects: object[]): AxiosPromise<Response<T>> {
|
|
221
|
-
return Requests.processRoute(CrmRoute.routes.importCampaignProspects, { prospects });
|
|
248
|
+
public static importCampaignProspects<T>(prospects: object[], options: Record<string, any> = {}): AxiosPromise<Response<T>> {
|
|
249
|
+
return Requests.processRoute(CrmRoute.routes.importCampaignProspects, { prospects, ...options });
|
|
222
250
|
}
|
|
223
251
|
|
|
224
252
|
}
|
package/src/routes/CrmRoute.ts
CHANGED
|
@@ -31,9 +31,13 @@ class CrmRoute {
|
|
|
31
31
|
updateCampaign: { url: '/admin/crm/campaigns/{campaign_id}', method: HTTP_METHODS.PUT },
|
|
32
32
|
deleteCampaign: { url: '/admin/crm/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
|
|
33
33
|
previewCampaignAudience: { url: '/admin/crm/campaigns/preview', method: HTTP_METHODS.POST },
|
|
34
|
+
getCampaignMergeFields: { url: '/admin/crm/campaigns/merge-fields', method: HTTP_METHODS.GET },
|
|
35
|
+
renderCampaignTemplatePreview: { url: '/admin/crm/campaigns/render-preview', method: HTTP_METHODS.POST },
|
|
36
|
+
getCampaignDeliveryStatus: { url: '/admin/crm/campaigns/delivery-status', method: HTTP_METHODS.GET },
|
|
34
37
|
sendCampaign: { url: '/admin/crm/campaigns/{campaign_id}/send', method: HTTP_METHODS.POST },
|
|
35
38
|
getCampaignStats: { url: '/admin/crm/campaigns/{campaign_id}/stats', method: HTTP_METHODS.GET },
|
|
36
39
|
listCampaignRecipients: { url: '/admin/crm/campaigns/{campaign_id}/recipients', method: HTTP_METHODS.GET },
|
|
40
|
+
previewCampaignProspectImport: { url: '/admin/crm/campaigns/import-prospects/preview', method: HTTP_METHODS.POST },
|
|
37
41
|
importCampaignProspects: { url: '/admin/crm/campaigns/import-prospects', method: HTTP_METHODS.POST },
|
|
38
42
|
|
|
39
43
|
// Automation Triggers
|