@medalsocial/sdk 1.8.0 → 1.10.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 +49 -1
- package/dist/openapi/medal-social.openapi.json +1742 -483
- package/dist/src/index.d.mts +353 -1
- package/dist/src/index.d.ts +353 -1
- package/dist/src/index.js +120 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +120 -0
- package/dist/src/index.mjs.map +1 -1
- package/dist/src/openapi.generated.d.mts +659 -1
- package/dist/src/openapi.generated.d.ts +659 -1
- package/dist/src/openapi.generated.js.map +1 -1
- package/openapi/medal-social.openapi.yaml +806 -4
- package/package.json +1 -1
- package/skills/resources/SKILL.md +7 -0
|
@@ -414,6 +414,85 @@ interface paths {
|
|
|
414
414
|
patch?: never;
|
|
415
415
|
trace?: never;
|
|
416
416
|
};
|
|
417
|
+
"/api/v1/bookings/persons": {
|
|
418
|
+
parameters: {
|
|
419
|
+
query?: never;
|
|
420
|
+
header?: never;
|
|
421
|
+
path?: never;
|
|
422
|
+
cookie?: never;
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* List a contact's persons
|
|
426
|
+
* @description Persons a contact books for — a child, a pet, an employee. No login of their own. Active-only unless `include_inactive` is set.
|
|
427
|
+
*/
|
|
428
|
+
get: operations["listContactPersons"];
|
|
429
|
+
put?: never;
|
|
430
|
+
/** Add a person under a contact */
|
|
431
|
+
post: operations["createContactPerson"];
|
|
432
|
+
delete?: never;
|
|
433
|
+
options?: never;
|
|
434
|
+
head?: never;
|
|
435
|
+
patch?: never;
|
|
436
|
+
trace?: never;
|
|
437
|
+
};
|
|
438
|
+
"/api/v1/bookings/relations": {
|
|
439
|
+
parameters: {
|
|
440
|
+
query?: never;
|
|
441
|
+
header?: never;
|
|
442
|
+
path?: never;
|
|
443
|
+
cookie?: never;
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* List a contact's relations
|
|
447
|
+
* @description Directional relations a contact holds, split into outgoing and incoming.
|
|
448
|
+
*/
|
|
449
|
+
get: operations["listContactRelations"];
|
|
450
|
+
put?: never;
|
|
451
|
+
/** Create a relation from one contact to another */
|
|
452
|
+
post: operations["createContactRelation"];
|
|
453
|
+
delete?: never;
|
|
454
|
+
options?: never;
|
|
455
|
+
head?: never;
|
|
456
|
+
patch?: never;
|
|
457
|
+
trace?: never;
|
|
458
|
+
};
|
|
459
|
+
"/api/v1/bookings/events": {
|
|
460
|
+
parameters: {
|
|
461
|
+
query?: never;
|
|
462
|
+
header?: never;
|
|
463
|
+
path?: never;
|
|
464
|
+
cookie?: never;
|
|
465
|
+
};
|
|
466
|
+
/** List arrangementer in a date range */
|
|
467
|
+
get: operations["listBookingEvents"];
|
|
468
|
+
put?: never;
|
|
469
|
+
/** Create an arrangement from a template */
|
|
470
|
+
post: operations["createBookingEvent"];
|
|
471
|
+
delete?: never;
|
|
472
|
+
options?: never;
|
|
473
|
+
head?: never;
|
|
474
|
+
patch?: never;
|
|
475
|
+
trace?: never;
|
|
476
|
+
};
|
|
477
|
+
"/api/v1/bookings/events/{id}": {
|
|
478
|
+
parameters: {
|
|
479
|
+
query?: never;
|
|
480
|
+
header?: never;
|
|
481
|
+
path: {
|
|
482
|
+
id: components["parameters"]["Id"];
|
|
483
|
+
};
|
|
484
|
+
cookie?: never;
|
|
485
|
+
};
|
|
486
|
+
/** Get an arrangement */
|
|
487
|
+
get: operations["getBookingEvent"];
|
|
488
|
+
put?: never;
|
|
489
|
+
post?: never;
|
|
490
|
+
delete?: never;
|
|
491
|
+
options?: never;
|
|
492
|
+
head?: never;
|
|
493
|
+
patch?: never;
|
|
494
|
+
trace?: never;
|
|
495
|
+
};
|
|
417
496
|
"/api/v1/bookings/{id}": {
|
|
418
497
|
parameters: {
|
|
419
498
|
query?: never;
|
|
@@ -497,6 +576,59 @@ interface paths {
|
|
|
497
576
|
patch?: never;
|
|
498
577
|
trace?: never;
|
|
499
578
|
};
|
|
579
|
+
"/api/v1/bookings/{id}/payment": {
|
|
580
|
+
parameters: {
|
|
581
|
+
query?: never;
|
|
582
|
+
header?: never;
|
|
583
|
+
path: {
|
|
584
|
+
id: components["parameters"]["Id"];
|
|
585
|
+
};
|
|
586
|
+
cookie?: never;
|
|
587
|
+
};
|
|
588
|
+
/**
|
|
589
|
+
* Read the newest payment attempt on a booking
|
|
590
|
+
* @description Returns the newest attempt only. A booking with no payment yet, an unknown booking id and another workspace's booking all answer 404 alike, so this is not an existence oracle.
|
|
591
|
+
*/
|
|
592
|
+
get: operations["getBookingPayment"];
|
|
593
|
+
put?: never;
|
|
594
|
+
/**
|
|
595
|
+
* Start a Vipps payment for a booking
|
|
596
|
+
* @description Reserves (or charges) the booking's amount and returns the wallet redirect URL. The customer must have accepted your terms before this call — `terms_accepted` must be literally `true`, and a body omitting it is a 400. One live payment per booking: a second while one is outstanding answers 409, as does a booking that is not payable or a refusal from Vipps. A `return_url` this workspace's own sites do not vouch for answers 422, not 400 — the URL parses, it is just not yours. 403 when the payments switch or the bookings module is off.
|
|
597
|
+
*/
|
|
598
|
+
post: operations["startBookingPayment"];
|
|
599
|
+
delete?: never;
|
|
600
|
+
options?: never;
|
|
601
|
+
head?: never;
|
|
602
|
+
patch?: never;
|
|
603
|
+
trace?: never;
|
|
604
|
+
};
|
|
605
|
+
"/api/v1/bookings/manage/{token}/payment": {
|
|
606
|
+
parameters: {
|
|
607
|
+
query?: never;
|
|
608
|
+
header?: never;
|
|
609
|
+
path: {
|
|
610
|
+
/** @description The show-once manage token handed out when the booking was created. Possession of it authorizes the customer's own cancel or reschedule. */
|
|
611
|
+
token: components["parameters"]["ManageToken"];
|
|
612
|
+
};
|
|
613
|
+
cookie?: never;
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* Read the payment on the customer's own booking
|
|
617
|
+
* @description An unknown token, another workspace's token and a booking with no payment yet all answer 404 alike.
|
|
618
|
+
*/
|
|
619
|
+
get: operations["getManageBookingPayment"];
|
|
620
|
+
put?: never;
|
|
621
|
+
/**
|
|
622
|
+
* Start a payment on the customer's behalf
|
|
623
|
+
* @description The manage-token twin of `startBookingPayment` — same body, same responses; only the credential that authorizes it differs.
|
|
624
|
+
*/
|
|
625
|
+
post: operations["startManageBookingPayment"];
|
|
626
|
+
delete?: never;
|
|
627
|
+
options?: never;
|
|
628
|
+
head?: never;
|
|
629
|
+
patch?: never;
|
|
630
|
+
trace?: never;
|
|
631
|
+
};
|
|
500
632
|
"/api/v1/bookings/manage/{token}": {
|
|
501
633
|
parameters: {
|
|
502
634
|
query?: never;
|
|
@@ -690,7 +822,7 @@ interface paths {
|
|
|
690
822
|
put?: never;
|
|
691
823
|
/**
|
|
692
824
|
* Export everything held about the signed-in contact
|
|
693
|
-
* @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`.
|
|
825
|
+
* @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`.
|
|
694
826
|
*/
|
|
695
827
|
post: operations["exportPortalData"];
|
|
696
828
|
delete?: never;
|
|
@@ -1587,6 +1719,16 @@ interface components {
|
|
|
1587
1719
|
BookingCancelledBy: "customer" | "staff" | "system";
|
|
1588
1720
|
/** @enum {string} */
|
|
1589
1721
|
BookingPaymentStatus: "none" | "reserved" | "captured" | "refunded";
|
|
1722
|
+
/**
|
|
1723
|
+
* @description What a booking must have paid before the business honours it: nothing, a reservation captured later, or the full amount up front.
|
|
1724
|
+
* @enum {string}
|
|
1725
|
+
*/
|
|
1726
|
+
BookingPaymentMode: "none" | "reserve" | "prepay";
|
|
1727
|
+
/**
|
|
1728
|
+
* @description The state of one payment attempt, in Medal's vocabulary rather than the wallet's — a Vipps payment stays AUTHORIZED after a capture, so read the øre aggregates to learn what actually moved.
|
|
1729
|
+
* @enum {string}
|
|
1730
|
+
*/
|
|
1731
|
+
BookingPaymentState: "created" | "authorized" | "captured" | "cancelled" | "refunded" | "failed" | "expired";
|
|
1590
1732
|
/** @enum {string} */
|
|
1591
1733
|
BookingCreatedVia: "web" | "dashboard" | "walk_in" | "api";
|
|
1592
1734
|
/** @enum {string} */
|
|
@@ -1603,6 +1745,12 @@ interface components {
|
|
|
1603
1745
|
booked_for_name: string | null;
|
|
1604
1746
|
/** @description A birth year, not a birthdate — the age bracket is all that is stored. */
|
|
1605
1747
|
booked_for_birth_year: number | null;
|
|
1748
|
+
/** @description The ContactPerson this booking was made for, if any. */
|
|
1749
|
+
booked_for_person_id: string | null;
|
|
1750
|
+
/** @description The BookingEvent this booking is a registration for, if any. */
|
|
1751
|
+
event_id: string | null;
|
|
1752
|
+
/** @description Position of this booking within its event's registrations, if any. */
|
|
1753
|
+
event_order: number | null;
|
|
1606
1754
|
/** @description Shared by every booking created in the same party request. */
|
|
1607
1755
|
party_sequence_id: string | null;
|
|
1608
1756
|
status: components["schemas"]["BookingStatus"];
|
|
@@ -1611,6 +1759,8 @@ interface components {
|
|
|
1611
1759
|
/** @description On a booking created by a reschedule, the booking it replaced. */
|
|
1612
1760
|
rescheduled_from_id: string | null;
|
|
1613
1761
|
payment_status: components["schemas"]["BookingPaymentStatus"];
|
|
1762
|
+
/** @description What this booking required when it was made — frozen at creation. `payment_status: none` cannot tell "owes nothing" from "has not paid yet"; this can. */
|
|
1763
|
+
payment_mode: components["schemas"]["BookingPaymentMode"];
|
|
1614
1764
|
/** @description Price in integer øre. Never a float and never kroner. */
|
|
1615
1765
|
amount_ore: number | null;
|
|
1616
1766
|
/** @description Customer-visible note. */
|
|
@@ -1637,6 +1787,8 @@ interface components {
|
|
|
1637
1787
|
/** @description Resource types this service needs, e.g. `["staff"]`. */
|
|
1638
1788
|
resource_requirements: string[];
|
|
1639
1789
|
bookable_online: boolean;
|
|
1790
|
+
/** @description Per-service payment requirement. `null` means no override — the workspace rule decides. */
|
|
1791
|
+
payment: components["schemas"]["BookingPaymentMode"] | null;
|
|
1640
1792
|
max_per_booking: number | null;
|
|
1641
1793
|
color: string | null;
|
|
1642
1794
|
sort_order: number | null;
|
|
@@ -1698,6 +1850,8 @@ interface components {
|
|
|
1698
1850
|
start_ts: components["schemas"]["BookingTimestampInput"];
|
|
1699
1851
|
booked_for_name?: string;
|
|
1700
1852
|
booked_for_birth_year?: number;
|
|
1853
|
+
/** @description Book this line on behalf of a ContactPerson rather than the contact. */
|
|
1854
|
+
booked_for_person_id?: string;
|
|
1701
1855
|
};
|
|
1702
1856
|
CreateBookingInput: {
|
|
1703
1857
|
/** @description A PARTY — one request books a whole family in one all-or-nothing transaction. */
|
|
@@ -1753,6 +1907,8 @@ interface components {
|
|
|
1753
1907
|
/** @description Price in integer øre. */
|
|
1754
1908
|
amount_ore: number | null;
|
|
1755
1909
|
payment_status: components["schemas"]["BookingPaymentStatus"] | null;
|
|
1910
|
+
/** @description What this booking requires — what a manage page checks before offering «Betal nå». */
|
|
1911
|
+
payment_mode: components["schemas"]["BookingPaymentMode"];
|
|
1756
1912
|
/** @description IANA zone the booking's local times should be rendered in. */
|
|
1757
1913
|
time_zone: string | null;
|
|
1758
1914
|
cancel_window_hours: number | null;
|
|
@@ -1779,6 +1935,64 @@ interface components {
|
|
|
1779
1935
|
new_start_ts: components["schemas"]["BookingTimestampInput"];
|
|
1780
1936
|
new_resource_id?: string;
|
|
1781
1937
|
};
|
|
1938
|
+
/** @description Body for `startBookingPayment` and `startManageBookingPayment`. */
|
|
1939
|
+
StartBookingPaymentInput: {
|
|
1940
|
+
/** @description Where the wallet returns the customer. Must be a URL one of this workspace's own sites vouches for; anything else answers 422. */
|
|
1941
|
+
return_url: string;
|
|
1942
|
+
/**
|
|
1943
|
+
* @description Must be literally `true`. The customer has to actively accept the merchant's terms BEFORE a payment is initiated, so omitting it or sending `false` is a 400 and leaves no payment behind.
|
|
1944
|
+
* @constant
|
|
1945
|
+
*/
|
|
1946
|
+
terms_accepted: true;
|
|
1947
|
+
/** @description The caller's own version label for the terms that were accepted. */
|
|
1948
|
+
terms_version?: string;
|
|
1949
|
+
/** @description The exact text that was accepted, stored with the consent record. */
|
|
1950
|
+
terms_text?: string;
|
|
1951
|
+
};
|
|
1952
|
+
/** @description The result of starting a payment. `redirect_url` is handed over here and nowhere else. */
|
|
1953
|
+
BookingPaymentStart: {
|
|
1954
|
+
/** @description The wallet reference for this attempt. */
|
|
1955
|
+
reference: string;
|
|
1956
|
+
/** @description Send the customer here UNCHANGED — hand it to the Vipps Widget SDK. SHOW-ONCE: it is not returned by `getBookingPayment`, and the payment behind it expires after ten minutes. */
|
|
1957
|
+
redirect_url: string;
|
|
1958
|
+
state: components["schemas"]["BookingPaymentState"];
|
|
1959
|
+
};
|
|
1960
|
+
/** @description One payment attempt on a booking. Money is integer øre, and the four aggregates are numbers rather than nulls — "nothing captured" is `0`. `redirect_url`, the wallet's own refusal text and the trace id are deliberately absent. */
|
|
1961
|
+
BookingPayment: {
|
|
1962
|
+
reference: string;
|
|
1963
|
+
/** @constant */
|
|
1964
|
+
provider: "vipps";
|
|
1965
|
+
state: components["schemas"]["BookingPaymentState"];
|
|
1966
|
+
/**
|
|
1967
|
+
* @description Never `none` — a payment exists only where one was required.
|
|
1968
|
+
* @enum {string}
|
|
1969
|
+
*/
|
|
1970
|
+
mode: "reserve" | "prepay";
|
|
1971
|
+
/** @description 1 for the first attempt on this booking, incrementing per retry. */
|
|
1972
|
+
attempt: number;
|
|
1973
|
+
/** @description The amount this attempt is for, in integer øre. */
|
|
1974
|
+
amount_ore: number;
|
|
1975
|
+
authorized_ore: number;
|
|
1976
|
+
captured_ore: number;
|
|
1977
|
+
refunded_ore: number;
|
|
1978
|
+
cancelled_ore: number;
|
|
1979
|
+
/** @constant */
|
|
1980
|
+
currency: "NOK";
|
|
1981
|
+
/**
|
|
1982
|
+
* Format: date-time
|
|
1983
|
+
* @description The last moment a capture is GUARANTEED to succeed. The card behind the wallet may release the reservation afterwards, so a capture past it can fail even though the payment still looks authorized. Null until the customer has approved.
|
|
1984
|
+
*/
|
|
1985
|
+
capture_guaranteed_until: string | null;
|
|
1986
|
+
terms_version: string | null;
|
|
1987
|
+
/** Format: date-time */
|
|
1988
|
+
terms_accepted_at: string | null;
|
|
1989
|
+
/** @description The wallet's numeric error code from the last failed operation — what a caller branches on. */
|
|
1990
|
+
failure_code: string | null;
|
|
1991
|
+
/** Format: date-time */
|
|
1992
|
+
created_at: string | null;
|
|
1993
|
+
/** Format: date-time */
|
|
1994
|
+
updated_at: string | null;
|
|
1995
|
+
};
|
|
1782
1996
|
/** @description Pagination for a bookings page. `truncated` is the extra statement: the underlying read is capped, and when the cap binds there are matching bookings no cursor from this call reaches — narrow the window. */
|
|
1783
1997
|
BookingsPagination: {
|
|
1784
1998
|
has_more: boolean;
|
|
@@ -2123,6 +2337,8 @@ interface components {
|
|
|
2123
2337
|
ApiResponse_BookingCreateResult: components["schemas"]["Envelope_BookingCreateResult"];
|
|
2124
2338
|
ApiResponse_BookingActionResult: components["schemas"]["Envelope_BookingActionResult"];
|
|
2125
2339
|
ApiResponse_BookingRescheduleResult: components["schemas"]["Envelope_BookingRescheduleResult"];
|
|
2340
|
+
ApiResponse_BookingPaymentStart: components["schemas"]["Envelope_BookingPaymentStart"];
|
|
2341
|
+
ApiResponse_BookingPayment: components["schemas"]["Envelope_BookingPayment"];
|
|
2126
2342
|
ApiResponse_ManageSummary: components["schemas"]["Envelope_ManageSummary"];
|
|
2127
2343
|
ApiResponse_PortalLoginStartResult: components["schemas"]["Envelope_PortalLoginStartResult"];
|
|
2128
2344
|
ApiResponse_PortalSession: components["schemas"]["Envelope_PortalSession"];
|
|
@@ -2274,6 +2490,12 @@ interface components {
|
|
|
2274
2490
|
Envelope_BookingRescheduleResult: {
|
|
2275
2491
|
data: components["schemas"]["BookingRescheduleResult"];
|
|
2276
2492
|
};
|
|
2493
|
+
Envelope_BookingPaymentStart: {
|
|
2494
|
+
data: components["schemas"]["BookingPaymentStart"];
|
|
2495
|
+
};
|
|
2496
|
+
Envelope_BookingPayment: {
|
|
2497
|
+
data: components["schemas"]["BookingPayment"];
|
|
2498
|
+
};
|
|
2277
2499
|
Envelope_ManageSummary: {
|
|
2278
2500
|
data: components["schemas"]["ManageSummary"];
|
|
2279
2501
|
};
|
|
@@ -2312,6 +2534,22 @@ interface components {
|
|
|
2312
2534
|
name: string;
|
|
2313
2535
|
birth_year: number;
|
|
2314
2536
|
};
|
|
2537
|
+
/** @description A person the contact books for — a child, a pet — with no login of its own. */
|
|
2538
|
+
PortalPerson: {
|
|
2539
|
+
person_id: string;
|
|
2540
|
+
name: string;
|
|
2541
|
+
birth_year: number | null;
|
|
2542
|
+
relation_type: components["schemas"]["RelationType"];
|
|
2543
|
+
relation_label: string | null;
|
|
2544
|
+
notes: string | null;
|
|
2545
|
+
/** @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. */
|
|
2546
|
+
active: boolean;
|
|
2547
|
+
};
|
|
2548
|
+
/** @description The workspace's own words for the person concept, e.g. `"Barn"`. */
|
|
2549
|
+
PortalLabels: {
|
|
2550
|
+
person: string;
|
|
2551
|
+
persons: string;
|
|
2552
|
+
};
|
|
2315
2553
|
PortalProfile: {
|
|
2316
2554
|
contact_id: string;
|
|
2317
2555
|
email: string;
|
|
@@ -2319,6 +2557,8 @@ interface components {
|
|
|
2319
2557
|
last_name: string | null;
|
|
2320
2558
|
phone: string | null;
|
|
2321
2559
|
family: components["schemas"]["PortalFamilyMember"][];
|
|
2560
|
+
persons: components["schemas"]["PortalPerson"][];
|
|
2561
|
+
labels: components["schemas"]["PortalLabels"];
|
|
2322
2562
|
marketing_consent: boolean;
|
|
2323
2563
|
/** @description Unix timestamp in milliseconds. */
|
|
2324
2564
|
created_at: number;
|
|
@@ -2366,6 +2606,17 @@ interface components {
|
|
|
2366
2606
|
revoked_at: number | null;
|
|
2367
2607
|
source: string;
|
|
2368
2608
|
};
|
|
2609
|
+
/** @description A relation the exporting contact is a party to; only the counterpart's display name is exposed. */
|
|
2610
|
+
PortalExportRelation: {
|
|
2611
|
+
/** @enum {string} */
|
|
2612
|
+
direction: "outgoing" | "incoming";
|
|
2613
|
+
type: components["schemas"]["RelationType"];
|
|
2614
|
+
custom_label: string | null;
|
|
2615
|
+
/** @description Unix timestamp in milliseconds. */
|
|
2616
|
+
since: number | null;
|
|
2617
|
+
note: string | null;
|
|
2618
|
+
counterpart_name: string;
|
|
2619
|
+
};
|
|
2369
2620
|
/** @description Everything the workspace holds about the signed-in contact (GDPR Art. 15). */
|
|
2370
2621
|
PortalExport: {
|
|
2371
2622
|
/** @description Unix timestamp in milliseconds. */
|
|
@@ -2374,6 +2625,7 @@ interface components {
|
|
|
2374
2625
|
family: components["schemas"]["PortalFamilyMember"][];
|
|
2375
2626
|
consents: components["schemas"]["PortalConsentRecord"][];
|
|
2376
2627
|
bookings: components["schemas"]["PortalBooking"][];
|
|
2628
|
+
relations: components["schemas"]["PortalExportRelation"][];
|
|
2377
2629
|
};
|
|
2378
2630
|
Envelope_PortalLoginStartResult: {
|
|
2379
2631
|
data: components["schemas"]["PortalLoginStartResult"];
|
|
@@ -2554,6 +2806,138 @@ interface components {
|
|
|
2554
2806
|
Envelope_ChannelConnectionDisconnectResult: {
|
|
2555
2807
|
data: components["schemas"]["ChannelConnectionDisconnectResult"];
|
|
2556
2808
|
};
|
|
2809
|
+
/**
|
|
2810
|
+
* @description How a person or a relation relates to a contact.
|
|
2811
|
+
* @enum {string}
|
|
2812
|
+
*/
|
|
2813
|
+
RelationType: "guardian" | "owner" | "employer" | "caregiver" | "partner" | "custom";
|
|
2814
|
+
/** @description A person a contact books for — a child, a pet, an employee. No login of their own. */
|
|
2815
|
+
ContactPerson: {
|
|
2816
|
+
person_id: string;
|
|
2817
|
+
contact_id: string;
|
|
2818
|
+
name: string;
|
|
2819
|
+
birth_year: number | null;
|
|
2820
|
+
relation_type: components["schemas"]["RelationType"];
|
|
2821
|
+
relation_label: string | null;
|
|
2822
|
+
notes: string | null;
|
|
2823
|
+
active: boolean;
|
|
2824
|
+
promoted_to_contact_id: string | null;
|
|
2825
|
+
/** Format: date-time */
|
|
2826
|
+
created_at: string;
|
|
2827
|
+
/** Format: date-time */
|
|
2828
|
+
updated_at: string;
|
|
2829
|
+
};
|
|
2830
|
+
CreateContactPersonInput: {
|
|
2831
|
+
contact_id: string;
|
|
2832
|
+
name: string;
|
|
2833
|
+
birth_year?: number;
|
|
2834
|
+
relation_type: components["schemas"]["RelationType"];
|
|
2835
|
+
relation_label?: string;
|
|
2836
|
+
notes?: string;
|
|
2837
|
+
};
|
|
2838
|
+
/** @description One directional relation between two contacts. */
|
|
2839
|
+
ContactRelation: {
|
|
2840
|
+
relation_id: string;
|
|
2841
|
+
from_contact_id: string;
|
|
2842
|
+
to_contact_id: string;
|
|
2843
|
+
type: components["schemas"]["RelationType"];
|
|
2844
|
+
custom_label: string | null;
|
|
2845
|
+
/** @description Unix timestamp in milliseconds. */
|
|
2846
|
+
since: number | null;
|
|
2847
|
+
note: string | null;
|
|
2848
|
+
/** @description Empty string when the counterpart contact no longer exists. */
|
|
2849
|
+
counterpart_name: string;
|
|
2850
|
+
/** Format: date-time */
|
|
2851
|
+
created_at: string;
|
|
2852
|
+
};
|
|
2853
|
+
/** @description Relations a contact holds, split by direction. */
|
|
2854
|
+
ContactRelations: {
|
|
2855
|
+
outgoing: components["schemas"]["ContactRelation"][];
|
|
2856
|
+
incoming: components["schemas"]["ContactRelation"][];
|
|
2857
|
+
};
|
|
2858
|
+
CreateContactRelationInput: {
|
|
2859
|
+
from_contact_id: string;
|
|
2860
|
+
to_contact_id: string;
|
|
2861
|
+
type: components["schemas"]["RelationType"];
|
|
2862
|
+
custom_label?: string;
|
|
2863
|
+
/** @description Unix timestamp in milliseconds. */
|
|
2864
|
+
since?: number;
|
|
2865
|
+
note?: string;
|
|
2866
|
+
};
|
|
2867
|
+
CreateContactRelationResult: {
|
|
2868
|
+
relation_id: string;
|
|
2869
|
+
};
|
|
2870
|
+
/** @enum {string} */
|
|
2871
|
+
BookingEventStatus: "draft" | "open" | "closed" | "completed" | "cancelled";
|
|
2872
|
+
/** @enum {string} */
|
|
2873
|
+
BookingEventTemplateKey: "kindergarten_visit" | "company_day" | "class" | "open_day" | "custom";
|
|
2874
|
+
/** @description An arrangement — a scheduled group session bookings register against. */
|
|
2875
|
+
BookingEvent: {
|
|
2876
|
+
event_id: string;
|
|
2877
|
+
template_id: string;
|
|
2878
|
+
host_id: string | null;
|
|
2879
|
+
/**
|
|
2880
|
+
* Format: date
|
|
2881
|
+
* @description yyyy-mm-dd in the workspace time zone.
|
|
2882
|
+
*/
|
|
2883
|
+
date: string;
|
|
2884
|
+
window_start_minute: number;
|
|
2885
|
+
window_end_minute: number;
|
|
2886
|
+
/** @enum {string} */
|
|
2887
|
+
place: "at_host" | "in_house";
|
|
2888
|
+
capacity: number;
|
|
2889
|
+
minimum: number;
|
|
2890
|
+
registered_count: number;
|
|
2891
|
+
service_ids: string[];
|
|
2892
|
+
resource_ids: string[];
|
|
2893
|
+
price_override_ore: number | null;
|
|
2894
|
+
status: components["schemas"]["BookingEventStatus"];
|
|
2895
|
+
/** Format: date-time */
|
|
2896
|
+
registration_closes_at: string;
|
|
2897
|
+
slug: string;
|
|
2898
|
+
/** Format: date-time */
|
|
2899
|
+
created_at: string;
|
|
2900
|
+
/** Format: date-time */
|
|
2901
|
+
updated_at: string;
|
|
2902
|
+
};
|
|
2903
|
+
CreateBookingEventInput: {
|
|
2904
|
+
template_key: components["schemas"]["BookingEventTemplateKey"];
|
|
2905
|
+
host_id?: string;
|
|
2906
|
+
/** Format: date */
|
|
2907
|
+
date: string;
|
|
2908
|
+
window_start_minute: number;
|
|
2909
|
+
window_end_minute?: number;
|
|
2910
|
+
/** @enum {string} */
|
|
2911
|
+
place: "at_host" | "in_house";
|
|
2912
|
+
capacity?: number;
|
|
2913
|
+
minimum?: number;
|
|
2914
|
+
service_ids: string[];
|
|
2915
|
+
resource_ids: string[];
|
|
2916
|
+
};
|
|
2917
|
+
ApiResponse_ContactPersonArray: components["schemas"]["Envelope_ContactPersonArray"];
|
|
2918
|
+
ApiResponse_ContactPerson: components["schemas"]["Envelope_ContactPerson"];
|
|
2919
|
+
ApiResponse_ContactRelations: components["schemas"]["Envelope_ContactRelations"];
|
|
2920
|
+
ApiResponse_CreateContactRelationResult: components["schemas"]["Envelope_CreateContactRelationResult"];
|
|
2921
|
+
ApiResponse_BookingEventArray: components["schemas"]["Envelope_BookingEventArray"];
|
|
2922
|
+
ApiResponse_BookingEvent: components["schemas"]["Envelope_BookingEvent"];
|
|
2923
|
+
Envelope_ContactPersonArray: {
|
|
2924
|
+
data: components["schemas"]["ContactPerson"][];
|
|
2925
|
+
};
|
|
2926
|
+
Envelope_ContactPerson: {
|
|
2927
|
+
data: components["schemas"]["ContactPerson"];
|
|
2928
|
+
};
|
|
2929
|
+
Envelope_ContactRelations: {
|
|
2930
|
+
data: components["schemas"]["ContactRelations"];
|
|
2931
|
+
};
|
|
2932
|
+
Envelope_CreateContactRelationResult: {
|
|
2933
|
+
data: components["schemas"]["CreateContactRelationResult"];
|
|
2934
|
+
};
|
|
2935
|
+
Envelope_BookingEventArray: {
|
|
2936
|
+
data: components["schemas"]["BookingEvent"][];
|
|
2937
|
+
};
|
|
2938
|
+
Envelope_BookingEvent: {
|
|
2939
|
+
data: components["schemas"]["BookingEvent"];
|
|
2940
|
+
};
|
|
2557
2941
|
};
|
|
2558
2942
|
responses: {
|
|
2559
2943
|
/** @description API error. */
|
|
@@ -3386,6 +3770,178 @@ interface operations {
|
|
|
3386
3770
|
default: components["responses"]["ApiError"];
|
|
3387
3771
|
};
|
|
3388
3772
|
};
|
|
3773
|
+
listContactPersons: {
|
|
3774
|
+
parameters: {
|
|
3775
|
+
query: {
|
|
3776
|
+
contact_id: string;
|
|
3777
|
+
include_inactive?: boolean;
|
|
3778
|
+
};
|
|
3779
|
+
header?: never;
|
|
3780
|
+
path?: never;
|
|
3781
|
+
cookie?: never;
|
|
3782
|
+
};
|
|
3783
|
+
requestBody?: never;
|
|
3784
|
+
responses: {
|
|
3785
|
+
/** @description Contact persons. */
|
|
3786
|
+
200: {
|
|
3787
|
+
headers: {
|
|
3788
|
+
[name: string]: unknown;
|
|
3789
|
+
};
|
|
3790
|
+
content: {
|
|
3791
|
+
"application/json": components["schemas"]["ApiResponse_ContactPersonArray"];
|
|
3792
|
+
};
|
|
3793
|
+
};
|
|
3794
|
+
default: components["responses"]["ApiError"];
|
|
3795
|
+
};
|
|
3796
|
+
};
|
|
3797
|
+
createContactPerson: {
|
|
3798
|
+
parameters: {
|
|
3799
|
+
query?: never;
|
|
3800
|
+
header?: never;
|
|
3801
|
+
path?: never;
|
|
3802
|
+
cookie?: never;
|
|
3803
|
+
};
|
|
3804
|
+
requestBody: {
|
|
3805
|
+
content: {
|
|
3806
|
+
"application/json": components["schemas"]["CreateContactPersonInput"];
|
|
3807
|
+
};
|
|
3808
|
+
};
|
|
3809
|
+
responses: {
|
|
3810
|
+
/** @description Created person. */
|
|
3811
|
+
201: {
|
|
3812
|
+
headers: {
|
|
3813
|
+
[name: string]: unknown;
|
|
3814
|
+
};
|
|
3815
|
+
content: {
|
|
3816
|
+
"application/json": components["schemas"]["ApiResponse_ContactPerson"];
|
|
3817
|
+
};
|
|
3818
|
+
};
|
|
3819
|
+
default: components["responses"]["ApiError"];
|
|
3820
|
+
};
|
|
3821
|
+
};
|
|
3822
|
+
listContactRelations: {
|
|
3823
|
+
parameters: {
|
|
3824
|
+
query: {
|
|
3825
|
+
contact_id: string;
|
|
3826
|
+
};
|
|
3827
|
+
header?: never;
|
|
3828
|
+
path?: never;
|
|
3829
|
+
cookie?: never;
|
|
3830
|
+
};
|
|
3831
|
+
requestBody?: never;
|
|
3832
|
+
responses: {
|
|
3833
|
+
/** @description Outgoing and incoming relations. */
|
|
3834
|
+
200: {
|
|
3835
|
+
headers: {
|
|
3836
|
+
[name: string]: unknown;
|
|
3837
|
+
};
|
|
3838
|
+
content: {
|
|
3839
|
+
"application/json": components["schemas"]["ApiResponse_ContactRelations"];
|
|
3840
|
+
};
|
|
3841
|
+
};
|
|
3842
|
+
default: components["responses"]["ApiError"];
|
|
3843
|
+
};
|
|
3844
|
+
};
|
|
3845
|
+
createContactRelation: {
|
|
3846
|
+
parameters: {
|
|
3847
|
+
query?: never;
|
|
3848
|
+
header?: never;
|
|
3849
|
+
path?: never;
|
|
3850
|
+
cookie?: never;
|
|
3851
|
+
};
|
|
3852
|
+
requestBody: {
|
|
3853
|
+
content: {
|
|
3854
|
+
"application/json": components["schemas"]["CreateContactRelationInput"];
|
|
3855
|
+
};
|
|
3856
|
+
};
|
|
3857
|
+
responses: {
|
|
3858
|
+
/** @description Created relation id. */
|
|
3859
|
+
201: {
|
|
3860
|
+
headers: {
|
|
3861
|
+
[name: string]: unknown;
|
|
3862
|
+
};
|
|
3863
|
+
content: {
|
|
3864
|
+
"application/json": components["schemas"]["ApiResponse_CreateContactRelationResult"];
|
|
3865
|
+
};
|
|
3866
|
+
};
|
|
3867
|
+
default: components["responses"]["ApiError"];
|
|
3868
|
+
};
|
|
3869
|
+
};
|
|
3870
|
+
listBookingEvents: {
|
|
3871
|
+
parameters: {
|
|
3872
|
+
query: {
|
|
3873
|
+
/** @description Start of the window, `yyyy-mm-dd`, inclusive. */
|
|
3874
|
+
from: string;
|
|
3875
|
+
/** @description End of the window, `yyyy-mm-dd`, inclusive. */
|
|
3876
|
+
to: string;
|
|
3877
|
+
status?: components["schemas"]["BookingEventStatus"];
|
|
3878
|
+
};
|
|
3879
|
+
header?: never;
|
|
3880
|
+
path?: never;
|
|
3881
|
+
cookie?: never;
|
|
3882
|
+
};
|
|
3883
|
+
requestBody?: never;
|
|
3884
|
+
responses: {
|
|
3885
|
+
/** @description Arrangementer in the window. */
|
|
3886
|
+
200: {
|
|
3887
|
+
headers: {
|
|
3888
|
+
[name: string]: unknown;
|
|
3889
|
+
};
|
|
3890
|
+
content: {
|
|
3891
|
+
"application/json": components["schemas"]["ApiResponse_BookingEventArray"];
|
|
3892
|
+
};
|
|
3893
|
+
};
|
|
3894
|
+
default: components["responses"]["ApiError"];
|
|
3895
|
+
};
|
|
3896
|
+
};
|
|
3897
|
+
createBookingEvent: {
|
|
3898
|
+
parameters: {
|
|
3899
|
+
query?: never;
|
|
3900
|
+
header?: never;
|
|
3901
|
+
path?: never;
|
|
3902
|
+
cookie?: never;
|
|
3903
|
+
};
|
|
3904
|
+
requestBody: {
|
|
3905
|
+
content: {
|
|
3906
|
+
"application/json": components["schemas"]["CreateBookingEventInput"];
|
|
3907
|
+
};
|
|
3908
|
+
};
|
|
3909
|
+
responses: {
|
|
3910
|
+
/** @description Created arrangement. */
|
|
3911
|
+
201: {
|
|
3912
|
+
headers: {
|
|
3913
|
+
[name: string]: unknown;
|
|
3914
|
+
};
|
|
3915
|
+
content: {
|
|
3916
|
+
"application/json": components["schemas"]["ApiResponse_BookingEvent"];
|
|
3917
|
+
};
|
|
3918
|
+
};
|
|
3919
|
+
default: components["responses"]["ApiError"];
|
|
3920
|
+
};
|
|
3921
|
+
};
|
|
3922
|
+
getBookingEvent: {
|
|
3923
|
+
parameters: {
|
|
3924
|
+
query?: never;
|
|
3925
|
+
header?: never;
|
|
3926
|
+
path: {
|
|
3927
|
+
id: components["parameters"]["Id"];
|
|
3928
|
+
};
|
|
3929
|
+
cookie?: never;
|
|
3930
|
+
};
|
|
3931
|
+
requestBody?: never;
|
|
3932
|
+
responses: {
|
|
3933
|
+
/** @description Arrangement. */
|
|
3934
|
+
200: {
|
|
3935
|
+
headers: {
|
|
3936
|
+
[name: string]: unknown;
|
|
3937
|
+
};
|
|
3938
|
+
content: {
|
|
3939
|
+
"application/json": components["schemas"]["ApiResponse_BookingEvent"];
|
|
3940
|
+
};
|
|
3941
|
+
};
|
|
3942
|
+
default: components["responses"]["ApiError"];
|
|
3943
|
+
};
|
|
3944
|
+
};
|
|
3389
3945
|
getBooking: {
|
|
3390
3946
|
parameters: {
|
|
3391
3947
|
query?: never;
|
|
@@ -3513,6 +4069,108 @@ interface operations {
|
|
|
3513
4069
|
default: components["responses"]["ApiError"];
|
|
3514
4070
|
};
|
|
3515
4071
|
};
|
|
4072
|
+
getBookingPayment: {
|
|
4073
|
+
parameters: {
|
|
4074
|
+
query?: never;
|
|
4075
|
+
header?: never;
|
|
4076
|
+
path: {
|
|
4077
|
+
id: components["parameters"]["Id"];
|
|
4078
|
+
};
|
|
4079
|
+
cookie?: never;
|
|
4080
|
+
};
|
|
4081
|
+
requestBody?: never;
|
|
4082
|
+
responses: {
|
|
4083
|
+
/** @description The payment. `redirect_url` is deliberately absent here. */
|
|
4084
|
+
200: {
|
|
4085
|
+
headers: {
|
|
4086
|
+
[name: string]: unknown;
|
|
4087
|
+
};
|
|
4088
|
+
content: {
|
|
4089
|
+
"application/json": components["schemas"]["ApiResponse_BookingPayment"];
|
|
4090
|
+
};
|
|
4091
|
+
};
|
|
4092
|
+
default: components["responses"]["ApiError"];
|
|
4093
|
+
};
|
|
4094
|
+
};
|
|
4095
|
+
startBookingPayment: {
|
|
4096
|
+
parameters: {
|
|
4097
|
+
query?: never;
|
|
4098
|
+
header?: never;
|
|
4099
|
+
path: {
|
|
4100
|
+
id: components["parameters"]["Id"];
|
|
4101
|
+
};
|
|
4102
|
+
cookie?: never;
|
|
4103
|
+
};
|
|
4104
|
+
requestBody: {
|
|
4105
|
+
content: {
|
|
4106
|
+
"application/json": components["schemas"]["StartBookingPaymentInput"];
|
|
4107
|
+
};
|
|
4108
|
+
};
|
|
4109
|
+
responses: {
|
|
4110
|
+
/** @description The reference and the SHOW-ONCE redirect URL. The URL is never returned again — the payment behind it expires after ten minutes, so a cached one leads into a payment that no longer exists. */
|
|
4111
|
+
200: {
|
|
4112
|
+
headers: {
|
|
4113
|
+
[name: string]: unknown;
|
|
4114
|
+
};
|
|
4115
|
+
content: {
|
|
4116
|
+
"application/json": components["schemas"]["ApiResponse_BookingPaymentStart"];
|
|
4117
|
+
};
|
|
4118
|
+
};
|
|
4119
|
+
default: components["responses"]["ApiError"];
|
|
4120
|
+
};
|
|
4121
|
+
};
|
|
4122
|
+
getManageBookingPayment: {
|
|
4123
|
+
parameters: {
|
|
4124
|
+
query?: never;
|
|
4125
|
+
header?: never;
|
|
4126
|
+
path: {
|
|
4127
|
+
/** @description The show-once manage token handed out when the booking was created. Possession of it authorizes the customer's own cancel or reschedule. */
|
|
4128
|
+
token: components["parameters"]["ManageToken"];
|
|
4129
|
+
};
|
|
4130
|
+
cookie?: never;
|
|
4131
|
+
};
|
|
4132
|
+
requestBody?: never;
|
|
4133
|
+
responses: {
|
|
4134
|
+
/** @description The payment. `redirect_url` is deliberately absent here. */
|
|
4135
|
+
200: {
|
|
4136
|
+
headers: {
|
|
4137
|
+
[name: string]: unknown;
|
|
4138
|
+
};
|
|
4139
|
+
content: {
|
|
4140
|
+
"application/json": components["schemas"]["ApiResponse_BookingPayment"];
|
|
4141
|
+
};
|
|
4142
|
+
};
|
|
4143
|
+
default: components["responses"]["ApiError"];
|
|
4144
|
+
};
|
|
4145
|
+
};
|
|
4146
|
+
startManageBookingPayment: {
|
|
4147
|
+
parameters: {
|
|
4148
|
+
query?: never;
|
|
4149
|
+
header?: never;
|
|
4150
|
+
path: {
|
|
4151
|
+
/** @description The show-once manage token handed out when the booking was created. Possession of it authorizes the customer's own cancel or reschedule. */
|
|
4152
|
+
token: components["parameters"]["ManageToken"];
|
|
4153
|
+
};
|
|
4154
|
+
cookie?: never;
|
|
4155
|
+
};
|
|
4156
|
+
requestBody: {
|
|
4157
|
+
content: {
|
|
4158
|
+
"application/json": components["schemas"]["StartBookingPaymentInput"];
|
|
4159
|
+
};
|
|
4160
|
+
};
|
|
4161
|
+
responses: {
|
|
4162
|
+
/** @description The reference and the show-once redirect URL. */
|
|
4163
|
+
200: {
|
|
4164
|
+
headers: {
|
|
4165
|
+
[name: string]: unknown;
|
|
4166
|
+
};
|
|
4167
|
+
content: {
|
|
4168
|
+
"application/json": components["schemas"]["ApiResponse_BookingPaymentStart"];
|
|
4169
|
+
};
|
|
4170
|
+
};
|
|
4171
|
+
default: components["responses"]["ApiError"];
|
|
4172
|
+
};
|
|
4173
|
+
};
|
|
3516
4174
|
getManagedBooking: {
|
|
3517
4175
|
parameters: {
|
|
3518
4176
|
query?: never;
|