@chrt-inc/typescript-sdk 1.359.0 → 1.363.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.
- package/dist/cjs/Client.d.ts +3 -6
- package/dist/cjs/Client.js +9 -14
- package/dist/cjs/api/resources/index.d.ts +2 -3
- package/dist/cjs/api/resources/index.js +3 -4
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +41 -6
- package/dist/cjs/api/resources/notifications/client/Client.js +171 -8
- package/dist/cjs/api/resources/notifications/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/notifications/client/index.js +15 -0
- package/dist/cjs/api/resources/notifications/client/requests/NotificationReq.d.ts +17 -0
- package/dist/cjs/api/resources/notifications/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/notifications/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/index.js +0 -1
- package/dist/cjs/api/types/ChrtEmailRecipient.d.ts +10 -0
- package/dist/cjs/api/types/{CourierNotificationEventEnum.js → ChrtEmailRecipient.js} +7 -0
- package/dist/cjs/api/types/NotificationRes.d.ts +10 -0
- package/dist/cjs/api/types/index.d.ts +2 -6
- package/dist/cjs/api/types/index.js +2 -6
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -6
- package/dist/esm/Client.mjs +5 -10
- package/dist/esm/api/resources/index.d.mts +2 -3
- package/dist/esm/api/resources/index.mjs +2 -3
- package/dist/esm/api/resources/notifications/client/Client.d.mts +41 -6
- package/dist/esm/api/resources/notifications/client/Client.mjs +138 -8
- package/dist/esm/api/resources/notifications/client/index.d.mts +1 -0
- package/dist/esm/api/resources/notifications/client/index.mjs +1 -1
- package/dist/esm/api/resources/notifications/client/requests/NotificationReq.d.mts +17 -0
- package/dist/esm/api/resources/notifications/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/notifications/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/index.mjs +0 -1
- package/dist/esm/api/types/ChrtEmailRecipient.d.mts +10 -0
- package/dist/esm/api/types/ChrtEmailRecipient.mjs +9 -0
- package/dist/esm/api/types/NotificationRes.d.mts +10 -0
- package/dist/esm/api/types/index.d.mts +2 -6
- package/dist/esm/api/types/index.mjs +2 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +13 -255
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +0 -59
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +0 -183
- package/dist/cjs/api/resources/notifications/resources/courier/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/notifications/resources/courier/client/index.js +0 -17
- package/dist/cjs/api/resources/notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -18
- package/dist/cjs/api/resources/notifications/resources/courier/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/resources/courier/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/resources/courier/index.js +0 -17
- package/dist/cjs/api/resources/notifications/resources/index.d.ts +0 -4
- package/dist/cjs/api/resources/notifications/resources/index.js +0 -43
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +0 -59
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +0 -183
- package/dist/cjs/api/resources/notifications/resources/shipper/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/index.js +0 -17
- package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.d.ts +0 -18
- package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/resources/shipper/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/index.d.ts +0 -1
- package/dist/cjs/api/resources/notifications/resources/shipper/index.js +0 -17
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +0 -59
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +0 -186
- package/dist/cjs/api/resources/taskArtifactNotifications/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/taskArtifactNotifications/client/index.js +0 -17
- package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.d.ts +0 -18
- package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.js +0 -5
- package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifactNotifications/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/taskArtifactNotifications/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskArtifactNotifications/index.js +0 -17
- package/dist/cjs/api/types/CourierNotificationEventEnum.d.ts +0 -7
- package/dist/cjs/api/types/CourierNotificationPreferences1.d.ts +0 -18
- package/dist/cjs/api/types/CourierNotificationPreferences1.js +0 -5
- package/dist/cjs/api/types/NotificationChannelEnum.d.ts +0 -13
- package/dist/cjs/api/types/NotificationChannelEnum.js +0 -12
- package/dist/cjs/api/types/ShipperNotificationEventEnum.d.ts +0 -7
- package/dist/cjs/api/types/ShipperNotificationEventEnum.js +0 -5
- package/dist/cjs/api/types/ShipperNotificationPreferences1.d.ts +0 -18
- package/dist/cjs/api/types/ShipperNotificationPreferences1.js +0 -5
- package/dist/cjs/api/types/TaskArtifactNotificationPreferences1.d.ts +0 -18
- package/dist/cjs/api/types/TaskArtifactNotificationPreferences1.js +0 -5
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +0 -59
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +0 -146
- package/dist/esm/api/resources/notifications/resources/courier/client/index.d.mts +0 -2
- package/dist/esm/api/resources/notifications/resources/courier/client/index.mjs +0 -1
- package/dist/esm/api/resources/notifications/resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -18
- package/dist/esm/api/resources/notifications/resources/courier/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/resources/courier/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/resources/courier/index.mjs +0 -1
- package/dist/esm/api/resources/notifications/resources/index.d.mts +0 -4
- package/dist/esm/api/resources/notifications/resources/index.mjs +0 -4
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +0 -59
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +0 -146
- package/dist/esm/api/resources/notifications/resources/shipper/client/index.d.mts +0 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/index.mjs +0 -1
- package/dist/esm/api/resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.d.mts +0 -18
- package/dist/esm/api/resources/notifications/resources/shipper/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/resources/shipper/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/notifications/resources/shipper/index.d.mts +0 -1
- package/dist/esm/api/resources/notifications/resources/shipper/index.mjs +0 -1
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +0 -59
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +0 -149
- package/dist/esm/api/resources/taskArtifactNotifications/client/index.d.mts +0 -2
- package/dist/esm/api/resources/taskArtifactNotifications/client/index.mjs +0 -1
- package/dist/esm/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.d.mts +0 -18
- package/dist/esm/api/resources/taskArtifactNotifications/client/requests/TaskArtifactNotificationPreferencesClientCreate1.mjs +0 -4
- package/dist/esm/api/resources/taskArtifactNotifications/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifactNotifications/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/taskArtifactNotifications/index.d.mts +0 -1
- package/dist/esm/api/resources/taskArtifactNotifications/index.mjs +0 -1
- package/dist/esm/api/types/CourierNotificationEventEnum.d.mts +0 -7
- package/dist/esm/api/types/CourierNotificationEventEnum.mjs +0 -4
- package/dist/esm/api/types/CourierNotificationPreferences1.d.mts +0 -18
- package/dist/esm/api/types/CourierNotificationPreferences1.mjs +0 -4
- package/dist/esm/api/types/NotificationChannelEnum.d.mts +0 -13
- package/dist/esm/api/types/NotificationChannelEnum.mjs +0 -9
- package/dist/esm/api/types/ShipperNotificationEventEnum.d.mts +0 -7
- package/dist/esm/api/types/ShipperNotificationEventEnum.mjs +0 -4
- package/dist/esm/api/types/ShipperNotificationPreferences1.d.mts +0 -18
- package/dist/esm/api/types/ShipperNotificationPreferences1.mjs +0 -4
- package/dist/esm/api/types/TaskArtifactNotificationPreferences1.d.mts +0 -18
- package/dist/esm/api/types/TaskArtifactNotificationPreferences1.mjs +0 -4
- /package/dist/cjs/api/resources/notifications/{resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.js → client/requests/NotificationReq.js} +0 -0
- /package/dist/cjs/api/resources/notifications/{resources/courier/client → client}/requests/index.js +0 -0
- /package/dist/cjs/api/{resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.js → types/NotificationRes.js} +0 -0
- /package/dist/esm/api/resources/notifications/{resources/courier/client/requests/CourierNotificationPreferencesClientCreate1.mjs → client/requests/NotificationReq.mjs} +0 -0
- /package/dist/esm/api/resources/notifications/{resources/courier/client → client}/requests/index.mjs +0 -0
- /package/dist/esm/api/{resources/notifications/resources/shipper/client/requests/ShipperNotificationPreferencesClientCreate1.mjs → types/NotificationRes.mjs} +0 -0
package/reference.md
CHANGED
|
@@ -1371,9 +1371,9 @@ await client.flights.getFlightInfoForTaskV1("task_id");
|
|
|
1371
1371
|
</dl>
|
|
1372
1372
|
</details>
|
|
1373
1373
|
|
|
1374
|
-
##
|
|
1374
|
+
## Notifications
|
|
1375
1375
|
|
|
1376
|
-
<details><summary><code>client.
|
|
1376
|
+
<details><summary><code>client.notifications.<a href="/src/api/resources/notifications/client/Client.ts">getNotificationV1</a>() -> string</code></summary>
|
|
1377
1377
|
<dl>
|
|
1378
1378
|
<dd>
|
|
1379
1379
|
|
|
@@ -1385,7 +1385,7 @@ await client.flights.getFlightInfoForTaskV1("task_id");
|
|
|
1385
1385
|
<dl>
|
|
1386
1386
|
<dd>
|
|
1387
1387
|
|
|
1388
|
-
|
|
1388
|
+
Development notification endpoint that returns the caller's ID for testing. | () -> (str)
|
|
1389
1389
|
|
|
1390
1390
|
</dd>
|
|
1391
1391
|
</dl>
|
|
@@ -1401,7 +1401,7 @@ Retrieves task_artifact notification preferences for the caller's organization.
|
|
|
1401
1401
|
<dd>
|
|
1402
1402
|
|
|
1403
1403
|
```typescript
|
|
1404
|
-
await client.
|
|
1404
|
+
await client.notifications.getNotificationV1();
|
|
1405
1405
|
```
|
|
1406
1406
|
|
|
1407
1407
|
</dd>
|
|
@@ -1417,7 +1417,7 @@ await client.taskArtifactNotifications.getPreferencesV1();
|
|
|
1417
1417
|
<dl>
|
|
1418
1418
|
<dd>
|
|
1419
1419
|
|
|
1420
|
-
**requestOptions:** `
|
|
1420
|
+
**requestOptions:** `Notifications.RequestOptions`
|
|
1421
1421
|
|
|
1422
1422
|
</dd>
|
|
1423
1423
|
</dl>
|
|
@@ -1428,7 +1428,7 @@ await client.taskArtifactNotifications.getPreferencesV1();
|
|
|
1428
1428
|
</dl>
|
|
1429
1429
|
</details>
|
|
1430
1430
|
|
|
1431
|
-
<details><summary><code>client.
|
|
1431
|
+
<details><summary><code>client.notifications.<a href="/src/api/resources/notifications/client/Client.ts">createNotificationV1</a>({ ...params }) -> Chrt.NotificationRes</code></summary>
|
|
1432
1432
|
<dl>
|
|
1433
1433
|
<dd>
|
|
1434
1434
|
|
|
@@ -1440,7 +1440,7 @@ await client.taskArtifactNotifications.getPreferencesV1();
|
|
|
1440
1440
|
<dl>
|
|
1441
1441
|
<dd>
|
|
1442
1442
|
|
|
1443
|
-
|
|
1443
|
+
Send a notification email to a chrt.com recipient. | (NotificationReq) -> (NotificationRes)
|
|
1444
1444
|
|
|
1445
1445
|
</dd>
|
|
1446
1446
|
</dl>
|
|
@@ -1456,8 +1456,10 @@ Creates or updates task_artifact notification preferences for the caller's organ
|
|
|
1456
1456
|
<dd>
|
|
1457
1457
|
|
|
1458
1458
|
```typescript
|
|
1459
|
-
await client.
|
|
1460
|
-
|
|
1459
|
+
await client.notifications.createNotificationV1({
|
|
1460
|
+
recipient: "aaron",
|
|
1461
|
+
name: "name",
|
|
1462
|
+
message: "message",
|
|
1461
1463
|
});
|
|
1462
1464
|
```
|
|
1463
1465
|
|
|
@@ -1474,7 +1476,7 @@ await client.taskArtifactNotifications.upsertPreferencesV1({
|
|
|
1474
1476
|
<dl>
|
|
1475
1477
|
<dd>
|
|
1476
1478
|
|
|
1477
|
-
**request:** `Chrt.
|
|
1479
|
+
**request:** `Chrt.NotificationReq`
|
|
1478
1480
|
|
|
1479
1481
|
</dd>
|
|
1480
1482
|
</dl>
|
|
@@ -1482,7 +1484,7 @@ await client.taskArtifactNotifications.upsertPreferencesV1({
|
|
|
1482
1484
|
<dl>
|
|
1483
1485
|
<dd>
|
|
1484
1486
|
|
|
1485
|
-
**requestOptions:** `
|
|
1487
|
+
**requestOptions:** `Notifications.RequestOptions`
|
|
1486
1488
|
|
|
1487
1489
|
</dd>
|
|
1488
1490
|
</dl>
|
|
@@ -8417,250 +8419,6 @@ await client.connections.connectionToForwarder.createV1({
|
|
|
8417
8419
|
</dl>
|
|
8418
8420
|
</details>
|
|
8419
8421
|
|
|
8420
|
-
## Notifications Shipper
|
|
8421
|
-
|
|
8422
|
-
<details><summary><code>client.notifications.shipper.<a href="/src/api/resources/notifications/resources/shipper/client/Client.ts">getPreferencesV1</a>() -> Chrt.ShipperNotificationPreferences1</code></summary>
|
|
8423
|
-
<dl>
|
|
8424
|
-
<dd>
|
|
8425
|
-
|
|
8426
|
-
#### 📝 Description
|
|
8427
|
-
|
|
8428
|
-
<dl>
|
|
8429
|
-
<dd>
|
|
8430
|
-
|
|
8431
|
-
<dl>
|
|
8432
|
-
<dd>
|
|
8433
|
-
|
|
8434
|
-
Retrieves notification preferences for the caller's shipper organization. | () -> (ShipperNotificationPreferences1)
|
|
8435
|
-
|
|
8436
|
-
</dd>
|
|
8437
|
-
</dl>
|
|
8438
|
-
</dd>
|
|
8439
|
-
</dl>
|
|
8440
|
-
|
|
8441
|
-
#### 🔌 Usage
|
|
8442
|
-
|
|
8443
|
-
<dl>
|
|
8444
|
-
<dd>
|
|
8445
|
-
|
|
8446
|
-
<dl>
|
|
8447
|
-
<dd>
|
|
8448
|
-
|
|
8449
|
-
```typescript
|
|
8450
|
-
await client.notifications.shipper.getPreferencesV1();
|
|
8451
|
-
```
|
|
8452
|
-
|
|
8453
|
-
</dd>
|
|
8454
|
-
</dl>
|
|
8455
|
-
</dd>
|
|
8456
|
-
</dl>
|
|
8457
|
-
|
|
8458
|
-
#### ⚙️ Parameters
|
|
8459
|
-
|
|
8460
|
-
<dl>
|
|
8461
|
-
<dd>
|
|
8462
|
-
|
|
8463
|
-
<dl>
|
|
8464
|
-
<dd>
|
|
8465
|
-
|
|
8466
|
-
**requestOptions:** `Shipper.RequestOptions`
|
|
8467
|
-
|
|
8468
|
-
</dd>
|
|
8469
|
-
</dl>
|
|
8470
|
-
</dd>
|
|
8471
|
-
</dl>
|
|
8472
|
-
|
|
8473
|
-
</dd>
|
|
8474
|
-
</dl>
|
|
8475
|
-
</details>
|
|
8476
|
-
|
|
8477
|
-
<details><summary><code>client.notifications.shipper.<a href="/src/api/resources/notifications/resources/shipper/client/Client.ts">upsertPreferencesV1</a>({ ...params }) -> string</code></summary>
|
|
8478
|
-
<dl>
|
|
8479
|
-
<dd>
|
|
8480
|
-
|
|
8481
|
-
#### 📝 Description
|
|
8482
|
-
|
|
8483
|
-
<dl>
|
|
8484
|
-
<dd>
|
|
8485
|
-
|
|
8486
|
-
<dl>
|
|
8487
|
-
<dd>
|
|
8488
|
-
|
|
8489
|
-
Creates or updates notification preferences for the caller's shipper organization. | (ShipperNotificationPreferencesClientCreate1) -> (PydanticObjectId)
|
|
8490
|
-
|
|
8491
|
-
</dd>
|
|
8492
|
-
</dl>
|
|
8493
|
-
</dd>
|
|
8494
|
-
</dl>
|
|
8495
|
-
|
|
8496
|
-
#### 🔌 Usage
|
|
8497
|
-
|
|
8498
|
-
<dl>
|
|
8499
|
-
<dd>
|
|
8500
|
-
|
|
8501
|
-
<dl>
|
|
8502
|
-
<dd>
|
|
8503
|
-
|
|
8504
|
-
```typescript
|
|
8505
|
-
await client.notifications.shipper.upsertPreferencesV1({
|
|
8506
|
-
schema_version: 1,
|
|
8507
|
-
});
|
|
8508
|
-
```
|
|
8509
|
-
|
|
8510
|
-
</dd>
|
|
8511
|
-
</dl>
|
|
8512
|
-
</dd>
|
|
8513
|
-
</dl>
|
|
8514
|
-
|
|
8515
|
-
#### ⚙️ Parameters
|
|
8516
|
-
|
|
8517
|
-
<dl>
|
|
8518
|
-
<dd>
|
|
8519
|
-
|
|
8520
|
-
<dl>
|
|
8521
|
-
<dd>
|
|
8522
|
-
|
|
8523
|
-
**request:** `Chrt.notifications.ShipperNotificationPreferencesClientCreate1`
|
|
8524
|
-
|
|
8525
|
-
</dd>
|
|
8526
|
-
</dl>
|
|
8527
|
-
|
|
8528
|
-
<dl>
|
|
8529
|
-
<dd>
|
|
8530
|
-
|
|
8531
|
-
**requestOptions:** `Shipper.RequestOptions`
|
|
8532
|
-
|
|
8533
|
-
</dd>
|
|
8534
|
-
</dl>
|
|
8535
|
-
</dd>
|
|
8536
|
-
</dl>
|
|
8537
|
-
|
|
8538
|
-
</dd>
|
|
8539
|
-
</dl>
|
|
8540
|
-
</details>
|
|
8541
|
-
|
|
8542
|
-
## Notifications Courier
|
|
8543
|
-
|
|
8544
|
-
<details><summary><code>client.notifications.courier.<a href="/src/api/resources/notifications/resources/courier/client/Client.ts">getPreferencesV1</a>() -> Chrt.CourierNotificationPreferences1</code></summary>
|
|
8545
|
-
<dl>
|
|
8546
|
-
<dd>
|
|
8547
|
-
|
|
8548
|
-
#### 📝 Description
|
|
8549
|
-
|
|
8550
|
-
<dl>
|
|
8551
|
-
<dd>
|
|
8552
|
-
|
|
8553
|
-
<dl>
|
|
8554
|
-
<dd>
|
|
8555
|
-
|
|
8556
|
-
Retrieves notification preferences for the caller's courier organization. | () -> (CourierNotificationPreferences1)
|
|
8557
|
-
|
|
8558
|
-
</dd>
|
|
8559
|
-
</dl>
|
|
8560
|
-
</dd>
|
|
8561
|
-
</dl>
|
|
8562
|
-
|
|
8563
|
-
#### 🔌 Usage
|
|
8564
|
-
|
|
8565
|
-
<dl>
|
|
8566
|
-
<dd>
|
|
8567
|
-
|
|
8568
|
-
<dl>
|
|
8569
|
-
<dd>
|
|
8570
|
-
|
|
8571
|
-
```typescript
|
|
8572
|
-
await client.notifications.courier.getPreferencesV1();
|
|
8573
|
-
```
|
|
8574
|
-
|
|
8575
|
-
</dd>
|
|
8576
|
-
</dl>
|
|
8577
|
-
</dd>
|
|
8578
|
-
</dl>
|
|
8579
|
-
|
|
8580
|
-
#### ⚙️ Parameters
|
|
8581
|
-
|
|
8582
|
-
<dl>
|
|
8583
|
-
<dd>
|
|
8584
|
-
|
|
8585
|
-
<dl>
|
|
8586
|
-
<dd>
|
|
8587
|
-
|
|
8588
|
-
**requestOptions:** `Courier.RequestOptions`
|
|
8589
|
-
|
|
8590
|
-
</dd>
|
|
8591
|
-
</dl>
|
|
8592
|
-
</dd>
|
|
8593
|
-
</dl>
|
|
8594
|
-
|
|
8595
|
-
</dd>
|
|
8596
|
-
</dl>
|
|
8597
|
-
</details>
|
|
8598
|
-
|
|
8599
|
-
<details><summary><code>client.notifications.courier.<a href="/src/api/resources/notifications/resources/courier/client/Client.ts">upsertPreferencesV1</a>({ ...params }) -> string</code></summary>
|
|
8600
|
-
<dl>
|
|
8601
|
-
<dd>
|
|
8602
|
-
|
|
8603
|
-
#### 📝 Description
|
|
8604
|
-
|
|
8605
|
-
<dl>
|
|
8606
|
-
<dd>
|
|
8607
|
-
|
|
8608
|
-
<dl>
|
|
8609
|
-
<dd>
|
|
8610
|
-
|
|
8611
|
-
Creates or updates notification preferences for the caller's courier organization. | (CourierNotificationPreferencesClientCreate1) -> (PydanticObjectId)
|
|
8612
|
-
|
|
8613
|
-
</dd>
|
|
8614
|
-
</dl>
|
|
8615
|
-
</dd>
|
|
8616
|
-
</dl>
|
|
8617
|
-
|
|
8618
|
-
#### 🔌 Usage
|
|
8619
|
-
|
|
8620
|
-
<dl>
|
|
8621
|
-
<dd>
|
|
8622
|
-
|
|
8623
|
-
<dl>
|
|
8624
|
-
<dd>
|
|
8625
|
-
|
|
8626
|
-
```typescript
|
|
8627
|
-
await client.notifications.courier.upsertPreferencesV1({
|
|
8628
|
-
schema_version: 1,
|
|
8629
|
-
});
|
|
8630
|
-
```
|
|
8631
|
-
|
|
8632
|
-
</dd>
|
|
8633
|
-
</dl>
|
|
8634
|
-
</dd>
|
|
8635
|
-
</dl>
|
|
8636
|
-
|
|
8637
|
-
#### ⚙️ Parameters
|
|
8638
|
-
|
|
8639
|
-
<dl>
|
|
8640
|
-
<dd>
|
|
8641
|
-
|
|
8642
|
-
<dl>
|
|
8643
|
-
<dd>
|
|
8644
|
-
|
|
8645
|
-
**request:** `Chrt.notifications.CourierNotificationPreferencesClientCreate1`
|
|
8646
|
-
|
|
8647
|
-
</dd>
|
|
8648
|
-
</dl>
|
|
8649
|
-
|
|
8650
|
-
<dl>
|
|
8651
|
-
<dd>
|
|
8652
|
-
|
|
8653
|
-
**requestOptions:** `Courier.RequestOptions`
|
|
8654
|
-
|
|
8655
|
-
</dd>
|
|
8656
|
-
</dl>
|
|
8657
|
-
</dd>
|
|
8658
|
-
</dl>
|
|
8659
|
-
|
|
8660
|
-
</dd>
|
|
8661
|
-
</dl>
|
|
8662
|
-
</details>
|
|
8663
|
-
|
|
8664
8422
|
## OrderDrafts TaskGroup
|
|
8665
8423
|
|
|
8666
8424
|
<details><summary><code>client.orderDrafts.taskGroup.<a href="/src/api/resources/orderDrafts/resources/taskGroup/client/Client.ts">addV1</a>({ ...params }) -> string</code></summary>
|
|
@@ -1,59 +0,0 @@
|
|
|
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
|
-
export declare namespace Courier {
|
|
8
|
-
interface Options {
|
|
9
|
-
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
-
/** Specify a custom URL to connect the client to. */
|
|
11
|
-
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
-
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
-
fetcher?: core.FetchFunction;
|
|
16
|
-
}
|
|
17
|
-
interface RequestOptions {
|
|
18
|
-
/** The maximum time to wait for a response in seconds. */
|
|
19
|
-
timeoutInSeconds?: number;
|
|
20
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
-
maxRetries?: number;
|
|
22
|
-
/** A hook to abort the request. */
|
|
23
|
-
abortSignal?: AbortSignal;
|
|
24
|
-
/** Additional query string parameters to include in the request. */
|
|
25
|
-
queryParams?: Record<string, unknown>;
|
|
26
|
-
/** Additional headers to include in the request. */
|
|
27
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export declare class Courier {
|
|
31
|
-
protected readonly _options: Courier.Options;
|
|
32
|
-
constructor(_options?: Courier.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Retrieves notification preferences for the caller's courier organization. | () -> (CourierNotificationPreferences1)
|
|
35
|
-
*
|
|
36
|
-
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* await client.notifications.courier.getPreferencesV1()
|
|
40
|
-
*/
|
|
41
|
-
getPreferencesV1(requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<Chrt.CourierNotificationPreferences1>;
|
|
42
|
-
private __getPreferencesV1;
|
|
43
|
-
/**
|
|
44
|
-
* Creates or updates notification preferences for the caller's courier organization. | (CourierNotificationPreferencesClientCreate1) -> (PydanticObjectId)
|
|
45
|
-
*
|
|
46
|
-
* @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
|
|
47
|
-
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
-
*
|
|
49
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* await client.notifications.courier.upsertPreferencesV1({
|
|
53
|
-
* schema_version: 1
|
|
54
|
-
* })
|
|
55
|
-
*/
|
|
56
|
-
upsertPreferencesV1(request: Chrt.notifications.CourierNotificationPreferencesClientCreate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<string>;
|
|
57
|
-
private __upsertPreferencesV1;
|
|
58
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
59
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.Courier = 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 Courier {
|
|
55
|
-
constructor(_options = {}) {
|
|
56
|
-
this._options = _options;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves notification preferences for the caller's courier organization. | () -> (CourierNotificationPreferences1)
|
|
60
|
-
*
|
|
61
|
-
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* await client.notifications.courier.getPreferencesV1()
|
|
65
|
-
*/
|
|
66
|
-
getPreferencesV1(requestOptions) {
|
|
67
|
-
return core.HttpResponsePromise.fromPromise(this.__getPreferencesV1(requestOptions));
|
|
68
|
-
}
|
|
69
|
-
__getPreferencesV1(requestOptions) {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
var _a, _b, _c, _d;
|
|
72
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
73
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
74
|
-
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/courier_preferences/v1"),
|
|
75
|
-
method: "GET",
|
|
76
|
-
headers: _headers,
|
|
77
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
78
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
81
|
-
});
|
|
82
|
-
if (_response.ok) {
|
|
83
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
84
|
-
}
|
|
85
|
-
if (_response.error.reason === "status-code") {
|
|
86
|
-
throw new errors.ChrtError({
|
|
87
|
-
statusCode: _response.error.statusCode,
|
|
88
|
-
body: _response.error.body,
|
|
89
|
-
rawResponse: _response.rawResponse,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
switch (_response.error.reason) {
|
|
93
|
-
case "non-json":
|
|
94
|
-
throw new errors.ChrtError({
|
|
95
|
-
statusCode: _response.error.statusCode,
|
|
96
|
-
body: _response.error.rawBody,
|
|
97
|
-
rawResponse: _response.rawResponse,
|
|
98
|
-
});
|
|
99
|
-
case "timeout":
|
|
100
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /notifications/courier_preferences/v1.");
|
|
101
|
-
case "unknown":
|
|
102
|
-
throw new errors.ChrtError({
|
|
103
|
-
message: _response.error.errorMessage,
|
|
104
|
-
rawResponse: _response.rawResponse,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Creates or updates notification preferences for the caller's courier organization. | (CourierNotificationPreferencesClientCreate1) -> (PydanticObjectId)
|
|
111
|
-
*
|
|
112
|
-
* @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
|
|
113
|
-
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
-
*
|
|
115
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* await client.notifications.courier.upsertPreferencesV1({
|
|
119
|
-
* schema_version: 1
|
|
120
|
-
* })
|
|
121
|
-
*/
|
|
122
|
-
upsertPreferencesV1(request, requestOptions) {
|
|
123
|
-
return core.HttpResponsePromise.fromPromise(this.__upsertPreferencesV1(request, requestOptions));
|
|
124
|
-
}
|
|
125
|
-
__upsertPreferencesV1(request, requestOptions) {
|
|
126
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
var _a, _b, _c, _d;
|
|
128
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
129
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
130
|
-
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/courier_preferences/upsert/v1"),
|
|
131
|
-
method: "POST",
|
|
132
|
-
headers: _headers,
|
|
133
|
-
contentType: "application/json",
|
|
134
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
135
|
-
requestType: "json",
|
|
136
|
-
body: request,
|
|
137
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
138
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
139
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
140
|
-
});
|
|
141
|
-
if (_response.ok) {
|
|
142
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
143
|
-
}
|
|
144
|
-
if (_response.error.reason === "status-code") {
|
|
145
|
-
switch (_response.error.statusCode) {
|
|
146
|
-
case 422:
|
|
147
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
148
|
-
default:
|
|
149
|
-
throw new errors.ChrtError({
|
|
150
|
-
statusCode: _response.error.statusCode,
|
|
151
|
-
body: _response.error.body,
|
|
152
|
-
rawResponse: _response.rawResponse,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
switch (_response.error.reason) {
|
|
157
|
-
case "non-json":
|
|
158
|
-
throw new errors.ChrtError({
|
|
159
|
-
statusCode: _response.error.statusCode,
|
|
160
|
-
body: _response.error.rawBody,
|
|
161
|
-
rawResponse: _response.rawResponse,
|
|
162
|
-
});
|
|
163
|
-
case "timeout":
|
|
164
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/courier_preferences/upsert/v1.");
|
|
165
|
-
case "unknown":
|
|
166
|
-
throw new errors.ChrtError({
|
|
167
|
-
message: _response.error.errorMessage,
|
|
168
|
-
rawResponse: _response.rawResponse,
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
_getAuthorizationHeader() {
|
|
174
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
176
|
-
if (bearer != null) {
|
|
177
|
-
return `Bearer ${bearer}`;
|
|
178
|
-
}
|
|
179
|
-
return undefined;
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
exports.Courier = Courier;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../../../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* schema_version: 1
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface CourierNotificationPreferencesClientCreate1 {
|
|
12
|
-
schema_version: number;
|
|
13
|
-
email_addresses?: string[];
|
|
14
|
-
sms_phone_numbers?: string[];
|
|
15
|
-
voice_phone_numbers?: string[];
|
|
16
|
-
/** For each CourierNotificationEventEnum, which channels (email/sms/push/phone_call) are enabled */
|
|
17
|
-
preferences?: Record<string, Chrt.NotificationChannelEnum[]>;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type CourierNotificationPreferencesClientCreate1 } from "./CourierNotificationPreferencesClientCreate1.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client/index.js"), exports);
|