@parra/parra-js-sdk 0.3.90 → 0.3.92

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.
@@ -95,6 +95,9 @@ export interface ImageAsset {
95
95
  export interface UploadUserAvatarRequestBody {
96
96
  image: File;
97
97
  }
98
+ export interface UploadTenantUserAvatarRequestBody {
99
+ image: File;
100
+ }
98
101
  export interface CreateCheckoutSessionRequestBody {
99
102
  plan_id: string;
100
103
  }
@@ -828,6 +831,7 @@ export interface CreateTicketRequestBody {
828
831
  voting_enabled: boolean;
829
832
  is_public: boolean;
830
833
  user_note_id?: string | null;
834
+ estimated_start_date?: string | null;
831
835
  estimated_completion_date?: string | null;
832
836
  }
833
837
  export declare enum ReleaseStatus {
@@ -874,6 +878,7 @@ export interface TicketStub {
874
878
  voting_enabled: boolean;
875
879
  is_public: boolean;
876
880
  user_note_id?: string | null;
881
+ estimated_start_date?: string | null;
877
882
  estimated_completion_date?: string | null;
878
883
  ticket_number: string;
879
884
  tenant_id: string;
@@ -894,6 +899,7 @@ export interface Ticket {
894
899
  voting_enabled: boolean;
895
900
  is_public: boolean;
896
901
  user_note_id?: string | null;
902
+ estimated_start_date?: string | null;
897
903
  estimated_completion_date?: string | null;
898
904
  ticket_number: string;
899
905
  tenant_id: string;
@@ -948,6 +954,10 @@ export interface UserNoteCollectionResponse {
948
954
  total_count: number;
949
955
  data: Array<UserNote>;
950
956
  }
957
+ export interface UserNoteMetrics {
958
+ total_requests: number;
959
+ pending_requests: number;
960
+ }
951
961
  export interface LinkUserNoteRequestBody {
952
962
  ticket_id: string;
953
963
  }
@@ -961,6 +971,7 @@ export interface UpdateTicketRequestBody {
961
971
  description?: string | null;
962
972
  voting_enabled?: boolean;
963
973
  is_public?: boolean;
974
+ estimated_start_date?: string | null;
964
975
  estimated_completion_date?: string | null;
965
976
  }
966
977
  export interface BulkUpdateTicketsRequestBody {
@@ -973,6 +984,7 @@ export interface BulkUpdateTicketsRequestBody {
973
984
  description?: string | null;
974
985
  voting_enabled?: boolean;
975
986
  is_public?: boolean;
987
+ estimated_start_date?: string | null;
976
988
  estimated_completion_date?: string | null;
977
989
  ticket_ids?: Array<string>;
978
990
  }
@@ -1001,6 +1013,7 @@ export interface UserTicket {
1001
1013
  voting_enabled: boolean;
1002
1014
  voted: boolean;
1003
1015
  ticket_number: string;
1016
+ estimated_start_date?: string | null;
1004
1017
  estimated_completion_date?: string | null;
1005
1018
  released_at?: string | null;
1006
1019
  }
@@ -1008,6 +1021,7 @@ export interface ReleaseVersionInfoRequestBody {
1008
1021
  type: ReleaseType;
1009
1022
  }
1010
1023
  export interface ReleaseVersionInfo {
1024
+ latest_release?: ReleaseStub;
1011
1025
  version: string;
1012
1026
  name: string;
1013
1027
  }
@@ -1504,6 +1518,11 @@ export interface TeamMember {
1504
1518
  email: string;
1505
1519
  avatar?: ImageAssetStub;
1506
1520
  }
1521
+ export interface UpdateTenantUserRequestBody {
1522
+ identity?: string;
1523
+ name?: string | null;
1524
+ properties?: object | null;
1525
+ }
1507
1526
  export interface TenantUserCollectionResponse {
1508
1527
  page: number;
1509
1528
  page_count: number;
@@ -1554,6 +1573,7 @@ declare class ParraAPI {
1554
1573
  getParraAuthToken: () => Promise<AuthToken>;
1555
1574
  uploadImageAssetForTenantById: (tenant_id: string, body: UploadImageAssetForTenantRequestBody) => Promise<ImageAsset>;
1556
1575
  uploadAvatarForUser: (body: UploadUserAvatarRequestBody) => Promise<ImageAssetStub>;
1576
+ uploadAvatarForTenantUser: (tenant_id: string, body: UploadTenantUserAvatarRequestBody) => Promise<ImageAssetStub>;
1557
1577
  createCheckoutSession: (body: CreateCheckoutSessionRequestBody) => Promise<CheckoutSession>;
1558
1578
  getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
1559
1579
  createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
@@ -1686,6 +1706,7 @@ declare class ParraAPI {
1686
1706
  $expand?: string;
1687
1707
  $search?: string;
1688
1708
  }) => Promise<UserNoteCollectionResponse>;
1709
+ generateUserNoteMetricsForBoard: (tenant_id: string, board_id: string) => Promise<UserNoteMetrics>;
1689
1710
  deleteUserNoteById: (tenant_id: string, user_note_id: string) => Promise<Response>;
1690
1711
  linkUserNoteToTicket: (tenant_id: string, user_note_id: string, body: LinkUserNoteRequestBody) => Promise<Response>;
1691
1712
  bulkUpdateTickets: (tenant_id: string, body?: BulkUpdateTicketsRequestBody) => Promise<Response>;
@@ -1781,6 +1802,8 @@ declare class ParraAPI {
1781
1802
  getTeamMembersForTenantById: (tenant_id: string) => Promise<Array<TeamMember>>;
1782
1803
  deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
1783
1804
  getUserForTenantById: (tenant_id: string, user_id: string) => Promise<TenantUser>;
1805
+ updateUserForTenantById: (tenant_id: string, user_id: string, body?: UpdateTenantUserRequestBody) => Promise<TenantUser>;
1806
+ deleteUserForTenantById: (tenant_id: string, user_id: string) => Promise<Response>;
1784
1807
  paginateTenantUsersForTenantById: (tenant_id: string, query?: {
1785
1808
  $select?: string;
1786
1809
  $top?: number;
package/dist/ParraAPI.js CHANGED
@@ -245,6 +245,18 @@ var ParraAPI = /** @class */ (function () {
245
245
  headers: {},
246
246
  });
247
247
  };
248
+ this.uploadAvatarForTenantUser = function (tenant_id, body) {
249
+ var formData = new FormData();
250
+ Object.entries(body).forEach(function (_a) {
251
+ var key = _a[0], value = _a[1];
252
+ formData.append(key, value);
253
+ });
254
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/avatar"), {
255
+ method: "post",
256
+ body: formData,
257
+ headers: {},
258
+ });
259
+ };
248
260
  this.createCheckoutSession = function (body) {
249
261
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/checkout/sessions"), {
250
262
  method: "post",
@@ -555,6 +567,11 @@ var ParraAPI = /** @class */ (function () {
555
567
  query: query,
556
568
  });
557
569
  };
570
+ this.generateUserNoteMetricsForBoard = function (tenant_id, board_id) {
571
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/boards/").concat(board_id, "/notes/metrics"), {
572
+ method: "post",
573
+ });
574
+ };
558
575
  this.deleteUserNoteById = function (tenant_id, user_note_id) {
559
576
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/notes/").concat(user_note_id), {
560
577
  method: "delete",
@@ -966,6 +983,20 @@ var ParraAPI = /** @class */ (function () {
966
983
  method: "get",
967
984
  });
968
985
  };
986
+ this.updateUserForTenantById = function (tenant_id, user_id, body) {
987
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id), {
988
+ method: "put",
989
+ body: JSON.stringify(body),
990
+ headers: {
991
+ "content-type": "application/json",
992
+ },
993
+ });
994
+ };
995
+ this.deleteUserForTenantById = function (tenant_id, user_id) {
996
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id), {
997
+ method: "delete",
998
+ });
999
+ };
969
1000
  this.paginateTenantUsersForTenantById = function (tenant_id, query) {
970
1001
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users"), {
971
1002
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.90",
3
+ "version": "0.3.92",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",