@parra/parra-js-sdk 0.3.25 → 0.3.29
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 +36 -9
- package/dist/ParraAPI.js +33 -1
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -821,13 +821,6 @@ export declare enum TicketType {
|
|
|
821
821
|
feature = "feature",
|
|
822
822
|
improvement = "improvement"
|
|
823
823
|
}
|
|
824
|
-
export interface UpdateTicketRequestBody {
|
|
825
|
-
title: string;
|
|
826
|
-
type: TicketType;
|
|
827
|
-
description?: string | null;
|
|
828
|
-
voting_enabled: boolean;
|
|
829
|
-
is_public: boolean;
|
|
830
|
-
}
|
|
831
824
|
export interface CreateTicketRequestBody {
|
|
832
825
|
title: string;
|
|
833
826
|
type: TicketType;
|
|
@@ -855,8 +848,8 @@ export interface Ticket {
|
|
|
855
848
|
voting_enabled: boolean;
|
|
856
849
|
is_public: boolean;
|
|
857
850
|
tenant_id: string;
|
|
858
|
-
status: TicketStatus;
|
|
859
851
|
vote_count: number;
|
|
852
|
+
status: TicketStatus;
|
|
860
853
|
}
|
|
861
854
|
export interface TicketCollectionResponse {
|
|
862
855
|
page: number;
|
|
@@ -903,6 +896,36 @@ export interface UserNoteCollectionResponse {
|
|
|
903
896
|
total_count: number;
|
|
904
897
|
data: Array<UserNote>;
|
|
905
898
|
}
|
|
899
|
+
export interface UpdateTicketRequestBody {
|
|
900
|
+
title?: string;
|
|
901
|
+
type?: TicketType;
|
|
902
|
+
status?: TicketStatus;
|
|
903
|
+
description?: string | null;
|
|
904
|
+
voting_enabled?: boolean;
|
|
905
|
+
is_public?: boolean;
|
|
906
|
+
}
|
|
907
|
+
export declare enum TicketDisplayStatus {
|
|
908
|
+
pending = "pending",
|
|
909
|
+
upcoming = "upcoming",
|
|
910
|
+
inProgress = "in_progress",
|
|
911
|
+
live = "live",
|
|
912
|
+
rejected = "rejected"
|
|
913
|
+
}
|
|
914
|
+
export interface UserTicket {
|
|
915
|
+
id: string;
|
|
916
|
+
created_at: string;
|
|
917
|
+
updated_at: string;
|
|
918
|
+
deleted_at?: string | null;
|
|
919
|
+
title: string;
|
|
920
|
+
type: TicketType;
|
|
921
|
+
description?: string | null;
|
|
922
|
+
status: TicketStatus;
|
|
923
|
+
display_status: TicketDisplayStatus;
|
|
924
|
+
display_status_badge_title: string;
|
|
925
|
+
vote_count: number;
|
|
926
|
+
voting_enabled: boolean;
|
|
927
|
+
voted: boolean;
|
|
928
|
+
}
|
|
906
929
|
export declare enum ApplicationType {
|
|
907
930
|
ios = "ios"
|
|
908
931
|
}
|
|
@@ -1316,7 +1339,7 @@ declare class ParraAPI {
|
|
|
1316
1339
|
}) => Promise<TemplateTagCollectionResponse>;
|
|
1317
1340
|
createBoardForTenantById: (tenant_id: string, body?: CreateBoardRequestBody) => Promise<Board>;
|
|
1318
1341
|
listBoardsForTenantById: (tenant_id: string) => Promise<Array<Board>>;
|
|
1319
|
-
createTicketForBoard: (tenant_id: string, board_id: string, body
|
|
1342
|
+
createTicketForBoard: (tenant_id: string, board_id: string, body: CreateTicketRequestBody) => Promise<Ticket>;
|
|
1320
1343
|
paginateTicketsForBoard: (tenant_id: string, board_id: string, query?: {
|
|
1321
1344
|
$select?: string;
|
|
1322
1345
|
$top?: number;
|
|
@@ -1335,6 +1358,10 @@ declare class ParraAPI {
|
|
|
1335
1358
|
$expand?: string;
|
|
1336
1359
|
$search?: string;
|
|
1337
1360
|
}) => Promise<UserNoteCollectionResponse>;
|
|
1361
|
+
updateTicketById: (tenant_id: string, ticket_id: string, body?: UpdateTicketRequestBody) => Promise<Ticket>;
|
|
1362
|
+
deleteTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
|
|
1363
|
+
voteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
|
|
1364
|
+
removeVoteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
|
|
1338
1365
|
createApplicationForTenantById: (tenant_id: string, body: CreateApplicationRequestBody) => Promise<Application>;
|
|
1339
1366
|
paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
|
|
1340
1367
|
getApplicationByIdForTenantById: (tenant_id: string, application_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.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.ApplicationType = exports.UserNoteStatus = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.FormIntegrationType = exports.FeedbackFormFieldType = exports.QuestionKind = exports.QuestionType = exports.CardItemDisplayType = exports.CardItemType = exports.SubscriptionStatus = exports.Currency = exports.Interval = void 0;
|
|
3
|
+
exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.ApplicationType = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.FormIntegrationType = exports.FeedbackFormFieldType = exports.QuestionKind = exports.QuestionType = exports.CardItemDisplayType = exports.CardItemType = exports.SubscriptionStatus = exports.Currency = exports.Interval = void 0;
|
|
4
4
|
var Interval;
|
|
5
5
|
(function (Interval) {
|
|
6
6
|
Interval["monthly"] = "monthly";
|
|
@@ -108,6 +108,14 @@ var UserNoteStatus;
|
|
|
108
108
|
UserNoteStatus["accepted"] = "accepted";
|
|
109
109
|
UserNoteStatus["rejected"] = "rejected";
|
|
110
110
|
})(UserNoteStatus || (exports.UserNoteStatus = UserNoteStatus = {}));
|
|
111
|
+
var TicketDisplayStatus;
|
|
112
|
+
(function (TicketDisplayStatus) {
|
|
113
|
+
TicketDisplayStatus["pending"] = "pending";
|
|
114
|
+
TicketDisplayStatus["upcoming"] = "upcoming";
|
|
115
|
+
TicketDisplayStatus["inProgress"] = "in_progress";
|
|
116
|
+
TicketDisplayStatus["live"] = "live";
|
|
117
|
+
TicketDisplayStatus["rejected"] = "rejected";
|
|
118
|
+
})(TicketDisplayStatus || (exports.TicketDisplayStatus = TicketDisplayStatus = {}));
|
|
111
119
|
var ApplicationType;
|
|
112
120
|
(function (ApplicationType) {
|
|
113
121
|
ApplicationType["ios"] = "ios";
|
|
@@ -483,6 +491,30 @@ var ParraAPI = /** @class */ (function () {
|
|
|
483
491
|
query: query,
|
|
484
492
|
});
|
|
485
493
|
};
|
|
494
|
+
this.updateTicketById = function (tenant_id, ticket_id, body) {
|
|
495
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id), {
|
|
496
|
+
method: "patch",
|
|
497
|
+
body: JSON.stringify(body),
|
|
498
|
+
headers: {
|
|
499
|
+
"content-type": "application/json",
|
|
500
|
+
},
|
|
501
|
+
});
|
|
502
|
+
};
|
|
503
|
+
this.deleteTicketById = function (tenant_id, ticket_id) {
|
|
504
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id), {
|
|
505
|
+
method: "delete",
|
|
506
|
+
});
|
|
507
|
+
};
|
|
508
|
+
this.voteForTicketById = function (tenant_id, ticket_id) {
|
|
509
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id, "/vote"), {
|
|
510
|
+
method: "post",
|
|
511
|
+
});
|
|
512
|
+
};
|
|
513
|
+
this.removeVoteForTicketById = function (tenant_id, ticket_id) {
|
|
514
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id, "/vote"), {
|
|
515
|
+
method: "delete",
|
|
516
|
+
});
|
|
517
|
+
};
|
|
486
518
|
this.createApplicationForTenantById = function (tenant_id, body) {
|
|
487
519
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
|
|
488
520
|
method: "post",
|