@parra/parra-js-sdk 0.3.95 → 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.
- package/dist/ParraAPI.d.ts +33 -11
- package/dist/ParraAPI.js +53 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -95,10 +95,13 @@ export interface UserInfoResponse {
|
|
|
95
95
|
export interface AuthToken {
|
|
96
96
|
access_token: string;
|
|
97
97
|
}
|
|
98
|
-
export interface
|
|
99
|
-
group: string;
|
|
98
|
+
export interface UploadImageRequestBody {
|
|
100
99
|
image: File;
|
|
101
100
|
}
|
|
101
|
+
export interface UploadImageWithGroupRequestBody {
|
|
102
|
+
image: File;
|
|
103
|
+
group: string;
|
|
104
|
+
}
|
|
102
105
|
export interface ImageAsset {
|
|
103
106
|
id: string;
|
|
104
107
|
created_at: string;
|
|
@@ -112,12 +115,6 @@ export interface ImageAsset {
|
|
|
112
115
|
file_type: string;
|
|
113
116
|
mime_type: string;
|
|
114
117
|
}
|
|
115
|
-
export interface UploadUserAvatarRequestBody {
|
|
116
|
-
image: File;
|
|
117
|
-
}
|
|
118
|
-
export interface UploadTenantUserAvatarRequestBody {
|
|
119
|
-
image: File;
|
|
120
|
-
}
|
|
121
118
|
export interface CreateCheckoutSessionRequestBody {
|
|
122
119
|
plan_id: string;
|
|
123
120
|
}
|
|
@@ -892,6 +889,13 @@ export interface ReleaseStub {
|
|
|
892
889
|
release_number: number;
|
|
893
890
|
status: ReleaseStatus;
|
|
894
891
|
}
|
|
892
|
+
export interface TicketAttachment {
|
|
893
|
+
id: string;
|
|
894
|
+
created_at: string;
|
|
895
|
+
updated_at: string;
|
|
896
|
+
deleted_at?: string | null;
|
|
897
|
+
attachment: ImageAssetStub;
|
|
898
|
+
}
|
|
895
899
|
export interface TicketStub {
|
|
896
900
|
id: string;
|
|
897
901
|
created_at: string;
|
|
@@ -936,6 +940,7 @@ export interface Ticket {
|
|
|
936
940
|
vote_count: number;
|
|
937
941
|
released_at?: string | null;
|
|
938
942
|
release?: ReleaseStub;
|
|
943
|
+
attachments?: Array<TicketAttachment>;
|
|
939
944
|
}
|
|
940
945
|
export interface TicketCollectionResponse {
|
|
941
946
|
page: number;
|
|
@@ -1074,6 +1079,11 @@ export interface ReleaseItem {
|
|
|
1074
1079
|
ticket_id: string;
|
|
1075
1080
|
ticket: Ticket;
|
|
1076
1081
|
}
|
|
1082
|
+
export interface ReleaseHeader {
|
|
1083
|
+
id: string;
|
|
1084
|
+
size: Size;
|
|
1085
|
+
url: string;
|
|
1086
|
+
}
|
|
1077
1087
|
export interface Release {
|
|
1078
1088
|
id: string;
|
|
1079
1089
|
created_at: string;
|
|
@@ -1087,6 +1097,7 @@ export interface Release {
|
|
|
1087
1097
|
release_number: number;
|
|
1088
1098
|
status: ReleaseStatus;
|
|
1089
1099
|
items?: Array<ReleaseItem> | null;
|
|
1100
|
+
header?: ReleaseHeader | null;
|
|
1090
1101
|
}
|
|
1091
1102
|
export interface ReleaseCollectionResponse {
|
|
1092
1103
|
page: number;
|
|
@@ -1101,6 +1112,7 @@ export interface UpdateReleaseRequestBody {
|
|
|
1101
1112
|
description?: string | null;
|
|
1102
1113
|
status?: ReleaseStatus;
|
|
1103
1114
|
type?: ReleaseType;
|
|
1115
|
+
header?: ReleaseHeader | null;
|
|
1104
1116
|
}
|
|
1105
1117
|
export interface CreateReleaseItemRequestBody {
|
|
1106
1118
|
ticket_id: string;
|
|
@@ -1194,10 +1206,12 @@ export declare enum ApplicationType {
|
|
|
1194
1206
|
export interface UpdateApplicationRequestBody {
|
|
1195
1207
|
name: string;
|
|
1196
1208
|
description?: string | null;
|
|
1209
|
+
icon?: ImageAssetStub | null;
|
|
1197
1210
|
}
|
|
1198
1211
|
export interface CreateApplicationRequestBody {
|
|
1199
1212
|
name: string;
|
|
1200
1213
|
description?: string | null;
|
|
1214
|
+
icon?: ImageAssetStub | null;
|
|
1201
1215
|
type: ApplicationType;
|
|
1202
1216
|
}
|
|
1203
1217
|
export interface UpdateApnsConfigurationRequestBody {
|
|
@@ -1227,6 +1241,7 @@ export interface Application {
|
|
|
1227
1241
|
deleted_at?: string | null;
|
|
1228
1242
|
name: string;
|
|
1229
1243
|
description?: string | null;
|
|
1244
|
+
icon?: ImageAssetStub | null;
|
|
1230
1245
|
type: ApplicationType;
|
|
1231
1246
|
tenant_id: string;
|
|
1232
1247
|
apns?: ApnsConfiguration | null;
|
|
@@ -1375,6 +1390,7 @@ export interface Tenant {
|
|
|
1375
1390
|
name: string;
|
|
1376
1391
|
is_test: boolean;
|
|
1377
1392
|
parent_tenant_id?: string | null;
|
|
1393
|
+
logo?: ImageAssetStub | null;
|
|
1378
1394
|
entitlements?: Array<Entitlement> | null;
|
|
1379
1395
|
metrics?: TenantMetrics | null;
|
|
1380
1396
|
}
|
|
@@ -1619,6 +1635,7 @@ export interface TenantUserCollectionResponse {
|
|
|
1619
1635
|
}
|
|
1620
1636
|
export interface UpdateTenantRequestBody {
|
|
1621
1637
|
name: string;
|
|
1638
|
+
logo?: ImageAssetStub | null;
|
|
1622
1639
|
}
|
|
1623
1640
|
export interface CreateTenantForUserRequestBody {
|
|
1624
1641
|
name: string;
|
|
@@ -1658,9 +1675,13 @@ declare class ParraAPI {
|
|
|
1658
1675
|
checkAuthorization: (body: CheckAuthorizationRequestBody) => Promise<CheckAuthorization>;
|
|
1659
1676
|
getUserInfo: () => Promise<UserInfoResponse>;
|
|
1660
1677
|
getParraAuthToken: () => Promise<AuthToken>;
|
|
1661
|
-
uploadImageAssetForTenantById: (tenant_id: string, body:
|
|
1662
|
-
uploadAvatarForUser: (body:
|
|
1663
|
-
uploadAvatarForTenantUser: (tenant_id: string, body:
|
|
1678
|
+
uploadImageAssetForTenantById: (tenant_id: string, body: UploadImageWithGroupRequestBody) => Promise<ImageAsset>;
|
|
1679
|
+
uploadAvatarForUser: (body: UploadImageRequestBody) => Promise<ImageAssetStub>;
|
|
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>;
|
|
1664
1685
|
createCheckoutSession: (body: CreateCheckoutSessionRequestBody) => Promise<CheckoutSession>;
|
|
1665
1686
|
getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
|
|
1666
1687
|
createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
|
|
@@ -1800,6 +1821,7 @@ declare class ParraAPI {
|
|
|
1800
1821
|
getTicketById: (tenant_id: string, ticket_id: string) => Promise<Ticket>;
|
|
1801
1822
|
updateTicketById: (tenant_id: string, ticket_id: string, body?: UpdateTicketRequestBody) => Promise<Ticket>;
|
|
1802
1823
|
deleteTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
|
|
1824
|
+
deleteAttachmentForTicketById: (tenant_id: string, ticket_id: string, ticket_attachment_id: string) => Promise<Response>;
|
|
1803
1825
|
updateReleaseForTicketById: (tenant_id: string, ticket_id: string, body: UpdateReleaseForTicketRequestBody) => Promise<Ticket>;
|
|
1804
1826
|
removeReleaseFromTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
|
|
1805
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",
|