@parra/parra-js-sdk 0.3.57 → 0.3.60
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 +12 -2
- package/dist/ParraAPI.js +15 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -1326,7 +1326,8 @@ export declare enum ConnectedAppType {
|
|
|
1326
1326
|
export declare enum ConnectedAppConnectionStatus {
|
|
1327
1327
|
pending = "pending",
|
|
1328
1328
|
live = "live",
|
|
1329
|
-
error = "error"
|
|
1329
|
+
error = "error",
|
|
1330
|
+
disabled = "disabled"
|
|
1330
1331
|
}
|
|
1331
1332
|
export interface ConnectedAppConnection {
|
|
1332
1333
|
id: string;
|
|
@@ -1362,10 +1363,17 @@ export interface TenantConnectedApp {
|
|
|
1362
1363
|
link: ConnectedAppLink;
|
|
1363
1364
|
connections: Array<ConnectedAppConnection>;
|
|
1364
1365
|
}
|
|
1366
|
+
export interface UpdateConnectedAppConnectionRequestBody {
|
|
1367
|
+
active?: boolean;
|
|
1368
|
+
}
|
|
1365
1369
|
export interface CreateSlackConnectedAppConnectionRequestBody {
|
|
1366
1370
|
code: string;
|
|
1367
1371
|
}
|
|
1368
|
-
export
|
|
1372
|
+
export interface CreateXConnectedAppConnectionRequestBody {
|
|
1373
|
+
code: string;
|
|
1374
|
+
code_verifier: string;
|
|
1375
|
+
}
|
|
1376
|
+
export type CreateConnectedAppConnectionRequestBody = CreateSlackConnectedAppConnectionRequestBody | CreateXConnectedAppConnectionRequestBody;
|
|
1369
1377
|
export interface TenantInvitationRequestBody {
|
|
1370
1378
|
name: string;
|
|
1371
1379
|
email: string;
|
|
@@ -1638,6 +1646,8 @@ declare class ParraAPI {
|
|
|
1638
1646
|
listConnectedAppsForTenantById: (tenant_id: string, query?: {
|
|
1639
1647
|
include?: string;
|
|
1640
1648
|
}) => Promise<Array<TenantConnectedApp>>;
|
|
1649
|
+
updateConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string, body?: UpdateConnectedAppConnectionRequestBody) => Promise<ConnectedAppConnection>;
|
|
1650
|
+
deleteConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string) => Promise<ConnectedAppConnection>;
|
|
1641
1651
|
createConnectionForConnectedApp: (tenant_id: string, connected_app_id: string, body?: CreateConnectedAppConnectionRequestBody) => Promise<ConnectedAppConnection>;
|
|
1642
1652
|
getInvitationsForTenantById: (tenant_id: string) => Promise<Array<TenantInvitation>>;
|
|
1643
1653
|
createInvitationForTenantById: (tenant_id: string, body: TenantInvitationRequestBody) => Promise<TenantInvitation>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -179,6 +179,7 @@ var ConnectedAppConnectionStatus;
|
|
|
179
179
|
ConnectedAppConnectionStatus["pending"] = "pending";
|
|
180
180
|
ConnectedAppConnectionStatus["live"] = "live";
|
|
181
181
|
ConnectedAppConnectionStatus["error"] = "error";
|
|
182
|
+
ConnectedAppConnectionStatus["disabled"] = "disabled";
|
|
182
183
|
})(ConnectedAppConnectionStatus || (exports.ConnectedAppConnectionStatus = ConnectedAppConnectionStatus = {}));
|
|
183
184
|
var ParraAPI = /** @class */ (function () {
|
|
184
185
|
function ParraAPI(http, options) {
|
|
@@ -836,6 +837,20 @@ var ParraAPI = /** @class */ (function () {
|
|
|
836
837
|
query: query,
|
|
837
838
|
});
|
|
838
839
|
};
|
|
840
|
+
this.updateConnectedAppConnectionById = function (tenant_id, connected_app_connection_id, body) {
|
|
841
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/connected-apps/connections/").concat(connected_app_connection_id), {
|
|
842
|
+
method: "put",
|
|
843
|
+
body: JSON.stringify(body),
|
|
844
|
+
headers: {
|
|
845
|
+
"content-type": "application/json",
|
|
846
|
+
},
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
this.deleteConnectedAppConnectionById = function (tenant_id, connected_app_connection_id) {
|
|
850
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/connected-apps/connections/").concat(connected_app_connection_id), {
|
|
851
|
+
method: "delete",
|
|
852
|
+
});
|
|
853
|
+
};
|
|
839
854
|
this.createConnectionForConnectedApp = function (tenant_id, connected_app_id, body) {
|
|
840
855
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/connected-apps/").concat(connected_app_id, "/connections"), {
|
|
841
856
|
method: "post",
|