@chrt-inc/typescript-sdk 0.0.170-f → 0.0.170-h

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 (194) hide show
  1. package/README.md +11 -7
  2. package/dist/cjs/Client.d.ts +9 -12
  3. package/dist/cjs/Client.js +39 -44
  4. package/dist/cjs/api/index.d.ts +1 -1
  5. package/dist/cjs/api/index.js +1 -1
  6. package/dist/cjs/api/resources/connections/client/Client.d.ts +51 -0
  7. package/dist/cjs/api/resources/{oortConnections → connections}/client/Client.js +22 -80
  8. package/dist/cjs/api/resources/connections/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → connections}/index.js +1 -0
  10. package/dist/cjs/api/resources/{directory → connections/resources/connectionToCourier}/client/Client.d.ts +15 -13
  11. package/dist/cjs/api/resources/{directory → connections/resources/connectionToCourier}/client/Client.js +20 -18
  12. package/dist/cjs/api/resources/connections/resources/index.d.ts +2 -0
  13. package/dist/cjs/api/resources/connections/resources/index.js +41 -0
  14. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.d.ts +134 -0
  15. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/Client.js +112 -103
  16. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.d.ts +2 -0
  17. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.d.ts → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.ts} +1 -1
  18. package/dist/{esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.d.mts → cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.ts} +1 -1
  19. package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.d.ts +2 -0
  20. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.ts +4 -0
  21. package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.d.ts +24 -24
  22. package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.js +37 -37
  23. package/dist/cjs/api/resources/dev/client/Client.d.ts +3 -3
  24. package/dist/cjs/api/resources/dev/client/Client.js +4 -4
  25. package/dist/cjs/api/resources/index.d.ts +5 -9
  26. package/dist/cjs/api/resources/index.js +6 -10
  27. package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +6 -6
  28. package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +12 -12
  29. package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +6 -6
  30. package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +12 -12
  31. package/dist/cjs/api/resources/oortCourierPayDriverRateSheets/client/Client.d.ts +38 -38
  32. package/dist/cjs/api/resources/oortCourierPayDriverRateSheets/client/Client.js +65 -65
  33. package/dist/cjs/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.d.ts +10 -0
  34. package/dist/cjs/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.js +52 -0
  35. package/dist/cjs/api/resources/orgs/client/Client.d.ts +18 -18
  36. package/dist/cjs/api/resources/orgs/client/Client.js +30 -30
  37. package/dist/cjs/api/resources/payments/client/Client.d.ts +0 -8
  38. package/dist/cjs/api/resources/payments/client/Client.js +0 -47
  39. package/dist/cjs/api/resources/root/client/Client.d.ts +15 -34
  40. package/dist/cjs/api/resources/root/client/Client.js +20 -116
  41. package/dist/cjs/api/resources/root/index.d.ts +0 -1
  42. package/dist/cjs/api/resources/root/index.js +0 -1
  43. package/dist/cjs/api/resources/users/client/Client.d.ts +3 -3
  44. package/dist/cjs/api/resources/users/client/Client.js +4 -4
  45. package/dist/cjs/api/types/index.d.ts +0 -2
  46. package/dist/cjs/api/types/index.js +0 -2
  47. package/dist/cjs/version.d.ts +1 -1
  48. package/dist/cjs/version.js +1 -1
  49. package/dist/esm/Client.d.mts +9 -12
  50. package/dist/esm/Client.mjs +11 -16
  51. package/dist/esm/api/index.d.mts +1 -1
  52. package/dist/esm/api/index.mjs +1 -1
  53. package/dist/esm/api/resources/connections/client/Client.d.mts +51 -0
  54. package/dist/esm/api/resources/{oortConnections → connections}/client/Client.mjs +20 -78
  55. package/dist/esm/api/resources/connections/index.d.mts +2 -0
  56. package/dist/esm/api/resources/connections/index.mjs +2 -0
  57. package/dist/esm/api/resources/{directory → connections/resources/connectionToCourier}/client/Client.d.mts +15 -13
  58. package/dist/esm/api/resources/{directory → connections/resources/connectionToCourier}/client/Client.mjs +18 -16
  59. package/dist/esm/api/resources/connections/resources/index.d.mts +2 -0
  60. package/dist/esm/api/resources/connections/resources/index.mjs +2 -0
  61. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.d.mts +134 -0
  62. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/Client.mjs +110 -101
  63. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.d.mts +2 -0
  64. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.d.mts → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.mts} +1 -1
  65. package/dist/{cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.d.ts → esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.mts} +1 -1
  66. package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.d.mts +2 -0
  67. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.mts +4 -0
  68. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.mjs +1 -0
  69. package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.d.mts +24 -24
  70. package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/Client.mjs +35 -35
  71. package/dist/esm/api/resources/courierPayDriverPayouts/client/requests/index.mjs +1 -0
  72. package/dist/esm/api/resources/dev/client/Client.d.mts +3 -3
  73. package/dist/esm/api/resources/dev/client/Client.mjs +4 -4
  74. package/dist/esm/api/resources/index.d.mts +5 -9
  75. package/dist/esm/api/resources/index.mjs +5 -9
  76. package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +6 -6
  77. package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +12 -12
  78. package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +6 -6
  79. package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +12 -12
  80. package/dist/esm/api/resources/oortCourierPayDriverRateSheets/client/Client.d.mts +38 -38
  81. package/dist/esm/api/resources/oortCourierPayDriverRateSheets/client/Client.mjs +65 -65
  82. package/dist/esm/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.d.mts +10 -0
  83. package/dist/esm/api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.mjs +52 -0
  84. package/dist/esm/api/resources/orgs/client/Client.d.mts +18 -18
  85. package/dist/esm/api/resources/orgs/client/Client.mjs +30 -30
  86. package/dist/esm/api/resources/payments/client/Client.d.mts +0 -8
  87. package/dist/esm/api/resources/payments/client/Client.mjs +0 -47
  88. package/dist/esm/api/resources/root/client/Client.d.mts +15 -34
  89. package/dist/esm/api/resources/root/client/Client.mjs +20 -116
  90. package/dist/esm/api/resources/root/index.d.mts +0 -1
  91. package/dist/esm/api/resources/root/index.mjs +0 -1
  92. package/dist/esm/api/resources/users/client/Client.d.mts +3 -3
  93. package/dist/esm/api/resources/users/client/Client.mjs +4 -4
  94. package/dist/esm/api/types/index.d.mts +0 -2
  95. package/dist/esm/api/types/index.mjs +0 -2
  96. package/dist/esm/version.d.mts +1 -1
  97. package/dist/esm/version.mjs +1 -1
  98. package/package.json +1 -1
  99. package/reference.md +246 -391
  100. package/dist/cjs/api/resources/directory/client/requests/DbQueryParams.d.ts +0 -12
  101. package/dist/cjs/api/resources/directory/client/requests/index.d.ts +0 -1
  102. package/dist/cjs/api/resources/oortConnections/client/Client.d.ts +0 -63
  103. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/Client.d.ts +0 -136
  104. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.js +0 -5
  105. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.d.ts +0 -12
  106. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.js +0 -5
  107. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.d.ts +0 -12
  108. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.js +0 -5
  109. package/dist/cjs/api/resources/oortCourierPayDriverLineItemGroups/client/requests/index.d.ts +0 -6
  110. package/dist/cjs/api/resources/oortCourierPayDriverPayouts/client/index.d.ts +0 -2
  111. package/dist/cjs/api/resources/oortCourierPayDriverPayouts/client/index.js +0 -17
  112. package/dist/cjs/api/resources/oortCourierPayDriverPayouts/index.d.ts +0 -1
  113. package/dist/cjs/api/resources/root/types/PydanticResponse.d.ts +0 -8
  114. package/dist/cjs/api/resources/root/types/PydanticResponse.js +0 -5
  115. package/dist/cjs/api/resources/root/types/index.d.ts +0 -1
  116. package/dist/cjs/api/resources/root/types/index.js +0 -17
  117. package/dist/cjs/api/types/Shipper2.d.ts +0 -20
  118. package/dist/cjs/api/types/Shipper2.js +0 -5
  119. package/dist/cjs/api/types/StreetAddress1.d.ts +0 -18
  120. package/dist/cjs/api/types/StreetAddress1.js +0 -5
  121. package/dist/esm/api/resources/directory/client/requests/DbQueryParams.d.mts +0 -12
  122. package/dist/esm/api/resources/directory/client/requests/index.d.mts +0 -1
  123. package/dist/esm/api/resources/oortConnections/client/Client.d.mts +0 -63
  124. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/Client.d.mts +0 -136
  125. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCalculateCourierPayDriverLineItemGroupRequest.mjs +0 -4
  126. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.d.mts +0 -12
  127. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByIdRequest.mjs +0 -4
  128. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.d.mts +0 -12
  129. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/GetCourierPayDriverLineItemGroupByTaskGroupIdRequest.mjs +0 -4
  130. package/dist/esm/api/resources/oortCourierPayDriverLineItemGroups/client/requests/index.d.mts +0 -6
  131. package/dist/esm/api/resources/oortCourierPayDriverPayouts/client/index.d.mts +0 -2
  132. package/dist/esm/api/resources/oortCourierPayDriverPayouts/client/index.mjs +0 -1
  133. package/dist/esm/api/resources/oortCourierPayDriverPayouts/index.d.mts +0 -1
  134. package/dist/esm/api/resources/oortCourierPayDriverPayouts/index.mjs +0 -1
  135. package/dist/esm/api/resources/root/types/PydanticResponse.d.mts +0 -8
  136. package/dist/esm/api/resources/root/types/PydanticResponse.mjs +0 -4
  137. package/dist/esm/api/resources/root/types/index.d.mts +0 -1
  138. package/dist/esm/api/resources/root/types/index.mjs +0 -1
  139. package/dist/esm/api/types/Shipper2.d.mts +0 -20
  140. package/dist/esm/api/types/Shipper2.mjs +0 -4
  141. package/dist/esm/api/types/StreetAddress1.d.mts +0 -18
  142. package/dist/esm/api/types/StreetAddress1.mjs +0 -4
  143. /package/dist/{esm/api/resources/directory/client/requests/index.mjs → cjs/api/resources/connections/client/index.d.ts} +0 -0
  144. /package/dist/cjs/api/resources/{directory/client/requests → connections/client}/index.js +0 -0
  145. /package/dist/cjs/api/resources/{directory → connections/resources/connectionToCourier}/client/index.d.ts +0 -0
  146. /package/dist/cjs/api/resources/{directory → connections/resources/connectionToCourier}/client/index.js +0 -0
  147. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.d.ts +0 -0
  148. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.js +0 -0
  149. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/index.d.ts +0 -0
  150. /package/dist/cjs/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/index.js +0 -0
  151. /package/dist/cjs/api/resources/{directory → connections/resources/connectionToCourier}/index.d.ts +0 -0
  152. /package/dist/cjs/api/resources/{directory → connections/resources/connectionToCourier}/index.js +0 -0
  153. /package/dist/cjs/api/resources/{oortConnections → courierPayDriverLineItemGroup}/client/index.d.ts +0 -0
  154. /package/dist/cjs/api/resources/{oortConnections → courierPayDriverLineItemGroup}/client/index.js +0 -0
  155. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.js +0 -0
  156. /package/dist/cjs/api/resources/{directory/client/requests/DbQueryParams.js → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.js} +0 -0
  157. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.js → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.js} +0 -0
  158. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.js +0 -0
  159. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/index.js +0 -0
  160. /package/dist/cjs/api/resources/{oortConnections → courierPayDriverLineItemGroup}/index.d.ts +0 -0
  161. /package/dist/cjs/api/resources/{oortConnections → courierPayDriverLineItemGroup}/index.js +0 -0
  162. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/client/index.d.ts +0 -0
  163. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/client/index.js +0 -0
  164. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.d.ts +0 -0
  165. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.js +0 -0
  166. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/index.d.ts +0 -0
  167. /package/dist/cjs/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/index.js +0 -0
  168. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/index.d.ts +0 -0
  169. /package/dist/cjs/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/index.js +0 -0
  170. /package/dist/esm/api/resources/{oortConnections/client/requests/index.mjs → connections/client/index.d.mts} +0 -0
  171. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups/client/requests → connections/client}/index.mjs +0 -0
  172. /package/dist/esm/api/resources/{directory → connections/resources/connectionToCourier}/client/index.d.mts +0 -0
  173. /package/dist/esm/api/resources/{directory → connections/resources/connectionToCourier}/client/index.mjs +0 -0
  174. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.d.mts +0 -0
  175. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/CreateConnectionReq.mjs +0 -0
  176. /package/dist/esm/api/resources/{oortConnections → connections/resources/connectionToCourier}/client/requests/index.d.mts +0 -0
  177. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → connections/resources/connectionToCourier}/client/requests/index.mjs +0 -0
  178. /package/dist/esm/api/resources/{directory → connections/resources/connectionToCourier}/index.d.mts +0 -0
  179. /package/dist/esm/api/resources/{directory → connections/resources/connectionToCourier}/index.mjs +0 -0
  180. /package/dist/esm/api/resources/{oortConnections → courierPayDriverLineItemGroup}/client/index.d.mts +0 -0
  181. /package/dist/esm/api/resources/{oortConnections → courierPayDriverLineItemGroup}/client/index.mjs +0 -0
  182. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/AddLineItemsReq.mjs +0 -0
  183. /package/dist/esm/api/resources/{directory/client/requests/DbQueryParams.mjs → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.mjs} +0 -0
  184. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups/client/requests/CreateCourierPayDriverLineItemGroupRequest.mjs → courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.mjs} +0 -0
  185. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverLineItemGroup}/client/requests/RemoveLineItemsReq.mjs +0 -0
  186. /package/dist/esm/api/resources/{oortConnections → courierPayDriverLineItemGroup}/index.d.mts +0 -0
  187. /package/dist/esm/api/resources/{oortConnections → courierPayDriverLineItemGroup}/index.mjs +0 -0
  188. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/client/index.d.mts +0 -0
  189. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/client/index.mjs +0 -0
  190. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.d.mts +0 -0
  191. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/CourierPayDriverPayoutClientCreate1.mjs +0 -0
  192. /package/dist/esm/api/resources/{oortCourierPayDriverPayouts → courierPayDriverPayouts}/client/requests/index.d.mts +0 -0
  193. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/index.d.mts +0 -0
  194. /package/dist/esm/api/resources/{oortCourierPayDriverLineItemGroups → courierPayDriverPayouts}/index.mjs +0 -0
package/README.md CHANGED
@@ -23,7 +23,11 @@ Instantiate and use the client with the following:
23
23
  import { ChrtClient } from "@chrt-inc/typescript-sdk";
24
24
 
25
25
  const client = new ChrtClient({ token: "YOUR_TOKEN" });
26
- await client.root.postAuthd();
26
+ await client.dev.createTemplate({
27
+ message: "message",
28
+ number: 1,
29
+ timestamp: "2024-01-15T09:30:00Z",
30
+ });
27
31
  ```
28
32
 
29
33
  ## Request And Response Types
@@ -48,7 +52,7 @@ will be thrown.
48
52
  import { ChrtError } from "@chrt-inc/typescript-sdk";
49
53
 
50
54
  try {
51
- await client.root.postAuthd(...);
55
+ await client.dev.createTemplate(...);
52
56
  } catch (err) {
53
57
  if (err instanceof ChrtError) {
54
58
  console.log(err.statusCode);
@@ -66,7 +70,7 @@ try {
66
70
  If you would like to send additional headers as part of the request, use the `headers` request option.
67
71
 
68
72
  ```typescript
69
- const response = await client.root.postAuthd(..., {
73
+ const response = await client.dev.createTemplate(..., {
70
74
  headers: {
71
75
  'X-Custom-Header': 'custom value'
72
76
  }
@@ -88,7 +92,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
88
92
  Use the `maxRetries` request option to configure this behavior.
89
93
 
90
94
  ```typescript
91
- const response = await client.root.postAuthd(..., {
95
+ const response = await client.dev.createTemplate(..., {
92
96
  maxRetries: 0 // override maxRetries at the request level
93
97
  });
94
98
  ```
@@ -98,7 +102,7 @@ const response = await client.root.postAuthd(..., {
98
102
  The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
99
103
 
100
104
  ```typescript
101
- const response = await client.root.postAuthd(..., {
105
+ const response = await client.dev.createTemplate(..., {
102
106
  timeoutInSeconds: 30 // override timeout to 30s
103
107
  });
104
108
  ```
@@ -109,7 +113,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
109
113
 
110
114
  ```typescript
111
115
  const controller = new AbortController();
112
- const response = await client.root.postAuthd(..., {
116
+ const response = await client.dev.createTemplate(..., {
113
117
  abortSignal: controller.signal
114
118
  });
115
119
  controller.abort(); // aborts the request
@@ -121,7 +125,7 @@ The SDK provides access to raw response data, including headers, through the `.w
121
125
  The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
122
126
 
123
127
  ```typescript
124
- const { data, rawResponse } = await client.root.postAuthd(...).withRawResponse();
128
+ const { data, rawResponse } = await client.dev.createTemplate(...).withRawResponse();
125
129
 
126
130
  console.log(data);
127
131
  console.log(rawResponse.headers['X-My-Header']);
@@ -5,10 +5,9 @@ import * as environments from "./environments.js";
5
5
  import * as core from "./core/index.js";
6
6
  import { Root } from "./api/resources/root/client/Client.js";
7
7
  import { Dev } from "./api/resources/dev/client/Client.js";
8
- import { Directory } from "./api/resources/directory/client/Client.js";
9
- import { OortConnections } from "./api/resources/oortConnections/client/Client.js";
10
- import { OortCourierPayDriverLineItemGroups } from "./api/resources/oortCourierPayDriverLineItemGroups/client/Client.js";
11
- import { OortCourierPayDriverPayouts } from "./api/resources/oortCourierPayDriverPayouts/client/Client.js";
8
+ import { Connections } from "./api/resources/connections/client/Client.js";
9
+ import { CourierPayDriverLineItemGroup } from "./api/resources/courierPayDriverLineItemGroup/client/Client.js";
10
+ import { CourierPayDriverPayouts } from "./api/resources/courierPayDriverPayouts/client/Client.js";
12
11
  import { OortCourierPayDriverRateSheets } from "./api/resources/oortCourierPayDriverRateSheets/client/Client.js";
13
12
  import { OortDrivers } from "./api/resources/oortDrivers/client/Client.js";
14
13
  import { OortMilestoneNotificationPreferences } from "./api/resources/oortMilestoneNotificationPreferences/client/Client.js";
@@ -48,10 +47,9 @@ export declare class ChrtClient {
48
47
  protected readonly _options: ChrtClient.Options;
49
48
  protected _root: Root | undefined;
50
49
  protected _dev: Dev | undefined;
51
- protected _directory: Directory | undefined;
52
- protected _oortConnections: OortConnections | undefined;
53
- protected _oortCourierPayDriverLineItemGroups: OortCourierPayDriverLineItemGroups | undefined;
54
- protected _oortCourierPayDriverPayouts: OortCourierPayDriverPayouts | undefined;
50
+ protected _connections: Connections | undefined;
51
+ protected _courierPayDriverLineItemGroup: CourierPayDriverLineItemGroup | undefined;
52
+ protected _courierPayDriverPayouts: CourierPayDriverPayouts | undefined;
55
53
  protected _oortCourierPayDriverRateSheets: OortCourierPayDriverRateSheets | undefined;
56
54
  protected _oortDrivers: OortDrivers | undefined;
57
55
  protected _oortMilestoneNotificationPreferences: OortMilestoneNotificationPreferences | undefined;
@@ -69,10 +67,9 @@ export declare class ChrtClient {
69
67
  constructor(_options?: ChrtClient.Options);
70
68
  get root(): Root;
71
69
  get dev(): Dev;
72
- get directory(): Directory;
73
- get oortConnections(): OortConnections;
74
- get oortCourierPayDriverLineItemGroups(): OortCourierPayDriverLineItemGroups;
75
- get oortCourierPayDriverPayouts(): OortCourierPayDriverPayouts;
70
+ get connections(): Connections;
71
+ get courierPayDriverLineItemGroup(): CourierPayDriverLineItemGroup;
72
+ get courierPayDriverPayouts(): CourierPayDriverPayouts;
76
73
  get oortCourierPayDriverRateSheets(): OortCourierPayDriverRateSheets;
77
74
  get oortDrivers(): OortDrivers;
78
75
  get oortMilestoneNotificationPreferences(): OortMilestoneNotificationPreferences;
@@ -41,31 +41,30 @@ const core = __importStar(require("./core/index.js"));
41
41
  const headers_js_1 = require("./core/headers.js");
42
42
  const Client_js_1 = require("./api/resources/root/client/Client.js");
43
43
  const Client_js_2 = require("./api/resources/dev/client/Client.js");
44
- const Client_js_3 = require("./api/resources/directory/client/Client.js");
45
- const Client_js_4 = require("./api/resources/oortConnections/client/Client.js");
46
- const Client_js_5 = require("./api/resources/oortCourierPayDriverLineItemGroups/client/Client.js");
47
- const Client_js_6 = require("./api/resources/oortCourierPayDriverPayouts/client/Client.js");
48
- const Client_js_7 = require("./api/resources/oortCourierPayDriverRateSheets/client/Client.js");
49
- const Client_js_8 = require("./api/resources/oortDrivers/client/Client.js");
50
- const Client_js_9 = require("./api/resources/oortMilestoneNotificationPreferences/client/Client.js");
51
- const Client_js_10 = require("./api/resources/oortMilestones/client/Client.js");
52
- const Client_js_11 = require("./api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.js");
53
- const Client_js_12 = require("./api/resources/oortOrders/client/Client.js");
54
- const Client_js_13 = require("./api/resources/oortOrgConnectionInfos/client/Client.js");
55
- const Client_js_14 = require("./api/resources/oortOrgProfiles/client/Client.js");
56
- const Client_js_15 = require("./api/resources/oortShipperContactInfo/client/Client.js");
57
- const Client_js_16 = require("./api/resources/oortTaskGroups/client/Client.js");
58
- const Client_js_17 = require("./api/resources/orgs/client/Client.js");
59
- const Client_js_18 = require("./api/resources/payments/client/Client.js");
60
- const Client_js_19 = require("./api/resources/users/client/Client.js");
61
- const Client_js_20 = require("./api/resources/notifications/client/Client.js");
44
+ const Client_js_3 = require("./api/resources/connections/client/Client.js");
45
+ const Client_js_4 = require("./api/resources/courierPayDriverLineItemGroup/client/Client.js");
46
+ const Client_js_5 = require("./api/resources/courierPayDriverPayouts/client/Client.js");
47
+ const Client_js_6 = require("./api/resources/oortCourierPayDriverRateSheets/client/Client.js");
48
+ const Client_js_7 = require("./api/resources/oortDrivers/client/Client.js");
49
+ const Client_js_8 = require("./api/resources/oortMilestoneNotificationPreferences/client/Client.js");
50
+ const Client_js_9 = require("./api/resources/oortMilestones/client/Client.js");
51
+ const Client_js_10 = require("./api/resources/oortOffChrtShipperOrgConnectionInfo/client/Client.js");
52
+ const Client_js_11 = require("./api/resources/oortOrders/client/Client.js");
53
+ const Client_js_12 = require("./api/resources/oortOrgConnectionInfos/client/Client.js");
54
+ const Client_js_13 = require("./api/resources/oortOrgProfiles/client/Client.js");
55
+ const Client_js_14 = require("./api/resources/oortShipperContactInfo/client/Client.js");
56
+ const Client_js_15 = require("./api/resources/oortTaskGroups/client/Client.js");
57
+ const Client_js_16 = require("./api/resources/orgs/client/Client.js");
58
+ const Client_js_17 = require("./api/resources/payments/client/Client.js");
59
+ const Client_js_18 = require("./api/resources/users/client/Client.js");
60
+ const Client_js_19 = require("./api/resources/notifications/client/Client.js");
62
61
  class ChrtClient {
63
62
  constructor(_options = {}) {
64
63
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
65
64
  "X-Fern-Language": "JavaScript",
66
65
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
67
- "X-Fern-SDK-Version": "0.0.170-f",
68
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.170-f",
66
+ "X-Fern-SDK-Version": "0.0.170-h",
67
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.170-h",
69
68
  "X-Fern-Runtime": core.RUNTIME.type,
70
69
  "X-Fern-Runtime-Version": core.RUNTIME.version,
71
70
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -78,77 +77,73 @@ class ChrtClient {
78
77
  var _a;
79
78
  return ((_a = this._dev) !== null && _a !== void 0 ? _a : (this._dev = new Client_js_2.Dev(this._options)));
80
79
  }
81
- get directory() {
80
+ get connections() {
82
81
  var _a;
83
- return ((_a = this._directory) !== null && _a !== void 0 ? _a : (this._directory = new Client_js_3.Directory(this._options)));
82
+ return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_js_3.Connections(this._options)));
84
83
  }
85
- get oortConnections() {
84
+ get courierPayDriverLineItemGroup() {
86
85
  var _a;
87
- return ((_a = this._oortConnections) !== null && _a !== void 0 ? _a : (this._oortConnections = new Client_js_4.OortConnections(this._options)));
86
+ return ((_a = this._courierPayDriverLineItemGroup) !== null && _a !== void 0 ? _a : (this._courierPayDriverLineItemGroup = new Client_js_4.CourierPayDriverLineItemGroup(this._options)));
88
87
  }
89
- get oortCourierPayDriverLineItemGroups() {
88
+ get courierPayDriverPayouts() {
90
89
  var _a;
91
- return ((_a = this._oortCourierPayDriverLineItemGroups) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverLineItemGroups = new Client_js_5.OortCourierPayDriverLineItemGroups(this._options)));
92
- }
93
- get oortCourierPayDriverPayouts() {
94
- var _a;
95
- return ((_a = this._oortCourierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverPayouts = new Client_js_6.OortCourierPayDriverPayouts(this._options)));
90
+ return ((_a = this._courierPayDriverPayouts) !== null && _a !== void 0 ? _a : (this._courierPayDriverPayouts = new Client_js_5.CourierPayDriverPayouts(this._options)));
96
91
  }
97
92
  get oortCourierPayDriverRateSheets() {
98
93
  var _a;
99
- return ((_a = this._oortCourierPayDriverRateSheets) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverRateSheets = new Client_js_7.OortCourierPayDriverRateSheets(this._options)));
94
+ return ((_a = this._oortCourierPayDriverRateSheets) !== null && _a !== void 0 ? _a : (this._oortCourierPayDriverRateSheets = new Client_js_6.OortCourierPayDriverRateSheets(this._options)));
100
95
  }
101
96
  get oortDrivers() {
102
97
  var _a;
103
- return ((_a = this._oortDrivers) !== null && _a !== void 0 ? _a : (this._oortDrivers = new Client_js_8.OortDrivers(this._options)));
98
+ return ((_a = this._oortDrivers) !== null && _a !== void 0 ? _a : (this._oortDrivers = new Client_js_7.OortDrivers(this._options)));
104
99
  }
105
100
  get oortMilestoneNotificationPreferences() {
106
101
  var _a;
107
- return ((_a = this._oortMilestoneNotificationPreferences) !== null && _a !== void 0 ? _a : (this._oortMilestoneNotificationPreferences = new Client_js_9.OortMilestoneNotificationPreferences(this._options)));
102
+ return ((_a = this._oortMilestoneNotificationPreferences) !== null && _a !== void 0 ? _a : (this._oortMilestoneNotificationPreferences = new Client_js_8.OortMilestoneNotificationPreferences(this._options)));
108
103
  }
109
104
  get oortMilestones() {
110
105
  var _a;
111
- return ((_a = this._oortMilestones) !== null && _a !== void 0 ? _a : (this._oortMilestones = new Client_js_10.OortMilestones(this._options)));
106
+ return ((_a = this._oortMilestones) !== null && _a !== void 0 ? _a : (this._oortMilestones = new Client_js_9.OortMilestones(this._options)));
112
107
  }
113
108
  get oortOffChrtShipperOrgConnectionInfo() {
114
109
  var _a;
115
- return ((_a = this._oortOffChrtShipperOrgConnectionInfo) !== null && _a !== void 0 ? _a : (this._oortOffChrtShipperOrgConnectionInfo = new Client_js_11.OortOffChrtShipperOrgConnectionInfo(this._options)));
110
+ return ((_a = this._oortOffChrtShipperOrgConnectionInfo) !== null && _a !== void 0 ? _a : (this._oortOffChrtShipperOrgConnectionInfo = new Client_js_10.OortOffChrtShipperOrgConnectionInfo(this._options)));
116
111
  }
117
112
  get oortOrders() {
118
113
  var _a;
119
- return ((_a = this._oortOrders) !== null && _a !== void 0 ? _a : (this._oortOrders = new Client_js_12.OortOrders(this._options)));
114
+ return ((_a = this._oortOrders) !== null && _a !== void 0 ? _a : (this._oortOrders = new Client_js_11.OortOrders(this._options)));
120
115
  }
121
116
  get oortOrgConnectionInfos() {
122
117
  var _a;
123
- return ((_a = this._oortOrgConnectionInfos) !== null && _a !== void 0 ? _a : (this._oortOrgConnectionInfos = new Client_js_13.OortOrgConnectionInfos(this._options)));
118
+ return ((_a = this._oortOrgConnectionInfos) !== null && _a !== void 0 ? _a : (this._oortOrgConnectionInfos = new Client_js_12.OortOrgConnectionInfos(this._options)));
124
119
  }
125
120
  get oortOrgProfiles() {
126
121
  var _a;
127
- return ((_a = this._oortOrgProfiles) !== null && _a !== void 0 ? _a : (this._oortOrgProfiles = new Client_js_14.OortOrgProfiles(this._options)));
122
+ return ((_a = this._oortOrgProfiles) !== null && _a !== void 0 ? _a : (this._oortOrgProfiles = new Client_js_13.OortOrgProfiles(this._options)));
128
123
  }
129
124
  get oortShipperContactInfo() {
130
125
  var _a;
131
- return ((_a = this._oortShipperContactInfo) !== null && _a !== void 0 ? _a : (this._oortShipperContactInfo = new Client_js_15.OortShipperContactInfo(this._options)));
126
+ return ((_a = this._oortShipperContactInfo) !== null && _a !== void 0 ? _a : (this._oortShipperContactInfo = new Client_js_14.OortShipperContactInfo(this._options)));
132
127
  }
133
128
  get oortTaskGroups() {
134
129
  var _a;
135
- return ((_a = this._oortTaskGroups) !== null && _a !== void 0 ? _a : (this._oortTaskGroups = new Client_js_16.OortTaskGroups(this._options)));
130
+ return ((_a = this._oortTaskGroups) !== null && _a !== void 0 ? _a : (this._oortTaskGroups = new Client_js_15.OortTaskGroups(this._options)));
136
131
  }
137
132
  get orgs() {
138
133
  var _a;
139
- return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_17.Orgs(this._options)));
134
+ return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_16.Orgs(this._options)));
140
135
  }
141
136
  get payments() {
142
137
  var _a;
143
- return ((_a = this._payments) !== null && _a !== void 0 ? _a : (this._payments = new Client_js_18.Payments(this._options)));
138
+ return ((_a = this._payments) !== null && _a !== void 0 ? _a : (this._payments = new Client_js_17.Payments(this._options)));
144
139
  }
145
140
  get users() {
146
141
  var _a;
147
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_19.Users(this._options)));
142
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_18.Users(this._options)));
148
143
  }
149
144
  get notifications() {
150
145
  var _a;
151
- return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_20.Notifications(this._options)));
146
+ return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_19.Notifications(this._options)));
152
147
  }
153
148
  }
154
149
  exports.ChrtClient = ChrtClient;
@@ -1,3 +1,3 @@
1
- export * from "./resources/index.js";
2
1
  export * from "./types/index.js";
3
2
  export * from "./errors/index.js";
3
+ export * from "./resources/index.js";
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./resources/index.js"), exports);
18
17
  __exportStar(require("./types/index.js"), exports);
19
18
  __exportStar(require("./errors/index.js"), exports);
19
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,51 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.js";
5
+ import * as core from "../../../../core/index.js";
6
+ import * as Chrt from "../../../index.js";
7
+ import { ConnectionToCourier } from "../resources/connectionToCourier/client/Client.js";
8
+ export declare namespace Connections {
9
+ interface Options {
10
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
11
+ /** Specify a custom URL to connect the client to. */
12
+ baseUrl?: core.Supplier<string>;
13
+ token?: core.Supplier<core.BearerToken | undefined>;
14
+ /** Additional headers to include in requests. */
15
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
16
+ fetcher?: core.FetchFunction;
17
+ }
18
+ interface RequestOptions {
19
+ /** The maximum time to wait for a response in seconds. */
20
+ timeoutInSeconds?: number;
21
+ /** The number of times to retry the request. Defaults to 2. */
22
+ maxRetries?: number;
23
+ /** A hook to abort the request. */
24
+ abortSignal?: AbortSignal;
25
+ /** Additional headers to include in the request. */
26
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
27
+ }
28
+ }
29
+ export declare class Connections {
30
+ protected readonly _options: Connections.Options;
31
+ protected _connectionToCourier: ConnectionToCourier | undefined;
32
+ constructor(_options?: Connections.Options);
33
+ get connectionToCourier(): ConnectionToCourier;
34
+ /**
35
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @example
38
+ * await client.connections.listCouriers()
39
+ */
40
+ listCouriers(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.CourierOrgConnectionInfo1[]>;
41
+ private __listCouriers;
42
+ /**
43
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @example
46
+ * await client.connections.listShippers()
47
+ */
48
+ listShippers(requestOptions?: Connections.RequestOptions): core.HttpResponsePromise<Chrt.ShipperOrgConnectionInfo1[]>;
49
+ private __listShippers;
50
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
51
+ }
@@ -45,30 +45,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  });
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.OortConnections = void 0;
48
+ exports.Connections = void 0;
49
49
  const environments = __importStar(require("../../../../environments.js"));
50
50
  const core = __importStar(require("../../../../core/index.js"));
51
- const Chrt = __importStar(require("../../../index.js"));
52
51
  const headers_js_1 = require("../../../../core/headers.js");
53
52
  const errors = __importStar(require("../../../../errors/index.js"));
54
- class OortConnections {
53
+ const Client_js_1 = require("../resources/connectionToCourier/client/Client.js");
54
+ class Connections {
55
55
  constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
+ get connectionToCourier() {
59
+ var _a;
60
+ return ((_a = this._connectionToCourier) !== null && _a !== void 0 ? _a : (this._connectionToCourier = new Client_js_1.ConnectionToCourier(this._options)));
61
+ }
58
62
  /**
59
- * @param {OortConnections.RequestOptions} requestOptions - Request-specific configuration.
63
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
60
64
  *
61
65
  * @example
62
- * await client.oortConnections.getConnectionsInfoForCouriers()
66
+ * await client.connections.listCouriers()
63
67
  */
64
- getConnectionsInfoForCouriers(requestOptions) {
65
- return core.HttpResponsePromise.fromPromise(this.__getConnectionsInfoForCouriers(requestOptions));
68
+ listCouriers(requestOptions) {
69
+ return core.HttpResponsePromise.fromPromise(this.__listCouriers(requestOptions));
66
70
  }
67
- __getConnectionsInfoForCouriers(requestOptions) {
71
+ __listCouriers(requestOptions) {
68
72
  return __awaiter(this, void 0, void 0, function* () {
69
73
  var _a, _b, _c, _d;
70
74
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
- 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/connections/connections_info_for_couriers"),
75
+ 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/connections/couriers/list"),
72
76
  method: "GET",
73
77
  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),
74
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -93,7 +97,7 @@ class OortConnections {
93
97
  rawResponse: _response.rawResponse,
94
98
  });
95
99
  case "timeout":
96
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/connections_info_for_couriers.");
100
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/couriers/list.");
97
101
  case "unknown":
98
102
  throw new errors.ChrtError({
99
103
  message: _response.error.errorMessage,
@@ -103,19 +107,19 @@ class OortConnections {
103
107
  });
104
108
  }
105
109
  /**
106
- * @param {OortConnections.RequestOptions} requestOptions - Request-specific configuration.
110
+ * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
107
111
  *
108
112
  * @example
109
- * await client.oortConnections.getConnectionsInfoForShippers()
113
+ * await client.connections.listShippers()
110
114
  */
111
- getConnectionsInfoForShippers(requestOptions) {
112
- return core.HttpResponsePromise.fromPromise(this.__getConnectionsInfoForShippers(requestOptions));
115
+ listShippers(requestOptions) {
116
+ return core.HttpResponsePromise.fromPromise(this.__listShippers(requestOptions));
113
117
  }
114
- __getConnectionsInfoForShippers(requestOptions) {
118
+ __listShippers(requestOptions) {
115
119
  return __awaiter(this, void 0, void 0, function* () {
116
120
  var _a, _b, _c, _d;
117
121
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
118
- 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/connections/connections_info_for_shippers"),
122
+ 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/connections/shippers/list"),
119
123
  method: "GET",
120
124
  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),
121
125
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -140,69 +144,7 @@ class OortConnections {
140
144
  rawResponse: _response.rawResponse,
141
145
  });
142
146
  case "timeout":
143
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/connections_info_for_shippers.");
144
- case "unknown":
145
- throw new errors.ChrtError({
146
- message: _response.error.errorMessage,
147
- rawResponse: _response.rawResponse,
148
- });
149
- }
150
- });
151
- }
152
- /**
153
- * Body: Courier Handle, Shipper Org Id from JWT
154
- *
155
- * @param {Chrt.CreateConnectionReq} request
156
- * @param {OortConnections.RequestOptions} requestOptions - Request-specific configuration.
157
- *
158
- * @throws {@link Chrt.UnprocessableEntityError}
159
- *
160
- * @example
161
- * await client.oortConnections.createConnectionToCourier({
162
- * handle: "handle"
163
- * })
164
- */
165
- createConnectionToCourier(request, requestOptions) {
166
- return core.HttpResponsePromise.fromPromise(this.__createConnectionToCourier(request, requestOptions));
167
- }
168
- __createConnectionToCourier(request, requestOptions) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- var _a, _b, _c, _d;
171
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
172
- 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/connections/create_connection_to_courier"),
173
- method: "POST",
174
- 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),
175
- contentType: "application/json",
176
- requestType: "json",
177
- body: request,
178
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
179
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
180
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
181
- });
182
- if (_response.ok) {
183
- return { data: _response.body, rawResponse: _response.rawResponse };
184
- }
185
- if (_response.error.reason === "status-code") {
186
- switch (_response.error.statusCode) {
187
- case 422:
188
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
189
- default:
190
- throw new errors.ChrtError({
191
- statusCode: _response.error.statusCode,
192
- body: _response.error.body,
193
- rawResponse: _response.rawResponse,
194
- });
195
- }
196
- }
197
- switch (_response.error.reason) {
198
- case "non-json":
199
- throw new errors.ChrtError({
200
- statusCode: _response.error.statusCode,
201
- body: _response.error.rawBody,
202
- rawResponse: _response.rawResponse,
203
- });
204
- case "timeout":
205
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/connections/create_connection_to_courier.");
147
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/connections/shippers/list.");
206
148
  case "unknown":
207
149
  throw new errors.ChrtError({
208
150
  message: _response.error.errorMessage,
@@ -221,4 +163,4 @@ class OortConnections {
221
163
  });
222
164
  }
223
165
  }
224
- exports.OortConnections = OortConnections;
166
+ exports.Connections = Connections;
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./resources/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./resources/index.js"), exports);
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as environments from "../../../../environments.js";
5
- import * as core from "../../../../core/index.js";
6
- import * as Chrt from "../../../index.js";
7
- export declare namespace Directory {
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
7
+ export declare namespace ConnectionToCourier {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
@@ -25,21 +25,23 @@ export declare namespace Directory {
25
25
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
26
  }
27
27
  }
28
- export declare class Directory {
29
- protected readonly _options: Directory.Options;
30
- constructor(_options?: Directory.Options);
28
+ export declare class ConnectionToCourier {
29
+ protected readonly _options: ConnectionToCourier.Options;
30
+ constructor(_options?: ConnectionToCourier.Options);
31
31
  /**
32
- * Retrieve the full list of shippers with optional pagination and sorting
32
+ * Body: Courier Handle, Shipper Org Id from JWT
33
33
  *
34
- * @param {Chrt.DbQueryParams} request
35
- * @param {Directory.RequestOptions} requestOptions - Request-specific configuration.
34
+ * @param {Chrt.connections.CreateConnectionReq} request
35
+ * @param {ConnectionToCourier.RequestOptions} requestOptions - Request-specific configuration.
36
36
  *
37
37
  * @throws {@link Chrt.UnprocessableEntityError}
38
38
  *
39
39
  * @example
40
- * await client.directory.postShippers()
40
+ * await client.connections.connectionToCourier.create({
41
+ * handle: "handle"
42
+ * })
41
43
  */
42
- postShippers(request?: Chrt.DbQueryParams, requestOptions?: Directory.RequestOptions): core.HttpResponsePromise<Chrt.Shipper2[]>;
43
- private __postShippers;
44
+ create(request: Chrt.connections.CreateConnectionReq, requestOptions?: ConnectionToCourier.RequestOptions): core.HttpResponsePromise<string>;
45
+ private __create;
44
46
  protected _getAuthorizationHeader(): Promise<string | undefined>;
45
47
  }
@@ -45,35 +45,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  });
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.Directory = void 0;
49
- const environments = __importStar(require("../../../../environments.js"));
50
- const core = __importStar(require("../../../../core/index.js"));
51
- const Chrt = __importStar(require("../../../index.js"));
52
- const headers_js_1 = require("../../../../core/headers.js");
53
- const errors = __importStar(require("../../../../errors/index.js"));
54
- class Directory {
48
+ exports.ConnectionToCourier = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ class ConnectionToCourier {
55
55
  constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
- * Retrieve the full list of shippers with optional pagination and sorting
59
+ * Body: Courier Handle, Shipper Org Id from JWT
60
60
  *
61
- * @param {Chrt.DbQueryParams} request
62
- * @param {Directory.RequestOptions} requestOptions - Request-specific configuration.
61
+ * @param {Chrt.connections.CreateConnectionReq} request
62
+ * @param {ConnectionToCourier.RequestOptions} requestOptions - Request-specific configuration.
63
63
  *
64
64
  * @throws {@link Chrt.UnprocessableEntityError}
65
65
  *
66
66
  * @example
67
- * await client.directory.postShippers()
67
+ * await client.connections.connectionToCourier.create({
68
+ * handle: "handle"
69
+ * })
68
70
  */
69
- postShippers(request = {}, requestOptions) {
70
- return core.HttpResponsePromise.fromPromise(this.__postShippers(request, requestOptions));
71
+ create(request, requestOptions) {
72
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
71
73
  }
72
- __postShippers() {
73
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
74
+ __create(request, requestOptions) {
75
+ return __awaiter(this, void 0, void 0, function* () {
74
76
  var _a, _b, _c, _d;
75
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
- 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, "directory/shippers"),
78
+ 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/connections/connection_to_courier/create"),
77
79
  method: "POST",
78
80
  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),
79
81
  contentType: "application/json",
@@ -106,7 +108,7 @@ class Directory {
106
108
  rawResponse: _response.rawResponse,
107
109
  });
108
110
  case "timeout":
109
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /directory/shippers.");
111
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/connections/connection_to_courier/create.");
110
112
  case "unknown":
111
113
  throw new errors.ChrtError({
112
114
  message: _response.error.errorMessage,
@@ -125,4 +127,4 @@ class Directory {
125
127
  });
126
128
  }
127
129
  }
128
- exports.Directory = Directory;
130
+ exports.ConnectionToCourier = ConnectionToCourier;
@@ -0,0 +1,2 @@
1
+ export * as connectionToCourier from "./connectionToCourier/index.js";
2
+ export * from "./connectionToCourier/client/requests/index.js";