@chrt-inc/typescript-sdk 1.762.0 → 1.772.0

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 (62) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.d.ts +36 -2
  3. package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.js +138 -1
  4. package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/AdHocListBySessionIdV1Request.d.ts +14 -0
  5. package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/index.d.ts +1 -1
  6. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.ts +1 -0
  7. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +2 -2
  8. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +2 -2
  9. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.ts +3 -0
  10. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientUpdate1.d.ts +4 -0
  11. package/dist/cjs/api/types/NotificationEventsForAdHocEnum.d.ts +4 -3
  12. package/dist/cjs/api/types/NotificationEventsForAdHocEnum.js +1 -0
  13. package/dist/cjs/api/types/NotificationEventsForOrgsEnum.d.ts +2 -1
  14. package/dist/cjs/api/types/NotificationEventsForOrgsEnum.js +1 -0
  15. package/dist/cjs/api/types/NotificationEventsForUsersEnum.d.ts +2 -1
  16. package/dist/cjs/api/types/NotificationEventsForUsersEnum.js +1 -0
  17. package/dist/cjs/api/types/NotificationIntentAdHoc1.d.ts +2 -1
  18. package/dist/cjs/api/{resources/notifications/resources/adHoc/client/requests → types}/NotificationIntentAdHocClientCreate1.d.ts +1 -8
  19. package/dist/cjs/api/types/NotificationIntentAdHocClientCreate1.js +5 -0
  20. package/dist/cjs/api/types/OnboardCourierTaskActionEnum1.d.ts +1 -11
  21. package/dist/cjs/api/types/OnboardCourierTaskActionEnum1.js +0 -10
  22. package/dist/cjs/api/types/Session1.d.ts +3 -0
  23. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  24. package/dist/cjs/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.d.ts +10 -0
  25. package/dist/cjs/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.js +5 -0
  26. package/dist/cjs/api/types/index.d.ts +2 -0
  27. package/dist/cjs/api/types/index.js +2 -0
  28. package/dist/cjs/version.d.ts +1 -1
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/esm/Client.mjs +2 -2
  31. package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.d.mts +36 -2
  32. package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.mjs +138 -1
  33. package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/AdHocListBySessionIdV1Request.d.mts +14 -0
  34. package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/index.d.mts +1 -1
  35. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.mts +1 -0
  36. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +2 -2
  37. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +2 -2
  38. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.mts +3 -0
  39. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientUpdate1.d.mts +4 -0
  40. package/dist/esm/api/types/NotificationEventsForAdHocEnum.d.mts +4 -3
  41. package/dist/esm/api/types/NotificationEventsForAdHocEnum.mjs +1 -0
  42. package/dist/esm/api/types/NotificationEventsForOrgsEnum.d.mts +2 -1
  43. package/dist/esm/api/types/NotificationEventsForOrgsEnum.mjs +1 -0
  44. package/dist/esm/api/types/NotificationEventsForUsersEnum.d.mts +2 -1
  45. package/dist/esm/api/types/NotificationEventsForUsersEnum.mjs +1 -0
  46. package/dist/esm/api/types/NotificationIntentAdHoc1.d.mts +2 -1
  47. package/dist/esm/api/{resources/notifications/resources/adHoc/client/requests → types}/NotificationIntentAdHocClientCreate1.d.mts +1 -8
  48. package/dist/esm/api/types/NotificationIntentAdHocClientCreate1.mjs +4 -0
  49. package/dist/esm/api/types/OnboardCourierTaskActionEnum1.d.mts +1 -11
  50. package/dist/esm/api/types/OnboardCourierTaskActionEnum1.mjs +0 -10
  51. package/dist/esm/api/types/Session1.d.mts +3 -0
  52. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  53. package/dist/esm/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.d.mts +10 -0
  54. package/dist/esm/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.mjs +4 -0
  55. package/dist/esm/api/types/index.d.mts +2 -0
  56. package/dist/esm/api/types/index.mjs +2 -0
  57. package/dist/esm/version.d.mts +1 -1
  58. package/dist/esm/version.mjs +1 -1
  59. package/package.json +1 -1
  60. package/reference.md +151 -3
  61. /package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/{NotificationIntentAdHocClientCreate1.js → AdHocListBySessionIdV1Request.js} +0 -0
  62. /package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/{NotificationIntentAdHocClientCreate1.mjs → AdHocListBySessionIdV1Request.mjs} +0 -0
@@ -47,11 +47,28 @@ export declare class AdHoc {
47
47
  */
48
48
  listByOrderIdV1(orderId: string, request?: Chrt.notifications.AdHocListByOrderIdV1Request, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<Chrt.NotificationAdHocListRes>;
49
49
  private __listByOrderIdV1;
50
+ /**
51
+ * Lists all ad-hoc notification intents for a tracking session. | authz: min_org_role=operator | () -> (NotificationAdHocListRes)
52
+ *
53
+ * @param {string} sessionId
54
+ * @param {Chrt.notifications.AdHocListBySessionIdV1Request} request
55
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link Chrt.UnprocessableEntityError}
58
+ *
59
+ * @example
60
+ * await client.notifications.adHoc.listBySessionIdV1("session_id", {
61
+ * page: 1,
62
+ * page_size: 1
63
+ * })
64
+ */
65
+ listBySessionIdV1(sessionId: string, request?: Chrt.notifications.AdHocListBySessionIdV1Request, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<Chrt.NotificationAdHocListRes>;
66
+ private __listBySessionIdV1;
50
67
  /**
51
68
  * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
52
69
  *
53
70
  * @param {string} orderId
54
- * @param {Chrt.notifications.NotificationIntentAdHocClientCreate1} request
71
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
55
72
  * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
56
73
  *
57
74
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -62,8 +79,25 @@ export declare class AdHoc {
62
79
  * directory_entry_id: "directory_entry_id"
63
80
  * })
64
81
  */
65
- createV1(orderId: string, request: Chrt.notifications.NotificationIntentAdHocClientCreate1, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<string>;
82
+ createV1(orderId: string, request: Chrt.NotificationIntentAdHocClientCreate1, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<string>;
66
83
  private __createV1;
84
+ /**
85
+ * Creates a new ad-hoc notification intent for a tracking session. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
86
+ *
87
+ * @param {string} sessionId
88
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
89
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
90
+ *
91
+ * @throws {@link Chrt.UnprocessableEntityError}
92
+ *
93
+ * @example
94
+ * await client.notifications.adHoc.createForSessionV1("session_id", {
95
+ * schema_version: 1,
96
+ * directory_entry_id: "directory_entry_id"
97
+ * })
98
+ */
99
+ createForSessionV1(sessionId: string, request: Chrt.NotificationIntentAdHocClientCreate1, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<string>;
100
+ private __createForSessionV1;
67
101
  /**
68
102
  * Deletes an ad-hoc notification intent. | authz: min_org_role=operator | () -> (bool)
69
103
  *
@@ -90,11 +90,82 @@ export class AdHoc {
90
90
  }
91
91
  });
92
92
  }
93
+ /**
94
+ * Lists all ad-hoc notification intents for a tracking session. | authz: min_org_role=operator | () -> (NotificationAdHocListRes)
95
+ *
96
+ * @param {string} sessionId
97
+ * @param {Chrt.notifications.AdHocListBySessionIdV1Request} request
98
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
99
+ *
100
+ * @throws {@link Chrt.UnprocessableEntityError}
101
+ *
102
+ * @example
103
+ * await client.notifications.adHoc.listBySessionIdV1("session_id", {
104
+ * page: 1,
105
+ * page_size: 1
106
+ * })
107
+ */
108
+ listBySessionIdV1(sessionId, request = {}, requestOptions) {
109
+ return core.HttpResponsePromise.fromPromise(this.__listBySessionIdV1(sessionId, request, requestOptions));
110
+ }
111
+ __listBySessionIdV1(sessionId_1) {
112
+ return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
113
+ var _a, _b, _c, _d, _e, _f;
114
+ const { page, page_size: pageSize } = request;
115
+ const _queryParams = {};
116
+ if (page !== undefined) {
117
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
118
+ }
119
+ if (pageSize !== undefined) {
120
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
121
+ }
122
+ let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
123
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
124
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, `notifications/ad_hoc/list_by_session_id/v1/${encodeURIComponent(sessionId)}`),
125
+ method: "GET",
126
+ headers: _headers,
127
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
128
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
129
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
130
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
131
+ });
132
+ if (_response.ok) {
133
+ return { data: _response.body, rawResponse: _response.rawResponse };
134
+ }
135
+ if (_response.error.reason === "status-code") {
136
+ switch (_response.error.statusCode) {
137
+ case 422:
138
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
139
+ default:
140
+ throw new errors.ChrtError({
141
+ statusCode: _response.error.statusCode,
142
+ body: _response.error.body,
143
+ rawResponse: _response.rawResponse,
144
+ });
145
+ }
146
+ }
147
+ switch (_response.error.reason) {
148
+ case "non-json":
149
+ throw new errors.ChrtError({
150
+ statusCode: _response.error.statusCode,
151
+ body: _response.error.rawBody,
152
+ rawResponse: _response.rawResponse,
153
+ });
154
+ case "timeout":
155
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /notifications/ad_hoc/list_by_session_id/v1/{session_id}.");
156
+ case "unknown":
157
+ throw new errors.ChrtError({
158
+ message: _response.error.errorMessage,
159
+ rawResponse: _response.rawResponse,
160
+ });
161
+ }
162
+ });
163
+ }
93
164
  /**
94
165
  * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
95
166
  *
96
167
  * @param {string} orderId
97
- * @param {Chrt.notifications.NotificationIntentAdHocClientCreate1} request
168
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
98
169
  * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
99
170
  *
100
171
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -156,6 +227,72 @@ export class AdHoc {
156
227
  }
157
228
  });
158
229
  }
230
+ /**
231
+ * Creates a new ad-hoc notification intent for a tracking session. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
232
+ *
233
+ * @param {string} sessionId
234
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
235
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
236
+ *
237
+ * @throws {@link Chrt.UnprocessableEntityError}
238
+ *
239
+ * @example
240
+ * await client.notifications.adHoc.createForSessionV1("session_id", {
241
+ * schema_version: 1,
242
+ * directory_entry_id: "directory_entry_id"
243
+ * })
244
+ */
245
+ createForSessionV1(sessionId, request, requestOptions) {
246
+ return core.HttpResponsePromise.fromPromise(this.__createForSessionV1(sessionId, request, requestOptions));
247
+ }
248
+ __createForSessionV1(sessionId, request, requestOptions) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ var _a, _b, _c, _d;
251
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
252
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
253
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `notifications/ad_hoc/create_for_session/v1/${encodeURIComponent(sessionId)}`),
254
+ method: "POST",
255
+ headers: _headers,
256
+ contentType: "application/json",
257
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
258
+ requestType: "json",
259
+ body: request,
260
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
261
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
262
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
263
+ });
264
+ if (_response.ok) {
265
+ return { data: _response.body, rawResponse: _response.rawResponse };
266
+ }
267
+ if (_response.error.reason === "status-code") {
268
+ switch (_response.error.statusCode) {
269
+ case 422:
270
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
271
+ default:
272
+ throw new errors.ChrtError({
273
+ statusCode: _response.error.statusCode,
274
+ body: _response.error.body,
275
+ rawResponse: _response.rawResponse,
276
+ });
277
+ }
278
+ }
279
+ switch (_response.error.reason) {
280
+ case "non-json":
281
+ throw new errors.ChrtError({
282
+ statusCode: _response.error.statusCode,
283
+ body: _response.error.rawBody,
284
+ rawResponse: _response.rawResponse,
285
+ });
286
+ case "timeout":
287
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/ad_hoc/create_for_session/v1/{session_id}.");
288
+ case "unknown":
289
+ throw new errors.ChrtError({
290
+ message: _response.error.errorMessage,
291
+ rawResponse: _response.rawResponse,
292
+ });
293
+ }
294
+ });
295
+ }
159
296
  /**
160
297
  * Deletes an ad-hoc notification intent. | authz: min_org_role=operator | () -> (bool)
161
298
  *
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * page: 1,
8
+ * page_size: 1
9
+ * }
10
+ */
11
+ export interface AdHocListBySessionIdV1Request {
12
+ page?: number | null;
13
+ page_size?: number | null;
14
+ }
@@ -1,2 +1,2 @@
1
1
  export { type AdHocListByOrderIdV1Request } from "./AdHocListByOrderIdV1Request.mjs";
2
- export { type NotificationIntentAdHocClientCreate1 } from "./NotificationIntentAdHocClientCreate1.mjs";
2
+ export { type AdHocListBySessionIdV1Request } from "./AdHocListBySessionIdV1Request.mjs";
@@ -14,4 +14,5 @@ export interface OrderDraftAddTaskGroupReq {
14
14
  order_id: string;
15
15
  order_schedule_template_path_idempotency_key?: string | null;
16
16
  vehicle_type?: Chrt.VehicleTypeEnum | null;
17
+ flight_setup_notes?: string | null;
17
18
  }
@@ -99,7 +99,7 @@ export declare class Sessions {
99
99
  typeaheadV1(request: Chrt.tracking.SessionsTypeaheadV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.TrackingTypeaheadResult[]>;
100
100
  private __typeaheadV1;
101
101
  /**
102
- * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
102
+ * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Optionally seed a destination geofence (location + radius) to fire a destination geofence entered notification. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
103
103
  *
104
104
  * @param {Chrt.tracking.SessionClientCreate1} request
105
105
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
@@ -116,7 +116,7 @@ export declare class Sessions {
116
116
  createSessionV1(request: Chrt.tracking.SessionClientCreate1, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<string>;
117
117
  private __createSessionV1;
118
118
  /**
119
- * Updates a session's metadata. | auth: api_key | (SessionClientUpdate1) -> (bool)
119
+ * Updates a session's mutable metadata (off_chrt_reference_id, comments, public, termination_scheduled_for_timestamp, destination_geofence_location, destination_geofence_radius_miles). Setting or replacing the destination geofence location resets the entered latch so it can fire again; clearing it (destination_geofence_location__set_to_None) also resets the latch. | auth: api_key | (SessionClientUpdate1) -> (bool)
120
120
  *
121
121
  * @param {Chrt.tracking.SessionClientUpdate1} request
122
122
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
@@ -317,7 +317,7 @@ export class Sessions {
317
317
  });
318
318
  }
319
319
  /**
320
- * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
320
+ * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Optionally seed a destination geofence (location + radius) to fire a destination geofence entered notification. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
321
321
  *
322
322
  * @param {Chrt.tracking.SessionClientCreate1} request
323
323
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
@@ -389,7 +389,7 @@ export class Sessions {
389
389
  });
390
390
  }
391
391
  /**
392
- * Updates a session's metadata. | auth: api_key | (SessionClientUpdate1) -> (bool)
392
+ * Updates a session's mutable metadata (off_chrt_reference_id, comments, public, termination_scheduled_for_timestamp, destination_geofence_location, destination_geofence_radius_miles). Setting or replacing the destination geofence location resets the entered latch so it can fire again; clearing it (destination_geofence_location__set_to_None) also resets the latch. | auth: api_key | (SessionClientUpdate1) -> (bool)
393
393
  *
394
394
  * @param {Chrt.tracking.SessionClientUpdate1} request
395
395
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Chrt from "../../../../../../index.mjs";
4
5
  /**
5
6
  * @example
6
7
  * {
@@ -21,4 +22,6 @@ export interface SessionClientCreate1 {
21
22
  termination_scheduled_for_timestamp?: string | null;
22
23
  flight_numbers?: string[];
23
24
  fa_flight_ids?: string[];
25
+ destination_geofence_location?: Chrt.LocationFeature | null;
26
+ destination_geofence_radius_miles?: number;
24
27
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Chrt from "../../../../../../index.mjs";
4
5
  /**
5
6
  * @example
6
7
  * {
@@ -14,7 +15,10 @@ export interface SessionClientUpdate1 {
14
15
  comments?: string | null;
15
16
  public?: boolean | null;
16
17
  termination_scheduled_for_timestamp?: string | null;
18
+ destination_geofence_location?: Chrt.LocationFeature | null;
19
+ destination_geofence_radius_miles?: number | null;
17
20
  off_chrt_reference_id__set_to_None?: boolean;
18
21
  comments__set_to_None?: boolean;
19
22
  termination_scheduled_for_timestamp__set_to_None?: boolean;
23
+ destination_geofence_location__set_to_None?: boolean;
20
24
  }
@@ -2,13 +2,14 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Limited notification events for ad-hoc per-order notifications.
5
+ * Limited notification events for ad-hoc per-subject notifications.
6
6
  *
7
- * Set per order for any directory entry contact.
7
+ * Set per order or per tracking session for any directory entry contact.
8
8
  * Limited scope since it can go outside the org, e.g. share order completion but probably not billing events
9
9
  */
10
- export type NotificationEventsForAdHocEnum = "shipping.order.staged" | "shipping.order.completed";
10
+ export type NotificationEventsForAdHocEnum = "shipping.order.staged" | "shipping.order.completed" | "tracking.session.destination_geofence_entered";
11
11
  export declare const NotificationEventsForAdHocEnum: {
12
12
  readonly ShippingOrderStaged: "shipping.order.staged";
13
13
  readonly ShippingOrderCompleted: "shipping.order.completed";
14
+ readonly TrackingSessionDestinationGeofenceEntered: "tracking.session.destination_geofence_entered";
14
15
  };
@@ -4,4 +4,5 @@
4
4
  export const NotificationEventsForAdHocEnum = {
5
5
  ShippingOrderStaged: "shipping.order.staged",
6
6
  ShippingOrderCompleted: "shipping.order.completed",
7
+ TrackingSessionDestinationGeofenceEntered: "tracking.session.destination_geofence_entered",
7
8
  };
@@ -6,7 +6,7 @@
6
6
  * Controlled by Groups that admins configure.
7
7
  * Individual users in the group can opt out.
8
8
  */
9
- export type NotificationEventsForOrgsEnum = "shipping.order.staged" | "shipping.order.completed" | "shipping.order.cancelled" | "shipping.task_group.provider_assigned" | "shipping.task_group.in_progress" | "shipping.task_group.file_added" | "shipping.task_group.driver_assigned" | "shipping.task_group.message" | "shipping.task_group.tasks_ordering_updated" | "shipping.task_group.flight_info_updated" | "shipping.task.added" | "shipping.task.attempted" | "shipping.task.completed" | "shipping.task.skipped" | "shipping.task.deleted" | "shipping.task.task_artifact_completed" | "shipping.task.executor_org_note_added" | "listing.listing.driver_invited_to_bid" | "listing.listing.provider_invited_to_bid" | "listing.bid_thread.action_added" | "operations.case.operator_assigned" | "operations.case.group_assigned" | "operations.case.message" | "operations.case.file_added" | "billing.statement.opened" | "billing.statement.paid" | "billing.line_item_group.message" | "billing.line_item_group.file_added" | "billing.line_item.file_added";
9
+ export type NotificationEventsForOrgsEnum = "shipping.order.staged" | "shipping.order.completed" | "shipping.order.cancelled" | "shipping.task_group.provider_assigned" | "shipping.task_group.in_progress" | "shipping.task_group.file_added" | "shipping.task_group.driver_assigned" | "shipping.task_group.message" | "shipping.task_group.tasks_ordering_updated" | "shipping.task_group.flight_info_updated" | "shipping.task.added" | "shipping.task.attempted" | "shipping.task.completed" | "shipping.task.skipped" | "shipping.task.deleted" | "shipping.task.task_artifact_completed" | "shipping.task.executor_org_note_added" | "listing.listing.driver_invited_to_bid" | "listing.listing.provider_invited_to_bid" | "listing.bid_thread.action_added" | "operations.case.operator_assigned" | "operations.case.group_assigned" | "operations.case.message" | "operations.case.file_added" | "billing.statement.opened" | "billing.statement.paid" | "billing.line_item_group.message" | "billing.line_item_group.file_added" | "billing.line_item.file_added" | "tracking.session.destination_geofence_entered";
10
10
  export declare const NotificationEventsForOrgsEnum: {
11
11
  readonly ShippingOrderStaged: "shipping.order.staged";
12
12
  readonly ShippingOrderCompleted: "shipping.order.completed";
@@ -37,4 +37,5 @@ export declare const NotificationEventsForOrgsEnum: {
37
37
  readonly BillingLineItemGroupMessage: "billing.line_item_group.message";
38
38
  readonly BillingLineItemGroupFileAdded: "billing.line_item_group.file_added";
39
39
  readonly BillingLineItemFileAdded: "billing.line_item.file_added";
40
+ readonly TrackingSessionDestinationGeofenceEntered: "tracking.session.destination_geofence_entered";
40
41
  };
@@ -31,4 +31,5 @@ export const NotificationEventsForOrgsEnum = {
31
31
  BillingLineItemGroupMessage: "billing.line_item_group.message",
32
32
  BillingLineItemGroupFileAdded: "billing.line_item_group.file_added",
33
33
  BillingLineItemFileAdded: "billing.line_item.file_added",
34
+ TrackingSessionDestinationGeofenceEntered: "tracking.session.destination_geofence_entered",
34
35
  };
@@ -8,7 +8,7 @@
8
8
  * - Order events: via `order.created_by_user_id`
9
9
  * - TaskGroup events: via `task_group.driver_id`
10
10
  */
11
- export type NotificationEventsForUsersEnum = "shipping.order.staged" | "shipping.order.completed" | "shipping.order.cancelled" | "shipping.task_group.driver_assigned" | "shipping.task_group.message" | "shipping.task_group.tasks_ordering_updated" | "shipping.task_group.flight_info_updated" | "shipping.task.executor_org_note_added" | "listing.listing.driver_invited_to_bid" | "listing.bid_thread.action_added" | "operations.case.operator_assigned" | "operations.case.group_assigned" | "operations.case.message" | "operations.case.file_added" | "billing.line_item_group.message" | "billing.line_item_group.file_added";
11
+ export type NotificationEventsForUsersEnum = "shipping.order.staged" | "shipping.order.completed" | "shipping.order.cancelled" | "shipping.task_group.driver_assigned" | "shipping.task_group.message" | "shipping.task_group.tasks_ordering_updated" | "shipping.task_group.flight_info_updated" | "shipping.task.executor_org_note_added" | "listing.listing.driver_invited_to_bid" | "listing.bid_thread.action_added" | "operations.case.operator_assigned" | "operations.case.group_assigned" | "operations.case.message" | "operations.case.file_added" | "billing.line_item_group.message" | "billing.line_item_group.file_added" | "tracking.session.destination_geofence_entered";
12
12
  export declare const NotificationEventsForUsersEnum: {
13
13
  readonly ShippingOrderStaged: "shipping.order.staged";
14
14
  readonly ShippingOrderCompleted: "shipping.order.completed";
@@ -26,4 +26,5 @@ export declare const NotificationEventsForUsersEnum: {
26
26
  readonly OperationsCaseFileAdded: "operations.case.file_added";
27
27
  readonly BillingLineItemGroupMessage: "billing.line_item_group.message";
28
28
  readonly BillingLineItemGroupFileAdded: "billing.line_item_group.file_added";
29
+ readonly TrackingSessionDestinationGeofenceEntered: "tracking.session.destination_geofence_entered";
29
30
  };
@@ -18,4 +18,5 @@ export const NotificationEventsForUsersEnum = {
18
18
  OperationsCaseFileAdded: "operations.case.file_added",
19
19
  BillingLineItemGroupMessage: "billing.line_item_group.message",
20
20
  BillingLineItemGroupFileAdded: "billing.line_item_group.file_added",
21
+ TrackingSessionDestinationGeofenceEntered: "tracking.session.destination_geofence_entered",
21
22
  };
@@ -9,7 +9,8 @@ export interface NotificationIntentAdHoc1 {
9
9
  created_by_org_id: string;
10
10
  /** Must be a string starting with `user_` */
11
11
  created_by_user_id: string;
12
- order_id: string;
12
+ order_id?: string | null;
13
+ session_id?: string | null;
13
14
  directory_entry_id: string;
14
15
  email_events?: Chrt.NotificationEventsForAdHocEnum[];
15
16
  push_events?: Chrt.NotificationEventsForAdHocEnum[];
@@ -1,14 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Chrt from "../../../../../../index.mjs";
5
- /**
6
- * @example
7
- * {
8
- * schema_version: 1,
9
- * directory_entry_id: "directory_entry_id"
10
- * }
11
- */
4
+ import * as Chrt from "../index.mjs";
12
5
  export interface NotificationIntentAdHocClientCreate1 {
13
6
  schema_version: number;
14
7
  directory_entry_id: string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,22 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type OnboardCourierTaskActionEnum1 = "obc__courier_departed_for_pickup_location" | "obc__courier_arrived_at_pickup_location" | "obc__cargo_picked_up" | "obc__courier_departed_for_airport" | "obc__courier_arrived_at_airport" | "obc__courier_thru_security" | "obc__cargo_received_by_airline" | "obc__courier_boarded_flight" | "obc__flight_departed" | "obc__flight_arrived" | "obc__courier_deboarded_flight" | "obc__courier_cleared_customs" | "obc__courier_recovered_cargo" | "obc__courier_departed_for_delivery_location" | "obc__courier_arrived_at_delivery_location" | "obc__cargo_delivered";
4
+ export type OnboardCourierTaskActionEnum1 = "obc__cargo_picked_up" | "obc__courier_thru_security" | "obc__courier_boarded_flight" | "obc__courier_deboarded_flight" | "obc__courier_cleared_customs" | "obc__cargo_delivered";
5
5
  export declare const OnboardCourierTaskActionEnum1: {
6
- readonly ObcCourierDepartedForPickupLocation: "obc__courier_departed_for_pickup_location";
7
- readonly ObcCourierArrivedAtPickupLocation: "obc__courier_arrived_at_pickup_location";
8
6
  readonly ObcCargoPickedUp: "obc__cargo_picked_up";
9
- readonly ObcCourierDepartedForAirport: "obc__courier_departed_for_airport";
10
- readonly ObcCourierArrivedAtAirport: "obc__courier_arrived_at_airport";
11
7
  readonly ObcCourierThruSecurity: "obc__courier_thru_security";
12
- readonly ObcCargoReceivedByAirline: "obc__cargo_received_by_airline";
13
8
  readonly ObcCourierBoardedFlight: "obc__courier_boarded_flight";
14
- readonly ObcFlightDeparted: "obc__flight_departed";
15
- readonly ObcFlightArrived: "obc__flight_arrived";
16
9
  readonly ObcCourierDeboardedFlight: "obc__courier_deboarded_flight";
17
10
  readonly ObcCourierClearedCustoms: "obc__courier_cleared_customs";
18
- readonly ObcCourierRecoveredCargo: "obc__courier_recovered_cargo";
19
- readonly ObcCourierDepartedForDeliveryLocation: "obc__courier_departed_for_delivery_location";
20
- readonly ObcCourierArrivedAtDeliveryLocation: "obc__courier_arrived_at_delivery_location";
21
11
  readonly ObcCargoDelivered: "obc__cargo_delivered";
22
12
  };
@@ -2,20 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export const OnboardCourierTaskActionEnum1 = {
5
- ObcCourierDepartedForPickupLocation: "obc__courier_departed_for_pickup_location",
6
- ObcCourierArrivedAtPickupLocation: "obc__courier_arrived_at_pickup_location",
7
5
  ObcCargoPickedUp: "obc__cargo_picked_up",
8
- ObcCourierDepartedForAirport: "obc__courier_departed_for_airport",
9
- ObcCourierArrivedAtAirport: "obc__courier_arrived_at_airport",
10
6
  ObcCourierThruSecurity: "obc__courier_thru_security",
11
- ObcCargoReceivedByAirline: "obc__cargo_received_by_airline",
12
7
  ObcCourierBoardedFlight: "obc__courier_boarded_flight",
13
- ObcFlightDeparted: "obc__flight_departed",
14
- ObcFlightArrived: "obc__flight_arrived",
15
8
  ObcCourierDeboardedFlight: "obc__courier_deboarded_flight",
16
9
  ObcCourierClearedCustoms: "obc__courier_cleared_customs",
17
- ObcCourierRecoveredCargo: "obc__courier_recovered_cargo",
18
- ObcCourierDepartedForDeliveryLocation: "obc__courier_departed_for_delivery_location",
19
- ObcCourierArrivedAtDeliveryLocation: "obc__courier_arrived_at_delivery_location",
20
10
  ObcCargoDelivered: "obc__cargo_delivered",
21
11
  };
@@ -24,6 +24,9 @@ export interface Session1 {
24
24
  last_seen_at_timestamp?: string | null;
25
25
  last_seen_at_location_city?: string | null;
26
26
  last_seen_at_location_large_city?: string | null;
27
+ destination_geofence_location?: Chrt.LocationFeature | null;
28
+ destination_geofence_radius_miles?: number;
29
+ destination_geofence_entered?: boolean;
27
30
  fa_alert_ids?: number[];
28
31
  flight_loaded_statuses?: string[];
29
32
  fa_alert_id_by_flight_number?: Record<string, number>;
@@ -35,6 +35,7 @@ export interface TaskGroup1 {
35
35
  exception_at_timestamp?: string | null;
36
36
  task_group_type: Chrt.TaskGroupTypeEnum1;
37
37
  vehicle_type?: Chrt.VehicleTypeEnum | null;
38
+ flight_setup_notes?: string | null;
38
39
  mileage_estimated?: number | null;
39
40
  mileage_observed?: number | null;
40
41
  wait_time_total_minutes?: number | null;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TrackingSessionDestinationGeofenceEnteredWebhookPayload {
5
+ event_type?: "tracking.session.destination_geofence_entered";
6
+ /** UTC timestamp when the event occurred */
7
+ event_timestamp: string;
8
+ /** The tracking session whose tracker entered the destination geofence */
9
+ session_id: string;
10
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -210,6 +210,7 @@ export * from "./NotificationGroupLimitedForDriver1.mjs";
210
210
  export * from "./NotificationGroupListRes.mjs";
211
211
  export * from "./NotificationGroupUserListRes.mjs";
212
212
  export * from "./NotificationIntentAdHoc1.mjs";
213
+ export * from "./NotificationIntentAdHocClientCreate1.mjs";
213
214
  export * from "./NotificationUserPreferences1.mjs";
214
215
  export * from "./OffChrtProviderOrg1.mjs";
215
216
  export * from "./OffChrtProviderOrgListRes.mjs";
@@ -405,6 +406,7 @@ export * from "./TiveTimeseriesRes.mjs";
405
406
  export * from "./TiveTimeseriesSyncRes.mjs";
406
407
  export * from "./TrackingDeviceTypeEnum1.mjs";
407
408
  export * from "./TrackingOrgScopeEnum.mjs";
409
+ export * from "./TrackingSessionDestinationGeofenceEnteredWebhookPayload.mjs";
408
410
  export * from "./TrackingSharingSettingsRes.mjs";
409
411
  export * from "./TrackingTypeaheadFieldEnum.mjs";
410
412
  export * from "./TrackingTypeaheadResult.mjs";
@@ -210,6 +210,7 @@ export * from "./NotificationGroupLimitedForDriver1.mjs";
210
210
  export * from "./NotificationGroupListRes.mjs";
211
211
  export * from "./NotificationGroupUserListRes.mjs";
212
212
  export * from "./NotificationIntentAdHoc1.mjs";
213
+ export * from "./NotificationIntentAdHocClientCreate1.mjs";
213
214
  export * from "./NotificationUserPreferences1.mjs";
214
215
  export * from "./OffChrtProviderOrg1.mjs";
215
216
  export * from "./OffChrtProviderOrgListRes.mjs";
@@ -405,6 +406,7 @@ export * from "./TiveTimeseriesRes.mjs";
405
406
  export * from "./TiveTimeseriesSyncRes.mjs";
406
407
  export * from "./TrackingDeviceTypeEnum1.mjs";
407
408
  export * from "./TrackingOrgScopeEnum.mjs";
409
+ export * from "./TrackingSessionDestinationGeofenceEnteredWebhookPayload.mjs";
408
410
  export * from "./TrackingSharingSettingsRes.mjs";
409
411
  export * from "./TrackingTypeaheadFieldEnum.mjs";
410
412
  export * from "./TrackingTypeaheadResult.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.762.0";
1
+ export declare const SDK_VERSION = "1.772.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.762.0";
1
+ export const SDK_VERSION = "1.772.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.762.0",
3
+ "version": "1.772.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",