@parra/parra-js-sdk 0.3.37 → 0.3.43

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.
@@ -821,13 +821,6 @@ export declare enum TicketType {
821
821
  feature = "feature",
822
822
  improvement = "improvement"
823
823
  }
824
- export interface CreateTicketRequestBody {
825
- title: string;
826
- type: TicketType;
827
- description?: string | null;
828
- voting_enabled: boolean;
829
- is_public: boolean;
830
- }
831
824
  export declare enum TicketStatus {
832
825
  open = "open",
833
826
  planning = "planning",
@@ -837,6 +830,14 @@ export declare enum TicketStatus {
837
830
  closed = "closed",
838
831
  archived = "archived"
839
832
  }
833
+ export interface CreateTicketRequestBody {
834
+ title: string;
835
+ type: TicketType;
836
+ status: TicketStatus;
837
+ description?: string | null;
838
+ voting_enabled: boolean;
839
+ is_public: boolean;
840
+ }
840
841
  export interface Ticket {
841
842
  id: string;
842
843
  created_at: string;
@@ -844,13 +845,13 @@ export interface Ticket {
844
845
  deleted_at?: string | null;
845
846
  title: string;
846
847
  type: TicketType;
848
+ status: TicketStatus;
847
849
  description?: string | null;
848
850
  voting_enabled: boolean;
849
851
  is_public: boolean;
850
852
  ticket_number: string;
851
853
  tenant_id: string;
852
854
  vote_count: number;
853
- status: TicketStatus;
854
855
  }
855
856
  export interface TicketCollectionResponse {
856
857
  page: number;
@@ -931,6 +932,32 @@ export interface UserTicket {
931
932
  voting_enabled: boolean;
932
933
  voted: boolean;
933
934
  }
935
+ export declare enum ReleaseType {
936
+ major = "major",
937
+ minor = "minor",
938
+ patch = "patch",
939
+ launch = "launch"
940
+ }
941
+ export interface UpdateReleaseRequestBody {
942
+ name: string;
943
+ description?: string | null;
944
+ type: ReleaseType;
945
+ }
946
+ export interface CreateReleaseRequestBody {
947
+ name: string;
948
+ description?: string | null;
949
+ type: ReleaseType;
950
+ }
951
+ export interface Release {
952
+ id: string;
953
+ created_at: string;
954
+ updated_at: string;
955
+ deleted_at?: string | null;
956
+ name: string;
957
+ description?: string | null;
958
+ type: ReleaseType;
959
+ tenant_id: string;
960
+ }
934
961
  export declare enum ApplicationType {
935
962
  ios = "ios"
936
963
  }
@@ -1365,10 +1392,48 @@ declare class ParraAPI {
1365
1392
  }) => Promise<UserNoteCollectionResponse>;
1366
1393
  deleteUserNoteById: (tenant_id: string, user_note_id: string) => Promise<Response>;
1367
1394
  linkUserNoteToTicket: (tenant_id: string, user_note_id: string, body: LinkUserNoteRequestBody) => Promise<Response>;
1395
+ getTicketById: (tenant_id: string, ticket_id: string) => Promise<Ticket>;
1368
1396
  updateTicketById: (tenant_id: string, ticket_id: string, body?: UpdateTicketRequestBody) => Promise<Ticket>;
1369
1397
  deleteTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
1370
1398
  voteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
1371
1399
  removeVoteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
1400
+ createReleaseForTenantById: (tenant_id: string, body?: CreateReleaseRequestBody, query?: {
1401
+ $select?: string;
1402
+ $top?: number;
1403
+ $skip?: number;
1404
+ $orderby?: string;
1405
+ $filter?: string;
1406
+ $expand?: string;
1407
+ $search?: string;
1408
+ }) => Promise<Release>;
1409
+ paginateReleasesForTenantById: (tenant_id: string, query?: {
1410
+ $select?: string;
1411
+ $top?: number;
1412
+ $skip?: number;
1413
+ $orderby?: string;
1414
+ $filter?: string;
1415
+ $expand?: string;
1416
+ $search?: string;
1417
+ }) => Promise<TicketCollectionResponse>;
1418
+ getReleaseForTenantById: (tenant_id: string, release_id: string, query?: {
1419
+ $select?: string;
1420
+ $top?: number;
1421
+ $skip?: number;
1422
+ $orderby?: string;
1423
+ $filter?: string;
1424
+ $expand?: string;
1425
+ $search?: string;
1426
+ }) => Promise<Release>;
1427
+ updateReleaseForTenantById: (tenant_id: string, release_id: string, body: UpdateReleaseRequestBody, query?: {
1428
+ $select?: string;
1429
+ $top?: number;
1430
+ $skip?: number;
1431
+ $orderby?: string;
1432
+ $filter?: string;
1433
+ $expand?: string;
1434
+ $search?: string;
1435
+ }) => Promise<Release>;
1436
+ deleteReleaseForTenantById: (tenant_id: string, release_id: string) => Promise<Response>;
1372
1437
  createApplicationForTenantById: (tenant_id: string, body: CreateApplicationRequestBody) => Promise<Application>;
1373
1438
  paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
1374
1439
  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.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;
3
+ exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.ApplicationType = exports.ReleaseType = 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";
@@ -116,6 +116,13 @@ var TicketDisplayStatus;
116
116
  TicketDisplayStatus["live"] = "live";
117
117
  TicketDisplayStatus["rejected"] = "rejected";
118
118
  })(TicketDisplayStatus || (exports.TicketDisplayStatus = TicketDisplayStatus = {}));
119
+ var ReleaseType;
120
+ (function (ReleaseType) {
121
+ ReleaseType["major"] = "major";
122
+ ReleaseType["minor"] = "minor";
123
+ ReleaseType["patch"] = "patch";
124
+ ReleaseType["launch"] = "launch";
125
+ })(ReleaseType || (exports.ReleaseType = ReleaseType = {}));
119
126
  var ApplicationType;
120
127
  (function (ApplicationType) {
121
128
  ApplicationType["ios"] = "ios";
@@ -506,9 +513,14 @@ var ParraAPI = /** @class */ (function () {
506
513
  raw: true,
507
514
  });
508
515
  };
516
+ this.getTicketById = function (tenant_id, ticket_id) {
517
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id), {
518
+ method: "get",
519
+ });
520
+ };
509
521
  this.updateTicketById = function (tenant_id, ticket_id, body) {
510
522
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id), {
511
- method: "patch",
523
+ method: "put",
512
524
  body: JSON.stringify(body),
513
525
  headers: {
514
526
  "content-type": "application/json",
@@ -530,6 +542,43 @@ var ParraAPI = /** @class */ (function () {
530
542
  method: "delete",
531
543
  });
532
544
  };
545
+ this.createReleaseForTenantById = function (tenant_id, body, query) {
546
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/releases"), {
547
+ method: "post",
548
+ query: query,
549
+ body: JSON.stringify(body),
550
+ headers: {
551
+ "content-type": "application/json",
552
+ },
553
+ });
554
+ };
555
+ this.paginateReleasesForTenantById = function (tenant_id, query) {
556
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/releases"), {
557
+ method: "get",
558
+ query: query,
559
+ });
560
+ };
561
+ this.getReleaseForTenantById = function (tenant_id, release_id, query) {
562
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/releases/").concat(release_id), {
563
+ method: "get",
564
+ query: query,
565
+ });
566
+ };
567
+ this.updateReleaseForTenantById = function (tenant_id, release_id, body, query) {
568
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/releases/").concat(release_id), {
569
+ method: "put",
570
+ query: query,
571
+ body: JSON.stringify(body),
572
+ headers: {
573
+ "content-type": "application/json",
574
+ },
575
+ });
576
+ };
577
+ this.deleteReleaseForTenantById = function (tenant_id, release_id) {
578
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/releases/").concat(release_id), {
579
+ method: "delete",
580
+ });
581
+ };
533
582
  this.createApplicationForTenantById = function (tenant_id, body) {
534
583
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
535
584
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.37",
3
+ "version": "0.3.43",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",