valtech-components 2.0.880 → 2.0.881
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/esm2022/lib/services/icons.service.mjs +1 -1
- package/esm2022/lib/services/org/org.service.mjs +52 -0
- package/esm2022/lib/services/org/types.mjs +2 -0
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +49 -2
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/services/org/org.service.d.ts +24 -0
- package/lib/services/org/types.d.ts +47 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ValtechAuthConfig } from '../auth/types';
|
|
4
|
+
import { Organization, CreateOrgRequest, UpdateOrgRequest, InviteUserRequest, InviteUserResponse, LeaveOrgResponse } from './types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class OrgService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
constructor(config: ValtechAuthConfig, http: HttpClient);
|
|
10
|
+
private get baseUrl();
|
|
11
|
+
listMyOrgs(): Observable<Organization[]>;
|
|
12
|
+
getOrg(orgId: string): Observable<Organization>;
|
|
13
|
+
createOrg(req: CreateOrgRequest): Observable<Organization>;
|
|
14
|
+
updateOrg(orgId: string, req: UpdateOrgRequest): Observable<Organization>;
|
|
15
|
+
deleteOrg(orgId: string): Observable<{
|
|
16
|
+
deleted: boolean;
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
inviteUser(orgId: string, req: InviteUserRequest): Observable<InviteUserResponse>;
|
|
20
|
+
leaveOrg(orgId: string): Observable<LeaveOrgResponse>;
|
|
21
|
+
transferOwnership(orgId: string, newOwnerId: string): Observable<Organization>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrgService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrgService>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type OrgType = 'PRIVATE' | 'PUBLIC' | 'PERSONAL' | 'BUSINESS';
|
|
2
|
+
export type OrgPlan = 'free' | 'pro' | 'enterprise';
|
|
3
|
+
export interface Organization {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
type: OrgType;
|
|
8
|
+
plan: OrgPlan;
|
|
9
|
+
ownerId: string;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ListMyOrgsResponse {
|
|
15
|
+
operationId: string;
|
|
16
|
+
organizations: Organization[];
|
|
17
|
+
nextToken?: string;
|
|
18
|
+
count: number;
|
|
19
|
+
}
|
|
20
|
+
export interface OrgResponse {
|
|
21
|
+
operationId: string;
|
|
22
|
+
organization: Organization;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateOrgRequest {
|
|
25
|
+
name: string;
|
|
26
|
+
type: OrgType;
|
|
27
|
+
description?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface UpdateOrgRequest {
|
|
30
|
+
name?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface InviteUserRequest {
|
|
34
|
+
email: string;
|
|
35
|
+
roleId: string;
|
|
36
|
+
}
|
|
37
|
+
export interface InviteUserResponse {
|
|
38
|
+
operationId: string;
|
|
39
|
+
inviteUrl: string;
|
|
40
|
+
expiresAt: string;
|
|
41
|
+
email: string;
|
|
42
|
+
}
|
|
43
|
+
export interface LeaveOrgResponse {
|
|
44
|
+
operationId: string;
|
|
45
|
+
message: string;
|
|
46
|
+
leftAt: string;
|
|
47
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -281,6 +281,8 @@ export * from './lib/services/markdown-article/legal-content.service';
|
|
|
281
281
|
export * from './lib/services/legal-link/legal-link.service';
|
|
282
282
|
export * from './lib/services/firebase';
|
|
283
283
|
export * from './lib/services/auth';
|
|
284
|
+
export { OrgService } from './lib/services/org/org.service';
|
|
285
|
+
export type { Organization, OrgType, OrgPlan, CreateOrgRequest, UpdateOrgRequest, InviteUserRequest, InviteUserResponse, LeaveOrgResponse, ListMyOrgsResponse, OrgResponse, } from './lib/services/org/types';
|
|
284
286
|
export * from './lib/services/i18n';
|
|
285
287
|
export * from './lib/services/preferences';
|
|
286
288
|
export * from './lib/services/network-status';
|