sgerp-frontend-lib 0.1.1 → 0.1.2

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 (255) hide show
  1. package/README.md +1 -1
  2. package/dist/connection-manager.d.ts +48 -0
  3. package/dist/connection-manager.d.ts.map +1 -0
  4. package/dist/connection-manager.js +156 -0
  5. package/dist/index.js +20 -2
  6. package/dist/locales/locale-server.d.ts +10 -0
  7. package/dist/locales/locale-server.d.ts.map +1 -0
  8. package/dist/locales/locale-server.js +49 -0
  9. package/dist/locales/locale.d.ts +23 -0
  10. package/dist/locales/locale.d.ts.map +1 -0
  11. package/dist/locales/locale.js +145 -0
  12. package/dist/locales/locale_en.d.ts.map +1 -1
  13. package/dist/locales/locale_en.js +84 -9
  14. package/dist/locales/locale_ja.d.ts.map +1 -1
  15. package/dist/locales/locale_ja.js +84 -9
  16. package/dist/locales/locale_ms.d.ts.map +1 -1
  17. package/dist/locales/locale_ms.js +84 -9
  18. package/dist/locales/useLocalization.d.ts +11 -0
  19. package/dist/locales/useLocalization.d.ts.map +1 -0
  20. package/dist/locales/useLocalization.js +64 -0
  21. package/dist/locales.d.ts +228 -0
  22. package/dist/locales.d.ts.map +1 -0
  23. package/dist/locales.js +229 -0
  24. package/dist/sgerp/api/client.d.ts +45 -0
  25. package/dist/sgerp/api/client.d.ts.map +1 -0
  26. package/dist/sgerp/api/client.js +141 -0
  27. package/dist/sgerp/client.js +341 -0
  28. package/dist/sgerp/collection.d.ts +391 -0
  29. package/dist/sgerp/collection.d.ts.map +1 -0
  30. package/dist/sgerp/collection.js +756 -0
  31. package/dist/sgerp/collections/account/user.d.ts +8 -0
  32. package/dist/sgerp/collections/account/user.d.ts.map +1 -0
  33. package/dist/sgerp/collections/account/user.js +10 -0
  34. package/dist/sgerp/collections/masstransit/building.d.ts +26 -0
  35. package/dist/sgerp/collections/masstransit/building.d.ts.map +1 -0
  36. package/dist/sgerp/collections/masstransit/building.js +53 -0
  37. package/dist/sgerp/collections/masstransit/transitstop.d.ts +15 -0
  38. package/dist/sgerp/collections/masstransit/transitstop.d.ts.map +1 -0
  39. package/dist/sgerp/collections/masstransit/transitstop.js +54 -0
  40. package/dist/sgerp/collections/masstransit/transitstopset.d.ts +10 -0
  41. package/dist/sgerp/collections/masstransit/transitstopset.d.ts.map +1 -0
  42. package/dist/sgerp/collections/masstransit/transitstopset.js +10 -0
  43. package/dist/sgerp/collections/sharing/organization-project.d.ts +11 -0
  44. package/dist/sgerp/collections/sharing/organization-project.d.ts.map +1 -0
  45. package/dist/sgerp/collections/sharing/organization-project.js +13 -0
  46. package/dist/sgerp/collections/sharing/organization.d.ts +11 -0
  47. package/dist/sgerp/collections/sharing/organization.d.ts.map +1 -0
  48. package/dist/sgerp/collections/sharing/organization.js +13 -0
  49. package/dist/sgerp/collections/sharing/pricing.d.ts +18 -0
  50. package/dist/sgerp/collections/sharing/pricing.d.ts.map +1 -0
  51. package/dist/sgerp/collections/sharing/pricing.js +23 -0
  52. package/dist/sgerp/collections/sharing/project-member.d.ts +8 -0
  53. package/dist/sgerp/collections/sharing/project-member.d.ts.map +1 -0
  54. package/dist/sgerp/collections/sharing/project-member.js +10 -0
  55. package/dist/sgerp/collections/sharing/project.d.ts +8 -0
  56. package/dist/sgerp/collections/sharing/project.d.ts.map +1 -0
  57. package/dist/sgerp/collections/sharing/project.js +10 -0
  58. package/dist/sgerp/collections/simulation/booking.d.ts +11 -0
  59. package/dist/sgerp/collections/simulation/booking.d.ts.map +1 -0
  60. package/dist/sgerp/collections/simulation/booking.js +13 -0
  61. package/dist/sgerp/collections/simulation/dataset.d.ts +14 -0
  62. package/dist/sgerp/collections/simulation/dataset.d.ts.map +1 -0
  63. package/dist/sgerp/collections/simulation/dataset.js +17 -0
  64. package/dist/sgerp/collections/simulation/driver.d.ts +12 -0
  65. package/dist/sgerp/collections/simulation/driver.d.ts.map +1 -0
  66. package/dist/sgerp/collections/simulation/driver.js +40 -0
  67. package/dist/sgerp/collections/simulation/geofence.d.ts +24 -0
  68. package/dist/sgerp/collections/simulation/geofence.d.ts.map +1 -0
  69. package/dist/sgerp/collections/simulation/geofence.js +66 -0
  70. package/dist/sgerp/collections/simulation/mapboxtoken.d.ts +18 -0
  71. package/dist/sgerp/collections/simulation/mapboxtoken.d.ts.map +1 -0
  72. package/dist/sgerp/collections/simulation/mapboxtoken.js +24 -0
  73. package/dist/sgerp/collections/simulation/node.js +13 -0
  74. package/dist/sgerp/collections/simulation/operationslocation.d.ts +28 -0
  75. package/dist/sgerp/collections/simulation/operationslocation.d.ts.map +1 -0
  76. package/dist/sgerp/collections/simulation/operationslocation.js +64 -0
  77. package/dist/sgerp/collections/simulation/operationslocationgroup.d.ts +12 -0
  78. package/dist/sgerp/collections/simulation/operationslocationgroup.d.ts.map +1 -0
  79. package/dist/sgerp/collections/simulation/operationslocationgroup.js +24 -0
  80. package/dist/sgerp/collections/simulation/routingprofile.d.ts +10 -0
  81. package/dist/sgerp/collections/simulation/routingprofile.d.ts.map +1 -0
  82. package/dist/sgerp/collections/simulation/routingprofile.js +10 -0
  83. package/dist/sgerp/collections/simulation/simulation.d.ts +12 -0
  84. package/dist/sgerp/collections/simulation/simulation.d.ts.map +1 -0
  85. package/dist/sgerp/collections/simulation/simulation.js +35 -0
  86. package/dist/sgerp/collections/simulation/simulationprocessor.d.ts +19 -0
  87. package/dist/sgerp/collections/simulation/simulationprocessor.d.ts.map +1 -0
  88. package/dist/sgerp/collections/simulation/simulationprocessor.js +27 -0
  89. package/dist/sgerp/collections/simulation/vehicle.js +13 -0
  90. package/dist/sgerp/collections/simulation/vehicletype.d.ts +11 -0
  91. package/dist/sgerp/collections/simulation/vehicletype.d.ts.map +1 -0
  92. package/dist/sgerp/collections/simulation/vehicletype.js +13 -0
  93. package/dist/sgerp/collections/sms_notify/smsscheduled.d.ts +11 -0
  94. package/dist/sgerp/collections/sms_notify/smsscheduled.d.ts.map +1 -0
  95. package/dist/sgerp/collections/sms_notify/smsscheduled.js +13 -0
  96. package/dist/sgerp/collections/transportation/passenger.d.ts +8 -0
  97. package/dist/sgerp/collections/transportation/passenger.d.ts.map +1 -0
  98. package/dist/sgerp/collections/transportation/passenger.js +10 -0
  99. package/dist/sgerp/collections/transportation/ticket.d.ts +11 -0
  100. package/dist/sgerp/collections/transportation/ticket.d.ts.map +1 -0
  101. package/dist/sgerp/collections/transportation/ticket.js +13 -0
  102. package/dist/sgerp/collections/transportation/transaction.d.ts +11 -0
  103. package/dist/sgerp/collections/transportation/transaction.d.ts.map +1 -0
  104. package/dist/sgerp/collections/transportation/transaction.js +13 -0
  105. package/dist/sgerp/constants/bulkoperations-enums.d.ts +71 -0
  106. package/dist/sgerp/constants/bulkoperations-enums.d.ts.map +1 -0
  107. package/dist/sgerp/constants/bulkoperations-enums.js +99 -0
  108. package/dist/sgerp/constants/messages-enums.d.ts +47 -0
  109. package/dist/sgerp/constants/messages-enums.d.ts.map +1 -0
  110. package/dist/sgerp/constants/messages-enums.js +67 -0
  111. package/dist/sgerp/constants/scheduling-enums.d.ts +42 -0
  112. package/dist/sgerp/constants/scheduling-enums.d.ts.map +1 -0
  113. package/dist/sgerp/constants/scheduling-enums.js +61 -0
  114. package/dist/sgerp/constants/simulation-enums.d.ts +93 -0
  115. package/dist/sgerp/constants/simulation-enums.d.ts.map +1 -0
  116. package/dist/sgerp/constants/simulation-enums.js +147 -0
  117. package/dist/sgerp/constants/solver-strategies.d.ts +75 -0
  118. package/dist/sgerp/constants/solver-strategies.d.ts.map +1 -0
  119. package/dist/sgerp/constants/solver-strategies.js +26 -0
  120. package/dist/sgerp/context/sgerp-context.js +134 -0
  121. package/dist/sgerp/domains.d.ts +47 -0
  122. package/dist/sgerp/domains.d.ts.map +1 -0
  123. package/dist/sgerp/domains.js +45 -0
  124. package/dist/sgerp/hooks/use-collection.js +122 -0
  125. package/dist/sgerp/hooks/use-live-updates.js +16 -13
  126. package/dist/sgerp/index.js +153 -0
  127. package/dist/sgerp/map-states/operations-location-state.d.ts +12 -0
  128. package/dist/sgerp/map-states/operations-location-state.d.ts.map +1 -0
  129. package/dist/sgerp/map-states/operations-location-state.js +86 -0
  130. package/dist/sgerp/routing/index.d.ts +51 -0
  131. package/dist/sgerp/routing/index.d.ts.map +1 -0
  132. package/dist/sgerp/routing/index.js +373 -0
  133. package/dist/sgerp/simulation-logic/fetchUtils.js +226 -0
  134. package/dist/sgerp/simulation-logic/index.js +27 -7
  135. package/dist/sgerp/simulation-logic/manualEditUtils.js +69 -0
  136. package/dist/sgerp/simulation-logic/mapUtils.js +58 -0
  137. package/dist/sgerp/simulation-logic/optimisticUpdateUtils.js +8 -5
  138. package/dist/sgerp/simulation-logic/referenceUtils.js +110 -0
  139. package/dist/sgerp/simulation-logic/routeCalculationUtils.js +43 -0
  140. package/dist/sgerp/simulation-logic/timeShiftUtils.js +63 -0
  141. package/dist/sgerp/types/account/user.d.ts +38 -0
  142. package/dist/sgerp/types/account/user.d.ts.map +1 -0
  143. package/dist/sgerp/types/account/user.js +2 -0
  144. package/dist/sgerp/types/bulkoperations/index.d.ts +37 -0
  145. package/dist/sgerp/types/bulkoperations/index.d.ts.map +1 -0
  146. package/dist/sgerp/types/bulkoperations/index.js +35 -0
  147. package/dist/sgerp/types/bulkoperations/vehicle-upload.d.ts +335 -0
  148. package/dist/sgerp/types/bulkoperations/vehicle-upload.d.ts.map +1 -0
  149. package/dist/sgerp/types/bulkoperations/vehicle-upload.js +49 -0
  150. package/dist/sgerp/types/config.d.ts +25 -0
  151. package/dist/sgerp/types/config.d.ts.map +1 -0
  152. package/dist/sgerp/types/config.js +2 -0
  153. package/dist/sgerp/types/geojson.d.ts +45 -0
  154. package/dist/sgerp/types/geojson.d.ts.map +1 -0
  155. package/dist/sgerp/types/geojson.js +6 -0
  156. package/dist/sgerp/types/map.d.ts +24 -0
  157. package/dist/sgerp/types/map.d.ts.map +1 -0
  158. package/dist/sgerp/types/map.js +2 -0
  159. package/dist/sgerp/types/masstransit/building.d.ts +24 -0
  160. package/dist/sgerp/types/masstransit/building.d.ts.map +1 -0
  161. package/dist/sgerp/types/masstransit/building.js +2 -0
  162. package/dist/sgerp/types/masstransit/transitstop.d.ts +35 -0
  163. package/dist/sgerp/types/masstransit/transitstop.d.ts.map +1 -0
  164. package/dist/sgerp/types/masstransit/transitstop.js +2 -0
  165. package/dist/sgerp/types/masstransit/transitstopset.d.ts +14 -0
  166. package/dist/sgerp/types/masstransit/transitstopset.d.ts.map +1 -0
  167. package/dist/sgerp/types/masstransit/transitstopset.js +2 -0
  168. package/dist/sgerp/types/sharing/organization-project.d.ts +14 -0
  169. package/dist/sgerp/types/sharing/organization-project.d.ts.map +1 -0
  170. package/dist/sgerp/types/sharing/organization-project.js +2 -0
  171. package/dist/sgerp/types/sharing/organization.d.ts +14 -0
  172. package/dist/sgerp/types/sharing/organization.d.ts.map +1 -0
  173. package/dist/sgerp/types/sharing/organization.js +2 -0
  174. package/dist/sgerp/types/sharing/pricing.d.ts +98 -0
  175. package/dist/sgerp/types/sharing/pricing.d.ts.map +1 -0
  176. package/dist/sgerp/types/sharing/pricing.js +2 -0
  177. package/dist/sgerp/types/sharing/project-member.d.ts +15 -0
  178. package/dist/sgerp/types/sharing/project-member.d.ts.map +1 -0
  179. package/dist/sgerp/types/sharing/project-member.js +2 -0
  180. package/dist/sgerp/types/sharing/project.d.ts +16 -0
  181. package/dist/sgerp/types/sharing/project.d.ts.map +1 -0
  182. package/dist/sgerp/types/sharing/project.js +2 -0
  183. package/dist/sgerp/types/simulation/booking.d.ts +128 -0
  184. package/dist/sgerp/types/simulation/booking.d.ts.map +1 -0
  185. package/dist/sgerp/types/simulation/booking.js +24 -0
  186. package/dist/sgerp/types/simulation/calculation-params.d.ts +20 -0
  187. package/dist/sgerp/types/simulation/calculation-params.d.ts.map +1 -0
  188. package/dist/sgerp/types/simulation/calculation-params.js +2 -0
  189. package/dist/sgerp/types/simulation/dataset.d.ts +16 -0
  190. package/dist/sgerp/types/simulation/dataset.d.ts.map +1 -0
  191. package/dist/sgerp/types/simulation/dataset.js +2 -0
  192. package/dist/sgerp/types/simulation/driver.d.ts +19 -0
  193. package/dist/sgerp/types/simulation/driver.d.ts.map +1 -0
  194. package/dist/sgerp/types/simulation/driver.js +2 -0
  195. package/dist/sgerp/types/simulation/geofence.d.ts +19 -0
  196. package/dist/sgerp/types/simulation/geofence.d.ts.map +1 -0
  197. package/dist/sgerp/types/simulation/geofence.js +2 -0
  198. package/dist/sgerp/types/simulation/logistics-api-settings.d.ts +98 -0
  199. package/dist/sgerp/types/simulation/logistics-api-settings.d.ts.map +1 -0
  200. package/dist/sgerp/types/simulation/logistics-api-settings.js +104 -0
  201. package/dist/sgerp/types/simulation/mapboxtoken.d.ts +13 -0
  202. package/dist/sgerp/types/simulation/mapboxtoken.d.ts.map +1 -0
  203. package/dist/sgerp/types/simulation/mapboxtoken.js +2 -0
  204. package/dist/sgerp/types/simulation/node.js +5 -2
  205. package/dist/sgerp/types/simulation/operationslocation.d.ts +40 -0
  206. package/dist/sgerp/types/simulation/operationslocation.d.ts.map +1 -0
  207. package/dist/sgerp/types/simulation/operationslocation.js +2 -0
  208. package/dist/sgerp/types/simulation/operationslocationgroup.d.ts +11 -0
  209. package/dist/sgerp/types/simulation/operationslocationgroup.d.ts.map +1 -0
  210. package/dist/sgerp/types/simulation/operationslocationgroup.js +2 -0
  211. package/dist/sgerp/types/simulation/pricing.d.ts +171 -0
  212. package/dist/sgerp/types/simulation/pricing.d.ts.map +1 -0
  213. package/dist/sgerp/types/simulation/pricing.js +2 -0
  214. package/dist/sgerp/types/simulation/route-cost-modification.d.ts +35 -0
  215. package/dist/sgerp/types/simulation/route-cost-modification.d.ts.map +1 -0
  216. package/dist/sgerp/types/simulation/route-cost-modification.js +5 -0
  217. package/dist/sgerp/types/simulation/routing-engine-settings.d.ts +42 -0
  218. package/dist/sgerp/types/simulation/routing-engine-settings.d.ts.map +1 -0
  219. package/dist/sgerp/types/simulation/routing-engine-settings.js +35 -0
  220. package/dist/sgerp/types/simulation/routingprofile.d.ts +32 -0
  221. package/dist/sgerp/types/simulation/routingprofile.d.ts.map +1 -0
  222. package/dist/sgerp/types/simulation/routingprofile.js +37 -0
  223. package/dist/sgerp/types/simulation/simulation.d.ts +120 -0
  224. package/dist/sgerp/types/simulation/simulation.d.ts.map +1 -0
  225. package/dist/sgerp/types/simulation/simulation.js +2 -0
  226. package/dist/sgerp/types/simulation/simulationprocessor.d.ts +31 -0
  227. package/dist/sgerp/types/simulation/simulationprocessor.d.ts.map +1 -0
  228. package/dist/sgerp/types/simulation/simulationprocessor.js +2 -0
  229. package/dist/sgerp/types/simulation/vehicle.js +2 -1
  230. package/dist/sgerp/types/simulation/vehicletype.d.ts +33 -0
  231. package/dist/sgerp/types/simulation/vehicletype.d.ts.map +1 -0
  232. package/dist/sgerp/types/simulation/vehicletype.js +2 -0
  233. package/dist/sgerp/types/sms_notify/smsscheduled.d.ts +36 -0
  234. package/dist/sgerp/types/sms_notify/smsscheduled.d.ts.map +1 -0
  235. package/dist/sgerp/types/sms_notify/smsscheduled.js +6 -0
  236. package/dist/sgerp/types/transportation/passenger.d.ts +49 -0
  237. package/dist/sgerp/types/transportation/passenger.d.ts.map +1 -0
  238. package/dist/sgerp/types/transportation/passenger.js +13 -0
  239. package/dist/sgerp/types/transportation/ticket.d.ts +31 -0
  240. package/dist/sgerp/types/transportation/ticket.d.ts.map +1 -0
  241. package/dist/sgerp/types/transportation/ticket.js +2 -0
  242. package/dist/sgerp/types/transportation/transaction.d.ts +71 -0
  243. package/dist/sgerp/types/transportation/transaction.d.ts.map +1 -0
  244. package/dist/sgerp/types/transportation/transaction.js +54 -0
  245. package/dist/sgerp/utils/bookingPayload.d.ts +80 -0
  246. package/dist/sgerp/utils/bookingPayload.d.ts.map +1 -0
  247. package/dist/sgerp/utils/bookingPayload.js +44 -0
  248. package/dist/sgerp/utils/color.d.ts +30 -0
  249. package/dist/sgerp/utils/color.d.ts.map +1 -0
  250. package/dist/sgerp/utils/color.js +117 -0
  251. package/dist/sgerp/utils/enum-helpers.d.ts +41 -0
  252. package/dist/sgerp/utils/enum-helpers.d.ts.map +1 -0
  253. package/dist/sgerp/utils/enum-helpers.js +54 -0
  254. package/dist/sgerp/utils/routeUtils.js +171 -0
  255. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MapboxTokenCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ class MapboxTokenCollection extends collection_1.Collection {
6
+ constructor(fetchFn) {
7
+ super(fetchFn);
8
+ }
9
+ /**
10
+ * Fetch mapbox tokens for a specific project
11
+ */
12
+ async fetchByProject(projectId) {
13
+ await this.fetch({ project_id: projectId, limit: 100 });
14
+ return this.models;
15
+ }
16
+ /**
17
+ * Find active tokens for a project
18
+ */
19
+ async fetchActiveByProject(projectId) {
20
+ await this.fetch({ project_id: projectId, is_active: true, limit: 100 });
21
+ return this.models;
22
+ }
23
+ }
24
+ exports.MapboxTokenCollection = MapboxTokenCollection;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for Node models
7
+ */
8
+ class NodeCollection extends collection_1.Collection {
9
+ constructor(fetchFn) {
10
+ super(fetchFn);
11
+ }
12
+ }
13
+ exports.NodeCollection = NodeCollection;
@@ -0,0 +1,28 @@
1
+ import { Collection } from '../../collection';
2
+ import type { OperationsLocation } from '../../types/simulation/operationslocation';
3
+ import type { Project } from '../../types/sharing/project';
4
+ import type { SGERPListResponse } from '../../types/account/user';
5
+ import type { RequestConfig } from '../../types/config';
6
+ import type { GeoJSONFeatureCollection } from '../../types/geojson';
7
+ /**
8
+ * Collection class for OperationsLocation models with automatic project data fetching
9
+ */
10
+ export declare class OperationsLocationCollection extends Collection<OperationsLocation> {
11
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<OperationsLocation>>, projectFetchFn?: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<Project>>);
12
+ /**
13
+ * Convert operations locations to GeoJSON FeatureCollection
14
+ * Each location becomes a Point feature with all location properties
15
+ *
16
+ * @returns GeoJSON FeatureCollection with Point features
17
+ *
18
+ * @example
19
+ * const geojson = collection.toGeoJSON();
20
+ * // Use with mapbox-gl
21
+ * map.addSource('locations', {
22
+ * type: 'geojson',
23
+ * data: geojson
24
+ * });
25
+ */
26
+ toGeoJSON(): GeoJSONFeatureCollection;
27
+ }
28
+ //# sourceMappingURL=operationslocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operationslocation.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/simulation/operationslocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAEpF;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,UAAU,CAAC,kBAAkB,CAAC;gBAE5E,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,EACrG,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAiBpG;;;;;;;;;;;;;OAaG;IACH,SAAS,IAAI,wBAAwB;CA2BtC"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OperationsLocationCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for OperationsLocation models with automatic project data fetching
7
+ */
8
+ class OperationsLocationCollection extends collection_1.Collection {
9
+ constructor(fetchFn, projectFetchFn) {
10
+ super(fetchFn);
11
+ // Register dependent call to fetch project data (one-to-one)
12
+ if (projectFetchFn) {
13
+ this.registerDependentCall({
14
+ collectionName: 'project',
15
+ extractIds: (location) => location.project_id,
16
+ targetField: 'project',
17
+ idParam: 'id__in',
18
+ onlyFields: ['id', 'name', 'timezone'],
19
+ fetchFn: projectFetchFn,
20
+ });
21
+ }
22
+ }
23
+ /**
24
+ * Convert operations locations to GeoJSON FeatureCollection
25
+ * Each location becomes a Point feature with all location properties
26
+ *
27
+ * @returns GeoJSON FeatureCollection with Point features
28
+ *
29
+ * @example
30
+ * const geojson = collection.toGeoJSON();
31
+ * // Use with mapbox-gl
32
+ * map.addSource('locations', {
33
+ * type: 'geojson',
34
+ * data: geojson
35
+ * });
36
+ */
37
+ toGeoJSON() {
38
+ const features = this.models.map((location) => ({
39
+ type: 'Feature',
40
+ geometry: location.point || null,
41
+ properties: {
42
+ id: location.id,
43
+ name: location.name,
44
+ code: location.code,
45
+ external_id: location.external_id,
46
+ address: location.address,
47
+ postal_code: location.postal_code,
48
+ group_id: location.group_id,
49
+ project_id: location.project_id,
50
+ h3: location.h3,
51
+ created_at: location.created_at,
52
+ modified_at: location.modified_at,
53
+ calculation_params: location.calculation_params,
54
+ data: location.data,
55
+ },
56
+ id: location.id,
57
+ }));
58
+ return {
59
+ type: 'FeatureCollection',
60
+ features,
61
+ };
62
+ }
63
+ }
64
+ exports.OperationsLocationCollection = OperationsLocationCollection;
@@ -0,0 +1,12 @@
1
+ import { Collection } from '../../collection';
2
+ import type { OperationsLocationGroup } from '../../types/simulation/operationslocationgroup';
3
+ import type { Project } from '../../types/sharing/project';
4
+ import type { SGERPListResponse } from '../../types/account/user';
5
+ import type { RequestConfig } from '../../types/config';
6
+ /**
7
+ * Collection class for OperationsLocationGroup models with automatic project data fetching
8
+ */
9
+ export declare class OperationsLocationGroupCollection extends Collection<OperationsLocationGroup> {
10
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<OperationsLocationGroup>>, projectFetchFn?: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<Project>>);
11
+ }
12
+ //# sourceMappingURL=operationslocationgroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operationslocationgroup.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/simulation/operationslocationgroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,UAAU,CAAC,uBAAuB,CAAC;gBAEtF,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC,EAC1G,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;CAgBrG"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OperationsLocationGroupCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for OperationsLocationGroup models with automatic project data fetching
7
+ */
8
+ class OperationsLocationGroupCollection extends collection_1.Collection {
9
+ constructor(fetchFn, projectFetchFn) {
10
+ super(fetchFn);
11
+ // Register dependent call to fetch project data (one-to-one)
12
+ if (projectFetchFn) {
13
+ this.registerDependentCall({
14
+ collectionName: 'project',
15
+ extractIds: (group) => group.project_id,
16
+ targetField: 'project',
17
+ idParam: 'id__in',
18
+ onlyFields: ['id', 'name', 'timezone'],
19
+ fetchFn: projectFetchFn,
20
+ });
21
+ }
22
+ }
23
+ }
24
+ exports.OperationsLocationGroupCollection = OperationsLocationGroupCollection;
@@ -0,0 +1,10 @@
1
+ import { Collection } from "../../collection";
2
+ import type { RoutingProfile } from "../../types/simulation/routingprofile";
3
+ import type { SGERPListResponse } from "../../types/account/user";
4
+ import type { RequestConfig } from "../../types/config";
5
+ type FetchFunction<T> = (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<T>>;
6
+ export declare class RoutingProfileCollection extends Collection<RoutingProfile> {
7
+ constructor(fetchFn: FetchFunction<RoutingProfile>);
8
+ }
9
+ export {};
10
+ //# sourceMappingURL=routingprofile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routingprofile.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/simulation/routingprofile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,KAAK,aAAa,CAAC,CAAC,IAAI,CACtB,MAAM,CAAC,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,aAAa,KACnB,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnC,qBAAa,wBAAyB,SAAQ,UAAU,CAAC,cAAc,CAAC;gBAC1D,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC;CAGnD"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RoutingProfileCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ class RoutingProfileCollection extends collection_1.Collection {
6
+ constructor(fetchFn) {
7
+ super(fetchFn);
8
+ }
9
+ }
10
+ exports.RoutingProfileCollection = RoutingProfileCollection;
@@ -0,0 +1,12 @@
1
+ import { Collection } from '../../collection';
2
+ import type { Simulation } from '../../types/simulation/simulation';
3
+ import type { Project } from '../../types/sharing/project';
4
+ import type { SGERPListResponse } from '../../types/account/user';
5
+ import type { RequestConfig } from '../../types/config';
6
+ /**
7
+ * Collection class for Simulation models with automatic template and project data fetching
8
+ */
9
+ export declare class SimulationCollection extends Collection<Simulation> {
10
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<Simulation>>, templateFetchFn?: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<Simulation>>, projectFetchFn?: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<Project>>);
11
+ }
12
+ //# sourceMappingURL=simulation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/simulation/simulation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,UAAU,CAAC,UAAU,CAAC;gBAE5D,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,EAC7F,eAAe,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,EACtG,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;CA4BrG"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SimulationCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for Simulation models with automatic template and project data fetching
7
+ */
8
+ class SimulationCollection extends collection_1.Collection {
9
+ constructor(fetchFn, templateFetchFn, projectFetchFn) {
10
+ super(fetchFn);
11
+ // Register dependent call to fetch template names (one-to-one)
12
+ if (templateFetchFn) {
13
+ this.registerDependentCall({
14
+ collectionName: 'simulation',
15
+ extractIds: (simulation) => simulation.template_id,
16
+ targetField: 'template',
17
+ idParam: 'id__in',
18
+ onlyFields: ['id', 'name'],
19
+ fetchFn: templateFetchFn,
20
+ });
21
+ }
22
+ // Register dependent call to fetch project names (one-to-one)
23
+ if (projectFetchFn) {
24
+ this.registerDependentCall({
25
+ collectionName: 'project',
26
+ extractIds: (simulation) => simulation.project_id,
27
+ targetField: 'project',
28
+ idParam: 'id__in',
29
+ onlyFields: ['id', 'name', 'timezone'],
30
+ fetchFn: projectFetchFn,
31
+ });
32
+ }
33
+ }
34
+ }
35
+ exports.SimulationCollection = SimulationCollection;
@@ -0,0 +1,19 @@
1
+ import { Collection } from '../../collection';
2
+ import type { SimulationProcessor } from '../../types/simulation/simulationprocessor';
3
+ import type { SGERPListResponse } from '../../types/account/user';
4
+ import type { RequestConfig } from '../../types/config';
5
+ /**
6
+ * Collection class for SimulationProcessor models
7
+ */
8
+ export declare class SimulationProcessorCollection extends Collection<SimulationProcessor> {
9
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<SimulationProcessor>>);
10
+ /**
11
+ * Get active (new or calculating) processors for a simulation
12
+ */
13
+ getActiveProcessors(simulationId: number): SimulationProcessor[];
14
+ /**
15
+ * Check if there are any active calculations
16
+ */
17
+ hasActiveCalculations(simulationId: number): boolean;
18
+ }
19
+ //# sourceMappingURL=simulationprocessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulationprocessor.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/simulation/simulationprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,UAAU,CAAC,mBAAmB,CAAC;gBAE9E,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IAKxG;;OAEG;IACH,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,mBAAmB,EAAE;IAOhE;;OAEG;IACH,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;CAGrD"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SimulationProcessorCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ const simulation_enums_1 = require("../../constants/simulation-enums");
6
+ /**
7
+ * Collection class for SimulationProcessor models
8
+ */
9
+ class SimulationProcessorCollection extends collection_1.Collection {
10
+ constructor(fetchFn) {
11
+ super(fetchFn);
12
+ }
13
+ /**
14
+ * Get active (new or calculating) processors for a simulation
15
+ */
16
+ getActiveProcessors(simulationId) {
17
+ return this.models.filter(p => p.simulation_id === simulationId &&
18
+ (p.state === simulation_enums_1.SimulationProcessorState.NEW || p.state === simulation_enums_1.SimulationProcessorState.CALCULATING));
19
+ }
20
+ /**
21
+ * Check if there are any active calculations
22
+ */
23
+ hasActiveCalculations(simulationId) {
24
+ return this.getActiveProcessors(simulationId).length > 0;
25
+ }
26
+ }
27
+ exports.SimulationProcessorCollection = SimulationProcessorCollection;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VehicleCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for Vehicle models
7
+ */
8
+ class VehicleCollection extends collection_1.Collection {
9
+ constructor(fetchFn) {
10
+ super(fetchFn);
11
+ }
12
+ }
13
+ exports.VehicleCollection = VehicleCollection;
@@ -0,0 +1,11 @@
1
+ import { Collection } from '../../collection';
2
+ import type { VehicleType } from '../../types/simulation/vehicletype';
3
+ import type { SGERPListResponse } from '../../types/account/user';
4
+ import type { RequestConfig } from '../../types/config';
5
+ /**
6
+ * Collection class for VehicleType models
7
+ */
8
+ export declare class VehicleTypeCollection extends Collection<VehicleType> {
9
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<VehicleType>>);
10
+ }
11
+ //# sourceMappingURL=vehicletype.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vehicletype.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/simulation/vehicletype.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,UAAU,CAAC,WAAW,CAAC;gBAE9D,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAIjG"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VehicleTypeCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for VehicleType models
7
+ */
8
+ class VehicleTypeCollection extends collection_1.Collection {
9
+ constructor(fetchFn) {
10
+ super(fetchFn);
11
+ }
12
+ }
13
+ exports.VehicleTypeCollection = VehicleTypeCollection;
@@ -0,0 +1,11 @@
1
+ import { Collection } from '../../collection';
2
+ import type { SMSScheduled } from '../../types/sms_notify/smsscheduled';
3
+ import type { SGERPListResponse } from '../../types/account/user';
4
+ import type { RequestConfig } from '../../types/config';
5
+ /**
6
+ * Collection class for SMSScheduled models
7
+ */
8
+ export declare class SMSScheduledCollection extends Collection<SMSScheduled> {
9
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<SMSScheduled>>);
10
+ }
11
+ //# sourceMappingURL=smsscheduled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smsscheduled.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/sms_notify/smsscheduled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,UAAU,CAAC,YAAY,CAAC;gBAEhE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;CAIlG"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SMSScheduledCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for SMSScheduled models
7
+ */
8
+ class SMSScheduledCollection extends collection_1.Collection {
9
+ constructor(fetchFn) {
10
+ super(fetchFn);
11
+ }
12
+ }
13
+ exports.SMSScheduledCollection = SMSScheduledCollection;
@@ -0,0 +1,8 @@
1
+ import { Collection } from '../../collection';
2
+ import type { Passenger } from '../../types/transportation/passenger';
3
+ /**
4
+ * Collection for Passenger models
5
+ */
6
+ export declare class PassengerCollection extends Collection<Passenger> {
7
+ }
8
+ //# sourceMappingURL=passenger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passenger.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/transportation/passenger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEtE;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,UAAU,CAAC,SAAS,CAAC;CAE7D"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PassengerCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection for Passenger models
7
+ */
8
+ class PassengerCollection extends collection_1.Collection {
9
+ }
10
+ exports.PassengerCollection = PassengerCollection;
@@ -0,0 +1,11 @@
1
+ import { Collection } from '../../collection';
2
+ import type { Ticket } from '../../types/transportation/ticket';
3
+ import type { SGERPListResponse } from '../../types/account/user';
4
+ import type { RequestConfig } from '../../types/config';
5
+ /**
6
+ * Collection class for Ticket models
7
+ */
8
+ export declare class TicketCollection extends Collection<Ticket> {
9
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<Ticket>>);
10
+ }
11
+ //# sourceMappingURL=ticket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ticket.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/transportation/ticket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,MAAM,CAAC;gBAEpD,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;CAI5F"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TicketCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for Ticket models
7
+ */
8
+ class TicketCollection extends collection_1.Collection {
9
+ constructor(fetchFn) {
10
+ super(fetchFn);
11
+ }
12
+ }
13
+ exports.TicketCollection = TicketCollection;
@@ -0,0 +1,11 @@
1
+ import { Collection } from '../../collection';
2
+ import type { Transaction } from '../../types/transportation/transaction';
3
+ import type { SGERPListResponse } from '../../types/account/user';
4
+ import type { RequestConfig } from '../../types/config';
5
+ /**
6
+ * Collection class for Transaction models
7
+ */
8
+ export declare class TransactionCollection extends Collection<Transaction> {
9
+ constructor(fetchFn: (params?: unknown, config?: RequestConfig) => Promise<SGERPListResponse<Transaction>>);
10
+ }
11
+ //# sourceMappingURL=transaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../sgerplib/sgerp/collections/transportation/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,UAAU,CAAC,WAAW,CAAC;gBAE9D,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAIjG"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionCollection = void 0;
4
+ const collection_1 = require("../../collection");
5
+ /**
6
+ * Collection class for Transaction models
7
+ */
8
+ class TransactionCollection extends collection_1.Collection {
9
+ constructor(fetchFn) {
10
+ super(fetchFn);
11
+ }
12
+ }
13
+ exports.TransactionCollection = TransactionCollection;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Bulk Operations Enums
3
+ * Ported from ~/dev/sgerp/bulkoperations/enums.py
4
+ */
5
+ /**
6
+ * Bulk task execution mode
7
+ * From bulkoperations.enums.BulkTaskExecutionMode
8
+ */
9
+ export declare const BulkTaskExecutionMode: {
10
+ readonly SYNC: "sync";
11
+ readonly ASYNC: "async";
12
+ };
13
+ export type BulkTaskExecutionModeValue = typeof BulkTaskExecutionMode[keyof typeof BulkTaskExecutionMode];
14
+ export declare const BulkTaskExecutionModeLabels: Record<BulkTaskExecutionModeValue, string>;
15
+ /**
16
+ * Bulk task status
17
+ * From bulkoperations.enums.BulkTaskStatus
18
+ */
19
+ export declare const BulkTaskStatus: {
20
+ readonly PENDING: "pending";
21
+ readonly PROCESSING: "processing";
22
+ readonly COMPLETED: "completed";
23
+ readonly FAILED: "failed";
24
+ };
25
+ export type BulkTaskStatusValue = typeof BulkTaskStatus[keyof typeof BulkTaskStatus];
26
+ export declare const BulkTaskStatusLabels: Record<BulkTaskStatusValue, string>;
27
+ /**
28
+ * Bulk task type
29
+ * From bulkoperations.enums.BulkTaskType
30
+ */
31
+ export declare const BulkTaskType: {
32
+ readonly ADD: "add";
33
+ readonly PASSENGER_UPLOAD: "passengers_upload";
34
+ readonly VEHICLE_UPLOAD: "vehicle_upload";
35
+ readonly VEHICLE_COPY: "vehicle_copy";
36
+ readonly TRUCKR_EXPORT_VEHICLES: "truckr_export_vehicles";
37
+ readonly BOOKING_UPDATE: "booking_update";
38
+ readonly VEHICLE_UPDATE: "vehicle_update";
39
+ };
40
+ export type BulkTaskTypeValue = typeof BulkTaskType[keyof typeof BulkTaskType];
41
+ export declare const BulkTaskTypeLabels: Record<BulkTaskTypeValue, string>;
42
+ /**
43
+ * Invalid vehicle upload info types
44
+ * From messages.bulkoperations.InvalidVehicleUploadInfoType
45
+ */
46
+ export declare const InvalidVehicleUploadInfoType: {
47
+ readonly INVALID_SIMULATION_TEMPLATE: "invalid_simulation_template";
48
+ readonly INVALID_SIMULATION_DATE: "invalid_simulation_date";
49
+ readonly INVALID_SIMULATION: "invalid_simulation";
50
+ readonly CONFLICTING_SIMULATIONS_FOR_TEMPLATE: "conflicting_simulations_for_template";
51
+ readonly VEHICLE_OVERLAP: "vehicle_overlap";
52
+ readonly INVALID_DRIVER_ID: "invalid_driver_id";
53
+ readonly INVALID_DRIVER_USERNAME: "invalid_driver_username";
54
+ readonly INVALID_VEHICLE_TYPE: "invalid_vehicle_type";
55
+ readonly INVALID_START_END_LOCATION_ID: "invalid_start_and_end_location_id";
56
+ readonly INVALID_DRIVER_ORGANIZATION: "invalid_organization_for_driver";
57
+ readonly INVALID_PERMISSIONS_DRIVER_ASSIGNMENT: "invalid_permissions_organization_for_driver_assignment";
58
+ };
59
+ export type InvalidVehicleUploadInfoTypeValue = typeof InvalidVehicleUploadInfoType[keyof typeof InvalidVehicleUploadInfoType];
60
+ export declare const InvalidVehicleUploadInfoTypeLabels: Record<InvalidVehicleUploadInfoTypeValue, string>;
61
+ /**
62
+ * Vehicle use option
63
+ * From simulation.agents.enums.VehicleUseOption
64
+ */
65
+ export declare const VehicleUseOption: {
66
+ readonly ENABLED: "enabled";
67
+ readonly DISABLED: "disabled";
68
+ };
69
+ export type VehicleUseOptionValue = typeof VehicleUseOption[keyof typeof VehicleUseOption];
70
+ export declare const VehicleUseOptionLabels: Record<VehicleUseOptionValue, string>;
71
+ //# sourceMappingURL=bulkoperations-enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulkoperations-enums.d.ts","sourceRoot":"","sources":["../../../sgerplib/sgerp/constants/bulkoperations-enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,OAAO,qBAAqB,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAE1G,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,0BAA0B,EAAE,MAAM,CAGlF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAErF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAKpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;CAQf,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE/E,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAQhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;CAY/B,CAAC;AAEX,MAAM,MAAM,iCAAiC,GAAG,OAAO,4BAA4B,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAE/H,eAAO,MAAM,kCAAkC,EAAE,MAAM,CAAC,iCAAiC,EAAE,MAAM,CAYhG,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3F,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAGxE,CAAC"}