processfocus 0.1.0-next.2 → 0.1.0-next.3
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/dist/{auth-FmXptohB.mjs → auth-DWWupwJA.mjs} +57 -24
- package/dist/auth-config/src/lib/authentication-config.d.ts +13 -8
- package/dist/auth-config/src/lib/aws-role-binding.d.ts +21 -0
- package/dist/auth-config/src/lib/provider-types.d.ts +87 -76
- package/dist/auth-config/src/lib/workload-trust.d.ts +41 -0
- package/dist/auth.mjs +1 -2
- package/dist/business-calendar/src/lib/calendar-config.d.ts +73 -76
- package/dist/business-calendar/src/lib/calendar-period.d.ts +30 -30
- package/dist/business-calendar/src/lib/calendar-service.d.ts +10 -10
- package/dist/business-calendar/src/lib/datetime-utils.d.ts +1 -1
- package/dist/business-calendar/src/lib/holidays.d.ts +40 -40
- package/dist/business-calendar/src/lib/types.d.ts +29 -29
- package/dist/calendar.mjs +73 -63
- package/dist/form-schema/src/index.d.ts +4 -1
- package/dist/form-schema/src/lib/annotation-helpers.d.ts +2 -2
- package/dist/form-schema/src/lib/email.d.ts +2 -2
- package/dist/form-schema/src/lib/field-count.d.ts +2 -2
- package/dist/form-schema/src/lib/form-annotations.d.ts +6 -0
- package/dist/form-schema/src/lib/form-presentation.d.ts +30 -0
- package/dist/form-schema/src/lib/form-schema.d.ts +64 -34
- package/dist/form-schema/src/lib/number-from-string.d.ts +3 -0
- package/dist/form-schema/src/lib/phone.d.ts +2 -2
- package/dist/form-schema/src/lib/public-completion-correction.d.ts +5 -0
- package/dist/form-schema/src/lib/search-lookup-items.d.ts +3 -0
- package/dist/form-submission-schema/src/index.d.ts +3 -0
- package/dist/form-submission-schema/src/lib/executable-rules.d.ts +43 -0
- package/dist/form-submission-schema/src/lib/form-submission-schema.d.ts +33 -10
- package/dist/form-submission-schema/src/lib/json-schema.d.ts +3 -0
- package/dist/form-submission-schema/src/lib/submission-utils.d.ts +19 -0
- package/dist/forms.mjs +26 -2
- package/dist/frontend-manifest/src/lib/browser-plugin-artifact.d.ts +9 -0
- package/dist/frontend-manifest/src/lib/frontend-manifest.d.ts +8 -6
- package/dist/frontend-plugin-host/src/lib/frontend-plugin-host.d.ts +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +466 -972
- package/dist/manifest.mjs +1 -2
- package/dist/plugin.mjs +1 -2
- package/dist/process/src/lib/form-authoring.d.ts +1 -1
- package/dist/process/src/lib/form-decoration.d.ts +3 -3
- package/dist/process/src/lib/form.d.ts +61 -97
- package/dist/process/src/lib/list.d.ts +36 -23
- package/dist/process/src/lib/lookup-accessor.d.ts +4 -1
- package/dist/process/src/lib/organisation.d.ts +14 -0
- package/dist/process/src/lib/process.d.ts +24 -2
- package/dist/process/src/lib/schedule.d.ts +1 -1
- package/dist/process/src/lib/step.d.ts +13 -3
- package/dist/process/src/lib/system-step-executor.d.ts +4 -4
- package/dist/process/src/lib/system-step.d.ts +11 -1
- package/dist/sdk/src/index.d.ts +1 -1
- package/dist/sdk/src/testing.d.ts +0 -1
- package/dist/{src-C-909PVQ.mjs → src-BQ55-khF.mjs} +118 -66
- package/dist/testing.d.ts +0 -1
- package/dist/testing.mjs +2 -4
- package/package.json +4 -4
- package/dist/form-client-representation/src/index.d.ts +0 -6
- package/dist/form-client-representation/src/lib/as-client-representation.d.ts +0 -31
- package/dist/form-client-representation/src/lib/client-form-definition.d.ts +0 -17
- package/dist/form-client-representation/src/lib/extract-annotations.d.ts +0 -20
- package/dist/form-client-representation/src/lib/plugin-registry.d.ts +0 -6
- package/dist/form-client-representation/src/lib/types.d.ts +0 -239
- package/dist/form-client-representation/src/lib/walker.d.ts +0 -68
- package/dist/form-rule/src/index.d.ts +0 -3
- package/dist/form-rule/src/lib/evaluator.d.ts +0 -2
- package/dist/form-rule/src/lib/paths.d.ts +0 -9
- package/dist/form-rule/src/lib/types.d.ts +0 -89
- package/dist/form-schema/src/lib/property-signature.d.ts +0 -3
- package/dist/paths-BkzLn-rG.mjs +0 -282
|
@@ -9,60 +9,57 @@ import { DaySchedule } from "./types.js";
|
|
|
9
9
|
* @property note - Optional human-readable note (e.g., "Early closing for staff party")
|
|
10
10
|
*/
|
|
11
11
|
export declare const DateException: Schema.Struct<{
|
|
12
|
-
date:
|
|
13
|
-
slots: Schema.Union<[Schema
|
|
14
|
-
open: Schema.Struct<{
|
|
15
|
-
hour: Schema.
|
|
16
|
-
minute: Schema.
|
|
12
|
+
readonly date: Schema.DateTimeUtc;
|
|
13
|
+
readonly slots: Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
14
|
+
readonly open: Schema.Struct<{
|
|
15
|
+
readonly hour: Schema.Int;
|
|
16
|
+
readonly minute: Schema.Int;
|
|
17
17
|
}>;
|
|
18
|
-
close: Schema.Struct<{
|
|
19
|
-
hour: Schema.
|
|
20
|
-
minute: Schema.
|
|
18
|
+
readonly close: Schema.Struct<{
|
|
19
|
+
readonly hour: Schema.Int;
|
|
20
|
+
readonly minute: Schema.Int;
|
|
21
21
|
}>;
|
|
22
|
-
}>>, Schema.Literal<
|
|
23
|
-
note: Schema.optional<
|
|
22
|
+
}>>, Schema.Literal<"closed">]>;
|
|
23
|
+
readonly note: Schema.optional<Schema.String>;
|
|
24
24
|
}>;
|
|
25
25
|
export type DateException = typeof DateException.Type;
|
|
26
26
|
/**
|
|
27
27
|
* Schema for encoding DateException to JSON (for database storage).
|
|
28
28
|
*/
|
|
29
29
|
export declare const DateExceptionFromJson: Schema.Struct<{
|
|
30
|
-
date:
|
|
31
|
-
slots: Schema.Union<[Schema
|
|
32
|
-
open: Schema.Struct<{
|
|
33
|
-
hour: Schema.
|
|
34
|
-
minute: Schema.
|
|
30
|
+
readonly date: Schema.DateTimeUtcFromString;
|
|
31
|
+
readonly slots: Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
32
|
+
readonly open: Schema.Struct<{
|
|
33
|
+
readonly hour: Schema.Int;
|
|
34
|
+
readonly minute: Schema.Int;
|
|
35
35
|
}>;
|
|
36
|
-
close: Schema.Struct<{
|
|
37
|
-
hour: Schema.
|
|
38
|
-
minute: Schema.
|
|
36
|
+
readonly close: Schema.Struct<{
|
|
37
|
+
readonly hour: Schema.Int;
|
|
38
|
+
readonly minute: Schema.Int;
|
|
39
39
|
}>;
|
|
40
|
-
}>>, Schema.Literal<
|
|
41
|
-
note: Schema.optional<
|
|
40
|
+
}>>, Schema.Literal<"closed">]>;
|
|
41
|
+
readonly note: Schema.optional<Schema.String>;
|
|
42
42
|
}>;
|
|
43
43
|
export type DateExceptionFromJson = typeof DateExceptionFromJson.Type;
|
|
44
44
|
/**
|
|
45
45
|
* Complete business calendar configuration.
|
|
46
46
|
* Combines weekly schedule, holidays, exceptions, and periods.
|
|
47
|
-
*
|
|
48
|
-
* Note: Timezone is stored at the Organisation/OrgUnit level, not here.
|
|
49
|
-
* The calendar service receives timezone from context.
|
|
50
47
|
*/
|
|
51
48
|
export declare const BusinessCalendarConfig: Schema.Struct<{
|
|
52
49
|
/**
|
|
53
50
|
* Default weekly schedule.
|
|
54
51
|
* Days without entries are considered non-working.
|
|
55
52
|
*/
|
|
56
|
-
weeklySchedule: Schema
|
|
57
|
-
day: Schema.brand<Schema.
|
|
58
|
-
ranges: Schema
|
|
59
|
-
open: Schema.Struct<{
|
|
60
|
-
hour: Schema.
|
|
61
|
-
minute: Schema.
|
|
53
|
+
readonly weeklySchedule: Schema.$Array<Schema.Struct<{
|
|
54
|
+
readonly day: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
55
|
+
readonly ranges: Schema.$Array<Schema.Struct<{
|
|
56
|
+
readonly open: Schema.Struct<{
|
|
57
|
+
readonly hour: Schema.Int;
|
|
58
|
+
readonly minute: Schema.Int;
|
|
62
59
|
}>;
|
|
63
|
-
close: Schema.Struct<{
|
|
64
|
-
hour: Schema.
|
|
65
|
-
minute: Schema.
|
|
60
|
+
readonly close: Schema.Struct<{
|
|
61
|
+
readonly hour: Schema.Int;
|
|
62
|
+
readonly minute: Schema.Int;
|
|
66
63
|
}>;
|
|
67
64
|
}>>;
|
|
68
65
|
}>>;
|
|
@@ -70,67 +67,67 @@ export declare const BusinessCalendarConfig: Schema.Struct<{
|
|
|
70
67
|
* Holiday rules (fixed, nth weekday, Easter-relative, etc.).
|
|
71
68
|
* Holidays are computed for each year as needed.
|
|
72
69
|
*/
|
|
73
|
-
holidays: Schema
|
|
74
|
-
name:
|
|
75
|
-
month: Schema.brand<Schema.
|
|
76
|
-
day: Schema.brand<Schema.
|
|
70
|
+
readonly holidays: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"FixedHoliday", {
|
|
71
|
+
readonly name: Schema.String;
|
|
72
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
73
|
+
readonly day: Schema.brand<Schema.Int, "DayOfMonth">;
|
|
77
74
|
}>, Schema.TaggedStruct<"NthWeekdayHoliday", {
|
|
78
|
-
name:
|
|
79
|
-
month: Schema.brand<Schema.
|
|
80
|
-
weekday: Schema.brand<Schema.
|
|
81
|
-
nth: Schema.brand<Schema.
|
|
75
|
+
readonly name: Schema.String;
|
|
76
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
77
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
78
|
+
readonly nth: Schema.brand<Schema.Int, "NthOccurrence">;
|
|
82
79
|
}>, Schema.TaggedStruct<"LastWeekdayHoliday", {
|
|
83
|
-
name:
|
|
84
|
-
month: Schema.brand<Schema.
|
|
85
|
-
weekday: Schema.brand<Schema.
|
|
80
|
+
readonly name: Schema.String;
|
|
81
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
82
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
86
83
|
}>, Schema.TaggedStruct<"EasterRelativeHoliday", {
|
|
87
|
-
name:
|
|
88
|
-
daysOffset:
|
|
84
|
+
readonly name: Schema.String;
|
|
85
|
+
readonly daysOffset: Schema.Int;
|
|
89
86
|
}>]>>;
|
|
90
87
|
/**
|
|
91
88
|
* One-off date overrides.
|
|
92
89
|
* Take precedence over holidays and periods.
|
|
93
90
|
*/
|
|
94
|
-
exceptions: Schema
|
|
95
|
-
date:
|
|
96
|
-
slots: Schema.Union<[Schema
|
|
97
|
-
open: Schema.Struct<{
|
|
98
|
-
hour: Schema.
|
|
99
|
-
minute: Schema.
|
|
91
|
+
readonly exceptions: Schema.$Array<Schema.Struct<{
|
|
92
|
+
readonly date: Schema.DateTimeUtc;
|
|
93
|
+
readonly slots: Schema.Union<readonly [Schema.$Array<Schema.Struct<{
|
|
94
|
+
readonly open: Schema.Struct<{
|
|
95
|
+
readonly hour: Schema.Int;
|
|
96
|
+
readonly minute: Schema.Int;
|
|
100
97
|
}>;
|
|
101
|
-
close: Schema.Struct<{
|
|
102
|
-
hour: Schema.
|
|
103
|
-
minute: Schema.
|
|
98
|
+
readonly close: Schema.Struct<{
|
|
99
|
+
readonly hour: Schema.Int;
|
|
100
|
+
readonly minute: Schema.Int;
|
|
104
101
|
}>;
|
|
105
|
-
}>>, Schema.Literal<
|
|
106
|
-
note: Schema.optional<
|
|
102
|
+
}>>, Schema.Literal<"closed">]>;
|
|
103
|
+
readonly note: Schema.optional<Schema.String>;
|
|
107
104
|
}>>;
|
|
108
105
|
/**
|
|
109
106
|
* Days of week that are non-working (0 = Sunday, 6 = Saturday).
|
|
110
107
|
* Typically [0, 6] for weekends.
|
|
111
108
|
*/
|
|
112
|
-
nonWorkingDays: Schema
|
|
109
|
+
readonly nonWorkingDays: Schema.$Array<Schema.brand<Schema.Int, "DayOfWeek">>;
|
|
113
110
|
/**
|
|
114
111
|
* Calendar periods loaded from database.
|
|
115
112
|
* Used for terms, seasons, fiscal periods, etc.
|
|
116
113
|
*/
|
|
117
|
-
periods: Schema
|
|
118
|
-
id:
|
|
119
|
-
type:
|
|
120
|
-
name:
|
|
121
|
-
startDate:
|
|
122
|
-
endDate:
|
|
123
|
-
isActive:
|
|
124
|
-
weeklySchedule: Schema.optional<Schema
|
|
125
|
-
day: Schema.brand<Schema.
|
|
126
|
-
ranges: Schema
|
|
127
|
-
open: Schema.Struct<{
|
|
128
|
-
hour: Schema.
|
|
129
|
-
minute: Schema.
|
|
114
|
+
readonly periods: Schema.$Array<Schema.Struct<{
|
|
115
|
+
readonly id: Schema.String;
|
|
116
|
+
readonly type: Schema.String;
|
|
117
|
+
readonly name: Schema.String;
|
|
118
|
+
readonly startDate: Schema.DateTimeUtc;
|
|
119
|
+
readonly endDate: Schema.DateTimeUtc;
|
|
120
|
+
readonly isActive: Schema.Boolean;
|
|
121
|
+
readonly weeklySchedule: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
122
|
+
readonly day: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
123
|
+
readonly ranges: Schema.$Array<Schema.Struct<{
|
|
124
|
+
readonly open: Schema.Struct<{
|
|
125
|
+
readonly hour: Schema.Int;
|
|
126
|
+
readonly minute: Schema.Int;
|
|
130
127
|
}>;
|
|
131
|
-
close: Schema.Struct<{
|
|
132
|
-
hour: Schema.
|
|
133
|
-
minute: Schema.
|
|
128
|
+
readonly close: Schema.Struct<{
|
|
129
|
+
readonly hour: Schema.Int;
|
|
130
|
+
readonly minute: Schema.Int;
|
|
134
131
|
}>;
|
|
135
132
|
}>>;
|
|
136
133
|
}>>>;
|
|
@@ -139,18 +136,18 @@ export declare const BusinessCalendarConfig: Schema.Struct<{
|
|
|
139
136
|
* If set, dates outside any active period of this type are non-business days.
|
|
140
137
|
* Example: "school_term" - only dates within active school terms are business days.
|
|
141
138
|
*/
|
|
142
|
-
requireActivePeriod: Schema.optional<
|
|
139
|
+
readonly requireActivePeriod: Schema.optional<Schema.String>;
|
|
143
140
|
/**
|
|
144
141
|
* First day of the business week (0 = Sunday, 6 = Saturday).
|
|
145
142
|
* Defaults to Sunday (0).
|
|
146
143
|
*/
|
|
147
|
-
startDayOfWeek: Schema.optional<Schema.brand<Schema.
|
|
144
|
+
readonly startDayOfWeek: Schema.optional<Schema.brand<Schema.Int, "DayOfWeek">>;
|
|
148
145
|
/**
|
|
149
146
|
* IANA timezone identifier for the calendar (e.g., "Pacific/Auckland", "America/New_York").
|
|
150
147
|
* Schedule times are interpreted in this timezone.
|
|
151
148
|
* Defaults to "UTC" if not specified.
|
|
152
149
|
*/
|
|
153
|
-
timezone: Schema.optional<
|
|
150
|
+
readonly timezone: Schema.optional<Schema.String>;
|
|
154
151
|
}>;
|
|
155
152
|
export type BusinessCalendarConfig = typeof BusinessCalendarConfig.Type;
|
|
156
153
|
/**
|
|
@@ -15,47 +15,47 @@ export declare const CalendarPeriod: Schema.Struct<{
|
|
|
15
15
|
/**
|
|
16
16
|
* Unique identifier for the period.
|
|
17
17
|
*/
|
|
18
|
-
id:
|
|
18
|
+
readonly id: Schema.String;
|
|
19
19
|
/**
|
|
20
20
|
* Type categorizes periods (e.g., "school_term", "shop_season", "fiscal_quarter").
|
|
21
21
|
* Used with `requireActivePeriod` to filter relevant periods.
|
|
22
22
|
*/
|
|
23
|
-
type:
|
|
23
|
+
readonly type: Schema.String;
|
|
24
24
|
/**
|
|
25
25
|
* Human-readable name (e.g., "Term 1", "Christmas Extended", "Q1 2026").
|
|
26
26
|
*/
|
|
27
|
-
name:
|
|
27
|
+
readonly name: Schema.String;
|
|
28
28
|
/**
|
|
29
29
|
* Start date of the period (inclusive).
|
|
30
30
|
* Stored as ISO 8601 date string for serialization.
|
|
31
31
|
*/
|
|
32
|
-
startDate:
|
|
32
|
+
readonly startDate: Schema.DateTimeUtc;
|
|
33
33
|
/**
|
|
34
34
|
* End date of the period (inclusive).
|
|
35
35
|
* Stored as ISO 8601 date string for serialization.
|
|
36
36
|
*/
|
|
37
|
-
endDate:
|
|
37
|
+
readonly endDate: Schema.DateTimeUtc;
|
|
38
38
|
/**
|
|
39
39
|
* Whether this period counts as "active" or "working".
|
|
40
40
|
* When requireActivePeriod is set, only dates within active periods
|
|
41
41
|
* of that type are considered business days.
|
|
42
42
|
*/
|
|
43
|
-
isActive:
|
|
43
|
+
readonly isActive: Schema.Boolean;
|
|
44
44
|
/**
|
|
45
45
|
* Optional weekly schedule override during this period.
|
|
46
46
|
* If provided, these hours replace the default calendar hours.
|
|
47
47
|
* Useful for extended hours, reduced hours, or different patterns.
|
|
48
48
|
*/
|
|
49
|
-
weeklySchedule: Schema.optional<Schema
|
|
50
|
-
day: Schema.brand<Schema.
|
|
51
|
-
ranges: Schema
|
|
52
|
-
open: Schema.Struct<{
|
|
53
|
-
hour: Schema.
|
|
54
|
-
minute: Schema.
|
|
49
|
+
readonly weeklySchedule: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
50
|
+
readonly day: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
51
|
+
readonly ranges: Schema.$Array<Schema.Struct<{
|
|
52
|
+
readonly open: Schema.Struct<{
|
|
53
|
+
readonly hour: Schema.Int;
|
|
54
|
+
readonly minute: Schema.Int;
|
|
55
55
|
}>;
|
|
56
|
-
close: Schema.Struct<{
|
|
57
|
-
hour: Schema.
|
|
58
|
-
minute: Schema.
|
|
56
|
+
readonly close: Schema.Struct<{
|
|
57
|
+
readonly hour: Schema.Int;
|
|
58
|
+
readonly minute: Schema.Int;
|
|
59
59
|
}>;
|
|
60
60
|
}>>;
|
|
61
61
|
}>>>;
|
|
@@ -65,22 +65,22 @@ export type CalendarPeriod = typeof CalendarPeriod.Type;
|
|
|
65
65
|
* Schema for encoding CalendarPeriod to JSON (for database storage).
|
|
66
66
|
*/
|
|
67
67
|
export declare const CalendarPeriodFromJson: Schema.Struct<{
|
|
68
|
-
id:
|
|
69
|
-
type:
|
|
70
|
-
name:
|
|
71
|
-
startDate:
|
|
72
|
-
endDate:
|
|
73
|
-
isActive:
|
|
74
|
-
weeklySchedule: Schema.optional<Schema
|
|
75
|
-
day: Schema.brand<Schema.
|
|
76
|
-
ranges: Schema
|
|
77
|
-
open: Schema.Struct<{
|
|
78
|
-
hour: Schema.
|
|
79
|
-
minute: Schema.
|
|
68
|
+
readonly id: Schema.String;
|
|
69
|
+
readonly type: Schema.String;
|
|
70
|
+
readonly name: Schema.String;
|
|
71
|
+
readonly startDate: Schema.DateTimeUtcFromString;
|
|
72
|
+
readonly endDate: Schema.DateTimeUtcFromString;
|
|
73
|
+
readonly isActive: Schema.Boolean;
|
|
74
|
+
readonly weeklySchedule: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
75
|
+
readonly day: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
76
|
+
readonly ranges: Schema.$Array<Schema.Struct<{
|
|
77
|
+
readonly open: Schema.Struct<{
|
|
78
|
+
readonly hour: Schema.Int;
|
|
79
|
+
readonly minute: Schema.Int;
|
|
80
80
|
}>;
|
|
81
|
-
close: Schema.Struct<{
|
|
82
|
-
hour: Schema.
|
|
83
|
-
minute: Schema.
|
|
81
|
+
readonly close: Schema.Struct<{
|
|
82
|
+
readonly hour: Schema.Int;
|
|
83
|
+
readonly minute: Schema.Int;
|
|
84
84
|
}>;
|
|
85
85
|
}>>;
|
|
86
86
|
}>>>;
|
|
@@ -125,13 +125,13 @@ export interface BusinessCalendarServiceShape {
|
|
|
125
125
|
*/
|
|
126
126
|
readonly getEffectiveSchedule: (date: DateTime.Utc) => Effect.Effect<DaySchedule[], never, never>;
|
|
127
127
|
}
|
|
128
|
-
declare const BusinessCalendarService_base: Context.
|
|
128
|
+
declare const BusinessCalendarService_base: Context.ServiceClass<BusinessCalendarService, "processfocus/calendar/BusinessCalendarService", BusinessCalendarServiceShape>;
|
|
129
129
|
/**
|
|
130
130
|
* Business Calendar Service tag.
|
|
131
131
|
*/
|
|
132
132
|
export declare class BusinessCalendarService extends BusinessCalendarService_base {
|
|
133
133
|
}
|
|
134
|
-
declare const BusinessCalendarConfigService_base: Context.
|
|
134
|
+
declare const BusinessCalendarConfigService_base: Context.ServiceClass<BusinessCalendarConfigService, "processfocus/calendar/BusinessCalendarConfigService", {
|
|
135
135
|
readonly weeklySchedule: readonly {
|
|
136
136
|
readonly day: number & import("effect/Brand").Brand<"DayOfWeek">;
|
|
137
137
|
readonly ranges: readonly {
|
|
@@ -146,29 +146,29 @@ declare const BusinessCalendarConfigService_base: Context.TagClass<BusinessCalen
|
|
|
146
146
|
}[];
|
|
147
147
|
}[];
|
|
148
148
|
readonly holidays: readonly ({
|
|
149
|
+
readonly _tag: "FixedHoliday";
|
|
149
150
|
readonly name: string;
|
|
150
|
-
readonly day: number & import("effect/Brand").Brand<"DayOfMonth">;
|
|
151
151
|
readonly month: number & import("effect/Brand").Brand<"Month">;
|
|
152
|
-
readonly
|
|
152
|
+
readonly day: number & import("effect/Brand").Brand<"DayOfMonth">;
|
|
153
153
|
} | {
|
|
154
|
+
readonly _tag: "NthWeekdayHoliday";
|
|
154
155
|
readonly name: string;
|
|
155
156
|
readonly month: number & import("effect/Brand").Brand<"Month">;
|
|
156
|
-
readonly _tag: "NthWeekdayHoliday";
|
|
157
157
|
readonly weekday: number & import("effect/Brand").Brand<"DayOfWeek">;
|
|
158
158
|
readonly nth: number & import("effect/Brand").Brand<"NthOccurrence">;
|
|
159
159
|
} | {
|
|
160
|
+
readonly _tag: "LastWeekdayHoliday";
|
|
160
161
|
readonly name: string;
|
|
161
162
|
readonly month: number & import("effect/Brand").Brand<"Month">;
|
|
162
|
-
readonly _tag: "LastWeekdayHoliday";
|
|
163
163
|
readonly weekday: number & import("effect/Brand").Brand<"DayOfWeek">;
|
|
164
164
|
} | {
|
|
165
|
-
readonly name: string;
|
|
166
165
|
readonly _tag: "EasterRelativeHoliday";
|
|
166
|
+
readonly name: string;
|
|
167
167
|
readonly daysOffset: number;
|
|
168
168
|
})[];
|
|
169
169
|
readonly exceptions: readonly {
|
|
170
170
|
readonly date: DateTime.Utc;
|
|
171
|
-
readonly slots: readonly {
|
|
171
|
+
readonly slots: "closed" | readonly {
|
|
172
172
|
readonly open: {
|
|
173
173
|
readonly hour: number;
|
|
174
174
|
readonly minute: number;
|
|
@@ -177,13 +177,13 @@ declare const BusinessCalendarConfigService_base: Context.TagClass<BusinessCalen
|
|
|
177
177
|
readonly hour: number;
|
|
178
178
|
readonly minute: number;
|
|
179
179
|
};
|
|
180
|
-
}[]
|
|
180
|
+
}[];
|
|
181
181
|
readonly note?: string | undefined;
|
|
182
182
|
}[];
|
|
183
183
|
readonly nonWorkingDays: readonly (number & import("effect/Brand").Brand<"DayOfWeek">)[];
|
|
184
184
|
readonly periods: readonly {
|
|
185
|
-
readonly name: string;
|
|
186
185
|
readonly id: string;
|
|
186
|
+
readonly name: string;
|
|
187
187
|
readonly type: string;
|
|
188
188
|
readonly startDate: DateTime.Utc;
|
|
189
189
|
readonly endDate: DateTime.Utc;
|
|
@@ -2,7 +2,7 @@ import { DateTime } from "effect";
|
|
|
2
2
|
/**
|
|
3
3
|
* Create a DateTime.Utc for a specific date and time.
|
|
4
4
|
*
|
|
5
|
-
* Note: DateTime.
|
|
5
|
+
* Note: DateTime.makeUnsafe with object params sets time components to 0,
|
|
6
6
|
* so we use mutate to set the desired time.
|
|
7
7
|
*
|
|
8
8
|
* @param year - Year (e.g., 2025)
|
|
@@ -5,9 +5,9 @@ import { type DayOfMonth as DayOfMonthType, type DayOfWeek as DayOfWeekType, typ
|
|
|
5
5
|
* Example: Christmas (December 25), New Year's Day (January 1)
|
|
6
6
|
*/
|
|
7
7
|
export declare const FixedHoliday: Schema.TaggedStruct<"FixedHoliday", {
|
|
8
|
-
name:
|
|
9
|
-
month: Schema.brand<Schema.
|
|
10
|
-
day: Schema.brand<Schema.
|
|
8
|
+
readonly name: Schema.String;
|
|
9
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
10
|
+
readonly day: Schema.brand<Schema.Int, "DayOfMonth">;
|
|
11
11
|
}>;
|
|
12
12
|
export type FixedHoliday = typeof FixedHoliday.Type;
|
|
13
13
|
/**
|
|
@@ -19,10 +19,10 @@ export type FixedHoliday = typeof FixedHoliday.Type;
|
|
|
19
19
|
* @property month - Month (1-12)
|
|
20
20
|
*/
|
|
21
21
|
export declare const NthWeekdayHoliday: Schema.TaggedStruct<"NthWeekdayHoliday", {
|
|
22
|
-
name:
|
|
23
|
-
month: Schema.brand<Schema.
|
|
24
|
-
weekday: Schema.brand<Schema.
|
|
25
|
-
nth: Schema.brand<Schema.
|
|
22
|
+
readonly name: Schema.String;
|
|
23
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
24
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
25
|
+
readonly nth: Schema.brand<Schema.Int, "NthOccurrence">;
|
|
26
26
|
}>;
|
|
27
27
|
export type NthWeekdayHoliday = typeof NthWeekdayHoliday.Type;
|
|
28
28
|
/**
|
|
@@ -33,9 +33,9 @@ export type NthWeekdayHoliday = typeof NthWeekdayHoliday.Type;
|
|
|
33
33
|
* @property month - Month (1-12)
|
|
34
34
|
*/
|
|
35
35
|
export declare const LastWeekdayHoliday: Schema.TaggedStruct<"LastWeekdayHoliday", {
|
|
36
|
-
name:
|
|
37
|
-
month: Schema.brand<Schema.
|
|
38
|
-
weekday: Schema.brand<Schema.
|
|
36
|
+
readonly name: Schema.String;
|
|
37
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
38
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
39
39
|
}>;
|
|
40
40
|
export type LastWeekdayHoliday = typeof LastWeekdayHoliday.Type;
|
|
41
41
|
/**
|
|
@@ -45,29 +45,29 @@ export type LastWeekdayHoliday = typeof LastWeekdayHoliday.Type;
|
|
|
45
45
|
* @property daysOffset - Positive for after Easter, negative for before
|
|
46
46
|
*/
|
|
47
47
|
export declare const EasterRelativeHoliday: Schema.TaggedStruct<"EasterRelativeHoliday", {
|
|
48
|
-
name:
|
|
49
|
-
daysOffset:
|
|
48
|
+
readonly name: Schema.String;
|
|
49
|
+
readonly daysOffset: Schema.Int;
|
|
50
50
|
}>;
|
|
51
51
|
export type EasterRelativeHoliday = typeof EasterRelativeHoliday.Type;
|
|
52
52
|
/**
|
|
53
53
|
* Union of all holiday types.
|
|
54
54
|
*/
|
|
55
|
-
export declare const Holiday: Schema.Union<[Schema.TaggedStruct<"FixedHoliday", {
|
|
56
|
-
name:
|
|
57
|
-
month: Schema.brand<Schema.
|
|
58
|
-
day: Schema.brand<Schema.
|
|
55
|
+
export declare const Holiday: Schema.Union<readonly [Schema.TaggedStruct<"FixedHoliday", {
|
|
56
|
+
readonly name: Schema.String;
|
|
57
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
58
|
+
readonly day: Schema.brand<Schema.Int, "DayOfMonth">;
|
|
59
59
|
}>, Schema.TaggedStruct<"NthWeekdayHoliday", {
|
|
60
|
-
name:
|
|
61
|
-
month: Schema.brand<Schema.
|
|
62
|
-
weekday: Schema.brand<Schema.
|
|
63
|
-
nth: Schema.brand<Schema.
|
|
60
|
+
readonly name: Schema.String;
|
|
61
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
62
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
63
|
+
readonly nth: Schema.brand<Schema.Int, "NthOccurrence">;
|
|
64
64
|
}>, Schema.TaggedStruct<"LastWeekdayHoliday", {
|
|
65
|
-
name:
|
|
66
|
-
month: Schema.brand<Schema.
|
|
67
|
-
weekday: Schema.brand<Schema.
|
|
65
|
+
readonly name: Schema.String;
|
|
66
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
67
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
68
68
|
}>, Schema.TaggedStruct<"EasterRelativeHoliday", {
|
|
69
|
-
name:
|
|
70
|
-
daysOffset:
|
|
69
|
+
readonly name: Schema.String;
|
|
70
|
+
readonly daysOffset: Schema.Int;
|
|
71
71
|
}>]>;
|
|
72
72
|
export type Holiday = typeof Holiday.Type;
|
|
73
73
|
/**
|
|
@@ -75,24 +75,24 @@ export type Holiday = typeof Holiday.Type;
|
|
|
75
75
|
* Used for caching and display.
|
|
76
76
|
*/
|
|
77
77
|
export declare const HolidayInstance: Schema.Struct<{
|
|
78
|
-
date:
|
|
79
|
-
name:
|
|
80
|
-
rule: Schema.optional<Schema.Union<[Schema.TaggedStruct<"FixedHoliday", {
|
|
81
|
-
name:
|
|
82
|
-
month: Schema.brand<Schema.
|
|
83
|
-
day: Schema.brand<Schema.
|
|
78
|
+
readonly date: Schema.DateTimeUtc;
|
|
79
|
+
readonly name: Schema.String;
|
|
80
|
+
readonly rule: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"FixedHoliday", {
|
|
81
|
+
readonly name: Schema.String;
|
|
82
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
83
|
+
readonly day: Schema.brand<Schema.Int, "DayOfMonth">;
|
|
84
84
|
}>, Schema.TaggedStruct<"NthWeekdayHoliday", {
|
|
85
|
-
name:
|
|
86
|
-
month: Schema.brand<Schema.
|
|
87
|
-
weekday: Schema.brand<Schema.
|
|
88
|
-
nth: Schema.brand<Schema.
|
|
85
|
+
readonly name: Schema.String;
|
|
86
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
87
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
88
|
+
readonly nth: Schema.brand<Schema.Int, "NthOccurrence">;
|
|
89
89
|
}>, Schema.TaggedStruct<"LastWeekdayHoliday", {
|
|
90
|
-
name:
|
|
91
|
-
month: Schema.brand<Schema.
|
|
92
|
-
weekday: Schema.brand<Schema.
|
|
90
|
+
readonly name: Schema.String;
|
|
91
|
+
readonly month: Schema.brand<Schema.Int, "Month">;
|
|
92
|
+
readonly weekday: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
93
93
|
}>, Schema.TaggedStruct<"EasterRelativeHoliday", {
|
|
94
|
-
name:
|
|
95
|
-
daysOffset:
|
|
94
|
+
readonly name: Schema.String;
|
|
95
|
+
readonly daysOffset: Schema.Int;
|
|
96
96
|
}>]>>;
|
|
97
97
|
}>;
|
|
98
98
|
export type HolidayInstance = typeof HolidayInstance.Type;
|
|
@@ -3,7 +3,7 @@ import { Schema } from "effect";
|
|
|
3
3
|
* Day of week (0 = Sunday, 6 = Saturday).
|
|
4
4
|
* Matches JavaScript Date.getDay() convention.
|
|
5
5
|
*/
|
|
6
|
-
export declare const DayOfWeek: Schema.brand<Schema.
|
|
6
|
+
export declare const DayOfWeek: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
7
7
|
export type DayOfWeek = typeof DayOfWeek.Type;
|
|
8
8
|
/** Named weekday constants */
|
|
9
9
|
export declare const Sunday: DayOfWeek;
|
|
@@ -21,8 +21,8 @@ export declare const AllDays: readonly DayOfWeek[];
|
|
|
21
21
|
* Time of day with hour (0-23) and minute (0-59).
|
|
22
22
|
*/
|
|
23
23
|
export declare const TimeOfDay: Schema.Struct<{
|
|
24
|
-
hour: Schema.
|
|
25
|
-
minute: Schema.
|
|
24
|
+
readonly hour: Schema.Int;
|
|
25
|
+
readonly minute: Schema.Int;
|
|
26
26
|
}>;
|
|
27
27
|
export type TimeOfDay = typeof TimeOfDay.Type;
|
|
28
28
|
/**
|
|
@@ -32,13 +32,13 @@ export type TimeOfDay = typeof TimeOfDay.Type;
|
|
|
32
32
|
* represents 10 PM to 6 AM the next day.
|
|
33
33
|
*/
|
|
34
34
|
export declare const TimeRange: Schema.Struct<{
|
|
35
|
-
open: Schema.Struct<{
|
|
36
|
-
hour: Schema.
|
|
37
|
-
minute: Schema.
|
|
35
|
+
readonly open: Schema.Struct<{
|
|
36
|
+
readonly hour: Schema.Int;
|
|
37
|
+
readonly minute: Schema.Int;
|
|
38
38
|
}>;
|
|
39
|
-
close: Schema.Struct<{
|
|
40
|
-
hour: Schema.
|
|
41
|
-
minute: Schema.
|
|
39
|
+
readonly close: Schema.Struct<{
|
|
40
|
+
readonly hour: Schema.Int;
|
|
41
|
+
readonly minute: Schema.Int;
|
|
42
42
|
}>;
|
|
43
43
|
}>;
|
|
44
44
|
export type TimeRange = typeof TimeRange.Type;
|
|
@@ -47,15 +47,15 @@ export type TimeRange = typeof TimeRange.Type;
|
|
|
47
47
|
* Contains multiple time ranges to support split shifts (e.g., 9-12, 13-17).
|
|
48
48
|
*/
|
|
49
49
|
export declare const DaySchedule: Schema.Struct<{
|
|
50
|
-
day: Schema.brand<Schema.
|
|
51
|
-
ranges: Schema
|
|
52
|
-
open: Schema.Struct<{
|
|
53
|
-
hour: Schema.
|
|
54
|
-
minute: Schema.
|
|
50
|
+
readonly day: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
51
|
+
readonly ranges: Schema.$Array<Schema.Struct<{
|
|
52
|
+
readonly open: Schema.Struct<{
|
|
53
|
+
readonly hour: Schema.Int;
|
|
54
|
+
readonly minute: Schema.Int;
|
|
55
55
|
}>;
|
|
56
|
-
close: Schema.Struct<{
|
|
57
|
-
hour: Schema.
|
|
58
|
-
minute: Schema.
|
|
56
|
+
readonly close: Schema.Struct<{
|
|
57
|
+
readonly hour: Schema.Int;
|
|
58
|
+
readonly minute: Schema.Int;
|
|
59
59
|
}>;
|
|
60
60
|
}>>;
|
|
61
61
|
}>;
|
|
@@ -64,16 +64,16 @@ export type DaySchedule = typeof DaySchedule.Type;
|
|
|
64
64
|
* Weekly schedule as an array of day schedules.
|
|
65
65
|
* Days without entries are considered non-working.
|
|
66
66
|
*/
|
|
67
|
-
export declare const WeeklySchedule: Schema
|
|
68
|
-
day: Schema.brand<Schema.
|
|
69
|
-
ranges: Schema
|
|
70
|
-
open: Schema.Struct<{
|
|
71
|
-
hour: Schema.
|
|
72
|
-
minute: Schema.
|
|
67
|
+
export declare const WeeklySchedule: Schema.$Array<Schema.Struct<{
|
|
68
|
+
readonly day: Schema.brand<Schema.Int, "DayOfWeek">;
|
|
69
|
+
readonly ranges: Schema.$Array<Schema.Struct<{
|
|
70
|
+
readonly open: Schema.Struct<{
|
|
71
|
+
readonly hour: Schema.Int;
|
|
72
|
+
readonly minute: Schema.Int;
|
|
73
73
|
}>;
|
|
74
|
-
close: Schema.Struct<{
|
|
75
|
-
hour: Schema.
|
|
76
|
-
minute: Schema.
|
|
74
|
+
readonly close: Schema.Struct<{
|
|
75
|
+
readonly hour: Schema.Int;
|
|
76
|
+
readonly minute: Schema.Int;
|
|
77
77
|
}>;
|
|
78
78
|
}>>;
|
|
79
79
|
}>>;
|
|
@@ -81,19 +81,19 @@ export type WeeklySchedule = typeof WeeklySchedule.Type;
|
|
|
81
81
|
/**
|
|
82
82
|
* Month number (1-12).
|
|
83
83
|
*/
|
|
84
|
-
export declare const Month: Schema.brand<Schema.
|
|
84
|
+
export declare const Month: Schema.brand<Schema.Int, "Month">;
|
|
85
85
|
export type Month = typeof Month.Type;
|
|
86
86
|
/**
|
|
87
87
|
* Day of month (1-31).
|
|
88
88
|
* Note: validation doesn't check for valid days per month (e.g., Feb 30).
|
|
89
89
|
* That validation happens at calculation time.
|
|
90
90
|
*/
|
|
91
|
-
export declare const DayOfMonth: Schema.brand<Schema.
|
|
91
|
+
export declare const DayOfMonth: Schema.brand<Schema.Int, "DayOfMonth">;
|
|
92
92
|
export type DayOfMonth = typeof DayOfMonth.Type;
|
|
93
93
|
/**
|
|
94
94
|
* Nth occurrence (1-5, where 5 means "last" in some contexts).
|
|
95
95
|
*/
|
|
96
|
-
export declare const NthOccurrence: Schema.brand<Schema.
|
|
96
|
+
export declare const NthOccurrence: Schema.brand<Schema.Int, "NthOccurrence">;
|
|
97
97
|
export type NthOccurrence = typeof NthOccurrence.Type;
|
|
98
98
|
/**
|
|
99
99
|
* Convert TimeOfDay to minutes since midnight.
|