@parra/parra-js-sdk 0.3.96 → 0.3.98

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.
@@ -1206,10 +1206,12 @@ export declare enum ApplicationType {
1206
1206
  export interface UpdateApplicationRequestBody {
1207
1207
  name: string;
1208
1208
  description?: string | null;
1209
+ icon?: ImageAssetStub | null;
1209
1210
  }
1210
1211
  export interface CreateApplicationRequestBody {
1211
1212
  name: string;
1212
1213
  description?: string | null;
1214
+ icon?: ImageAssetStub | null;
1213
1215
  type: ApplicationType;
1214
1216
  }
1215
1217
  export interface UpdateApnsConfigurationRequestBody {
@@ -1239,6 +1241,7 @@ export interface Application {
1239
1241
  deleted_at?: string | null;
1240
1242
  name: string;
1241
1243
  description?: string | null;
1244
+ icon?: ImageAssetStub | null;
1242
1245
  type: ApplicationType;
1243
1246
  tenant_id: string;
1244
1247
  apns?: ApnsConfiguration | null;
@@ -1387,6 +1390,7 @@ export interface Tenant {
1387
1390
  name: string;
1388
1391
  is_test: boolean;
1389
1392
  parent_tenant_id?: string | null;
1393
+ logo?: ImageAssetStub | null;
1390
1394
  entitlements?: Array<Entitlement> | null;
1391
1395
  metrics?: TenantMetrics | null;
1392
1396
  }
@@ -1631,6 +1635,7 @@ export interface TenantUserCollectionResponse {
1631
1635
  }
1632
1636
  export interface UpdateTenantRequestBody {
1633
1637
  name: string;
1638
+ logo?: ImageAssetStub | null;
1634
1639
  }
1635
1640
  export interface CreateTenantForUserRequestBody {
1636
1641
  name: string;
@@ -1673,6 +1678,10 @@ declare class ParraAPI {
1673
1678
  uploadImageAssetForTenantById: (tenant_id: string, body: UploadImageWithGroupRequestBody) => Promise<ImageAsset>;
1674
1679
  uploadAvatarForUser: (body: UploadImageRequestBody) => Promise<ImageAssetStub>;
1675
1680
  uploadAvatarForTenantUser: (tenant_id: string, body: UploadImageRequestBody) => Promise<ImageAssetStub>;
1681
+ uploadIconForTenantApplication: (tenant_id: string, application_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
1682
+ uploadHeaderForTenantRelease: (tenant_id: string, release_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
1683
+ uploadAttachmentForTicketById: (tenant_id: string, ticket_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
1684
+ uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
1676
1685
  createCheckoutSession: (body: CreateCheckoutSessionRequestBody) => Promise<CheckoutSession>;
1677
1686
  getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
1678
1687
  createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
@@ -1812,6 +1821,7 @@ declare class ParraAPI {
1812
1821
  getTicketById: (tenant_id: string, ticket_id: string) => Promise<Ticket>;
1813
1822
  updateTicketById: (tenant_id: string, ticket_id: string, body?: UpdateTicketRequestBody) => Promise<Ticket>;
1814
1823
  deleteTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
1824
+ deleteAttachmentForTicketById: (tenant_id: string, ticket_id: string, ticket_attachment_id: string) => Promise<Response>;
1815
1825
  updateReleaseForTicketById: (tenant_id: string, ticket_id: string, body: UpdateReleaseForTicketRequestBody) => Promise<Ticket>;
1816
1826
  removeReleaseFromTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
1817
1827
  voteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
package/dist/ParraAPI.js CHANGED
@@ -261,6 +261,54 @@ var ParraAPI = /** @class */ (function () {
261
261
  headers: {},
262
262
  });
263
263
  };
264
+ this.uploadIconForTenantApplication = function (tenant_id, application_id, body) {
265
+ var formData = new FormData();
266
+ Object.entries(body).forEach(function (_a) {
267
+ var key = _a[0], value = _a[1];
268
+ formData.append(key, value);
269
+ });
270
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/icon"), {
271
+ method: "post",
272
+ body: formData,
273
+ headers: {},
274
+ });
275
+ };
276
+ this.uploadHeaderForTenantRelease = function (tenant_id, release_id, body) {
277
+ var formData = new FormData();
278
+ Object.entries(body).forEach(function (_a) {
279
+ var key = _a[0], value = _a[1];
280
+ formData.append(key, value);
281
+ });
282
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/releases/").concat(release_id, "/header"), {
283
+ method: "post",
284
+ body: formData,
285
+ headers: {},
286
+ });
287
+ };
288
+ this.uploadAttachmentForTicketById = function (tenant_id, ticket_id, body) {
289
+ var formData = new FormData();
290
+ Object.entries(body).forEach(function (_a) {
291
+ var key = _a[0], value = _a[1];
292
+ formData.append(key, value);
293
+ });
294
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id, "/attachments"), {
295
+ method: "post",
296
+ body: formData,
297
+ headers: {},
298
+ });
299
+ };
300
+ this.uploadLogoForTenantById = function (tenant_id, body) {
301
+ var formData = new FormData();
302
+ Object.entries(body).forEach(function (_a) {
303
+ var key = _a[0], value = _a[1];
304
+ formData.append(key, value);
305
+ });
306
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/logo"), {
307
+ method: "post",
308
+ body: formData,
309
+ headers: {},
310
+ });
311
+ };
264
312
  this.createCheckoutSession = function (body) {
265
313
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/checkout/sessions"), {
266
314
  method: "post",
@@ -620,6 +668,11 @@ var ParraAPI = /** @class */ (function () {
620
668
  method: "delete",
621
669
  });
622
670
  };
671
+ this.deleteAttachmentForTicketById = function (tenant_id, ticket_id, ticket_attachment_id) {
672
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id, "/attachments/").concat(ticket_attachment_id), {
673
+ method: "delete",
674
+ });
675
+ };
623
676
  this.updateReleaseForTicketById = function (tenant_id, ticket_id, body) {
624
677
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id, "/release"), {
625
678
  method: "put",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.96",
3
+ "version": "0.3.98",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",