@medalsocial/sdk 1.8.0 → 1.9.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/README.md +25 -0
- package/dist/openapi/medal-social.openapi.json +923 -25
- package/dist/src/index.d.mts +189 -1
- package/dist/src/index.d.ts +189 -1
- package/dist/src/index.js +61 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +61 -0
- package/dist/src/index.mjs.map +1 -1
- package/dist/src/openapi.generated.d.mts +422 -1
- package/dist/src/openapi.generated.d.ts +422 -1
- package/dist/src/openapi.generated.js.map +1 -1
- package/openapi/medal-social.openapi.yaml +539 -4
- package/package.json +1 -1
- package/skills/resources/SKILL.md +3 -0
|
@@ -1229,6 +1229,261 @@
|
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
1231
|
},
|
|
1232
|
+
"/api/v1/bookings/persons": {
|
|
1233
|
+
"get": {
|
|
1234
|
+
"tags": [
|
|
1235
|
+
"Bookings"
|
|
1236
|
+
],
|
|
1237
|
+
"operationId": "listContactPersons",
|
|
1238
|
+
"summary": "List a contact's persons",
|
|
1239
|
+
"description": "Persons a contact books for — a child, a pet, an employee. No login of their own. Active-only unless `include_inactive` is set.",
|
|
1240
|
+
"parameters": [
|
|
1241
|
+
{
|
|
1242
|
+
"name": "contact_id",
|
|
1243
|
+
"in": "query",
|
|
1244
|
+
"required": true,
|
|
1245
|
+
"schema": {
|
|
1246
|
+
"type": "string"
|
|
1247
|
+
}
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
"name": "include_inactive",
|
|
1251
|
+
"in": "query",
|
|
1252
|
+
"schema": {
|
|
1253
|
+
"type": "boolean"
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
],
|
|
1257
|
+
"responses": {
|
|
1258
|
+
"200": {
|
|
1259
|
+
"description": "Contact persons.",
|
|
1260
|
+
"content": {
|
|
1261
|
+
"application/json": {
|
|
1262
|
+
"schema": {
|
|
1263
|
+
"$ref": "#/components/schemas/ApiResponse_ContactPersonArray"
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
"default": {
|
|
1269
|
+
"$ref": "#/components/responses/ApiError"
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
"post": {
|
|
1274
|
+
"tags": [
|
|
1275
|
+
"Bookings"
|
|
1276
|
+
],
|
|
1277
|
+
"operationId": "createContactPerson",
|
|
1278
|
+
"summary": "Add a person under a contact",
|
|
1279
|
+
"requestBody": {
|
|
1280
|
+
"required": true,
|
|
1281
|
+
"content": {
|
|
1282
|
+
"application/json": {
|
|
1283
|
+
"schema": {
|
|
1284
|
+
"$ref": "#/components/schemas/CreateContactPersonInput"
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
"responses": {
|
|
1290
|
+
"201": {
|
|
1291
|
+
"description": "Created person.",
|
|
1292
|
+
"content": {
|
|
1293
|
+
"application/json": {
|
|
1294
|
+
"schema": {
|
|
1295
|
+
"$ref": "#/components/schemas/ApiResponse_ContactPerson"
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
"default": {
|
|
1301
|
+
"$ref": "#/components/responses/ApiError"
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
"/api/v1/bookings/relations": {
|
|
1307
|
+
"get": {
|
|
1308
|
+
"tags": [
|
|
1309
|
+
"Bookings"
|
|
1310
|
+
],
|
|
1311
|
+
"operationId": "listContactRelations",
|
|
1312
|
+
"summary": "List a contact's relations",
|
|
1313
|
+
"description": "Directional relations a contact holds, split into outgoing and incoming.",
|
|
1314
|
+
"parameters": [
|
|
1315
|
+
{
|
|
1316
|
+
"name": "contact_id",
|
|
1317
|
+
"in": "query",
|
|
1318
|
+
"required": true,
|
|
1319
|
+
"schema": {
|
|
1320
|
+
"type": "string"
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
],
|
|
1324
|
+
"responses": {
|
|
1325
|
+
"200": {
|
|
1326
|
+
"description": "Outgoing and incoming relations.",
|
|
1327
|
+
"content": {
|
|
1328
|
+
"application/json": {
|
|
1329
|
+
"schema": {
|
|
1330
|
+
"$ref": "#/components/schemas/ApiResponse_ContactRelations"
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
"default": {
|
|
1336
|
+
"$ref": "#/components/responses/ApiError"
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
"post": {
|
|
1341
|
+
"tags": [
|
|
1342
|
+
"Bookings"
|
|
1343
|
+
],
|
|
1344
|
+
"operationId": "createContactRelation",
|
|
1345
|
+
"summary": "Create a relation from one contact to another",
|
|
1346
|
+
"requestBody": {
|
|
1347
|
+
"required": true,
|
|
1348
|
+
"content": {
|
|
1349
|
+
"application/json": {
|
|
1350
|
+
"schema": {
|
|
1351
|
+
"$ref": "#/components/schemas/CreateContactRelationInput"
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
"responses": {
|
|
1357
|
+
"201": {
|
|
1358
|
+
"description": "Created relation id.",
|
|
1359
|
+
"content": {
|
|
1360
|
+
"application/json": {
|
|
1361
|
+
"schema": {
|
|
1362
|
+
"$ref": "#/components/schemas/ApiResponse_CreateContactRelationResult"
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
"default": {
|
|
1368
|
+
"$ref": "#/components/responses/ApiError"
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1373
|
+
"/api/v1/bookings/events": {
|
|
1374
|
+
"get": {
|
|
1375
|
+
"tags": [
|
|
1376
|
+
"Bookings"
|
|
1377
|
+
],
|
|
1378
|
+
"operationId": "listBookingEvents",
|
|
1379
|
+
"summary": "List arrangementer in a date range",
|
|
1380
|
+
"parameters": [
|
|
1381
|
+
{
|
|
1382
|
+
"name": "from",
|
|
1383
|
+
"in": "query",
|
|
1384
|
+
"required": true,
|
|
1385
|
+
"description": "Start of the window, `yyyy-mm-dd`, inclusive.",
|
|
1386
|
+
"schema": {
|
|
1387
|
+
"type": "string",
|
|
1388
|
+
"format": "date"
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"name": "to",
|
|
1393
|
+
"in": "query",
|
|
1394
|
+
"required": true,
|
|
1395
|
+
"description": "End of the window, `yyyy-mm-dd`, inclusive.",
|
|
1396
|
+
"schema": {
|
|
1397
|
+
"type": "string",
|
|
1398
|
+
"format": "date"
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
"name": "status",
|
|
1403
|
+
"in": "query",
|
|
1404
|
+
"schema": {
|
|
1405
|
+
"$ref": "#/components/schemas/BookingEventStatus"
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
],
|
|
1409
|
+
"responses": {
|
|
1410
|
+
"200": {
|
|
1411
|
+
"description": "Arrangementer in the window.",
|
|
1412
|
+
"content": {
|
|
1413
|
+
"application/json": {
|
|
1414
|
+
"schema": {
|
|
1415
|
+
"$ref": "#/components/schemas/ApiResponse_BookingEventArray"
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
"default": {
|
|
1421
|
+
"$ref": "#/components/responses/ApiError"
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
"post": {
|
|
1426
|
+
"tags": [
|
|
1427
|
+
"Bookings"
|
|
1428
|
+
],
|
|
1429
|
+
"operationId": "createBookingEvent",
|
|
1430
|
+
"summary": "Create an arrangement from a template",
|
|
1431
|
+
"requestBody": {
|
|
1432
|
+
"required": true,
|
|
1433
|
+
"content": {
|
|
1434
|
+
"application/json": {
|
|
1435
|
+
"schema": {
|
|
1436
|
+
"$ref": "#/components/schemas/CreateBookingEventInput"
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
"responses": {
|
|
1442
|
+
"201": {
|
|
1443
|
+
"description": "Created arrangement.",
|
|
1444
|
+
"content": {
|
|
1445
|
+
"application/json": {
|
|
1446
|
+
"schema": {
|
|
1447
|
+
"$ref": "#/components/schemas/ApiResponse_BookingEvent"
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
},
|
|
1452
|
+
"default": {
|
|
1453
|
+
"$ref": "#/components/responses/ApiError"
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
"/api/v1/bookings/events/{id}": {
|
|
1459
|
+
"parameters": [
|
|
1460
|
+
{
|
|
1461
|
+
"$ref": "#/components/parameters/Id"
|
|
1462
|
+
}
|
|
1463
|
+
],
|
|
1464
|
+
"get": {
|
|
1465
|
+
"tags": [
|
|
1466
|
+
"Bookings"
|
|
1467
|
+
],
|
|
1468
|
+
"operationId": "getBookingEvent",
|
|
1469
|
+
"summary": "Get an arrangement",
|
|
1470
|
+
"responses": {
|
|
1471
|
+
"200": {
|
|
1472
|
+
"description": "Arrangement.",
|
|
1473
|
+
"content": {
|
|
1474
|
+
"application/json": {
|
|
1475
|
+
"schema": {
|
|
1476
|
+
"$ref": "#/components/schemas/ApiResponse_BookingEvent"
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
"default": {
|
|
1482
|
+
"$ref": "#/components/responses/ApiError"
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1232
1487
|
"/api/v1/bookings/{id}": {
|
|
1233
1488
|
"parameters": [
|
|
1234
1489
|
{
|
|
@@ -1706,7 +1961,7 @@
|
|
|
1706
1961
|
],
|
|
1707
1962
|
"operationId": "exportPortalData",
|
|
1708
1963
|
"summary": "Export everything held about the signed-in contact",
|
|
1709
|
-
"description": "A synchronous GDPR Art. 15 export of the contact's profile, family, consents and bookings, as one JSON document. Read-only, so not idempotency-keyed. Errors: `401 PORTAL_SESSION_REQUIRED`, `401 PORTAL_SESSION_INVALID`, `403 FORBIDDEN`, `429 RATE_LIMITED`.",
|
|
1964
|
+
"description": "A synchronous GDPR Art. 15 export of the contact's profile, family, consents and bookings, as one JSON document. Unlike `GET /api/v1/portal/me`, `contact.persons` here includes inactive persons so the export is a complete dump. `relations` lists every relation the contact is a party to, exposing only the counterpart's display name. Read-only, so not idempotency-keyed. Errors: `401 PORTAL_SESSION_REQUIRED`, `401 PORTAL_SESSION_INVALID`, `403 FORBIDDEN`, `429 RATE_LIMITED`.",
|
|
1710
1965
|
"responses": {
|
|
1711
1966
|
"200": {
|
|
1712
1967
|
"description": "The export.",
|
|
@@ -4429,6 +4684,9 @@
|
|
|
4429
4684
|
"end_ts",
|
|
4430
4685
|
"booked_for_name",
|
|
4431
4686
|
"booked_for_birth_year",
|
|
4687
|
+
"booked_for_person_id",
|
|
4688
|
+
"event_id",
|
|
4689
|
+
"event_order",
|
|
4432
4690
|
"party_sequence_id",
|
|
4433
4691
|
"status",
|
|
4434
4692
|
"cancelled_by",
|
|
@@ -4491,6 +4749,27 @@
|
|
|
4491
4749
|
"null"
|
|
4492
4750
|
]
|
|
4493
4751
|
},
|
|
4752
|
+
"booked_for_person_id": {
|
|
4753
|
+
"description": "The ContactPerson this booking was made for, if any.",
|
|
4754
|
+
"type": [
|
|
4755
|
+
"string",
|
|
4756
|
+
"null"
|
|
4757
|
+
]
|
|
4758
|
+
},
|
|
4759
|
+
"event_id": {
|
|
4760
|
+
"description": "The BookingEvent this booking is a registration for, if any.",
|
|
4761
|
+
"type": [
|
|
4762
|
+
"string",
|
|
4763
|
+
"null"
|
|
4764
|
+
]
|
|
4765
|
+
},
|
|
4766
|
+
"event_order": {
|
|
4767
|
+
"description": "Position of this booking within its event's registrations, if any.",
|
|
4768
|
+
"type": [
|
|
4769
|
+
"integer",
|
|
4770
|
+
"null"
|
|
4771
|
+
]
|
|
4772
|
+
},
|
|
4494
4773
|
"party_sequence_id": {
|
|
4495
4774
|
"description": "Shared by every booking created in the same party request.",
|
|
4496
4775
|
"type": [
|
|
@@ -4899,6 +5178,10 @@
|
|
|
4899
5178
|
"type": "integer",
|
|
4900
5179
|
"minimum": 1900,
|
|
4901
5180
|
"maximum": 2200
|
|
5181
|
+
},
|
|
5182
|
+
"booked_for_person_id": {
|
|
5183
|
+
"description": "Book this line on behalf of a ContactPerson rather than the contact.",
|
|
5184
|
+
"type": "string"
|
|
4902
5185
|
}
|
|
4903
5186
|
}
|
|
4904
5187
|
},
|
|
@@ -7145,51 +7428,124 @@
|
|
|
7145
7428
|
}
|
|
7146
7429
|
}
|
|
7147
7430
|
},
|
|
7148
|
-
"
|
|
7431
|
+
"PortalPerson": {
|
|
7432
|
+
"description": "A person the contact books for — a child, a pet — with no login of its own.",
|
|
7149
7433
|
"type": "object",
|
|
7150
7434
|
"required": [
|
|
7151
|
-
"
|
|
7152
|
-
"
|
|
7153
|
-
"
|
|
7154
|
-
"
|
|
7155
|
-
"
|
|
7156
|
-
"
|
|
7157
|
-
"
|
|
7158
|
-
"created_at"
|
|
7435
|
+
"person_id",
|
|
7436
|
+
"name",
|
|
7437
|
+
"birth_year",
|
|
7438
|
+
"relation_type",
|
|
7439
|
+
"relation_label",
|
|
7440
|
+
"notes",
|
|
7441
|
+
"active"
|
|
7159
7442
|
],
|
|
7160
7443
|
"properties": {
|
|
7161
|
-
"
|
|
7444
|
+
"person_id": {
|
|
7162
7445
|
"type": "string"
|
|
7163
7446
|
},
|
|
7164
|
-
"
|
|
7447
|
+
"name": {
|
|
7165
7448
|
"type": "string"
|
|
7166
7449
|
},
|
|
7167
|
-
"
|
|
7450
|
+
"birth_year": {
|
|
7168
7451
|
"type": [
|
|
7169
|
-
"
|
|
7452
|
+
"integer",
|
|
7170
7453
|
"null"
|
|
7171
7454
|
]
|
|
7172
7455
|
},
|
|
7173
|
-
"
|
|
7456
|
+
"relation_type": {
|
|
7457
|
+
"$ref": "#/components/schemas/RelationType"
|
|
7458
|
+
},
|
|
7459
|
+
"relation_label": {
|
|
7174
7460
|
"type": [
|
|
7175
7461
|
"string",
|
|
7176
7462
|
"null"
|
|
7177
7463
|
]
|
|
7178
7464
|
},
|
|
7179
|
-
"
|
|
7465
|
+
"notes": {
|
|
7180
7466
|
"type": [
|
|
7181
7467
|
"string",
|
|
7182
7468
|
"null"
|
|
7183
7469
|
]
|
|
7184
7470
|
},
|
|
7185
|
-
"
|
|
7186
|
-
"type": "
|
|
7187
|
-
"
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7471
|
+
"active": {
|
|
7472
|
+
"type": "boolean",
|
|
7473
|
+
"description": "False for a person the customer removed or that was promoted to its own contact; `me` returns active persons only, the export returns all."
|
|
7474
|
+
}
|
|
7475
|
+
}
|
|
7476
|
+
},
|
|
7477
|
+
"PortalLabels": {
|
|
7478
|
+
"description": "The workspace's own words for the person concept, e.g. `\"Barn\"`.",
|
|
7479
|
+
"type": "object",
|
|
7480
|
+
"required": [
|
|
7481
|
+
"person",
|
|
7482
|
+
"persons"
|
|
7483
|
+
],
|
|
7484
|
+
"properties": {
|
|
7485
|
+
"person": {
|
|
7486
|
+
"type": "string"
|
|
7487
|
+
},
|
|
7488
|
+
"persons": {
|
|
7489
|
+
"type": "string"
|
|
7490
|
+
}
|
|
7491
|
+
}
|
|
7492
|
+
},
|
|
7493
|
+
"PortalProfile": {
|
|
7494
|
+
"type": "object",
|
|
7495
|
+
"required": [
|
|
7496
|
+
"contact_id",
|
|
7497
|
+
"email",
|
|
7498
|
+
"first_name",
|
|
7499
|
+
"last_name",
|
|
7500
|
+
"phone",
|
|
7501
|
+
"family",
|
|
7502
|
+
"persons",
|
|
7503
|
+
"labels",
|
|
7504
|
+
"marketing_consent",
|
|
7505
|
+
"created_at"
|
|
7506
|
+
],
|
|
7507
|
+
"properties": {
|
|
7508
|
+
"contact_id": {
|
|
7509
|
+
"type": "string"
|
|
7510
|
+
},
|
|
7511
|
+
"email": {
|
|
7512
|
+
"type": "string"
|
|
7513
|
+
},
|
|
7514
|
+
"first_name": {
|
|
7515
|
+
"type": [
|
|
7516
|
+
"string",
|
|
7517
|
+
"null"
|
|
7518
|
+
]
|
|
7519
|
+
},
|
|
7520
|
+
"last_name": {
|
|
7521
|
+
"type": [
|
|
7522
|
+
"string",
|
|
7523
|
+
"null"
|
|
7524
|
+
]
|
|
7525
|
+
},
|
|
7526
|
+
"phone": {
|
|
7527
|
+
"type": [
|
|
7528
|
+
"string",
|
|
7529
|
+
"null"
|
|
7530
|
+
]
|
|
7531
|
+
},
|
|
7532
|
+
"family": {
|
|
7533
|
+
"type": "array",
|
|
7534
|
+
"items": {
|
|
7535
|
+
"$ref": "#/components/schemas/PortalFamilyMember"
|
|
7536
|
+
}
|
|
7537
|
+
},
|
|
7538
|
+
"persons": {
|
|
7539
|
+
"type": "array",
|
|
7540
|
+
"items": {
|
|
7541
|
+
"$ref": "#/components/schemas/PortalPerson"
|
|
7542
|
+
}
|
|
7543
|
+
},
|
|
7544
|
+
"labels": {
|
|
7545
|
+
"$ref": "#/components/schemas/PortalLabels"
|
|
7546
|
+
},
|
|
7547
|
+
"marketing_consent": {
|
|
7548
|
+
"type": "boolean"
|
|
7193
7549
|
},
|
|
7194
7550
|
"created_at": {
|
|
7195
7551
|
"type": "integer",
|
|
@@ -7370,6 +7726,52 @@
|
|
|
7370
7726
|
}
|
|
7371
7727
|
}
|
|
7372
7728
|
},
|
|
7729
|
+
"PortalExportRelation": {
|
|
7730
|
+
"description": "A relation the exporting contact is a party to; only the counterpart's display name is exposed.",
|
|
7731
|
+
"type": "object",
|
|
7732
|
+
"required": [
|
|
7733
|
+
"direction",
|
|
7734
|
+
"type",
|
|
7735
|
+
"custom_label",
|
|
7736
|
+
"since",
|
|
7737
|
+
"note",
|
|
7738
|
+
"counterpart_name"
|
|
7739
|
+
],
|
|
7740
|
+
"properties": {
|
|
7741
|
+
"direction": {
|
|
7742
|
+
"type": "string",
|
|
7743
|
+
"enum": [
|
|
7744
|
+
"outgoing",
|
|
7745
|
+
"incoming"
|
|
7746
|
+
]
|
|
7747
|
+
},
|
|
7748
|
+
"type": {
|
|
7749
|
+
"$ref": "#/components/schemas/RelationType"
|
|
7750
|
+
},
|
|
7751
|
+
"custom_label": {
|
|
7752
|
+
"type": [
|
|
7753
|
+
"string",
|
|
7754
|
+
"null"
|
|
7755
|
+
]
|
|
7756
|
+
},
|
|
7757
|
+
"since": {
|
|
7758
|
+
"type": [
|
|
7759
|
+
"integer",
|
|
7760
|
+
"null"
|
|
7761
|
+
],
|
|
7762
|
+
"description": "Unix timestamp in milliseconds."
|
|
7763
|
+
},
|
|
7764
|
+
"note": {
|
|
7765
|
+
"type": [
|
|
7766
|
+
"string",
|
|
7767
|
+
"null"
|
|
7768
|
+
]
|
|
7769
|
+
},
|
|
7770
|
+
"counterpart_name": {
|
|
7771
|
+
"type": "string"
|
|
7772
|
+
}
|
|
7773
|
+
}
|
|
7774
|
+
},
|
|
7373
7775
|
"PortalExport": {
|
|
7374
7776
|
"description": "Everything the workspace holds about the signed-in contact (GDPR Art. 15).",
|
|
7375
7777
|
"type": "object",
|
|
@@ -7378,7 +7780,8 @@
|
|
|
7378
7780
|
"contact",
|
|
7379
7781
|
"family",
|
|
7380
7782
|
"consents",
|
|
7381
|
-
"bookings"
|
|
7783
|
+
"bookings",
|
|
7784
|
+
"relations"
|
|
7382
7785
|
],
|
|
7383
7786
|
"properties": {
|
|
7384
7787
|
"exported_at": {
|
|
@@ -7405,6 +7808,12 @@
|
|
|
7405
7808
|
"items": {
|
|
7406
7809
|
"$ref": "#/components/schemas/PortalBooking"
|
|
7407
7810
|
}
|
|
7811
|
+
},
|
|
7812
|
+
"relations": {
|
|
7813
|
+
"type": "array",
|
|
7814
|
+
"items": {
|
|
7815
|
+
"$ref": "#/components/schemas/PortalExportRelation"
|
|
7816
|
+
}
|
|
7408
7817
|
}
|
|
7409
7818
|
}
|
|
7410
7819
|
},
|
|
@@ -8123,6 +8532,495 @@
|
|
|
8123
8532
|
"$ref": "#/components/schemas/ChannelConnectionDisconnectResult"
|
|
8124
8533
|
}
|
|
8125
8534
|
}
|
|
8535
|
+
},
|
|
8536
|
+
"RelationType": {
|
|
8537
|
+
"description": "How a person or a relation relates to a contact.",
|
|
8538
|
+
"type": "string",
|
|
8539
|
+
"enum": [
|
|
8540
|
+
"guardian",
|
|
8541
|
+
"owner",
|
|
8542
|
+
"employer",
|
|
8543
|
+
"caregiver",
|
|
8544
|
+
"partner",
|
|
8545
|
+
"custom"
|
|
8546
|
+
]
|
|
8547
|
+
},
|
|
8548
|
+
"ContactPerson": {
|
|
8549
|
+
"description": "A person a contact books for — a child, a pet, an employee. No login of their own.",
|
|
8550
|
+
"type": "object",
|
|
8551
|
+
"required": [
|
|
8552
|
+
"person_id",
|
|
8553
|
+
"contact_id",
|
|
8554
|
+
"name",
|
|
8555
|
+
"birth_year",
|
|
8556
|
+
"relation_type",
|
|
8557
|
+
"relation_label",
|
|
8558
|
+
"notes",
|
|
8559
|
+
"active",
|
|
8560
|
+
"promoted_to_contact_id",
|
|
8561
|
+
"created_at",
|
|
8562
|
+
"updated_at"
|
|
8563
|
+
],
|
|
8564
|
+
"properties": {
|
|
8565
|
+
"person_id": {
|
|
8566
|
+
"type": "string"
|
|
8567
|
+
},
|
|
8568
|
+
"contact_id": {
|
|
8569
|
+
"type": "string"
|
|
8570
|
+
},
|
|
8571
|
+
"name": {
|
|
8572
|
+
"type": "string"
|
|
8573
|
+
},
|
|
8574
|
+
"birth_year": {
|
|
8575
|
+
"type": [
|
|
8576
|
+
"integer",
|
|
8577
|
+
"null"
|
|
8578
|
+
]
|
|
8579
|
+
},
|
|
8580
|
+
"relation_type": {
|
|
8581
|
+
"$ref": "#/components/schemas/RelationType"
|
|
8582
|
+
},
|
|
8583
|
+
"relation_label": {
|
|
8584
|
+
"type": [
|
|
8585
|
+
"string",
|
|
8586
|
+
"null"
|
|
8587
|
+
]
|
|
8588
|
+
},
|
|
8589
|
+
"notes": {
|
|
8590
|
+
"type": [
|
|
8591
|
+
"string",
|
|
8592
|
+
"null"
|
|
8593
|
+
]
|
|
8594
|
+
},
|
|
8595
|
+
"active": {
|
|
8596
|
+
"type": "boolean"
|
|
8597
|
+
},
|
|
8598
|
+
"promoted_to_contact_id": {
|
|
8599
|
+
"type": [
|
|
8600
|
+
"string",
|
|
8601
|
+
"null"
|
|
8602
|
+
]
|
|
8603
|
+
},
|
|
8604
|
+
"created_at": {
|
|
8605
|
+
"type": "string",
|
|
8606
|
+
"format": "date-time"
|
|
8607
|
+
},
|
|
8608
|
+
"updated_at": {
|
|
8609
|
+
"type": "string",
|
|
8610
|
+
"format": "date-time"
|
|
8611
|
+
}
|
|
8612
|
+
}
|
|
8613
|
+
},
|
|
8614
|
+
"CreateContactPersonInput": {
|
|
8615
|
+
"type": "object",
|
|
8616
|
+
"required": [
|
|
8617
|
+
"contact_id",
|
|
8618
|
+
"name",
|
|
8619
|
+
"relation_type"
|
|
8620
|
+
],
|
|
8621
|
+
"properties": {
|
|
8622
|
+
"contact_id": {
|
|
8623
|
+
"type": "string"
|
|
8624
|
+
},
|
|
8625
|
+
"name": {
|
|
8626
|
+
"type": "string"
|
|
8627
|
+
},
|
|
8628
|
+
"birth_year": {
|
|
8629
|
+
"type": "integer"
|
|
8630
|
+
},
|
|
8631
|
+
"relation_type": {
|
|
8632
|
+
"$ref": "#/components/schemas/RelationType"
|
|
8633
|
+
},
|
|
8634
|
+
"relation_label": {
|
|
8635
|
+
"type": "string"
|
|
8636
|
+
},
|
|
8637
|
+
"notes": {
|
|
8638
|
+
"type": "string"
|
|
8639
|
+
}
|
|
8640
|
+
}
|
|
8641
|
+
},
|
|
8642
|
+
"ContactRelation": {
|
|
8643
|
+
"description": "One directional relation between two contacts.",
|
|
8644
|
+
"type": "object",
|
|
8645
|
+
"required": [
|
|
8646
|
+
"relation_id",
|
|
8647
|
+
"from_contact_id",
|
|
8648
|
+
"to_contact_id",
|
|
8649
|
+
"type",
|
|
8650
|
+
"custom_label",
|
|
8651
|
+
"since",
|
|
8652
|
+
"note",
|
|
8653
|
+
"counterpart_name",
|
|
8654
|
+
"created_at"
|
|
8655
|
+
],
|
|
8656
|
+
"properties": {
|
|
8657
|
+
"relation_id": {
|
|
8658
|
+
"type": "string"
|
|
8659
|
+
},
|
|
8660
|
+
"from_contact_id": {
|
|
8661
|
+
"type": "string"
|
|
8662
|
+
},
|
|
8663
|
+
"to_contact_id": {
|
|
8664
|
+
"type": "string"
|
|
8665
|
+
},
|
|
8666
|
+
"type": {
|
|
8667
|
+
"$ref": "#/components/schemas/RelationType"
|
|
8668
|
+
},
|
|
8669
|
+
"custom_label": {
|
|
8670
|
+
"type": [
|
|
8671
|
+
"string",
|
|
8672
|
+
"null"
|
|
8673
|
+
]
|
|
8674
|
+
},
|
|
8675
|
+
"since": {
|
|
8676
|
+
"type": [
|
|
8677
|
+
"integer",
|
|
8678
|
+
"null"
|
|
8679
|
+
],
|
|
8680
|
+
"description": "Unix timestamp in milliseconds."
|
|
8681
|
+
},
|
|
8682
|
+
"note": {
|
|
8683
|
+
"type": [
|
|
8684
|
+
"string",
|
|
8685
|
+
"null"
|
|
8686
|
+
]
|
|
8687
|
+
},
|
|
8688
|
+
"counterpart_name": {
|
|
8689
|
+
"type": "string",
|
|
8690
|
+
"description": "Empty string when the counterpart contact no longer exists."
|
|
8691
|
+
},
|
|
8692
|
+
"created_at": {
|
|
8693
|
+
"type": "string",
|
|
8694
|
+
"format": "date-time"
|
|
8695
|
+
}
|
|
8696
|
+
}
|
|
8697
|
+
},
|
|
8698
|
+
"ContactRelations": {
|
|
8699
|
+
"description": "Relations a contact holds, split by direction.",
|
|
8700
|
+
"type": "object",
|
|
8701
|
+
"required": [
|
|
8702
|
+
"outgoing",
|
|
8703
|
+
"incoming"
|
|
8704
|
+
],
|
|
8705
|
+
"properties": {
|
|
8706
|
+
"outgoing": {
|
|
8707
|
+
"type": "array",
|
|
8708
|
+
"items": {
|
|
8709
|
+
"$ref": "#/components/schemas/ContactRelation"
|
|
8710
|
+
}
|
|
8711
|
+
},
|
|
8712
|
+
"incoming": {
|
|
8713
|
+
"type": "array",
|
|
8714
|
+
"items": {
|
|
8715
|
+
"$ref": "#/components/schemas/ContactRelation"
|
|
8716
|
+
}
|
|
8717
|
+
}
|
|
8718
|
+
}
|
|
8719
|
+
},
|
|
8720
|
+
"CreateContactRelationInput": {
|
|
8721
|
+
"type": "object",
|
|
8722
|
+
"required": [
|
|
8723
|
+
"from_contact_id",
|
|
8724
|
+
"to_contact_id",
|
|
8725
|
+
"type"
|
|
8726
|
+
],
|
|
8727
|
+
"properties": {
|
|
8728
|
+
"from_contact_id": {
|
|
8729
|
+
"type": "string"
|
|
8730
|
+
},
|
|
8731
|
+
"to_contact_id": {
|
|
8732
|
+
"type": "string"
|
|
8733
|
+
},
|
|
8734
|
+
"type": {
|
|
8735
|
+
"$ref": "#/components/schemas/RelationType"
|
|
8736
|
+
},
|
|
8737
|
+
"custom_label": {
|
|
8738
|
+
"type": "string"
|
|
8739
|
+
},
|
|
8740
|
+
"since": {
|
|
8741
|
+
"type": "integer",
|
|
8742
|
+
"description": "Unix timestamp in milliseconds."
|
|
8743
|
+
},
|
|
8744
|
+
"note": {
|
|
8745
|
+
"type": "string"
|
|
8746
|
+
}
|
|
8747
|
+
}
|
|
8748
|
+
},
|
|
8749
|
+
"CreateContactRelationResult": {
|
|
8750
|
+
"type": "object",
|
|
8751
|
+
"required": [
|
|
8752
|
+
"relation_id"
|
|
8753
|
+
],
|
|
8754
|
+
"properties": {
|
|
8755
|
+
"relation_id": {
|
|
8756
|
+
"type": "string"
|
|
8757
|
+
}
|
|
8758
|
+
}
|
|
8759
|
+
},
|
|
8760
|
+
"BookingEventStatus": {
|
|
8761
|
+
"type": "string",
|
|
8762
|
+
"enum": [
|
|
8763
|
+
"draft",
|
|
8764
|
+
"open",
|
|
8765
|
+
"closed",
|
|
8766
|
+
"completed",
|
|
8767
|
+
"cancelled"
|
|
8768
|
+
]
|
|
8769
|
+
},
|
|
8770
|
+
"BookingEventTemplateKey": {
|
|
8771
|
+
"type": "string",
|
|
8772
|
+
"enum": [
|
|
8773
|
+
"kindergarten_visit",
|
|
8774
|
+
"company_day",
|
|
8775
|
+
"class",
|
|
8776
|
+
"open_day",
|
|
8777
|
+
"custom"
|
|
8778
|
+
]
|
|
8779
|
+
},
|
|
8780
|
+
"BookingEvent": {
|
|
8781
|
+
"description": "An arrangement — a scheduled group session bookings register against.",
|
|
8782
|
+
"type": "object",
|
|
8783
|
+
"required": [
|
|
8784
|
+
"event_id",
|
|
8785
|
+
"template_id",
|
|
8786
|
+
"host_id",
|
|
8787
|
+
"date",
|
|
8788
|
+
"window_start_minute",
|
|
8789
|
+
"window_end_minute",
|
|
8790
|
+
"place",
|
|
8791
|
+
"capacity",
|
|
8792
|
+
"minimum",
|
|
8793
|
+
"registered_count",
|
|
8794
|
+
"service_ids",
|
|
8795
|
+
"resource_ids",
|
|
8796
|
+
"price_override_ore",
|
|
8797
|
+
"status",
|
|
8798
|
+
"registration_closes_at",
|
|
8799
|
+
"slug",
|
|
8800
|
+
"created_at",
|
|
8801
|
+
"updated_at"
|
|
8802
|
+
],
|
|
8803
|
+
"properties": {
|
|
8804
|
+
"event_id": {
|
|
8805
|
+
"type": "string"
|
|
8806
|
+
},
|
|
8807
|
+
"template_id": {
|
|
8808
|
+
"type": "string"
|
|
8809
|
+
},
|
|
8810
|
+
"host_id": {
|
|
8811
|
+
"type": [
|
|
8812
|
+
"string",
|
|
8813
|
+
"null"
|
|
8814
|
+
]
|
|
8815
|
+
},
|
|
8816
|
+
"date": {
|
|
8817
|
+
"description": "yyyy-mm-dd in the workspace time zone.",
|
|
8818
|
+
"type": "string",
|
|
8819
|
+
"format": "date"
|
|
8820
|
+
},
|
|
8821
|
+
"window_start_minute": {
|
|
8822
|
+
"type": "integer"
|
|
8823
|
+
},
|
|
8824
|
+
"window_end_minute": {
|
|
8825
|
+
"type": "integer"
|
|
8826
|
+
},
|
|
8827
|
+
"place": {
|
|
8828
|
+
"type": "string",
|
|
8829
|
+
"enum": [
|
|
8830
|
+
"at_host",
|
|
8831
|
+
"in_house"
|
|
8832
|
+
]
|
|
8833
|
+
},
|
|
8834
|
+
"capacity": {
|
|
8835
|
+
"type": "integer"
|
|
8836
|
+
},
|
|
8837
|
+
"minimum": {
|
|
8838
|
+
"type": "integer"
|
|
8839
|
+
},
|
|
8840
|
+
"registered_count": {
|
|
8841
|
+
"type": "integer"
|
|
8842
|
+
},
|
|
8843
|
+
"service_ids": {
|
|
8844
|
+
"type": "array",
|
|
8845
|
+
"items": {
|
|
8846
|
+
"type": "string"
|
|
8847
|
+
}
|
|
8848
|
+
},
|
|
8849
|
+
"resource_ids": {
|
|
8850
|
+
"type": "array",
|
|
8851
|
+
"items": {
|
|
8852
|
+
"type": "string"
|
|
8853
|
+
}
|
|
8854
|
+
},
|
|
8855
|
+
"price_override_ore": {
|
|
8856
|
+
"type": [
|
|
8857
|
+
"integer",
|
|
8858
|
+
"null"
|
|
8859
|
+
]
|
|
8860
|
+
},
|
|
8861
|
+
"status": {
|
|
8862
|
+
"$ref": "#/components/schemas/BookingEventStatus"
|
|
8863
|
+
},
|
|
8864
|
+
"registration_closes_at": {
|
|
8865
|
+
"type": "string",
|
|
8866
|
+
"format": "date-time"
|
|
8867
|
+
},
|
|
8868
|
+
"slug": {
|
|
8869
|
+
"type": "string"
|
|
8870
|
+
},
|
|
8871
|
+
"created_at": {
|
|
8872
|
+
"type": "string",
|
|
8873
|
+
"format": "date-time"
|
|
8874
|
+
},
|
|
8875
|
+
"updated_at": {
|
|
8876
|
+
"type": "string",
|
|
8877
|
+
"format": "date-time"
|
|
8878
|
+
}
|
|
8879
|
+
}
|
|
8880
|
+
},
|
|
8881
|
+
"CreateBookingEventInput": {
|
|
8882
|
+
"type": "object",
|
|
8883
|
+
"required": [
|
|
8884
|
+
"template_key",
|
|
8885
|
+
"date",
|
|
8886
|
+
"window_start_minute",
|
|
8887
|
+
"place",
|
|
8888
|
+
"service_ids",
|
|
8889
|
+
"resource_ids"
|
|
8890
|
+
],
|
|
8891
|
+
"properties": {
|
|
8892
|
+
"template_key": {
|
|
8893
|
+
"$ref": "#/components/schemas/BookingEventTemplateKey"
|
|
8894
|
+
},
|
|
8895
|
+
"host_id": {
|
|
8896
|
+
"type": "string"
|
|
8897
|
+
},
|
|
8898
|
+
"date": {
|
|
8899
|
+
"type": "string",
|
|
8900
|
+
"format": "date"
|
|
8901
|
+
},
|
|
8902
|
+
"window_start_minute": {
|
|
8903
|
+
"type": "integer"
|
|
8904
|
+
},
|
|
8905
|
+
"window_end_minute": {
|
|
8906
|
+
"type": "integer"
|
|
8907
|
+
},
|
|
8908
|
+
"place": {
|
|
8909
|
+
"type": "string",
|
|
8910
|
+
"enum": [
|
|
8911
|
+
"at_host",
|
|
8912
|
+
"in_house"
|
|
8913
|
+
]
|
|
8914
|
+
},
|
|
8915
|
+
"capacity": {
|
|
8916
|
+
"type": "integer"
|
|
8917
|
+
},
|
|
8918
|
+
"minimum": {
|
|
8919
|
+
"type": "integer"
|
|
8920
|
+
},
|
|
8921
|
+
"service_ids": {
|
|
8922
|
+
"type": "array",
|
|
8923
|
+
"items": {
|
|
8924
|
+
"type": "string"
|
|
8925
|
+
}
|
|
8926
|
+
},
|
|
8927
|
+
"resource_ids": {
|
|
8928
|
+
"type": "array",
|
|
8929
|
+
"items": {
|
|
8930
|
+
"type": "string"
|
|
8931
|
+
}
|
|
8932
|
+
}
|
|
8933
|
+
}
|
|
8934
|
+
},
|
|
8935
|
+
"ApiResponse_ContactPersonArray": {
|
|
8936
|
+
"$ref": "#/components/schemas/Envelope_ContactPersonArray"
|
|
8937
|
+
},
|
|
8938
|
+
"ApiResponse_ContactPerson": {
|
|
8939
|
+
"$ref": "#/components/schemas/Envelope_ContactPerson"
|
|
8940
|
+
},
|
|
8941
|
+
"ApiResponse_ContactRelations": {
|
|
8942
|
+
"$ref": "#/components/schemas/Envelope_ContactRelations"
|
|
8943
|
+
},
|
|
8944
|
+
"ApiResponse_CreateContactRelationResult": {
|
|
8945
|
+
"$ref": "#/components/schemas/Envelope_CreateContactRelationResult"
|
|
8946
|
+
},
|
|
8947
|
+
"ApiResponse_BookingEventArray": {
|
|
8948
|
+
"$ref": "#/components/schemas/Envelope_BookingEventArray"
|
|
8949
|
+
},
|
|
8950
|
+
"ApiResponse_BookingEvent": {
|
|
8951
|
+
"$ref": "#/components/schemas/Envelope_BookingEvent"
|
|
8952
|
+
},
|
|
8953
|
+
"Envelope_ContactPersonArray": {
|
|
8954
|
+
"type": "object",
|
|
8955
|
+
"required": [
|
|
8956
|
+
"data"
|
|
8957
|
+
],
|
|
8958
|
+
"properties": {
|
|
8959
|
+
"data": {
|
|
8960
|
+
"type": "array",
|
|
8961
|
+
"items": {
|
|
8962
|
+
"$ref": "#/components/schemas/ContactPerson"
|
|
8963
|
+
}
|
|
8964
|
+
}
|
|
8965
|
+
}
|
|
8966
|
+
},
|
|
8967
|
+
"Envelope_ContactPerson": {
|
|
8968
|
+
"type": "object",
|
|
8969
|
+
"required": [
|
|
8970
|
+
"data"
|
|
8971
|
+
],
|
|
8972
|
+
"properties": {
|
|
8973
|
+
"data": {
|
|
8974
|
+
"$ref": "#/components/schemas/ContactPerson"
|
|
8975
|
+
}
|
|
8976
|
+
}
|
|
8977
|
+
},
|
|
8978
|
+
"Envelope_ContactRelations": {
|
|
8979
|
+
"type": "object",
|
|
8980
|
+
"required": [
|
|
8981
|
+
"data"
|
|
8982
|
+
],
|
|
8983
|
+
"properties": {
|
|
8984
|
+
"data": {
|
|
8985
|
+
"$ref": "#/components/schemas/ContactRelations"
|
|
8986
|
+
}
|
|
8987
|
+
}
|
|
8988
|
+
},
|
|
8989
|
+
"Envelope_CreateContactRelationResult": {
|
|
8990
|
+
"type": "object",
|
|
8991
|
+
"required": [
|
|
8992
|
+
"data"
|
|
8993
|
+
],
|
|
8994
|
+
"properties": {
|
|
8995
|
+
"data": {
|
|
8996
|
+
"$ref": "#/components/schemas/CreateContactRelationResult"
|
|
8997
|
+
}
|
|
8998
|
+
}
|
|
8999
|
+
},
|
|
9000
|
+
"Envelope_BookingEventArray": {
|
|
9001
|
+
"type": "object",
|
|
9002
|
+
"required": [
|
|
9003
|
+
"data"
|
|
9004
|
+
],
|
|
9005
|
+
"properties": {
|
|
9006
|
+
"data": {
|
|
9007
|
+
"type": "array",
|
|
9008
|
+
"items": {
|
|
9009
|
+
"$ref": "#/components/schemas/BookingEvent"
|
|
9010
|
+
}
|
|
9011
|
+
}
|
|
9012
|
+
}
|
|
9013
|
+
},
|
|
9014
|
+
"Envelope_BookingEvent": {
|
|
9015
|
+
"type": "object",
|
|
9016
|
+
"required": [
|
|
9017
|
+
"data"
|
|
9018
|
+
],
|
|
9019
|
+
"properties": {
|
|
9020
|
+
"data": {
|
|
9021
|
+
"$ref": "#/components/schemas/BookingEvent"
|
|
9022
|
+
}
|
|
9023
|
+
}
|
|
8126
9024
|
}
|
|
8127
9025
|
}
|
|
8128
9026
|
}
|