@parra/parra-js-sdk 0.3.26 → 0.3.30
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 +37 -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;
|
|
@@ -890,6 +883,7 @@ export interface UserNote {
|
|
|
890
883
|
description?: string | null;
|
|
891
884
|
tenant_id: string;
|
|
892
885
|
user_id: string;
|
|
886
|
+
board_id: string;
|
|
893
887
|
ticket_id?: string | null;
|
|
894
888
|
status: UserNoteStatus;
|
|
895
889
|
accepted_at?: string | null;
|
|
@@ -903,6 +897,36 @@ export interface UserNoteCollectionResponse {
|
|
|
903
897
|
total_count: number;
|
|
904
898
|
data: Array<UserNote>;
|
|
905
899
|
}
|
|
900
|
+
export interface UpdateTicketRequestBody {
|
|
901
|
+
title?: string;
|
|
902
|
+
type?: TicketType;
|
|
903
|
+
status?: TicketStatus;
|
|
904
|
+
description?: string | null;
|
|
905
|
+
voting_enabled?: boolean;
|
|
906
|
+
is_public?: boolean;
|
|
907
|
+
}
|
|
908
|
+
export declare enum TicketDisplayStatus {
|
|
909
|
+
pending = "pending",
|
|
910
|
+
upcoming = "upcoming",
|
|
911
|
+
inProgress = "in_progress",
|
|
912
|
+
live = "live",
|
|
913
|
+
rejected = "rejected"
|
|
914
|
+
}
|
|
915
|
+
export interface UserTicket {
|
|
916
|
+
id: string;
|
|
917
|
+
created_at: string;
|
|
918
|
+
updated_at: string;
|
|
919
|
+
deleted_at?: string | null;
|
|
920
|
+
title: string;
|
|
921
|
+
type: TicketType;
|
|
922
|
+
description?: string | null;
|
|
923
|
+
status: TicketStatus;
|
|
924
|
+
display_status: TicketDisplayStatus;
|
|
925
|
+
display_status_badge_title: string;
|
|
926
|
+
vote_count: number;
|
|
927
|
+
voting_enabled: boolean;
|
|
928
|
+
voted: boolean;
|
|
929
|
+
}
|
|
906
930
|
export declare enum ApplicationType {
|
|
907
931
|
ios = "ios"
|
|
908
932
|
}
|
|
@@ -1316,7 +1340,7 @@ declare class ParraAPI {
|
|
|
1316
1340
|
}) => Promise<TemplateTagCollectionResponse>;
|
|
1317
1341
|
createBoardForTenantById: (tenant_id: string, body?: CreateBoardRequestBody) => Promise<Board>;
|
|
1318
1342
|
listBoardsForTenantById: (tenant_id: string) => Promise<Array<Board>>;
|
|
1319
|
-
createTicketForBoard: (tenant_id: string, board_id: string, body
|
|
1343
|
+
createTicketForBoard: (tenant_id: string, board_id: string, body: CreateTicketRequestBody) => Promise<Ticket>;
|
|
1320
1344
|
paginateTicketsForBoard: (tenant_id: string, board_id: string, query?: {
|
|
1321
1345
|
$select?: string;
|
|
1322
1346
|
$top?: number;
|
|
@@ -1335,6 +1359,10 @@ declare class ParraAPI {
|
|
|
1335
1359
|
$expand?: string;
|
|
1336
1360
|
$search?: string;
|
|
1337
1361
|
}) => Promise<UserNoteCollectionResponse>;
|
|
1362
|
+
updateTicketById: (tenant_id: string, ticket_id: string, body?: UpdateTicketRequestBody) => Promise<Ticket>;
|
|
1363
|
+
deleteTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
|
|
1364
|
+
voteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
|
|
1365
|
+
removeVoteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
|
|
1338
1366
|
createApplicationForTenantById: (tenant_id: string, body: CreateApplicationRequestBody) => Promise<Application>;
|
|
1339
1367
|
paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
|
|
1340
1368
|
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",
|