@parra/parra-js-sdk 0.3.96 → 0.3.99
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 +70 -39
- package/dist/ParraAPI.js +59 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -843,7 +843,12 @@ export declare enum TicketIconType {
|
|
|
843
843
|
}
|
|
844
844
|
export interface TicketIcon {
|
|
845
845
|
type: TicketIconType;
|
|
846
|
-
value
|
|
846
|
+
value: string;
|
|
847
|
+
}
|
|
848
|
+
export interface CreateTicketAttachmentRequestBody {
|
|
849
|
+
id: string;
|
|
850
|
+
size: Size;
|
|
851
|
+
url: string;
|
|
847
852
|
}
|
|
848
853
|
export interface CreateTicketRequestBody {
|
|
849
854
|
title: string;
|
|
@@ -858,6 +863,7 @@ export interface CreateTicketRequestBody {
|
|
|
858
863
|
estimated_start_date?: string | null;
|
|
859
864
|
estimated_completion_date?: string | null;
|
|
860
865
|
icon?: TicketIcon;
|
|
866
|
+
attachments?: Array<CreateTicketAttachmentRequestBody>;
|
|
861
867
|
}
|
|
862
868
|
export declare enum ReleaseStatus {
|
|
863
869
|
pending = "pending",
|
|
@@ -940,7 +946,7 @@ export interface Ticket {
|
|
|
940
946
|
vote_count: number;
|
|
941
947
|
released_at?: string | null;
|
|
942
948
|
release?: ReleaseStub;
|
|
943
|
-
attachments?: Array<TicketAttachment
|
|
949
|
+
attachments?: Array<TicketAttachment> | null;
|
|
944
950
|
}
|
|
945
951
|
export interface TicketCollectionResponse {
|
|
946
952
|
page: number;
|
|
@@ -1117,35 +1123,9 @@ export interface UpdateReleaseRequestBody {
|
|
|
1117
1123
|
export interface CreateReleaseItemRequestBody {
|
|
1118
1124
|
ticket_id: string;
|
|
1119
1125
|
}
|
|
1120
|
-
export interface
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
page_size: number;
|
|
1124
|
-
total_count: number;
|
|
1125
|
-
data: Array<UserTicket>;
|
|
1126
|
-
}
|
|
1127
|
-
export interface AppRoadmapConfiguration {
|
|
1128
|
-
form: FeedbackFormDataStub;
|
|
1129
|
-
}
|
|
1130
|
-
export interface AppReleaseStub {
|
|
1131
|
-
id: string;
|
|
1132
|
-
created_at: string;
|
|
1133
|
-
updated_at: string;
|
|
1134
|
-
deleted_at?: string | null;
|
|
1135
|
-
name: string;
|
|
1136
|
-
version: string;
|
|
1137
|
-
description?: string | null;
|
|
1138
|
-
type: ReleaseType;
|
|
1139
|
-
tenant_id: string;
|
|
1140
|
-
release_number: number;
|
|
1141
|
-
status: ReleaseStatus;
|
|
1142
|
-
}
|
|
1143
|
-
export interface AppReleaseCollectionResponse {
|
|
1144
|
-
page: number;
|
|
1145
|
-
page_count: number;
|
|
1146
|
-
page_size: number;
|
|
1147
|
-
total_count: number;
|
|
1148
|
-
data: Array<AppReleaseStub>;
|
|
1126
|
+
export interface AppReleaseConfiguration {
|
|
1127
|
+
title: string;
|
|
1128
|
+
has_other_releases: boolean;
|
|
1149
1129
|
}
|
|
1150
1130
|
export interface AppReleaseItemStub {
|
|
1151
1131
|
id: string;
|
|
@@ -1162,12 +1142,26 @@ export interface AppReleaseItem {
|
|
|
1162
1142
|
deleted_at?: string | null;
|
|
1163
1143
|
release_id: string;
|
|
1164
1144
|
ticket_id: string;
|
|
1165
|
-
ticket:
|
|
1145
|
+
ticket: TicketStub;
|
|
1166
1146
|
}
|
|
1167
1147
|
export interface AppReleaseSection {
|
|
1148
|
+
id: string;
|
|
1168
1149
|
title: string;
|
|
1169
1150
|
items: Array<AppReleaseItem>;
|
|
1170
1151
|
}
|
|
1152
|
+
export interface AppReleaseStub {
|
|
1153
|
+
id: string;
|
|
1154
|
+
created_at: string;
|
|
1155
|
+
updated_at: string;
|
|
1156
|
+
deleted_at?: string | null;
|
|
1157
|
+
name: string;
|
|
1158
|
+
version: string;
|
|
1159
|
+
description?: string | null;
|
|
1160
|
+
type: ReleaseType;
|
|
1161
|
+
tenant_id: string;
|
|
1162
|
+
release_number: number;
|
|
1163
|
+
status: ReleaseStatus;
|
|
1164
|
+
}
|
|
1171
1165
|
export interface AppRelease {
|
|
1172
1166
|
id: string;
|
|
1173
1167
|
created_at: string;
|
|
@@ -1182,6 +1176,31 @@ export interface AppRelease {
|
|
|
1182
1176
|
status: ReleaseStatus;
|
|
1183
1177
|
sections: Array<AppReleaseSection>;
|
|
1184
1178
|
}
|
|
1179
|
+
export interface NewInstalledVersionInfo {
|
|
1180
|
+
configuration: AppReleaseConfiguration;
|
|
1181
|
+
release: AppRelease;
|
|
1182
|
+
}
|
|
1183
|
+
export interface AppInfo {
|
|
1184
|
+
version_token: string;
|
|
1185
|
+
new_installed_version_info?: NewInstalledVersionInfo;
|
|
1186
|
+
}
|
|
1187
|
+
export interface UserTicketCollectionResponse {
|
|
1188
|
+
page: number;
|
|
1189
|
+
page_count: number;
|
|
1190
|
+
page_size: number;
|
|
1191
|
+
total_count: number;
|
|
1192
|
+
data: Array<UserTicket>;
|
|
1193
|
+
}
|
|
1194
|
+
export interface AppRoadmapConfiguration {
|
|
1195
|
+
form: FeedbackFormDataStub;
|
|
1196
|
+
}
|
|
1197
|
+
export interface AppReleaseCollectionResponse {
|
|
1198
|
+
page: number;
|
|
1199
|
+
page_count: number;
|
|
1200
|
+
page_size: number;
|
|
1201
|
+
total_count: number;
|
|
1202
|
+
data: Array<AppReleaseStub>;
|
|
1203
|
+
}
|
|
1185
1204
|
export interface UpdateAppVersionRequestBody {
|
|
1186
1205
|
version_string: string;
|
|
1187
1206
|
description?: string | null;
|
|
@@ -1203,10 +1222,6 @@ export interface AppVersion {
|
|
|
1203
1222
|
export declare enum ApplicationType {
|
|
1204
1223
|
ios = "ios"
|
|
1205
1224
|
}
|
|
1206
|
-
export interface UpdateApplicationRequestBody {
|
|
1207
|
-
name: string;
|
|
1208
|
-
description?: string | null;
|
|
1209
|
-
}
|
|
1210
1225
|
export interface CreateApplicationRequestBody {
|
|
1211
1226
|
name: string;
|
|
1212
1227
|
description?: string | null;
|
|
@@ -1241,6 +1256,7 @@ export interface Application {
|
|
|
1241
1256
|
description?: string | null;
|
|
1242
1257
|
type: ApplicationType;
|
|
1243
1258
|
tenant_id: string;
|
|
1259
|
+
icon?: ImageAssetStub | null;
|
|
1244
1260
|
apns?: ApnsConfiguration | null;
|
|
1245
1261
|
}
|
|
1246
1262
|
export interface ApplicationCollectionResponse {
|
|
@@ -1250,6 +1266,11 @@ export interface ApplicationCollectionResponse {
|
|
|
1250
1266
|
total_count: number;
|
|
1251
1267
|
data: Array<Application>;
|
|
1252
1268
|
}
|
|
1269
|
+
export interface UpdateApplicationRequestBody {
|
|
1270
|
+
name?: string;
|
|
1271
|
+
description?: string | null;
|
|
1272
|
+
icon?: ImageAssetStub | null;
|
|
1273
|
+
}
|
|
1253
1274
|
export interface InboxItem {
|
|
1254
1275
|
id: string;
|
|
1255
1276
|
created_at: string;
|
|
@@ -1387,6 +1408,7 @@ export interface Tenant {
|
|
|
1387
1408
|
name: string;
|
|
1388
1409
|
is_test: boolean;
|
|
1389
1410
|
parent_tenant_id?: string | null;
|
|
1411
|
+
logo?: ImageAssetStub | null;
|
|
1390
1412
|
entitlements?: Array<Entitlement> | null;
|
|
1391
1413
|
metrics?: TenantMetrics | null;
|
|
1392
1414
|
}
|
|
@@ -1630,7 +1652,8 @@ export interface TenantUserCollectionResponse {
|
|
|
1630
1652
|
data: Array<TenantUserCollectionStub>;
|
|
1631
1653
|
}
|
|
1632
1654
|
export interface UpdateTenantRequestBody {
|
|
1633
|
-
name
|
|
1655
|
+
name?: string;
|
|
1656
|
+
logo?: ImageAssetStub | null;
|
|
1634
1657
|
}
|
|
1635
1658
|
export interface CreateTenantForUserRequestBody {
|
|
1636
1659
|
name: string;
|
|
@@ -1673,6 +1696,10 @@ declare class ParraAPI {
|
|
|
1673
1696
|
uploadImageAssetForTenantById: (tenant_id: string, body: UploadImageWithGroupRequestBody) => Promise<ImageAsset>;
|
|
1674
1697
|
uploadAvatarForUser: (body: UploadImageRequestBody) => Promise<ImageAssetStub>;
|
|
1675
1698
|
uploadAvatarForTenantUser: (tenant_id: string, body: UploadImageRequestBody) => Promise<ImageAssetStub>;
|
|
1699
|
+
uploadIconForTenantApplication: (tenant_id: string, application_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
|
|
1700
|
+
uploadHeaderForTenantRelease: (tenant_id: string, release_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
|
|
1701
|
+
uploadAttachmentForTicketById: (tenant_id: string, ticket_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
|
|
1702
|
+
uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody) => Promise<ImageAsset>;
|
|
1676
1703
|
createCheckoutSession: (body: CreateCheckoutSessionRequestBody) => Promise<CheckoutSession>;
|
|
1677
1704
|
getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
|
|
1678
1705
|
createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
|
|
@@ -1812,6 +1839,7 @@ declare class ParraAPI {
|
|
|
1812
1839
|
getTicketById: (tenant_id: string, ticket_id: string) => Promise<Ticket>;
|
|
1813
1840
|
updateTicketById: (tenant_id: string, ticket_id: string, body?: UpdateTicketRequestBody) => Promise<Ticket>;
|
|
1814
1841
|
deleteTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
|
|
1842
|
+
deleteAttachmentForTicketById: (tenant_id: string, ticket_id: string, ticket_attachment_id: string) => Promise<Response>;
|
|
1815
1843
|
updateReleaseForTicketById: (tenant_id: string, ticket_id: string, body: UpdateReleaseForTicketRequestBody) => Promise<Ticket>;
|
|
1816
1844
|
removeReleaseFromTicketById: (tenant_id: string, ticket_id: string) => Promise<Response>;
|
|
1817
1845
|
voteForTicketById: (tenant_id: string, ticket_id: string) => Promise<UserTicket>;
|
|
@@ -1832,6 +1860,9 @@ declare class ParraAPI {
|
|
|
1832
1860
|
deleteReleaseForTenantById: (tenant_id: string, release_id: string) => Promise<Response>;
|
|
1833
1861
|
cutReleaseForTenantById: (tenant_id: string, release_id: string) => Promise<Release>;
|
|
1834
1862
|
createReleaseItemForReleaseById: (tenant_id: string, release_id: string, body: CreateReleaseItemRequestBody) => Promise<ReleaseItem>;
|
|
1863
|
+
getAppInfoForTenantApplication: (tenant_id: string, application_id: string, query?: {
|
|
1864
|
+
version_token?: string;
|
|
1865
|
+
}) => Promise<AppInfo>;
|
|
1835
1866
|
paginateTicketsForApplication: (tenant_id: string, application_id: string, query?: {
|
|
1836
1867
|
limit?: number;
|
|
1837
1868
|
offset?: number;
|
|
@@ -1853,7 +1884,7 @@ declare class ParraAPI {
|
|
|
1853
1884
|
getApplicationByIdForTenantById: (tenant_id: string, application_id: string, query?: {
|
|
1854
1885
|
include?: string;
|
|
1855
1886
|
}) => Promise<Application>;
|
|
1856
|
-
updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body
|
|
1887
|
+
updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body?: UpdateApplicationRequestBody) => Promise<Application>;
|
|
1857
1888
|
deleteApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Response>;
|
|
1858
1889
|
updateApnsConfigurationForTenantApplication: (tenant_id: string, application_id: string, body: UpdateApnsConfigurationRequestBody) => Promise<ApnsConfiguration>;
|
|
1859
1890
|
getInboxItemsForTenantUser: (tenant_id: string, query?: {
|
|
@@ -1920,7 +1951,7 @@ declare class ParraAPI {
|
|
|
1920
1951
|
getTenantById: (tenant_id: string, query?: {
|
|
1921
1952
|
include?: string;
|
|
1922
1953
|
}) => Promise<Tenant>;
|
|
1923
|
-
updateTenantById: (tenant_id: string, body
|
|
1954
|
+
updateTenantById: (tenant_id: string, body?: UpdateTenantRequestBody) => Promise<Tenant>;
|
|
1924
1955
|
deleteTenantById: (tenant_id: string) => Promise<Response>;
|
|
1925
1956
|
createTenant: (body: CreateTenantRequestBody) => Promise<Tenant>;
|
|
1926
1957
|
createTenantForUserById: (user_id: string, body: CreateTenantForUserRequestBody) => Promise<Tenant>;
|
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",
|
|
@@ -701,6 +754,12 @@ var ParraAPI = /** @class */ (function () {
|
|
|
701
754
|
},
|
|
702
755
|
});
|
|
703
756
|
};
|
|
757
|
+
this.getAppInfoForTenantApplication = function (tenant_id, application_id, query) {
|
|
758
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/app-info"), {
|
|
759
|
+
method: "get",
|
|
760
|
+
query: query,
|
|
761
|
+
});
|
|
762
|
+
};
|
|
704
763
|
this.paginateTicketsForApplication = function (tenant_id, application_id, query) {
|
|
705
764
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/tickets"), {
|
|
706
765
|
method: "get",
|