@eleva-io/erp-sdk 0.1.0 → 0.1.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 (210) hide show
  1. package/dist/client/http.d.ts +1 -0
  2. package/dist/client/http.js +6 -0
  3. package/dist/client/resources/horizontal/api.d.ts +2 -2
  4. package/dist/client/resources/horizontal/api.js +3 -3
  5. package/dist/client/resources/horizontal/communities.d.ts +13 -0
  6. package/dist/client/resources/horizontal/communities.js +53 -0
  7. package/dist/client/resources/horizontal/types.d.ts +47 -0
  8. package/dist/client/resources/horizontal/types.js +2 -0
  9. package/dist/client/resources/ticketing/types.d.ts +0 -3
  10. package/dist/client/utils/crud.d.ts +22 -0
  11. package/dist/client/utils/crud.js +52 -0
  12. package/dist/erp.d.ts +15 -12
  13. package/dist/erp.d.ts.map +1 -0
  14. package/dist/erp.js +22 -21
  15. package/dist/erp.js.map +1 -0
  16. package/dist/index.d.ts +4 -4
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +5 -21
  19. package/dist/index.js.map +1 -0
  20. package/dist/modules/contacts/api.d.ts +9 -0
  21. package/dist/modules/contacts/api.d.ts.map +1 -0
  22. package/dist/modules/contacts/api.js +13 -0
  23. package/dist/modules/contacts/api.js.map +1 -0
  24. package/dist/modules/contacts/index.d.ts +3 -0
  25. package/dist/modules/contacts/index.d.ts.map +1 -0
  26. package/dist/modules/contacts/index.js +3 -0
  27. package/dist/modules/contacts/index.js.map +1 -0
  28. package/dist/modules/contacts/persons/api/addresses.d.ts +11 -0
  29. package/dist/modules/contacts/persons/api/addresses.d.ts.map +1 -0
  30. package/dist/modules/contacts/persons/api/addresses.js +23 -0
  31. package/dist/modules/contacts/persons/api/addresses.js.map +1 -0
  32. package/dist/modules/contacts/persons/api/index.d.ts +3 -0
  33. package/dist/modules/contacts/persons/api/index.d.ts.map +1 -0
  34. package/dist/modules/contacts/persons/api/index.js +3 -0
  35. package/dist/modules/contacts/persons/api/index.js.map +1 -0
  36. package/dist/modules/contacts/persons/api/persons.d.ts +10 -0
  37. package/dist/modules/contacts/persons/api/persons.d.ts.map +1 -0
  38. package/dist/modules/contacts/persons/api/persons.js +19 -0
  39. package/dist/modules/contacts/persons/api/persons.js.map +1 -0
  40. package/dist/modules/contacts/persons/index.d.ts +3 -0
  41. package/dist/modules/contacts/persons/index.d.ts.map +1 -0
  42. package/dist/modules/contacts/persons/index.js +3 -0
  43. package/dist/modules/contacts/persons/index.js.map +1 -0
  44. package/dist/modules/contacts/persons/types/address.d.ts +21 -0
  45. package/dist/modules/contacts/persons/types/address.d.ts.map +1 -0
  46. package/dist/modules/contacts/persons/types/address.js +2 -0
  47. package/dist/modules/contacts/persons/types/address.js.map +1 -0
  48. package/dist/modules/contacts/persons/types/index.d.ts +4 -0
  49. package/dist/modules/contacts/persons/types/index.d.ts.map +1 -0
  50. package/dist/modules/contacts/persons/types/index.js +4 -0
  51. package/dist/modules/contacts/persons/types/index.js.map +1 -0
  52. package/dist/modules/contacts/persons/types/person.d.ts +32 -0
  53. package/dist/modules/contacts/persons/types/person.d.ts.map +1 -0
  54. package/dist/modules/contacts/persons/types/person.js +6 -0
  55. package/dist/modules/contacts/persons/types/person.js.map +1 -0
  56. package/dist/modules/contacts/persons/types/person_address.d.ts +20 -0
  57. package/dist/modules/contacts/persons/types/person_address.d.ts.map +1 -0
  58. package/dist/modules/contacts/persons/types/person_address.js +2 -0
  59. package/dist/modules/contacts/persons/types/person_address.js.map +1 -0
  60. package/dist/modules/horizontal/api.d.ts +9 -0
  61. package/dist/modules/horizontal/api.d.ts.map +1 -0
  62. package/dist/modules/horizontal/api.js +13 -0
  63. package/dist/modules/horizontal/api.js.map +1 -0
  64. package/dist/modules/horizontal/communities/api/agents.d.ts +5 -0
  65. package/dist/modules/horizontal/communities/api/agents.d.ts.map +1 -0
  66. package/dist/modules/horizontal/communities/api/agents.js +4 -0
  67. package/dist/modules/horizontal/communities/api/agents.js.map +1 -0
  68. package/dist/modules/horizontal/communities/api/blocks.d.ts +10 -0
  69. package/dist/modules/horizontal/communities/api/blocks.d.ts.map +1 -0
  70. package/dist/modules/horizontal/communities/api/blocks.js +19 -0
  71. package/dist/modules/horizontal/communities/api/blocks.js.map +1 -0
  72. package/dist/modules/horizontal/communities/api/communities.d.ts +24 -0
  73. package/dist/modules/horizontal/communities/api/communities.d.ts.map +1 -0
  74. package/dist/modules/horizontal/communities/api/communities.js +75 -0
  75. package/dist/modules/horizontal/communities/api/communities.js.map +1 -0
  76. package/dist/modules/horizontal/communities/api/communities_config.d.ts +11 -0
  77. package/dist/modules/horizontal/communities/api/communities_config.d.ts.map +1 -0
  78. package/dist/modules/horizontal/communities/api/communities_config.js +32 -0
  79. package/dist/modules/horizontal/communities/api/communities_config.js.map +1 -0
  80. package/dist/modules/horizontal/communities/api/documents.d.ts +17 -0
  81. package/dist/modules/horizontal/communities/api/documents.d.ts.map +1 -0
  82. package/dist/modules/horizontal/communities/api/documents.js +35 -0
  83. package/dist/modules/horizontal/communities/api/documents.js.map +1 -0
  84. package/dist/modules/horizontal/communities/api/employees.d.ts +13 -0
  85. package/dist/modules/horizontal/communities/api/employees.d.ts.map +1 -0
  86. package/dist/modules/horizontal/communities/api/employees.js +24 -0
  87. package/dist/modules/horizontal/communities/api/employees.js.map +1 -0
  88. package/dist/modules/horizontal/communities/api/index.d.ts +11 -0
  89. package/dist/modules/horizontal/communities/api/index.d.ts.map +1 -0
  90. package/dist/modules/horizontal/communities/api/index.js +11 -0
  91. package/dist/modules/horizontal/communities/api/index.js.map +1 -0
  92. package/dist/modules/horizontal/communities/api/properties.d.ts +9 -0
  93. package/dist/modules/horizontal/communities/api/properties.d.ts.map +1 -0
  94. package/dist/modules/horizontal/communities/api/properties.js +21 -0
  95. package/dist/modules/horizontal/communities/api/properties.js.map +1 -0
  96. package/dist/modules/horizontal/communities/api/providers.d.ts +13 -0
  97. package/dist/modules/horizontal/communities/api/providers.d.ts.map +1 -0
  98. package/dist/modules/horizontal/communities/api/providers.js +24 -0
  99. package/dist/modules/horizontal/communities/api/providers.js.map +1 -0
  100. package/dist/modules/horizontal/communities/api/receipts.d.ts +20 -0
  101. package/dist/modules/horizontal/communities/api/receipts.d.ts.map +1 -0
  102. package/dist/modules/horizontal/communities/api/receipts.js +40 -0
  103. package/dist/modules/horizontal/communities/api/receipts.js.map +1 -0
  104. package/dist/modules/horizontal/communities/api/roles.d.ts +5 -0
  105. package/dist/modules/horizontal/communities/api/roles.d.ts.map +1 -0
  106. package/dist/modules/horizontal/communities/api/roles.js +4 -0
  107. package/dist/modules/horizontal/communities/api/roles.js.map +1 -0
  108. package/dist/modules/horizontal/communities/index.d.ts +3 -0
  109. package/dist/modules/horizontal/communities/index.d.ts.map +1 -0
  110. package/dist/modules/horizontal/communities/index.js +3 -0
  111. package/dist/modules/horizontal/communities/index.js.map +1 -0
  112. package/dist/modules/horizontal/communities/types/address.d.ts +25 -0
  113. package/dist/modules/horizontal/communities/types/address.d.ts.map +1 -0
  114. package/dist/modules/horizontal/communities/types/address.js +2 -0
  115. package/dist/modules/horizontal/communities/types/address.js.map +1 -0
  116. package/dist/modules/horizontal/communities/types/agent.d.ts +9 -0
  117. package/dist/modules/horizontal/communities/types/agent.d.ts.map +1 -0
  118. package/dist/modules/horizontal/communities/types/agent.js +2 -0
  119. package/dist/modules/horizontal/communities/types/agent.js.map +1 -0
  120. package/dist/modules/horizontal/communities/types/block.d.ts +20 -0
  121. package/dist/modules/horizontal/communities/types/block.d.ts.map +1 -0
  122. package/dist/modules/horizontal/communities/types/block.js +2 -0
  123. package/dist/modules/horizontal/communities/types/block.js.map +1 -0
  124. package/dist/modules/horizontal/communities/types/community.d.ts +34 -0
  125. package/dist/modules/horizontal/communities/types/community.d.ts.map +1 -0
  126. package/dist/modules/horizontal/communities/types/community.js +2 -0
  127. package/dist/modules/horizontal/communities/types/community.js.map +1 -0
  128. package/dist/modules/horizontal/communities/types/community_config.d.ts +16 -0
  129. package/dist/modules/horizontal/communities/types/community_config.d.ts.map +1 -0
  130. package/dist/modules/horizontal/communities/types/community_config.js +2 -0
  131. package/dist/modules/horizontal/communities/types/community_config.js.map +1 -0
  132. package/dist/modules/horizontal/communities/types/document.d.ts +42 -0
  133. package/dist/modules/horizontal/communities/types/document.d.ts.map +1 -0
  134. package/dist/modules/horizontal/communities/types/document.js +23 -0
  135. package/dist/modules/horizontal/communities/types/document.js.map +1 -0
  136. package/dist/modules/horizontal/communities/types/employee.d.ts +40 -0
  137. package/dist/modules/horizontal/communities/types/employee.d.ts.map +1 -0
  138. package/dist/modules/horizontal/communities/types/employee.js +29 -0
  139. package/dist/modules/horizontal/communities/types/employee.js.map +1 -0
  140. package/dist/modules/horizontal/communities/types/index.d.ts +10 -0
  141. package/dist/modules/horizontal/communities/types/index.d.ts.map +1 -0
  142. package/dist/modules/horizontal/communities/types/index.js +10 -0
  143. package/dist/modules/horizontal/communities/types/index.js.map +1 -0
  144. package/dist/modules/horizontal/communities/types/property.d.ts +45 -0
  145. package/dist/modules/horizontal/communities/types/property.d.ts.map +1 -0
  146. package/dist/modules/horizontal/communities/types/property.js +15 -0
  147. package/dist/modules/horizontal/communities/types/property.js.map +1 -0
  148. package/dist/modules/horizontal/communities/types/provider.d.ts +40 -0
  149. package/dist/modules/horizontal/communities/types/provider.d.ts.map +1 -0
  150. package/dist/modules/horizontal/communities/types/provider.js +29 -0
  151. package/dist/modules/horizontal/communities/types/provider.js.map +1 -0
  152. package/dist/modules/horizontal/communities/types/receipt.d.ts +63 -0
  153. package/dist/modules/horizontal/communities/types/receipt.d.ts.map +1 -0
  154. package/dist/modules/horizontal/communities/types/receipt.js +16 -0
  155. package/dist/modules/horizontal/communities/types/receipt.js.map +1 -0
  156. package/dist/modules/horizontal/communities/types/roles.d.ts +12 -0
  157. package/dist/modules/horizontal/communities/types/roles.d.ts.map +1 -0
  158. package/dist/modules/horizontal/communities/types/roles.js +2 -0
  159. package/dist/modules/horizontal/communities/types/roles.js.map +1 -0
  160. package/dist/modules/horizontal/communities/types/tag.d.ts +2 -0
  161. package/dist/modules/horizontal/communities/types/tag.d.ts.map +1 -0
  162. package/dist/modules/horizontal/communities/types/tag.js +2 -0
  163. package/dist/modules/horizontal/communities/types/tag.js.map +1 -0
  164. package/dist/modules/horizontal/index.d.ts +3 -0
  165. package/dist/modules/horizontal/index.d.ts.map +1 -0
  166. package/dist/modules/horizontal/index.js +3 -0
  167. package/dist/modules/horizontal/index.js.map +1 -0
  168. package/dist/modules/index.d.ts +4 -0
  169. package/dist/modules/index.d.ts.map +1 -0
  170. package/dist/modules/index.js +4 -0
  171. package/dist/modules/index.js.map +1 -0
  172. package/dist/modules/ticketing/api.d.ts +18 -0
  173. package/dist/modules/ticketing/api.d.ts.map +1 -0
  174. package/dist/modules/ticketing/api.js +42 -0
  175. package/dist/modules/ticketing/api.js.map +1 -0
  176. package/dist/modules/ticketing/index.d.ts +3 -0
  177. package/dist/modules/ticketing/index.d.ts.map +1 -0
  178. package/dist/modules/ticketing/index.js +3 -0
  179. package/dist/modules/ticketing/index.js.map +1 -0
  180. package/dist/modules/ticketing/types.d.ts +59 -0
  181. package/dist/modules/ticketing/types.d.ts.map +1 -0
  182. package/dist/modules/ticketing/types.js +22 -0
  183. package/dist/modules/ticketing/types.js.map +1 -0
  184. package/dist/tasks/std.d.ts +3 -2
  185. package/dist/tasks/std.js +4 -0
  186. package/dist/types.d.ts +1 -5
  187. package/dist/types.d.ts.map +1 -0
  188. package/dist/types.js +2 -2
  189. package/dist/types.js.map +1 -0
  190. package/dist/utils/crud.d.ts +26 -0
  191. package/dist/utils/crud.d.ts.map +1 -0
  192. package/dist/utils/crud.js +68 -0
  193. package/dist/utils/crud.js.map +1 -0
  194. package/dist/utils/http.d.ts +19 -0
  195. package/dist/utils/http.d.ts.map +1 -0
  196. package/dist/utils/http.js +108 -0
  197. package/dist/utils/http.js.map +1 -0
  198. package/dist/utils/index.d.ts +4 -0
  199. package/dist/utils/index.d.ts.map +1 -0
  200. package/dist/utils/index.js +4 -0
  201. package/dist/utils/index.js.map +1 -0
  202. package/dist/utils/signature.d.ts +6 -0
  203. package/dist/utils/signature.d.ts.map +1 -0
  204. package/dist/utils/signature.js +14 -0
  205. package/dist/utils/signature.js.map +1 -0
  206. package/dist/utils/types.d.ts +7 -0
  207. package/dist/utils/types.d.ts.map +1 -0
  208. package/dist/utils/types.js +2 -0
  209. package/dist/utils/types.js.map +1 -0
  210. package/package.json +8 -6
@@ -7,6 +7,7 @@ export declare class HTTPClient {
7
7
  get<T>(path: string, params?: Record<string, unknown>): Promise<APIResponse<T>>;
8
8
  post<T>(path: string, data?: unknown, params?: Record<string, unknown>): Promise<APIResponse<T>>;
9
9
  put<T>(path: string, data?: unknown, params?: Record<string, unknown>): Promise<APIResponse<T>>;
10
+ patch<T>(path: string, data?: unknown, params?: Record<string, unknown>): Promise<APIResponse<T>>;
10
11
  delete<T>(path: string, params?: Record<string, unknown>): Promise<APIResponse<T>>;
11
12
  getBinary(path: string, params?: Record<string, unknown>): Promise<Buffer>;
12
13
  }
@@ -63,6 +63,12 @@ class HTTPClient {
63
63
  });
64
64
  return response.data;
65
65
  }
66
+ async patch(path, data, params) {
67
+ const response = await this.client.patch(path, data, {
68
+ params,
69
+ });
70
+ return response.data;
71
+ }
66
72
  async delete(path, params) {
67
73
  const response = await this.client.delete(path, {
68
74
  params,
@@ -1,8 +1,8 @@
1
1
  import { HTTPClient } from "../../http";
2
- import { CommunitiesAPI } from "./communities/api";
2
+ import { CommunitiesAPI } from "./communities";
3
3
  export declare class HorizontalAPI {
4
4
  private httpClient;
5
5
  constructor(httpClient: HTTPClient);
6
6
  communities(): CommunitiesAPI;
7
7
  }
8
- export * from "./communities/types";
8
+ export * from "./types";
@@ -15,14 +15,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.HorizontalAPI = void 0;
18
- const api_1 = require("./communities/api");
18
+ const communities_1 = require("./communities");
19
19
  class HorizontalAPI {
20
20
  constructor(httpClient) {
21
21
  this.httpClient = httpClient;
22
22
  }
23
23
  communities() {
24
- return new api_1.CommunitiesAPI(this.httpClient);
24
+ return new communities_1.CommunitiesAPI(this.httpClient);
25
25
  }
26
26
  }
27
27
  exports.HorizontalAPI = HorizontalAPI;
28
- __exportStar(require("./communities/types"), exports);
28
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,13 @@
1
+ import { HTTPClient } from "../../http";
2
+ import { CRUD } from "../../utils/crud";
3
+ import { Community, CommunityAgent } from "./types";
4
+ export declare class CommunitiesAPI extends CRUD<Community> {
5
+ private communityId?;
6
+ constructor(httpClient: HTTPClient, communityId?: string | undefined);
7
+ config(): {
8
+ agents(): CRUD<CommunityAgent, CommunityAgent, CommunityAgent, CommunityAgent>;
9
+ roles(): CRUD<CommunityAgent, CommunityAgent, CommunityAgent, CommunityAgent>;
10
+ };
11
+ agents(): CRUD<CommunityAgent>;
12
+ }
13
+ export * from "./types";
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.CommunitiesAPI = void 0;
18
+ const crud_1 = require("../../utils/crud");
19
+ class CommunitiesAPI extends crud_1.CRUD {
20
+ constructor(httpClient, communityId) {
21
+ super(httpClient, `/api/v1/horizontal/communities`, undefined, communityId);
22
+ this.communityId = communityId;
23
+ }
24
+ config() {
25
+ const self = this;
26
+ return {
27
+ agents() {
28
+ return new crud_1.CRUD(self.httpClient, `${self.basePath}/config/agents`, {
29
+ isCreateEnabled: false,
30
+ isUpdateEnabled: false,
31
+ isDeleteEnabled: false,
32
+ isReadEnabled: false,
33
+ }, self.communityId);
34
+ },
35
+ roles() {
36
+ return new crud_1.CRUD(self.httpClient, `${self.basePath}/config/roles`, {
37
+ isCreateEnabled: false,
38
+ isUpdateEnabled: false,
39
+ isDeleteEnabled: false,
40
+ isReadEnabled: false,
41
+ }, self.communityId);
42
+ },
43
+ };
44
+ }
45
+ agents() {
46
+ if (!this.communityId) {
47
+ throw new Error("Community ID is required");
48
+ }
49
+ return new crud_1.CRUD(this.httpClient, `${this.basePath}/${this.communityId}/agents`, undefined, this.communityId);
50
+ }
51
+ }
52
+ exports.CommunitiesAPI = CommunitiesAPI;
53
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,47 @@
1
+ export interface Community {
2
+ id: string;
3
+ domainId: string;
4
+ name: string;
5
+ personId: string;
6
+ enrollmentDate: string | null;
7
+ macrocommunityId: string | null;
8
+ coefficient: number | null;
9
+ churnDate: string | null;
10
+ churnReasonId: number | null;
11
+ tags: string[] | null;
12
+ customFields: Record<string, any>;
13
+ updatedAt: string;
14
+ neighbors: Array<{
15
+ personId: string;
16
+ typeId: number;
17
+ }>;
18
+ person: {
19
+ id: string;
20
+ domainId: string;
21
+ typeId: number;
22
+ langId: number;
23
+ fullName: string;
24
+ legalId: string | null;
25
+ legalRepresentative: string | null;
26
+ bornAt: string | null;
27
+ phones: string[] | null;
28
+ emails: string[] | null;
29
+ notificationEmail: boolean;
30
+ notificationPhone: boolean;
31
+ notificationPostal: boolean;
32
+ tags: string[] | null;
33
+ };
34
+ }
35
+ export interface CommunityAgent {
36
+ communityId: string;
37
+ agentId: string;
38
+ roleId: number;
39
+ updatedAt: string;
40
+ }
41
+ export interface AgentRole {
42
+ id: number;
43
+ domainId: string;
44
+ name: string;
45
+ required: boolean;
46
+ unique: boolean;
47
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,3 @@
1
- import { ResourceInfo } from "../types";
2
1
  export declare enum TaskPriority {
3
2
  low = 1,
4
3
  medium = 2,
@@ -37,7 +36,6 @@ export interface Task {
37
36
  dueDate: string | null;
38
37
  firstResponseDue: string | null;
39
38
  updatedAt: string;
40
- resourceInfo?: ResourceInfo;
41
39
  }
42
40
  export interface CreateTaskDTO {
43
41
  title: string;
@@ -50,7 +48,6 @@ export interface CreateTaskDTO {
50
48
  parentId?: string;
51
49
  dueDate?: string | null;
52
50
  description?: string;
53
- resourceInfo?: ResourceInfo;
54
51
  }
55
52
  export interface TaskCategory {
56
53
  id: number;
@@ -0,0 +1,22 @@
1
+ import { APIResponse } from "../../types";
2
+ import { HTTPClient } from "../http";
3
+ export interface MethodsConfig {
4
+ isCreateEnabled: boolean;
5
+ isReadEnabled: boolean;
6
+ isUpdateEnabled: boolean;
7
+ isDeleteEnabled: boolean;
8
+ isFindEnabled: boolean;
9
+ }
10
+ export declare class CRUD<T, C = T, U = T, F = T> {
11
+ protected readonly httpClient: HTTPClient;
12
+ protected readonly basePath: string;
13
+ protected readonly id?: string | undefined;
14
+ private readonly methodsConfig;
15
+ constructor(httpClient: HTTPClient, basePath: string, methodsConfig?: Partial<MethodsConfig>, id?: string | undefined);
16
+ get(): Promise<APIResponse<T[]>>;
17
+ get(id: string): Promise<APIResponse<T>>;
18
+ create(data: C): Promise<APIResponse<T>>;
19
+ update(id: string, data: Partial<U>): Promise<APIResponse<T>>;
20
+ delete(id: string): Promise<APIResponse<void>>;
21
+ find(query?: Record<string, unknown>): Promise<APIResponse<F[]>>;
22
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CRUD = void 0;
4
+ const DEFAULT_METHODS_CONFIG = {
5
+ isCreateEnabled: true,
6
+ isReadEnabled: true,
7
+ isUpdateEnabled: true,
8
+ isDeleteEnabled: true,
9
+ isFindEnabled: true,
10
+ };
11
+ class CRUD {
12
+ constructor(httpClient, basePath, methodsConfig = DEFAULT_METHODS_CONFIG, id) {
13
+ this.httpClient = httpClient;
14
+ this.basePath = basePath;
15
+ this.id = id;
16
+ this.methodsConfig = {
17
+ ...DEFAULT_METHODS_CONFIG,
18
+ ...methodsConfig,
19
+ };
20
+ }
21
+ async get(id) {
22
+ if (!this.methodsConfig.isReadEnabled) {
23
+ throw new Error("Read method is not enabled");
24
+ }
25
+ return this.httpClient.get(`${this.basePath}/${id || this.id}`);
26
+ }
27
+ async create(data) {
28
+ if (!this.methodsConfig.isCreateEnabled) {
29
+ throw new Error("Create method is not enabled");
30
+ }
31
+ return this.httpClient.post(`${this.basePath}`, data);
32
+ }
33
+ async update(id, data) {
34
+ if (!this.methodsConfig.isUpdateEnabled) {
35
+ throw new Error("Update method is not enabled");
36
+ }
37
+ return this.httpClient.patch(`${this.basePath}/${id || this.id}`, data);
38
+ }
39
+ async delete(id) {
40
+ if (!this.methodsConfig.isDeleteEnabled) {
41
+ throw new Error("Delete method is not enabled");
42
+ }
43
+ return this.httpClient.delete(`${this.basePath}/${id || this.id}`);
44
+ }
45
+ async find(query) {
46
+ if (!this.methodsConfig.isFindEnabled) {
47
+ throw new Error("Find method is not enabled");
48
+ }
49
+ return this.httpClient.get(`${this.basePath}`, query);
50
+ }
51
+ }
52
+ exports.CRUD = CRUD;
package/dist/erp.d.ts CHANGED
@@ -1,14 +1,17 @@
1
- import { ERPClient } from "./client/client";
2
- import { TaskCreator } from "./tasks/creator";
3
- import { ElevaERPConfig } from "./types";
4
- export declare class ElevaERPTasks {
5
- private _erp;
6
- constructor(_erp: ElevaERP);
7
- creator(): TaskCreator;
1
+ import { HorizontalAPI } from "./modules/horizontal";
2
+ import { TicketingAPI } from "./modules/ticketing";
3
+ import { ContactsAPI } from "./modules/contacts/api";
4
+ export interface ERPClientConfig {
5
+ baseURL: string;
6
+ apiKey: string;
7
+ apiSecret: string;
8
8
  }
9
- export declare class ElevaERP {
10
- private _client;
11
- constructor(config: ElevaERPConfig);
12
- client(): ERPClient;
13
- tasks(): ElevaERPTasks;
9
+ export declare class ERPClient {
10
+ private readonly _baseUrl;
11
+ private _httpClient;
12
+ constructor(config: ERPClientConfig);
13
+ contacts(): ContactsAPI;
14
+ horizontal(): HorizontalAPI;
15
+ tasks(): TicketingAPI;
14
16
  }
17
+ //# sourceMappingURL=erp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erp.d.ts","sourceRoot":"","sources":["../src/erp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C,OAAO,CAAC,WAAW,CAAa;gBAEpB,MAAM,EAAE,eAAe;IAYnC,QAAQ,IAAI,WAAW;IAIvB,UAAU,IAAI,aAAa;IAI3B,KAAK,IAAI,YAAY;CAGtB"}
package/dist/erp.js CHANGED
@@ -1,27 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ElevaERP = exports.ElevaERPTasks = void 0;
4
- const client_1 = require("./client/client");
5
- const creator_1 = require("./tasks/creator");
6
- class ElevaERPTasks {
7
- constructor(_erp) {
8
- this._erp = _erp;
9
- }
10
- creator() {
11
- return new creator_1.TaskCreator(this._erp);
12
- }
13
- }
14
- exports.ElevaERPTasks = ElevaERPTasks;
15
- class ElevaERP {
1
+ import { HTTPClient } from "./utils/http";
2
+ import { HorizontalAPI } from "./modules/horizontal";
3
+ import { TicketingAPI } from "./modules/ticketing";
4
+ import { ContactsAPI } from "./modules/contacts/api";
5
+ export class ERPClient {
6
+ _baseUrl = "/api/v1";
7
+ _httpClient;
16
8
  constructor(config) {
17
- const baseURL = config.baseURL || "https://api.eleva.io";
18
- this._client = new client_1.ERPClient(config.apiKey, config.apiSecret, baseURL);
9
+ if (!config.baseURL || !config.apiKey || !config.apiSecret) {
10
+ throw new Error("Missing required configuration");
11
+ }
12
+ this._httpClient = new HTTPClient({
13
+ baseURL: config.baseURL,
14
+ apiKey: config.apiKey,
15
+ apiSecret: config.apiSecret,
16
+ });
17
+ }
18
+ contacts() {
19
+ return new ContactsAPI(this._httpClient, this._baseUrl);
19
20
  }
20
- client() {
21
- return this._client;
21
+ horizontal() {
22
+ return new HorizontalAPI(this._httpClient, this._baseUrl);
22
23
  }
23
24
  tasks() {
24
- return new ElevaERPTasks(this);
25
+ return new TicketingAPI(this._httpClient, this._baseUrl);
25
26
  }
26
27
  }
27
- exports.ElevaERP = ElevaERP;
28
+ //# sourceMappingURL=erp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erp.js","sourceRoot":"","sources":["../src/erp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAQrD,MAAM,OAAO,SAAS;IACH,QAAQ,GAAW,SAAS,CAAC;IAEtC,WAAW,CAAa;IAEhC,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,IAAI,UAAU,CAAC;YAChC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU;QACR,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK;QACH,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from "./erp";
2
1
  export * from "./types";
3
- export * from "./tasks/template";
4
- export * from "./tasks/creator";
5
- export * from "./client/resources/ticketing/types";
2
+ export * from "./utils";
3
+ export * from "./modules";
4
+ export * from "./erp";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC"}
package/dist/index.js CHANGED
@@ -1,21 +1,5 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./erp"), exports);
18
- __exportStar(require("./types"), exports);
19
- __exportStar(require("./tasks/template"), exports);
20
- __exportStar(require("./tasks/creator"), exports);
21
- __exportStar(require("./client/resources/ticketing/types"), exports);
1
+ export * from "./types";
2
+ export * from "./utils";
3
+ export * from "./modules";
4
+ export * from "./erp";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { HTTPClient } from "@src/utils/http";
2
+ import { ContactsPersonsAPI } from "./persons";
3
+ export declare class ContactsAPI {
4
+ private _httpClient;
5
+ private readonly _baseUrl;
6
+ constructor(_httpClient: HTTPClient, baseUrl: string);
7
+ persons(id?: string): ContactsPersonsAPI;
8
+ }
9
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/modules/contacts/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,qBAAa,WAAW;IAGV,OAAO,CAAC,WAAW;IAF/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEd,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM;IAI5D,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,kBAAkB;CAOzC"}
@@ -0,0 +1,13 @@
1
+ import { ContactsPersonsAPI } from "./persons";
2
+ export class ContactsAPI {
3
+ _httpClient;
4
+ _baseUrl;
5
+ constructor(_httpClient, baseUrl) {
6
+ this._httpClient = _httpClient;
7
+ this._baseUrl = `${baseUrl}/contacts`;
8
+ }
9
+ persons(id) {
10
+ return new ContactsPersonsAPI(this._httpClient, `${this._baseUrl}/persons`, id);
11
+ }
12
+ }
13
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/modules/contacts/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,OAAO,WAAW;IAGF;IAFH,QAAQ,CAAS;IAElC,YAAoB,WAAuB,EAAE,OAAe;QAAxC,gBAAW,GAAX,WAAW,CAAY;QACzC,IAAI,CAAC,QAAQ,GAAG,GAAG,OAAO,WAAW,CAAC;IACxC,CAAC;IAED,OAAO,CAAC,EAAW;QACjB,OAAO,IAAI,kBAAkB,CAC3B,IAAI,CAAC,WAAW,EAChB,GAAG,IAAI,CAAC,QAAQ,UAAU,EAC1B,EAAE,CACH,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export * from "./persons";
2
+ export * from "./api";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/contacts/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./persons";
2
+ export * from "./api";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/contacts/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { HTTPClient } from "@src/utils/http";
2
+ import { ContactPersonAddress, CreateContactPersonAddressDTO, UpdateContactPersonAddressDTO } from "../types";
3
+ export declare class ContactsPersonsAddressesAPI {
4
+ private _crud;
5
+ constructor(httpClient: HTTPClient, baseUrl: string, addressId?: string);
6
+ create(data: CreateContactPersonAddressDTO): Promise<ContactPersonAddress>;
7
+ update(id: string, data: UpdateContactPersonAddressDTO): Promise<ContactPersonAddress>;
8
+ delete(id?: string): Promise<void>;
9
+ find(query?: Record<string, unknown>): Promise<ContactPersonAddress[]>;
10
+ }
11
+ //# sourceMappingURL=addresses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,qBAAa,2BAA2B;IACtC,OAAO,CAAC,KAAK,CAIX;gBAEU,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAOvE,MAAM,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAI1E,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,oBAAoB,CAAC;IAIhC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAGvE"}
@@ -0,0 +1,23 @@
1
+ import { CRUD } from "@src/utils/crud";
2
+ export class ContactsPersonsAddressesAPI {
3
+ _crud;
4
+ constructor(httpClient, baseUrl, addressId) {
5
+ this._crud = new CRUD(httpClient, {
6
+ basePath: baseUrl,
7
+ id: addressId,
8
+ });
9
+ }
10
+ create(data) {
11
+ return this._crud.create(data);
12
+ }
13
+ update(id, data) {
14
+ return this._crud.update(id, data);
15
+ }
16
+ delete(id) {
17
+ return this._crud.delete(id);
18
+ }
19
+ find(query) {
20
+ return this._crud.find(query);
21
+ }
22
+ }
23
+ //# sourceMappingURL=addresses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/addresses.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAOvC,MAAM,OAAO,2BAA2B;IAC9B,KAAK,CAIX;IAEF,YAAY,UAAsB,EAAE,OAAe,EAAE,SAAkB;QACrE,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;YAChC,QAAQ,EAAE,OAAO;YACjB,EAAE,EAAE,SAAS;SACd,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,IAAmC;QACxC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CACJ,EAAU,EACV,IAAmC;QAEnC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,EAAW;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI,CAAC,KAA+B;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export * from "./addresses";
2
+ export * from "./persons";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./addresses";
2
+ export * from "./persons";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { HTTPClient } from "@src/utils/http";
2
+ import { CRUD } from "@src/utils/crud";
3
+ import { ContactPerson, ContactPersonExtended, CreateContactPersonDTO, UpdateContactPersonDTO } from "../types";
4
+ import { ContactsPersonsAddressesAPI } from "./addresses";
5
+ export declare class ContactsPersonsAPI extends CRUD<ContactPersonExtended, CreateContactPersonDTO, UpdateContactPersonDTO, ContactPerson | ContactPersonExtended> {
6
+ private readonly _personId?;
7
+ constructor(httpClient: HTTPClient, baseUrl: string, _personId?: string | undefined);
8
+ addresses(id?: string): ContactsPersonsAddressesAPI;
9
+ }
10
+ //# sourceMappingURL=persons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persons.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/persons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,qBAAa,kBAAmB,SAAQ,IAAI,CAC1C,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,GAAG,qBAAqB,CACtC;IAIG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAF3B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,MAAM,EACE,SAAS,CAAC,EAAE,MAAM,YAAA;IAQrC,SAAS,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,2BAA2B;CAWpD"}
@@ -0,0 +1,19 @@
1
+ import { CRUD } from "@src/utils/crud";
2
+ import { ContactsPersonsAddressesAPI } from "./addresses";
3
+ export class ContactsPersonsAPI extends CRUD {
4
+ _personId;
5
+ constructor(httpClient, baseUrl, _personId) {
6
+ super(httpClient, {
7
+ basePath: baseUrl,
8
+ id: _personId,
9
+ });
10
+ this._personId = _personId;
11
+ }
12
+ addresses(id) {
13
+ if (!this._personId) {
14
+ throw new Error("Person ID is required");
15
+ }
16
+ return new ContactsPersonsAddressesAPI(this._httpClient, `${this._config.basePath}/${this._personId}/addresses`, id);
17
+ }
18
+ }
19
+ //# sourceMappingURL=persons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"persons.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/persons.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAOvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,OAAO,kBAAmB,SAAQ,IAKvC;IAIoB;IAHnB,YACE,UAAsB,EACtB,OAAe,EACE,SAAkB;QAEnC,KAAK,CAAC,UAAU,EAAE;YAChB,QAAQ,EAAE,OAAO;YACjB,EAAE,EAAE,SAAS;SACd,CAAC,CAAC;QALc,cAAS,GAAT,SAAS,CAAS;IAMrC,CAAC;IAED,SAAS,CAAC,EAAW;QACnB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,IAAI,2BAA2B,CACpC,IAAI,CAAC,WAAW,EAChB,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,YAAY,EACtD,EAAE,CACH,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./api";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/contacts/persons/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./api";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/contacts/persons/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
@@ -0,0 +1,21 @@
1
+ export interface ContactAddressGplacesRaw {
2
+ placeId: string;
3
+ value: string;
4
+ updatedAt: Date;
5
+ }
6
+ export type CreateContactAddressGplacesRawDTO = Omit<ContactAddressGplacesRaw, "updatedAt">;
7
+ export interface ContactAddress {
8
+ id: string;
9
+ gplacesRawId: string;
10
+ countryId: number;
11
+ coords: [number, number];
12
+ adminstrativeAreas: string[];
13
+ locality: string;
14
+ streetName: string;
15
+ streetNumber: string;
16
+ postalCode: string;
17
+ updatedAt: Date;
18
+ sublocality?: string;
19
+ neighborhood?: string;
20
+ }
21
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/address.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAClD,wBAAwB,EACxB,WAAW,CACZ,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/address.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from "./address";
2
+ export * from "./person";
3
+ export * from "./person_address";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./address";
2
+ export * from "./person";
3
+ export * from "./person_address";
4
+ //# sourceMappingURL=index.js.map