@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.
Files changed (123) hide show
  1. package/dist/Api.d.ts +103 -90
  2. package/dist/Api.js +17 -12
  3. package/dist/Api.js.map +1 -1
  4. package/dist/ApiConfigs.d.ts +7 -6
  5. package/dist/ApiConfigs.js +1 -0
  6. package/dist/ApiConfigs.js.map +1 -1
  7. package/dist/compose/useSingleton.d.ts +1 -1
  8. package/dist/compose/useSingleton.js +1 -2
  9. package/dist/compose/useSingleton.js.map +1 -1
  10. package/dist/constants.d.ts +3 -0
  11. package/dist/constants.js +31 -0
  12. package/dist/constants.js.map +1 -0
  13. package/dist/features/api/AbstractApi.d.ts +4 -4
  14. package/dist/features/api/AbstractApi.js +6 -6
  15. package/dist/features/api/AbstractApi.js.map +1 -1
  16. package/dist/features/auth/services/AuthAxiosService.js +6 -3
  17. package/dist/features/auth/services/AuthAxiosService.js.map +1 -1
  18. package/dist/features/auth/services/AuthService.d.ts +0 -1
  19. package/dist/features/auth/services/AuthService.js +0 -4
  20. package/dist/features/auth/services/AuthService.js.map +1 -1
  21. package/dist/features/callout/Callout.d.ts +22 -0
  22. package/dist/features/callout/Callout.js +66 -0
  23. package/dist/features/callout/Callout.js.map +1 -0
  24. package/dist/features/callout/CalloutMiddlewareService.d.ts +5 -0
  25. package/dist/features/callout/CalloutMiddlewareService.js +17 -0
  26. package/dist/features/callout/CalloutMiddlewareService.js.map +1 -0
  27. package/dist/features/callout/CalloutMiddlewares.d.ts +4 -0
  28. package/dist/features/callout/CalloutMiddlewares.js +15 -0
  29. package/dist/features/callout/CalloutMiddlewares.js.map +1 -0
  30. package/dist/features/callout/Calloutable.d.ts +3 -0
  31. package/dist/features/callout/Calloutable.js +20 -0
  32. package/dist/features/callout/Calloutable.js.map +1 -0
  33. package/dist/features/callout/index.d.ts +4 -1
  34. package/dist/features/callout/index.js +4 -1
  35. package/dist/features/callout/index.js.map +1 -1
  36. package/dist/features/callout/types.d.ts +21 -0
  37. package/dist/features/callout/types.js +3 -0
  38. package/dist/features/callout/types.js.map +1 -0
  39. package/dist/features/crud/operations/abstract/AbstractCRUDApi.d.ts +2 -2
  40. package/dist/features/crud/operations/abstract/AbstractCRUDApi.js +2 -2
  41. package/dist/features/crud/operations/abstract/AbstractCRUDApi.js.map +1 -1
  42. package/dist/features/crud/operations/operations/Create.js +5 -5
  43. package/dist/features/crud/operations/operations/Create.js.map +1 -1
  44. package/dist/features/crud/operations/operations/CreateBulk.js +4 -5
  45. package/dist/features/crud/operations/operations/CreateBulk.js.map +1 -1
  46. package/dist/features/crud/operations/operations/DeleteByFilters.js +2 -2
  47. package/dist/features/crud/operations/operations/DeleteByFilters.js.map +1 -1
  48. package/dist/features/crud/operations/operations/DeleteById.js +2 -2
  49. package/dist/features/crud/operations/operations/DeleteById.js.map +1 -1
  50. package/dist/features/crud/operations/operations/DeleteByIds.js +2 -2
  51. package/dist/features/crud/operations/operations/DeleteByIds.js.map +1 -1
  52. package/dist/features/crud/operations/operations/GetAll.js +2 -2
  53. package/dist/features/crud/operations/operations/GetAll.js.map +1 -1
  54. package/dist/features/crud/operations/operations/GetByFilters.js +2 -2
  55. package/dist/features/crud/operations/operations/GetByFilters.js.map +1 -1
  56. package/dist/features/crud/operations/operations/GetById.js +2 -2
  57. package/dist/features/crud/operations/operations/GetById.js.map +1 -1
  58. package/dist/features/crud/operations/operations/GetByIds.js +2 -2
  59. package/dist/features/crud/operations/operations/GetByIds.js.map +1 -1
  60. package/dist/features/crud/operations/operations/Update.js +2 -2
  61. package/dist/features/crud/operations/operations/Update.js.map +1 -1
  62. package/dist/features/crud/operations/operations/UpdateBulk.js +2 -2
  63. package/dist/features/crud/operations/operations/UpdateBulk.js.map +1 -1
  64. package/dist/features/crud/operations/operations/Upsert.js +2 -2
  65. package/dist/features/crud/operations/operations/Upsert.js.map +1 -1
  66. package/dist/features/crud/operations/operations/UpsertBulk.js +2 -2
  67. package/dist/features/crud/operations/operations/UpsertBulk.js.map +1 -1
  68. package/dist/features/crud/sync/compose/useCrudSync.js +1 -2
  69. package/dist/features/crud/sync/compose/useCrudSync.js.map +1 -1
  70. package/dist/features/crud/sync/constants/CrudSyncAction.js +1 -1
  71. package/dist/features/crud/sync/constants/CrudSyncAction.js.map +1 -1
  72. package/dist/features/crud/sync/middlewares/PushCrudEvent.js.map +1 -1
  73. package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.js.map +1 -1
  74. package/dist/index.d.ts +10 -0
  75. package/dist/index.js +10 -0
  76. package/dist/index.js.map +1 -1
  77. package/dist/micro/auth/AuthApi.d.ts +6 -6
  78. package/dist/micro/auth/AuthApi.js +11 -10
  79. package/dist/micro/auth/AuthApi.js.map +1 -1
  80. package/dist/micro/auth/WorkspaceApi.js +6 -4
  81. package/dist/micro/auth/WorkspaceApi.js.map +1 -1
  82. package/dist/micro/auth/types/InitWorkspace.d.ts +1 -2
  83. package/dist/micro/query/FieldApi.d.ts +4 -4
  84. package/dist/micro/query/FieldApi.js +9 -8
  85. package/dist/micro/query/FieldApi.js.map +1 -1
  86. package/dist/micro/query/SObjectApi.d.ts +1 -1
  87. package/dist/micro/query/SObjectApi.js +2 -2
  88. package/dist/micro/query/SObjectApi.js.map +1 -1
  89. package/dist/micro/query/types/FieldType.js +1 -1
  90. package/dist/micro/query/types/FieldType.js.map +1 -1
  91. package/dist/micro/query/types/SObject.d.ts +1 -3
  92. package/dist/micro/query/types/SObjectField.d.ts +1 -2
  93. package/dist/micro/security/PermissionApi.d.ts +2 -2
  94. package/dist/micro/security/PermissionApi.js +6 -6
  95. package/dist/micro/security/PermissionApi.js.map +1 -1
  96. package/dist/micro/security/PermissionCategoryApi.js +2 -2
  97. package/dist/micro/security/PermissionCategoryApi.js.map +1 -1
  98. package/dist/micro/security/PermissionSetApi.d.ts +2 -2
  99. package/dist/micro/security/PermissionSetApi.js +3 -3
  100. package/dist/micro/security/PermissionSetApi.js.map +1 -1
  101. package/dist/micro/security/TeamApi.d.ts +2 -2
  102. package/dist/micro/security/TeamApi.js +3 -3
  103. package/dist/micro/security/TeamApi.js.map +1 -1
  104. package/dist/micro/workspace/ModuleApi.d.ts +3 -3
  105. package/dist/micro/workspace/ModuleApi.js +4 -4
  106. package/dist/micro/workspace/ModuleApi.js.map +1 -1
  107. package/dist/micro/workspace/types/EUserStatus.js +1 -1
  108. package/dist/micro/workspace/types/EUserStatus.js.map +1 -1
  109. package/dist/services/ResponseService.d.ts +9 -0
  110. package/dist/services/ResponseService.js +28 -0
  111. package/dist/services/ResponseService.js.map +1 -0
  112. package/dist/services/UrlService.d.ts +4 -0
  113. package/dist/services/UrlService.js +15 -0
  114. package/dist/services/UrlService.js.map +1 -0
  115. package/dist/services/index.d.ts +1 -0
  116. package/dist/services/index.js +1 -0
  117. package/dist/services/index.js.map +1 -1
  118. package/dist/tsconfig.build.tsbuildinfo +1 -1
  119. package/dist/types/HasCallouts.d.ts +1 -1
  120. package/dist/types.d.ts +61 -0
  121. package/dist/types.js +18 -0
  122. package/dist/types.js.map +1 -0
  123. package/package.json +6 -5
package/dist/Api.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { Permission, PermissionAssignment, PermissionCategory, PermissionDefinition, PermissionGroup, PermissionSet, Module, SObject, SObjectField, Team, User, WorkspaceApi } from "./micro";
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<any>;
19
+ getByApiName(apiName: string): import("axios").AxiosRequestConfig;
19
20
  readonly objectName: string;
20
- readonly _serverName: string;
21
- readonly serverName: any;
22
- getAll(): import("axios").AxiosRequestConfig<any>;
23
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
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<any>;
27
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
27
28
  };
28
29
  readonly field: {
29
- create(field: SObjectField): import("axios").AxiosRequestConfig<any>;
30
- getAllByObjectId(objectId: string): import("axios").AxiosRequestConfig<any>;
30
+ create(field: SObjectField): import("axios").AxiosRequestConfig;
31
+ getAllByObjectId(objectId: string): import("axios").AxiosRequestConfig;
31
32
  getAllByObjectApiName(apiName: string): {
32
- baseURL: any;
33
+ baseURL: string;
33
34
  url: string;
34
35
  };
35
- deleteAllByObjectId(objectId: string): import("axios").AxiosRequestConfig<any>;
36
+ deleteAllByObjectId(objectId: string): import("axios").AxiosRequestConfig;
36
37
  readonly objectName: string;
37
- readonly _serverName: string;
38
- readonly serverName: any;
39
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
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<any>;
42
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
42
43
  };
43
44
  readonly record: <T>(objectName: string) => {
44
- getAll(): import("axios").AxiosRequestConfig<any>;
45
+ getAll(): import("axios").AxiosRequestConfig;
45
46
  readonly objectName: string;
46
- readonly _serverName: string;
47
- readonly serverName: any;
48
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
49
- getByFilters(query?: import("./types").ApiQueryRequest<T>): import("axios").AxiosRequestConfig<any>;
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<any>;
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<any>;
58
- getByCategoryIds(categoryIds: string[]): import("axios").AxiosRequestConfig<any>;
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<any>;
62
+ }): import("axios").AxiosRequestConfig;
62
63
  readonly objectName: string;
63
- readonly _serverName: string;
64
- readonly serverName: any;
65
- getAll(): import("axios").AxiosRequestConfig<any>;
66
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
67
- getByFilters(query?: import("./types").ApiQueryRequest<Permission>): import("axios").AxiosRequestConfig<any>;
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<any>;
71
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
71
72
  };
72
73
  readonly permissionCategory: {
73
- getByGroupId(groupId: string): import("axios").AxiosRequestConfig<any>;
74
+ getByGroupId(groupId: string): import("axios").AxiosRequestConfig;
74
75
  readonly objectName: string;
75
- readonly _serverName: string;
76
- readonly serverName: any;
77
- getAll(): import("axios").AxiosRequestConfig<any>;
78
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
79
- getByFilters(query?: import("./types").ApiQueryRequest<PermissionCategory>): import("axios").AxiosRequestConfig<any>;
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<any>;
83
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
83
84
  };
84
85
  readonly permissionAssignment: {
85
- getAll(): import("axios").AxiosRequestConfig<any>;
86
+ getAll(): import("axios").AxiosRequestConfig;
86
87
  readonly objectName: string;
87
- readonly _serverName: string;
88
- readonly serverName: any;
89
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
90
- getByFilters(query?: import("./types").ApiQueryRequest<PermissionAssignment>): import("axios").AxiosRequestConfig<any>;
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<any>;
94
- deleteByFilters(filter: import("mongodb").Filter<PermissionAssignment>): import("axios").AxiosRequestConfig<any>;
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<any>;
98
+ getAll(): import("axios").AxiosRequestConfig;
98
99
  readonly objectName: string;
99
- readonly _serverName: string;
100
- readonly serverName: any;
101
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
102
- getByIds(entityIds: string[]): import("axios").AxiosRequestConfig<any>;
103
- getByFilters(query?: import("./types").ApiQueryRequest<PermissionDefinition>): import("axios").AxiosRequestConfig<any>;
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<any>;
107
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
107
108
  };
108
109
  readonly permissionGroup: {
109
- getAll(): import("axios").AxiosRequestConfig<any>;
110
+ getAll(): import("axios").AxiosRequestConfig;
110
111
  readonly objectName: string;
111
- readonly _serverName: string;
112
- readonly serverName: any;
113
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
114
- getByFilters(query?: import("./types").ApiQueryRequest<PermissionGroup>): import("axios").AxiosRequestConfig<any>;
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<any>;
118
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
118
119
  };
119
120
  readonly permissionSet: {
120
- assign(assignment: import("./micro").PermissionSetAssignment): import("axios").AxiosRequestConfig<any>;
121
- unAssign(assignment: import("./micro").PermissionSetAssignment): import("axios").AxiosRequestConfig<any>;
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: string;
124
- readonly serverName: any;
125
- getAll(): import("axios").AxiosRequestConfig<any>;
126
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
127
- getByFilters(query?: import("./types").ApiQueryRequest<PermissionSet>): import("axios").AxiosRequestConfig<any>;
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<any>;
131
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
131
132
  };
132
133
  readonly team: {
133
- assign(assignment: import("./micro").TeamAssignment): import("axios").AxiosRequestConfig<any>;
134
- unassign(assignment: import("./micro").TeamAssignment): import("axios").AxiosRequestConfig<any>;
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: string;
137
- readonly serverName: any;
138
- getAll(): import("axios").AxiosRequestConfig<any>;
139
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
140
- getByFilters(query?: import("./types").ApiQueryRequest<Team>): import("axios").AxiosRequestConfig<any>;
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<any>;
144
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
144
145
  };
145
146
  };
146
147
  readonly workspace: {
147
148
  readonly user: {
148
- getAll(): import("axios").AxiosRequestConfig<any>;
149
+ getAll(): import("axios").AxiosRequestConfig;
149
150
  readonly objectName: string;
150
- readonly _serverName: string;
151
- readonly serverName: any;
152
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
153
- getByFilters(query?: import("./types").ApiQueryRequest<User>): import("axios").AxiosRequestConfig<any>;
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<any>;
157
+ deleteById(entityId: string): import("axios").AxiosRequestConfig;
157
158
  };
158
159
  readonly module: {
159
- createAction(moduleId: string, action: import("./micro").ModuleAction): import("axios").AxiosRequestConfig<any>;
160
- updateAction(moduleId: string, actionName: string, action: import("./micro").ModuleAction): import("axios").AxiosRequestConfig<any>;
161
- deleteAction(moduleId: string, actionName: string): import("axios").AxiosRequestConfig<any>;
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: string;
164
- readonly serverName: any;
165
- getAll(): import("axios").AxiosRequestConfig<any>;
166
- getById(entityId: string): import("axios").AxiosRequestConfig<any>;
167
- getByFilters(query?: import("./types").ApiQueryRequest<Module>): import("axios").AxiosRequestConfig<any>;
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<any>;
175
- deleteByIds(entityIds: string[]): import("axios").AxiosRequestConfig<any>;
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
- })('queryUrl', 'metadata/object'),
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
- })('queryUrl', 'metadata/field'),
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
- })('queryUrl', `object/${objectName}`),
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
- })('securityUrl', 'permission'),
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
- })('securityUrl', 'permission-category'),
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
- })('securityUrl', 'permissionAssignment'),
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
- })('securityUrl', 'permission-definition'),
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
- })('securityUrl', 'permission-group'),
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
- })('securityUrl', 'permission-set'),
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
- })('securityUrl', 'team'),
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
- })('workspaceUrl', 'user'),
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
- })('workspaceUrl', 'module'),
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,mCAciB;AACjB,yCAYoB;AAEpB,uCAA+B;AAC/B,kDAA6C;AAUhC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI,iBAAO,EAAE;KACpB;IAED,IAAI,EAAE;QACJ,SAAS,EAAE,IAAI,oBAAY,EAAE;KAC9B;IAED,KAAK,EAAE;QACL,MAAM,EAAE,IAAI,CAAC,KAAM,SAAQ,IAAA,gBAAK,EAC9B,kBAAU,EACV,iBAAM,EAAE,kBAAO,EACf,CAAA,iBAAe,CAAA,EACf,CAAA,iBAAe,CAAA,EACf,qBAAU,CAAC;SAAG,CACf,CAAC,UAAU,EAAE,iBAAiB,CAAC;QAChC,KAAK,EAAE,IAAI,CAAC,KAAM,SAAQ,IAAA,gBAAK,EAC7B,gBAAQ,EACR,kBAAO,EACP,CAAA,iBAAoB,CAAA,EACpB,qBAAU,CAAC;SAAG,CACf,CAAC,UAAU,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AM,SAAQ,IAAA,gBAAK,EAC3B,iBAAM,EAAE,kBAAO,EACf,CAAA,iBAAY,CAAA,EACZ,CAAA,iBAAY,CAAA,EACZ,qBAAU,CAAC;SAAG,CACrB,CAAC,wBAAgB,CAAC,SAAS,EAAE,MAAM,CAAC;KACtC;CACO,CAAC;AAEE,QAAA,GAAG,GAAG,cAAkB,CAAC"}
@@ -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
  }
@@ -10,6 +10,7 @@ ApiConfigs.api = {
10
10
  queryUrl: undefined,
11
11
  authUrl: undefined,
12
12
  securityUrl: undefined,
13
+ blueprintUrl: undefined,
13
14
  };
14
15
  ApiConfigs.event = {
15
16
  eventBus: null,
@@ -1 +1 @@
1
- {"version":3,"file":"ApiConfigs.js","sourceRoot":"","sources":["../src/ApiConfigs.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAU;;AAAvB,gCAYC;AAXwB,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;CAC7C,CAAA;AAEsB,gBAAK,GAAG;IAC7B,QAAQ,EAAE,IAAuB;CAClC,CAAA"}
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: <T_1 extends Constructor<any>>(key: any, definition: T_1, ...params: ConstructorParameters<T_1>) => InstanceType<T_1>;
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 = void 0;
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":";;;AAEA,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,I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,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,3 @@
1
+ import { Env, MicroserviceName } from "./types";
2
+ export declare const BASE_DEVELOPMENT_URL = "http://localhost:3000";
3
+ export declare const MICROSERVICE_URL: Record<MicroserviceName, Record<Env, string>>;
@@ -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 { ApiConfigs } from "../../ApiConfigs";
1
+ import { MicroserviceName } from "../../types";
2
2
  export declare abstract class AbstractApi {
3
- readonly _serverName: string;
4
- get serverName(): any;
5
- protected constructor(serverName: keyof typeof ApiConfigs.api);
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 ApiConfigs_1 = require("../../ApiConfigs");
5
+ const UrlService_1 = require("../../services/UrlService");
6
6
  class AbstractApi {
7
- get serverName() {
8
- return ApiConfigs_1.ApiConfigs.api[this._serverName];
7
+ get serverUrl() {
8
+ return UrlService_1.UrlService.getMicroUrl(this._serverName);
9
9
  }
10
- constructor(serverName) {
10
+ constructor(microName) {
11
11
  (0, auto_bind_1.default)(this);
12
- if (!serverName) {
12
+ if (!microName) {
13
13
  throw new AbstractApiError('Server API name is not defined!');
14
14
  }
15
- this._serverName = 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,iDAA4C;AAE5C,MAAsB,WAAW;IAI/B,IAAW,UAAU;QACnB,OAAO,uBAAU,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAED,YAAsB,UAAuC;QAC3D,IAAA,mBAAQ,EAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;SAC/D;QAED,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;CACF;AAjBD,kCAiBC;AAED,MAAM,gBAAiB,SAAQ,KAAK;CAAG"}
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
- instance.interceptors.request.use(AuthAxiosService.setTokenHeader, error => Promise.reject(error));
11
- instance.interceptors.response.use(response => response, AuthAxiosService.refreshTokens);
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
- if (error.response.status !== 401)
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;QACnG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAEzF,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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refresh(): Promise<any>;
5
4
  }
@@ -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;AACtD,yDAAoD;AAEpD,MAAa,WAAW;IAAxB;QAEU,YAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;IAwBlC,CAAC;IAtBC,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;AA1BD,kCA0BC"}
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
+ }