@parra/parra-js-sdk 0.2.117 → 0.2.119
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/ParraAPI.d.ts +8 -7
- package/dist/ParraAPI.js +6 -1
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -381,8 +381,8 @@ export interface CampaignCollectionResponse {
|
|
|
381
381
|
}
|
|
382
382
|
export declare type CampaignListResponse = Array<Campaign>;
|
|
383
383
|
export interface UpdateCampaignTriggerRequestBody {
|
|
384
|
-
type
|
|
385
|
-
analytic_event_type_id
|
|
384
|
+
type: string;
|
|
385
|
+
analytic_event_type_id?: string | null;
|
|
386
386
|
}
|
|
387
387
|
export declare type UpdateCampaignTriggerList = Array<UpdateCampaignTriggerRequestBody>;
|
|
388
388
|
export interface CampaignTrigger {
|
|
@@ -390,8 +390,8 @@ export interface CampaignTrigger {
|
|
|
390
390
|
created_at: string;
|
|
391
391
|
updated_at: string;
|
|
392
392
|
deleted_at?: string | null;
|
|
393
|
-
type
|
|
394
|
-
analytic_event_type_id
|
|
393
|
+
type: string;
|
|
394
|
+
analytic_event_type_id?: string | null;
|
|
395
395
|
}
|
|
396
396
|
export declare type CampaignTriggerList = Array<CampaignTrigger>;
|
|
397
397
|
export declare enum CampaignActionType {
|
|
@@ -1028,6 +1028,7 @@ declare class ParraAPI {
|
|
|
1028
1028
|
updateCampaignById: (tenant_id: string, campaign_id: string, body?: UpdateCampaignRequestBody | undefined) => Promise<Campaign>;
|
|
1029
1029
|
deleteCampaignById: (tenant_id: string, campaign_id: string) => Promise<Response>;
|
|
1030
1030
|
publishCampaignById: (tenant_id: string, campaign_id: string, body?: UpdateCampaignRequestBody | undefined) => Promise<Campaign>;
|
|
1031
|
+
enrollEligibleUsersForCampaignById: (campaign_id: string) => Promise<Response>;
|
|
1031
1032
|
closeCampaignById: (tenant_id: string, campaign_id: string) => Promise<Campaign>;
|
|
1032
1033
|
getCards: (query?: {
|
|
1033
1034
|
app_area_id?: string | undefined;
|
|
@@ -1044,9 +1045,9 @@ declare class ParraAPI {
|
|
|
1044
1045
|
$expand?: string | undefined;
|
|
1045
1046
|
$search?: string | undefined;
|
|
1046
1047
|
} | undefined) => Promise<QuestionCollectionResponse>;
|
|
1047
|
-
getQuestionById: (question_id: string, query
|
|
1048
|
-
campaign_id
|
|
1049
|
-
}) => Promise<Question>;
|
|
1048
|
+
getQuestionById: (question_id: string, query?: {
|
|
1049
|
+
campaign_id?: string | undefined;
|
|
1050
|
+
} | undefined) => Promise<Question>;
|
|
1050
1051
|
updateQuestionById: (question_id: string, body?: UpdateQuestionRequestBody | undefined) => Promise<Question>;
|
|
1051
1052
|
deleteQuestionById: (question_id: string) => Promise<Response>;
|
|
1052
1053
|
createMetricsForQuestionById: (question_id: string, body?: CreateQuestionMetricsRequestBody | undefined) => Promise<QuestionMetrics>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -335,7 +335,7 @@ var ParraAPI = /** @class */ (function () {
|
|
|
335
335
|
};
|
|
336
336
|
this.updateCampaignById = function (tenant_id, campaign_id, body) {
|
|
337
337
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/campaigns/").concat(campaign_id), {
|
|
338
|
-
method: "
|
|
338
|
+
method: "put",
|
|
339
339
|
body: JSON.stringify(body),
|
|
340
340
|
headers: {
|
|
341
341
|
"content-type": "application/json",
|
|
@@ -356,6 +356,11 @@ var ParraAPI = /** @class */ (function () {
|
|
|
356
356
|
},
|
|
357
357
|
});
|
|
358
358
|
};
|
|
359
|
+
this.enrollEligibleUsersForCampaignById = function (campaign_id) {
|
|
360
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/campaigns/").concat(campaign_id, "/enroll"), {
|
|
361
|
+
method: "post",
|
|
362
|
+
});
|
|
363
|
+
};
|
|
359
364
|
this.closeCampaignById = function (tenant_id, campaign_id) {
|
|
360
365
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/campaigns/").concat(campaign_id, "/close"), {
|
|
361
366
|
method: "post",
|