@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
@@ -0,0 +1,61 @@
1
+ import { Filter, SortDirection } from "mongodb";
2
+ import { Callout } from "./features/callout";
3
+ export declare enum MicroserviceName {
4
+ workspace = "workspace",
5
+ init = "init",
6
+ query = "query",
7
+ auth = "auth",
8
+ security = "security",
9
+ blueprint = "blueprint"
10
+ }
11
+ export declare enum Env {
12
+ development = "development",
13
+ production = "production"
14
+ }
15
+ export type ApiQueryOptions = {
16
+ limit?: number;
17
+ skip?: number;
18
+ sort?: Array<{
19
+ field: string;
20
+ direction: SortDirection;
21
+ }>;
22
+ };
23
+ export type ApiQueryRequest<T> = {
24
+ filter?: Filter<T>;
25
+ fields?: Array<string>;
26
+ options?: ApiQueryOptions;
27
+ };
28
+ export type Constructable = {
29
+ new (...args: any[]): {};
30
+ };
31
+ export type Constructor<T> = new (...args: any[]) => T;
32
+ export type HasApiName = {
33
+ apiName: string;
34
+ };
35
+ export type HasCallouts<Result> = {
36
+ [Method in keyof Result as Method extends string ? `${Method}Callout` : never]: Result[Method] extends (...params: infer EntityParams) => infer EntityResult ? () => Callout<EntityParams, any> : never;
37
+ };
38
+ export type HasDBId = {
39
+ _id: string;
40
+ };
41
+ export type HasDescription = {
42
+ description: string;
43
+ };
44
+ export type HasEmail = {
45
+ email: string;
46
+ };
47
+ export type HasId = {
48
+ id: string | number;
49
+ };
50
+ export type HasLabel = {
51
+ label: string;
52
+ };
53
+ export type HasMode<values> = {
54
+ mode: keyof values;
55
+ };
56
+ export interface HasNamespace {
57
+ namespace: string;
58
+ }
59
+ export type HasOrder = {
60
+ order: number;
61
+ };
package/dist/types.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Env = exports.MicroserviceName = void 0;
4
+ var MicroserviceName;
5
+ (function (MicroserviceName) {
6
+ MicroserviceName["workspace"] = "workspace";
7
+ MicroserviceName["init"] = "init";
8
+ MicroserviceName["query"] = "query";
9
+ MicroserviceName["auth"] = "auth";
10
+ MicroserviceName["security"] = "security";
11
+ MicroserviceName["blueprint"] = "blueprint";
12
+ })(MicroserviceName || (exports.MicroserviceName = MicroserviceName = {}));
13
+ var Env;
14
+ (function (Env) {
15
+ Env["development"] = "development";
16
+ Env["production"] = "production";
17
+ })(Env || (exports.Env = Env = {}));
18
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAGA,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,2CAAuB,CAAA;IACvB,iCAAa,CAAA;IACb,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;IACrB,2CAAuB,CAAA;AAC3B,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B;AAED,IAAY,GAGX;AAHD,WAAY,GAAG;IACX,kCAA2B,CAAA;IAC3B,gCAAyB,CAAA;AAC7B,CAAC,EAHW,GAAG,mBAAH,GAAG,QAGd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildery/ts-api-kit",
3
- "version": "5.2.6",
3
+ "version": "6.1.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -13,14 +13,15 @@
13
13
  ],
14
14
  "dependencies": {
15
15
  "@buildery/auto-bind": "^1.0.3",
16
- "@buildery/callout": "^0.4.11",
17
16
  "@buildery/event-bus": "^0.1.4",
17
+ "@buildery/flow": "^1.0.35",
18
+ "@gin-quin/minimix": "^1.0.5",
18
19
  "jwt-decode": "^4.0.0",
19
20
  "ts-mixer": "^6.0.4"
20
21
  },
21
22
  "devDependencies": {
22
- "axios": "^1.6.8",
23
- "mongodb": "^6.5.0",
24
- "typescript": "^4.9.5"
23
+ "axios": "1.12.0",
24
+ "mongodb": "^7.0.0",
25
+ "typescript": "^5.9.3"
25
26
  }
26
27
  }