@flashbacktech/flashbackclient 0.1.87 → 0.1.88
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/api/client.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { MFAMethodsResponse, MFASetupRequest, MFASetupResponse, MFAStatusRespons
|
|
|
11
11
|
import { DeleteSettingsRequest, GetSettingsResponse, PartialUpdateSettingsRequest, UpdateSettingsRequest } from './types/settings';
|
|
12
12
|
import { UpdateUserRoleResponse, UserRoleResponse } from './types/roles';
|
|
13
13
|
import { UserProfileResponse } from './types/roles';
|
|
14
|
+
import { CreateOrgUserRequest, CreateOrgUserResponse, DeleteOrgUserResponse, GetOrganizationResponse, ListOrgUsersResponse, OrgUserResponse, UpdateOrganizationBody, UpdateOrganizationResponse, UpdateOrgUserRequest, UpdateOrgUserResponse } from './types/organization';
|
|
14
15
|
interface ErrorResponse {
|
|
15
16
|
message?: string;
|
|
16
17
|
[key: string]: any;
|
|
@@ -176,5 +177,19 @@ export declare class ApiClient implements IApiClient {
|
|
|
176
177
|
addUserToWorkspace: (workspaceId: string, request: WorkspaceTypes.AddUserToWorkspaceRequest) => Promise<WorkspaceTypes.AddUserToWorkspaceResponse>;
|
|
177
178
|
updateWorkspaceUserRole: (workspaceId: string, userId: string, request: WorkspaceTypes.UpdateUserRoleRequest) => Promise<WorkspaceTypes.UpdateUserRoleResponse>;
|
|
178
179
|
removeUserFromWorkspace: (workspaceId: string, userId: string) => Promise<WorkspaceTypes.RemoveUserFromWorkspaceResponse>;
|
|
180
|
+
getOrganizationUsers: () => Promise<ListOrgUsersResponse>;
|
|
181
|
+
createOrganizationUser: (request: CreateOrgUserRequest) => Promise<CreateOrgUserResponse>;
|
|
182
|
+
getOrganizationUser: (userId: string) => Promise<OrgUserResponse | {
|
|
183
|
+
success: false;
|
|
184
|
+
message: string;
|
|
185
|
+
}>;
|
|
186
|
+
updateOrganizationUser: (userId: string, request: UpdateOrgUserRequest) => Promise<UpdateOrgUserResponse>;
|
|
187
|
+
deleteOrganizationUser: (userId: string) => Promise<DeleteOrgUserResponse>;
|
|
188
|
+
activateOrganizationUser: (userId: string) => Promise<{
|
|
189
|
+
success: boolean;
|
|
190
|
+
message: string;
|
|
191
|
+
}>;
|
|
192
|
+
getOrganization: (orgId: string) => Promise<GetOrganizationResponse>;
|
|
193
|
+
updateOrganization: (orgId: string, request: UpdateOrganizationBody) => Promise<UpdateOrganizationResponse>;
|
|
179
194
|
}
|
|
180
195
|
export {};
|
package/dist/api/client.js
CHANGED
|
@@ -417,7 +417,6 @@ class ApiClient {
|
|
|
417
417
|
this.updateUserRole = async (userId, orgRole) => {
|
|
418
418
|
return this.makeRequest(`user/${userId}/role`, 'PUT', { orgRole });
|
|
419
419
|
};
|
|
420
|
-
// Workspaces APIs
|
|
421
420
|
////// Workspace Management API
|
|
422
421
|
this.createWorkspace = async (request) => {
|
|
423
422
|
return this.makeRequest('workspace', 'POST', request);
|
|
@@ -444,6 +443,31 @@ class ApiClient {
|
|
|
444
443
|
this.removeUserFromWorkspace = async (workspaceId, userId) => {
|
|
445
444
|
return this.makeRequest(`workspace/${workspaceId}/users/${userId}`, 'DELETE', null);
|
|
446
445
|
};
|
|
446
|
+
// Organization Users Management
|
|
447
|
+
this.getOrganizationUsers = async () => {
|
|
448
|
+
return this.makeRequest('organization/users', 'GET', null);
|
|
449
|
+
};
|
|
450
|
+
this.createOrganizationUser = async (request) => {
|
|
451
|
+
return this.makeRequest('organization/users', 'POST', request);
|
|
452
|
+
};
|
|
453
|
+
this.getOrganizationUser = async (userId) => {
|
|
454
|
+
return this.makeRequest(`organization/users/${userId}`, 'GET', null);
|
|
455
|
+
};
|
|
456
|
+
this.updateOrganizationUser = async (userId, request) => {
|
|
457
|
+
return this.makeRequest(`organization/users/${userId}`, 'PUT', request);
|
|
458
|
+
};
|
|
459
|
+
this.deleteOrganizationUser = async (userId) => {
|
|
460
|
+
return this.makeRequest(`organization/users/${userId}`, 'DELETE', null);
|
|
461
|
+
};
|
|
462
|
+
this.activateOrganizationUser = async (userId) => {
|
|
463
|
+
return this.makeRequest(`organization/users/${userId}/activate`, 'POST', null);
|
|
464
|
+
};
|
|
465
|
+
this.getOrganization = async (orgId) => {
|
|
466
|
+
return this.makeRequest(`organization/${orgId}`, 'GET', null);
|
|
467
|
+
};
|
|
468
|
+
this.updateOrganization = async (orgId, request) => {
|
|
469
|
+
return this.makeRequest(`organization/${orgId}`, 'PUT', request);
|
|
470
|
+
};
|
|
447
471
|
this.baseURL = baseURL;
|
|
448
472
|
this.headers = {};
|
|
449
473
|
this.debug = false;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ import * as MFATypes from './types/mfa';
|
|
|
12
12
|
import * as SettingsTypes from './types/settings';
|
|
13
13
|
import * as RolesTypes from './types/roles';
|
|
14
14
|
import * as WorkspaceTypes from './types/workspace';
|
|
15
|
-
|
|
15
|
+
import * as OrganizationTypes from './types/organization';
|
|
16
|
+
export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes, EmailTypes, QuotaTypes, SubscriptionTypes, DeviceTypes, MFATypes, SettingsTypes, RolesTypes, WorkspaceTypes, OrganizationTypes };
|
package/dist/api/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.WorkspaceTypes = exports.RolesTypes = exports.SettingsTypes = exports.MFATypes = exports.DeviceTypes = exports.SubscriptionTypes = exports.QuotaTypes = exports.EmailTypes = exports.BridgeTypes = exports.HttpError = exports.ApiInterfaces = exports.StatsTypes = exports.AuthTypes = exports.ApiTypes = exports.ApiClient = void 0;
|
|
36
|
+
exports.OrganizationTypes = exports.WorkspaceTypes = exports.RolesTypes = exports.SettingsTypes = exports.MFATypes = exports.DeviceTypes = exports.SubscriptionTypes = exports.QuotaTypes = exports.EmailTypes = exports.BridgeTypes = exports.HttpError = exports.ApiInterfaces = exports.StatsTypes = exports.AuthTypes = exports.ApiTypes = exports.ApiClient = void 0;
|
|
37
37
|
const client_1 = require("./client");
|
|
38
38
|
Object.defineProperty(exports, "ApiClient", { enumerable: true, get: function () { return client_1.ApiClient; } });
|
|
39
39
|
Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return client_1.HttpError; } });
|
|
@@ -63,3 +63,5 @@ const RolesTypes = __importStar(require("./types/roles"));
|
|
|
63
63
|
exports.RolesTypes = RolesTypes;
|
|
64
64
|
const WorkspaceTypes = __importStar(require("./types/workspace"));
|
|
65
65
|
exports.WorkspaceTypes = WorkspaceTypes;
|
|
66
|
+
const OrganizationTypes = __importStar(require("./types/organization"));
|
|
67
|
+
exports.OrganizationTypes = OrganizationTypes;
|
package/dist/api/types/auth.d.ts
CHANGED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { OrgRoles } from "./roles";
|
|
2
|
+
export interface CreateOrgUserRequest {
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
firstName: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
orgRole?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateOrgUserRequest {
|
|
10
|
+
name?: string;
|
|
11
|
+
lastName?: string;
|
|
12
|
+
orgRole?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface OrgUserResponse {
|
|
15
|
+
id: string;
|
|
16
|
+
email: string;
|
|
17
|
+
name: string;
|
|
18
|
+
lastName: string;
|
|
19
|
+
orgId: string | null;
|
|
20
|
+
orgRole: number | null;
|
|
21
|
+
validated: boolean;
|
|
22
|
+
deletedAt: Date | null;
|
|
23
|
+
orgRoleDescription: string;
|
|
24
|
+
orgRoles: OrgRoles[];
|
|
25
|
+
}
|
|
26
|
+
export interface ListOrgUsersResponse {
|
|
27
|
+
success: boolean;
|
|
28
|
+
data: OrgUserResponse[];
|
|
29
|
+
total: number;
|
|
30
|
+
}
|
|
31
|
+
export interface CreateOrgUserResponse {
|
|
32
|
+
success: boolean;
|
|
33
|
+
data: OrgUserResponse;
|
|
34
|
+
message: string;
|
|
35
|
+
}
|
|
36
|
+
export interface UpdateOrgUserResponse {
|
|
37
|
+
success: boolean;
|
|
38
|
+
data: OrgUserResponse;
|
|
39
|
+
message: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DeleteOrgUserResponse {
|
|
42
|
+
success: boolean;
|
|
43
|
+
message: string;
|
|
44
|
+
}
|
|
45
|
+
export interface OrganizationData {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
domain: string;
|
|
49
|
+
address1?: string | null;
|
|
50
|
+
address2?: string | null;
|
|
51
|
+
city?: string | null;
|
|
52
|
+
zipcode?: string | null;
|
|
53
|
+
phone?: string | null;
|
|
54
|
+
state?: string | null;
|
|
55
|
+
country?: string | null;
|
|
56
|
+
deletedAt?: Date | null;
|
|
57
|
+
reposDisabled: boolean;
|
|
58
|
+
website?: string | null;
|
|
59
|
+
is_business: boolean;
|
|
60
|
+
mfaEnforced: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface GetOrganizationParams {
|
|
63
|
+
orgId: string;
|
|
64
|
+
}
|
|
65
|
+
export interface GetOrganizationResponse {
|
|
66
|
+
success: boolean;
|
|
67
|
+
data: OrganizationData | null;
|
|
68
|
+
message?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface UpdateOrganizationParams {
|
|
71
|
+
orgId: string;
|
|
72
|
+
}
|
|
73
|
+
export interface UpdateOrganizationBody {
|
|
74
|
+
name?: string;
|
|
75
|
+
address1?: string;
|
|
76
|
+
address2?: string;
|
|
77
|
+
city?: string;
|
|
78
|
+
zipcode?: string;
|
|
79
|
+
phone?: string;
|
|
80
|
+
state?: string;
|
|
81
|
+
country?: string;
|
|
82
|
+
is_business?: boolean;
|
|
83
|
+
mfaEnforced?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface UpdateOrganizationResponse {
|
|
86
|
+
success: boolean;
|
|
87
|
+
data: OrganizationData | null;
|
|
88
|
+
message: string;
|
|
89
|
+
}
|