@lilaquadrat/interfaces 1.57.0 → 2.0.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.
Files changed (249) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/lib/cjs/AccessLimitDoc.d.ts +12 -0
  3. package/lib/cjs/Auth0ProjectSettings.d.ts +4 -0
  4. package/lib/cjs/Cart.d.ts +2 -0
  5. package/lib/cjs/CategoryBookedTime.d.ts +5 -0
  6. package/lib/cjs/ConversationResponse.d.ts +6 -0
  7. package/lib/cjs/CoverageAllocation.d.ts +7 -0
  8. package/lib/cjs/Endpoints.d.ts +21 -0
  9. package/lib/cjs/Environment.d.ts +18 -0
  10. package/lib/cjs/EnvironmentAuth.d.ts +6 -0
  11. package/lib/cjs/EnvironmentAuthKeycloak.d.ts +19 -0
  12. package/lib/cjs/FrontendProject.d.ts +15 -0
  13. package/lib/cjs/HistorySeenKey.d.ts +7 -0
  14. package/lib/cjs/IdCounter.d.ts +12 -0
  15. package/lib/cjs/ImmutableErrorKeys.d.ts +1 -0
  16. package/lib/cjs/ListPlanningParticipant.d.ts +18 -0
  17. package/lib/cjs/Participant.d.ts +27 -0
  18. package/lib/cjs/ParticipantRole.d.ts +1 -0
  19. package/lib/cjs/ParticipantState.d.ts +1 -0
  20. package/lib/cjs/ParticipantUser.d.ts +27 -0
  21. package/lib/cjs/PaymentProviderBase.d.ts +17 -0
  22. package/lib/cjs/PlanCoveragePreparation.d.ts +20 -0
  23. package/lib/cjs/PlanningParticipantsResult.d.ts +12 -0
  24. package/lib/cjs/Project.d.ts +27 -1
  25. package/lib/cjs/ProjectAnalytics.d.ts +3 -0
  26. package/lib/cjs/ProjectAnalyticsGoogle.d.ts +11 -0
  27. package/lib/cjs/ProjectAnalyticsInternal.d.ts +3 -0
  28. package/lib/cjs/ProjectHead.d.ts +19 -0
  29. package/lib/cjs/ProjectLogin.d.ts +3 -0
  30. package/lib/cjs/ProjectPayment.d.ts +7 -0
  31. package/lib/cjs/ProjectPwa.d.ts +21 -0
  32. package/lib/cjs/ProjectPwaIcon.d.ts +15 -0
  33. package/lib/cjs/Publish.d.ts +1 -0
  34. package/lib/cjs/RenderContext.d.ts +2 -10
  35. package/lib/cjs/Right.d.ts +1 -0
  36. package/lib/cjs/ScorableParticipant.d.ts +5 -0
  37. package/lib/cjs/ShiftAutofillResult.d.ts +6 -0
  38. package/lib/cjs/ShiftFillCandidate.d.ts +10 -0
  39. package/lib/cjs/ShiftFillPolicy.d.ts +8 -0
  40. package/lib/cjs/ShiftFillResult.d.ts +11 -0
  41. package/lib/cjs/ShiftFillTarget.d.ts +10 -0
  42. package/lib/cjs/ShiftReportContextOptions.d.ts +9 -0
  43. package/lib/cjs/TrackerDailyLimitGroup.d.ts +7 -0
  44. package/lib/cjs/TrackerDailyLimitInput.d.ts +8 -0
  45. package/lib/cjs/TrackerStatisticsBucket.d.ts +13 -0
  46. package/lib/cjs/TrackerStatisticsRange.d.ts +6 -0
  47. package/lib/cjs/TrackerTimeSum.d.ts +4 -0
  48. package/lib/cjs/VerifyTokenOptions.d.ts +8 -0
  49. package/lib/cjs/WorkingAuth.d.ts +3 -0
  50. package/lib/cjs/WorkingAuthAuth0.d.ts +7 -0
  51. package/lib/cjs/WorkingAuthKeycloak.d.ts +7 -0
  52. package/lib/cjs/WorkingContext.d.ts +52 -0
  53. package/lib/cjs/index.d.ts +46 -0
  54. package/lib/esm/AccessLimitDoc.d.ts +12 -0
  55. package/lib/esm/AccessLimitDoc.js +2 -0
  56. package/lib/esm/AccessLimitDoc.js.map +1 -0
  57. package/lib/esm/Auth0ProjectSettings.d.ts +4 -0
  58. package/lib/esm/Cart.d.ts +2 -0
  59. package/lib/esm/CategoryBookedTime.d.ts +5 -0
  60. package/lib/esm/CategoryBookedTime.js +2 -0
  61. package/lib/esm/CategoryBookedTime.js.map +1 -0
  62. package/lib/esm/ConversationResponse.d.ts +6 -0
  63. package/lib/esm/ConversationResponse.js +2 -0
  64. package/lib/esm/ConversationResponse.js.map +1 -0
  65. package/lib/esm/CoverageAllocation.d.ts +7 -0
  66. package/lib/esm/CoverageAllocation.js +2 -0
  67. package/lib/esm/CoverageAllocation.js.map +1 -0
  68. package/lib/esm/Endpoints.d.ts +21 -0
  69. package/lib/esm/Endpoints.js +2 -0
  70. package/lib/esm/Endpoints.js.map +1 -0
  71. package/lib/esm/Environment.d.ts +18 -0
  72. package/lib/esm/Environment.js +2 -0
  73. package/lib/esm/Environment.js.map +1 -0
  74. package/lib/esm/EnvironmentAuth.d.ts +6 -0
  75. package/lib/esm/EnvironmentAuth.js +2 -0
  76. package/lib/esm/EnvironmentAuth.js.map +1 -0
  77. package/lib/esm/EnvironmentAuthKeycloak.d.ts +19 -0
  78. package/lib/esm/EnvironmentAuthKeycloak.js +2 -0
  79. package/lib/esm/EnvironmentAuthKeycloak.js.map +1 -0
  80. package/lib/esm/FrontendProject.d.ts +15 -0
  81. package/lib/esm/FrontendProject.js +2 -0
  82. package/lib/esm/FrontendProject.js.map +1 -0
  83. package/lib/esm/HistorySeenKey.d.ts +7 -0
  84. package/lib/esm/HistorySeenKey.js +2 -0
  85. package/lib/esm/HistorySeenKey.js.map +1 -0
  86. package/lib/esm/IdCounter.d.ts +12 -0
  87. package/lib/esm/IdCounter.js +2 -0
  88. package/lib/esm/IdCounter.js.map +1 -0
  89. package/lib/esm/ImmutableErrorKeys.d.ts +1 -0
  90. package/lib/esm/ImmutableErrorKeys.js +2 -0
  91. package/lib/esm/ImmutableErrorKeys.js.map +1 -0
  92. package/lib/esm/ListPlanningParticipant.d.ts +18 -0
  93. package/lib/esm/ListPlanningParticipant.js +2 -0
  94. package/lib/esm/ListPlanningParticipant.js.map +1 -0
  95. package/lib/esm/Participant.d.ts +27 -0
  96. package/lib/esm/Participant.js +2 -0
  97. package/lib/esm/Participant.js.map +1 -0
  98. package/lib/esm/ParticipantRole.d.ts +1 -0
  99. package/lib/esm/ParticipantRole.js +2 -0
  100. package/lib/esm/ParticipantRole.js.map +1 -0
  101. package/lib/esm/ParticipantState.d.ts +1 -0
  102. package/lib/esm/ParticipantState.js +2 -0
  103. package/lib/esm/ParticipantState.js.map +1 -0
  104. package/lib/esm/ParticipantUser.d.ts +27 -0
  105. package/lib/esm/ParticipantUser.js +2 -0
  106. package/lib/esm/ParticipantUser.js.map +1 -0
  107. package/lib/esm/PaymentProviderBase.d.ts +17 -0
  108. package/lib/esm/PaymentProviderBase.js +2 -0
  109. package/lib/esm/PaymentProviderBase.js.map +1 -0
  110. package/lib/esm/PlanCoveragePreparation.d.ts +20 -0
  111. package/lib/esm/PlanCoveragePreparation.js +2 -0
  112. package/lib/esm/PlanCoveragePreparation.js.map +1 -0
  113. package/lib/esm/PlanningParticipantsResult.d.ts +12 -0
  114. package/lib/esm/PlanningParticipantsResult.js +2 -0
  115. package/lib/esm/PlanningParticipantsResult.js.map +1 -0
  116. package/lib/esm/Project.d.ts +27 -1
  117. package/lib/esm/ProjectAnalytics.d.ts +3 -0
  118. package/lib/esm/ProjectAnalytics.js +2 -0
  119. package/lib/esm/ProjectAnalytics.js.map +1 -0
  120. package/lib/esm/ProjectAnalyticsGoogle.d.ts +11 -0
  121. package/lib/esm/ProjectAnalyticsGoogle.js +2 -0
  122. package/lib/esm/ProjectAnalyticsGoogle.js.map +1 -0
  123. package/lib/esm/ProjectAnalyticsInternal.d.ts +3 -0
  124. package/lib/esm/ProjectAnalyticsInternal.js +2 -0
  125. package/lib/esm/ProjectAnalyticsInternal.js.map +1 -0
  126. package/lib/esm/ProjectHead.d.ts +19 -0
  127. package/lib/esm/ProjectHead.js +2 -0
  128. package/lib/esm/ProjectHead.js.map +1 -0
  129. package/lib/esm/ProjectLogin.d.ts +3 -0
  130. package/lib/esm/ProjectLogin.js +2 -0
  131. package/lib/esm/ProjectLogin.js.map +1 -0
  132. package/lib/esm/ProjectPayment.d.ts +7 -0
  133. package/lib/esm/ProjectPayment.js +2 -0
  134. package/lib/esm/ProjectPayment.js.map +1 -0
  135. package/lib/esm/ProjectPwa.d.ts +21 -0
  136. package/lib/esm/ProjectPwa.js +2 -0
  137. package/lib/esm/ProjectPwa.js.map +1 -0
  138. package/lib/esm/ProjectPwaIcon.d.ts +15 -0
  139. package/lib/esm/ProjectPwaIcon.js +2 -0
  140. package/lib/esm/ProjectPwaIcon.js.map +1 -0
  141. package/lib/esm/Publish.d.ts +1 -0
  142. package/lib/esm/RenderContext.d.ts +2 -10
  143. package/lib/esm/Right.d.ts +1 -0
  144. package/lib/esm/Right.js +2 -0
  145. package/lib/esm/Right.js.map +1 -0
  146. package/lib/esm/ScorableParticipant.d.ts +5 -0
  147. package/lib/esm/ScorableParticipant.js +2 -0
  148. package/lib/esm/ScorableParticipant.js.map +1 -0
  149. package/lib/esm/ShiftAutofillResult.d.ts +6 -0
  150. package/lib/esm/ShiftAutofillResult.js +2 -0
  151. package/lib/esm/ShiftAutofillResult.js.map +1 -0
  152. package/lib/esm/ShiftFillCandidate.d.ts +10 -0
  153. package/lib/esm/ShiftFillCandidate.js +2 -0
  154. package/lib/esm/ShiftFillCandidate.js.map +1 -0
  155. package/lib/esm/ShiftFillPolicy.d.ts +8 -0
  156. package/lib/esm/ShiftFillPolicy.js +2 -0
  157. package/lib/esm/ShiftFillPolicy.js.map +1 -0
  158. package/lib/esm/ShiftFillResult.d.ts +11 -0
  159. package/lib/esm/ShiftFillResult.js +2 -0
  160. package/lib/esm/ShiftFillResult.js.map +1 -0
  161. package/lib/esm/ShiftFillTarget.d.ts +10 -0
  162. package/lib/esm/ShiftFillTarget.js +2 -0
  163. package/lib/esm/ShiftFillTarget.js.map +1 -0
  164. package/lib/esm/ShiftReportContextOptions.d.ts +9 -0
  165. package/lib/esm/ShiftReportContextOptions.js +2 -0
  166. package/lib/esm/ShiftReportContextOptions.js.map +1 -0
  167. package/lib/esm/TrackerDailyLimitGroup.d.ts +7 -0
  168. package/lib/esm/TrackerDailyLimitGroup.js +2 -0
  169. package/lib/esm/TrackerDailyLimitGroup.js.map +1 -0
  170. package/lib/esm/TrackerDailyLimitInput.d.ts +8 -0
  171. package/lib/esm/TrackerDailyLimitInput.js +2 -0
  172. package/lib/esm/TrackerDailyLimitInput.js.map +1 -0
  173. package/lib/esm/TrackerStatisticsBucket.d.ts +13 -0
  174. package/lib/esm/TrackerStatisticsBucket.js +2 -0
  175. package/lib/esm/TrackerStatisticsBucket.js.map +1 -0
  176. package/lib/esm/TrackerStatisticsRange.d.ts +6 -0
  177. package/lib/esm/TrackerStatisticsRange.js +2 -0
  178. package/lib/esm/TrackerStatisticsRange.js.map +1 -0
  179. package/lib/esm/TrackerTimeSum.d.ts +4 -0
  180. package/lib/esm/TrackerTimeSum.js +2 -0
  181. package/lib/esm/TrackerTimeSum.js.map +1 -0
  182. package/lib/esm/VerifyTokenOptions.d.ts +8 -0
  183. package/lib/esm/VerifyTokenOptions.js +2 -0
  184. package/lib/esm/VerifyTokenOptions.js.map +1 -0
  185. package/lib/esm/WorkingAuth.d.ts +3 -0
  186. package/lib/esm/WorkingAuth.js +2 -0
  187. package/lib/esm/WorkingAuth.js.map +1 -0
  188. package/lib/esm/WorkingAuthAuth0.d.ts +7 -0
  189. package/lib/esm/WorkingAuthAuth0.js +2 -0
  190. package/lib/esm/WorkingAuthAuth0.js.map +1 -0
  191. package/lib/esm/WorkingAuthKeycloak.d.ts +7 -0
  192. package/lib/esm/WorkingAuthKeycloak.js +2 -0
  193. package/lib/esm/WorkingAuthKeycloak.js.map +1 -0
  194. package/lib/esm/WorkingContext.d.ts +52 -0
  195. package/lib/esm/WorkingContext.js +2 -0
  196. package/lib/esm/WorkingContext.js.map +1 -0
  197. package/lib/esm/index.d.ts +46 -0
  198. package/package.json +1 -1
  199. package/src/AccessLimitDoc.ts +6 -0
  200. package/src/Auth0ProjectSettings.ts +7 -1
  201. package/src/Cart.ts +3 -0
  202. package/src/CategoryBookedTime.ts +5 -0
  203. package/src/ConversationResponse.ts +5 -0
  204. package/src/CoverageAllocation.ts +8 -0
  205. package/src/Endpoints.ts +26 -0
  206. package/src/Environment.ts +23 -0
  207. package/src/EnvironmentAuth.ts +7 -0
  208. package/src/EnvironmentAuthKeycloak.ts +24 -0
  209. package/src/FrontendProject.ts +19 -0
  210. package/src/HistorySeenKey.ts +7 -0
  211. package/src/IdCounter.ts +13 -0
  212. package/src/ImmutableErrorKeys.ts +1 -0
  213. package/src/ListPlanningParticipant.ts +19 -0
  214. package/src/Participant.ts +28 -0
  215. package/src/ParticipantRole.ts +1 -0
  216. package/src/ParticipantState.ts +1 -0
  217. package/src/ParticipantUser.ts +28 -0
  218. package/src/PaymentProviderBase.ts +22 -0
  219. package/src/PlanCoveragePreparation.ts +21 -0
  220. package/src/PlanningParticipantsResult.ts +13 -0
  221. package/src/Project.ts +34 -1
  222. package/src/ProjectAnalytics.ts +4 -0
  223. package/src/ProjectAnalyticsGoogle.ts +15 -0
  224. package/src/ProjectAnalyticsInternal.ts +5 -0
  225. package/src/ProjectHead.ts +25 -0
  226. package/src/ProjectLogin.ts +5 -0
  227. package/src/ProjectPayment.ts +10 -0
  228. package/src/ProjectPwa.ts +36 -0
  229. package/src/ProjectPwaIcon.ts +20 -0
  230. package/src/Publish.ts +1 -0
  231. package/src/RenderContext.ts +2 -10
  232. package/src/Right.ts +1 -0
  233. package/src/ScorableParticipant.ts +6 -0
  234. package/src/ShiftAutofillResult.ts +7 -0
  235. package/src/ShiftFillCandidate.ts +11 -0
  236. package/src/ShiftFillPolicy.ts +8 -0
  237. package/src/ShiftFillResult.ts +12 -0
  238. package/src/ShiftFillTarget.ts +11 -0
  239. package/src/ShiftReportContextOptions.ts +10 -0
  240. package/src/TrackerDailyLimitGroup.ts +7 -0
  241. package/src/TrackerDailyLimitInput.ts +8 -0
  242. package/src/TrackerStatisticsBucket.ts +13 -0
  243. package/src/TrackerStatisticsRange.ts +6 -0
  244. package/src/TrackerTimeSum.ts +4 -0
  245. package/src/VerifyTokenOptions.ts +8 -0
  246. package/src/WorkingAuth.ts +4 -0
  247. package/src/WorkingAuthAuth0.ts +6 -0
  248. package/src/WorkingAuthKeycloak.ts +6 -0
  249. package/src/WorkingContext.ts +64 -0
@@ -0,0 +1,36 @@
1
+ import { ProjectPwaIcon } from "./ProjectPwaIcon"
2
+
3
+ export interface ProjectPwa {
4
+
5
+ /**
6
+ * the web app manifest's `name` - the install name, not the app identifier.
7
+ */
8
+ name: string
9
+
10
+ shortName?: string
11
+
12
+ description?: string
13
+
14
+ themeColor?: string
15
+
16
+ backgroundColor?: string
17
+
18
+ display?: 'fullscreen' | 'standalone' | 'minimal-ui' | 'browser'
19
+
20
+ orientation?: 'any' | 'natural' | 'landscape' | 'landscape-primary' | 'landscape-secondary'
21
+ | 'portrait' | 'portrait-primary' | 'portrait-secondary'
22
+
23
+ startUrl?: string
24
+
25
+ scope?: string
26
+
27
+ /**
28
+ * the manifest `id`. usually `/` or a stable path that identifies the app.
29
+ */
30
+ id?: string
31
+
32
+ categories?: string[]
33
+
34
+ icons?: ProjectPwaIcon[]
35
+
36
+ }
@@ -0,0 +1,20 @@
1
+ export interface ProjectPwaIcon {
2
+
3
+ /**
4
+ * path to the icon file, relative to the app origin or absolute.
5
+ */
6
+ src: string
7
+
8
+ /**
9
+ * space separated list, e.g. `192x192` or `any`.
10
+ */
11
+ sizes: string
12
+
13
+ type?: string
14
+
15
+ /**
16
+ * space separated list of `any`, `maskable` or `monochrome`.
17
+ */
18
+ purpose?: string
19
+
20
+ }
package/src/Publish.ts CHANGED
@@ -46,5 +46,6 @@ export interface Publish {
46
46
 
47
47
  relatedData?: {
48
48
  list?: ObjectId
49
+ cart?: ObjectId
49
50
  }
50
51
  }
@@ -1,16 +1,8 @@
1
- import {Content} from './Content';
1
+ import {WorkingContext} from './WorkingContext';
2
2
 
3
- export interface RenderContext {
3
+ export interface RenderContext extends WorkingContext {
4
4
  url?: string
5
- data?: Content
6
- layout?: Content
7
5
  title?: string
8
6
  description?: string
9
- settings?: Record<string, unknown>
10
7
  translation?: Record<string, string>
11
- tags?: string[]
12
- app?: string
13
- css?: string
14
- cdn?: string
15
- renderTarget?: 'pdf' | 'web'
16
8
  }
package/src/Right.ts ADDED
@@ -0,0 +1 @@
1
+ export type Right = 'read' | 'write' | 'edit' | 'delete' | 'files' | 'rename' | 'participants' | 'block';
@@ -0,0 +1,6 @@
1
+ import type { WithStructures } from './WithStructures';
2
+
3
+ /** Shift and list participants both carry s-* answers, their own structures and the customer's. */
4
+ export interface ScorableParticipant extends WithStructures {
5
+ user?: WithStructures;
6
+ }
@@ -0,0 +1,7 @@
1
+ import type { ObjectId } from 'mongodb';
2
+
3
+ export interface ShiftAutofillResult {
4
+ shift: ObjectId;
5
+ /** Assignments anchor list entries rather than customer records. */
6
+ users: ObjectId[];
7
+ }
@@ -0,0 +1,11 @@
1
+ import type { ObjectId } from 'mongodb';
2
+ import type { ShiftAssignmentBreak } from './ShiftAssignmentBreak';
3
+
4
+ export interface ShiftFillCandidate {
5
+ participant: ObjectId;
6
+ customer: ObjectId;
7
+ /** The candidate fulfils the shift's required/forbidden constraints. */
8
+ matching: boolean;
9
+ /** Absolute break times to carry into the assignment; coverage leaves them to the planner. */
10
+ breaks?: ShiftAssignmentBreak[];
11
+ }
@@ -0,0 +1,8 @@
1
+ export interface ShiftFillPolicy {
2
+ /** Use matching people as the target instead of total staffing headcount. */
3
+ matchingGate: boolean;
4
+ /** Treat break-rule violations as blocking; coverage leaves breaks to the planner. */
5
+ breaksBlocking: boolean;
6
+ /** Stop at the first shift that cannot be filled. */
7
+ stopOnUnfillable: boolean;
8
+ }
@@ -0,0 +1,12 @@
1
+ import type { WithId } from 'mongodb';
2
+ import type { Shift } from './Shift';
3
+ import type { ShiftCoverage } from './ShiftCoverage';
4
+
5
+ export interface ShiftFillResult {
6
+ coverage: ShiftCoverage[];
7
+ fillable: boolean;
8
+ /** False when stop-on-unfillable ended the run before every target was evaluated. */
9
+ complete: boolean;
10
+ /** The targets after allocation; unchanged shifts keep their persisted assignments. */
11
+ shifts: WithId<Shift>[];
12
+ }
@@ -0,0 +1,11 @@
1
+ import type { WithId } from 'mongodb';
2
+ import type { Shift } from './Shift';
3
+ import type { StructureCondition } from './StructureCondition';
4
+ import type { ShiftFillCandidate } from './ShiftFillCandidate';
5
+
6
+ export interface ShiftFillTarget {
7
+ shift: WithId<Shift>;
8
+ conditions: StructureCondition[];
9
+ /** Ranked pool; unfit candidates are last but may still fill a shift as a fallback. */
10
+ candidates: ShiftFillCandidate[];
11
+ }
@@ -0,0 +1,10 @@
1
+ import type { ObjectId, WithId } from 'mongodb';
2
+ import type { Shift } from './Shift';
3
+ import type { PlanCoveragePreparation } from './PlanCoveragePreparation';
4
+
5
+ export interface ShiftReportContextOptions {
6
+ replacement?: WithId<Shift>;
7
+ plan?: ObjectId;
8
+ schedules?: WithId<Shift>[];
9
+ preparation?: PlanCoveragePreparation;
10
+ }
@@ -0,0 +1,7 @@
1
+ /** the entries of one plan, person and calendar day, summed up for the daily limit */
2
+ export interface TrackerDailyLimitGroup {
3
+ timeTrackingProject?: string;
4
+ customer?: string;
5
+ startTime: Date;
6
+ duration: number;
7
+ }
@@ -0,0 +1,8 @@
1
+ export interface TrackerDailyLimitInput {
2
+ timeTrackingProject?: string;
3
+ startTime?: Date | string;
4
+ endTime?: Date | string;
5
+ currentTime?: number;
6
+ /** the person an admin booked the entry for, the limit then counts that person instead of the admin */
7
+ customer?: string;
8
+ }
@@ -0,0 +1,13 @@
1
+ /** the entries of one day and one group, summed up by the statistics aggregation */
2
+ export interface TrackerStatisticsBucket {
3
+ _id: {
4
+ /** `YYYY-MM-DD`, absent for an entry without a start */
5
+ day?: string | null;
6
+ /** the shift of a shift booking, the category otherwise; absent when an entry has neither */
7
+ group?: string | null;
8
+ };
9
+ count: number;
10
+ time: number;
11
+ first?: Date | null;
12
+ last?: Date | null;
13
+ }
@@ -0,0 +1,6 @@
1
+ export interface TrackerStatisticsRange {
2
+ month?: number;
3
+ year?: number;
4
+ /** ignores month and year, the statistics then span every entry of the plan */
5
+ wholePlan?: boolean;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface TrackerTimeSum {
2
+ _id: null;
3
+ time: number;
4
+ }
@@ -0,0 +1,8 @@
1
+ export interface VerifyTokenOptions {
2
+ /** JWKS endpoint. Defaults to process.env.JWT_URL. */
3
+ jwksUri?: string;
4
+ /** expected issuer. Defaults to process.env.JWT_ISSUER. Skipped if unset. */
5
+ issuer?: string;
6
+ /** expected audience. Skipped if unset. */
7
+ audience?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ import type { WorkingAuthAuth0 } from './WorkingAuthAuth0';
2
+ import type { WorkingAuthKeycloak } from './WorkingAuthKeycloak';
3
+
4
+ export type WorkingAuth = WorkingAuthKeycloak | WorkingAuthAuth0;
@@ -0,0 +1,6 @@
1
+ import type { Auth0ProjectSettings } from './Auth0ProjectSettings';
2
+
3
+ /**
4
+ * auth0 settings the frontend needs to log in, taken from the project settings.
5
+ */
6
+ export type WorkingAuthAuth0 = Pick<Auth0ProjectSettings, 'domain' | 'clientId' | 'audience'> & { provider: 'auth0' };
@@ -0,0 +1,6 @@
1
+ import type { EnvironmentAuthKeycloak } from './EnvironmentAuthKeycloak';
2
+
3
+ /**
4
+ * keycloak settings the frontend needs to log in, taken from the environment.
5
+ */
6
+ export type WorkingAuthKeycloak = Pick<EnvironmentAuthKeycloak, 'url' | 'realm' | 'clientId'> & { provider: 'keycloak' };
@@ -0,0 +1,64 @@
1
+ import type { AppEditorConfiguration } from './AppEditorConfiguration';
2
+ import type { Cart } from './Cart';
3
+ import type { Content } from './Content';
4
+ import type { Customers } from './Customers';
5
+ import type { Endpoints } from './Endpoints';
6
+ import type { FrontendProject } from './FrontendProject';
7
+ import type { List } from './List';
8
+ import type { WorkingAuth } from './WorkingAuth';
9
+
10
+ /**
11
+ * the context every render and the frontend share. the project and environment settings are flat on it.
12
+ * the per render fields (content, layout, contextContent, recipient, list, cart) only exist during a server render.
13
+ */
14
+ export interface WorkingContext extends FrontendProject {
15
+
16
+ /**
17
+ * the endpoints of the environment the project is rendered in.
18
+ */
19
+ endpoints: Endpoints
20
+
21
+ /**
22
+ * only set when the project has login enabled, the provider decides where the settings come from.
23
+ */
24
+ auth?: WorkingAuth
25
+
26
+ /**
27
+ * the content that is rendered, only set for a single render.
28
+ */
29
+ content?: Content
30
+
31
+ layout?: Content
32
+
33
+ /**
34
+ * additional content selected in the publish method, e.g. for variables in the rendered content.
35
+ */
36
+ contextContent?: Content[]
37
+
38
+ /**
39
+ * the recipient of a mail or pdf publish.
40
+ */
41
+ recipient?: Customers
42
+
43
+ /**
44
+ * the list a publish was started for.
45
+ */
46
+ list?: List
47
+
48
+ /**
49
+ * the cart a payment-driven publish was started for.
50
+ */
51
+ cart?: Cart
52
+
53
+ /**
54
+ * editor settings without `editorUrl`, which only the studio editor needs.
55
+ */
56
+ editor?: Omit<AppEditorConfiguration, 'editorUrl'>
57
+
58
+ tags?: string[]
59
+ app?: string
60
+ css?: string
61
+ cdn?: string
62
+ renderTarget?: 'pdf' | 'web'
63
+
64
+ }