@ordinatio/scheduling-api 0.6.0 → 0.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/CHANGELOG.md +15 -0
- package/README.md +97 -1
- package/dist/agent/index.d.mts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +79 -0
- package/dist/agent/index.mjs +79 -0
- package/dist/{chunk-WZ5KO7IW.mjs → chunk-X5BVCLX6.mjs} +18 -1
- package/dist/index.d.mts +230 -5
- package/dist/index.d.ts +230 -5
- package/dist/index.js +1240 -345
- package/dist/index.mjs +924 -61
- package/dist/{routes-CM-ezlv2.d.mts → routes-mii9tsbA.d.mts} +78 -2
- package/dist/{routes-CM-ezlv2.d.ts → routes-mii9tsbA.d.ts} +78 -2
- package/dist/schemas/index.d.mts +12 -1
- package/dist/schemas/index.d.ts +12 -1
- package/dist/schemas/index.js +19 -0
- package/dist/schemas/index.mjs +5 -1
- package/package.json +3 -3
|
@@ -1,4 +1,46 @@
|
|
|
1
|
-
import { SchedulingDb, CalendarSyncAdapter, WebhookTransport, PaymentAdapter } from '@ordinatio/scheduling';
|
|
1
|
+
import { SchedulingDb, CalendarSyncAdapter, WebhookTransport, TextProvider, PaymentAdapter } from '@ordinatio/scheduling';
|
|
2
|
+
|
|
3
|
+
/** One record a business must add at its domain host. `name` is relative to the domain, with "@" for the domain itself. */
|
|
4
|
+
interface SendingDomainRecord {
|
|
5
|
+
purpose: 'spf' | 'dkim' | 'dmarc' | 'other';
|
|
6
|
+
type: 'TXT' | 'CNAME';
|
|
7
|
+
name: string;
|
|
8
|
+
/** What the published record must say. */
|
|
9
|
+
value: string;
|
|
10
|
+
/** "contains" suits SPF, where the record may list other senders too: every term of `value` must appear as a whole term. Default: "exact". */
|
|
11
|
+
match?: 'exact' | 'contains';
|
|
12
|
+
/** A record that is not required never blocks verification. Default: true. */
|
|
13
|
+
required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** The records for one domain. A provider that issues a different token per domain needs the function form. */
|
|
16
|
+
type SendingDomainRecords = SendingDomainRecord[] | ((domain: string) => SendingDomainRecord[]);
|
|
17
|
+
/** The two lookups used, shaped like node:dns/promises `resolveTxt` and `resolveCname`. */
|
|
18
|
+
interface DnsResolver {
|
|
19
|
+
resolveTxt(name: string): Promise<string[][]>;
|
|
20
|
+
resolveCname(name: string): Promise<string[]>;
|
|
21
|
+
}
|
|
22
|
+
type RecordStatus = 'found' | 'missing' | 'wrong' | 'unknown';
|
|
23
|
+
interface RecordCheck {
|
|
24
|
+
record: SendingDomainRecord;
|
|
25
|
+
/** The full name to publish at, such as "s1._domainkey.mail.acme.example". */
|
|
26
|
+
host: string;
|
|
27
|
+
status: RecordStatus;
|
|
28
|
+
/** A sentence a business owner can act on. */
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
interface SendingDomainCheck {
|
|
32
|
+
domain: string;
|
|
33
|
+
/** True when every required record is found. */
|
|
34
|
+
verified: boolean;
|
|
35
|
+
records: RecordCheck[];
|
|
36
|
+
}
|
|
37
|
+
/** Returns the domain in lower case, or null when it is not a plain domain name. */
|
|
38
|
+
declare function normalizeSendingDomain(raw: string): string | null;
|
|
39
|
+
/** Looks up every record. Never throws: a lookup that fails is reported as "unknown" and leaves the domain unverified. */
|
|
40
|
+
declare function checkSendingDomain(config: {
|
|
41
|
+
records: SendingDomainRecords;
|
|
42
|
+
resolver: DnsResolver;
|
|
43
|
+
}, rawDomain: string): Promise<SendingDomainCheck>;
|
|
2
44
|
|
|
3
45
|
/** Named limits. A host that counts requests maps each name to its own numbers. */
|
|
4
46
|
type RateLimitTier = 'PUBLIC_BOOKING' | 'AVAILABILITY' | 'GENERAL' | 'CREATE' | 'UPDATE' | 'DELETE' | 'PAYMENT_INTENT' | 'RESOLVE_REFUND' | 'INTERNAL' | 'SETTINGS';
|
|
@@ -257,6 +299,30 @@ interface BrandSettings {
|
|
|
257
299
|
* A rejection counts as "no".
|
|
258
300
|
*/
|
|
259
301
|
isSendingDomainVerified?(domain: string, organizationId: string): boolean | Promise<boolean>;
|
|
302
|
+
/**
|
|
303
|
+
* Checks a sending domain record by record, so a setup screen can say exactly what is missing. With
|
|
304
|
+
* `createSendingDomainVerifier` pass its `check`. Without it the sending-domain check route answers 501.
|
|
305
|
+
*/
|
|
306
|
+
checkSendingDomain?(domain: string, organizationId: string): Promise<SendingDomainCheck>;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Switches per-organization text-message settings on: each organization picks a provider and a sending number. A host that
|
|
310
|
+
* supplies none has it off: the routes answer 501. The host keeps the provider accounts; nothing secret is stored per organization.
|
|
311
|
+
*/
|
|
312
|
+
interface TextMessageSettings {
|
|
313
|
+
/** The providers this server has accounts for. Default: Telnyx and Twilio. */
|
|
314
|
+
providers?: readonly TextProvider[];
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Switches API keys on: a request with `Authorization: Bearer <key>` acts as that key's organization. A host that supplies
|
|
318
|
+
* none has them off, and the routes answer 501.
|
|
319
|
+
*/
|
|
320
|
+
interface ApiKeySettings {
|
|
321
|
+
/**
|
|
322
|
+
* The database that holds the API key table, asked before the request's organization is known. It must be the same
|
|
323
|
+
* database the signed-in staff's `db` points at, because the key routes make keys through that one.
|
|
324
|
+
*/
|
|
325
|
+
db(): Promise<SchedulingDb>;
|
|
260
326
|
}
|
|
261
327
|
/** Switches data export and erasure on. A host that supplies none has them off: the routes answer 501. */
|
|
262
328
|
type PrivacySettings = Record<string, never>;
|
|
@@ -316,6 +382,14 @@ interface SchedulingHost {
|
|
|
316
382
|
* also asks for it (see `processPendingNotifications`' `brand` option). Default: off, so the routes answer 501.
|
|
317
383
|
*/
|
|
318
384
|
brand?: BrandSettings | null;
|
|
385
|
+
/**
|
|
386
|
+
* Turns on per-organization text-message settings. Needs the text-settings table. Default: off, so the routes answer 501.
|
|
387
|
+
*/
|
|
388
|
+
textMessages?: TextMessageSettings | null;
|
|
389
|
+
/**
|
|
390
|
+
* Turns on API keys for outside tools. Needs the API key table. Default: off, so a Bearer key is ignored and the key routes answer 501.
|
|
391
|
+
*/
|
|
392
|
+
apiKeys?: ApiKeySettings | null;
|
|
319
393
|
/** The domain used after the "@" in calendar-file event ids. Keep it unchanged once calendars have subscribed. Default: ordinatio-scheduling. */
|
|
320
394
|
icalUidDomain?(): string | null | undefined;
|
|
321
395
|
/** Records what happened in the activity feed. Default: nothing is recorded. */
|
|
@@ -380,7 +454,9 @@ interface Route {
|
|
|
380
454
|
path: string;
|
|
381
455
|
/** A public route is called from other websites, so it also answers a CORS preflight. */
|
|
382
456
|
public: boolean;
|
|
457
|
+
/** Needs a person at a browser (a consent screen, a cookie): a request made with an API key is refused with 403, whatever the key's access. */
|
|
458
|
+
personOnly?: boolean;
|
|
383
459
|
handler: RouteHandler;
|
|
384
460
|
}
|
|
385
461
|
|
|
386
|
-
export type
|
|
462
|
+
export { type AvailabilityCache as A, type BalancePaymentControl as B, type CacheOptions as C, type DnsResolver as D, type RouteContext as E, type RouteHandler as F, type RoutingFormSettings as G, type HttpMethod as H, type InternalAccess as I, type StaffDirectory as J, type WebhookSettings as K, type WorkerCommands as L, checkSendingDomain as M, type NoShowPolicy as N, normalizeSendingDomain as O, type PublicBookingResolver as P, type Route as R, type SchedulingHost as S, type WaitlistSettings as W, type RateLimitTier as a, type SchedulingCache as b, type PublicOrganizationResolver as c, type SendingDomainCheck as d, type SendingDomainRecord as e, type SendingDomainRecords as f, type StaffResolver as g, type StaffContext as h, type ActivityEntry as i, type ActivityLog as j, type ApiKeySettings as k, type AppointmentEventSink as l, type BookingClientResolver as m, type BookingPolicy as n, type BrandSettings as o, type CalendarConnectOutcome as p, type CalendarConnector as q, type CalendarConnectors as r, type CalendarVisibility as s, type PrivacySettings as t, type PublicBookingContext as u, type PublicBookingKind as v, type PublicOrganization as w, type RecordCheck as x, type RecordStatus as y, type ResolvedHost as z };
|
|
@@ -1,4 +1,46 @@
|
|
|
1
|
-
import { SchedulingDb, CalendarSyncAdapter, WebhookTransport, PaymentAdapter } from '@ordinatio/scheduling';
|
|
1
|
+
import { SchedulingDb, CalendarSyncAdapter, WebhookTransport, TextProvider, PaymentAdapter } from '@ordinatio/scheduling';
|
|
2
|
+
|
|
3
|
+
/** One record a business must add at its domain host. `name` is relative to the domain, with "@" for the domain itself. */
|
|
4
|
+
interface SendingDomainRecord {
|
|
5
|
+
purpose: 'spf' | 'dkim' | 'dmarc' | 'other';
|
|
6
|
+
type: 'TXT' | 'CNAME';
|
|
7
|
+
name: string;
|
|
8
|
+
/** What the published record must say. */
|
|
9
|
+
value: string;
|
|
10
|
+
/** "contains" suits SPF, where the record may list other senders too: every term of `value` must appear as a whole term. Default: "exact". */
|
|
11
|
+
match?: 'exact' | 'contains';
|
|
12
|
+
/** A record that is not required never blocks verification. Default: true. */
|
|
13
|
+
required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** The records for one domain. A provider that issues a different token per domain needs the function form. */
|
|
16
|
+
type SendingDomainRecords = SendingDomainRecord[] | ((domain: string) => SendingDomainRecord[]);
|
|
17
|
+
/** The two lookups used, shaped like node:dns/promises `resolveTxt` and `resolveCname`. */
|
|
18
|
+
interface DnsResolver {
|
|
19
|
+
resolveTxt(name: string): Promise<string[][]>;
|
|
20
|
+
resolveCname(name: string): Promise<string[]>;
|
|
21
|
+
}
|
|
22
|
+
type RecordStatus = 'found' | 'missing' | 'wrong' | 'unknown';
|
|
23
|
+
interface RecordCheck {
|
|
24
|
+
record: SendingDomainRecord;
|
|
25
|
+
/** The full name to publish at, such as "s1._domainkey.mail.acme.example". */
|
|
26
|
+
host: string;
|
|
27
|
+
status: RecordStatus;
|
|
28
|
+
/** A sentence a business owner can act on. */
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
interface SendingDomainCheck {
|
|
32
|
+
domain: string;
|
|
33
|
+
/** True when every required record is found. */
|
|
34
|
+
verified: boolean;
|
|
35
|
+
records: RecordCheck[];
|
|
36
|
+
}
|
|
37
|
+
/** Returns the domain in lower case, or null when it is not a plain domain name. */
|
|
38
|
+
declare function normalizeSendingDomain(raw: string): string | null;
|
|
39
|
+
/** Looks up every record. Never throws: a lookup that fails is reported as "unknown" and leaves the domain unverified. */
|
|
40
|
+
declare function checkSendingDomain(config: {
|
|
41
|
+
records: SendingDomainRecords;
|
|
42
|
+
resolver: DnsResolver;
|
|
43
|
+
}, rawDomain: string): Promise<SendingDomainCheck>;
|
|
2
44
|
|
|
3
45
|
/** Named limits. A host that counts requests maps each name to its own numbers. */
|
|
4
46
|
type RateLimitTier = 'PUBLIC_BOOKING' | 'AVAILABILITY' | 'GENERAL' | 'CREATE' | 'UPDATE' | 'DELETE' | 'PAYMENT_INTENT' | 'RESOLVE_REFUND' | 'INTERNAL' | 'SETTINGS';
|
|
@@ -257,6 +299,30 @@ interface BrandSettings {
|
|
|
257
299
|
* A rejection counts as "no".
|
|
258
300
|
*/
|
|
259
301
|
isSendingDomainVerified?(domain: string, organizationId: string): boolean | Promise<boolean>;
|
|
302
|
+
/**
|
|
303
|
+
* Checks a sending domain record by record, so a setup screen can say exactly what is missing. With
|
|
304
|
+
* `createSendingDomainVerifier` pass its `check`. Without it the sending-domain check route answers 501.
|
|
305
|
+
*/
|
|
306
|
+
checkSendingDomain?(domain: string, organizationId: string): Promise<SendingDomainCheck>;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Switches per-organization text-message settings on: each organization picks a provider and a sending number. A host that
|
|
310
|
+
* supplies none has it off: the routes answer 501. The host keeps the provider accounts; nothing secret is stored per organization.
|
|
311
|
+
*/
|
|
312
|
+
interface TextMessageSettings {
|
|
313
|
+
/** The providers this server has accounts for. Default: Telnyx and Twilio. */
|
|
314
|
+
providers?: readonly TextProvider[];
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Switches API keys on: a request with `Authorization: Bearer <key>` acts as that key's organization. A host that supplies
|
|
318
|
+
* none has them off, and the routes answer 501.
|
|
319
|
+
*/
|
|
320
|
+
interface ApiKeySettings {
|
|
321
|
+
/**
|
|
322
|
+
* The database that holds the API key table, asked before the request's organization is known. It must be the same
|
|
323
|
+
* database the signed-in staff's `db` points at, because the key routes make keys through that one.
|
|
324
|
+
*/
|
|
325
|
+
db(): Promise<SchedulingDb>;
|
|
260
326
|
}
|
|
261
327
|
/** Switches data export and erasure on. A host that supplies none has them off: the routes answer 501. */
|
|
262
328
|
type PrivacySettings = Record<string, never>;
|
|
@@ -316,6 +382,14 @@ interface SchedulingHost {
|
|
|
316
382
|
* also asks for it (see `processPendingNotifications`' `brand` option). Default: off, so the routes answer 501.
|
|
317
383
|
*/
|
|
318
384
|
brand?: BrandSettings | null;
|
|
385
|
+
/**
|
|
386
|
+
* Turns on per-organization text-message settings. Needs the text-settings table. Default: off, so the routes answer 501.
|
|
387
|
+
*/
|
|
388
|
+
textMessages?: TextMessageSettings | null;
|
|
389
|
+
/**
|
|
390
|
+
* Turns on API keys for outside tools. Needs the API key table. Default: off, so a Bearer key is ignored and the key routes answer 501.
|
|
391
|
+
*/
|
|
392
|
+
apiKeys?: ApiKeySettings | null;
|
|
319
393
|
/** The domain used after the "@" in calendar-file event ids. Keep it unchanged once calendars have subscribed. Default: ordinatio-scheduling. */
|
|
320
394
|
icalUidDomain?(): string | null | undefined;
|
|
321
395
|
/** Records what happened in the activity feed. Default: nothing is recorded. */
|
|
@@ -380,7 +454,9 @@ interface Route {
|
|
|
380
454
|
path: string;
|
|
381
455
|
/** A public route is called from other websites, so it also answers a CORS preflight. */
|
|
382
456
|
public: boolean;
|
|
457
|
+
/** Needs a person at a browser (a consent screen, a cookie): a request made with an API key is refused with 403, whatever the key's access. */
|
|
458
|
+
personOnly?: boolean;
|
|
383
459
|
handler: RouteHandler;
|
|
384
460
|
}
|
|
385
461
|
|
|
386
|
-
export type
|
|
462
|
+
export { type AvailabilityCache as A, type BalancePaymentControl as B, type CacheOptions as C, type DnsResolver as D, type RouteContext as E, type RouteHandler as F, type RoutingFormSettings as G, type HttpMethod as H, type InternalAccess as I, type StaffDirectory as J, type WebhookSettings as K, type WorkerCommands as L, checkSendingDomain as M, type NoShowPolicy as N, normalizeSendingDomain as O, type PublicBookingResolver as P, type Route as R, type SchedulingHost as S, type WaitlistSettings as W, type RateLimitTier as a, type SchedulingCache as b, type PublicOrganizationResolver as c, type SendingDomainCheck as d, type SendingDomainRecord as e, type SendingDomainRecords as f, type StaffResolver as g, type StaffContext as h, type ActivityEntry as i, type ActivityLog as j, type ApiKeySettings as k, type AppointmentEventSink as l, type BookingClientResolver as m, type BookingPolicy as n, type BrandSettings as o, type CalendarConnectOutcome as p, type CalendarConnector as q, type CalendarConnectors as r, type CalendarVisibility as s, type PrivacySettings as t, type PublicBookingContext as u, type PublicBookingKind as v, type PublicOrganization as w, type RecordCheck as x, type RecordStatus as y, type ResolvedHost as z };
|
package/dist/schemas/index.d.mts
CHANGED
|
@@ -515,4 +515,15 @@ declare const BrandSchema: z.ZodObject<{
|
|
|
515
515
|
fromEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
516
516
|
}, z.core.$strict>;
|
|
517
517
|
|
|
518
|
-
|
|
518
|
+
declare const TextSettingsSchema: z.ZodObject<{
|
|
519
|
+
provider: z.ZodString;
|
|
520
|
+
fromNumber: z.ZodString;
|
|
521
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
522
|
+
}, z.core.$strict>;
|
|
523
|
+
|
|
524
|
+
declare const ApiKeySchema: z.ZodObject<{
|
|
525
|
+
name: z.ZodString;
|
|
526
|
+
access: z.ZodString;
|
|
527
|
+
}, z.core.$strict>;
|
|
528
|
+
|
|
529
|
+
export { ApiKeySchema, type BookingPageConfig, BookingPageConfigSchema, type BookingPageTheme, BookingPageThemeSchema, BrandSchema, CancelRecurringScopeSchema, type CancelRecurringSeriesInput, CancelRecurringSeriesSchema, type CreateAppointmentCategoryInput, CreateAppointmentCategorySchema, type CreateAppointmentTypeInput, CreateAppointmentTypeSchema, type CreateAvailabilityRuleInput, CreateAvailabilityRuleSchema, type CreateCalendarInput, CreateCalendarSchema, type CreateCouponCodeInput, CreateCouponCodeSchema, type CreateNotificationTemplateInput, CreateNotificationTemplateSchema, type CreatePackagePurchaseInput, CreatePackagePurchaseSchema, type CreateRecurringSeriesInput, CreateRecurringSeriesSchema, type CreateRoutingFormInput, CreateRoutingFormSchema, type CreateServicePackageInput, CreateServicePackageSchema, type CreateWebhookEndpointInput, CreateWebhookEndpointSchema, DEFAULT_CANCELLATION_POLICY, IntakeFormFieldSchema, type NoShowPrevention, type NoShowPreventionAction, NoShowPreventionActionSchema, NotificationChannelSchema, NotificationTriggerSchema, type OrgCancellationPolicy, OrgCancellationPolicySchema, PrivacyEraseSchema, PrivacySubjectSchema, RecurringFrequencySchema, RouteClientSchema, SLOT_GRANULARITY_DEFAULT, SLOT_GRANULARITY_OPTIONS, type SlotGranularityMinutes, TestRoutingFormSchema, TextSettingsSchema, type UpdateAppointmentCategoryInput, UpdateAppointmentCategorySchema, type UpdateAppointmentTypeInput, UpdateAppointmentTypeSchema, type UpdateBookingPageInput, UpdateBookingPageSchema, type UpdateCalendarInput, UpdateCalendarSchema, type UpdateCouponCodeInput, UpdateCouponCodeSchema, type UpdateNotificationTemplateInput, UpdateNotificationTemplateSchema, type UpdatePackagePurchaseInput, UpdatePackagePurchaseSchema, type UpdateRoutingFormInput, UpdateRoutingFormSchema, type UpdateServicePackageInput, UpdateServicePackageSchema };
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -515,4 +515,15 @@ declare const BrandSchema: z.ZodObject<{
|
|
|
515
515
|
fromEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
516
516
|
}, z.core.$strict>;
|
|
517
517
|
|
|
518
|
-
|
|
518
|
+
declare const TextSettingsSchema: z.ZodObject<{
|
|
519
|
+
provider: z.ZodString;
|
|
520
|
+
fromNumber: z.ZodString;
|
|
521
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
522
|
+
}, z.core.$strict>;
|
|
523
|
+
|
|
524
|
+
declare const ApiKeySchema: z.ZodObject<{
|
|
525
|
+
name: z.ZodString;
|
|
526
|
+
access: z.ZodString;
|
|
527
|
+
}, z.core.$strict>;
|
|
528
|
+
|
|
529
|
+
export { ApiKeySchema, type BookingPageConfig, BookingPageConfigSchema, type BookingPageTheme, BookingPageThemeSchema, BrandSchema, CancelRecurringScopeSchema, type CancelRecurringSeriesInput, CancelRecurringSeriesSchema, type CreateAppointmentCategoryInput, CreateAppointmentCategorySchema, type CreateAppointmentTypeInput, CreateAppointmentTypeSchema, type CreateAvailabilityRuleInput, CreateAvailabilityRuleSchema, type CreateCalendarInput, CreateCalendarSchema, type CreateCouponCodeInput, CreateCouponCodeSchema, type CreateNotificationTemplateInput, CreateNotificationTemplateSchema, type CreatePackagePurchaseInput, CreatePackagePurchaseSchema, type CreateRecurringSeriesInput, CreateRecurringSeriesSchema, type CreateRoutingFormInput, CreateRoutingFormSchema, type CreateServicePackageInput, CreateServicePackageSchema, type CreateWebhookEndpointInput, CreateWebhookEndpointSchema, DEFAULT_CANCELLATION_POLICY, IntakeFormFieldSchema, type NoShowPrevention, type NoShowPreventionAction, NoShowPreventionActionSchema, NotificationChannelSchema, NotificationTriggerSchema, type OrgCancellationPolicy, OrgCancellationPolicySchema, PrivacyEraseSchema, PrivacySubjectSchema, RecurringFrequencySchema, RouteClientSchema, SLOT_GRANULARITY_DEFAULT, SLOT_GRANULARITY_OPTIONS, type SlotGranularityMinutes, TestRoutingFormSchema, TextSettingsSchema, type UpdateAppointmentCategoryInput, UpdateAppointmentCategorySchema, type UpdateAppointmentTypeInput, UpdateAppointmentTypeSchema, type UpdateBookingPageInput, UpdateBookingPageSchema, type UpdateCalendarInput, UpdateCalendarSchema, type UpdateCouponCodeInput, UpdateCouponCodeSchema, type UpdateNotificationTemplateInput, UpdateNotificationTemplateSchema, type UpdatePackagePurchaseInput, UpdatePackagePurchaseSchema, type UpdateRoutingFormInput, UpdateRoutingFormSchema, type UpdateServicePackageInput, UpdateServicePackageSchema };
|
package/dist/schemas/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/schemas/index.ts
|
|
21
21
|
var schemas_exports = {};
|
|
22
22
|
__export(schemas_exports, {
|
|
23
|
+
ApiKeySchema: () => ApiKeySchema,
|
|
23
24
|
BookingPageConfigSchema: () => BookingPageConfigSchema,
|
|
24
25
|
BookingPageThemeSchema: () => BookingPageThemeSchema,
|
|
25
26
|
BrandSchema: () => BrandSchema,
|
|
@@ -49,6 +50,7 @@ __export(schemas_exports, {
|
|
|
49
50
|
SLOT_GRANULARITY_DEFAULT: () => SLOT_GRANULARITY_DEFAULT,
|
|
50
51
|
SLOT_GRANULARITY_OPTIONS: () => SLOT_GRANULARITY_OPTIONS,
|
|
51
52
|
TestRoutingFormSchema: () => TestRoutingFormSchema,
|
|
53
|
+
TextSettingsSchema: () => TextSettingsSchema,
|
|
52
54
|
UpdateAppointmentCategorySchema: () => UpdateAppointmentCategorySchema,
|
|
53
55
|
UpdateAppointmentTypeSchema: () => UpdateAppointmentTypeSchema,
|
|
54
56
|
UpdateBookingPageSchema: () => UpdateBookingPageSchema,
|
|
@@ -491,8 +493,24 @@ var BrandSchema = import_zod8.z.object({
|
|
|
491
493
|
fromName: optionalText(200),
|
|
492
494
|
fromEmail: optionalText(400)
|
|
493
495
|
}).strict();
|
|
496
|
+
|
|
497
|
+
// src/schemas/text-settings.schema.ts
|
|
498
|
+
var import_zod9 = require("zod");
|
|
499
|
+
var TextSettingsSchema = import_zod9.z.object({
|
|
500
|
+
provider: import_zod9.z.string().max(40),
|
|
501
|
+
fromNumber: import_zod9.z.string().max(40),
|
|
502
|
+
enabled: import_zod9.z.boolean().optional()
|
|
503
|
+
}).strict();
|
|
504
|
+
|
|
505
|
+
// src/schemas/api-key.schema.ts
|
|
506
|
+
var import_zod10 = require("zod");
|
|
507
|
+
var ApiKeySchema = import_zod10.z.object({
|
|
508
|
+
name: import_zod10.z.string().max(200),
|
|
509
|
+
access: import_zod10.z.string().max(20)
|
|
510
|
+
}).strict();
|
|
494
511
|
// Annotate the CommonJS export names for ESM import in node:
|
|
495
512
|
0 && (module.exports = {
|
|
513
|
+
ApiKeySchema,
|
|
496
514
|
BookingPageConfigSchema,
|
|
497
515
|
BookingPageThemeSchema,
|
|
498
516
|
BrandSchema,
|
|
@@ -522,6 +540,7 @@ var BrandSchema = import_zod8.z.object({
|
|
|
522
540
|
SLOT_GRANULARITY_DEFAULT,
|
|
523
541
|
SLOT_GRANULARITY_OPTIONS,
|
|
524
542
|
TestRoutingFormSchema,
|
|
543
|
+
TextSettingsSchema,
|
|
525
544
|
UpdateAppointmentCategorySchema,
|
|
526
545
|
UpdateAppointmentTypeSchema,
|
|
527
546
|
UpdateBookingPageSchema,
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ApiKeySchema,
|
|
2
3
|
BookingPageConfigSchema,
|
|
3
4
|
BookingPageThemeSchema,
|
|
4
5
|
BrandSchema,
|
|
@@ -28,6 +29,7 @@ import {
|
|
|
28
29
|
SLOT_GRANULARITY_DEFAULT,
|
|
29
30
|
SLOT_GRANULARITY_OPTIONS,
|
|
30
31
|
TestRoutingFormSchema,
|
|
32
|
+
TextSettingsSchema,
|
|
31
33
|
UpdateAppointmentCategorySchema,
|
|
32
34
|
UpdateAppointmentTypeSchema,
|
|
33
35
|
UpdateBookingPageSchema,
|
|
@@ -37,8 +39,9 @@ import {
|
|
|
37
39
|
UpdatePackagePurchaseSchema,
|
|
38
40
|
UpdateRoutingFormSchema,
|
|
39
41
|
UpdateServicePackageSchema
|
|
40
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-X5BVCLX6.mjs";
|
|
41
43
|
export {
|
|
44
|
+
ApiKeySchema,
|
|
42
45
|
BookingPageConfigSchema,
|
|
43
46
|
BookingPageThemeSchema,
|
|
44
47
|
BrandSchema,
|
|
@@ -68,6 +71,7 @@ export {
|
|
|
68
71
|
SLOT_GRANULARITY_DEFAULT,
|
|
69
72
|
SLOT_GRANULARITY_OPTIONS,
|
|
70
73
|
TestRoutingFormSchema,
|
|
74
|
+
TextSettingsSchema,
|
|
71
75
|
UpdateAppointmentCategorySchema,
|
|
72
76
|
UpdateAppointmentTypeSchema,
|
|
73
77
|
UpdateBookingPageSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordinatio/scheduling-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "HTTP API for @ordinatio/scheduling. Every handler takes a Request and returns a Response.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"sanitize-html": "^2.16.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@ordinatio/scheduling": "^0.
|
|
14
|
+
"@ordinatio/scheduling": "^0.7.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/sanitize-html": "^2.13.0",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"tsup": "^8.0.0",
|
|
20
20
|
"typescript": "5",
|
|
21
21
|
"vitest": "4.0.18",
|
|
22
|
-
"@ordinatio/scheduling": "0.
|
|
22
|
+
"@ordinatio/scheduling": "0.7.0"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=22.0.0"
|