@chrt-inc/typescript-sdk 0.0.183 → 0.0.186-b

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 (196) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.d.ts +6 -5
  3. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.js +12 -39
  4. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.d.ts → CreateLineItemGroupReq.d.ts} +7 -1
  5. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/PreviewLineItemGroupReq.d.ts +27 -0
  6. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.ts +2 -2
  7. package/dist/cjs/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientCreate1.d.ts +6 -6
  8. package/dist/cjs/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientUpdate1.d.ts +19 -19
  9. package/dist/cjs/api/resources/dev/client/Client.d.ts +10 -10
  10. package/dist/cjs/api/resources/dev/client/Client.js +47 -47
  11. package/dist/cjs/api/resources/drivers/client/requests/DriverCreateReq.d.ts +1 -1
  12. package/dist/cjs/api/resources/drivers/client/requests/DriverLastSeenReq.d.ts +1 -1
  13. package/dist/cjs/api/resources/drivers/client/requests/UpdateDriverDetailsReq.d.ts +5 -5
  14. package/dist/cjs/api/resources/milestones/client/requests/MilestoneAddToTaskReq.d.ts +1 -1
  15. package/dist/cjs/api/resources/milestones/client/requests/MilestoneUpdateReq.d.ts +2 -2
  16. package/dist/cjs/api/resources/milestones/resources/images/client/Client.js +1 -1
  17. package/dist/cjs/api/resources/milestones/resources/images/client/requests/BodyPostMilestonesUploadImageOortMilestonesImagesUploadMilestoneIdPost.d.ts +1 -1
  18. package/dist/cjs/api/resources/notifications/client/Client.d.ts +3 -3
  19. package/dist/cjs/api/resources/notifications/client/Client.js +3 -3
  20. package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.ts +12 -12
  21. package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.js +13 -13
  22. package/dist/cjs/api/resources/notifications/resources/index.d.ts +2 -2
  23. package/dist/cjs/api/resources/notifications/resources/index.js +3 -3
  24. package/dist/cjs/api/resources/offChrtShipperOrgConnectionInfo/client/requests/OffChrtShipperOrgConnectionInfoClientCreate1.d.ts +10 -10
  25. package/dist/cjs/api/resources/offChrtShipperOrgConnectionInfo/client/requests/OffChrtShipperOrgConnectionInfoClientUpdate1.d.ts +10 -10
  26. package/dist/cjs/api/resources/orders/client/requests/CreateOrderReq.d.ts +4 -4
  27. package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/requests/CourierOrgConnectionInfoClientCreate1.d.ts +9 -9
  28. package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/requests/CourierOrgConnectionInfoClientUpdate1.d.ts +10 -10
  29. package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/requests/ShipperOrgConnectionInfoClientCreate1.d.ts +9 -9
  30. package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/requests/ShipperOrgConnectionInfoClientUpdate1.d.ts +10 -10
  31. package/dist/cjs/api/resources/orgProfiles/client/requests/CourierOrgProfileClientUpdate3.d.ts +3 -3
  32. package/dist/cjs/api/resources/orgs/client/requests/UpdateOrgPublicDataReq.d.ts +2 -2
  33. package/dist/cjs/api/resources/payments/client/Client.d.ts +41 -0
  34. package/dist/cjs/api/resources/payments/client/Client.js +174 -0
  35. package/dist/cjs/api/resources/payments/client/requests/CreateConnectAccountLinkReq.d.ts +12 -0
  36. package/dist/cjs/api/resources/payments/client/requests/CreateDirectChargeReq.d.ts +17 -0
  37. package/dist/cjs/api/resources/payments/client/requests/index.d.ts +2 -0
  38. package/dist/cjs/api/resources/shipperContactInfo/client/requests/ShipperContactInfoClientUpdate1.d.ts +11 -11
  39. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupReq.d.ts +1 -1
  40. package/dist/cjs/api/types/Cargo1.d.ts +5 -5
  41. package/dist/cjs/api/types/CargoClientCreate1.d.ts +5 -5
  42. package/dist/cjs/api/types/CourierOrgConnectionInfo1.d.ts +10 -10
  43. package/dist/cjs/api/types/CourierPayDriverRateSheet1.d.ts +6 -6
  44. package/dist/{esm/api/types/BaseModel.d.mts → cjs/api/types/CreateConnectAccountLinkRes.d.ts} +2 -1
  45. package/dist/cjs/api/types/CreateConnectAccountRes.d.ts +6 -0
  46. package/dist/cjs/api/types/CreateDirectChargeRes.d.ts +8 -0
  47. package/dist/cjs/api/types/CreateDirectChargeRes.js +5 -0
  48. package/dist/cjs/api/types/DecodedJwtWithOrgAndUserId.d.ts +16 -16
  49. package/dist/cjs/api/types/Driver1.d.ts +10 -10
  50. package/dist/cjs/api/types/Expense1.d.ts +2 -2
  51. package/dist/cjs/api/types/LineItem1.d.ts +1 -1
  52. package/dist/cjs/api/types/LocationFeature.d.ts +17 -0
  53. package/dist/cjs/api/types/LocationFeature.js +5 -0
  54. package/dist/cjs/api/types/{FeatureInputGeometry.d.ts → LocationFeatureInputGeometry.d.ts} +2 -2
  55. package/dist/cjs/api/types/LocationFeatureInputGeometry.js +5 -0
  56. package/dist/cjs/api/types/{FeatureOutputGeometry.d.ts → LocationFeatureOutputGeometry.d.ts} +2 -2
  57. package/dist/cjs/api/types/LocationFeatureOutputGeometry.js +5 -0
  58. package/dist/cjs/api/types/LocationProperties.d.ts +11 -0
  59. package/dist/cjs/api/types/LocationProperties.js +5 -0
  60. package/dist/cjs/api/types/Milestone1.d.ts +10 -10
  61. package/dist/cjs/api/types/MilestoneClientCreate1.d.ts +1 -1
  62. package/dist/cjs/api/types/OffChrtShipperOrgConnectionInfo1.d.ts +10 -10
  63. package/dist/cjs/api/types/Order1.d.ts +8 -8
  64. package/dist/cjs/api/types/OrgMemberDetails.d.ts +3 -3
  65. package/dist/cjs/api/types/OrgMembersAndDrivers.d.ts +1 -1
  66. package/dist/cjs/api/types/OrgPublicData2.d.ts +1 -1
  67. package/dist/cjs/api/types/PayablesInvoice1.d.ts +7 -7
  68. package/dist/cjs/api/types/ReceivablesInvoice1.d.ts +7 -7
  69. package/dist/cjs/api/types/ShipperContactInfo1.d.ts +14 -14
  70. package/dist/cjs/api/types/ShipperContactInfoClientCreate1.d.ts +14 -14
  71. package/dist/cjs/api/types/ShipperOrgConnectionInfo1.d.ts +10 -10
  72. package/dist/cjs/api/types/StripeConnectInvoice1.d.ts +6 -6
  73. package/dist/cjs/api/types/Task1.d.ts +12 -12
  74. package/dist/cjs/api/types/TaskClientCreate1.d.ts +7 -7
  75. package/dist/cjs/api/types/TaskCreateBundle.d.ts +4 -4
  76. package/dist/cjs/api/types/TaskGroup1.d.ts +7 -7
  77. package/dist/cjs/api/types/UserPublicData6.d.ts +4 -3
  78. package/dist/cjs/api/types/index.d.ts +7 -4
  79. package/dist/cjs/api/types/index.js +7 -4
  80. package/dist/cjs/version.d.ts +1 -1
  81. package/dist/cjs/version.js +1 -1
  82. package/dist/esm/Client.mjs +2 -2
  83. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.d.mts +6 -5
  84. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.mjs +12 -39
  85. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.d.mts → CreateLineItemGroupReq.d.mts} +7 -1
  86. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/PreviewLineItemGroupReq.d.mts +27 -0
  87. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.mts +2 -2
  88. package/dist/esm/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientCreate1.d.mts +6 -6
  89. package/dist/esm/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientUpdate1.d.mts +19 -19
  90. package/dist/esm/api/resources/dev/client/Client.d.mts +10 -10
  91. package/dist/esm/api/resources/dev/client/Client.mjs +47 -47
  92. package/dist/esm/api/resources/drivers/client/requests/DriverCreateReq.d.mts +1 -1
  93. package/dist/esm/api/resources/drivers/client/requests/DriverLastSeenReq.d.mts +1 -1
  94. package/dist/esm/api/resources/drivers/client/requests/UpdateDriverDetailsReq.d.mts +5 -5
  95. package/dist/esm/api/resources/milestones/client/requests/MilestoneAddToTaskReq.d.mts +1 -1
  96. package/dist/esm/api/resources/milestones/client/requests/MilestoneUpdateReq.d.mts +2 -2
  97. package/dist/esm/api/resources/milestones/resources/images/client/Client.mjs +1 -1
  98. package/dist/esm/api/resources/milestones/resources/images/client/requests/BodyPostMilestonesUploadImageOortMilestonesImagesUploadMilestoneIdPost.d.mts +1 -1
  99. package/dist/esm/api/resources/notifications/client/Client.d.mts +3 -3
  100. package/dist/esm/api/resources/notifications/client/Client.mjs +3 -3
  101. package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.mts +12 -12
  102. package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.mjs +11 -11
  103. package/dist/esm/api/resources/notifications/resources/index.d.mts +2 -2
  104. package/dist/esm/api/resources/notifications/resources/index.mjs +2 -2
  105. package/dist/esm/api/resources/offChrtShipperOrgConnectionInfo/client/requests/OffChrtShipperOrgConnectionInfoClientCreate1.d.mts +10 -10
  106. package/dist/esm/api/resources/offChrtShipperOrgConnectionInfo/client/requests/OffChrtShipperOrgConnectionInfoClientUpdate1.d.mts +10 -10
  107. package/dist/esm/api/resources/orders/client/requests/CreateOrderReq.d.mts +4 -4
  108. package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/requests/CourierOrgConnectionInfoClientCreate1.d.mts +9 -9
  109. package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/requests/CourierOrgConnectionInfoClientUpdate1.d.mts +10 -10
  110. package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/requests/ShipperOrgConnectionInfoClientCreate1.d.mts +9 -9
  111. package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/requests/ShipperOrgConnectionInfoClientUpdate1.d.mts +10 -10
  112. package/dist/esm/api/resources/orgProfiles/client/requests/CourierOrgProfileClientUpdate3.d.mts +3 -3
  113. package/dist/esm/api/resources/orgs/client/requests/UpdateOrgPublicDataReq.d.mts +2 -2
  114. package/dist/esm/api/resources/payments/client/Client.d.mts +41 -0
  115. package/dist/esm/api/resources/payments/client/Client.mjs +174 -0
  116. package/dist/esm/api/resources/payments/client/requests/CreateConnectAccountLinkReq.d.mts +12 -0
  117. package/dist/esm/api/resources/payments/client/requests/CreateDirectChargeReq.d.mts +17 -0
  118. package/dist/esm/api/resources/payments/client/requests/index.d.mts +2 -0
  119. package/dist/esm/api/resources/shipperContactInfo/client/requests/ShipperContactInfoClientUpdate1.d.mts +11 -11
  120. package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupReq.d.mts +1 -1
  121. package/dist/esm/api/types/Cargo1.d.mts +5 -5
  122. package/dist/esm/api/types/CargoClientCreate1.d.mts +5 -5
  123. package/dist/esm/api/types/CourierOrgConnectionInfo1.d.mts +10 -10
  124. package/dist/esm/api/types/CourierPayDriverRateSheet1.d.mts +6 -6
  125. package/dist/{cjs/api/types/BaseModel.d.ts → esm/api/types/CreateConnectAccountLinkRes.d.mts} +2 -1
  126. package/dist/esm/api/types/CreateConnectAccountRes.d.mts +6 -0
  127. package/dist/esm/api/types/CreateDirectChargeRes.d.mts +8 -0
  128. package/dist/esm/api/types/CreateDirectChargeRes.mjs +4 -0
  129. package/dist/esm/api/types/DecodedJwtWithOrgAndUserId.d.mts +16 -16
  130. package/dist/esm/api/types/Driver1.d.mts +10 -10
  131. package/dist/esm/api/types/Expense1.d.mts +2 -2
  132. package/dist/esm/api/types/LineItem1.d.mts +1 -1
  133. package/dist/esm/api/types/LocationFeature.d.mts +17 -0
  134. package/dist/esm/api/types/LocationFeature.mjs +4 -0
  135. package/dist/esm/api/types/{FeatureInputGeometry.d.mts → LocationFeatureInputGeometry.d.mts} +2 -2
  136. package/dist/esm/api/types/LocationFeatureInputGeometry.mjs +4 -0
  137. package/dist/esm/api/types/{FeatureOutputGeometry.d.mts → LocationFeatureOutputGeometry.d.mts} +2 -2
  138. package/dist/esm/api/types/LocationFeatureOutputGeometry.mjs +4 -0
  139. package/dist/esm/api/types/LocationProperties.d.mts +11 -0
  140. package/dist/esm/api/types/LocationProperties.mjs +4 -0
  141. package/dist/esm/api/types/Milestone1.d.mts +10 -10
  142. package/dist/esm/api/types/MilestoneClientCreate1.d.mts +1 -1
  143. package/dist/esm/api/types/OffChrtShipperOrgConnectionInfo1.d.mts +10 -10
  144. package/dist/esm/api/types/Order1.d.mts +8 -8
  145. package/dist/esm/api/types/OrgMemberDetails.d.mts +3 -3
  146. package/dist/esm/api/types/OrgMembersAndDrivers.d.mts +1 -1
  147. package/dist/esm/api/types/OrgPublicData2.d.mts +1 -1
  148. package/dist/esm/api/types/PayablesInvoice1.d.mts +7 -7
  149. package/dist/esm/api/types/ReceivablesInvoice1.d.mts +7 -7
  150. package/dist/esm/api/types/ShipperContactInfo1.d.mts +14 -14
  151. package/dist/esm/api/types/ShipperContactInfoClientCreate1.d.mts +14 -14
  152. package/dist/esm/api/types/ShipperOrgConnectionInfo1.d.mts +10 -10
  153. package/dist/esm/api/types/StripeConnectInvoice1.d.mts +6 -6
  154. package/dist/esm/api/types/Task1.d.mts +12 -12
  155. package/dist/esm/api/types/TaskClientCreate1.d.mts +7 -7
  156. package/dist/esm/api/types/TaskCreateBundle.d.mts +4 -4
  157. package/dist/esm/api/types/TaskGroup1.d.mts +7 -7
  158. package/dist/esm/api/types/UserPublicData6.d.mts +4 -3
  159. package/dist/esm/api/types/index.d.mts +7 -4
  160. package/dist/esm/api/types/index.mjs +7 -4
  161. package/dist/esm/version.d.mts +1 -1
  162. package/dist/esm/version.mjs +1 -1
  163. package/package.json +1 -1
  164. package/reference.md +217 -30
  165. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.ts +0 -18
  166. package/dist/cjs/api/types/Feature.d.ts +0 -18
  167. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.mts +0 -18
  168. package/dist/esm/api/types/Feature.d.mts +0 -18
  169. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.js → CreateLineItemGroupReq.js} +0 -0
  170. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.js → PreviewLineItemGroupReq.js} +0 -0
  171. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.ts +0 -0
  172. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.js +0 -0
  173. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -0
  174. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.js +0 -0
  175. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.ts +0 -0
  176. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.js +0 -0
  177. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.d.ts +0 -0
  178. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.js +0 -0
  179. /package/dist/cjs/api/{types/BaseModel.js → resources/payments/client/requests/CreateConnectAccountLinkReq.js} +0 -0
  180. /package/dist/cjs/api/{types/Feature.js → resources/payments/client/requests/CreateDirectChargeReq.js} +0 -0
  181. /package/dist/cjs/api/types/{FeatureInputGeometry.js → CreateConnectAccountLinkRes.js} +0 -0
  182. /package/dist/cjs/api/types/{FeatureOutputGeometry.js → CreateConnectAccountRes.js} +0 -0
  183. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.mjs → CreateLineItemGroupReq.mjs} +0 -0
  184. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.mjs → PreviewLineItemGroupReq.mjs} +0 -0
  185. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.mts +0 -0
  186. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.mjs +0 -0
  187. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -0
  188. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.mjs +0 -0
  189. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.mts +0 -0
  190. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.mjs +0 -0
  191. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.d.mts +0 -0
  192. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.mjs +0 -0
  193. /package/dist/esm/api/{types/BaseModel.mjs → resources/payments/client/requests/CreateConnectAccountLinkReq.mjs} +0 -0
  194. /package/dist/esm/api/{types/Feature.mjs → resources/payments/client/requests/CreateDirectChargeReq.mjs} +0 -0
  195. /package/dist/esm/api/types/{FeatureInputGeometry.mjs → CreateConnectAccountLinkRes.mjs} +0 -0
  196. /package/dist/esm/api/types/{FeatureOutputGeometry.mjs → CreateConnectAccountRes.mjs} +0 -0
@@ -63,8 +63,8 @@ class ChrtClient {
63
63
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
66
- "X-Fern-SDK-Version": "0.0.183",
67
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.183",
66
+ "X-Fern-SDK-Version": "0.0.186-b",
67
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.186-b",
68
68
  "X-Fern-Runtime": core.RUNTIME.type,
69
69
  "X-Fern-Runtime-Version": core.RUNTIME.version,
70
70
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -37,7 +37,7 @@ export declare class CourierPayDriverLineItemGroup {
37
37
  /**
38
38
  * Previews calculated line items for a driver based on rate sheet and task group without creating the group.
39
39
  *
40
- * @param {Chrt.CourierPayDriverLineItemGroupPreviewRequest} request
40
+ * @param {Chrt.PreviewLineItemGroupReq} request
41
41
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
42
42
  *
43
43
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -45,10 +45,11 @@ export declare class CourierPayDriverLineItemGroup {
45
45
  * @example
46
46
  * await client.courierPayDriverLineItemGroup.preview({
47
47
  * courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
48
- * task_group_id: "task_group_id"
48
+ * task_group_id: "task_group_id",
49
+ * driver_id: "driver_id"
49
50
  * })
50
51
  */
51
- preview(request: Chrt.CourierPayDriverLineItemGroupPreviewRequest, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroupClientCreate1>;
52
+ preview(request: Chrt.PreviewLineItemGroupReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroupClientCreate1>;
52
53
  private __preview;
53
54
  /**
54
55
  * Retrieves a courier driver line item group by its ID.
@@ -79,7 +80,7 @@ export declare class CourierPayDriverLineItemGroup {
79
80
  /**
80
81
  * Creates a courier driver line item group by calculating items from rate sheet and task group.
81
82
  *
82
- * @param {Chrt.CourierPayDriverLineItemGroupCreateRequest} request
83
+ * @param {Chrt.CreateLineItemGroupReq} request
83
84
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
84
85
  *
85
86
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -90,7 +91,7 @@ export declare class CourierPayDriverLineItemGroup {
90
91
  * task_group_id: "task_group_id"
91
92
  * })
92
93
  */
93
- create(request: Chrt.CourierPayDriverLineItemGroupCreateRequest, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
94
+ create(request: Chrt.CreateLineItemGroupReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
94
95
  private __create;
95
96
  protected _getAuthorizationHeader(): Promise<string | undefined>;
96
97
  }
@@ -68,7 +68,7 @@ class CourierPayDriverLineItemGroup {
68
68
  /**
69
69
  * Previews calculated line items for a driver based on rate sheet and task group without creating the group.
70
70
  *
71
- * @param {Chrt.CourierPayDriverLineItemGroupPreviewRequest} request
71
+ * @param {Chrt.PreviewLineItemGroupReq} request
72
72
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
73
73
  *
74
74
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -76,7 +76,8 @@ class CourierPayDriverLineItemGroup {
76
76
  * @example
77
77
  * await client.courierPayDriverLineItemGroup.preview({
78
78
  * courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
79
- * task_group_id: "task_group_id"
79
+ * task_group_id: "task_group_id",
80
+ * driver_id: "driver_id"
80
81
  * })
81
82
  */
82
83
  preview(request, requestOptions) {
@@ -85,27 +86,13 @@ class CourierPayDriverLineItemGroup {
85
86
  __preview(request, requestOptions) {
86
87
  return __awaiter(this, void 0, void 0, function* () {
87
88
  var _a, _b, _c, _d;
88
- const { courier_pay_driver_rate_sheet_id: courierPayDriverRateSheetId, task_group_id: taskGroupId, dangerous_goods: dangerousGoods, holiday, weekend, after_hours: afterHours, } = request;
89
- const _queryParams = {};
90
- _queryParams["courier_pay_driver_rate_sheet_id"] = courierPayDriverRateSheetId;
91
- _queryParams["task_group_id"] = taskGroupId;
92
- if (dangerousGoods != null) {
93
- _queryParams["dangerous_goods"] = dangerousGoods.toString();
94
- }
95
- if (holiday != null) {
96
- _queryParams["holiday"] = holiday.toString();
97
- }
98
- if (weekend != null) {
99
- _queryParams["weekend"] = weekend.toString();
100
- }
101
- if (afterHours != null) {
102
- _queryParams["after_hours"] = afterHours.toString();
103
- }
104
89
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
105
90
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/courier_pay_driver_line_item_groups/preview"),
106
- method: "GET",
91
+ method: "POST",
107
92
  headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
108
- queryParameters: _queryParams,
93
+ contentType: "application/json",
94
+ requestType: "json",
95
+ body: request,
109
96
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
110
97
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
111
98
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -136,7 +123,7 @@ class CourierPayDriverLineItemGroup {
136
123
  rawResponse: _response.rawResponse,
137
124
  });
138
125
  case "timeout":
139
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/courier_pay_driver_line_item_groups/preview.");
126
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/courier_pay_driver_line_item_groups/preview.");
140
127
  case "unknown":
141
128
  throw new errors.ChrtError({
142
129
  message: _response.error.errorMessage,
@@ -262,7 +249,7 @@ class CourierPayDriverLineItemGroup {
262
249
  /**
263
250
  * Creates a courier driver line item group by calculating items from rate sheet and task group.
264
251
  *
265
- * @param {Chrt.CourierPayDriverLineItemGroupCreateRequest} request
252
+ * @param {Chrt.CreateLineItemGroupReq} request
266
253
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
267
254
  *
268
255
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -279,27 +266,13 @@ class CourierPayDriverLineItemGroup {
279
266
  __create(request, requestOptions) {
280
267
  return __awaiter(this, void 0, void 0, function* () {
281
268
  var _a, _b, _c, _d;
282
- const { courier_pay_driver_rate_sheet_id: courierPayDriverRateSheetId, task_group_id: taskGroupId, dangerous_goods: dangerousGoods, holiday, weekend, after_hours: afterHours, } = request;
283
- const _queryParams = {};
284
- _queryParams["courier_pay_driver_rate_sheet_id"] = courierPayDriverRateSheetId;
285
- _queryParams["task_group_id"] = taskGroupId;
286
- if (dangerousGoods != null) {
287
- _queryParams["dangerous_goods"] = dangerousGoods.toString();
288
- }
289
- if (holiday != null) {
290
- _queryParams["holiday"] = holiday.toString();
291
- }
292
- if (weekend != null) {
293
- _queryParams["weekend"] = weekend.toString();
294
- }
295
- if (afterHours != null) {
296
- _queryParams["after_hours"] = afterHours.toString();
297
- }
298
269
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
299
270
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/courier_pay_driver_line_item_groups/create"),
300
271
  method: "POST",
301
272
  headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
- queryParameters: _queryParams,
273
+ contentType: "application/json",
274
+ requestType: "json",
275
+ body: request,
303
276
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
304
277
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
305
278
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -8,11 +8,17 @@
8
8
  * task_group_id: "task_group_id"
9
9
  * }
10
10
  */
11
- export interface CourierPayDriverLineItemGroupCreateRequest {
11
+ export interface CreateLineItemGroupReq {
12
+ /** ID of the courier pay driver rate sheet */
12
13
  courier_pay_driver_rate_sheet_id: string;
14
+ /** ID of the task group */
13
15
  task_group_id: string;
16
+ /** Whether the shipment contains dangerous goods */
14
17
  dangerous_goods?: boolean;
18
+ /** Whether the delivery is on a holiday */
15
19
  holiday?: boolean;
20
+ /** Whether the delivery is on a weekend */
16
21
  weekend?: boolean;
22
+ /** Whether the delivery is after hours */
17
23
  after_hours?: boolean;
18
24
  }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
8
+ * task_group_id: "task_group_id",
9
+ * driver_id: "driver_id"
10
+ * }
11
+ */
12
+ export interface PreviewLineItemGroupReq {
13
+ /** ID of the courier pay driver rate sheet */
14
+ courier_pay_driver_rate_sheet_id: string;
15
+ /** ID of the task group */
16
+ task_group_id: string;
17
+ /** ID of the driver */
18
+ driver_id: string;
19
+ /** Whether the shipment contains dangerous goods */
20
+ dangerous_goods?: boolean;
21
+ /** Whether the delivery is on a holiday */
22
+ holiday?: boolean;
23
+ /** Whether the delivery is on a weekend */
24
+ weekend?: boolean;
25
+ /** Whether the delivery is after hours */
26
+ after_hours?: boolean;
27
+ }
@@ -1,2 +1,2 @@
1
- export { type CourierPayDriverLineItemGroupPreviewRequest } from "./CourierPayDriverLineItemGroupPreviewRequest.js";
2
- export { type CourierPayDriverLineItemGroupCreateRequest } from "./CourierPayDriverLineItemGroupCreateRequest.js";
1
+ export { type PreviewLineItemGroupReq } from "./PreviewLineItemGroupReq.js";
2
+ export { type CreateLineItemGroupReq } from "./CreateLineItemGroupReq.js";
@@ -24,14 +24,14 @@ import * as Chrt from "../../../../index.js";
24
24
  */
25
25
  export interface CourierPayDriverRateSheetClientCreate1 {
26
26
  schema_version: number;
27
- name?: string;
28
- cargo_types?: Chrt.CargoTypeEnum1[];
29
- vehicle_types?: Chrt.VehicleTypeEnum[];
30
- route_types?: Chrt.RouteTypeEnum1[];
31
- driver_ids?: string[];
27
+ name?: string | null;
28
+ cargo_types?: Chrt.CargoTypeEnum1[] | null;
29
+ vehicle_types?: Chrt.VehicleTypeEnum[] | null;
30
+ route_types?: Chrt.RouteTypeEnum1[] | null;
31
+ driver_ids?: string[] | null;
32
32
  /** Must be a string starting with `org_` */
33
33
  courier_org_id: string;
34
- comments?: string;
34
+ comments?: string | null;
35
35
  base_mileage_distance_miles: number;
36
36
  base_mileage_rate_usd_per_instance: number;
37
37
  /** applies only to the additional miles */
@@ -7,23 +7,23 @@ import * as Chrt from "../../../../index.js";
7
7
  * {}
8
8
  */
9
9
  export interface CourierPayDriverRateSheetClientUpdate1 {
10
- name?: string;
11
- cargo_types?: Chrt.CargoTypeEnum1[];
12
- vehicle_types?: Chrt.VehicleTypeEnum[];
13
- route_types?: Chrt.RouteTypeEnum1[];
14
- driver_ids?: string[];
15
- comments?: string;
16
- base_mileage_distance_miles?: number;
17
- base_mileage_rate_usd_per_instance?: number;
18
- additional_mileage_rate_usd_per_mile?: number;
19
- long_distance_surcharge_miles_before_surcharge?: number;
20
- long_distance_surcharge_rate_usd_per_mile?: number;
21
- fuel_surchage_rate_usd_per_mile?: number;
22
- wait_time_before_charge_minutes?: number;
23
- wait_time_rate_usd_per_minute?: number;
24
- extra_stop_rate_usd?: number;
25
- dangerous_goods_rate_usd_per_instance?: number;
26
- after_hours?: number;
27
- weekend?: number;
28
- holiday?: number;
10
+ name?: string | null;
11
+ cargo_types?: Chrt.CargoTypeEnum1[] | null;
12
+ vehicle_types?: Chrt.VehicleTypeEnum[] | null;
13
+ route_types?: Chrt.RouteTypeEnum1[] | null;
14
+ driver_ids?: string[] | null;
15
+ comments?: string | null;
16
+ base_mileage_distance_miles?: number | null;
17
+ base_mileage_rate_usd_per_instance?: number | null;
18
+ additional_mileage_rate_usd_per_mile?: number | null;
19
+ long_distance_surcharge_miles_before_surcharge?: number | null;
20
+ long_distance_surcharge_rate_usd_per_mile?: number | null;
21
+ fuel_surchage_rate_usd_per_mile?: number | null;
22
+ wait_time_before_charge_minutes?: number | null;
23
+ wait_time_rate_usd_per_minute?: number | null;
24
+ extra_stop_rate_usd?: number | null;
25
+ dangerous_goods_rate_usd_per_instance?: number | null;
26
+ after_hours?: number | null;
27
+ weekend?: number | null;
28
+ holiday?: number | null;
29
29
  }
@@ -58,16 +58,6 @@ export declare class Dev {
58
58
  */
59
59
  getEmail(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<string>;
60
60
  private __getEmail;
61
- /**
62
- * Returns the current GitHub PR number and commit hash for the deployment.
63
- *
64
- * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
65
- *
66
- * @example
67
- * await client.dev.getGitInfo()
68
- */
69
- getGitInfo(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Record<string, string>>;
70
- private __getGitInfo;
71
61
  /**
72
62
  * Development template endpoint that returns the authenticated user's ID for testing.
73
63
  *
@@ -95,5 +85,15 @@ export declare class Dev {
95
85
  */
96
86
  createTemplate(request: Chrt.TemplateReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.TemplateRes>;
97
87
  private __createTemplate;
88
+ /**
89
+ * Returns the current GitHub PR number and commit hash for the deployment.
90
+ *
91
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @example
94
+ * await client.dev.getGitInfo()
95
+ */
96
+ getGitInfo(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Record<string, string>>;
97
+ private __getGitInfo;
98
98
  protected _getAuthorizationHeader(): Promise<string | undefined>;
99
99
  }
@@ -203,21 +203,21 @@ class Dev {
203
203
  });
204
204
  }
205
205
  /**
206
- * Returns the current GitHub PR number and commit hash for the deployment.
206
+ * Development template endpoint that returns the authenticated user's ID for testing.
207
207
  *
208
208
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
209
209
  *
210
210
  * @example
211
- * await client.dev.getGitInfo()
211
+ * await client.dev.getTemplate()
212
212
  */
213
- getGitInfo(requestOptions) {
214
- return core.HttpResponsePromise.fromPromise(this.__getGitInfo(requestOptions));
213
+ getTemplate(requestOptions) {
214
+ return core.HttpResponsePromise.fromPromise(this.__getTemplate(requestOptions));
215
215
  }
216
- __getGitInfo(requestOptions) {
216
+ __getTemplate(requestOptions) {
217
217
  return __awaiter(this, void 0, void 0, function* () {
218
218
  var _a, _b, _c, _d;
219
219
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
220
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "dev/git_info"),
220
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "dev/template"),
221
221
  method: "GET",
222
222
  headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
223
223
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -242,7 +242,7 @@ class Dev {
242
242
  rawResponse: _response.rawResponse,
243
243
  });
244
244
  case "timeout":
245
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /dev/git_info.");
245
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /dev/template.");
246
246
  case "unknown":
247
247
  throw new errors.ChrtError({
248
248
  message: _response.error.errorMessage,
@@ -252,23 +252,33 @@ class Dev {
252
252
  });
253
253
  }
254
254
  /**
255
- * Development template endpoint that returns the authenticated user's ID for testing.
255
+ * Development template endpoint that demonstrates transaction handling and request mirroring.
256
256
  *
257
+ * @param {Chrt.TemplateReq} request
257
258
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
258
259
  *
260
+ * @throws {@link Chrt.UnprocessableEntityError}
261
+ *
259
262
  * @example
260
- * await client.dev.getTemplate()
263
+ * await client.dev.createTemplate({
264
+ * message: "message",
265
+ * number: 1,
266
+ * timestamp: "2024-01-15T09:30:00Z"
267
+ * })
261
268
  */
262
- getTemplate(requestOptions) {
263
- return core.HttpResponsePromise.fromPromise(this.__getTemplate(requestOptions));
269
+ createTemplate(request, requestOptions) {
270
+ return core.HttpResponsePromise.fromPromise(this.__createTemplate(request, requestOptions));
264
271
  }
265
- __getTemplate(requestOptions) {
272
+ __createTemplate(request, requestOptions) {
266
273
  return __awaiter(this, void 0, void 0, function* () {
267
274
  var _a, _b, _c, _d;
268
275
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
269
276
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "dev/template"),
270
- method: "GET",
277
+ method: "POST",
271
278
  headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
279
+ contentType: "application/json",
280
+ requestType: "json",
281
+ body: request,
272
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
273
283
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
274
284
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -277,11 +287,16 @@ class Dev {
277
287
  return { data: _response.body, rawResponse: _response.rawResponse };
278
288
  }
279
289
  if (_response.error.reason === "status-code") {
280
- throw new errors.ChrtError({
281
- statusCode: _response.error.statusCode,
282
- body: _response.error.body,
283
- rawResponse: _response.rawResponse,
284
- });
290
+ switch (_response.error.statusCode) {
291
+ case 422:
292
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
293
+ default:
294
+ throw new errors.ChrtError({
295
+ statusCode: _response.error.statusCode,
296
+ body: _response.error.body,
297
+ rawResponse: _response.rawResponse,
298
+ });
299
+ }
285
300
  }
286
301
  switch (_response.error.reason) {
287
302
  case "non-json":
@@ -291,7 +306,7 @@ class Dev {
291
306
  rawResponse: _response.rawResponse,
292
307
  });
293
308
  case "timeout":
294
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /dev/template.");
309
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/template.");
295
310
  case "unknown":
296
311
  throw new errors.ChrtError({
297
312
  message: _response.error.errorMessage,
@@ -301,33 +316,23 @@ class Dev {
301
316
  });
302
317
  }
303
318
  /**
304
- * Development template endpoint that demonstrates transaction handling and request mirroring.
319
+ * Returns the current GitHub PR number and commit hash for the deployment.
305
320
  *
306
- * @param {Chrt.TemplateReq} request
307
321
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
308
322
  *
309
- * @throws {@link Chrt.UnprocessableEntityError}
310
- *
311
323
  * @example
312
- * await client.dev.createTemplate({
313
- * message: "message",
314
- * number: 1,
315
- * timestamp: "2024-01-15T09:30:00Z"
316
- * })
324
+ * await client.dev.getGitInfo()
317
325
  */
318
- createTemplate(request, requestOptions) {
319
- return core.HttpResponsePromise.fromPromise(this.__createTemplate(request, requestOptions));
326
+ getGitInfo(requestOptions) {
327
+ return core.HttpResponsePromise.fromPromise(this.__getGitInfo(requestOptions));
320
328
  }
321
- __createTemplate(request, requestOptions) {
329
+ __getGitInfo(requestOptions) {
322
330
  return __awaiter(this, void 0, void 0, function* () {
323
331
  var _a, _b, _c, _d;
324
332
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
325
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "dev/template"),
326
- method: "POST",
333
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "dev/git_info"),
334
+ method: "GET",
327
335
  headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
328
- contentType: "application/json",
329
- requestType: "json",
330
- body: request,
331
336
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
332
337
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
333
338
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -336,16 +341,11 @@ class Dev {
336
341
  return { data: _response.body, rawResponse: _response.rawResponse };
337
342
  }
338
343
  if (_response.error.reason === "status-code") {
339
- switch (_response.error.statusCode) {
340
- case 422:
341
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
342
- default:
343
- throw new errors.ChrtError({
344
- statusCode: _response.error.statusCode,
345
- body: _response.error.body,
346
- rawResponse: _response.rawResponse,
347
- });
348
- }
344
+ throw new errors.ChrtError({
345
+ statusCode: _response.error.statusCode,
346
+ body: _response.error.body,
347
+ rawResponse: _response.rawResponse,
348
+ });
349
349
  }
350
350
  switch (_response.error.reason) {
351
351
  case "non-json":
@@ -355,7 +355,7 @@ class Dev {
355
355
  rawResponse: _response.rawResponse,
356
356
  });
357
357
  case "timeout":
358
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/template.");
358
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /dev/git_info.");
359
359
  case "unknown":
360
360
  throw new errors.ChrtError({
361
361
  message: _response.error.errorMessage,
@@ -13,5 +13,5 @@ import * as Chrt from "../../../../index.js";
13
13
  */
14
14
  export interface DriverCreateReq {
15
15
  org_member: Chrt.OrgMemberDetails;
16
- vehicle_types?: Chrt.VehicleTypeEnum[];
16
+ vehicle_types?: Chrt.VehicleTypeEnum[] | null;
17
17
  }
@@ -11,5 +11,5 @@ import * as Chrt from "../../../../index.js";
11
11
  * }
12
12
  */
13
13
  export interface DriverLastSeenReq {
14
- location: Chrt.Feature;
14
+ location: Chrt.LocationFeature;
15
15
  }
@@ -10,9 +10,9 @@ import * as Chrt from "../../../../index.js";
10
10
  */
11
11
  export interface UpdateDriverDetailsReq {
12
12
  driver_object_id: string;
13
- email_address_primary?: string;
14
- email_address_secondary?: string;
15
- phone_number_primary?: string;
16
- phone_number_secondary?: string;
17
- vehicle_types?: Chrt.VehicleTypeEnum[];
13
+ email_address_primary?: string | null;
14
+ email_address_secondary?: string | null;
15
+ phone_number_primary?: string | null;
16
+ phone_number_secondary?: string | null;
17
+ vehicle_types?: Chrt.VehicleTypeEnum[] | null;
18
18
  }
@@ -11,6 +11,6 @@ import * as Chrt from "../../../../index.js";
11
11
  */
12
12
  export interface MilestoneAddToTaskReq {
13
13
  task_id: string;
14
- completer_comments?: string;
14
+ completer_comments?: string | null;
15
15
  type: Chrt.MilestoneTypeEnum1;
16
16
  }
@@ -9,6 +9,6 @@
9
9
  */
10
10
  export interface MilestoneUpdateReq {
11
11
  milestone_id: string;
12
- completed?: boolean;
13
- completor_comments?: string;
12
+ completed?: boolean | null;
13
+ completor_comments?: string | null;
14
14
  }
@@ -76,7 +76,7 @@ class Images {
76
76
  return __awaiter(this, void 0, void 0, function* () {
77
77
  var _a, _b, _c, _d;
78
78
  const _queryParams = {};
79
- if (request.comments != null) {
79
+ if (request.comments !== undefined) {
80
80
  _queryParams["comments"] = request.comments;
81
81
  }
82
82
  const _request = yield core.newFormData();
@@ -9,6 +9,6 @@ import * as core from "../../../../../../../core/index.js";
9
9
  * }
10
10
  */
11
11
  export interface BodyPostMilestonesUploadImageOortMilestonesImagesUploadMilestoneIdPost {
12
- comments?: string;
12
+ comments?: string | null;
13
13
  image: core.FileLike;
14
14
  }
@@ -4,7 +4,7 @@
4
4
  import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
6
  import { Shipper } from "../resources/shipper/client/Client.js";
7
- import { CourierPreferences } from "../resources/courierPreferences/client/Client.js";
7
+ import { Courier } from "../resources/courier/client/Client.js";
8
8
  export declare namespace Notifications {
9
9
  interface Options {
10
10
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -19,8 +19,8 @@ export declare namespace Notifications {
19
19
  export declare class Notifications {
20
20
  protected readonly _options: Notifications.Options;
21
21
  protected _shipper: Shipper | undefined;
22
- protected _courierPreferences: CourierPreferences | undefined;
22
+ protected _courier: Courier | undefined;
23
23
  constructor(_options?: Notifications.Options);
24
24
  get shipper(): Shipper;
25
- get courierPreferences(): CourierPreferences;
25
+ get courier(): Courier;
26
26
  }
@@ -5,7 +5,7 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Notifications = void 0;
7
7
  const Client_js_1 = require("../resources/shipper/client/Client.js");
8
- const Client_js_2 = require("../resources/courierPreferences/client/Client.js");
8
+ const Client_js_2 = require("../resources/courier/client/Client.js");
9
9
  class Notifications {
10
10
  constructor(_options = {}) {
11
11
  this._options = _options;
@@ -14,9 +14,9 @@ class Notifications {
14
14
  var _a;
15
15
  return ((_a = this._shipper) !== null && _a !== void 0 ? _a : (this._shipper = new Client_js_1.Shipper(this._options)));
16
16
  }
17
- get courierPreferences() {
17
+ get courier() {
18
18
  var _a;
19
- return ((_a = this._courierPreferences) !== null && _a !== void 0 ? _a : (this._courierPreferences = new Client_js_2.CourierPreferences(this._options)));
19
+ return ((_a = this._courier) !== null && _a !== void 0 ? _a : (this._courier = new Client_js_2.Courier(this._options)));
20
20
  }
21
21
  }
22
22
  exports.Notifications = Notifications;