@buildery/ts-api-kit 5.2.6 → 6.1.0
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.d.ts +103 -90
- package/dist/Api.js +17 -12
- package/dist/Api.js.map +1 -1
- package/dist/ApiConfigs.d.ts +7 -6
- package/dist/ApiConfigs.js +1 -0
- package/dist/ApiConfigs.js.map +1 -1
- package/dist/compose/useSingleton.d.ts +1 -1
- package/dist/compose/useSingleton.js +1 -2
- package/dist/compose/useSingleton.js.map +1 -1
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +31 -0
- package/dist/constants.js.map +1 -0
- package/dist/features/api/AbstractApi.d.ts +4 -4
- package/dist/features/api/AbstractApi.js +6 -6
- package/dist/features/api/AbstractApi.js.map +1 -1
- package/dist/features/auth/services/AuthAxiosService.js +6 -3
- package/dist/features/auth/services/AuthAxiosService.js.map +1 -1
- package/dist/features/auth/services/AuthService.d.ts +0 -1
- package/dist/features/auth/services/AuthService.js +0 -4
- package/dist/features/auth/services/AuthService.js.map +1 -1
- package/dist/features/callout/Callout.d.ts +22 -0
- package/dist/features/callout/Callout.js +66 -0
- package/dist/features/callout/Callout.js.map +1 -0
- package/dist/features/callout/CalloutMiddlewareService.d.ts +5 -0
- package/dist/features/callout/CalloutMiddlewareService.js +17 -0
- package/dist/features/callout/CalloutMiddlewareService.js.map +1 -0
- package/dist/features/callout/CalloutMiddlewares.d.ts +4 -0
- package/dist/features/callout/CalloutMiddlewares.js +15 -0
- package/dist/features/callout/CalloutMiddlewares.js.map +1 -0
- package/dist/features/callout/Calloutable.d.ts +3 -0
- package/dist/features/callout/Calloutable.js +20 -0
- package/dist/features/callout/Calloutable.js.map +1 -0
- package/dist/features/callout/index.d.ts +4 -1
- package/dist/features/callout/index.js +4 -1
- package/dist/features/callout/index.js.map +1 -1
- package/dist/features/callout/types.d.ts +21 -0
- package/dist/features/callout/types.js +3 -0
- package/dist/features/callout/types.js.map +1 -0
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.d.ts +2 -2
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.js +2 -2
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.js.map +1 -1
- package/dist/features/crud/operations/operations/Create.js +5 -5
- package/dist/features/crud/operations/operations/Create.js.map +1 -1
- package/dist/features/crud/operations/operations/CreateBulk.js +4 -5
- package/dist/features/crud/operations/operations/CreateBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteByFilters.js +2 -2
- package/dist/features/crud/operations/operations/DeleteByFilters.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteById.js +2 -2
- package/dist/features/crud/operations/operations/DeleteById.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteByIds.js +2 -2
- package/dist/features/crud/operations/operations/DeleteByIds.js.map +1 -1
- package/dist/features/crud/operations/operations/GetAll.js +2 -2
- package/dist/features/crud/operations/operations/GetAll.js.map +1 -1
- package/dist/features/crud/operations/operations/GetByFilters.js +2 -2
- package/dist/features/crud/operations/operations/GetByFilters.js.map +1 -1
- package/dist/features/crud/operations/operations/GetById.js +2 -2
- package/dist/features/crud/operations/operations/GetById.js.map +1 -1
- package/dist/features/crud/operations/operations/GetByIds.js +2 -2
- package/dist/features/crud/operations/operations/GetByIds.js.map +1 -1
- package/dist/features/crud/operations/operations/Update.js +2 -2
- package/dist/features/crud/operations/operations/Update.js.map +1 -1
- package/dist/features/crud/operations/operations/UpdateBulk.js +2 -2
- package/dist/features/crud/operations/operations/UpdateBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/Upsert.js +2 -2
- package/dist/features/crud/operations/operations/Upsert.js.map +1 -1
- package/dist/features/crud/operations/operations/UpsertBulk.js +2 -2
- package/dist/features/crud/operations/operations/UpsertBulk.js.map +1 -1
- package/dist/features/crud/sync/compose/useCrudSync.js +1 -2
- package/dist/features/crud/sync/compose/useCrudSync.js.map +1 -1
- package/dist/features/crud/sync/constants/CrudSyncAction.js +1 -1
- package/dist/features/crud/sync/constants/CrudSyncAction.js.map +1 -1
- package/dist/features/crud/sync/middlewares/PushCrudEvent.js.map +1 -1
- package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/micro/auth/AuthApi.d.ts +6 -6
- package/dist/micro/auth/AuthApi.js +11 -10
- package/dist/micro/auth/AuthApi.js.map +1 -1
- package/dist/micro/auth/WorkspaceApi.js +6 -4
- package/dist/micro/auth/WorkspaceApi.js.map +1 -1
- package/dist/micro/auth/types/InitWorkspace.d.ts +1 -2
- package/dist/micro/query/FieldApi.d.ts +4 -4
- package/dist/micro/query/FieldApi.js +9 -8
- package/dist/micro/query/FieldApi.js.map +1 -1
- package/dist/micro/query/SObjectApi.d.ts +1 -1
- package/dist/micro/query/SObjectApi.js +2 -2
- package/dist/micro/query/SObjectApi.js.map +1 -1
- package/dist/micro/query/types/FieldType.js +1 -1
- package/dist/micro/query/types/FieldType.js.map +1 -1
- package/dist/micro/query/types/SObject.d.ts +1 -3
- package/dist/micro/query/types/SObjectField.d.ts +1 -2
- package/dist/micro/security/PermissionApi.d.ts +2 -2
- package/dist/micro/security/PermissionApi.js +6 -6
- package/dist/micro/security/PermissionApi.js.map +1 -1
- package/dist/micro/security/PermissionCategoryApi.js +2 -2
- package/dist/micro/security/PermissionCategoryApi.js.map +1 -1
- package/dist/micro/security/PermissionSetApi.d.ts +2 -2
- package/dist/micro/security/PermissionSetApi.js +3 -3
- package/dist/micro/security/PermissionSetApi.js.map +1 -1
- package/dist/micro/security/TeamApi.d.ts +2 -2
- package/dist/micro/security/TeamApi.js +3 -3
- package/dist/micro/security/TeamApi.js.map +1 -1
- package/dist/micro/workspace/ModuleApi.d.ts +3 -3
- package/dist/micro/workspace/ModuleApi.js +4 -4
- package/dist/micro/workspace/ModuleApi.js.map +1 -1
- package/dist/micro/workspace/types/EUserStatus.js +1 -1
- package/dist/micro/workspace/types/EUserStatus.js.map +1 -1
- package/dist/services/ResponseService.d.ts +9 -0
- package/dist/services/ResponseService.js +28 -0
- package/dist/services/ResponseService.js.map +1 -0
- package/dist/services/UrlService.d.ts +4 -0
- package/dist/services/UrlService.js +15 -0
- package/dist/services/UrlService.js.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/HasCallouts.d.ts +1 -1
- package/dist/types.d.ts +61 -0
- package/dist/types.js +18 -0
- package/dist/types.js.map +1 -0
- package/package.json +6 -5
package/dist/Api.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Permission, PermissionAssignment, PermissionCategory, PermissionDefinition, PermissionGroup, PermissionSet,
|
|
2
|
-
import { HasCallouts } from "./types";
|
|
1
|
+
import { Module, Permission, PermissionAssignment, PermissionCategory, PermissionDefinition, PermissionGroup, PermissionSet, SObject, SObjectField, Team, User, WorkspaceApi } from "./micro";
|
|
2
|
+
import { HasCallouts, MicroserviceName } from "./types";
|
|
3
3
|
import { AuthApi } from "./micro/auth/AuthApi";
|
|
4
|
+
import { Flow } from '@buildery/flow';
|
|
4
5
|
export type ApiLayer = {
|
|
5
6
|
[Micro in keyof typeof RawApi]: {
|
|
6
7
|
[Entity in keyof typeof RawApi[Micro]]: typeof RawApi[Micro][Entity] extends (...params: infer EntityParams) => infer EntityResult ? (...args: EntityParams) => EntityResult & HasCallouts<EntityResult> : typeof RawApi[Micro][Entity] & HasCallouts<typeof RawApi[Micro][Entity]>;
|
|
@@ -15,164 +16,176 @@ export declare const RawApi: {
|
|
|
15
16
|
};
|
|
16
17
|
readonly query: {
|
|
17
18
|
readonly object: {
|
|
18
|
-
getByApiName(apiName: string): import("axios").AxiosRequestConfig
|
|
19
|
+
getByApiName(apiName: string): import("axios").AxiosRequestConfig;
|
|
19
20
|
readonly objectName: string;
|
|
20
|
-
readonly _serverName:
|
|
21
|
-
|
|
22
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
23
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
21
|
+
readonly _serverName: MicroserviceName;
|
|
22
|
+
get serverUrl(): string;
|
|
23
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
24
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
24
25
|
create(entity: SObject): import("axios").AxiosRequestConfig<SObject>;
|
|
25
26
|
update(entity: SObject): import("axios").AxiosRequestConfig<SObject>;
|
|
26
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
27
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
27
28
|
};
|
|
28
29
|
readonly field: {
|
|
29
|
-
create(field: SObjectField): import("axios").AxiosRequestConfig
|
|
30
|
-
getAllByObjectId(objectId: string): import("axios").AxiosRequestConfig
|
|
30
|
+
create(field: SObjectField): import("axios").AxiosRequestConfig;
|
|
31
|
+
getAllByObjectId(objectId: string): import("axios").AxiosRequestConfig;
|
|
31
32
|
getAllByObjectApiName(apiName: string): {
|
|
32
|
-
baseURL:
|
|
33
|
+
baseURL: string;
|
|
33
34
|
url: string;
|
|
34
35
|
};
|
|
35
|
-
deleteAllByObjectId(objectId: string): import("axios").AxiosRequestConfig
|
|
36
|
+
deleteAllByObjectId(objectId: string): import("axios").AxiosRequestConfig;
|
|
36
37
|
readonly objectName: string;
|
|
37
|
-
readonly _serverName:
|
|
38
|
-
|
|
39
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
38
|
+
readonly _serverName: MicroserviceName;
|
|
39
|
+
get serverUrl(): string;
|
|
40
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
40
41
|
update(entity: SObjectField): import("axios").AxiosRequestConfig<SObjectField>;
|
|
41
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
42
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
42
43
|
};
|
|
43
44
|
readonly record: <T>(objectName: string) => {
|
|
44
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
45
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
45
46
|
readonly objectName: string;
|
|
46
|
-
readonly _serverName:
|
|
47
|
-
|
|
48
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
49
|
-
getByFilters(query?: import("./types").ApiQueryRequest<T>): import("axios").AxiosRequestConfig
|
|
47
|
+
readonly _serverName: MicroserviceName;
|
|
48
|
+
get serverUrl(): string;
|
|
49
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
50
|
+
getByFilters(query?: import("./types").ApiQueryRequest<T>): import("axios").AxiosRequestConfig;
|
|
50
51
|
create(entity: T): import("axios").AxiosRequestConfig<T>;
|
|
51
52
|
update(entity: T): import("axios").AxiosRequestConfig<T>;
|
|
52
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
53
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
53
54
|
};
|
|
54
55
|
};
|
|
55
56
|
readonly security: {
|
|
56
57
|
readonly permission: {
|
|
57
|
-
getByCategoryId(categoryId: string): import("axios").AxiosRequestConfig
|
|
58
|
-
getByCategoryIds(categoryIds: string
|
|
58
|
+
getByCategoryId(categoryId: string): import("axios").AxiosRequestConfig;
|
|
59
|
+
getByCategoryIds(categoryIds: Array<string>): import("axios").AxiosRequestConfig;
|
|
59
60
|
getWithAssignments(data: import("./types").ApiQueryRequest<any> & {
|
|
60
61
|
permissionSetId: string;
|
|
61
|
-
}): import("axios").AxiosRequestConfig
|
|
62
|
+
}): import("axios").AxiosRequestConfig;
|
|
62
63
|
readonly objectName: string;
|
|
63
|
-
readonly _serverName:
|
|
64
|
-
|
|
65
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
66
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
67
|
-
getByFilters(query?: import("./types").ApiQueryRequest<Permission>): import("axios").AxiosRequestConfig
|
|
64
|
+
readonly _serverName: MicroserviceName;
|
|
65
|
+
get serverUrl(): string;
|
|
66
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
67
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
68
|
+
getByFilters(query?: import("./types").ApiQueryRequest<Permission>): import("axios").AxiosRequestConfig;
|
|
68
69
|
create(entity: Permission): import("axios").AxiosRequestConfig<Permission>;
|
|
69
70
|
update(entity: Permission): import("axios").AxiosRequestConfig<Permission>;
|
|
70
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
71
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
71
72
|
};
|
|
72
73
|
readonly permissionCategory: {
|
|
73
|
-
getByGroupId(groupId: string): import("axios").AxiosRequestConfig
|
|
74
|
+
getByGroupId(groupId: string): import("axios").AxiosRequestConfig;
|
|
74
75
|
readonly objectName: string;
|
|
75
|
-
readonly _serverName:
|
|
76
|
-
|
|
77
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
78
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
79
|
-
getByFilters(query?: import("./types").ApiQueryRequest<PermissionCategory>): import("axios").AxiosRequestConfig
|
|
76
|
+
readonly _serverName: MicroserviceName;
|
|
77
|
+
get serverUrl(): string;
|
|
78
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
79
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
80
|
+
getByFilters(query?: import("./types").ApiQueryRequest<PermissionCategory>): import("axios").AxiosRequestConfig;
|
|
80
81
|
create(entity: PermissionCategory): import("axios").AxiosRequestConfig<PermissionCategory>;
|
|
81
82
|
update(entity: PermissionCategory): import("axios").AxiosRequestConfig<PermissionCategory>;
|
|
82
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
83
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
83
84
|
};
|
|
84
85
|
readonly permissionAssignment: {
|
|
85
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
86
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
86
87
|
readonly objectName: string;
|
|
87
|
-
readonly _serverName:
|
|
88
|
-
|
|
89
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
90
|
-
getByFilters(query?: import("./types").ApiQueryRequest<PermissionAssignment>): import("axios").AxiosRequestConfig
|
|
88
|
+
readonly _serverName: MicroserviceName;
|
|
89
|
+
get serverUrl(): string;
|
|
90
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
91
|
+
getByFilters(query?: import("./types").ApiQueryRequest<PermissionAssignment>): import("axios").AxiosRequestConfig;
|
|
91
92
|
create(entity: PermissionAssignment): import("axios").AxiosRequestConfig<PermissionAssignment>;
|
|
92
93
|
update(entity: PermissionAssignment): import("axios").AxiosRequestConfig<PermissionAssignment>;
|
|
93
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
94
|
-
deleteByFilters(filter: import("mongodb").Filter<PermissionAssignment>): import("axios").AxiosRequestConfig
|
|
94
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
95
|
+
deleteByFilters(filter: import("mongodb").Filter<PermissionAssignment>): import("axios").AxiosRequestConfig;
|
|
95
96
|
};
|
|
96
97
|
readonly permissionDefinition: {
|
|
97
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
98
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
98
99
|
readonly objectName: string;
|
|
99
|
-
readonly _serverName:
|
|
100
|
-
|
|
101
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
102
|
-
getByIds(entityIds: string
|
|
103
|
-
getByFilters(query?: import("./types").ApiQueryRequest<PermissionDefinition>): import("axios").AxiosRequestConfig
|
|
100
|
+
readonly _serverName: MicroserviceName;
|
|
101
|
+
get serverUrl(): string;
|
|
102
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
103
|
+
getByIds(entityIds: Array<string>): import("axios").AxiosRequestConfig;
|
|
104
|
+
getByFilters(query?: import("./types").ApiQueryRequest<PermissionDefinition>): import("axios").AxiosRequestConfig;
|
|
104
105
|
create(entity: PermissionDefinition): import("axios").AxiosRequestConfig<PermissionDefinition>;
|
|
105
106
|
update(entity: PermissionDefinition): import("axios").AxiosRequestConfig<PermissionDefinition>;
|
|
106
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
107
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
107
108
|
};
|
|
108
109
|
readonly permissionGroup: {
|
|
109
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
110
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
110
111
|
readonly objectName: string;
|
|
111
|
-
readonly _serverName:
|
|
112
|
-
|
|
113
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
114
|
-
getByFilters(query?: import("./types").ApiQueryRequest<PermissionGroup>): import("axios").AxiosRequestConfig
|
|
112
|
+
readonly _serverName: MicroserviceName;
|
|
113
|
+
get serverUrl(): string;
|
|
114
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
115
|
+
getByFilters(query?: import("./types").ApiQueryRequest<PermissionGroup>): import("axios").AxiosRequestConfig;
|
|
115
116
|
create(entity: PermissionGroup): import("axios").AxiosRequestConfig<PermissionGroup>;
|
|
116
117
|
update(entity: PermissionGroup): import("axios").AxiosRequestConfig<PermissionGroup>;
|
|
117
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
118
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
118
119
|
};
|
|
119
120
|
readonly permissionSet: {
|
|
120
|
-
assign(assignment: import("./micro").PermissionSetAssignment): import("axios").AxiosRequestConfig
|
|
121
|
-
unAssign(assignment: import("./micro").PermissionSetAssignment): import("axios").AxiosRequestConfig
|
|
121
|
+
assign(assignment: import("./micro").PermissionSetAssignment): import("axios").AxiosRequestConfig;
|
|
122
|
+
unAssign(assignment: import("./micro").PermissionSetAssignment): import("axios").AxiosRequestConfig;
|
|
122
123
|
readonly objectName: string;
|
|
123
|
-
readonly _serverName:
|
|
124
|
-
|
|
125
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
126
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
127
|
-
getByFilters(query?: import("./types").ApiQueryRequest<PermissionSet>): import("axios").AxiosRequestConfig
|
|
124
|
+
readonly _serverName: MicroserviceName;
|
|
125
|
+
get serverUrl(): string;
|
|
126
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
127
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
128
|
+
getByFilters(query?: import("./types").ApiQueryRequest<PermissionSet>): import("axios").AxiosRequestConfig;
|
|
128
129
|
create(entity: PermissionSet): import("axios").AxiosRequestConfig<PermissionSet>;
|
|
129
130
|
update(entity: PermissionSet): import("axios").AxiosRequestConfig<PermissionSet>;
|
|
130
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
131
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
131
132
|
};
|
|
132
133
|
readonly team: {
|
|
133
|
-
assign(assignment: import("./micro").TeamAssignment): import("axios").AxiosRequestConfig
|
|
134
|
-
unassign(assignment: import("./micro").TeamAssignment): import("axios").AxiosRequestConfig
|
|
134
|
+
assign(assignment: import("./micro").TeamAssignment): import("axios").AxiosRequestConfig;
|
|
135
|
+
unassign(assignment: import("./micro").TeamAssignment): import("axios").AxiosRequestConfig;
|
|
135
136
|
readonly objectName: string;
|
|
136
|
-
readonly _serverName:
|
|
137
|
-
|
|
138
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
139
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
140
|
-
getByFilters(query?: import("./types").ApiQueryRequest<Team>): import("axios").AxiosRequestConfig
|
|
137
|
+
readonly _serverName: MicroserviceName;
|
|
138
|
+
get serverUrl(): string;
|
|
139
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
140
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
141
|
+
getByFilters(query?: import("./types").ApiQueryRequest<Team>): import("axios").AxiosRequestConfig;
|
|
141
142
|
create(entity: Team): import("axios").AxiosRequestConfig<Team>;
|
|
142
143
|
update(entity: Team): import("axios").AxiosRequestConfig<Team>;
|
|
143
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
144
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
144
145
|
};
|
|
145
146
|
};
|
|
146
147
|
readonly workspace: {
|
|
147
148
|
readonly user: {
|
|
148
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
149
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
149
150
|
readonly objectName: string;
|
|
150
|
-
readonly _serverName:
|
|
151
|
-
|
|
152
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
153
|
-
getByFilters(query?: import("./types").ApiQueryRequest<User>): import("axios").AxiosRequestConfig
|
|
151
|
+
readonly _serverName: MicroserviceName;
|
|
152
|
+
get serverUrl(): string;
|
|
153
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
154
|
+
getByFilters(query?: import("./types").ApiQueryRequest<User>): import("axios").AxiosRequestConfig;
|
|
154
155
|
create(entity: User): import("axios").AxiosRequestConfig<User>;
|
|
155
156
|
update(entity: User): import("axios").AxiosRequestConfig<User>;
|
|
156
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
157
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
157
158
|
};
|
|
158
159
|
readonly module: {
|
|
159
|
-
createAction(moduleId: string, action: import("./micro").ModuleAction): import("axios").AxiosRequestConfig
|
|
160
|
-
updateAction(moduleId: string, actionName: string, action: import("./micro").ModuleAction): import("axios").AxiosRequestConfig
|
|
161
|
-
deleteAction(moduleId: string, actionName: string): import("axios").AxiosRequestConfig
|
|
160
|
+
createAction(moduleId: string, action: import("./micro").ModuleAction): import("axios").AxiosRequestConfig;
|
|
161
|
+
updateAction(moduleId: string, actionName: string, action: import("./micro").ModuleAction): import("axios").AxiosRequestConfig;
|
|
162
|
+
deleteAction(moduleId: string, actionName: string): import("axios").AxiosRequestConfig;
|
|
162
163
|
readonly objectName: string;
|
|
163
|
-
readonly _serverName:
|
|
164
|
-
|
|
165
|
-
getAll(): import("axios").AxiosRequestConfig
|
|
166
|
-
getById(entityId: string): import("axios").AxiosRequestConfig
|
|
167
|
-
getByFilters(query?: import("./types").ApiQueryRequest<Module>): import("axios").AxiosRequestConfig
|
|
164
|
+
readonly _serverName: MicroserviceName;
|
|
165
|
+
get serverUrl(): string;
|
|
166
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
167
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
168
|
+
getByFilters(query?: import("./types").ApiQueryRequest<Module>): import("axios").AxiosRequestConfig;
|
|
168
169
|
create(entity: Module): import("axios").AxiosRequestConfig<Module>;
|
|
169
170
|
update(entity: Module): import("axios").AxiosRequestConfig<Module>;
|
|
170
171
|
upsert(entity: Module): import("axios").AxiosRequestConfig<Module>;
|
|
171
172
|
createBulk(entities: unknown[]): import("axios").AxiosRequestConfig<unknown[]>;
|
|
172
173
|
updateBulk(entities: unknown[]): import("axios").AxiosRequestConfig<unknown[]>;
|
|
173
174
|
upsertBulk(entities: unknown[]): import("axios").AxiosRequestConfig<unknown[]>;
|
|
174
|
-
deleteById(entityId: string): import("axios").AxiosRequestConfig
|
|
175
|
-
deleteByIds(entityIds: string
|
|
175
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
176
|
+
deleteByIds(entityIds: Array<string>): import("axios").AxiosRequestConfig;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly blueprint: {
|
|
180
|
+
readonly blueprint: {
|
|
181
|
+
getAll(): import("axios").AxiosRequestConfig;
|
|
182
|
+
readonly objectName: string;
|
|
183
|
+
readonly _serverName: MicroserviceName;
|
|
184
|
+
get serverUrl(): string;
|
|
185
|
+
getById(entityId: string): import("axios").AxiosRequestConfig;
|
|
186
|
+
create(entity: Flow): import("axios").AxiosRequestConfig<Flow>;
|
|
187
|
+
update(entity: Flow): import("axios").AxiosRequestConfig<Flow>;
|
|
188
|
+
deleteById(entityId: string): import("axios").AxiosRequestConfig;
|
|
176
189
|
};
|
|
177
190
|
};
|
|
178
191
|
};
|
package/dist/Api.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Api = exports.RawApi = void 0;
|
|
4
4
|
const micro_1 = require("./micro");
|
|
5
5
|
const features_1 = require("./features");
|
|
6
|
+
const types_1 = require("./types");
|
|
6
7
|
const ts_mixer_1 = require("ts-mixer");
|
|
7
8
|
const AuthApi_1 = require("./micro/auth/AuthApi");
|
|
8
9
|
exports.RawApi = {
|
|
@@ -14,33 +15,37 @@ exports.RawApi = {
|
|
|
14
15
|
},
|
|
15
16
|
query: {
|
|
16
17
|
object: new (class extends (0, ts_mixer_1.Mixin)(micro_1.SObjectApi, features_1.GetAll, features_1.GetById, (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
17
|
-
})(
|
|
18
|
+
})(types_1.MicroserviceName.query, 'metadata/object'),
|
|
18
19
|
field: new (class extends (0, ts_mixer_1.Mixin)(micro_1.FieldApi, features_1.GetById, (features_1.Update), features_1.DeleteById) {
|
|
19
|
-
})(
|
|
20
|
+
})(types_1.MicroserviceName.query, 'metadata/field'),
|
|
20
21
|
record: (objectName) => new (class extends (0, ts_mixer_1.Mixin)(features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
21
|
-
})(
|
|
22
|
+
})(types_1.MicroserviceName.query, `object/${objectName}`),
|
|
22
23
|
},
|
|
23
24
|
security: {
|
|
24
25
|
permission: new (class extends (0, ts_mixer_1.Mixin)(micro_1.PermissionApi, features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
25
|
-
})(
|
|
26
|
+
})(types_1.MicroserviceName.security, 'permission'),
|
|
26
27
|
permissionCategory: new (class extends (0, ts_mixer_1.Mixin)(micro_1.PermissionCategoryApi, features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
27
|
-
})(
|
|
28
|
+
})(types_1.MicroserviceName.security, 'permission-category'),
|
|
28
29
|
permissionAssignment: new (class extends (0, ts_mixer_1.Mixin)(features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById, (features_1.DeleteByFilters)) {
|
|
29
|
-
})(
|
|
30
|
+
})(types_1.MicroserviceName.security, 'permissionAssignment'),
|
|
30
31
|
permissionDefinition: new (class extends (0, ts_mixer_1.Mixin)(features_1.GetAll, features_1.GetById, features_1.GetByIds, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
31
|
-
})(
|
|
32
|
+
})(types_1.MicroserviceName.security, 'permission-definition'),
|
|
32
33
|
permissionGroup: new (class extends (0, ts_mixer_1.Mixin)(features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
33
|
-
})(
|
|
34
|
+
})(types_1.MicroserviceName.security, 'permission-group'),
|
|
34
35
|
permissionSet: new (class extends (0, ts_mixer_1.Mixin)(micro_1.PermissionSetApi, features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
35
|
-
})(
|
|
36
|
+
})(types_1.MicroserviceName.security, 'permission-set'),
|
|
36
37
|
team: new (class extends (0, ts_mixer_1.Mixin)(micro_1.TeamApi, features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
37
|
-
})(
|
|
38
|
+
})(types_1.MicroserviceName.security, 'team'),
|
|
38
39
|
},
|
|
39
40
|
workspace: {
|
|
40
41
|
user: new (class extends (0, ts_mixer_1.Mixin)(features_1.GetAll, features_1.GetById, (features_1.GetByFilters), (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
41
|
-
})(
|
|
42
|
+
})(types_1.MicroserviceName.workspace, 'user'),
|
|
42
43
|
module: new (class extends (0, ts_mixer_1.Mixin)(micro_1.ModuleApi, (0, ts_mixer_1.Mixin)(features_1.GetAll, features_1.GetById, (features_1.GetByFilters)), (0, ts_mixer_1.Mixin)((features_1.Create), (features_1.Update), (features_1.Upsert)), features_1.CreateBulk, features_1.UpdateBulk, features_1.UpsertBulk, features_1.DeleteById, features_1.DeleteByIds) {
|
|
43
|
-
})(
|
|
44
|
+
})(types_1.MicroserviceName.workspace, 'module'),
|
|
45
|
+
},
|
|
46
|
+
blueprint: {
|
|
47
|
+
blueprint: new (class extends (0, ts_mixer_1.Mixin)(features_1.GetAll, features_1.GetById, (features_1.Create), (features_1.Update), features_1.DeleteById) {
|
|
48
|
+
})(types_1.MicroserviceName.blueprint, 'flow'),
|
|
44
49
|
},
|
|
45
50
|
};
|
|
46
51
|
exports.Api = exports.RawApi;
|
package/dist/Api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../src/Api.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../src/Api.ts"],"names":[],"mappings":"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"}
|
package/dist/ApiConfigs.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { EventBus } from "@buildery/event-bus";
|
|
2
2
|
export declare class ApiConfigs {
|
|
3
3
|
static readonly api: {
|
|
4
|
-
workspaceUrl: string;
|
|
5
|
-
initUrl: string;
|
|
6
|
-
queryUrl: string;
|
|
7
|
-
authUrl: string;
|
|
8
|
-
securityUrl: string;
|
|
4
|
+
workspaceUrl: undefined | string;
|
|
5
|
+
initUrl: undefined | string;
|
|
6
|
+
queryUrl: undefined | string;
|
|
7
|
+
authUrl: undefined | string;
|
|
8
|
+
securityUrl: undefined | string;
|
|
9
|
+
blueprintUrl: undefined | string;
|
|
9
10
|
};
|
|
10
11
|
static readonly event: {
|
|
11
|
-
eventBus: EventBus;
|
|
12
|
+
eventBus: null | EventBus;
|
|
12
13
|
};
|
|
13
14
|
}
|
package/dist/ApiConfigs.js
CHANGED
package/dist/ApiConfigs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiConfigs.js","sourceRoot":"","sources":["../src/ApiConfigs.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ApiConfigs.js","sourceRoot":"","sources":["../src/ApiConfigs.ts"],"names":[],"mappings":";;;AAGA,MAAa,UAAU;;AAAvB,gCAaC;AAZwB,cAAG,GAAG;IAC3B,YAAY,EAAE,SAA+B;IAC7C,OAAO,EAAE,SAA+B;IACxC,QAAQ,EAAE,SAA+B;IACzC,OAAO,EAAE,SAA+B;IACxC,WAAW,EAAE,SAA+B;IAC5C,YAAY,EAAE,SAA+B;CAC9C,CAAA;AAEsB,gBAAK,GAAG;IAC7B,QAAQ,EAAE,IAAuB;CAClC,CAAA"}
|
|
@@ -2,5 +2,5 @@ import { Constructor } from "../types";
|
|
|
2
2
|
export declare function useSingleton(): {
|
|
3
3
|
instanceByDefinition: Map<any, any>;
|
|
4
4
|
getInstanceByDefinition: <T extends Constructor<any>>(definition: T, ...params: ConstructorParameters<T>) => InstanceType<T>;
|
|
5
|
-
getInstanceByKey: <
|
|
5
|
+
getInstanceByKey: <T extends Constructor<any>>(key: any, definition: T, ...params: ConstructorParameters<T>) => InstanceType<T>;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useSingleton =
|
|
3
|
+
exports.useSingleton = useSingleton;
|
|
4
4
|
function useSingleton() {
|
|
5
5
|
const instanceByDefinition = new Map();
|
|
6
6
|
const instanceByKey = new Map();
|
|
@@ -26,5 +26,4 @@ function useSingleton() {
|
|
|
26
26
|
getInstanceByKey
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
exports.useSingleton = useSingleton;
|
|
30
29
|
//# sourceMappingURL=useSingleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSingleton.js","sourceRoot":"","sources":["../../src/compose/useSingleton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSingleton.js","sourceRoot":"","sources":["../../src/compose/useSingleton.ts"],"names":[],"mappings":";;AAEA,oCAgCC;AAhCD,SAAgB,YAAY;IAE1B,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAE,CAAC;IAEvC,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;IAEhC,SAAS,uBAAuB,CAA6B,UAAa,EAAE,GAAG,MAAgC;;QAC7G,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,IAAI,QAAQ,GAAG,MAAA,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAC,mCAAI,IAAI,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC;QAEjF,oBAAoB,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE/C,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,SAAS,gBAAgB,CAA6B,GAAQ,EAAE,UAAa,EAAE,GAAG,MAAgC;;QAChH,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,IAAI,QAAQ,GAAG,MAAA,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,mCAAI,IAAI,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC;QAEnE,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAEjC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,OAAO;QACL,oBAAoB;QACpB,uBAAuB;QACvB,gBAAgB;KACjB,CAAA;AAEH,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MICROSERVICE_URL = exports.BASE_DEVELOPMENT_URL = void 0;
|
|
4
|
+
exports.BASE_DEVELOPMENT_URL = 'http://localhost:3000';
|
|
5
|
+
exports.MICROSERVICE_URL = {
|
|
6
|
+
workspace: {
|
|
7
|
+
development: `${exports.BASE_DEVELOPMENT_URL}/workspace`,
|
|
8
|
+
production: '',
|
|
9
|
+
},
|
|
10
|
+
init: {
|
|
11
|
+
development: `${exports.BASE_DEVELOPMENT_URL}/workspace-init`,
|
|
12
|
+
production: '',
|
|
13
|
+
},
|
|
14
|
+
query: {
|
|
15
|
+
development: `${exports.BASE_DEVELOPMENT_URL}/query`,
|
|
16
|
+
production: '',
|
|
17
|
+
},
|
|
18
|
+
auth: {
|
|
19
|
+
development: `${exports.BASE_DEVELOPMENT_URL}/auth`,
|
|
20
|
+
production: '',
|
|
21
|
+
},
|
|
22
|
+
security: {
|
|
23
|
+
development: `${exports.BASE_DEVELOPMENT_URL}/security`,
|
|
24
|
+
production: '',
|
|
25
|
+
},
|
|
26
|
+
blueprint: {
|
|
27
|
+
development: `${exports.BASE_DEVELOPMENT_URL}/flow`,
|
|
28
|
+
production: '',
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG,uBAAuB,CAAA;AAE9C,QAAA,gBAAgB,GAAG;IAC5B,SAAS,EAAE;QACP,WAAW,EAAE,GAAG,4BAAoB,YAAY;QAChD,UAAU,EAAE,EAAE;KACjB;IACD,IAAI,EAAE;QACF,WAAW,EAAE,GAAG,4BAAoB,iBAAiB;QACrD,UAAU,EAAE,EAAE;KACjB;IACD,KAAK,EAAE;QACH,WAAW,EAAE,GAAG,4BAAoB,QAAQ;QAC5C,UAAU,EAAE,EAAE;KACjB;IACD,IAAI,EAAE;QACF,WAAW,EAAE,GAAG,4BAAoB,OAAO;QAC3C,UAAU,EAAE,EAAE;KACjB;IACD,QAAQ,EAAE;QACN,WAAW,EAAE,GAAG,4BAAoB,WAAW;QAC/C,UAAU,EAAE,EAAE;KACjB;IACD,SAAS,EAAE;QACP,WAAW,EAAE,GAAG,4BAAoB,OAAO;QAC3C,UAAU,EAAE,EAAE;KACjB;CAC6C,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MicroserviceName } from "../../types";
|
|
2
2
|
export declare abstract class AbstractApi {
|
|
3
|
-
readonly _serverName:
|
|
4
|
-
get
|
|
5
|
-
protected constructor(
|
|
3
|
+
readonly _serverName: MicroserviceName;
|
|
4
|
+
get serverUrl(): string;
|
|
5
|
+
protected constructor(microName: MicroserviceName);
|
|
6
6
|
}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AbstractApi = void 0;
|
|
4
4
|
const auto_bind_1 = require("@buildery/auto-bind");
|
|
5
|
-
const
|
|
5
|
+
const UrlService_1 = require("../../services/UrlService");
|
|
6
6
|
class AbstractApi {
|
|
7
|
-
get
|
|
8
|
-
return
|
|
7
|
+
get serverUrl() {
|
|
8
|
+
return UrlService_1.UrlService.getMicroUrl(this._serverName);
|
|
9
9
|
}
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(microName) {
|
|
11
11
|
(0, auto_bind_1.default)(this);
|
|
12
|
-
if (!
|
|
12
|
+
if (!microName) {
|
|
13
13
|
throw new AbstractApiError('Server API name is not defined!');
|
|
14
14
|
}
|
|
15
|
-
this._serverName =
|
|
15
|
+
this._serverName = microName;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.AbstractApi = AbstractApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractApi.js","sourceRoot":"","sources":["../../../src/features/api/AbstractApi.ts"],"names":[],"mappings":";;;AAAA,mDAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"AbstractApi.js","sourceRoot":"","sources":["../../../src/features/api/AbstractApi.ts"],"names":[],"mappings":";;;AAAA,mDAA2C;AAC3C,0DAAqD;AAGrD,MAAsB,WAAW;IAI/B,IAAW,SAAS;QAClB,OAAO,uBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;IAED,YAAsB,SAA2B;QAC/C,IAAA,mBAAQ,EAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;CACF;AAjBD,kCAiBC;AAED,MAAM,gBAAiB,SAAQ,KAAK;CAAG"}
|
|
@@ -7,8 +7,10 @@ const AuthService_1 = require("./AuthService");
|
|
|
7
7
|
class AuthAxiosService {
|
|
8
8
|
static getAxiosInstance() {
|
|
9
9
|
const instance = axios_1.default.create();
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
if (typeof window !== "undefined") {
|
|
11
|
+
instance.interceptors.request.use(AuthAxiosService.setTokenHeader, error => Promise.reject(error));
|
|
12
|
+
instance.interceptors.response.use(response => response, AuthAxiosService.refreshTokens);
|
|
13
|
+
}
|
|
12
14
|
return instance;
|
|
13
15
|
}
|
|
14
16
|
static setTokenHeader(config) {
|
|
@@ -19,7 +21,8 @@ class AuthAxiosService {
|
|
|
19
21
|
return config;
|
|
20
22
|
}
|
|
21
23
|
static async refreshTokens(error) {
|
|
22
|
-
|
|
24
|
+
var _a;
|
|
25
|
+
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) !== 401)
|
|
23
26
|
return Promise.reject(error);
|
|
24
27
|
await AuthService_1.AuthService.refresh();
|
|
25
28
|
if (!AuthTokensService_1.AuthTokensService.isTokensExists()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthAxiosService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthAxiosService.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,2DAAsD;AACtD,+CAA0C;AAE1C,MAAa,gBAAgB;IAC1B,MAAM,CAAC,gBAAgB;QACtB,MAAM,QAAQ,GAAG,eAAK,CAAC,MAAM,EAAE,CAAC;QAEhC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"AuthAxiosService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthAxiosService.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,2DAAsD;AACtD,+CAA0C;AAE1C,MAAa,gBAAgB;IAC1B,MAAM,CAAC,gBAAgB;QACtB,MAAM,QAAQ,GAAG,eAAK,CAAC,MAAM,EAAE,CAAC;QAEhC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAChC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACnG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAC7F,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAkC;QACtD,MAAM,WAAW,GAAG,qCAAiB,CAAC,cAAc,EAAE,CAAC;QAEvD,IAAI,CAAC,WAAW;YAAE,OAAO,MAAM,CAAC;QAEhC,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,KAAU;;QACnC,IAAI,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG;YAAE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEjE,MAAM,yBAAW,CAAC,OAAO,EAAE,CAAC;QAE5B,IAAI,CAAC,qCAAiB,CAAC,cAAc,EAAE,EAAE,CAAC;YACxC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;YAEpC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAA,eAAK,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,gBAAgB;QACpB,MAAM,QAAQ,GAAG,uBAAuB,CAAC;QACzC,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEzC,MAAM,GAAG,GAAG,GAAG,QAAQ,aAAa,WAAW,EAAE,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;CAEF;AA7CD,4CA6CC"}
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthService = void 0;
|
|
4
4
|
const AuthTokensService_1 = require("./AuthTokensService");
|
|
5
|
-
const AuthApi_1 = require("../../../micro/auth/AuthApi");
|
|
6
5
|
class AuthService {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.authApi = new AuthApi_1.AuthApi();
|
|
9
|
-
}
|
|
10
6
|
static async signInByCode(code) {
|
|
11
7
|
if (!code)
|
|
12
8
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthService.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;
|
|
1
|
+
{"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../../src/features/auth/services/AuthService.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAGtD,MAAa,WAAW;IAKtB,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAY;QACpC,IAAI,CAAC,IAAI;YAAE,OAAO;QAGlB,MAAM,MAAM,GAAG,IAAI,CAAA;QAEnB,OAAO,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO;QAClB,MAAM,YAAY,GAAG,qCAAiB,CAAC,eAAe,EAAE,CAAC;QAEzD,IAAI,CAAC,YAAY;YAAE,OAAO;QAG1B,MAAM,MAAM,GAAG,IAAI,CAAA;QAEnB,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAEpC,OAAO,MAAM,CAAC;IAChB,CAAC;CAEF;AA3BD,kCA2BC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
|
|
2
|
+
import { CalloutMiddleware, CalloutState } from "./types";
|
|
3
|
+
export declare class Callout<Params extends any[], ResponseType> {
|
|
4
|
+
private readonly _axiosInstance;
|
|
5
|
+
private readonly _configFunction;
|
|
6
|
+
private readonly _state;
|
|
7
|
+
private readonly _middlewares;
|
|
8
|
+
private _message;
|
|
9
|
+
get getState(): CalloutState;
|
|
10
|
+
get isLoading(): boolean;
|
|
11
|
+
get getMessage(): string;
|
|
12
|
+
get getConfigFunction(): (...params: Params) => AxiosRequestConfig;
|
|
13
|
+
constructor(configFunction: () => AxiosRequestConfig, axiosInstance?: AxiosInstance | null);
|
|
14
|
+
setMessage(message: string | undefined): this;
|
|
15
|
+
invoke(...params: Params): Promise<AxiosResponse<ResponseType>>;
|
|
16
|
+
addMiddleware(...middleware: Array<CalloutMiddleware<Params, ResponseType>>): void;
|
|
17
|
+
removeMiddleware(middleware: CalloutMiddleware<Params, ResponseType>): void;
|
|
18
|
+
private _getAxiosInstance;
|
|
19
|
+
private _invokeStart;
|
|
20
|
+
private _invokeEnd;
|
|
21
|
+
private _invokeMiddlewares;
|
|
22
|
+
}
|