processfocus 0.1.0-next.1 → 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.
Files changed (67) hide show
  1. package/dist/{auth-FmXptohB.mjs → auth-DWWupwJA.mjs} +57 -24
  2. package/dist/auth-config/src/lib/authentication-config.d.ts +13 -8
  3. package/dist/auth-config/src/lib/aws-role-binding.d.ts +21 -0
  4. package/dist/auth-config/src/lib/provider-types.d.ts +87 -76
  5. package/dist/auth-config/src/lib/workload-trust.d.ts +41 -0
  6. package/dist/auth.mjs +1 -2
  7. package/dist/business-calendar/src/lib/calendar-config.d.ts +73 -76
  8. package/dist/business-calendar/src/lib/calendar-period.d.ts +30 -30
  9. package/dist/business-calendar/src/lib/calendar-service.d.ts +10 -10
  10. package/dist/business-calendar/src/lib/datetime-utils.d.ts +1 -1
  11. package/dist/business-calendar/src/lib/holidays.d.ts +40 -40
  12. package/dist/business-calendar/src/lib/types.d.ts +29 -29
  13. package/dist/calendar.mjs +73 -63
  14. package/dist/form-schema/src/index.d.ts +4 -1
  15. package/dist/form-schema/src/lib/annotation-helpers.d.ts +2 -2
  16. package/dist/form-schema/src/lib/email.d.ts +2 -2
  17. package/dist/form-schema/src/lib/field-count.d.ts +2 -2
  18. package/dist/form-schema/src/lib/form-annotations.d.ts +6 -0
  19. package/dist/form-schema/src/lib/form-presentation.d.ts +30 -0
  20. package/dist/form-schema/src/lib/form-schema.d.ts +64 -34
  21. package/dist/form-schema/src/lib/number-from-string.d.ts +3 -0
  22. package/dist/form-schema/src/lib/phone.d.ts +2 -2
  23. package/dist/form-schema/src/lib/public-completion-correction.d.ts +5 -0
  24. package/dist/form-schema/src/lib/search-lookup-items.d.ts +3 -0
  25. package/dist/form-submission-schema/src/index.d.ts +3 -0
  26. package/dist/form-submission-schema/src/lib/executable-rules.d.ts +43 -0
  27. package/dist/form-submission-schema/src/lib/form-submission-schema.d.ts +33 -10
  28. package/dist/form-submission-schema/src/lib/json-schema.d.ts +3 -0
  29. package/dist/form-submission-schema/src/lib/submission-utils.d.ts +19 -0
  30. package/dist/forms.mjs +26 -2
  31. package/dist/frontend-manifest/src/lib/browser-plugin-artifact.d.ts +9 -0
  32. package/dist/frontend-manifest/src/lib/frontend-manifest.d.ts +8 -6
  33. package/dist/frontend-plugin-host/src/lib/frontend-plugin-host.d.ts +11 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.mjs +485 -972
  36. package/dist/manifest.mjs +1 -2
  37. package/dist/plugin.mjs +1 -2
  38. package/dist/process/src/lib/form-authoring.d.ts +1 -1
  39. package/dist/process/src/lib/form-decoration.d.ts +3 -3
  40. package/dist/process/src/lib/form.d.ts +79 -97
  41. package/dist/process/src/lib/list.d.ts +45 -23
  42. package/dist/process/src/lib/lookup-accessor.d.ts +4 -1
  43. package/dist/process/src/lib/organisation.d.ts +14 -0
  44. package/dist/process/src/lib/process.d.ts +24 -2
  45. package/dist/process/src/lib/schedule.d.ts +1 -1
  46. package/dist/process/src/lib/step.d.ts +13 -3
  47. package/dist/process/src/lib/system-step-executor.d.ts +4 -4
  48. package/dist/process/src/lib/system-step.d.ts +11 -1
  49. package/dist/sdk/src/index.d.ts +1 -1
  50. package/dist/sdk/src/testing.d.ts +0 -1
  51. package/dist/{src-C-909PVQ.mjs → src-BQ55-khF.mjs} +118 -66
  52. package/dist/testing.d.ts +0 -1
  53. package/dist/testing.mjs +2 -4
  54. package/package.json +4 -4
  55. package/dist/form-client-representation/src/index.d.ts +0 -6
  56. package/dist/form-client-representation/src/lib/as-client-representation.d.ts +0 -31
  57. package/dist/form-client-representation/src/lib/client-form-definition.d.ts +0 -17
  58. package/dist/form-client-representation/src/lib/extract-annotations.d.ts +0 -20
  59. package/dist/form-client-representation/src/lib/plugin-registry.d.ts +0 -6
  60. package/dist/form-client-representation/src/lib/types.d.ts +0 -239
  61. package/dist/form-client-representation/src/lib/walker.d.ts +0 -68
  62. package/dist/form-rule/src/index.d.ts +0 -3
  63. package/dist/form-rule/src/lib/evaluator.d.ts +0 -2
  64. package/dist/form-rule/src/lib/paths.d.ts +0 -9
  65. package/dist/form-rule/src/lib/types.d.ts +0 -89
  66. package/dist/form-schema/src/lib/property-signature.d.ts +0 -3
  67. 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: typeof Schema.DateTimeUtcFromSelf;
13
- slots: Schema.Union<[Schema.Array$<Schema.Struct<{
14
- open: Schema.Struct<{
15
- hour: Schema.filter<typeof Schema.Int>;
16
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
20
- minute: Schema.filter<typeof Schema.Int>;
18
+ readonly close: Schema.Struct<{
19
+ readonly hour: Schema.Int;
20
+ readonly minute: Schema.Int;
21
21
  }>;
22
- }>>, Schema.Literal<["closed"]>]>;
23
- note: Schema.optional<typeof Schema.String>;
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: typeof Schema.DateTimeUtc;
31
- slots: Schema.Union<[Schema.Array$<Schema.Struct<{
32
- open: Schema.Struct<{
33
- hour: Schema.filter<typeof Schema.Int>;
34
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
38
- minute: Schema.filter<typeof Schema.Int>;
36
+ readonly close: Schema.Struct<{
37
+ readonly hour: Schema.Int;
38
+ readonly minute: Schema.Int;
39
39
  }>;
40
- }>>, Schema.Literal<["closed"]>]>;
41
- note: Schema.optional<typeof Schema.String>;
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.Array$<Schema.Struct<{
57
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
58
- ranges: Schema.Array$<Schema.Struct<{
59
- open: Schema.Struct<{
60
- hour: Schema.filter<typeof Schema.Int>;
61
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
65
- minute: Schema.filter<typeof Schema.Int>;
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.Array$<Schema.Union<[Schema.TaggedStruct<"FixedHoliday", {
74
- name: typeof Schema.String;
75
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
76
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfMonth">;
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: typeof Schema.String;
79
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
80
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
81
- nth: Schema.brand<Schema.filter<typeof Schema.Int>, "NthOccurrence">;
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: typeof Schema.String;
84
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
85
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
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: typeof Schema.String;
88
- daysOffset: typeof Schema.Int;
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.Array$<Schema.Struct<{
95
- date: typeof Schema.DateTimeUtcFromSelf;
96
- slots: Schema.Union<[Schema.Array$<Schema.Struct<{
97
- open: Schema.Struct<{
98
- hour: Schema.filter<typeof Schema.Int>;
99
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
103
- minute: Schema.filter<typeof Schema.Int>;
98
+ readonly close: Schema.Struct<{
99
+ readonly hour: Schema.Int;
100
+ readonly minute: Schema.Int;
104
101
  }>;
105
- }>>, Schema.Literal<["closed"]>]>;
106
- note: Schema.optional<typeof Schema.String>;
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.Array$<Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">>;
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.Array$<Schema.Struct<{
118
- id: typeof Schema.String;
119
- type: typeof Schema.String;
120
- name: typeof Schema.String;
121
- startDate: typeof Schema.DateTimeUtcFromSelf;
122
- endDate: typeof Schema.DateTimeUtcFromSelf;
123
- isActive: typeof Schema.Boolean;
124
- weeklySchedule: Schema.optional<Schema.Array$<Schema.Struct<{
125
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
126
- ranges: Schema.Array$<Schema.Struct<{
127
- open: Schema.Struct<{
128
- hour: Schema.filter<typeof Schema.Int>;
129
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
133
- minute: Schema.filter<typeof Schema.Int>;
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<typeof Schema.String>;
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.filter<typeof Schema.Int>, "DayOfWeek">>;
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<typeof Schema.String>;
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: typeof Schema.String;
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: typeof Schema.String;
23
+ readonly type: Schema.String;
24
24
  /**
25
25
  * Human-readable name (e.g., "Term 1", "Christmas Extended", "Q1 2026").
26
26
  */
27
- name: typeof Schema.String;
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: typeof Schema.DateTimeUtcFromSelf;
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: typeof Schema.DateTimeUtcFromSelf;
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: typeof Schema.Boolean;
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.Array$<Schema.Struct<{
50
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
51
- ranges: Schema.Array$<Schema.Struct<{
52
- open: Schema.Struct<{
53
- hour: Schema.filter<typeof Schema.Int>;
54
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
58
- minute: Schema.filter<typeof Schema.Int>;
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: typeof Schema.String;
69
- type: typeof Schema.String;
70
- name: typeof Schema.String;
71
- startDate: typeof Schema.DateTimeUtc;
72
- endDate: typeof Schema.DateTimeUtc;
73
- isActive: typeof Schema.Boolean;
74
- weeklySchedule: Schema.optional<Schema.Array$<Schema.Struct<{
75
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
76
- ranges: Schema.Array$<Schema.Struct<{
77
- open: Schema.Struct<{
78
- hour: Schema.filter<typeof Schema.Int>;
79
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
83
- minute: Schema.filter<typeof Schema.Int>;
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.TagClass<BusinessCalendarService, "processfocus/calendar/BusinessCalendarService", BusinessCalendarServiceShape>;
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.TagClass<BusinessCalendarConfigService, "processfocus/calendar/BusinessCalendarConfigService", {
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 _tag: "FixedHoliday";
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
- }[] | "closed";
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.unsafeMake with object params sets time components to 0,
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: typeof Schema.String;
9
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
10
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfMonth">;
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: typeof Schema.String;
23
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
24
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
25
- nth: Schema.brand<Schema.filter<typeof Schema.Int>, "NthOccurrence">;
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: typeof Schema.String;
37
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
38
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
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: typeof Schema.String;
49
- daysOffset: typeof Schema.Int;
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: typeof Schema.String;
57
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
58
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfMonth">;
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: typeof Schema.String;
61
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
62
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
63
- nth: Schema.brand<Schema.filter<typeof Schema.Int>, "NthOccurrence">;
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: typeof Schema.String;
66
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
67
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
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: typeof Schema.String;
70
- daysOffset: typeof Schema.Int;
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: typeof Schema.DateTimeUtcFromSelf;
79
- name: typeof Schema.String;
80
- rule: Schema.optional<Schema.Union<[Schema.TaggedStruct<"FixedHoliday", {
81
- name: typeof Schema.String;
82
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
83
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfMonth">;
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: typeof Schema.String;
86
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
87
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
88
- nth: Schema.brand<Schema.filter<typeof Schema.Int>, "NthOccurrence">;
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: typeof Schema.String;
91
- month: Schema.brand<Schema.filter<typeof Schema.Int>, "Month">;
92
- weekday: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
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: typeof Schema.String;
95
- daysOffset: typeof Schema.Int;
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.filter<typeof Schema.Int>, "DayOfWeek">;
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.filter<typeof Schema.Int>;
25
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
37
- minute: Schema.filter<typeof Schema.Int>;
35
+ readonly open: Schema.Struct<{
36
+ readonly hour: Schema.Int;
37
+ readonly minute: Schema.Int;
38
38
  }>;
39
- close: Schema.Struct<{
40
- hour: Schema.filter<typeof Schema.Int>;
41
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>, "DayOfWeek">;
51
- ranges: Schema.Array$<Schema.Struct<{
52
- open: Schema.Struct<{
53
- hour: Schema.filter<typeof Schema.Int>;
54
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
58
- minute: Schema.filter<typeof Schema.Int>;
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.Array$<Schema.Struct<{
68
- day: Schema.brand<Schema.filter<typeof Schema.Int>, "DayOfWeek">;
69
- ranges: Schema.Array$<Schema.Struct<{
70
- open: Schema.Struct<{
71
- hour: Schema.filter<typeof Schema.Int>;
72
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>;
76
- minute: Schema.filter<typeof Schema.Int>;
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.filter<typeof Schema.Int>, "Month">;
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.filter<typeof Schema.Int>, "DayOfMonth">;
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.filter<typeof Schema.Int>, "NthOccurrence">;
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.