@eleva-io/erp-sdk 0.1.7 → 0.1.10

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 (291) hide show
  1. package/dist/erp.d.ts +8 -4
  2. package/dist/erp.d.ts.map +1 -1
  3. package/dist/erp.js +11 -3
  4. package/dist/erp.js.map +1 -1
  5. package/dist/index.d.ts +4 -4
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/modules/contacts/api.d.ts +2 -2
  9. package/dist/modules/contacts/api.d.ts.map +1 -1
  10. package/dist/modules/contacts/api.js.map +1 -1
  11. package/dist/modules/contacts/index.d.ts +2 -2
  12. package/dist/modules/contacts/index.d.ts.map +1 -1
  13. package/dist/modules/contacts/index.js.map +1 -1
  14. package/dist/modules/contacts/persons/api/addresses.d.ts +2 -2
  15. package/dist/modules/contacts/persons/api/addresses.d.ts.map +1 -1
  16. package/dist/modules/contacts/persons/api/addresses.js.map +1 -1
  17. package/dist/modules/contacts/persons/api/index.d.ts +2 -2
  18. package/dist/modules/contacts/persons/api/index.d.ts.map +1 -1
  19. package/dist/modules/contacts/persons/api/index.js.map +1 -1
  20. package/dist/modules/contacts/persons/api/persons.d.ts +4 -4
  21. package/dist/modules/contacts/persons/api/persons.d.ts.map +1 -1
  22. package/dist/modules/contacts/persons/api/persons.js +1 -1
  23. package/dist/modules/contacts/persons/api/persons.js.map +1 -1
  24. package/dist/modules/contacts/persons/index.d.ts +2 -2
  25. package/dist/modules/contacts/persons/index.d.ts.map +1 -1
  26. package/dist/modules/contacts/persons/index.js.map +1 -1
  27. package/dist/modules/contacts/persons/types/address.d.ts +1 -1
  28. package/dist/modules/contacts/persons/types/address.d.ts.map +1 -1
  29. package/dist/modules/contacts/persons/types/index.d.ts +3 -3
  30. package/dist/modules/contacts/persons/types/index.d.ts.map +1 -1
  31. package/dist/modules/contacts/persons/types/index.js.map +1 -1
  32. package/dist/modules/contacts/persons/types/person.d.ts +13 -4
  33. package/dist/modules/contacts/persons/types/person.d.ts.map +1 -1
  34. package/dist/modules/contacts/persons/types/person_address.d.ts +3 -3
  35. package/dist/modules/contacts/persons/types/person_address.d.ts.map +1 -1
  36. package/dist/modules/domain/agents/api.d.ts +12 -0
  37. package/dist/modules/domain/agents/api.d.ts.map +1 -0
  38. package/dist/modules/domain/agents/api.js +31 -0
  39. package/dist/modules/domain/agents/api.js.map +1 -0
  40. package/dist/modules/domain/agents/index.d.ts +3 -0
  41. package/dist/modules/domain/agents/index.d.ts.map +1 -0
  42. package/dist/modules/domain/agents/index.js +19 -0
  43. package/dist/modules/domain/agents/index.js.map +1 -0
  44. package/dist/modules/domain/agents/types.d.ts +34 -0
  45. package/dist/modules/domain/agents/types.d.ts.map +1 -0
  46. package/dist/modules/domain/agents/types.js +10 -0
  47. package/dist/modules/domain/agents/types.js.map +1 -0
  48. package/dist/modules/domain/api.d.ts +11 -0
  49. package/dist/modules/domain/api.d.ts.map +1 -0
  50. package/dist/modules/domain/api.js +21 -0
  51. package/dist/modules/domain/api.js.map +1 -0
  52. package/dist/modules/domain/iam/api/agents.d.ts +15 -0
  53. package/dist/modules/domain/iam/api/agents.d.ts.map +1 -0
  54. package/dist/modules/domain/iam/api/agents.js +36 -0
  55. package/dist/modules/domain/iam/api/agents.js.map +1 -0
  56. package/dist/modules/domain/iam/api/iam.d.ts +11 -0
  57. package/dist/modules/domain/iam/api/iam.d.ts.map +1 -0
  58. package/dist/modules/domain/iam/api/iam.js +21 -0
  59. package/dist/modules/domain/iam/api/iam.js.map +1 -0
  60. package/dist/modules/domain/iam/api/index.d.ts +4 -0
  61. package/dist/modules/domain/iam/api/index.d.ts.map +1 -0
  62. package/dist/modules/domain/iam/api/index.js +20 -0
  63. package/dist/modules/domain/iam/api/index.js.map +1 -0
  64. package/dist/modules/domain/iam/api/roles.d.ts +7 -0
  65. package/dist/modules/domain/iam/api/roles.d.ts.map +1 -0
  66. package/dist/modules/domain/iam/api/roles.js +13 -0
  67. package/dist/modules/domain/iam/api/roles.js.map +1 -0
  68. package/dist/modules/domain/iam/index.d.ts +3 -0
  69. package/dist/modules/domain/iam/index.d.ts.map +1 -0
  70. package/dist/modules/domain/iam/index.js +19 -0
  71. package/dist/modules/domain/iam/index.js.map +1 -0
  72. package/dist/modules/domain/iam/types/index.d.ts +2 -0
  73. package/dist/modules/domain/iam/types/index.d.ts.map +1 -0
  74. package/dist/modules/domain/iam/types/index.js +18 -0
  75. package/dist/modules/domain/iam/types/index.js.map +1 -0
  76. package/dist/modules/domain/iam/types/roles.d.ts +11 -0
  77. package/dist/modules/domain/iam/types/roles.d.ts.map +1 -0
  78. package/dist/modules/domain/iam/types/roles.js +3 -0
  79. package/dist/modules/domain/iam/types/roles.js.map +1 -0
  80. package/dist/modules/domain/index.d.ts +4 -0
  81. package/dist/modules/domain/index.d.ts.map +1 -0
  82. package/dist/modules/domain/index.js +20 -0
  83. package/dist/modules/domain/index.js.map +1 -0
  84. package/dist/modules/global/agents/index.d.ts +2 -0
  85. package/dist/modules/global/agents/index.d.ts.map +1 -0
  86. package/dist/modules/global/agents/index.js +18 -0
  87. package/dist/modules/global/agents/index.js.map +1 -0
  88. package/dist/modules/global/agents/types.d.ts +16 -0
  89. package/dist/modules/global/agents/types.d.ts.map +1 -0
  90. package/dist/modules/global/agents/types.js +10 -0
  91. package/dist/modules/global/agents/types.js.map +1 -0
  92. package/dist/modules/global/api.d.ts +9 -0
  93. package/dist/modules/global/api.d.ts.map +1 -0
  94. package/dist/modules/global/api.js +17 -0
  95. package/dist/modules/global/api.js.map +1 -0
  96. package/dist/modules/global/index.d.ts +3 -0
  97. package/dist/modules/global/index.d.ts.map +1 -0
  98. package/dist/modules/global/index.js +19 -0
  99. package/dist/modules/global/index.js.map +1 -0
  100. package/dist/modules/global/search/api.d.ts +10 -0
  101. package/dist/modules/global/search/api.d.ts.map +1 -0
  102. package/dist/modules/global/search/api.js +19 -0
  103. package/dist/modules/global/search/api.js.map +1 -0
  104. package/dist/modules/global/search/index.d.ts +3 -0
  105. package/dist/modules/global/search/index.d.ts.map +1 -0
  106. package/dist/modules/global/search/index.js +19 -0
  107. package/dist/modules/global/search/index.js.map +1 -0
  108. package/dist/modules/global/search/types.d.ts +37 -0
  109. package/dist/modules/global/search/types.d.ts.map +1 -0
  110. package/dist/modules/global/search/types.js +10 -0
  111. package/dist/modules/global/search/types.js.map +1 -0
  112. package/dist/modules/horizontal/api.d.ts +2 -2
  113. package/dist/modules/horizontal/api.d.ts.map +1 -1
  114. package/dist/modules/horizontal/api.js.map +1 -1
  115. package/dist/modules/horizontal/communities/api/agents.d.ts +2 -2
  116. package/dist/modules/horizontal/communities/api/agents.d.ts.map +1 -1
  117. package/dist/modules/horizontal/communities/api/agents.js.map +1 -1
  118. package/dist/modules/horizontal/communities/api/blocks.d.ts +4 -4
  119. package/dist/modules/horizontal/communities/api/blocks.d.ts.map +1 -1
  120. package/dist/modules/horizontal/communities/api/blocks.js +1 -1
  121. package/dist/modules/horizontal/communities/api/blocks.js.map +1 -1
  122. package/dist/modules/horizontal/communities/api/communities.d.ts +13 -11
  123. package/dist/modules/horizontal/communities/api/communities.d.ts.map +1 -1
  124. package/dist/modules/horizontal/communities/api/communities.js +14 -7
  125. package/dist/modules/horizontal/communities/api/communities.js.map +1 -1
  126. package/dist/modules/horizontal/communities/api/communities_config.d.ts +3 -3
  127. package/dist/modules/horizontal/communities/api/communities_config.d.ts.map +1 -1
  128. package/dist/modules/horizontal/communities/api/communities_config.js.map +1 -1
  129. package/dist/modules/horizontal/communities/api/documents.d.ts +3 -3
  130. package/dist/modules/horizontal/communities/api/documents.d.ts.map +1 -1
  131. package/dist/modules/horizontal/communities/api/documents.js +6 -1
  132. package/dist/modules/horizontal/communities/api/documents.js.map +1 -1
  133. package/dist/modules/horizontal/communities/api/employees.d.ts +2 -2
  134. package/dist/modules/horizontal/communities/api/employees.d.ts.map +1 -1
  135. package/dist/modules/horizontal/communities/api/employees.js.map +1 -1
  136. package/dist/modules/horizontal/communities/api/index.d.ts +11 -10
  137. package/dist/modules/horizontal/communities/api/index.d.ts.map +1 -1
  138. package/dist/modules/horizontal/communities/api/index.js +1 -0
  139. package/dist/modules/horizontal/communities/api/index.js.map +1 -1
  140. package/dist/modules/horizontal/communities/api/properties.d.ts +4 -4
  141. package/dist/modules/horizontal/communities/api/properties.d.ts.map +1 -1
  142. package/dist/modules/horizontal/communities/api/properties.js +1 -1
  143. package/dist/modules/horizontal/communities/api/properties.js.map +1 -1
  144. package/dist/modules/horizontal/communities/api/providers.d.ts +2 -2
  145. package/dist/modules/horizontal/communities/api/providers.d.ts.map +1 -1
  146. package/dist/modules/horizontal/communities/api/providers.js.map +1 -1
  147. package/dist/modules/horizontal/communities/api/receipts.d.ts +4 -4
  148. package/dist/modules/horizontal/communities/api/receipts.d.ts.map +1 -1
  149. package/dist/modules/horizontal/communities/api/receipts.js +1 -1
  150. package/dist/modules/horizontal/communities/api/receipts.js.map +1 -1
  151. package/dist/modules/horizontal/communities/api/roles.d.ts +2 -2
  152. package/dist/modules/horizontal/communities/api/roles.d.ts.map +1 -1
  153. package/dist/modules/horizontal/communities/api/roles.js.map +1 -1
  154. package/dist/modules/horizontal/communities/api/route_trackings/index.d.ts +4 -0
  155. package/dist/modules/horizontal/communities/api/route_trackings/index.d.ts.map +1 -0
  156. package/dist/modules/horizontal/communities/api/route_trackings/index.js +20 -0
  157. package/dist/modules/horizontal/communities/api/route_trackings/index.js.map +1 -0
  158. package/dist/modules/horizontal/communities/api/route_trackings/route_trackings.d.ts +11 -0
  159. package/dist/modules/horizontal/communities/api/route_trackings/route_trackings.d.ts.map +1 -0
  160. package/dist/modules/horizontal/communities/api/route_trackings/route_trackings.js +21 -0
  161. package/dist/modules/horizontal/communities/api/route_trackings/route_trackings.js.map +1 -0
  162. package/dist/modules/horizontal/communities/api/route_trackings/routes.d.ts +27 -0
  163. package/dist/modules/horizontal/communities/api/route_trackings/routes.d.ts.map +1 -0
  164. package/dist/modules/horizontal/communities/api/route_trackings/routes.js +69 -0
  165. package/dist/modules/horizontal/communities/api/route_trackings/routes.js.map +1 -0
  166. package/dist/modules/horizontal/communities/api/route_trackings/zones.d.ts +11 -0
  167. package/dist/modules/horizontal/communities/api/route_trackings/zones.d.ts.map +1 -0
  168. package/dist/modules/horizontal/communities/api/route_trackings/zones.js +26 -0
  169. package/dist/modules/horizontal/communities/api/route_trackings/zones.js.map +1 -0
  170. package/dist/modules/horizontal/communities/index.d.ts +2 -2
  171. package/dist/modules/horizontal/communities/index.d.ts.map +1 -1
  172. package/dist/modules/horizontal/communities/index.js.map +1 -1
  173. package/dist/modules/horizontal/communities/types/address.d.ts +2 -2
  174. package/dist/modules/horizontal/communities/types/address.d.ts.map +1 -1
  175. package/dist/modules/horizontal/communities/types/agent.d.ts +2 -2
  176. package/dist/modules/horizontal/communities/types/agent.d.ts.map +1 -1
  177. package/dist/modules/horizontal/communities/types/block.d.ts +4 -5
  178. package/dist/modules/horizontal/communities/types/block.d.ts.map +1 -1
  179. package/dist/modules/horizontal/communities/types/community.d.ts +12 -5
  180. package/dist/modules/horizontal/communities/types/community.d.ts.map +1 -1
  181. package/dist/modules/horizontal/communities/types/community_config.d.ts.map +1 -1
  182. package/dist/modules/horizontal/communities/types/document.d.ts +2 -2
  183. package/dist/modules/horizontal/communities/types/document.d.ts.map +1 -1
  184. package/dist/modules/horizontal/communities/types/employee.d.ts +3 -3
  185. package/dist/modules/horizontal/communities/types/employee.d.ts.map +1 -1
  186. package/dist/modules/horizontal/communities/types/index.d.ts +10 -9
  187. package/dist/modules/horizontal/communities/types/index.d.ts.map +1 -1
  188. package/dist/modules/horizontal/communities/types/index.js +1 -0
  189. package/dist/modules/horizontal/communities/types/index.js.map +1 -1
  190. package/dist/modules/horizontal/communities/types/property.d.ts +6 -6
  191. package/dist/modules/horizontal/communities/types/property.d.ts.map +1 -1
  192. package/dist/modules/horizontal/communities/types/property.js.map +1 -1
  193. package/dist/modules/horizontal/communities/types/provider.d.ts +3 -3
  194. package/dist/modules/horizontal/communities/types/provider.d.ts.map +1 -1
  195. package/dist/modules/horizontal/communities/types/receipt.d.ts +7 -7
  196. package/dist/modules/horizontal/communities/types/receipt.d.ts.map +1 -1
  197. package/dist/modules/horizontal/communities/types/roles.d.ts +2 -2
  198. package/dist/modules/horizontal/communities/types/roles.d.ts.map +1 -1
  199. package/dist/modules/horizontal/communities/types/route_tracking.d.ts +53 -0
  200. package/dist/modules/horizontal/communities/types/route_tracking.d.ts.map +1 -0
  201. package/dist/modules/horizontal/communities/types/route_tracking.js +19 -0
  202. package/dist/modules/horizontal/communities/types/route_tracking.js.map +1 -0
  203. package/dist/modules/horizontal/communities/types/tag.d.ts.map +1 -1
  204. package/dist/modules/horizontal/index.d.ts +2 -2
  205. package/dist/modules/horizontal/index.d.ts.map +1 -1
  206. package/dist/modules/horizontal/index.js.map +1 -1
  207. package/dist/modules/index.d.ts +5 -3
  208. package/dist/modules/index.d.ts.map +1 -1
  209. package/dist/modules/index.js +2 -0
  210. package/dist/modules/index.js.map +1 -1
  211. package/dist/modules/ticketing/api.d.ts +6 -15
  212. package/dist/modules/ticketing/api.d.ts.map +1 -1
  213. package/dist/modules/ticketing/api.js +9 -38
  214. package/dist/modules/ticketing/api.js.map +1 -1
  215. package/dist/modules/ticketing/index.d.ts +2 -2
  216. package/dist/modules/ticketing/index.d.ts.map +1 -1
  217. package/dist/modules/ticketing/index.js +1 -1
  218. package/dist/modules/ticketing/index.js.map +1 -1
  219. package/dist/modules/ticketing/tasks/api/activity_logs.d.ts +10 -0
  220. package/dist/modules/ticketing/tasks/api/activity_logs.d.ts.map +1 -0
  221. package/dist/modules/ticketing/tasks/api/activity_logs.js +21 -0
  222. package/dist/modules/ticketing/tasks/api/activity_logs.js.map +1 -0
  223. package/dist/modules/ticketing/tasks/api/attachments.d.ts +8 -0
  224. package/dist/modules/ticketing/tasks/api/attachments.d.ts.map +1 -0
  225. package/dist/modules/ticketing/tasks/api/attachments.js +16 -0
  226. package/dist/modules/ticketing/tasks/api/attachments.js.map +1 -0
  227. package/dist/modules/ticketing/tasks/api/conversations.d.ts +11 -0
  228. package/dist/modules/ticketing/tasks/api/conversations.d.ts.map +1 -0
  229. package/dist/modules/ticketing/tasks/api/conversations.js +35 -0
  230. package/dist/modules/ticketing/tasks/api/conversations.js.map +1 -0
  231. package/dist/modules/ticketing/tasks/api/followers.d.ts +11 -0
  232. package/dist/modules/ticketing/tasks/api/followers.d.ts.map +1 -0
  233. package/dist/modules/ticketing/tasks/api/followers.js +24 -0
  234. package/dist/modules/ticketing/tasks/api/followers.js.map +1 -0
  235. package/dist/modules/ticketing/tasks/api/index.d.ts +7 -0
  236. package/dist/modules/ticketing/tasks/api/index.d.ts.map +1 -0
  237. package/dist/modules/ticketing/tasks/api/index.js +23 -0
  238. package/dist/modules/ticketing/tasks/api/index.js.map +1 -0
  239. package/dist/modules/ticketing/tasks/api/resources.d.ts +11 -0
  240. package/dist/modules/ticketing/tasks/api/resources.d.ts.map +1 -0
  241. package/dist/modules/ticketing/tasks/api/resources.js +24 -0
  242. package/dist/modules/ticketing/tasks/api/resources.js.map +1 -0
  243. package/dist/modules/ticketing/tasks/api/tasks.d.ts +18 -0
  244. package/dist/modules/ticketing/tasks/api/tasks.d.ts.map +1 -0
  245. package/dist/modules/ticketing/tasks/api/tasks.js +51 -0
  246. package/dist/modules/ticketing/tasks/api/tasks.js.map +1 -0
  247. package/dist/modules/ticketing/tasks/index.d.ts +3 -0
  248. package/dist/modules/ticketing/tasks/index.d.ts.map +1 -0
  249. package/dist/modules/ticketing/tasks/index.js +19 -0
  250. package/dist/modules/ticketing/tasks/index.js.map +1 -0
  251. package/dist/modules/ticketing/tasks/types/activity_log.d.ts +28 -0
  252. package/dist/modules/ticketing/tasks/types/activity_log.d.ts.map +1 -0
  253. package/dist/modules/ticketing/tasks/types/activity_log.js +24 -0
  254. package/dist/modules/ticketing/tasks/types/activity_log.js.map +1 -0
  255. package/dist/modules/ticketing/tasks/types/converstation.d.ts +31 -0
  256. package/dist/modules/ticketing/tasks/types/converstation.d.ts.map +1 -0
  257. package/dist/modules/ticketing/tasks/types/converstation.js +11 -0
  258. package/dist/modules/ticketing/tasks/types/converstation.js.map +1 -0
  259. package/dist/modules/ticketing/tasks/types/follower.d.ts +8 -0
  260. package/dist/modules/ticketing/tasks/types/follower.d.ts.map +1 -0
  261. package/dist/modules/ticketing/tasks/types/follower.js +3 -0
  262. package/dist/modules/ticketing/tasks/types/follower.js.map +1 -0
  263. package/dist/modules/ticketing/tasks/types/index.d.ts +6 -0
  264. package/dist/modules/ticketing/tasks/types/index.d.ts.map +1 -0
  265. package/dist/modules/ticketing/tasks/types/index.js +22 -0
  266. package/dist/modules/ticketing/tasks/types/index.js.map +1 -0
  267. package/dist/modules/ticketing/tasks/types/resource.d.ts +18 -0
  268. package/dist/modules/ticketing/tasks/types/resource.d.ts.map +1 -0
  269. package/dist/modules/ticketing/tasks/types/resource.js +15 -0
  270. package/dist/modules/ticketing/tasks/types/resource.js.map +1 -0
  271. package/dist/modules/ticketing/tasks/types/task.d.ts +64 -0
  272. package/dist/modules/ticketing/tasks/types/task.d.ts.map +1 -0
  273. package/dist/modules/ticketing/tasks/types/task.js +25 -0
  274. package/dist/modules/ticketing/tasks/types/task.js.map +1 -0
  275. package/dist/types.d.ts.map +1 -1
  276. package/dist/utils/crud.d.ts +2 -2
  277. package/dist/utils/crud.d.ts.map +1 -1
  278. package/dist/utils/crud.js +6 -6
  279. package/dist/utils/crud.js.map +1 -1
  280. package/dist/utils/http.d.ts +16 -8
  281. package/dist/utils/http.d.ts.map +1 -1
  282. package/dist/utils/http.js +69 -23
  283. package/dist/utils/http.js.map +1 -1
  284. package/dist/utils/index.d.ts +3 -3
  285. package/dist/utils/index.d.ts.map +1 -1
  286. package/dist/utils/index.js.map +1 -1
  287. package/dist/utils/signature.d.ts.map +1 -1
  288. package/dist/utils/signature.js +2 -5
  289. package/dist/utils/signature.js.map +1 -1
  290. package/dist/utils/types.d.ts.map +1 -1
  291. package/package.json +17 -3
package/dist/erp.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import { HorizontalAPI } from "./modules/horizontal";
2
- import { TicketingAPI } from "./modules/ticketing";
3
- import { ContactsAPI } from "./modules/contacts/api";
1
+ import { HorizontalAPI } from './modules/horizontal';
2
+ import { TicketingAPI } from './modules/ticketing';
3
+ import { ContactsAPI } from './modules/contacts/api';
4
+ import { GlobalAPI } from './modules/global/api';
5
+ import { DomainAPI } from './modules/domain/api';
4
6
  export interface ERPClientConfig {
5
7
  baseURL: string;
6
8
  apiKey: string;
@@ -10,8 +12,10 @@ export declare class ERPClient {
10
12
  private readonly _baseUrl;
11
13
  private _httpClient;
12
14
  constructor(config: ERPClientConfig);
15
+ domain(): DomainAPI;
16
+ global(): GlobalAPI;
13
17
  contacts(): ContactsAPI;
14
18
  horizontal(): HorizontalAPI;
15
- tasks(): TicketingAPI;
19
+ ticketing(): TicketingAPI;
16
20
  }
17
21
  //# sourceMappingURL=erp.d.ts.map
package/dist/erp.d.ts.map CHANGED
@@ -1 +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"}
1
+ {"version":3,"file":"erp.d.ts","sourceRoot":"","sources":["../src/erp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAE7C,OAAO,CAAC,WAAW,CAAY;gBAEnB,MAAM,EAAE,eAAe;IAYnC,MAAM,IAAI,SAAS;IAInB,MAAM,IAAI,SAAS;IAInB,QAAQ,IAAI,WAAW;IAIvB,UAAU,IAAI,aAAa;IAI3B,SAAS,IAAI,YAAY;CAG1B"}
package/dist/erp.js CHANGED
@@ -5,12 +5,14 @@ const http_1 = require("./utils/http");
5
5
  const horizontal_1 = require("./modules/horizontal");
6
6
  const ticketing_1 = require("./modules/ticketing");
7
7
  const api_1 = require("./modules/contacts/api");
8
+ const api_2 = require("./modules/global/api");
9
+ const api_3 = require("./modules/domain/api");
8
10
  class ERPClient {
9
- _baseUrl = "/api/v1";
11
+ _baseUrl = '/api/v1';
10
12
  _httpClient;
11
13
  constructor(config) {
12
14
  if (!config.baseURL || !config.apiKey || !config.apiSecret) {
13
- throw new Error("Missing required configuration");
15
+ throw new Error('Missing required configuration');
14
16
  }
15
17
  this._httpClient = new http_1.HTTPClient({
16
18
  baseURL: config.baseURL,
@@ -18,13 +20,19 @@ class ERPClient {
18
20
  apiSecret: config.apiSecret,
19
21
  });
20
22
  }
23
+ domain() {
24
+ return new api_3.DomainAPI(this._httpClient, this._baseUrl); // TODO: auth http client
25
+ }
26
+ global() {
27
+ return new api_2.GlobalAPI(this._httpClient, this._baseUrl);
28
+ }
21
29
  contacts() {
22
30
  return new api_1.ContactsAPI(this._httpClient, this._baseUrl);
23
31
  }
24
32
  horizontal() {
25
33
  return new horizontal_1.HorizontalAPI(this._httpClient, this._baseUrl);
26
34
  }
27
- tasks() {
35
+ ticketing() {
28
36
  return new ticketing_1.TicketingAPI(this._httpClient, this._baseUrl);
29
37
  }
30
38
  }
package/dist/erp.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"erp.js","sourceRoot":"","sources":["../src/erp.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,qDAAqD;AACrD,mDAAmD;AACnD,gDAAqD;AAQrD,MAAa,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,iBAAU,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,iBAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU;QACR,OAAO,IAAI,0BAAa,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK;QACH,OAAO,IAAI,wBAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;CACF;AA5BD,8BA4BC"}
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";
2
- export * from "./utils";
3
- export * from "./modules";
4
- export * from "./erp";
1
+ export * from './types';
2
+ export * from './utils';
3
+ export * from './modules';
4
+ export * from './erp';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,0CAAuB;AACvB,4CAAyB;AACzB,wCAAqB"}
@@ -1,5 +1,5 @@
1
- import { HTTPClient } from "../../utils/http";
2
- import { ContactsPersonsAPI } from "./persons";
1
+ import { HTTPClient } from '../../utils/http';
2
+ import { ContactsPersonsAPI } from './persons';
3
3
  export declare class ContactsAPI {
4
4
  private _httpClient;
5
5
  private readonly _baseUrl;
@@ -1 +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"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/modules/contacts/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE9C,qBAAa,WAAW;IAIpB,OAAO,CAAC,WAAW;IAHrB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;gBAGvB,WAAW,EAAE,UAAU,EAC/B,OAAO,EAAE,MAAM;IAKjB,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,kBAAkB;CAGzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/modules/contacts/api.ts"],"names":[],"mappings":";;;AACA,uCAA+C;AAE/C,MAAa,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,4BAAkB,CAC3B,IAAI,CAAC,WAAW,EAChB,GAAG,IAAI,CAAC,QAAQ,UAAU,EAC1B,EAAE,CACH,CAAC;IACJ,CAAC;CACF;AAdD,kCAcC"}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/modules/contacts/api.ts"],"names":[],"mappings":";;;AACA,uCAA8C;AAE9C,MAAa,WAAW;IAIZ;IAHO,QAAQ,CAAQ;IAEjC,YACU,WAAuB,EAC/B,OAAe;QADP,gBAAW,GAAX,WAAW,CAAY;QAG/B,IAAI,CAAC,QAAQ,GAAG,GAAG,OAAO,WAAW,CAAA;IACvC,CAAC;IAED,OAAO,CAAC,EAAW;QACjB,OAAO,IAAI,4BAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,QAAQ,UAAU,EAAE,EAAE,CAAC,CAAA;IACjF,CAAC;CACF;AAbD,kCAaC"}
@@ -1,3 +1,3 @@
1
- export * from "./persons";
2
- export * from "./api";
1
+ export * from './persons';
2
+ export * from './api';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/contacts/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/contacts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/contacts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,wCAAqB"}
@@ -1,5 +1,5 @@
1
- import { HTTPClient } from "../../../../utils/http";
2
- import { ContactPersonAddress, CreateContactPersonAddressDTO, UpdateContactPersonAddressDTO } from "../types";
1
+ import { HTTPClient } from '../../../../utils/http';
2
+ import { ContactPersonAddress, CreateContactPersonAddressDTO, UpdateContactPersonAddressDTO } from '../types';
3
3
  export declare class ContactsPersonsAddressesAPI {
4
4
  private _crud;
5
5
  constructor(httpClient: HTTPClient, baseUrl: string, addressId?: string);
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA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AAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAGvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/addresses.ts"],"names":[],"mappings":";;;AACA,0CAAuC;AAOvC,MAAa,2BAA2B;IAC9B,KAAK,CAIX;IAEF,YAAY,UAAsB,EAAE,OAAe,EAAE,SAAkB;QACrE,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,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;AAhCD,kEAgCC"}
1
+ {"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/addresses.ts"],"names":[],"mappings":";;;AACA,0CAAsC;AAGtC,MAAa,2BAA2B;IAC9B,KAAK,CAA0F;IAEvG,YAAY,UAAsB,EAAE,OAAe,EAAE,SAAkB;QACrE,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,UAAU,EAAE;YAChC,QAAQ,EAAE,OAAO;YACjB,EAAE,EAAE,SAAS;SACd,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,CAAC,IAAmC;QACxC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAmC;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IACpC,CAAC;IAED,MAAM,CAAC,EAAW;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IAC9B,CAAC;IAED,IAAI,CAAC,KAA+B;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC;CACF;AAzBD,kEAyBC"}
@@ -1,3 +1,3 @@
1
- export * from "./addresses";
2
- export * from "./persons";
1
+ export * from './addresses';
2
+ export * from './persons';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB"}
@@ -1,7 +1,7 @@
1
- import { HTTPClient } from "../../../../utils/http";
2
- import { CRUD } from "../../../../utils/crud";
3
- import { ContactPerson, ContactPersonExtended, CreateContactPersonDTO, UpdateContactPersonDTO } from "../types";
4
- import { ContactsPersonsAddressesAPI } from "./addresses";
1
+ import { HTTPClient } from '../../../../utils/http';
2
+ import { CRUD } from '../../../../utils/crud';
3
+ import { ContactPerson, ContactPersonExtended, CreateContactPersonDTO, UpdateContactPersonDTO } from '../types';
4
+ import { ContactsPersonsAddressesAPI } from './addresses';
5
5
  export declare class ContactsPersonsAPI extends CRUD<ContactPersonExtended, CreateContactPersonDTO, UpdateContactPersonDTO, ContactPerson | ContactPersonExtended> {
6
6
  private readonly _personId?;
7
7
  constructor(httpClient: HTTPClient, baseUrl: string, _personId?: string | undefined);
@@ -1 +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"}
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,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAC/G,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAEzD,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;CAOpD"}
@@ -14,7 +14,7 @@ class ContactsPersonsAPI extends crud_1.CRUD {
14
14
  }
15
15
  addresses(id) {
16
16
  if (!this._personId) {
17
- throw new Error("Person ID is required");
17
+ throw new Error('Person ID is required');
18
18
  }
19
19
  return new addresses_1.ContactsPersonsAddressesAPI(this._httpClient, `${this._config.basePath}/${this._personId}/addresses`, id);
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"persons.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/persons.ts"],"names":[],"mappings":";;;AACA,0CAAuC;AAOvC,2CAA0D;AAE1D,MAAa,kBAAmB,SAAQ,WAKvC;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,uCAA2B,CACpC,IAAI,CAAC,WAAW,EAChB,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,YAAY,EACtD,EAAE,CACH,CAAC;IACJ,CAAC;CACF;AA5BD,gDA4BC"}
1
+ {"version":3,"file":"persons.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/api/persons.ts"],"names":[],"mappings":";;;AACA,0CAAsC;AAEtC,2CAAyD;AAEzD,MAAa,kBAAmB,SAAQ,WAKvC;IAIoB;IAHnB,YACE,UAAsB,EACtB,OAAe,EACE,SAAkB;QAEnC,KAAK,CAAC,UAAU,EAAE;YAChB,QAAQ,EAAE,OAAO;YACjB,EAAE,EAAE,SAAS;SACd,CAAC,CAAA;QALe,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,CAAA;QAC1C,CAAC;QAED,OAAO,IAAI,uCAA2B,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,YAAY,EAAE,EAAE,CAAC,CAAA;IACtH,CAAC;CACF;AAxBD,gDAwBC"}
@@ -1,3 +1,3 @@
1
- export * from "./types";
2
- export * from "./api";
1
+ export * from './types';
2
+ export * from './api';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/contacts/persons/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/contacts/persons/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/contacts/persons/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,wCAAqB"}
@@ -3,7 +3,7 @@ export interface ContactAddressGplacesRaw {
3
3
  value: string;
4
4
  updatedAt: Date;
5
5
  }
6
- export type CreateContactAddressGplacesRawDTO = Omit<ContactAddressGplacesRaw, "updatedAt">;
6
+ export type CreateContactAddressGplacesRawDTO = Omit<ContactAddressGplacesRaw, 'updatedAt'>;
7
7
  export interface ContactAddress {
8
8
  id: string;
9
9
  gplacesRawId: string;
@@ -1 +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"}
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,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAA;AAE3F,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,IAAI,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
@@ -1,4 +1,4 @@
1
- export * from "./address";
2
- export * from "./person";
3
- export * from "./person_address";
1
+ export * from './address';
2
+ export * from './person';
3
+ export * from './person_address';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,2CAAwB;AACxB,mDAAgC"}
@@ -1,8 +1,17 @@
1
- import { CreateContactPersonAddressDTO } from "./person_address";
1
+ import { CreateContactPersonAddressDTO } from './person_address';
2
2
  export declare enum ContactPersonType {
3
3
  Natural = 1,
4
4
  Legal = 2
5
5
  }
6
+ export interface ContactPersonCollection {
7
+ id: string;
8
+ domain_id: string;
9
+ type_id: ContactPersonType;
10
+ full_name: string;
11
+ legal_id?: string;
12
+ phones?: string[];
13
+ emails?: string[];
14
+ }
6
15
  export interface ContactPerson {
7
16
  id: string;
8
17
  domainId: string;
@@ -21,12 +30,12 @@ export interface ContactPerson {
21
30
  tags?: [string, boolean][];
22
31
  updatedAt: Date;
23
32
  }
24
- export interface ContactPersonExtended extends Omit<ContactPerson, "legalRepresentative"> {
33
+ export interface ContactPersonExtended extends Omit<ContactPerson, 'legalRepresentative'> {
25
34
  legalRepresentative?: ContactPerson;
26
35
  }
27
36
  export interface CreateContactPersonDTO {
28
- entity: Omit<ContactPerson, "id" | "domainId" | "updatedAt" | "isAuthorized">;
37
+ entity: Omit<ContactPerson, 'id' | 'domainId' | 'updatedAt' | 'isAuthorized'>;
29
38
  addresses: CreateContactPersonAddressDTO[];
30
39
  }
31
- export type UpdateContactPersonDTO = Partial<Omit<ContactPerson, "id" | "domainId" | "updatedAt" | "isAuthorized">>;
40
+ export type UpdateContactPersonDTO = Partial<Omit<ContactPerson, 'id' | 'domainId' | 'updatedAt' | 'isAuthorized'>>;
32
41
  //# sourceMappingURL=person.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"person.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;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AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,CAAC,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ContactAddress, CreateContactAddressGplacesRawDTO } from "./address";
1
+ import { ContactAddress, CreateContactAddressGplacesRawDTO } from './address';
2
2
  export type ContactPersonAddress = ContactAddress;
3
3
  export interface ContactPersonAddressExtra {
4
4
  id: string;
@@ -12,9 +12,9 @@ export interface ContactPersonAddressExtra {
12
12
  updatedAt: Date;
13
13
  }
14
14
  export interface CreateContactPersonAddressDTO {
15
- entity: Omit<ContactAddress, "id" | "gplacesRawId" | "updatedAt">;
15
+ entity: Omit<ContactAddress, 'id' | 'gplacesRawId' | 'updatedAt'>;
16
16
  raw: CreateContactAddressGplacesRawDTO;
17
- extra: Omit<ContactPersonAddressExtra, "id" | "personId" | "addressId" | "updatedAt">;
17
+ extra: Omit<ContactPersonAddressExtra, 'id' | 'personId' | 'addressId' | 'updatedAt'>;
18
18
  }
19
19
  export type UpdateContactPersonAddressDTO = CreateContactPersonAddressDTO;
20
20
  //# sourceMappingURL=person_address.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"person_address.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/person_address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iCAAiC,EAAE,MAAM,WAAW,CAAC;AAE9E,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,cAAc,GAAG,WAAW,CAAC,CAAC;IAClE,GAAG,EAAE,iCAAiC,CAAC;IACvC,KAAK,EAAE,IAAI,CACT,yBAAyB,EACzB,IAAI,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAC9C,CAAC;CACH;AAED,MAAM,MAAM,6BAA6B,GAAG,6BAA6B,CAAC"}
1
+ {"version":3,"file":"person_address.d.ts","sourceRoot":"","sources":["../../../../../src/modules/contacts/persons/types/person_address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iCAAiC,EAAE,MAAM,WAAW,CAAA;AAE7E,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAA;AAEjD,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,cAAc,GAAG,WAAW,CAAC,CAAA;IACjE,GAAG,EAAE,iCAAiC,CAAA;IACtC,KAAK,EAAE,IAAI,CAAC,yBAAyB,EAAE,IAAI,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC,CAAA;CACtF;AAED,MAAM,MAAM,6BAA6B,GAAG,6BAA6B,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { HTTPClient } from '../../../utils/http';
2
+ import { AgentDomainExtended, AgentExtended } from './types';
3
+ export declare class AgentsAPI {
4
+ private readonly _httpClient;
5
+ private readonly _baseUrl;
6
+ private readonly _crud;
7
+ constructor(_httpClient: HTTPClient, _baseUrl: string);
8
+ find(query?: Record<string, unknown>): Promise<AgentExtended[]>;
9
+ getSupervisors(ids: string[]): Promise<Record<string, AgentDomainExtended[]>>;
10
+ getSubordinates(ids: string[]): Promise<Record<string, AgentDomainExtended[]>>;
11
+ }
12
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/modules/domain/agents/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5D,qBAAa,SAAS;IAIlB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;gBAGxB,WAAW,EAAE,UAAU,EACvB,QAAQ,EAAE,MAAM;IAOnC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAI/D,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;IAM7E,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;CAK/E"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentsAPI = void 0;
4
+ const utils_1 = require("../../../utils");
5
+ class AgentsAPI {
6
+ _httpClient;
7
+ _baseUrl;
8
+ _crud;
9
+ constructor(_httpClient, _baseUrl) {
10
+ this._httpClient = _httpClient;
11
+ this._baseUrl = _baseUrl;
12
+ this._crud = new utils_1.CRUD(this._httpClient, {
13
+ basePath: this._baseUrl,
14
+ });
15
+ }
16
+ find(query) {
17
+ return this._crud.find(query);
18
+ }
19
+ getSupervisors(ids) {
20
+ return this._httpClient.get(`${this._baseUrl}/supervisors`, {
21
+ agentId: ids,
22
+ });
23
+ }
24
+ getSubordinates(ids) {
25
+ return this._httpClient.get(`${this._baseUrl}/subordinates`, {
26
+ agentId: ids,
27
+ });
28
+ }
29
+ }
30
+ exports.AgentsAPI = AgentsAPI;
31
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/modules/domain/agents/api.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AAIjC,MAAa,SAAS;IAID;IACA;IAJF,KAAK,CAAqB;IAE3C,YACmB,WAAuB,EACvB,QAAgB;QADhB,gBAAW,GAAX,WAAW,CAAY;QACvB,aAAQ,GAAR,QAAQ,CAAQ;QAEjC,IAAI,CAAC,KAAK,GAAG,IAAI,YAAI,CAAgB,IAAI,CAAC,WAAW,EAAE;YACrD,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,CAAC,KAA+B;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC;IAED,cAAc,CAAC,GAAa;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,cAAc,EAAE;YAC1D,OAAO,EAAE,GAAG;SACb,CAAC,CAAA;IACJ,CAAC;IAED,eAAe,CAAC,GAAa;QAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,eAAe,EAAE;YAC3D,OAAO,EAAE,GAAG;SACb,CAAC,CAAA;IACJ,CAAC;CACF;AA3BD,8BA2BC"}
@@ -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/domain/agents/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
@@ -0,0 +1,19 @@
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("./types"), exports);
18
+ __exportStar(require("./api"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/domain/agents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,wCAAqB"}
@@ -0,0 +1,34 @@
1
+ export declare enum AgentType {
2
+ AGENT = 1,
3
+ SUPERADMIN = 2,
4
+ SYSTEM = 3
5
+ }
6
+ export interface Agent {
7
+ id: string;
8
+ email: string;
9
+ typeId: AgentType;
10
+ fullName: string;
11
+ updatedAt: Date;
12
+ }
13
+ export interface AgentDomain {
14
+ agentId: string;
15
+ domainId: string;
16
+ enabled: boolean;
17
+ isOwner: boolean;
18
+ supervisorId?: string | null;
19
+ jobTitle?: string | null;
20
+ updatedAt: Date;
21
+ }
22
+ export type AgentExtended = Omit<Agent, 'updatedAt'> & Omit<AgentDomain, 'agentId'> & {
23
+ roles: string[];
24
+ };
25
+ export type AgentDomainExtended = Omit<Agent, 'updatedAt'> & Omit<AgentDomain, 'agentId' | 'updatedAt'>;
26
+ export type CreateAgentDTO = Omit<Agent, 'id' | 'typeId' | 'updatedAt'> & {
27
+ roles: string[];
28
+ supervisorId: string;
29
+ jobTitle?: string;
30
+ };
31
+ export type UpdateAgentDTO = Partial<Pick<AgentDomainExtended, 'email' | 'fullName' | 'enabled' | 'jobTitle' | 'supervisorId'> & {
32
+ roles: string[];
33
+ }>;
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/modules/domain/agents/types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,KAAK,IAAI;IACT,UAAU,IAAI;IACd,MAAM,IAAI;CACX;AAED,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,SAAS,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,GAClD,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB,CAAA;AAEH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,WAAW,CAAC,CAAA;AAEvG,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,QAAQ,GAAG,WAAW,CAAC,GAAG;IACxE,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,cAAc,CAAC,GAAG;IAC1F,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB,CACF,CAAA"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentType = void 0;
4
+ var AgentType;
5
+ (function (AgentType) {
6
+ AgentType[AgentType["AGENT"] = 1] = "AGENT";
7
+ AgentType[AgentType["SUPERADMIN"] = 2] = "SUPERADMIN";
8
+ AgentType[AgentType["SYSTEM"] = 3] = "SYSTEM";
9
+ })(AgentType || (exports.AgentType = AgentType = {}));
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/modules/domain/agents/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,2CAAS,CAAA;IACT,qDAAc,CAAA;IACd,6CAAU,CAAA;AACZ,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB"}
@@ -0,0 +1,11 @@
1
+ import { HTTPClient } from '../../utils/http';
2
+ import { IAMAPI } from './iam';
3
+ import { AgentsAPI } from './agents/api';
4
+ export declare class DomainAPI {
5
+ private _httpClient;
6
+ private readonly _baseUrl;
7
+ constructor(_httpClient: HTTPClient, baseUrl: string);
8
+ agents(): AgentsAPI;
9
+ iam(): IAMAPI;
10
+ }
11
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/modules/domain/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,qBAAa,SAAS;IAIlB,OAAO,CAAC,WAAW;IAHrB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;gBAGvB,WAAW,EAAE,UAAU,EAC/B,OAAO,EAAE,MAAM;IAKjB,MAAM,IAAI,SAAS;IAInB,GAAG,IAAI,MAAM;CAGd"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DomainAPI = void 0;
4
+ const iam_1 = require("./iam");
5
+ const api_1 = require("./agents/api");
6
+ class DomainAPI {
7
+ _httpClient;
8
+ _baseUrl;
9
+ constructor(_httpClient, baseUrl) {
10
+ this._httpClient = _httpClient;
11
+ this._baseUrl = `${baseUrl}/domain`;
12
+ }
13
+ agents() {
14
+ return new api_1.AgentsAPI(this._httpClient, `${this._baseUrl}/agents`);
15
+ }
16
+ iam() {
17
+ return new iam_1.IAMAPI(this._httpClient, `${this._baseUrl}/iam`);
18
+ }
19
+ }
20
+ exports.DomainAPI = DomainAPI;
21
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/modules/domain/api.ts"],"names":[],"mappings":";;;AACA,+BAA8B;AAC9B,sCAAwC;AAExC,MAAa,SAAS;IAIV;IAHO,QAAQ,CAAQ;IAEjC,YACU,WAAuB,EAC/B,OAAe;QADP,gBAAW,GAAX,WAAW,CAAY;QAG/B,IAAI,CAAC,QAAQ,GAAG,GAAG,OAAO,SAAS,CAAA;IACrC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,eAAS,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,QAAQ,SAAS,CAAC,CAAA;IACnE,CAAC;IAED,GAAG;QACD,OAAO,IAAI,YAAM,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,QAAQ,MAAM,CAAC,CAAA;IAC7D,CAAC;CACF;AAjBD,8BAiBC"}
@@ -0,0 +1,15 @@
1
+ import { HTTPClient } from '../../../../utils/http';
2
+ import { AgentDomainExtended, AgentExtended, CreateAgentDTO, UpdateAgentDTO } from '../../agents';
3
+ export declare class IAMAgentsAPI {
4
+ private readonly _httpClient;
5
+ private readonly _baseUrl;
6
+ private readonly _crud;
7
+ constructor(_httpClient: HTTPClient, _baseUrl: string);
8
+ getSupervisors(id: string): Promise<AgentDomainExtended[]>;
9
+ getSubordinates(id: string): Promise<AgentDomainExtended[]>;
10
+ create(data: CreateAgentDTO): Promise<AgentExtended>;
11
+ update(id: string, data: UpdateAgentDTO): Promise<AgentExtended>;
12
+ find(query?: Record<string, unknown>): Promise<AgentExtended[]>;
13
+ regeneratePassword(id: string): Promise<string>;
14
+ }
15
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../../../src/modules/domain/iam/api/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAEjG,qBAAa,YAAY;IAIrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJ3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqD;gBAGxD,WAAW,EAAE,UAAU,EACvB,QAAQ,EAAE,MAAM;IAO7B,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAI1D,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAI3D,MAAM,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAIpD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAIhE,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAI/D,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGtD"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IAMAgentsAPI = void 0;
4
+ const utils_1 = require("../../../../utils");
5
+ class IAMAgentsAPI {
6
+ _httpClient;
7
+ _baseUrl;
8
+ _crud;
9
+ constructor(_httpClient, _baseUrl) {
10
+ this._httpClient = _httpClient;
11
+ this._baseUrl = _baseUrl;
12
+ this._crud = new utils_1.CRUD(this._httpClient, {
13
+ basePath: this._baseUrl,
14
+ });
15
+ }
16
+ async getSupervisors(id) {
17
+ return this._httpClient.get(`${this._baseUrl}/${id}/supervisors`);
18
+ }
19
+ async getSubordinates(id) {
20
+ return this._httpClient.get(`${this._baseUrl}/${id}/subordinates`);
21
+ }
22
+ async create(data) {
23
+ return this._crud.create(data);
24
+ }
25
+ async update(id, data) {
26
+ return this._crud.update(id, data);
27
+ }
28
+ async find(query) {
29
+ return this._crud.find(query);
30
+ }
31
+ async regeneratePassword(id) {
32
+ return this._httpClient.post(`${this._baseUrl}/${id}/regenerate-password`);
33
+ }
34
+ }
35
+ exports.IAMAgentsAPI = IAMAgentsAPI;
36
+ //# sourceMappingURL=agents.js.map