@automate.ax/integration-contracts 0.152.0 → 0.152.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,9 @@ export function getHighLevelApi(account) {
58
58
  pathValues.set(name, inputRecord[name]);
59
59
  }
60
60
  for (const { name } of definition.queryParameters) {
61
- queryValues.set(name, inputRecord[name]);
61
+ queryValues.set(name, inputRecord[name] === undefined
62
+ ? queryParameterDefault(definition.inputSchema, name)
63
+ : inputRecord[name]);
62
64
  }
63
65
  for (const name of definition.bodyParameters) {
64
66
  if (inputRecord[name] !== undefined)
@@ -122,6 +124,27 @@ export function getHighLevelApi(account) {
122
124
  },
123
125
  };
124
126
  }
127
+ /**
128
+ * Reads one documented top-level query default from a generated input schema.
129
+ *
130
+ * @param schema - Generated operation input schema.
131
+ * @param name - Public query parameter name.
132
+ */
133
+ function queryParameterDefault(schema, name) {
134
+ const properties = schema.properties;
135
+ if (!isRecord(properties))
136
+ return undefined;
137
+ const property = properties[name];
138
+ return isRecord(property) ? property.default : undefined;
139
+ }
140
+ /**
141
+ * Whether one unknown JSON value is an object record.
142
+ *
143
+ * @param value - Candidate value.
144
+ */
145
+ function isRecord(value) {
146
+ return typeof value === "object" && value !== null && !Array.isArray(value);
147
+ }
125
148
  /**
126
149
  * Encodes one required path parameter.
127
150
  *
@@ -330,10 +330,18 @@
330
330
  },
331
331
  "openHours": {
332
332
  "description": "This is only to set the standard availability. For custom availability, use the availabilities property",
333
- "type": "array",
334
- "items": {
335
- "$ref": "#/$defs/calendars.OpenHour"
336
- }
333
+ "anyOf": [
334
+ {
335
+ "items": {
336
+ "$ref": "#/$defs/calendars.OpenHour"
337
+ },
338
+ "type": "array"
339
+ },
340
+ {
341
+ "additionalProperties": true,
342
+ "type": "object"
343
+ }
344
+ ]
337
345
  },
338
346
  "enableRecurring": {
339
347
  "type": "boolean",
@@ -518,22 +526,22 @@
518
526
  ]
519
527
  },
520
528
  "startTime": {
521
- "type": "object",
529
+ "type": "string",
522
530
  "description": "Start Time",
523
531
  "example": "2023-09-25T16:00:00+05:30"
524
532
  },
525
533
  "endTime": {
526
- "type": "object",
534
+ "type": "string",
527
535
  "description": "End Time",
528
536
  "example": "2023-09-25T16:00:00+05:30"
529
537
  },
530
538
  "dateAdded": {
531
- "type": "object",
539
+ "type": "string",
532
540
  "description": "Date Added",
533
541
  "example": "2023-09-25T16:00:00+05:30"
534
542
  },
535
543
  "dateUpdated": {
536
- "type": "object",
544
+ "type": "string",
537
545
  "description": "Date Updated",
538
546
  "example": "2023-09-25T16:00:00+05:30"
539
547
  },
@@ -563,11 +571,6 @@
563
571
  "title",
564
572
  "calendarId",
565
573
  "locationId",
566
- "contactId",
567
- "groupId",
568
- "appointmentStatus",
569
- "assignedUserId",
570
- "users",
571
574
  "startTime",
572
575
  "endTime",
573
576
  "dateAdded",
@@ -625,15 +628,22 @@
625
628
  "type": "object",
626
629
  "properties": {
627
630
  "userId": {
628
- "type": "string",
629
- "description": "The ID of the user who created or updated the appointment"
631
+ "anyOf": [
632
+ {
633
+ "type": "string",
634
+ "description": "The ID of the user who created or updated the appointment"
635
+ },
636
+ {
637
+ "type": "null"
638
+ }
639
+ ]
630
640
  },
631
641
  "source": {
632
642
  "type": "string",
633
643
  "description": "The source of the appointment"
634
644
  }
635
645
  },
636
- "required": ["source"]
646
+ "required": []
637
647
  },
638
648
  "calendars.DeleteEventSuccessfulResponseDto": {
639
649
  "type": "object",
@@ -1369,20 +1379,41 @@
1369
1379
  "example": "C2QujeCh8ZnC7al2InWR"
1370
1380
  },
1371
1381
  "email": {
1372
- "type": "string",
1373
- "example": "JohnDeo@gmail.com"
1382
+ "anyOf": [
1383
+ {
1384
+ "type": "string",
1385
+ "example": "JohnDeo@gmail.com"
1386
+ },
1387
+ {
1388
+ "type": "null"
1389
+ }
1390
+ ]
1374
1391
  },
1375
1392
  "timezone": {
1376
- "type": "string",
1377
- "example": "Asia/Calcutta"
1393
+ "anyOf": [
1394
+ {
1395
+ "type": "string",
1396
+ "example": "Asia/Calcutta"
1397
+ },
1398
+ {
1399
+ "type": "null"
1400
+ }
1401
+ ]
1378
1402
  },
1379
1403
  "country": {
1380
1404
  "type": "string",
1381
1405
  "example": "DE"
1382
1406
  },
1383
1407
  "source": {
1384
- "type": "string",
1385
- "example": "xyz form"
1408
+ "anyOf": [
1409
+ {
1410
+ "type": "string",
1411
+ "example": "xyz form"
1412
+ },
1413
+ {
1414
+ "type": "null"
1415
+ }
1416
+ ]
1386
1417
  },
1387
1418
  "dateAdded": {
1388
1419
  "type": "string",
@@ -1402,8 +1433,15 @@
1402
1433
  }
1403
1434
  },
1404
1435
  "businessId": {
1405
- "type": "string",
1406
- "example": "641c094001436dbc2081e642"
1436
+ "anyOf": [
1437
+ {
1438
+ "type": "string",
1439
+ "example": "641c094001436dbc2081e642"
1440
+ },
1441
+ {
1442
+ "type": "null"
1443
+ }
1444
+ ]
1407
1445
  },
1408
1446
  "attributions": {
1409
1447
  "type": "array",
@@ -2450,7 +2488,8 @@
2450
2488
  "TYPE_TIKTOK_COMMENT",
2451
2489
  "TYPE_ACTIVITY_WHATSAPP",
2452
2490
  "TYPE_FORM_SUBMISSION",
2453
- "TYPE_SMS_REACTION"
2491
+ "TYPE_SMS_REACTION",
2492
+ "TYPE_NO_SHOW"
2454
2493
  ]
2455
2494
  },
2456
2495
  "type": {
@@ -2481,28 +2520,39 @@
2481
2520
  "example": "John Doe Company"
2482
2521
  },
2483
2522
  "email": {
2484
- "type": "string",
2485
- "description": "Primary email address of the contact",
2486
- "example": "johndoe@mailingdomain.com"
2523
+ "anyOf": [
2524
+ {
2525
+ "type": "string",
2526
+ "description": "Primary email address of the contact",
2527
+ "example": "johndoe@mailingdomain.com"
2528
+ },
2529
+ {
2530
+ "type": "null"
2531
+ }
2532
+ ]
2487
2533
  },
2488
2534
  "phone": {
2489
- "type": "string",
2490
- "description": "Primary phone number of the contact",
2491
- "example": "+15550001234"
2535
+ "anyOf": [
2536
+ {
2537
+ "type": "string",
2538
+ "description": "Primary phone number of the contact",
2539
+ "example": "+15550001234"
2540
+ },
2541
+ {
2542
+ "type": "null"
2543
+ }
2544
+ ]
2492
2545
  }
2493
2546
  },
2494
2547
  "required": [
2495
2548
  "id",
2496
2549
  "contactId",
2497
2550
  "locationId",
2498
- "lastMessageBody",
2499
2551
  "lastMessageType",
2500
2552
  "type",
2501
2553
  "unreadCount",
2502
2554
  "fullName",
2503
- "contactName",
2504
- "email",
2505
- "phone"
2555
+ "contactName"
2506
2556
  ]
2507
2557
  },
2508
2558
  "conversations.CreateConversationSuccessResponse": {
@@ -3024,9 +3074,13 @@
3024
3074
  "description": "Message status",
3025
3075
  "example": "delivered",
3026
3076
  "enum": ["delivered", "failed", "pending", "read"]
3077
+ },
3078
+ "threadId": {
3079
+ "description": "Email conversation thread ID.",
3080
+ "type": "string"
3027
3081
  }
3028
3082
  },
3029
- "required": ["conversationId", "messageId", "status"]
3083
+ "required": ["conversationId", "messageId"]
3030
3084
  },
3031
3085
  "forms.ContactSessionIds": {
3032
3086
  "type": "object",
@@ -3674,7 +3728,29 @@
3674
3728
  "stages": {
3675
3729
  "type": "array",
3676
3730
  "items": {
3677
- "type": "array"
3731
+ "additionalProperties": true,
3732
+ "properties": {
3733
+ "id": {
3734
+ "type": "string"
3735
+ },
3736
+ "name": {
3737
+ "type": "string"
3738
+ },
3739
+ "position": {
3740
+ "type": "number"
3741
+ },
3742
+ "showInFunnel": {
3743
+ "type": "boolean"
3744
+ },
3745
+ "showInPieChart": {
3746
+ "type": "boolean"
3747
+ },
3748
+ "stageWinProbability": {
3749
+ "type": "number"
3750
+ }
3751
+ },
3752
+ "required": ["id", "name"],
3753
+ "type": "object"
3678
3754
  }
3679
3755
  },
3680
3756
  "showInFunnel": {
@@ -3720,12 +3796,29 @@
3720
3796
  "example": 2
3721
3797
  },
3722
3798
  "nextPage": {
3723
- "type": "number",
3724
- "example": 3
3799
+ "example": 3,
3800
+ "anyOf": [
3801
+ {
3802
+ "type": "number"
3803
+ },
3804
+ {
3805
+ "type": "string"
3806
+ },
3807
+ {
3808
+ "type": "null"
3809
+ }
3810
+ ]
3725
3811
  },
3726
3812
  "prevPage": {
3727
- "type": "number",
3728
- "example": 1
3813
+ "anyOf": [
3814
+ {
3815
+ "type": "number",
3816
+ "example": 1
3817
+ },
3818
+ {
3819
+ "type": "null"
3820
+ }
3821
+ ]
3729
3822
  }
3730
3823
  }
3731
3824
  },
@@ -3741,16 +3834,37 @@
3741
3834
  "example": "John Deo"
3742
3835
  },
3743
3836
  "companyName": {
3744
- "type": "string",
3745
- "example": "Tesla Inc"
3837
+ "anyOf": [
3838
+ {
3839
+ "type": "string",
3840
+ "example": "Tesla Inc"
3841
+ },
3842
+ {
3843
+ "type": "null"
3844
+ }
3845
+ ]
3746
3846
  },
3747
3847
  "email": {
3748
- "type": "string",
3749
- "example": "john@deo.com"
3848
+ "anyOf": [
3849
+ {
3850
+ "type": "string",
3851
+ "example": "john@deo.com"
3852
+ },
3853
+ {
3854
+ "type": "null"
3855
+ }
3856
+ ]
3750
3857
  },
3751
3858
  "phone": {
3752
- "type": "string",
3753
- "example": "+1202-555-0107"
3859
+ "anyOf": [
3860
+ {
3861
+ "type": "string",
3862
+ "example": "+1202-555-0107"
3863
+ },
3864
+ {
3865
+ "type": "null"
3866
+ }
3867
+ ]
3754
3868
  },
3755
3869
  "tags": {
3756
3870
  "type": "array",
@@ -3784,16 +3898,30 @@
3784
3898
  "example": "e93ba61a-53b3-45e7-985a-c7732dbcdb69"
3785
3899
  },
3786
3900
  "assignedTo": {
3787
- "type": "string",
3788
- "example": "zT46WSCPbudrq4zhWMk6"
3901
+ "anyOf": [
3902
+ {
3903
+ "type": "string",
3904
+ "example": "zT46WSCPbudrq4zhWMk6"
3905
+ },
3906
+ {
3907
+ "type": "null"
3908
+ }
3909
+ ]
3789
3910
  },
3790
3911
  "status": {
3791
3912
  "type": "string",
3792
3913
  "example": "open"
3793
3914
  },
3794
3915
  "source": {
3795
- "type": "string",
3796
- "example": ""
3916
+ "anyOf": [
3917
+ {
3918
+ "type": "string",
3919
+ "example": ""
3920
+ },
3921
+ {
3922
+ "type": "null"
3923
+ }
3924
+ ]
3797
3925
  },
3798
3926
  "lastStatusChangeAt": {
3799
3927
  "type": "string",
@@ -3849,8 +3977,15 @@
3849
3977
  }
3850
3978
  },
3851
3979
  "lostReasonId": {
3852
- "type": "string",
3853
- "example": "zT46WSCPbudrq4zhWMk6"
3980
+ "anyOf": [
3981
+ {
3982
+ "type": "string",
3983
+ "example": "zT46WSCPbudrq4zhWMk6"
3984
+ },
3985
+ {
3986
+ "type": "null"
3987
+ }
3988
+ ]
3854
3989
  },
3855
3990
  "customFields": {
3856
3991
  "type": "array",
@@ -5873,7 +6008,18 @@
5873
6008
  }
5874
6009
  },
5875
6010
  "required": ["startTime", "endTime"],
5876
- "type": "object"
6011
+ "type": "object",
6012
+ "anyOf": [
6013
+ {
6014
+ "required": ["calendarId"]
6015
+ },
6016
+ {
6017
+ "required": ["groupId"]
6018
+ },
6019
+ {
6020
+ "required": ["userId"]
6021
+ }
6022
+ ]
5877
6023
  },
5878
6024
  "locationPlacements": ["query"],
5879
6025
  "locationParameterNames": {
@@ -5974,7 +6120,18 @@
5974
6120
  }
5975
6121
  },
5976
6122
  "required": ["startTime", "endTime"],
5977
- "type": "object"
6123
+ "type": "object",
6124
+ "anyOf": [
6125
+ {
6126
+ "required": ["calendarId"]
6127
+ },
6128
+ {
6129
+ "required": ["groupId"]
6130
+ },
6131
+ {
6132
+ "required": ["userId"]
6133
+ }
6134
+ ]
5978
6135
  },
5979
6136
  "locationPlacements": ["query"],
5980
6137
  "locationParameterNames": {
@@ -8250,6 +8407,32 @@
8250
8407
  "responseMode": "json",
8251
8408
  "requiredScope": "contacts.write"
8252
8409
  },
8410
+ "conversations:cancel-scheduled-email-message": {
8411
+ "apiVersion": "2021-07-28",
8412
+ "bodyParameters": [],
8413
+ "inputSchema": {
8414
+ "additionalProperties": false,
8415
+ "properties": {
8416
+ "emailMessageId": {
8417
+ "example": "ve9EPM428h8vShlRW1KT",
8418
+ "type": "string"
8419
+ }
8420
+ },
8421
+ "required": ["emailMessageId"],
8422
+ "type": "object"
8423
+ },
8424
+ "locationPlacements": [],
8425
+ "locationParameterNames": {},
8426
+ "method": "DELETE",
8427
+ "outputSchema": {
8428
+ "$ref": "#/$defs/conversations.CancelScheduledResponseDto"
8429
+ },
8430
+ "path": "/conversations/messages/email/{emailMessageId}/schedule",
8431
+ "pathParameters": ["emailMessageId"],
8432
+ "queryParameters": [],
8433
+ "responseMode": "json",
8434
+ "requiredScope": "conversations/message.write"
8435
+ },
8253
8436
  "conversations:cancel-scheduled-message": {
8254
8437
  "apiVersion": "2021-04-15",
8255
8438
  "bodyParameters": [],
@@ -9844,7 +10027,7 @@
9844
10027
  "example": "7915dedc-8f18-44d5-8bc3-77c04e994a10"
9845
10028
  },
9846
10029
  "monetaryValue": {
9847
- "type": "object",
10030
+ "type": "number",
9848
10031
  "example": 220
9849
10032
  },
9850
10033
  "assignedTo": {