@parra/parra-js-sdk 0.2.113 → 0.2.114
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 +17 -29
- package/dist/ParraAPI.js +6 -11
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -342,6 +342,7 @@ export interface UpdateCampaignRequestBody {
|
|
|
342
342
|
description?: string | null;
|
|
343
343
|
start_at?: string | null;
|
|
344
344
|
end_at?: string | null;
|
|
345
|
+
paused_at?: string | null;
|
|
345
346
|
triggers?: UpdateCampaignTriggerList;
|
|
346
347
|
actions?: UpdateCampaignActionList;
|
|
347
348
|
}
|
|
@@ -350,6 +351,7 @@ export interface CreateCampaignRequestBody {
|
|
|
350
351
|
description?: string | null;
|
|
351
352
|
start_at?: string | null;
|
|
352
353
|
end_at?: string | null;
|
|
354
|
+
paused_at?: string | null;
|
|
353
355
|
triggers?: UpdateCampaignTriggerList;
|
|
354
356
|
actions?: UpdateCampaignActionList;
|
|
355
357
|
}
|
|
@@ -433,6 +435,7 @@ export interface Answer {
|
|
|
433
435
|
question_id: string;
|
|
434
436
|
user_id: string;
|
|
435
437
|
tenant_id: string;
|
|
438
|
+
campaign_id?: string | null;
|
|
436
439
|
data: AnswerData;
|
|
437
440
|
}
|
|
438
441
|
export interface AnswerQuestionBody {
|
|
@@ -444,11 +447,20 @@ export interface BulkAnswerQuestionBody {
|
|
|
444
447
|
}
|
|
445
448
|
export declare type BulkAnswerQuestionsBody = Array<BulkAnswerQuestionBody>;
|
|
446
449
|
export declare type CardItemData = Question;
|
|
450
|
+
export declare enum CardItemDisplayType {
|
|
451
|
+
inline = "inline",
|
|
452
|
+
popup = "popup"
|
|
453
|
+
}
|
|
447
454
|
export declare enum CardItemType {
|
|
448
455
|
question = "question"
|
|
449
456
|
}
|
|
450
457
|
export interface CardItem {
|
|
458
|
+
id: string;
|
|
459
|
+
campaign_id: string;
|
|
460
|
+
campaign_action_id: string;
|
|
461
|
+
question_id?: string | null;
|
|
451
462
|
type: CardItemType;
|
|
463
|
+
display_type?: CardItemDisplayType;
|
|
452
464
|
version: string;
|
|
453
465
|
data: CardItemData;
|
|
454
466
|
}
|
|
@@ -601,57 +613,29 @@ export declare type QuestionData = ChoiceQuestionBody | CheckboxQuestionBody | I
|
|
|
601
613
|
export interface UpdateQuestionRequestBody {
|
|
602
614
|
title: string;
|
|
603
615
|
subtitle?: string | null;
|
|
604
|
-
app_area_id?: string | null;
|
|
605
616
|
data: MutableQuestionData;
|
|
606
|
-
active?: boolean;
|
|
607
|
-
expires_at?: string | null;
|
|
608
|
-
answer_quota?: number | null;
|
|
609
|
-
show_expires_at: boolean;
|
|
610
|
-
show_answer_count: boolean;
|
|
611
|
-
show_answer_quota: boolean;
|
|
612
617
|
}
|
|
613
618
|
export interface CreateQuestionRequestBody {
|
|
614
619
|
title: string;
|
|
615
620
|
subtitle?: string | null;
|
|
616
|
-
app_area_id?: string | null;
|
|
617
621
|
data: MutableQuestionData;
|
|
618
|
-
active?: boolean;
|
|
619
|
-
expires_at?: string | null;
|
|
620
|
-
answer_quota?: number | null;
|
|
621
|
-
show_expires_at: boolean;
|
|
622
|
-
show_answer_count: boolean;
|
|
623
|
-
show_answer_quota: boolean;
|
|
624
622
|
type: QuestionType;
|
|
625
623
|
kind: QuestionKind;
|
|
626
624
|
}
|
|
627
|
-
export declare enum QuestionStatus {
|
|
628
|
-
open = "open",
|
|
629
|
-
closed = "closed"
|
|
630
|
-
}
|
|
631
625
|
export interface Question {
|
|
632
626
|
id: string;
|
|
633
627
|
created_at: string;
|
|
634
628
|
updated_at: string;
|
|
635
629
|
deleted_at?: string | null;
|
|
636
|
-
status: QuestionStatus;
|
|
637
630
|
tenant_id: string;
|
|
638
631
|
title: string;
|
|
639
632
|
subtitle?: string | null;
|
|
640
|
-
app_area_id?: string | null;
|
|
641
633
|
type: QuestionType;
|
|
642
634
|
kind: QuestionKind;
|
|
643
635
|
data: QuestionData;
|
|
644
|
-
active?: boolean;
|
|
645
|
-
answer_quota?: number | null;
|
|
646
636
|
answer_count?: number | null;
|
|
647
|
-
show_answer_count: boolean;
|
|
648
|
-
show_answer_quota: boolean;
|
|
649
|
-
show_expires_at: boolean;
|
|
650
|
-
expires_at?: string | null;
|
|
651
|
-
closed_at?: string | null;
|
|
652
637
|
answer?: Answer;
|
|
653
638
|
metrics?: QuestionMetrics;
|
|
654
|
-
app_area?: AppArea;
|
|
655
639
|
}
|
|
656
640
|
export interface QuestionCollectionResponse {
|
|
657
641
|
page: number;
|
|
@@ -757,6 +741,11 @@ export interface Session {
|
|
|
757
741
|
user_properties?: Map<string, any> | null;
|
|
758
742
|
events?: Array<Event>;
|
|
759
743
|
}
|
|
744
|
+
export interface ReportSessionResponse {
|
|
745
|
+
should_poll: boolean;
|
|
746
|
+
retry_delay: number;
|
|
747
|
+
retry_times: number;
|
|
748
|
+
}
|
|
760
749
|
export interface UpdateTemplateRequestBody {
|
|
761
750
|
description?: string | null;
|
|
762
751
|
}
|
|
@@ -1049,7 +1038,6 @@ declare class ParraAPI {
|
|
|
1049
1038
|
getQuestionById: (question_id: string) => Promise<Question>;
|
|
1050
1039
|
updateQuestionById: (question_id: string, body?: UpdateQuestionRequestBody | undefined) => Promise<Question>;
|
|
1051
1040
|
deleteQuestionById: (question_id: string) => Promise<Response>;
|
|
1052
|
-
closeQuestionById: (question_id: string) => Promise<Response>;
|
|
1053
1041
|
createMetricsForQuestionById: (question_id: string) => Promise<QuestionMetrics>;
|
|
1054
1042
|
answerQuestionById: (question_id: string, body?: AnswerQuestionBody | undefined) => Promise<Response>;
|
|
1055
1043
|
paginateAnswersForQuestionById: (question_id: string, query?: {
|
package/dist/ParraAPI.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TemplateType = exports.
|
|
3
|
+
exports.TemplateType = exports.QuestionKind = exports.QuestionType = exports.CardItemType = exports.CardItemDisplayType = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CampaignStatus = exports.SubscriptionStatus = exports.Interval = exports.Currency = void 0;
|
|
4
4
|
var Currency;
|
|
5
5
|
(function (Currency) {
|
|
6
6
|
Currency["usd"] = "usd";
|
|
@@ -39,6 +39,11 @@ var CampaignActionDisplayType;
|
|
|
39
39
|
CampaignActionDisplayType["popup"] = "popup";
|
|
40
40
|
CampaignActionDisplayType["inline"] = "inline";
|
|
41
41
|
})(CampaignActionDisplayType = exports.CampaignActionDisplayType || (exports.CampaignActionDisplayType = {}));
|
|
42
|
+
var CardItemDisplayType;
|
|
43
|
+
(function (CardItemDisplayType) {
|
|
44
|
+
CardItemDisplayType["inline"] = "inline";
|
|
45
|
+
CardItemDisplayType["popup"] = "popup";
|
|
46
|
+
})(CardItemDisplayType = exports.CardItemDisplayType || (exports.CardItemDisplayType = {}));
|
|
42
47
|
var CardItemType;
|
|
43
48
|
(function (CardItemType) {
|
|
44
49
|
CardItemType["question"] = "question";
|
|
@@ -66,11 +71,6 @@ var QuestionKind;
|
|
|
66
71
|
QuestionKind["rankedChoice"] = "ranked-choice";
|
|
67
72
|
QuestionKind["tag"] = "tag";
|
|
68
73
|
})(QuestionKind = exports.QuestionKind || (exports.QuestionKind = {}));
|
|
69
|
-
var QuestionStatus;
|
|
70
|
-
(function (QuestionStatus) {
|
|
71
|
-
QuestionStatus["open"] = "open";
|
|
72
|
-
QuestionStatus["closed"] = "closed";
|
|
73
|
-
})(QuestionStatus = exports.QuestionStatus || (exports.QuestionStatus = {}));
|
|
74
74
|
var TemplateType;
|
|
75
75
|
(function (TemplateType) {
|
|
76
76
|
TemplateType["question"] = "question";
|
|
@@ -416,11 +416,6 @@ var ParraAPI = /** @class */ (function () {
|
|
|
416
416
|
method: "delete",
|
|
417
417
|
});
|
|
418
418
|
};
|
|
419
|
-
this.closeQuestionById = function (question_id) {
|
|
420
|
-
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/questions/").concat(question_id, "/close"), {
|
|
421
|
-
method: "post",
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
419
|
this.createMetricsForQuestionById = function (question_id) {
|
|
425
420
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/questions/").concat(question_id, "/metrics"), {
|
|
426
421
|
method: "post",
|