@parra/parra-js-sdk 0.3.91 → 0.3.93

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.
@@ -55,6 +55,16 @@ export interface TenantUserCollectionStub {
55
55
  name?: string | null;
56
56
  avatar?: ImageAssetStub;
57
57
  identity: string;
58
+ email?: string | null;
59
+ email_verified?: boolean | null;
60
+ phone_number?: string | null;
61
+ phone_number_verified?: boolean;
62
+ first_name?: string | null;
63
+ last_name?: string | null;
64
+ locale?: string | null;
65
+ signed_up_at?: string | null;
66
+ last_updated_at?: string | null;
67
+ last_seen_at?: string | null;
58
68
  }
59
69
  export interface TenantUser {
60
70
  id: string;
@@ -65,6 +75,16 @@ export interface TenantUser {
65
75
  name?: string | null;
66
76
  avatar?: ImageAssetStub;
67
77
  identity: string;
78
+ email?: string | null;
79
+ email_verified?: boolean | null;
80
+ phone_number?: string | null;
81
+ phone_number_verified?: boolean;
82
+ first_name?: string | null;
83
+ last_name?: string | null;
84
+ locale?: string | null;
85
+ signed_up_at?: string | null;
86
+ last_updated_at?: string | null;
87
+ last_seen_at?: string | null;
68
88
  properties: object;
69
89
  }
70
90
  export interface UserInfoResponse {
@@ -95,6 +115,9 @@ export interface ImageAsset {
95
115
  export interface UploadUserAvatarRequestBody {
96
116
  image: File;
97
117
  }
118
+ export interface UploadTenantUserAvatarRequestBody {
119
+ image: File;
120
+ }
98
121
  export interface CreateCheckoutSessionRequestBody {
99
122
  plan_id: string;
100
123
  }
@@ -828,6 +851,7 @@ export interface CreateTicketRequestBody {
828
851
  voting_enabled: boolean;
829
852
  is_public: boolean;
830
853
  user_note_id?: string | null;
854
+ estimated_start_date?: string | null;
831
855
  estimated_completion_date?: string | null;
832
856
  }
833
857
  export declare enum ReleaseStatus {
@@ -874,6 +898,7 @@ export interface TicketStub {
874
898
  voting_enabled: boolean;
875
899
  is_public: boolean;
876
900
  user_note_id?: string | null;
901
+ estimated_start_date?: string | null;
877
902
  estimated_completion_date?: string | null;
878
903
  ticket_number: string;
879
904
  tenant_id: string;
@@ -894,6 +919,7 @@ export interface Ticket {
894
919
  voting_enabled: boolean;
895
920
  is_public: boolean;
896
921
  user_note_id?: string | null;
922
+ estimated_start_date?: string | null;
897
923
  estimated_completion_date?: string | null;
898
924
  ticket_number: string;
899
925
  tenant_id: string;
@@ -965,6 +991,7 @@ export interface UpdateTicketRequestBody {
965
991
  description?: string | null;
966
992
  voting_enabled?: boolean;
967
993
  is_public?: boolean;
994
+ estimated_start_date?: string | null;
968
995
  estimated_completion_date?: string | null;
969
996
  }
970
997
  export interface BulkUpdateTicketsRequestBody {
@@ -977,6 +1004,7 @@ export interface BulkUpdateTicketsRequestBody {
977
1004
  description?: string | null;
978
1005
  voting_enabled?: boolean;
979
1006
  is_public?: boolean;
1007
+ estimated_start_date?: string | null;
980
1008
  estimated_completion_date?: string | null;
981
1009
  ticket_ids?: Array<string>;
982
1010
  }
@@ -1005,6 +1033,7 @@ export interface UserTicket {
1005
1033
  voting_enabled: boolean;
1006
1034
  voted: boolean;
1007
1035
  ticket_number: string;
1036
+ estimated_start_date?: string | null;
1008
1037
  estimated_completion_date?: string | null;
1009
1038
  released_at?: string | null;
1010
1039
  }
@@ -1012,6 +1041,7 @@ export interface ReleaseVersionInfoRequestBody {
1012
1041
  type: ReleaseType;
1013
1042
  }
1014
1043
  export interface ReleaseVersionInfo {
1044
+ latest_release?: ReleaseStub;
1015
1045
  version: string;
1016
1046
  name: string;
1017
1047
  }
@@ -1073,6 +1103,61 @@ export interface UserTicketCollectionResponse {
1073
1103
  export interface AppRoadmapConfiguration {
1074
1104
  form: FeedbackFormDataStub;
1075
1105
  }
1106
+ export interface AppReleaseStub {
1107
+ id: string;
1108
+ created_at: string;
1109
+ updated_at: string;
1110
+ deleted_at?: string | null;
1111
+ name: string;
1112
+ version: string;
1113
+ description?: string | null;
1114
+ type: ReleaseType;
1115
+ tenant_id: string;
1116
+ release_number: number;
1117
+ status: ReleaseStatus;
1118
+ }
1119
+ export interface AppReleaseCollectionResponse {
1120
+ page: number;
1121
+ page_count: number;
1122
+ page_size: number;
1123
+ total_count: number;
1124
+ data: Array<AppReleaseStub>;
1125
+ }
1126
+ export interface AppReleaseItemStub {
1127
+ id: string;
1128
+ created_at: string;
1129
+ updated_at: string;
1130
+ deleted_at?: string | null;
1131
+ release_id: string;
1132
+ ticket_id: string;
1133
+ }
1134
+ export interface AppReleaseItem {
1135
+ id: string;
1136
+ created_at: string;
1137
+ updated_at: string;
1138
+ deleted_at?: string | null;
1139
+ release_id: string;
1140
+ ticket_id: string;
1141
+ ticket: Ticket;
1142
+ }
1143
+ export interface AppReleaseSection {
1144
+ title: string;
1145
+ items: Array<AppReleaseItem>;
1146
+ }
1147
+ export interface AppRelease {
1148
+ id: string;
1149
+ created_at: string;
1150
+ updated_at: string;
1151
+ deleted_at?: string | null;
1152
+ name: string;
1153
+ version: string;
1154
+ description?: string | null;
1155
+ type: ReleaseType;
1156
+ tenant_id: string;
1157
+ release_number: number;
1158
+ status: ReleaseStatus;
1159
+ sections: Array<AppReleaseSection>;
1160
+ }
1076
1161
  export interface UpdateAppVersionRequestBody {
1077
1162
  version_string: string;
1078
1163
  description?: string | null;
@@ -1508,6 +1593,11 @@ export interface TeamMember {
1508
1593
  email: string;
1509
1594
  avatar?: ImageAssetStub;
1510
1595
  }
1596
+ export interface UpdateTenantUserRequestBody {
1597
+ identity?: string;
1598
+ name?: string | null;
1599
+ properties?: object | null;
1600
+ }
1511
1601
  export interface TenantUserCollectionResponse {
1512
1602
  page: number;
1513
1603
  page_count: number;
@@ -1558,6 +1648,7 @@ declare class ParraAPI {
1558
1648
  getParraAuthToken: () => Promise<AuthToken>;
1559
1649
  uploadImageAssetForTenantById: (tenant_id: string, body: UploadImageAssetForTenantRequestBody) => Promise<ImageAsset>;
1560
1650
  uploadAvatarForUser: (body: UploadUserAvatarRequestBody) => Promise<ImageAssetStub>;
1651
+ uploadAvatarForTenantUser: (tenant_id: string, body: UploadTenantUserAvatarRequestBody) => Promise<ImageAssetStub>;
1561
1652
  createCheckoutSession: (body: CreateCheckoutSessionRequestBody) => Promise<CheckoutSession>;
1562
1653
  getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
1563
1654
  createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
@@ -1723,6 +1814,11 @@ declare class ParraAPI {
1723
1814
  filter?: string;
1724
1815
  }) => Promise<UserTicketCollectionResponse>;
1725
1816
  getRoadmapForTenantApplication: (tenant_id: string, application_id: string) => Promise<AppRoadmapConfiguration>;
1817
+ paginateReleasesForTenantApplication: (tenant_id: string, application_id: string, query?: {
1818
+ limit?: number;
1819
+ offset?: number;
1820
+ }) => Promise<AppReleaseCollectionResponse>;
1821
+ getReleaseForTenantApplication: (tenant_id: string, application_id: string, release_id: string) => Promise<AppRelease>;
1726
1822
  createVersionForTenantApplication: (tenant_id: string, application_id: string, body?: CreateAppVersionRequestBody) => Promise<AppVersion>;
1727
1823
  listVersionsForTenantApplication: (tenant_id: string, application_id: string) => Promise<Array<AppVersion>>;
1728
1824
  getTenantApplicationVersionById: (tenant_id: string, application_id: string, app_version_id: string) => Promise<AppVersion>;
@@ -1786,6 +1882,8 @@ declare class ParraAPI {
1786
1882
  getTeamMembersForTenantById: (tenant_id: string) => Promise<Array<TeamMember>>;
1787
1883
  deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
1788
1884
  getUserForTenantById: (tenant_id: string, user_id: string) => Promise<TenantUser>;
1885
+ updateUserForTenantById: (tenant_id: string, user_id: string, body?: UpdateTenantUserRequestBody) => Promise<TenantUser>;
1886
+ deleteUserForTenantById: (tenant_id: string, user_id: string) => Promise<Response>;
1789
1887
  paginateTenantUsersForTenantById: (tenant_id: string, query?: {
1790
1888
  $select?: string;
1791
1889
  $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",
@@ -696,6 +708,17 @@ var ParraAPI = /** @class */ (function () {
696
708
  method: "get",
697
709
  });
698
710
  };
711
+ this.paginateReleasesForTenantApplication = function (tenant_id, application_id, query) {
712
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/releases"), {
713
+ method: "get",
714
+ query: query,
715
+ });
716
+ };
717
+ this.getReleaseForTenantApplication = function (tenant_id, application_id, release_id) {
718
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/releases/").concat(release_id), {
719
+ method: "get",
720
+ });
721
+ };
699
722
  this.createVersionForTenantApplication = function (tenant_id, application_id, body) {
700
723
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/versions"), {
701
724
  method: "post",
@@ -971,6 +994,20 @@ var ParraAPI = /** @class */ (function () {
971
994
  method: "get",
972
995
  });
973
996
  };
997
+ this.updateUserForTenantById = function (tenant_id, user_id, body) {
998
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id), {
999
+ method: "put",
1000
+ body: JSON.stringify(body),
1001
+ headers: {
1002
+ "content-type": "application/json",
1003
+ },
1004
+ });
1005
+ };
1006
+ this.deleteUserForTenantById = function (tenant_id, user_id) {
1007
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id), {
1008
+ method: "delete",
1009
+ });
1010
+ };
974
1011
  this.paginateTenantUsersForTenantById = function (tenant_id, query) {
975
1012
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users"), {
976
1013
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.91",
3
+ "version": "0.3.93",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",