@parra/parra-js-sdk 0.2.95 → 0.2.98
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 +83 -1
- package/dist/ParraAPI.js +17 -1
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -575,6 +575,70 @@ export interface Session {
|
|
|
575
575
|
user_properties?: Map<string, any> | null;
|
|
576
576
|
events?: Array<Event>;
|
|
577
577
|
}
|
|
578
|
+
export interface UpdateTemplateRequestBody {
|
|
579
|
+
description?: string | null;
|
|
580
|
+
}
|
|
581
|
+
export interface CreateTemplateRequestBody {
|
|
582
|
+
description?: string | null;
|
|
583
|
+
title: string;
|
|
584
|
+
}
|
|
585
|
+
export declare enum TemplateType {
|
|
586
|
+
question = "question"
|
|
587
|
+
}
|
|
588
|
+
export interface TemplateStub {
|
|
589
|
+
id: string;
|
|
590
|
+
created_at: string;
|
|
591
|
+
updated_at: string;
|
|
592
|
+
deleted_at?: string | null;
|
|
593
|
+
tenant_id: string;
|
|
594
|
+
question_id?: string | null;
|
|
595
|
+
title: string;
|
|
596
|
+
description?: string | null;
|
|
597
|
+
type: TemplateType;
|
|
598
|
+
}
|
|
599
|
+
export interface Template {
|
|
600
|
+
id: string;
|
|
601
|
+
created_at: string;
|
|
602
|
+
updated_at: string;
|
|
603
|
+
deleted_at?: string | null;
|
|
604
|
+
tenant_id: string;
|
|
605
|
+
question_id?: string | null;
|
|
606
|
+
title: string;
|
|
607
|
+
description?: string | null;
|
|
608
|
+
type: TemplateType;
|
|
609
|
+
question?: Question;
|
|
610
|
+
}
|
|
611
|
+
export interface TemplateCollectionResponse {
|
|
612
|
+
page: number;
|
|
613
|
+
page_count: number;
|
|
614
|
+
page_size: number;
|
|
615
|
+
total_count: number;
|
|
616
|
+
data: Array<Template>;
|
|
617
|
+
}
|
|
618
|
+
export declare type TemplateResponse = Array<Template>;
|
|
619
|
+
export interface UpdateTemplateTagRequestBody {
|
|
620
|
+
description?: string | null;
|
|
621
|
+
}
|
|
622
|
+
export interface CreateTemplateTagRequestBody {
|
|
623
|
+
description?: string | null;
|
|
624
|
+
title: string;
|
|
625
|
+
}
|
|
626
|
+
export interface TemplateTag {
|
|
627
|
+
id: string;
|
|
628
|
+
created_at: string;
|
|
629
|
+
updated_at: string;
|
|
630
|
+
deleted_at?: string | null;
|
|
631
|
+
title: string;
|
|
632
|
+
description?: string | null;
|
|
633
|
+
}
|
|
634
|
+
export interface TemplateTagCollectionResponse {
|
|
635
|
+
page: number;
|
|
636
|
+
page_count: number;
|
|
637
|
+
page_size: number;
|
|
638
|
+
total_count: number;
|
|
639
|
+
data: Array<TemplateTag>;
|
|
640
|
+
}
|
|
641
|
+
export declare type TemplateTagResponse = Array<TemplateTag>;
|
|
578
642
|
export interface TenantUserStub {
|
|
579
643
|
id: string;
|
|
580
644
|
created_at: string;
|
|
@@ -755,7 +819,7 @@ declare class ParraAPI {
|
|
|
755
819
|
$filter?: string | undefined;
|
|
756
820
|
$expand?: string | undefined;
|
|
757
821
|
$search?: string | undefined;
|
|
758
|
-
} | undefined) => Promise<
|
|
822
|
+
} | undefined) => Promise<AnalyticEventTypeCollectionResponse>;
|
|
759
823
|
getAnalyticEventTypeById: (tenant_id: string, analytic_event_type_id: string) => Promise<AnalyticEventType>;
|
|
760
824
|
updateAnalyticEventTypeById: (tenant_id: string, analytic_event_type_id: string, body?: UpdateAnalyticEventTypeRequestBody | undefined) => Promise<AnalyticEventType>;
|
|
761
825
|
deleteAnalyticEventTypeById: (tenant_id: string, analytic_event_type_id: string) => Promise<Response>;
|
|
@@ -799,6 +863,24 @@ declare class ParraAPI {
|
|
|
799
863
|
createMetricsForQuestionById: (question_id: string) => Promise<QuestionMetrics>;
|
|
800
864
|
answerQuestionById: (question_id: string, body?: AnswerQuestionBody | undefined) => Promise<Response>;
|
|
801
865
|
bulkAnswerQuestions: (body?: BulkAnswerQuestionsBody | undefined) => Promise<Response>;
|
|
866
|
+
paginateTemplateTags: (query?: {
|
|
867
|
+
$select?: string | undefined;
|
|
868
|
+
$top?: number | undefined;
|
|
869
|
+
$skip?: number | undefined;
|
|
870
|
+
$orderby?: string | undefined;
|
|
871
|
+
$filter?: string | undefined;
|
|
872
|
+
$expand?: string | undefined;
|
|
873
|
+
$search?: string | undefined;
|
|
874
|
+
} | undefined) => Promise<TemplateTagCollectionResponse>;
|
|
875
|
+
paginateTemplatesForTenantById: (tenant_id: string, query?: {
|
|
876
|
+
$select?: string | undefined;
|
|
877
|
+
$top?: number | undefined;
|
|
878
|
+
$skip?: number | undefined;
|
|
879
|
+
$orderby?: string | undefined;
|
|
880
|
+
$filter?: string | undefined;
|
|
881
|
+
$expand?: string | undefined;
|
|
882
|
+
$search?: string | undefined;
|
|
883
|
+
} | undefined) => Promise<TemplateCollectionResponse>;
|
|
802
884
|
paginateTenantUsersForTenantById: (tenant_id: string, query?: {
|
|
803
885
|
$select?: string | undefined;
|
|
804
886
|
$top?: number | undefined;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuestionStatus = exports.QuestionKind = exports.QuestionType = exports.CardItemType = exports.CampaignStatus = exports.SubscriptionStatus = exports.Interval = exports.Currency = void 0;
|
|
3
|
+
exports.TemplateType = exports.QuestionStatus = exports.QuestionKind = exports.QuestionType = exports.CardItemType = exports.CampaignStatus = exports.SubscriptionStatus = exports.Interval = exports.Currency = void 0;
|
|
4
4
|
var Currency;
|
|
5
5
|
(function (Currency) {
|
|
6
6
|
Currency["usd"] = "usd";
|
|
@@ -50,6 +50,10 @@ var QuestionStatus;
|
|
|
50
50
|
QuestionStatus["open"] = "open";
|
|
51
51
|
QuestionStatus["closed"] = "closed";
|
|
52
52
|
})(QuestionStatus = exports.QuestionStatus || (exports.QuestionStatus = {}));
|
|
53
|
+
var TemplateType;
|
|
54
|
+
(function (TemplateType) {
|
|
55
|
+
TemplateType["question"] = "question";
|
|
56
|
+
})(TemplateType = exports.TemplateType || (exports.TemplateType = {}));
|
|
53
57
|
var ParraAPI = /** @class */ (function () {
|
|
54
58
|
function ParraAPI(http, options) {
|
|
55
59
|
var _this = this;
|
|
@@ -406,6 +410,18 @@ var ParraAPI = /** @class */ (function () {
|
|
|
406
410
|
raw: true,
|
|
407
411
|
});
|
|
408
412
|
};
|
|
413
|
+
this.paginateTemplateTags = function (query) {
|
|
414
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/templates/tags"), {
|
|
415
|
+
method: "get",
|
|
416
|
+
query: query,
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
this.paginateTemplatesForTenantById = function (tenant_id, query) {
|
|
420
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/templates"), {
|
|
421
|
+
method: "get",
|
|
422
|
+
query: query,
|
|
423
|
+
});
|
|
424
|
+
};
|
|
409
425
|
this.paginateTenantUsersForTenantById = function (tenant_id, query) {
|
|
410
426
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users"), {
|
|
411
427
|
method: "get",
|