@cargo-ai/api 1.0.1 → 1.0.3

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 (99) hide show
  1. package/README.md +85 -0
  2. package/build/src/api/ai/index.d.ts +1 -1
  3. package/build/src/api/ai/index.d.ts.map +1 -1
  4. package/build/src/api/ai/index.js +1 -1
  5. package/build/src/api/billing/index.d.ts +1 -1
  6. package/build/src/api/billing/index.d.ts.map +1 -1
  7. package/build/src/api/billing/index.js +1 -1
  8. package/build/src/api/connection/index.d.ts +1 -1
  9. package/build/src/api/connection/index.d.ts.map +1 -1
  10. package/build/src/api/connection/index.js +1 -1
  11. package/build/src/api/expression/index.d.ts +1 -1
  12. package/build/src/api/expression/index.d.ts.map +1 -1
  13. package/build/src/api/expression/index.js +1 -1
  14. package/build/src/api/index.d.ts +3 -3
  15. package/build/src/api/index.d.ts.map +1 -1
  16. package/build/src/api/orchestration/index.d.ts +1 -1
  17. package/build/src/api/orchestration/index.d.ts.map +1 -1
  18. package/build/src/api/orchestration/index.js +1 -1
  19. package/build/src/api/revenueOrganization/index.d.ts +1 -1
  20. package/build/src/api/revenueOrganization/index.d.ts.map +1 -1
  21. package/build/src/api/revenueOrganization/index.js +1 -1
  22. package/build/src/api/segmentation/index.d.ts +1 -1
  23. package/build/src/api/segmentation/index.d.ts.map +1 -1
  24. package/build/src/api/segmentation/index.js +1 -1
  25. package/build/src/api/storage/index.d.ts +2 -1
  26. package/build/src/api/storage/index.d.ts.map +1 -1
  27. package/build/src/api/storage/index.js +19 -1
  28. package/build/src/api/systemOfRecordIntegration/index.d.ts +1 -1
  29. package/build/src/api/systemOfRecordIntegration/index.d.ts.map +1 -1
  30. package/build/src/api/systemOfRecordIntegration/index.js +1 -1
  31. package/build/src/api/userManagement/index.d.ts +1 -1
  32. package/build/src/api/userManagement/index.d.ts.map +1 -1
  33. package/build/src/api/userManagement/index.js +1 -1
  34. package/build/src/api/workspaceManagement/index.d.ts +1 -1
  35. package/build/src/api/workspaceManagement/index.d.ts.map +1 -1
  36. package/build/src/api/workspaceManagement/index.js +1 -1
  37. package/build/src/{store → domains}/ai.d.ts +41 -49
  38. package/build/src/domains/ai.d.ts.map +1 -0
  39. package/build/src/{store → domains}/ai.js +1 -24
  40. package/build/src/{store → domains}/billing.d.ts +11 -19
  41. package/build/src/domains/billing.d.ts.map +1 -0
  42. package/build/src/{store → domains}/billing.js +0 -9
  43. package/build/src/{store → domains}/connection.d.ts +20 -32
  44. package/build/src/domains/connection.d.ts.map +1 -0
  45. package/build/src/{store → domains}/connection.js +0 -25
  46. package/build/src/{store → domains}/expression.d.ts +8 -8
  47. package/build/src/domains/expression.d.ts.map +1 -0
  48. package/build/src/{store → domains}/expression.js +1 -1
  49. package/build/src/domains/index.d.ts +12 -0
  50. package/build/src/domains/index.d.ts.map +1 -0
  51. package/build/src/domains/index.js +11 -0
  52. package/build/src/{store → domains}/orchestration.d.ts +45 -57
  53. package/build/src/domains/orchestration.d.ts.map +1 -0
  54. package/build/src/{store → domains}/orchestration.js +1 -31
  55. package/build/src/{store → domains}/revenueOrganization.d.ts +11 -23
  56. package/build/src/domains/revenueOrganization.d.ts.map +1 -0
  57. package/build/src/{store → domains}/revenueOrganization.js +0 -23
  58. package/build/src/{store → domains}/segmentation.d.ts +29 -37
  59. package/build/src/domains/segmentation.d.ts.map +1 -0
  60. package/build/src/{store → domains}/segmentation.js +0 -9
  61. package/build/src/{store → domains}/storage.d.ts +56 -58
  62. package/build/src/domains/storage.d.ts.map +1 -0
  63. package/build/src/{store → domains}/storage.js +6 -23
  64. package/build/src/{store → domains}/systemOfRecordIntegration.d.ts +8 -18
  65. package/build/src/domains/systemOfRecordIntegration.d.ts.map +1 -0
  66. package/build/src/{store → domains}/systemOfRecordIntegration.js +0 -16
  67. package/build/src/{store → domains}/userManagement.d.ts +3 -11
  68. package/build/src/domains/userManagement.d.ts.map +1 -0
  69. package/build/src/{store → domains}/userManagement.js +0 -9
  70. package/build/src/{store → domains}/workspaceManagement.d.ts +12 -32
  71. package/build/src/domains/workspaceManagement.d.ts.map +1 -0
  72. package/build/src/{store → domains}/workspaceManagement.js +0 -51
  73. package/build/src/fetcher/index.d.ts +3 -2
  74. package/build/src/fetcher/index.d.ts.map +1 -1
  75. package/build/src/fetcher/index.js +2 -2
  76. package/build/src/index.d.ts +2 -1
  77. package/build/src/index.d.ts.map +1 -1
  78. package/build/src/index.js +1 -1
  79. package/build/src/types.d.ts +1 -1
  80. package/build/src/types.d.ts.map +1 -1
  81. package/build/tsconfig.tsbuildinfo +1 -1
  82. package/package.json +5 -4
  83. package/build/src/client.d.ts +0 -5
  84. package/build/src/client.d.ts.map +0 -1
  85. package/build/src/client.js +0 -24
  86. package/build/src/store/ai.d.ts.map +0 -1
  87. package/build/src/store/billing.d.ts.map +0 -1
  88. package/build/src/store/connection.d.ts.map +0 -1
  89. package/build/src/store/expression.d.ts.map +0 -1
  90. package/build/src/store/index.d.ts +0 -14
  91. package/build/src/store/index.d.ts.map +0 -1
  92. package/build/src/store/index.js +0 -25
  93. package/build/src/store/orchestration.d.ts.map +0 -1
  94. package/build/src/store/revenueOrganization.d.ts.map +0 -1
  95. package/build/src/store/segmentation.d.ts.map +0 -1
  96. package/build/src/store/storage.d.ts.map +0 -1
  97. package/build/src/store/systemOfRecordIntegration.d.ts.map +0 -1
  98. package/build/src/store/userManagement.d.ts.map +0 -1
  99. package/build/src/store/workspaceManagement.d.ts.map +0 -1
@@ -35,19 +35,3 @@ export var SystemOfRecordIntegration;
35
35
  getMetrics: (workspaceUuid, payload) => [...SystemOfRecordIntegration.logsKeys.all(workspaceUuid), "getMetrics", payload],
36
36
  };
37
37
  })(SystemOfRecordIntegration || (SystemOfRecordIntegration = {}));
38
- export const createSystemOfRecordIntegrationSlice = (set) => ({
39
- systemOfRecords: [],
40
- setSystemOfRecords: (systemOfRecords) => {
41
- set((state) => ({
42
- ...state,
43
- systemOfRecords,
44
- }));
45
- },
46
- clients: [],
47
- setClients: (clients) => {
48
- set((state) => ({
49
- ...state,
50
- clients,
51
- }));
52
- },
53
- });
@@ -1,9 +1,8 @@
1
- import type { UserManagementTypes } from "cargo-domain-types";
1
+ import type { UserManagementTypes } from "cargo-types";
2
2
  import { z } from "zod/v4";
3
- import type { StateCreator } from "zustand";
4
- import type { BackendToFrontend, DateToString } from "../types.js";
3
+ import type { ApiType, DateToString } from "../types.js";
5
4
  export declare namespace UserManagement {
6
- type User = BackendToFrontend<UserManagementTypes.User>;
5
+ type User = ApiType<UserManagementTypes.User>;
7
6
  namespace Api {
8
7
  type GetCurrentUserResult = {
9
8
  user: User;
@@ -24,11 +23,4 @@ export declare namespace UserManagement {
24
23
  getCurrent: () => readonly ["users", "getCurrent"];
25
24
  };
26
25
  }
27
- export interface UserManagementSlice {
28
- currentUser?: UserManagement.User;
29
- setCurrentUser: (user?: UserManagement.User) => void;
30
- }
31
- export declare const createUserManagementSlice: StateCreator<UserManagementSlice, [
32
- ], [
33
- ], UserManagementSlice>;
34
26
  //# sourceMappingURL=userManagement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userManagement.d.ts","sourceRoot":"","sources":["../../../src/domains/userManagement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGzD,yBAAiB,cAAc,CAAC;IAC9B,KAAY,IAAI,GAAG,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAGrD,UAAiB,GAAG,CAAC;QACnB,KAAY,oBAAoB,GAAG;YACjC,IAAI,EAAE,IAAI,CAAC;SACZ,CAAC;QAEF,KAAY,wBAAwB,GAAG,YAAY,CAAC;YAClD,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC,oBAAoB,CAAC;SAC7D,CAAC,CAAC;QAEH,KAAY,uBAAuB,GAAG;YACpC,IAAI,EAAE,IAAI,CAAC;SACZ,CAAC;QAEK,MAAM,wBAAwB;;UAA2B,CAAC;KAClE;IAEM,MAAM,QAAQ;;KAEpB,CAAC;CACH"}
@@ -11,12 +11,3 @@ export var UserManagement;
11
11
  getCurrent: () => ["users", "getCurrent"],
12
12
  };
13
13
  })(UserManagement || (UserManagement = {}));
14
- export const createUserManagementSlice = (set) => ({
15
- currentUser: undefined,
16
- setCurrentUser(currentUser) {
17
- set((state) => ({
18
- ...state,
19
- currentUser,
20
- }));
21
- },
22
- });
@@ -1,18 +1,17 @@
1
- import type { WorkspaceManagementTypes } from "cargo-domain-types";
1
+ import type { WorkspaceManagementTypes } from "cargo-types";
2
2
  import { z } from "zod/v4";
3
- import type { StateCreator } from "zustand";
4
- import type { BackendToFrontend, DateToString } from "../types.js";
3
+ import type { ApiType, DateToString } from "../types.js";
5
4
  export declare namespace WorkspaceManagement {
6
- type Workspace = BackendToFrontend<WorkspaceManagementTypes.Workspace>;
7
- type WorkspaceSync = BackendToFrontend<WorkspaceManagementTypes.WorkspaceSync>;
8
- type Role = BackendToFrontend<WorkspaceManagementTypes.Role>;
9
- type Permission = BackendToFrontend<WorkspaceManagementTypes.Permission>;
10
- type Action = BackendToFrontend<WorkspaceManagementTypes.Action>;
11
- type PermissionLevel = BackendToFrontend<WorkspaceManagementTypes.PermissionLevel>;
12
- type Token = BackendToFrontend<WorkspaceManagementTypes.Token>;
13
- type User = BackendToFrontend<WorkspaceManagementTypes.User>;
14
- type Folder = BackendToFrontend<WorkspaceManagementTypes.Folder>;
15
- type FolderKind = BackendToFrontend<WorkspaceManagementTypes.FolderKind>;
5
+ type Workspace = ApiType<WorkspaceManagementTypes.Workspace>;
6
+ type WorkspaceSync = ApiType<WorkspaceManagementTypes.WorkspaceSync>;
7
+ type Role = ApiType<WorkspaceManagementTypes.Role>;
8
+ type Permission = ApiType<WorkspaceManagementTypes.Permission>;
9
+ type Action = ApiType<WorkspaceManagementTypes.Action>;
10
+ type PermissionLevel = ApiType<WorkspaceManagementTypes.PermissionLevel>;
11
+ type Token = ApiType<WorkspaceManagementTypes.Token>;
12
+ type User = ApiType<WorkspaceManagementTypes.User>;
13
+ type Folder = ApiType<WorkspaceManagementTypes.Folder>;
14
+ type FolderKind = ApiType<WorkspaceManagementTypes.FolderKind>;
16
15
  namespace Api {
17
16
  type AllWorkspacesPayload = DateToString<{
18
17
  refresh: boolean;
@@ -193,23 +192,4 @@ export declare namespace WorkspaceManagement {
193
192
  all: (workspaceUuid: string) => readonly ["folders", string];
194
193
  };
195
194
  }
196
- export interface WorkspaceManagementSlice {
197
- workspace?: WorkspaceManagement.Workspace;
198
- users: WorkspaceManagement.User[];
199
- tokens: WorkspaceManagement.Token[];
200
- roles: WorkspaceManagement.Role[];
201
- currentRole?: WorkspaceManagement.Role;
202
- currentPermissions: WorkspaceManagement.Permission[];
203
- setWorkspace: (workspace?: WorkspaceManagement.Workspace) => void;
204
- setUsers: (users: WorkspaceManagement.User[]) => void;
205
- setTokens: (tokens: WorkspaceManagement.Token[]) => void;
206
- setRoles: (roles: WorkspaceManagement.Role[]) => void;
207
- folders: WorkspaceManagement.Folder[];
208
- setFolders: (folders: WorkspaceManagement.Folder[]) => void;
209
- setCurrentRole: (role?: WorkspaceManagement.Role) => void;
210
- setCurrentPermissions: (permissions: WorkspaceManagement.Permission[]) => void;
211
- }
212
- export declare const createWorkspaceManagementSlice: StateCreator<WorkspaceManagementSlice, [
213
- ], [
214
- ], WorkspaceManagementSlice>;
215
195
  //# sourceMappingURL=workspaceManagement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspaceManagement.d.ts","sourceRoot":"","sources":["../../../src/domains/workspaceManagement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,E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jC,CAAC;IAEK,MAAM,QAAQ;6BACE,MAAM;;KAE5B,CAAC;IAEK,MAAM,SAAS;6BACC,MAAM;KAC5B,CAAC;IAEK,MAAM,QAAQ;6BACE,MAAM;KAC5B,CAAC;IAEK,MAAM,WAAW;6BACD,MAAM;KAC5B,CAAC;CACH"}
@@ -50,54 +50,3 @@ export var WorkspaceManagement;
50
50
  all: (workspaceUuid) => ["folders", workspaceUuid],
51
51
  };
52
52
  })(WorkspaceManagement || (WorkspaceManagement = {}));
53
- export const createWorkspaceManagementSlice = (set) => ({
54
- workspace: undefined,
55
- currentRole: undefined,
56
- currentPermissions: [],
57
- users: [],
58
- tokens: [],
59
- roles: [],
60
- setWorkspace: (workspace) => {
61
- set((state) => ({
62
- ...state,
63
- workspace,
64
- }));
65
- },
66
- setUsers(users) {
67
- set((state) => ({
68
- ...state,
69
- users,
70
- }));
71
- },
72
- setTokens(tokens) {
73
- set((state) => ({
74
- ...state,
75
- tokens,
76
- }));
77
- },
78
- setRoles: (roles) => {
79
- set((state) => ({
80
- ...state,
81
- roles,
82
- }));
83
- },
84
- folders: [],
85
- setFolders: (folders) => {
86
- set((state) => ({
87
- ...state,
88
- folders,
89
- }));
90
- },
91
- setCurrentRole(role) {
92
- set((state) => ({
93
- ...state,
94
- currentRole: role,
95
- }));
96
- },
97
- setCurrentPermissions(permissions) {
98
- set((state) => ({
99
- ...state,
100
- currentPermissions: permissions,
101
- }));
102
- },
103
- });
@@ -1,11 +1,12 @@
1
1
  import { z } from "zod/v4";
2
- import type { BackendToFrontend } from "../types.js";
2
+ import type { ApiType } from "../types.js";
3
3
  import type { FetcherRequest } from "./fetcher.js";
4
4
  export { determineIfIsFetcherError, type FetcherError, FetcherRequestErrorClass, getErrorWithReasonErrorMessage, } from "./error.js";
5
5
  export type FetcherDependencies = {
6
6
  baseUrl: string;
7
7
  workspaceUuid?: string;
8
8
  getAccessToken?: (refresh?: boolean) => Promise<string>;
9
+ accessToken?: string;
9
10
  };
10
11
  export type FetcherUploadFilePayload = {
11
12
  formData: FormData;
@@ -28,7 +29,7 @@ export type Fetcher = {
28
29
  }): Promise<TResult>;
29
30
  fetch<TResult>(request: FetcherRequest & {
30
31
  replaceNullByUndefined?: true | undefined;
31
- }): Promise<BackendToFrontend<TResult>>;
32
+ }): Promise<ApiType<TResult>>;
32
33
  };
33
34
  export declare const buildFetcher: (dependencies: FetcherDependencies) => Fetcher;
34
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fetcher/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EACL,yBAAyB,EACzB,KAAK,YAAY,EACjB,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,UAAU,EAAE,CAAC,OAAO,EAAE;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,+BAA+B;;EAAqB,CAAC;AAElE,MAAM,MAAM,OAAO,GAAG;IACp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K,IAAI,CAAC;IACjD,UAAU,EAAE,CAAC,OAAO,EAAE;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,+BAA+B;;EAAqB,CAAC;AAElE,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CACV,GAAG,EAAE,MAAM,EACX,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,wBAAwB,KACpE,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,KAAK,CAAC,OAAO,EACX,OAAO,EAAE,cAAc,GAAG;QAAE,sBAAsB,EAAE,KAAK,CAAA;KAAE,GAC1D,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,KAAK,CAAC,OAAO,EACX,OAAO,EAAE,cAAc,GAAG;QAAE,sBAAsB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;KAAE,GACtE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,YAAY,iBAAkB,mBAAmB,KAAG,OAqGhE,CAAC"}
@@ -6,12 +6,12 @@ import { fromFetcherError } from "./error.js";
6
6
  export { determineIfIsFetcherError, FetcherRequestErrorClass, getErrorWithReasonErrorMessage, } from "./error.js";
7
7
  export const zodFetcherUploadFileErrorReason = z.enum(["noFile"]);
8
8
  export const buildFetcher = (dependencies) => {
9
- const { baseUrl, workspaceUuid, getAccessToken } = dependencies;
9
+ const { baseUrl, workspaceUuid, getAccessToken, accessToken: initialAccessToken, } = dependencies;
10
10
  const client = buildClient({ baseUrl });
11
11
  const generateAxiosFetcher = async (request) => {
12
12
  const { endpoint, method, params, payload, forceTokenRefresh = false, replaceNullByUndefined = true, withoutWorkspace = false, } = request;
13
13
  const source = axios.CancelToken.source();
14
- let accessToken;
14
+ let accessToken = initialAccessToken;
15
15
  if (getAccessToken !== undefined) {
16
16
  accessToken = await getAccessToken(forceTokenRefresh);
17
17
  }
@@ -1,5 +1,6 @@
1
1
  export * from "./api/index.js";
2
+ export { Ai, Billing, Connection, Expression, Orchestration, RevenueOrganization, Segmentation, Storage, SystemOfRecordIntegration, UserManagement, WorkspaceManagement, } from "./domains/index.js";
2
3
  export type { FetcherError } from "./fetcher/index.js";
3
4
  export { determineIfIsFetcherError } from "./fetcher/index.js";
4
- export * from "./store/index.js";
5
+ export type { ApiType, DateToString } from "./types.js";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,EAAE,EACF,OAAO,EACP,UAAU,EACV,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,OAAO,EACP,yBAAyB,EACzB,cAAc,EACd,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export * from "./api/index.js";
2
+ export { Ai, Billing, Connection, Expression, Orchestration, RevenueOrganization, Segmentation, Storage, SystemOfRecordIntegration, UserManagement, WorkspaceManagement, } from "./domains/index.js";
2
3
  export { determineIfIsFetcherError } from "./fetcher/index.js";
3
- export * from "./store/index.js";
@@ -2,5 +2,5 @@ import type { RecursiveNonNull, RecursiveSchemaToJsonSchema } from "cargo-utils"
2
2
  export type DateToString<T> = T extends RegExp ? RegExp : T extends undefined ? undefined : T extends null ? null : T extends Date ? string : T extends Date | undefined ? string | undefined : T extends Date | null ? string | null : T extends Array<infer U> ? Array<DateToString<U>> : T extends object ? {
3
3
  [K in keyof T]: DateToString<T[K]>;
4
4
  } : T;
5
- export type BackendToFrontend<T> = DateToString<RecursiveSchemaToJsonSchema<RecursiveNonNull<T>>>;
5
+ export type ApiType<T> = DateToString<RecursiveSchemaToJsonSchema<RecursiveNonNull<T>>>;
6
6
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC5B,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAC1C,MAAM,GACN,CAAC,SAAS,SAAS,GACjB,SAAS,GACT,CAAC,SAAS,IAAI,GACZ,IAAI,GACJ,CAAC,SAAS,IAAI,GACZ,MAAM,GACN,CAAC,SAAS,IAAI,GAAG,SAAS,GACxB,MAAM,GAAG,SAAS,GAClB,CAAC,SAAS,IAAI,GAAG,IAAI,GACnB,MAAM,GAAG,IAAI,GACb,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACtB,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GACtB,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACtC,CAAC,CAAC;AAEpB,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,YAAY,CAC7C,2BAA2B,CAAC,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