@medalsocial/sdk 1.7.0 → 1.8.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 +38 -0
- package/dist/openapi/medal-social.openapi.json +686 -0
- package/dist/pilot/index.d.mts +2 -2
- package/dist/pilot/index.d.ts +2 -2
- package/dist/src/index.d.mts +230 -3
- package/dist/src/index.d.ts +230 -3
- package/dist/src/index.js +144 -19
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +143 -19
- package/dist/src/index.mjs.map +1 -1
- package/dist/src/openapi.generated.d.mts +473 -0
- package/dist/src/openapi.generated.d.ts +473 -0
- package/dist/src/openapi.generated.js.map +1 -1
- package/openapi/medal-social.openapi.yaml +446 -0
- package/package.json +1 -1
- package/skills/client/SKILL.md +2 -0
- package/skills/resources/SKILL.md +50 -2
package/dist/pilot/index.d.mts
CHANGED
|
@@ -17,9 +17,9 @@ declare const CreateContactSchema: z.ZodObject<{
|
|
|
17
17
|
company: z.ZodOptional<z.ZodString>;
|
|
18
18
|
job_title: z.ZodOptional<z.ZodString>;
|
|
19
19
|
status: z.ZodOptional<z.ZodEnum<{
|
|
20
|
-
customer: "customer";
|
|
21
20
|
lead: "lead";
|
|
22
21
|
prospect: "prospect";
|
|
22
|
+
customer: "customer";
|
|
23
23
|
churned: "churned";
|
|
24
24
|
archived: "archived";
|
|
25
25
|
}>>;
|
|
@@ -95,9 +95,9 @@ declare function createMedalTools(client: Medal): {
|
|
|
95
95
|
company: z.ZodOptional<z.ZodString>;
|
|
96
96
|
job_title: z.ZodOptional<z.ZodString>;
|
|
97
97
|
status: z.ZodOptional<z.ZodEnum<{
|
|
98
|
-
customer: "customer";
|
|
99
98
|
lead: "lead";
|
|
100
99
|
prospect: "prospect";
|
|
100
|
+
customer: "customer";
|
|
101
101
|
churned: "churned";
|
|
102
102
|
archived: "archived";
|
|
103
103
|
}>>;
|
package/dist/pilot/index.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ declare const CreateContactSchema: z.ZodObject<{
|
|
|
17
17
|
company: z.ZodOptional<z.ZodString>;
|
|
18
18
|
job_title: z.ZodOptional<z.ZodString>;
|
|
19
19
|
status: z.ZodOptional<z.ZodEnum<{
|
|
20
|
-
customer: "customer";
|
|
21
20
|
lead: "lead";
|
|
22
21
|
prospect: "prospect";
|
|
22
|
+
customer: "customer";
|
|
23
23
|
churned: "churned";
|
|
24
24
|
archived: "archived";
|
|
25
25
|
}>>;
|
|
@@ -95,9 +95,9 @@ declare function createMedalTools(client: Medal): {
|
|
|
95
95
|
company: z.ZodOptional<z.ZodString>;
|
|
96
96
|
job_title: z.ZodOptional<z.ZodString>;
|
|
97
97
|
status: z.ZodOptional<z.ZodEnum<{
|
|
98
|
-
customer: "customer";
|
|
99
98
|
lead: "lead";
|
|
100
99
|
prospect: "prospect";
|
|
100
|
+
customer: "customer";
|
|
101
101
|
churned: "churned";
|
|
102
102
|
archived: "archived";
|
|
103
103
|
}>>;
|
package/dist/src/index.d.mts
CHANGED
|
@@ -527,7 +527,7 @@ interface ClientConfig {
|
|
|
527
527
|
timeout: number;
|
|
528
528
|
userAgent: string;
|
|
529
529
|
}
|
|
530
|
-
/** Per-request options
|
|
530
|
+
/** Per-request options. `headers` applies to every verb; the named options only matter on writes. */
|
|
531
531
|
interface RequestOptions {
|
|
532
532
|
/**
|
|
533
533
|
* Idempotency key sent as the `Idempotency-Key` header. Retries with the
|
|
@@ -560,6 +560,22 @@ interface RequestOptions {
|
|
|
560
560
|
* Ignored on routes that do not require a capability confirmation.
|
|
561
561
|
*/
|
|
562
562
|
autoConfirm?: AutoConfirmOptions | false;
|
|
563
|
+
/**
|
|
564
|
+
* Set to `false` to send the request exactly once — no automatic retry on
|
|
565
|
+
* 429/5xx. Use it for writes whose FIRST attempt may have succeeded even
|
|
566
|
+
* though the response was lost: a one-time code that is burned on use, a
|
|
567
|
+
* logout or erasure that revokes the very credential a retry would present.
|
|
568
|
+
* A retry there does not repeat the operation, it misreports it as failed.
|
|
569
|
+
* Defaults to `true`.
|
|
570
|
+
*/
|
|
571
|
+
retry?: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Extra request headers, e.g. `x-portal-session` for the customer portal.
|
|
574
|
+
* Applied first: the named options (`idempotencyKey`,
|
|
575
|
+
* `capabilityConfirmation`) win over a same-named entry here, so a bag can
|
|
576
|
+
* never smuggle in a key the SDK did not resolve.
|
|
577
|
+
*/
|
|
578
|
+
headers?: Record<string, string>;
|
|
563
579
|
}
|
|
564
580
|
/**
|
|
565
581
|
* Low-level HTTP client used by all resource classes.
|
|
@@ -570,7 +586,7 @@ declare class BaseClient {
|
|
|
570
586
|
readonly config: ClientConfig;
|
|
571
587
|
constructor(config: ClientConfig);
|
|
572
588
|
/** Execute an authenticated GET request and return the parsed JSON body. */
|
|
573
|
-
get<T>(path: string, params?: Record<string, string | undefined>): Promise<T>;
|
|
589
|
+
get<T>(path: string, params?: Record<string, string | undefined>, options?: Pick<RequestOptions, "headers">): Promise<T>;
|
|
574
590
|
/** Execute an authenticated POST request with a JSON body. */
|
|
575
591
|
post<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
576
592
|
/**
|
|
@@ -1732,6 +1748,210 @@ declare class Helpdesk {
|
|
|
1732
1748
|
constructor(client: BaseClient, confirmer?: CapabilityConfirmer);
|
|
1733
1749
|
}
|
|
1734
1750
|
|
|
1751
|
+
/** Input for starting an e-mail one-time-code login. */
|
|
1752
|
+
interface PortalLoginStartInput {
|
|
1753
|
+
/** The address the code is sent to. */
|
|
1754
|
+
email: string;
|
|
1755
|
+
/** Locale for the e-mail (e.g. `nb`, `en`); the workspace default when omitted. */
|
|
1756
|
+
locale?: string;
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* Result of a login start. Always `"sent"`, whether or not the address is a
|
|
1760
|
+
* known contact — the route is enumeration-safe by design.
|
|
1761
|
+
*/
|
|
1762
|
+
interface PortalLoginStartResult {
|
|
1763
|
+
status: "sent";
|
|
1764
|
+
}
|
|
1765
|
+
/** Input for exchanging an e-mailed code for a portal session. */
|
|
1766
|
+
interface PortalVerifyInput {
|
|
1767
|
+
/** The address the code was sent to. */
|
|
1768
|
+
email: string;
|
|
1769
|
+
/** The one-time code from the e-mail. */
|
|
1770
|
+
code: string;
|
|
1771
|
+
}
|
|
1772
|
+
/** The contact a portal session belongs to. */
|
|
1773
|
+
interface PortalContactSummary {
|
|
1774
|
+
contact_id: string;
|
|
1775
|
+
first_name: string | null;
|
|
1776
|
+
}
|
|
1777
|
+
/**
|
|
1778
|
+
* A portal session. `session_token` is a bearer credential for ONE contact —
|
|
1779
|
+
* keep it in an HttpOnly cookie on the site's server and never hand it to
|
|
1780
|
+
* the browser.
|
|
1781
|
+
*/
|
|
1782
|
+
interface PortalSession {
|
|
1783
|
+
session_token: string;
|
|
1784
|
+
/** Unix timestamp in milliseconds. */
|
|
1785
|
+
expires_at: number;
|
|
1786
|
+
contact: PortalContactSummary;
|
|
1787
|
+
}
|
|
1788
|
+
/** A family member the contact books on behalf of. */
|
|
1789
|
+
interface PortalFamilyMember {
|
|
1790
|
+
name: string;
|
|
1791
|
+
birth_year: number;
|
|
1792
|
+
}
|
|
1793
|
+
/** The signed-in contact's own profile. */
|
|
1794
|
+
interface PortalProfile {
|
|
1795
|
+
contact_id: string;
|
|
1796
|
+
email: string;
|
|
1797
|
+
first_name: string | null;
|
|
1798
|
+
last_name: string | null;
|
|
1799
|
+
phone: string | null;
|
|
1800
|
+
family: PortalFamilyMember[];
|
|
1801
|
+
marketing_consent: boolean;
|
|
1802
|
+
/** Unix timestamp in milliseconds. */
|
|
1803
|
+
created_at: number;
|
|
1804
|
+
}
|
|
1805
|
+
/** Fields the signed-in contact may change on their own profile. */
|
|
1806
|
+
interface PortalProfilePatch {
|
|
1807
|
+
first_name?: string;
|
|
1808
|
+
last_name?: string;
|
|
1809
|
+
/** `null` clears the number. */
|
|
1810
|
+
phone?: string | null;
|
|
1811
|
+
/** Replaces the whole list. */
|
|
1812
|
+
family?: PortalFamilyMember[];
|
|
1813
|
+
/** Records a marketing_email consent change with source 'portal'. */
|
|
1814
|
+
marketing_consent?: boolean;
|
|
1815
|
+
}
|
|
1816
|
+
/** Lifecycle state of a booking as seen from the portal. */
|
|
1817
|
+
type PortalBookingStatus = BookingStatus;
|
|
1818
|
+
/** One of the signed-in contact's bookings. */
|
|
1819
|
+
interface PortalBooking {
|
|
1820
|
+
booking_id: string;
|
|
1821
|
+
status: PortalBookingStatus;
|
|
1822
|
+
/** Unix timestamp in milliseconds. */
|
|
1823
|
+
start_ts: number;
|
|
1824
|
+
/** Unix timestamp in milliseconds. */
|
|
1825
|
+
end_ts: number;
|
|
1826
|
+
service_id: string | null;
|
|
1827
|
+
service_name: string | null;
|
|
1828
|
+
resource_id: string | null;
|
|
1829
|
+
resource_name: string | null;
|
|
1830
|
+
booked_for_name: string | null;
|
|
1831
|
+
/** Integer øre, or `null` when the service has no price. */
|
|
1832
|
+
amount_ore: number | null;
|
|
1833
|
+
notes: string | null;
|
|
1834
|
+
/** Present only while the booking is upcoming and manageable; opens the site's manage page. */
|
|
1835
|
+
manage_token: string | null;
|
|
1836
|
+
can_manage: boolean;
|
|
1837
|
+
}
|
|
1838
|
+
/** The signed-in contact's bookings, split around now. */
|
|
1839
|
+
interface PortalBookings {
|
|
1840
|
+
upcoming: PortalBooking[];
|
|
1841
|
+
past: PortalBooking[];
|
|
1842
|
+
}
|
|
1843
|
+
/** A consent decision included in a portal data export. */
|
|
1844
|
+
interface PortalConsentRecord {
|
|
1845
|
+
consent_type: string;
|
|
1846
|
+
granted: boolean;
|
|
1847
|
+
/** Unix timestamp in milliseconds, or `null`. */
|
|
1848
|
+
granted_at: number | null;
|
|
1849
|
+
/** Unix timestamp in milliseconds, or `null`. */
|
|
1850
|
+
revoked_at: number | null;
|
|
1851
|
+
source: string;
|
|
1852
|
+
}
|
|
1853
|
+
/** Everything the workspace holds about the signed-in contact (GDPR Art. 15). */
|
|
1854
|
+
interface PortalExport {
|
|
1855
|
+
/** Unix timestamp in milliseconds. */
|
|
1856
|
+
exported_at: number;
|
|
1857
|
+
contact: PortalProfile;
|
|
1858
|
+
family: PortalFamilyMember[];
|
|
1859
|
+
consents: PortalConsentRecord[];
|
|
1860
|
+
bookings: PortalBooking[];
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* E-mail one-time-code login.
|
|
1865
|
+
*
|
|
1866
|
+
* Both routes are plain POSTs — deliberately not idempotency-keyed. A start
|
|
1867
|
+
* that is retried sends at most one more code, and a verify that is retried
|
|
1868
|
+
* meets a code that has already been burned and answers
|
|
1869
|
+
* `PORTAL_CODE_INVALID` — neither can duplicate anything.
|
|
1870
|
+
*/
|
|
1871
|
+
declare class PortalLogin {
|
|
1872
|
+
private client;
|
|
1873
|
+
constructor(client: BaseClient);
|
|
1874
|
+
/**
|
|
1875
|
+
* E-mail a one-time code to the address.
|
|
1876
|
+
*
|
|
1877
|
+
* Always 202 `{ status: "sent" }` — enumeration-safe: `"sent"` does not
|
|
1878
|
+
* confirm that the address belongs to a contact. Rate-limited per address
|
|
1879
|
+
* and per caller (`429 RATE_LIMITED`).
|
|
1880
|
+
*/
|
|
1881
|
+
start(input: PortalLoginStartInput): Promise<ApiResponse<PortalLoginStartResult>>;
|
|
1882
|
+
/**
|
|
1883
|
+
* Exchange the e-mailed code for a session.
|
|
1884
|
+
*
|
|
1885
|
+
* `session_token` is a bearer credential for ONE contact — keep it in an
|
|
1886
|
+
* HttpOnly cookie on the site's server. A wrong, burned or expired code all
|
|
1887
|
+
* answer `401 PORTAL_CODE_INVALID`; the three are not distinguished, so the
|
|
1888
|
+
* response is not an oracle for which codes exist.
|
|
1889
|
+
*/
|
|
1890
|
+
verify(input: PortalVerifyInput): Promise<ApiResponse<PortalSession>>;
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Customer self-service portal. The session token is a bearer credential for a
|
|
1894
|
+
* single contact: the calling site server must keep it in an HttpOnly cookie
|
|
1895
|
+
* and never hand it to the browser. Session-bound methods send it as
|
|
1896
|
+
* `X-Portal-Session`; none of them carries an `Idempotency-Key`.
|
|
1897
|
+
*
|
|
1898
|
+
* The API key needs `read:portal` and `write:portal` (`403 FORBIDDEN`
|
|
1899
|
+
* otherwise). A missing header answers `401 PORTAL_SESSION_REQUIRED`; an
|
|
1900
|
+
* unknown, expired or revoked token answers `401 PORTAL_SESSION_INVALID` —
|
|
1901
|
+
* treat both as "sign in again".
|
|
1902
|
+
*/
|
|
1903
|
+
declare class Portal {
|
|
1904
|
+
private client;
|
|
1905
|
+
/** E-mail one-time-code login: `start` sends the code, `verify` exchanges it. */
|
|
1906
|
+
readonly login: PortalLogin;
|
|
1907
|
+
constructor(client: BaseClient);
|
|
1908
|
+
/**
|
|
1909
|
+
* Revoke the session. Resolves to `undefined` (the route answers 204).
|
|
1910
|
+
*
|
|
1911
|
+
* Not keyed: revoking twice reaches the same state — the second call answers
|
|
1912
|
+
* `401 PORTAL_SESSION_INVALID`, which is the outcome you wanted anyway.
|
|
1913
|
+
*/
|
|
1914
|
+
logout(session: string): Promise<void>;
|
|
1915
|
+
/** The signed-in contact's own profile. */
|
|
1916
|
+
me(session: string): Promise<ApiResponse<PortalProfile>>;
|
|
1917
|
+
/**
|
|
1918
|
+
* Update the signed-in contact's profile. Only the supplied fields change;
|
|
1919
|
+
* `phone: null` clears the number and `family` replaces the whole list.
|
|
1920
|
+
* `marketing_consent` records a `marketing_email` consent decision with
|
|
1921
|
+
* source `portal`. Returns the profile as it is after the change.
|
|
1922
|
+
*/
|
|
1923
|
+
/**
|
|
1924
|
+
* A profile patch is not idempotency-keyed on the server and a `marketing_consent`
|
|
1925
|
+
* change records a dated consent event, so a retry after a committed-but-lost
|
|
1926
|
+
* response would repeat that event: sent exactly once, like the other writes.
|
|
1927
|
+
*/
|
|
1928
|
+
updateMe(session: string, patch: PortalProfilePatch): Promise<ApiResponse<PortalProfile>>;
|
|
1929
|
+
/**
|
|
1930
|
+
* The contact's bookings split into `upcoming` and `past`. An upcoming
|
|
1931
|
+
* booking that is still inside the workspace's policy windows carries
|
|
1932
|
+
* `manage_token` and `can_manage: true`; use the token to open the site's
|
|
1933
|
+
* manage page (`medal.bookings.manage.*`).
|
|
1934
|
+
*/
|
|
1935
|
+
myBookings(session: string): Promise<ApiResponse<PortalBookings>>;
|
|
1936
|
+
/**
|
|
1937
|
+
* Everything the workspace holds about the contact — profile, family,
|
|
1938
|
+
* consents and bookings — as one JSON document (GDPR Art. 15). Synchronous,
|
|
1939
|
+
* unlike `medal.gdpr.requestExport()`, which exports the whole workspace.
|
|
1940
|
+
*
|
|
1941
|
+
* Not keyed: a read-only snapshot, so a retried call costs nothing and
|
|
1942
|
+
* duplicates nothing.
|
|
1943
|
+
*/
|
|
1944
|
+
exportMyData(session: string): Promise<ApiResponse<PortalExport>>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Erase the contact (GDPR Art. 17). Resolves to `undefined` (the route
|
|
1947
|
+
* answers 204); the session is revoked as part of the deletion.
|
|
1948
|
+
*
|
|
1949
|
+
* Not keyed: deletion is terminal, so a retry meets a revoked session and
|
|
1950
|
+
* answers `401 PORTAL_SESSION_INVALID` rather than deleting anything else.
|
|
1951
|
+
*/
|
|
1952
|
+
deleteMe(session: string): Promise<void>;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1735
1955
|
/** A post in the workspace (list view). */
|
|
1736
1956
|
interface Post {
|
|
1737
1957
|
id: string;
|
|
@@ -2382,6 +2602,12 @@ interface MedalOptions {
|
|
|
2382
2602
|
* to_ts: Date.now() + 7 * 86_400_000,
|
|
2383
2603
|
* });
|
|
2384
2604
|
*
|
|
2605
|
+
* // Customer portal — e-mail code login, then session-bound self-service.
|
|
2606
|
+
* // Keep `session_token` in an HttpOnly cookie on your server.
|
|
2607
|
+
* await medal.portal.login.start({ email: 'ida@example.com' });
|
|
2608
|
+
* const { data: session } = await medal.portal.login.verify({ email: 'ida@example.com', code: '123456' });
|
|
2609
|
+
* const { data: mine } = await medal.portal.myBookings(session.session_token);
|
|
2610
|
+
*
|
|
2385
2611
|
* // Contacts, Deals, GDPR, Workspaces
|
|
2386
2612
|
* const contacts = await medal.contacts.list({ status: 'lead' });
|
|
2387
2613
|
* const { data: deal } = await medal.deals.create({ title: 'Acme', value: 50000 });
|
|
@@ -2398,6 +2624,7 @@ declare class Medal {
|
|
|
2398
2624
|
readonly deals: Deals;
|
|
2399
2625
|
readonly gdpr: Gdpr;
|
|
2400
2626
|
readonly helpdesk: Helpdesk;
|
|
2627
|
+
readonly portal: Portal;
|
|
2401
2628
|
readonly posts: Posts;
|
|
2402
2629
|
readonly scan: Scan;
|
|
2403
2630
|
readonly webhooks: Webhooks;
|
|
@@ -2408,4 +2635,4 @@ declare class Medal {
|
|
|
2408
2635
|
/** Convenience factory — equivalent to `new Medal(apiKey, options)`. */
|
|
2409
2636
|
declare function createMedalClient(apiKey: string, options?: MedalOptions): Medal;
|
|
2410
2637
|
|
|
2411
|
-
export { type Activity, type AddNoteInput, type ApiResponse, type AutoConfirmContext, type AutoConfirmOptions, BaseClient, type BatchSendInput, type BatchSendResult, type BatchSendSummary, type Booking, type BookingActionResult, type BookingAvailabilityOptions, type BookingCancelledBy, type BookingClaimableCreatedVia, type BookingContactInput, type BookingCreateResult, type BookingCreatedVia, type BookingPaymentStatus, type BookingRescheduleResult, type BookingResource, type BookingResourceType, type BookingScheduleDay, type BookingScheduleOptions, type BookingService, type BookingSlot, type BookingStatus, type BookingTimestampInput, Bookings, type BookingsPage, type BookingsPagination, CAPABILITY_IDS, CAPABILITY_ROUTES, type CancelBookingInput, type CapabilityConfirmation, CapabilityConfirmations, CapabilityConfirmer, type CapabilityId, type CapabilityPathParamValue, type CapabilityRoute, type CapabilityWriteBodies, type CapabilityWriteRequest, type Channel, type ChannelConnectedEvent, type ChannelConnection, type ChannelConnectionDisconnectResult, type ChannelConnectionState, type ChannelDisconnectReason, type ChannelDisconnectedEvent, Channels, type ConnectLink, type ConnectLinkCreateResult, type ConnectLinkRevokeResult, type ConnectLinkStatus, type ConsentRecord, type ConsentResult, type ConsentType, type Contact, type ContactConsents, type ContactCreateResult, type ContactNoteResult, type ContactRemoveResult, type ContactStatus, type ContactUpdateResult, Contacts, type Conversation, type ConversationAssignedEvent, type ConversationCreatedEvent, type ConversationMessage, type ConversationStatus, type ConversationStatusChangedEvent, type ConversationUpdateResult, type CookieCategoryConsent, type CookieConsentInput, type CreateBookingInput, type CreateBookingItemInput, type CreateConnectLinkInput, type CreateContactInput, type CreateDealInput, type CreatePostInput, type CreateReplyInput, type CreateWebhookInput, type CreatedBooking, DEFAULT_WEBHOOK_TOLERANCE_MS, type Deal, type DealCreateResult, type DealRemoveResult, type DealStatus, type DealUpdateResult, Deals, type EmailSend, type EmailSendResult, type EmailStatus, type EmailTemplate, type EmailTemplateDetail, Emails, Gdpr, type GdprExport, type GetTemplateOptions, Helpdesk, type HelpdeskMessageType, type ImportContactInput, type ImportContactsResult, type IssueCapabilityConfirmationInput, type ListBookingServicesOptions, type ListBookingsOptions, type ListConnectLinksOptions, type ListContactsOptions, type ListConversationsOptions, type ListDealsOptions, type ListDeliveriesOptions, type ListPostsOptions, type ManageSummary, Medal, MedalApiError, type MedalOptions, type MessageAuthorType, type MessageDeliveryStatus, type MessageDeliveryUpdatedEvent, type MessageReceivedEvent, type MessageSentEvent, type PaginatedResponse, type PaginationOptions, type Post, type PostDetail, type PostType, type PostVariant, Posts, type PublishResult, type RecordConsentInput, type ReplyCreateResult, type RequestOptions, type RescheduleBookingInput, Scan, type ScanCompany, type ScanCreateInput, type ScanCreateResult, type ScanJob, type ScanResultPayload, type ScanStatus, type ScanSubScores, type SchedulePostInput, type ScheduleResult, type SendEmailInput, type TestPingEvent, type UpdateBookingInput, type UpdateContactInput, type UpdateConversationInput, type UpdateDealInput, type UpdatePostInput, type UpdateWebhookInput, type VerifyWebhookSignatureInput, type WaitForScanOptions, type WebhookChannelLifecycleData, type WebhookConversationSnapshot, type WebhookDeleteResult, type WebhookDelivery, type WebhookEndpoint, type WebhookEvent, type WebhookMessageSnapshot, type WebhookTestResult, WebhookVerificationError, type WebhookVerificationErrorCode, Webhooks, type Workspace, Workspaces, createMedalClient, Medal as default, verifyWebhookSignature };
|
|
2638
|
+
export { type Activity, type AddNoteInput, type ApiResponse, type AutoConfirmContext, type AutoConfirmOptions, BaseClient, type BatchSendInput, type BatchSendResult, type BatchSendSummary, type Booking, type BookingActionResult, type BookingAvailabilityOptions, type BookingCancelledBy, type BookingClaimableCreatedVia, type BookingContactInput, type BookingCreateResult, type BookingCreatedVia, type BookingPaymentStatus, type BookingRescheduleResult, type BookingResource, type BookingResourceType, type BookingScheduleDay, type BookingScheduleOptions, type BookingService, type BookingSlot, type BookingStatus, type BookingTimestampInput, Bookings, type BookingsPage, type BookingsPagination, CAPABILITY_IDS, CAPABILITY_ROUTES, type CancelBookingInput, type CapabilityConfirmation, CapabilityConfirmations, CapabilityConfirmer, type CapabilityId, type CapabilityPathParamValue, type CapabilityRoute, type CapabilityWriteBodies, type CapabilityWriteRequest, type Channel, type ChannelConnectedEvent, type ChannelConnection, type ChannelConnectionDisconnectResult, type ChannelConnectionState, type ChannelDisconnectReason, type ChannelDisconnectedEvent, Channels, type ConnectLink, type ConnectLinkCreateResult, type ConnectLinkRevokeResult, type ConnectLinkStatus, type ConsentRecord, type ConsentResult, type ConsentType, type Contact, type ContactConsents, type ContactCreateResult, type ContactNoteResult, type ContactRemoveResult, type ContactStatus, type ContactUpdateResult, Contacts, type Conversation, type ConversationAssignedEvent, type ConversationCreatedEvent, type ConversationMessage, type ConversationStatus, type ConversationStatusChangedEvent, type ConversationUpdateResult, type CookieCategoryConsent, type CookieConsentInput, type CreateBookingInput, type CreateBookingItemInput, type CreateConnectLinkInput, type CreateContactInput, type CreateDealInput, type CreatePostInput, type CreateReplyInput, type CreateWebhookInput, type CreatedBooking, DEFAULT_WEBHOOK_TOLERANCE_MS, type Deal, type DealCreateResult, type DealRemoveResult, type DealStatus, type DealUpdateResult, Deals, type EmailSend, type EmailSendResult, type EmailStatus, type EmailTemplate, type EmailTemplateDetail, Emails, Gdpr, type GdprExport, type GetTemplateOptions, Helpdesk, type HelpdeskMessageType, type ImportContactInput, type ImportContactsResult, type IssueCapabilityConfirmationInput, type ListBookingServicesOptions, type ListBookingsOptions, type ListConnectLinksOptions, type ListContactsOptions, type ListConversationsOptions, type ListDealsOptions, type ListDeliveriesOptions, type ListPostsOptions, type ManageSummary, Medal, MedalApiError, type MedalOptions, type MessageAuthorType, type MessageDeliveryStatus, type MessageDeliveryUpdatedEvent, type MessageReceivedEvent, type MessageSentEvent, type PaginatedResponse, type PaginationOptions, Portal, type PortalBooking, type PortalBookingStatus, type PortalBookings, type PortalConsentRecord, type PortalContactSummary, type PortalExport, type PortalFamilyMember, type PortalLoginStartInput, type PortalLoginStartResult, type PortalProfile, type PortalProfilePatch, type PortalSession, type PortalVerifyInput, type Post, type PostDetail, type PostType, type PostVariant, Posts, type PublishResult, type RecordConsentInput, type ReplyCreateResult, type RequestOptions, type RescheduleBookingInput, Scan, type ScanCompany, type ScanCreateInput, type ScanCreateResult, type ScanJob, type ScanResultPayload, type ScanStatus, type ScanSubScores, type SchedulePostInput, type ScheduleResult, type SendEmailInput, type TestPingEvent, type UpdateBookingInput, type UpdateContactInput, type UpdateConversationInput, type UpdateDealInput, type UpdatePostInput, type UpdateWebhookInput, type VerifyWebhookSignatureInput, type WaitForScanOptions, type WebhookChannelLifecycleData, type WebhookConversationSnapshot, type WebhookDeleteResult, type WebhookDelivery, type WebhookEndpoint, type WebhookEvent, type WebhookMessageSnapshot, type WebhookTestResult, WebhookVerificationError, type WebhookVerificationErrorCode, Webhooks, type Workspace, Workspaces, createMedalClient, Medal as default, verifyWebhookSignature };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -527,7 +527,7 @@ interface ClientConfig {
|
|
|
527
527
|
timeout: number;
|
|
528
528
|
userAgent: string;
|
|
529
529
|
}
|
|
530
|
-
/** Per-request options
|
|
530
|
+
/** Per-request options. `headers` applies to every verb; the named options only matter on writes. */
|
|
531
531
|
interface RequestOptions {
|
|
532
532
|
/**
|
|
533
533
|
* Idempotency key sent as the `Idempotency-Key` header. Retries with the
|
|
@@ -560,6 +560,22 @@ interface RequestOptions {
|
|
|
560
560
|
* Ignored on routes that do not require a capability confirmation.
|
|
561
561
|
*/
|
|
562
562
|
autoConfirm?: AutoConfirmOptions | false;
|
|
563
|
+
/**
|
|
564
|
+
* Set to `false` to send the request exactly once — no automatic retry on
|
|
565
|
+
* 429/5xx. Use it for writes whose FIRST attempt may have succeeded even
|
|
566
|
+
* though the response was lost: a one-time code that is burned on use, a
|
|
567
|
+
* logout or erasure that revokes the very credential a retry would present.
|
|
568
|
+
* A retry there does not repeat the operation, it misreports it as failed.
|
|
569
|
+
* Defaults to `true`.
|
|
570
|
+
*/
|
|
571
|
+
retry?: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Extra request headers, e.g. `x-portal-session` for the customer portal.
|
|
574
|
+
* Applied first: the named options (`idempotencyKey`,
|
|
575
|
+
* `capabilityConfirmation`) win over a same-named entry here, so a bag can
|
|
576
|
+
* never smuggle in a key the SDK did not resolve.
|
|
577
|
+
*/
|
|
578
|
+
headers?: Record<string, string>;
|
|
563
579
|
}
|
|
564
580
|
/**
|
|
565
581
|
* Low-level HTTP client used by all resource classes.
|
|
@@ -570,7 +586,7 @@ declare class BaseClient {
|
|
|
570
586
|
readonly config: ClientConfig;
|
|
571
587
|
constructor(config: ClientConfig);
|
|
572
588
|
/** Execute an authenticated GET request and return the parsed JSON body. */
|
|
573
|
-
get<T>(path: string, params?: Record<string, string | undefined>): Promise<T>;
|
|
589
|
+
get<T>(path: string, params?: Record<string, string | undefined>, options?: Pick<RequestOptions, "headers">): Promise<T>;
|
|
574
590
|
/** Execute an authenticated POST request with a JSON body. */
|
|
575
591
|
post<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
576
592
|
/**
|
|
@@ -1732,6 +1748,210 @@ declare class Helpdesk {
|
|
|
1732
1748
|
constructor(client: BaseClient, confirmer?: CapabilityConfirmer);
|
|
1733
1749
|
}
|
|
1734
1750
|
|
|
1751
|
+
/** Input for starting an e-mail one-time-code login. */
|
|
1752
|
+
interface PortalLoginStartInput {
|
|
1753
|
+
/** The address the code is sent to. */
|
|
1754
|
+
email: string;
|
|
1755
|
+
/** Locale for the e-mail (e.g. `nb`, `en`); the workspace default when omitted. */
|
|
1756
|
+
locale?: string;
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* Result of a login start. Always `"sent"`, whether or not the address is a
|
|
1760
|
+
* known contact — the route is enumeration-safe by design.
|
|
1761
|
+
*/
|
|
1762
|
+
interface PortalLoginStartResult {
|
|
1763
|
+
status: "sent";
|
|
1764
|
+
}
|
|
1765
|
+
/** Input for exchanging an e-mailed code for a portal session. */
|
|
1766
|
+
interface PortalVerifyInput {
|
|
1767
|
+
/** The address the code was sent to. */
|
|
1768
|
+
email: string;
|
|
1769
|
+
/** The one-time code from the e-mail. */
|
|
1770
|
+
code: string;
|
|
1771
|
+
}
|
|
1772
|
+
/** The contact a portal session belongs to. */
|
|
1773
|
+
interface PortalContactSummary {
|
|
1774
|
+
contact_id: string;
|
|
1775
|
+
first_name: string | null;
|
|
1776
|
+
}
|
|
1777
|
+
/**
|
|
1778
|
+
* A portal session. `session_token` is a bearer credential for ONE contact —
|
|
1779
|
+
* keep it in an HttpOnly cookie on the site's server and never hand it to
|
|
1780
|
+
* the browser.
|
|
1781
|
+
*/
|
|
1782
|
+
interface PortalSession {
|
|
1783
|
+
session_token: string;
|
|
1784
|
+
/** Unix timestamp in milliseconds. */
|
|
1785
|
+
expires_at: number;
|
|
1786
|
+
contact: PortalContactSummary;
|
|
1787
|
+
}
|
|
1788
|
+
/** A family member the contact books on behalf of. */
|
|
1789
|
+
interface PortalFamilyMember {
|
|
1790
|
+
name: string;
|
|
1791
|
+
birth_year: number;
|
|
1792
|
+
}
|
|
1793
|
+
/** The signed-in contact's own profile. */
|
|
1794
|
+
interface PortalProfile {
|
|
1795
|
+
contact_id: string;
|
|
1796
|
+
email: string;
|
|
1797
|
+
first_name: string | null;
|
|
1798
|
+
last_name: string | null;
|
|
1799
|
+
phone: string | null;
|
|
1800
|
+
family: PortalFamilyMember[];
|
|
1801
|
+
marketing_consent: boolean;
|
|
1802
|
+
/** Unix timestamp in milliseconds. */
|
|
1803
|
+
created_at: number;
|
|
1804
|
+
}
|
|
1805
|
+
/** Fields the signed-in contact may change on their own profile. */
|
|
1806
|
+
interface PortalProfilePatch {
|
|
1807
|
+
first_name?: string;
|
|
1808
|
+
last_name?: string;
|
|
1809
|
+
/** `null` clears the number. */
|
|
1810
|
+
phone?: string | null;
|
|
1811
|
+
/** Replaces the whole list. */
|
|
1812
|
+
family?: PortalFamilyMember[];
|
|
1813
|
+
/** Records a marketing_email consent change with source 'portal'. */
|
|
1814
|
+
marketing_consent?: boolean;
|
|
1815
|
+
}
|
|
1816
|
+
/** Lifecycle state of a booking as seen from the portal. */
|
|
1817
|
+
type PortalBookingStatus = BookingStatus;
|
|
1818
|
+
/** One of the signed-in contact's bookings. */
|
|
1819
|
+
interface PortalBooking {
|
|
1820
|
+
booking_id: string;
|
|
1821
|
+
status: PortalBookingStatus;
|
|
1822
|
+
/** Unix timestamp in milliseconds. */
|
|
1823
|
+
start_ts: number;
|
|
1824
|
+
/** Unix timestamp in milliseconds. */
|
|
1825
|
+
end_ts: number;
|
|
1826
|
+
service_id: string | null;
|
|
1827
|
+
service_name: string | null;
|
|
1828
|
+
resource_id: string | null;
|
|
1829
|
+
resource_name: string | null;
|
|
1830
|
+
booked_for_name: string | null;
|
|
1831
|
+
/** Integer øre, or `null` when the service has no price. */
|
|
1832
|
+
amount_ore: number | null;
|
|
1833
|
+
notes: string | null;
|
|
1834
|
+
/** Present only while the booking is upcoming and manageable; opens the site's manage page. */
|
|
1835
|
+
manage_token: string | null;
|
|
1836
|
+
can_manage: boolean;
|
|
1837
|
+
}
|
|
1838
|
+
/** The signed-in contact's bookings, split around now. */
|
|
1839
|
+
interface PortalBookings {
|
|
1840
|
+
upcoming: PortalBooking[];
|
|
1841
|
+
past: PortalBooking[];
|
|
1842
|
+
}
|
|
1843
|
+
/** A consent decision included in a portal data export. */
|
|
1844
|
+
interface PortalConsentRecord {
|
|
1845
|
+
consent_type: string;
|
|
1846
|
+
granted: boolean;
|
|
1847
|
+
/** Unix timestamp in milliseconds, or `null`. */
|
|
1848
|
+
granted_at: number | null;
|
|
1849
|
+
/** Unix timestamp in milliseconds, or `null`. */
|
|
1850
|
+
revoked_at: number | null;
|
|
1851
|
+
source: string;
|
|
1852
|
+
}
|
|
1853
|
+
/** Everything the workspace holds about the signed-in contact (GDPR Art. 15). */
|
|
1854
|
+
interface PortalExport {
|
|
1855
|
+
/** Unix timestamp in milliseconds. */
|
|
1856
|
+
exported_at: number;
|
|
1857
|
+
contact: PortalProfile;
|
|
1858
|
+
family: PortalFamilyMember[];
|
|
1859
|
+
consents: PortalConsentRecord[];
|
|
1860
|
+
bookings: PortalBooking[];
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* E-mail one-time-code login.
|
|
1865
|
+
*
|
|
1866
|
+
* Both routes are plain POSTs — deliberately not idempotency-keyed. A start
|
|
1867
|
+
* that is retried sends at most one more code, and a verify that is retried
|
|
1868
|
+
* meets a code that has already been burned and answers
|
|
1869
|
+
* `PORTAL_CODE_INVALID` — neither can duplicate anything.
|
|
1870
|
+
*/
|
|
1871
|
+
declare class PortalLogin {
|
|
1872
|
+
private client;
|
|
1873
|
+
constructor(client: BaseClient);
|
|
1874
|
+
/**
|
|
1875
|
+
* E-mail a one-time code to the address.
|
|
1876
|
+
*
|
|
1877
|
+
* Always 202 `{ status: "sent" }` — enumeration-safe: `"sent"` does not
|
|
1878
|
+
* confirm that the address belongs to a contact. Rate-limited per address
|
|
1879
|
+
* and per caller (`429 RATE_LIMITED`).
|
|
1880
|
+
*/
|
|
1881
|
+
start(input: PortalLoginStartInput): Promise<ApiResponse<PortalLoginStartResult>>;
|
|
1882
|
+
/**
|
|
1883
|
+
* Exchange the e-mailed code for a session.
|
|
1884
|
+
*
|
|
1885
|
+
* `session_token` is a bearer credential for ONE contact — keep it in an
|
|
1886
|
+
* HttpOnly cookie on the site's server. A wrong, burned or expired code all
|
|
1887
|
+
* answer `401 PORTAL_CODE_INVALID`; the three are not distinguished, so the
|
|
1888
|
+
* response is not an oracle for which codes exist.
|
|
1889
|
+
*/
|
|
1890
|
+
verify(input: PortalVerifyInput): Promise<ApiResponse<PortalSession>>;
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Customer self-service portal. The session token is a bearer credential for a
|
|
1894
|
+
* single contact: the calling site server must keep it in an HttpOnly cookie
|
|
1895
|
+
* and never hand it to the browser. Session-bound methods send it as
|
|
1896
|
+
* `X-Portal-Session`; none of them carries an `Idempotency-Key`.
|
|
1897
|
+
*
|
|
1898
|
+
* The API key needs `read:portal` and `write:portal` (`403 FORBIDDEN`
|
|
1899
|
+
* otherwise). A missing header answers `401 PORTAL_SESSION_REQUIRED`; an
|
|
1900
|
+
* unknown, expired or revoked token answers `401 PORTAL_SESSION_INVALID` —
|
|
1901
|
+
* treat both as "sign in again".
|
|
1902
|
+
*/
|
|
1903
|
+
declare class Portal {
|
|
1904
|
+
private client;
|
|
1905
|
+
/** E-mail one-time-code login: `start` sends the code, `verify` exchanges it. */
|
|
1906
|
+
readonly login: PortalLogin;
|
|
1907
|
+
constructor(client: BaseClient);
|
|
1908
|
+
/**
|
|
1909
|
+
* Revoke the session. Resolves to `undefined` (the route answers 204).
|
|
1910
|
+
*
|
|
1911
|
+
* Not keyed: revoking twice reaches the same state — the second call answers
|
|
1912
|
+
* `401 PORTAL_SESSION_INVALID`, which is the outcome you wanted anyway.
|
|
1913
|
+
*/
|
|
1914
|
+
logout(session: string): Promise<void>;
|
|
1915
|
+
/** The signed-in contact's own profile. */
|
|
1916
|
+
me(session: string): Promise<ApiResponse<PortalProfile>>;
|
|
1917
|
+
/**
|
|
1918
|
+
* Update the signed-in contact's profile. Only the supplied fields change;
|
|
1919
|
+
* `phone: null` clears the number and `family` replaces the whole list.
|
|
1920
|
+
* `marketing_consent` records a `marketing_email` consent decision with
|
|
1921
|
+
* source `portal`. Returns the profile as it is after the change.
|
|
1922
|
+
*/
|
|
1923
|
+
/**
|
|
1924
|
+
* A profile patch is not idempotency-keyed on the server and a `marketing_consent`
|
|
1925
|
+
* change records a dated consent event, so a retry after a committed-but-lost
|
|
1926
|
+
* response would repeat that event: sent exactly once, like the other writes.
|
|
1927
|
+
*/
|
|
1928
|
+
updateMe(session: string, patch: PortalProfilePatch): Promise<ApiResponse<PortalProfile>>;
|
|
1929
|
+
/**
|
|
1930
|
+
* The contact's bookings split into `upcoming` and `past`. An upcoming
|
|
1931
|
+
* booking that is still inside the workspace's policy windows carries
|
|
1932
|
+
* `manage_token` and `can_manage: true`; use the token to open the site's
|
|
1933
|
+
* manage page (`medal.bookings.manage.*`).
|
|
1934
|
+
*/
|
|
1935
|
+
myBookings(session: string): Promise<ApiResponse<PortalBookings>>;
|
|
1936
|
+
/**
|
|
1937
|
+
* Everything the workspace holds about the contact — profile, family,
|
|
1938
|
+
* consents and bookings — as one JSON document (GDPR Art. 15). Synchronous,
|
|
1939
|
+
* unlike `medal.gdpr.requestExport()`, which exports the whole workspace.
|
|
1940
|
+
*
|
|
1941
|
+
* Not keyed: a read-only snapshot, so a retried call costs nothing and
|
|
1942
|
+
* duplicates nothing.
|
|
1943
|
+
*/
|
|
1944
|
+
exportMyData(session: string): Promise<ApiResponse<PortalExport>>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Erase the contact (GDPR Art. 17). Resolves to `undefined` (the route
|
|
1947
|
+
* answers 204); the session is revoked as part of the deletion.
|
|
1948
|
+
*
|
|
1949
|
+
* Not keyed: deletion is terminal, so a retry meets a revoked session and
|
|
1950
|
+
* answers `401 PORTAL_SESSION_INVALID` rather than deleting anything else.
|
|
1951
|
+
*/
|
|
1952
|
+
deleteMe(session: string): Promise<void>;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1735
1955
|
/** A post in the workspace (list view). */
|
|
1736
1956
|
interface Post {
|
|
1737
1957
|
id: string;
|
|
@@ -2382,6 +2602,12 @@ interface MedalOptions {
|
|
|
2382
2602
|
* to_ts: Date.now() + 7 * 86_400_000,
|
|
2383
2603
|
* });
|
|
2384
2604
|
*
|
|
2605
|
+
* // Customer portal — e-mail code login, then session-bound self-service.
|
|
2606
|
+
* // Keep `session_token` in an HttpOnly cookie on your server.
|
|
2607
|
+
* await medal.portal.login.start({ email: 'ida@example.com' });
|
|
2608
|
+
* const { data: session } = await medal.portal.login.verify({ email: 'ida@example.com', code: '123456' });
|
|
2609
|
+
* const { data: mine } = await medal.portal.myBookings(session.session_token);
|
|
2610
|
+
*
|
|
2385
2611
|
* // Contacts, Deals, GDPR, Workspaces
|
|
2386
2612
|
* const contacts = await medal.contacts.list({ status: 'lead' });
|
|
2387
2613
|
* const { data: deal } = await medal.deals.create({ title: 'Acme', value: 50000 });
|
|
@@ -2398,6 +2624,7 @@ declare class Medal {
|
|
|
2398
2624
|
readonly deals: Deals;
|
|
2399
2625
|
readonly gdpr: Gdpr;
|
|
2400
2626
|
readonly helpdesk: Helpdesk;
|
|
2627
|
+
readonly portal: Portal;
|
|
2401
2628
|
readonly posts: Posts;
|
|
2402
2629
|
readonly scan: Scan;
|
|
2403
2630
|
readonly webhooks: Webhooks;
|
|
@@ -2408,4 +2635,4 @@ declare class Medal {
|
|
|
2408
2635
|
/** Convenience factory — equivalent to `new Medal(apiKey, options)`. */
|
|
2409
2636
|
declare function createMedalClient(apiKey: string, options?: MedalOptions): Medal;
|
|
2410
2637
|
|
|
2411
|
-
export { type Activity, type AddNoteInput, type ApiResponse, type AutoConfirmContext, type AutoConfirmOptions, BaseClient, type BatchSendInput, type BatchSendResult, type BatchSendSummary, type Booking, type BookingActionResult, type BookingAvailabilityOptions, type BookingCancelledBy, type BookingClaimableCreatedVia, type BookingContactInput, type BookingCreateResult, type BookingCreatedVia, type BookingPaymentStatus, type BookingRescheduleResult, type BookingResource, type BookingResourceType, type BookingScheduleDay, type BookingScheduleOptions, type BookingService, type BookingSlot, type BookingStatus, type BookingTimestampInput, Bookings, type BookingsPage, type BookingsPagination, CAPABILITY_IDS, CAPABILITY_ROUTES, type CancelBookingInput, type CapabilityConfirmation, CapabilityConfirmations, CapabilityConfirmer, type CapabilityId, type CapabilityPathParamValue, type CapabilityRoute, type CapabilityWriteBodies, type CapabilityWriteRequest, type Channel, type ChannelConnectedEvent, type ChannelConnection, type ChannelConnectionDisconnectResult, type ChannelConnectionState, type ChannelDisconnectReason, type ChannelDisconnectedEvent, Channels, type ConnectLink, type ConnectLinkCreateResult, type ConnectLinkRevokeResult, type ConnectLinkStatus, type ConsentRecord, type ConsentResult, type ConsentType, type Contact, type ContactConsents, type ContactCreateResult, type ContactNoteResult, type ContactRemoveResult, type ContactStatus, type ContactUpdateResult, Contacts, type Conversation, type ConversationAssignedEvent, type ConversationCreatedEvent, type ConversationMessage, type ConversationStatus, type ConversationStatusChangedEvent, type ConversationUpdateResult, type CookieCategoryConsent, type CookieConsentInput, type CreateBookingInput, type CreateBookingItemInput, type CreateConnectLinkInput, type CreateContactInput, type CreateDealInput, type CreatePostInput, type CreateReplyInput, type CreateWebhookInput, type CreatedBooking, DEFAULT_WEBHOOK_TOLERANCE_MS, type Deal, type DealCreateResult, type DealRemoveResult, type DealStatus, type DealUpdateResult, Deals, type EmailSend, type EmailSendResult, type EmailStatus, type EmailTemplate, type EmailTemplateDetail, Emails, Gdpr, type GdprExport, type GetTemplateOptions, Helpdesk, type HelpdeskMessageType, type ImportContactInput, type ImportContactsResult, type IssueCapabilityConfirmationInput, type ListBookingServicesOptions, type ListBookingsOptions, type ListConnectLinksOptions, type ListContactsOptions, type ListConversationsOptions, type ListDealsOptions, type ListDeliveriesOptions, type ListPostsOptions, type ManageSummary, Medal, MedalApiError, type MedalOptions, type MessageAuthorType, type MessageDeliveryStatus, type MessageDeliveryUpdatedEvent, type MessageReceivedEvent, type MessageSentEvent, type PaginatedResponse, type PaginationOptions, type Post, type PostDetail, type PostType, type PostVariant, Posts, type PublishResult, type RecordConsentInput, type ReplyCreateResult, type RequestOptions, type RescheduleBookingInput, Scan, type ScanCompany, type ScanCreateInput, type ScanCreateResult, type ScanJob, type ScanResultPayload, type ScanStatus, type ScanSubScores, type SchedulePostInput, type ScheduleResult, type SendEmailInput, type TestPingEvent, type UpdateBookingInput, type UpdateContactInput, type UpdateConversationInput, type UpdateDealInput, type UpdatePostInput, type UpdateWebhookInput, type VerifyWebhookSignatureInput, type WaitForScanOptions, type WebhookChannelLifecycleData, type WebhookConversationSnapshot, type WebhookDeleteResult, type WebhookDelivery, type WebhookEndpoint, type WebhookEvent, type WebhookMessageSnapshot, type WebhookTestResult, WebhookVerificationError, type WebhookVerificationErrorCode, Webhooks, type Workspace, Workspaces, createMedalClient, Medal as default, verifyWebhookSignature };
|
|
2638
|
+
export { type Activity, type AddNoteInput, type ApiResponse, type AutoConfirmContext, type AutoConfirmOptions, BaseClient, type BatchSendInput, type BatchSendResult, type BatchSendSummary, type Booking, type BookingActionResult, type BookingAvailabilityOptions, type BookingCancelledBy, type BookingClaimableCreatedVia, type BookingContactInput, type BookingCreateResult, type BookingCreatedVia, type BookingPaymentStatus, type BookingRescheduleResult, type BookingResource, type BookingResourceType, type BookingScheduleDay, type BookingScheduleOptions, type BookingService, type BookingSlot, type BookingStatus, type BookingTimestampInput, Bookings, type BookingsPage, type BookingsPagination, CAPABILITY_IDS, CAPABILITY_ROUTES, type CancelBookingInput, type CapabilityConfirmation, CapabilityConfirmations, CapabilityConfirmer, type CapabilityId, type CapabilityPathParamValue, type CapabilityRoute, type CapabilityWriteBodies, type CapabilityWriteRequest, type Channel, type ChannelConnectedEvent, type ChannelConnection, type ChannelConnectionDisconnectResult, type ChannelConnectionState, type ChannelDisconnectReason, type ChannelDisconnectedEvent, Channels, type ConnectLink, type ConnectLinkCreateResult, type ConnectLinkRevokeResult, type ConnectLinkStatus, type ConsentRecord, type ConsentResult, type ConsentType, type Contact, type ContactConsents, type ContactCreateResult, type ContactNoteResult, type ContactRemoveResult, type ContactStatus, type ContactUpdateResult, Contacts, type Conversation, type ConversationAssignedEvent, type ConversationCreatedEvent, type ConversationMessage, type ConversationStatus, type ConversationStatusChangedEvent, type ConversationUpdateResult, type CookieCategoryConsent, type CookieConsentInput, type CreateBookingInput, type CreateBookingItemInput, type CreateConnectLinkInput, type CreateContactInput, type CreateDealInput, type CreatePostInput, type CreateReplyInput, type CreateWebhookInput, type CreatedBooking, DEFAULT_WEBHOOK_TOLERANCE_MS, type Deal, type DealCreateResult, type DealRemoveResult, type DealStatus, type DealUpdateResult, Deals, type EmailSend, type EmailSendResult, type EmailStatus, type EmailTemplate, type EmailTemplateDetail, Emails, Gdpr, type GdprExport, type GetTemplateOptions, Helpdesk, type HelpdeskMessageType, type ImportContactInput, type ImportContactsResult, type IssueCapabilityConfirmationInput, type ListBookingServicesOptions, type ListBookingsOptions, type ListConnectLinksOptions, type ListContactsOptions, type ListConversationsOptions, type ListDealsOptions, type ListDeliveriesOptions, type ListPostsOptions, type ManageSummary, Medal, MedalApiError, type MedalOptions, type MessageAuthorType, type MessageDeliveryStatus, type MessageDeliveryUpdatedEvent, type MessageReceivedEvent, type MessageSentEvent, type PaginatedResponse, type PaginationOptions, Portal, type PortalBooking, type PortalBookingStatus, type PortalBookings, type PortalConsentRecord, type PortalContactSummary, type PortalExport, type PortalFamilyMember, type PortalLoginStartInput, type PortalLoginStartResult, type PortalProfile, type PortalProfilePatch, type PortalSession, type PortalVerifyInput, type Post, type PostDetail, type PostType, type PostVariant, Posts, type PublishResult, type RecordConsentInput, type ReplyCreateResult, type RequestOptions, type RescheduleBookingInput, Scan, type ScanCompany, type ScanCreateInput, type ScanCreateResult, type ScanJob, type ScanResultPayload, type ScanStatus, type ScanSubScores, type SchedulePostInput, type ScheduleResult, type SendEmailInput, type TestPingEvent, type UpdateBookingInput, type UpdateContactInput, type UpdateConversationInput, type UpdateDealInput, type UpdatePostInput, type UpdateWebhookInput, type VerifyWebhookSignatureInput, type WaitForScanOptions, type WebhookChannelLifecycleData, type WebhookConversationSnapshot, type WebhookDeleteResult, type WebhookDelivery, type WebhookEndpoint, type WebhookEvent, type WebhookMessageSnapshot, type WebhookTestResult, WebhookVerificationError, type WebhookVerificationErrorCode, Webhooks, type Workspace, Workspaces, createMedalClient, Medal as default, verifyWebhookSignature };
|