@lilaquadrat/interfaces 1.57.0 → 2.1.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 +20 -0
- package/lib/cjs/AccessLimitDoc.d.ts +12 -0
- package/lib/cjs/Auth0ProjectSettings.d.ts +4 -0
- package/lib/cjs/Cart.d.ts +2 -0
- package/lib/cjs/CategoryBookedTime.d.ts +5 -0
- package/lib/cjs/ConversationResponse.d.ts +6 -0
- package/lib/cjs/CoverageAllocation.d.ts +7 -0
- package/lib/cjs/Design.d.ts +3 -0
- package/lib/cjs/DesignInput.d.ts +12 -0
- package/lib/cjs/DesignListOptions.d.ts +12 -0
- package/lib/cjs/Endpoints.d.ts +21 -0
- package/lib/cjs/Environment.d.ts +18 -0
- package/lib/cjs/EnvironmentAuth.d.ts +6 -0
- package/lib/cjs/EnvironmentAuthKeycloak.d.ts +19 -0
- package/lib/cjs/FrontendProject.d.ts +15 -0
- package/lib/cjs/HistorySeenKey.d.ts +7 -0
- package/lib/cjs/IdCounter.d.ts +12 -0
- package/lib/cjs/ImmutableErrorKeys.d.ts +1 -0
- package/lib/cjs/ListPlanningParticipant.d.ts +18 -0
- package/lib/cjs/Participant.d.ts +27 -0
- package/lib/cjs/ParticipantRole.d.ts +1 -0
- package/lib/cjs/ParticipantState.d.ts +1 -0
- package/lib/cjs/ParticipantUser.d.ts +27 -0
- package/lib/cjs/PaymentProviderBase.d.ts +17 -0
- package/lib/cjs/PlanCoveragePreparation.d.ts +20 -0
- package/lib/cjs/PlanningParticipantsResult.d.ts +12 -0
- package/lib/cjs/Project.d.ts +32 -1
- package/lib/cjs/ProjectAnalytics.d.ts +3 -0
- package/lib/cjs/ProjectAnalyticsGoogle.d.ts +11 -0
- package/lib/cjs/ProjectAnalyticsInternal.d.ts +3 -0
- package/lib/cjs/ProjectDesign.d.ts +5 -0
- package/lib/cjs/ProjectHead.d.ts +19 -0
- package/lib/cjs/ProjectLogin.d.ts +3 -0
- package/lib/cjs/ProjectPayment.d.ts +7 -0
- package/lib/cjs/ProjectPwa.d.ts +21 -0
- package/lib/cjs/ProjectPwaIcon.d.ts +15 -0
- package/lib/cjs/Publish.d.ts +1 -0
- package/lib/cjs/RenderContext.d.ts +2 -10
- package/lib/cjs/Right.d.ts +1 -0
- package/lib/cjs/ScorableParticipant.d.ts +5 -0
- package/lib/cjs/ShiftAutofillResult.d.ts +6 -0
- package/lib/cjs/ShiftFillCandidate.d.ts +10 -0
- package/lib/cjs/ShiftFillPolicy.d.ts +8 -0
- package/lib/cjs/ShiftFillResult.d.ts +11 -0
- package/lib/cjs/ShiftFillTarget.d.ts +10 -0
- package/lib/cjs/ShiftReportContextOptions.d.ts +9 -0
- package/lib/cjs/TrackerDailyLimitGroup.d.ts +7 -0
- package/lib/cjs/TrackerDailyLimitInput.d.ts +8 -0
- package/lib/cjs/TrackerStatisticsBucket.d.ts +13 -0
- package/lib/cjs/TrackerStatisticsRange.d.ts +6 -0
- package/lib/cjs/TrackerTimeSum.d.ts +4 -0
- package/lib/cjs/VerifyTokenOptions.d.ts +8 -0
- package/lib/cjs/WorkingAuth.d.ts +3 -0
- package/lib/cjs/WorkingAuthAuth0.d.ts +7 -0
- package/lib/cjs/WorkingAuthKeycloak.d.ts +7 -0
- package/lib/cjs/WorkingContext.d.ts +52 -0
- package/lib/cjs/index.d.ts +49 -0
- package/lib/esm/AccessLimitDoc.d.ts +12 -0
- package/lib/esm/AccessLimitDoc.js +2 -0
- package/lib/esm/AccessLimitDoc.js.map +1 -0
- package/lib/esm/Auth0ProjectSettings.d.ts +4 -0
- package/lib/esm/Cart.d.ts +2 -0
- package/lib/esm/CategoryBookedTime.d.ts +5 -0
- package/lib/esm/CategoryBookedTime.js +2 -0
- package/lib/esm/CategoryBookedTime.js.map +1 -0
- package/lib/esm/ConversationResponse.d.ts +6 -0
- package/lib/esm/ConversationResponse.js +2 -0
- package/lib/esm/ConversationResponse.js.map +1 -0
- package/lib/esm/CoverageAllocation.d.ts +7 -0
- package/lib/esm/CoverageAllocation.js +2 -0
- package/lib/esm/CoverageAllocation.js.map +1 -0
- package/lib/esm/Design.d.ts +3 -0
- package/lib/esm/DesignInput.d.ts +12 -0
- package/lib/esm/DesignInput.js +2 -0
- package/lib/esm/DesignInput.js.map +1 -0
- package/lib/esm/DesignListOptions.d.ts +12 -0
- package/lib/esm/DesignListOptions.js +2 -0
- package/lib/esm/DesignListOptions.js.map +1 -0
- package/lib/esm/Endpoints.d.ts +21 -0
- package/lib/esm/Endpoints.js +2 -0
- package/lib/esm/Endpoints.js.map +1 -0
- package/lib/esm/Environment.d.ts +18 -0
- package/lib/esm/Environment.js +2 -0
- package/lib/esm/Environment.js.map +1 -0
- package/lib/esm/EnvironmentAuth.d.ts +6 -0
- package/lib/esm/EnvironmentAuth.js +2 -0
- package/lib/esm/EnvironmentAuth.js.map +1 -0
- package/lib/esm/EnvironmentAuthKeycloak.d.ts +19 -0
- package/lib/esm/EnvironmentAuthKeycloak.js +2 -0
- package/lib/esm/EnvironmentAuthKeycloak.js.map +1 -0
- package/lib/esm/FrontendProject.d.ts +15 -0
- package/lib/esm/FrontendProject.js +2 -0
- package/lib/esm/FrontendProject.js.map +1 -0
- package/lib/esm/HistorySeenKey.d.ts +7 -0
- package/lib/esm/HistorySeenKey.js +2 -0
- package/lib/esm/HistorySeenKey.js.map +1 -0
- package/lib/esm/IdCounter.d.ts +12 -0
- package/lib/esm/IdCounter.js +2 -0
- package/lib/esm/IdCounter.js.map +1 -0
- package/lib/esm/ImmutableErrorKeys.d.ts +1 -0
- package/lib/esm/ImmutableErrorKeys.js +2 -0
- package/lib/esm/ImmutableErrorKeys.js.map +1 -0
- package/lib/esm/ListPlanningParticipant.d.ts +18 -0
- package/lib/esm/ListPlanningParticipant.js +2 -0
- package/lib/esm/ListPlanningParticipant.js.map +1 -0
- package/lib/esm/Participant.d.ts +27 -0
- package/lib/esm/Participant.js +2 -0
- package/lib/esm/Participant.js.map +1 -0
- package/lib/esm/ParticipantRole.d.ts +1 -0
- package/lib/esm/ParticipantRole.js +2 -0
- package/lib/esm/ParticipantRole.js.map +1 -0
- package/lib/esm/ParticipantState.d.ts +1 -0
- package/lib/esm/ParticipantState.js +2 -0
- package/lib/esm/ParticipantState.js.map +1 -0
- package/lib/esm/ParticipantUser.d.ts +27 -0
- package/lib/esm/ParticipantUser.js +2 -0
- package/lib/esm/ParticipantUser.js.map +1 -0
- package/lib/esm/PaymentProviderBase.d.ts +17 -0
- package/lib/esm/PaymentProviderBase.js +2 -0
- package/lib/esm/PaymentProviderBase.js.map +1 -0
- package/lib/esm/PlanCoveragePreparation.d.ts +20 -0
- package/lib/esm/PlanCoveragePreparation.js +2 -0
- package/lib/esm/PlanCoveragePreparation.js.map +1 -0
- package/lib/esm/PlanningParticipantsResult.d.ts +12 -0
- package/lib/esm/PlanningParticipantsResult.js +2 -0
- package/lib/esm/PlanningParticipantsResult.js.map +1 -0
- package/lib/esm/Project.d.ts +32 -1
- package/lib/esm/ProjectAnalytics.d.ts +3 -0
- package/lib/esm/ProjectAnalytics.js +2 -0
- package/lib/esm/ProjectAnalytics.js.map +1 -0
- package/lib/esm/ProjectAnalyticsGoogle.d.ts +11 -0
- package/lib/esm/ProjectAnalyticsGoogle.js +2 -0
- package/lib/esm/ProjectAnalyticsGoogle.js.map +1 -0
- package/lib/esm/ProjectAnalyticsInternal.d.ts +3 -0
- package/lib/esm/ProjectAnalyticsInternal.js +2 -0
- package/lib/esm/ProjectAnalyticsInternal.js.map +1 -0
- package/lib/esm/ProjectDesign.d.ts +5 -0
- package/lib/esm/ProjectDesign.js +2 -0
- package/lib/esm/ProjectDesign.js.map +1 -0
- package/lib/esm/ProjectHead.d.ts +19 -0
- package/lib/esm/ProjectHead.js +2 -0
- package/lib/esm/ProjectHead.js.map +1 -0
- package/lib/esm/ProjectLogin.d.ts +3 -0
- package/lib/esm/ProjectLogin.js +2 -0
- package/lib/esm/ProjectLogin.js.map +1 -0
- package/lib/esm/ProjectPayment.d.ts +7 -0
- package/lib/esm/ProjectPayment.js +2 -0
- package/lib/esm/ProjectPayment.js.map +1 -0
- package/lib/esm/ProjectPwa.d.ts +21 -0
- package/lib/esm/ProjectPwa.js +2 -0
- package/lib/esm/ProjectPwa.js.map +1 -0
- package/lib/esm/ProjectPwaIcon.d.ts +15 -0
- package/lib/esm/ProjectPwaIcon.js +2 -0
- package/lib/esm/ProjectPwaIcon.js.map +1 -0
- package/lib/esm/Publish.d.ts +1 -0
- package/lib/esm/RenderContext.d.ts +2 -10
- package/lib/esm/Right.d.ts +1 -0
- package/lib/esm/Right.js +2 -0
- package/lib/esm/Right.js.map +1 -0
- package/lib/esm/ScorableParticipant.d.ts +5 -0
- package/lib/esm/ScorableParticipant.js +2 -0
- package/lib/esm/ScorableParticipant.js.map +1 -0
- package/lib/esm/ShiftAutofillResult.d.ts +6 -0
- package/lib/esm/ShiftAutofillResult.js +2 -0
- package/lib/esm/ShiftAutofillResult.js.map +1 -0
- package/lib/esm/ShiftFillCandidate.d.ts +10 -0
- package/lib/esm/ShiftFillCandidate.js +2 -0
- package/lib/esm/ShiftFillCandidate.js.map +1 -0
- package/lib/esm/ShiftFillPolicy.d.ts +8 -0
- package/lib/esm/ShiftFillPolicy.js +2 -0
- package/lib/esm/ShiftFillPolicy.js.map +1 -0
- package/lib/esm/ShiftFillResult.d.ts +11 -0
- package/lib/esm/ShiftFillResult.js +2 -0
- package/lib/esm/ShiftFillResult.js.map +1 -0
- package/lib/esm/ShiftFillTarget.d.ts +10 -0
- package/lib/esm/ShiftFillTarget.js +2 -0
- package/lib/esm/ShiftFillTarget.js.map +1 -0
- package/lib/esm/ShiftReportContextOptions.d.ts +9 -0
- package/lib/esm/ShiftReportContextOptions.js +2 -0
- package/lib/esm/ShiftReportContextOptions.js.map +1 -0
- package/lib/esm/TrackerDailyLimitGroup.d.ts +7 -0
- package/lib/esm/TrackerDailyLimitGroup.js +2 -0
- package/lib/esm/TrackerDailyLimitGroup.js.map +1 -0
- package/lib/esm/TrackerDailyLimitInput.d.ts +8 -0
- package/lib/esm/TrackerDailyLimitInput.js +2 -0
- package/lib/esm/TrackerDailyLimitInput.js.map +1 -0
- package/lib/esm/TrackerStatisticsBucket.d.ts +13 -0
- package/lib/esm/TrackerStatisticsBucket.js +2 -0
- package/lib/esm/TrackerStatisticsBucket.js.map +1 -0
- package/lib/esm/TrackerStatisticsRange.d.ts +6 -0
- package/lib/esm/TrackerStatisticsRange.js +2 -0
- package/lib/esm/TrackerStatisticsRange.js.map +1 -0
- package/lib/esm/TrackerTimeSum.d.ts +4 -0
- package/lib/esm/TrackerTimeSum.js +2 -0
- package/lib/esm/TrackerTimeSum.js.map +1 -0
- package/lib/esm/VerifyTokenOptions.d.ts +8 -0
- package/lib/esm/VerifyTokenOptions.js +2 -0
- package/lib/esm/VerifyTokenOptions.js.map +1 -0
- package/lib/esm/WorkingAuth.d.ts +3 -0
- package/lib/esm/WorkingAuth.js +2 -0
- package/lib/esm/WorkingAuth.js.map +1 -0
- package/lib/esm/WorkingAuthAuth0.d.ts +7 -0
- package/lib/esm/WorkingAuthAuth0.js +2 -0
- package/lib/esm/WorkingAuthAuth0.js.map +1 -0
- package/lib/esm/WorkingAuthKeycloak.d.ts +7 -0
- package/lib/esm/WorkingAuthKeycloak.js +2 -0
- package/lib/esm/WorkingAuthKeycloak.js.map +1 -0
- package/lib/esm/WorkingContext.d.ts +52 -0
- package/lib/esm/WorkingContext.js +2 -0
- package/lib/esm/WorkingContext.js.map +1 -0
- package/lib/esm/index.d.ts +49 -0
- package/package.json +1 -1
- package/src/AccessLimitDoc.ts +6 -0
- package/src/Auth0ProjectSettings.ts +7 -1
- package/src/Cart.ts +3 -0
- package/src/CategoryBookedTime.ts +5 -0
- package/src/ConversationResponse.ts +5 -0
- package/src/CoverageAllocation.ts +8 -0
- package/src/Design.ts +4 -1
- package/src/DesignInput.ts +13 -0
- package/src/DesignListOptions.ts +12 -0
- package/src/Endpoints.ts +26 -0
- package/src/Environment.ts +23 -0
- package/src/EnvironmentAuth.ts +7 -0
- package/src/EnvironmentAuthKeycloak.ts +24 -0
- package/src/FrontendProject.ts +19 -0
- package/src/HistorySeenKey.ts +7 -0
- package/src/IdCounter.ts +13 -0
- package/src/ImmutableErrorKeys.ts +1 -0
- package/src/ListPlanningParticipant.ts +19 -0
- package/src/Participant.ts +28 -0
- package/src/ParticipantRole.ts +1 -0
- package/src/ParticipantState.ts +1 -0
- package/src/ParticipantUser.ts +28 -0
- package/src/PaymentProviderBase.ts +22 -0
- package/src/PlanCoveragePreparation.ts +21 -0
- package/src/PlanningParticipantsResult.ts +13 -0
- package/src/Project.ts +40 -1
- package/src/ProjectAnalytics.ts +4 -0
- package/src/ProjectAnalyticsGoogle.ts +15 -0
- package/src/ProjectAnalyticsInternal.ts +5 -0
- package/src/ProjectDesign.ts +5 -0
- package/src/ProjectHead.ts +25 -0
- package/src/ProjectLogin.ts +5 -0
- package/src/ProjectPayment.ts +10 -0
- package/src/ProjectPwa.ts +36 -0
- package/src/ProjectPwaIcon.ts +20 -0
- package/src/Publish.ts +1 -0
- package/src/RenderContext.ts +2 -10
- package/src/Right.ts +1 -0
- package/src/ScorableParticipant.ts +6 -0
- package/src/ShiftAutofillResult.ts +7 -0
- package/src/ShiftFillCandidate.ts +11 -0
- package/src/ShiftFillPolicy.ts +8 -0
- package/src/ShiftFillResult.ts +12 -0
- package/src/ShiftFillTarget.ts +11 -0
- package/src/ShiftReportContextOptions.ts +10 -0
- package/src/TrackerDailyLimitGroup.ts +7 -0
- package/src/TrackerDailyLimitInput.ts +8 -0
- package/src/TrackerStatisticsBucket.ts +13 -0
- package/src/TrackerStatisticsRange.ts +6 -0
- package/src/TrackerTimeSum.ts +4 -0
- package/src/VerifyTokenOptions.ts +8 -0
- package/src/WorkingAuth.ts +4 -0
- package/src/WorkingAuthAuth0.ts +6 -0
- package/src/WorkingAuthKeycloak.ts +6 -0
- package/src/WorkingContext.ts +64 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.1.0](https://github.com/lilaquadrat/interfaces/compare/v2.0.0...v2.1.0) (2026-11-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **design:** address designs by id and name ([80c900d](https://github.com/lilaquadrat/interfaces/commit/80c900d7efec0fb24b3efc658c70545588e76423))
|
|
11
|
+
|
|
12
|
+
## [2.0.0](https://github.com/lilaquadrat/interfaces/compare/v1.57.0...v2.0.0) (2026-11-09)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ⚠ BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* **interfaces:** Project.license is now string[] and Project.id is required;
|
|
18
|
+
RenderContext now extends WorkingContext, so its endpoint, project and the
|
|
19
|
+
per-render fields moved to the shared base.
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **interfaces:** add shared studio types and environment, project and render contracts ([6a3aaa5](https://github.com/lilaquadrat/interfaces/commit/6a3aaa5e073de00ca14dee8e10f0f6eeb7b2ddfb))
|
|
24
|
+
|
|
5
25
|
## [1.57.0](https://github.com/lilaquadrat/interfaces/compare/v1.56.0...v1.57.0) (2026-10-29)
|
|
6
26
|
|
|
7
27
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export interface Auth0ProjectSettings {
|
|
2
2
|
domain?: string;
|
|
3
|
+
/** public client id of the auth0 SPA application, not a secret */
|
|
4
|
+
clientId?: string;
|
|
5
|
+
/** only needed when the login requests tokens for a custom api; the other auth0 client options are derived at render time and deliberately not stored */
|
|
6
|
+
audience?: string;
|
|
3
7
|
}
|
package/lib/cjs/Cart.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Conversation } from './Conversation';
|
|
2
|
+
import type { ParticipantUser } from './ParticipantUser';
|
|
3
|
+
/** A Conversation as sent to clients: participants enriched from ids to objects. */
|
|
4
|
+
export type ConversationResponse = Omit<Conversation, 'participants'> & {
|
|
5
|
+
participants?: ParticipantUser[];
|
|
6
|
+
};
|
package/lib/cjs/Design.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DesignFile } from "./DesignFile";
|
|
2
|
+
/**
|
|
3
|
+
* writes a design into the caller's project; a project's first design falls back to
|
|
4
|
+
* the `default` id and name, so both stay optional
|
|
5
|
+
*/
|
|
6
|
+
export interface DesignInput {
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
target: 'app' | 'server';
|
|
11
|
+
files: DesignFile[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* one page of the designs a project may pick from: its own plus the shared library
|
|
3
|
+
*/
|
|
4
|
+
export interface DesignListOptions {
|
|
5
|
+
company: string;
|
|
6
|
+
project: string;
|
|
7
|
+
search?: string;
|
|
8
|
+
sort?: string;
|
|
9
|
+
order?: number;
|
|
10
|
+
site: number;
|
|
11
|
+
limit: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* the endpoints every environment provides and every project in it shares.
|
|
3
|
+
*/
|
|
4
|
+
export interface Endpoints {
|
|
5
|
+
/**
|
|
6
|
+
* base url of the studio api.
|
|
7
|
+
*/
|
|
8
|
+
api: string;
|
|
9
|
+
/**
|
|
10
|
+
* base url of the media api.
|
|
11
|
+
*/
|
|
12
|
+
media: string;
|
|
13
|
+
/**
|
|
14
|
+
* publicly reachable cdn base for assets.
|
|
15
|
+
*/
|
|
16
|
+
cdn: string;
|
|
17
|
+
/**
|
|
18
|
+
* cdn base for access protected files.
|
|
19
|
+
*/
|
|
20
|
+
secure: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Endpoints } from "./Endpoints";
|
|
2
|
+
import { EnvironmentAuth } from "./EnvironmentAuth";
|
|
3
|
+
/**
|
|
4
|
+
* an environment is the deployment context a project is rendered in. it owns
|
|
5
|
+
* the endpoints every project in that environment shares, so a project config
|
|
6
|
+
* never has to repeat them.
|
|
7
|
+
*/
|
|
8
|
+
export interface Environment {
|
|
9
|
+
/**
|
|
10
|
+
* stable identifier of the environment, e.g. `local`, `next` or `live`.
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
endpoints: Endpoints;
|
|
14
|
+
/**
|
|
15
|
+
* authentication provider every project in the environment shares.
|
|
16
|
+
*/
|
|
17
|
+
auth?: EnvironmentAuth;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* self hosted keycloak as the authentication provider of an environment.
|
|
3
|
+
*/
|
|
4
|
+
export interface EnvironmentAuthKeycloak {
|
|
5
|
+
type: 'keycloak';
|
|
6
|
+
/**
|
|
7
|
+
* base url of the keycloak server, e.g. `https://auth.lilaquadrat.dev`.
|
|
8
|
+
*/
|
|
9
|
+
url: string;
|
|
10
|
+
/**
|
|
11
|
+
* keycloak realm, e.g. `studio`.
|
|
12
|
+
*/
|
|
13
|
+
realm: string;
|
|
14
|
+
/**
|
|
15
|
+
* public client id used by the browser. shared by every project in the
|
|
16
|
+
* environment unless a project overrides it.
|
|
17
|
+
*/
|
|
18
|
+
clientId: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Project } from './Project';
|
|
2
|
+
/**
|
|
3
|
+
* the project settings the frontend may see. secrets, publish data and
|
|
4
|
+
* ai prompt settings are left out on purpose.
|
|
5
|
+
*/
|
|
6
|
+
export type FrontendProject = Pick<Project, 'company' | 'dynamic' | 'installable' | 'pwa' | 'login' | 'analytics'> & {
|
|
7
|
+
/**
|
|
8
|
+
* the id of the project, named like the project key on every other document.
|
|
9
|
+
*/
|
|
10
|
+
project: Project['id'];
|
|
11
|
+
/**
|
|
12
|
+
* the active payment provider of the project, named like it is used in the frontend.
|
|
13
|
+
*/
|
|
14
|
+
paymentProvider?: Project['payment'];
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ObjectId } from 'mongodb';
|
|
2
|
+
/** the counter document behind the `id` collection; not to be confused with `Id`, the generic id/data pair */
|
|
3
|
+
export interface IdCounter {
|
|
4
|
+
_id: string;
|
|
5
|
+
company: string;
|
|
6
|
+
project: string;
|
|
7
|
+
model: string;
|
|
8
|
+
app: string;
|
|
9
|
+
count: number;
|
|
10
|
+
initials?: string;
|
|
11
|
+
dynamicKey?: string | number | ObjectId;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ImmutableErrorKeys = 'UPDATE_DOCUMENT_MISSING' | 'PARENT_DOCUMENT_NOT_FOUND' | 'DOCUMENT_ALREADY_EXISTS';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ListParticipantMatch } from './ListParticipantMatch';
|
|
2
|
+
import type { ListParticipants } from './ListParticipants';
|
|
3
|
+
import type { ObjectId } from 'mongodb';
|
|
4
|
+
export interface ListPlanningParticipant {
|
|
5
|
+
_id: ObjectId;
|
|
6
|
+
category?: string;
|
|
7
|
+
state: ListParticipants['state'];
|
|
8
|
+
match: ListParticipantMatch & {
|
|
9
|
+
/** Relative to the full filtered pool; tied-only pools share stage 4. */
|
|
10
|
+
normalizedScore: 1 | 2 | 3 | 4;
|
|
11
|
+
};
|
|
12
|
+
user?: {
|
|
13
|
+
_id: ObjectId;
|
|
14
|
+
id?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
email?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ObjectId } from 'mongodb';
|
|
2
|
+
import type { ParticipantRole } from './ParticipantRole';
|
|
3
|
+
import type { ParticipantState } from './ParticipantState';
|
|
4
|
+
import type { Right } from './Right';
|
|
5
|
+
export interface Participant {
|
|
6
|
+
_id?: ObjectId;
|
|
7
|
+
conversation: ObjectId;
|
|
8
|
+
user: string;
|
|
9
|
+
state: ParticipantState;
|
|
10
|
+
rights: Right[];
|
|
11
|
+
lastReadId?: number;
|
|
12
|
+
latestMessageId?: number;
|
|
13
|
+
/**
|
|
14
|
+
* the participant silenced this conversation for themselves. A pure notification
|
|
15
|
+
* preference — delivery is untouched, muted members still receive every frame, the
|
|
16
|
+
* client just stops making noise about them. Private to the owner of the doc: it is
|
|
17
|
+
* never broadcast to the other participants.
|
|
18
|
+
*/
|
|
19
|
+
muted?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* only set on support conversations, and only for the support team. It is what separates
|
|
22
|
+
* the team from the customer on every read path, so the conversation's own bookkeeping
|
|
23
|
+
* (system messages) can stay internal — see messages.service list().
|
|
24
|
+
*/
|
|
25
|
+
role?: ParticipantRole;
|
|
26
|
+
joinedAt?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ParticipantRole = 'agent';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ParticipantState = 'active' | 'left' | 'removed' | 'blocked' | 'deleted';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ParticipantRole } from './ParticipantRole';
|
|
2
|
+
/**
|
|
3
|
+
* Enriched participant shape returned to clients. Conversations are *stored* with
|
|
4
|
+
* `participants: string[]` (user ids); read/emit paths enrich each id to this object
|
|
5
|
+
* via the `me` collection. Unresolvable ids (e.g. external IdP subs with no `me`
|
|
6
|
+
* record) degrade to just `{ id }` so no participant is ever dropped.
|
|
7
|
+
*/
|
|
8
|
+
export interface ParticipantUser {
|
|
9
|
+
id: string;
|
|
10
|
+
prename?: string;
|
|
11
|
+
lastname?: string;
|
|
12
|
+
/** only included by the staff-authorised support conversation list */
|
|
13
|
+
email?: string;
|
|
14
|
+
/** presence: last proof of life, ISO string. Absent for a user who never connected. */
|
|
15
|
+
lastSeen?: string;
|
|
16
|
+
/** presence: derived from the stored flag AND lastSeen freshness, see presence.service */
|
|
17
|
+
online?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* support conversations only, and only on the paths that carry the roles: the agent-side list
|
|
20
|
+
* pipeline (support-conversations.service) and the `conversation:new` frame. It is what lets a
|
|
21
|
+
* client name the counterpart itself — the customer is the participant whose role is not
|
|
22
|
+
* 'agent'. `null` says "not a member of the support team", which on a pre-f2fdc27 legacy row is
|
|
23
|
+
* every participant, so none of them is distinguishable — see supportCustomer.ts. Absent means
|
|
24
|
+
* the path this object came from does not carry roles at all.
|
|
25
|
+
*/
|
|
26
|
+
role?: ParticipantRole | null;
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { List } from './List';
|
|
2
|
+
import type { ListCategory } from './ListCategory';
|
|
3
|
+
import type { PaymentProvider } from './PaymentProvider';
|
|
4
|
+
import type { PaymentProviderProduct } from './PaymentProviderProduct';
|
|
5
|
+
export interface PaymentProviderBase<T extends PaymentProvider = PaymentProvider> {
|
|
6
|
+
provider: T;
|
|
7
|
+
/**
|
|
8
|
+
* creates the sellable product for a category at the provider.
|
|
9
|
+
* returns the provider's product id, which gets stored as the category's externalId
|
|
10
|
+
*/
|
|
11
|
+
createProduct(category: ListCategory, list: Pick<List, 'name' | 'location' | 'start'>): Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* loads the product behind an externalId from the provider.
|
|
14
|
+
* throws PRODUCT_NOT_FOUND if the provider doesn't know the id
|
|
15
|
+
*/
|
|
16
|
+
getProduct(externalId: string): Promise<PaymentProviderProduct>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ObjectId, WithId } from 'mongodb';
|
|
2
|
+
import type { Shift } from './Shift';
|
|
3
|
+
import type { ShiftPlan } from './ShiftPlan';
|
|
4
|
+
import type { ShiftPlanningSettings } from './ShiftPlanningSettings';
|
|
5
|
+
import type { Structure } from './Structure';
|
|
6
|
+
import type { ShiftFillTarget } from './ShiftFillTarget';
|
|
7
|
+
/**
|
|
8
|
+
* Everything a plan coverage run needs after the shared reads. Candidate pools are already ranked
|
|
9
|
+
* and the ids are the people that must be resolved for reporting, so callers only add the schedule.
|
|
10
|
+
*/
|
|
11
|
+
export interface PlanCoveragePreparation {
|
|
12
|
+
plan: WithId<ShiftPlan>;
|
|
13
|
+
shifts: WithId<Shift>[];
|
|
14
|
+
targets: ShiftFillTarget[];
|
|
15
|
+
participantIds: ObjectId[];
|
|
16
|
+
customerIds: ObjectId[];
|
|
17
|
+
settings: ShiftPlanningSettings | null;
|
|
18
|
+
listStructures: WithId<Structure>[];
|
|
19
|
+
customerStructures: WithId<Structure>[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ShiftScopeCoverage } from './ShiftScopeCoverage';
|
|
2
|
+
import type { ListPlanningParticipant } from './ListPlanningParticipant';
|
|
3
|
+
/**
|
|
4
|
+
* Candidate page for a shift or work area, or coverage for a day or plan. `data` is empty when
|
|
5
|
+
* `coverage` is present.
|
|
6
|
+
*/
|
|
7
|
+
export interface PlanningParticipantsResult {
|
|
8
|
+
all: number;
|
|
9
|
+
count: number;
|
|
10
|
+
data: ListPlanningParticipant[];
|
|
11
|
+
coverage?: ShiftScopeCoverage;
|
|
12
|
+
}
|
package/lib/cjs/Project.d.ts
CHANGED
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
import { Auth0ProjectSettings } from "./Auth0ProjectSettings";
|
|
2
|
+
import { ProjectAnalytics } from "./ProjectAnalytics";
|
|
3
|
+
import { ProjectHead } from "./ProjectHead";
|
|
4
|
+
import { ProjectLogin } from "./ProjectLogin";
|
|
5
|
+
import { ProjectPayment } from "./ProjectPayment";
|
|
6
|
+
import { ProjectPwa } from "./ProjectPwa";
|
|
7
|
+
import { ProjectDesign } from "./ProjectDesign";
|
|
2
8
|
export interface Project {
|
|
9
|
+
id: string;
|
|
3
10
|
name: string;
|
|
4
11
|
description?: string;
|
|
5
12
|
aiDescription?: string;
|
|
6
13
|
aiTone?: string;
|
|
7
|
-
license?: string;
|
|
14
|
+
license?: string[];
|
|
8
15
|
company: string;
|
|
9
16
|
tags?: string[];
|
|
10
17
|
apps?: string[];
|
|
18
|
+
attributes?: string[];
|
|
11
19
|
features?: string[];
|
|
20
|
+
/**
|
|
21
|
+
* the design the project renders with: a real design document in (company, project, id).
|
|
22
|
+
*/
|
|
23
|
+
design?: ProjectDesign;
|
|
12
24
|
auth0?: Auth0ProjectSettings;
|
|
25
|
+
/**
|
|
26
|
+
* this project behaves as an app: dynamic routes and client side navigation.
|
|
27
|
+
* rendered as `app` in the frontend config.
|
|
28
|
+
*/
|
|
29
|
+
dynamic?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* the app can be installed, which is what makes the pwa settings meaningful.
|
|
32
|
+
* only set when `app` is on.
|
|
33
|
+
*/
|
|
34
|
+
installable?: boolean;
|
|
35
|
+
payment?: ProjectPayment;
|
|
36
|
+
pwa?: ProjectPwa;
|
|
37
|
+
head?: ProjectHead;
|
|
38
|
+
/**
|
|
39
|
+
* users can register and log in; the provider decides between the internal
|
|
40
|
+
* auth and auth0. only set when `app` is on.
|
|
41
|
+
*/
|
|
42
|
+
login?: ProjectLogin;
|
|
43
|
+
analytics?: ProjectAnalytics;
|
|
13
44
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ProjectAnalyticsGoogle {
|
|
2
|
+
provider: 'googleAnalytics';
|
|
3
|
+
/**
|
|
4
|
+
* the GA4 measurement id, e.g. `G-XXXXXXXXXX`.
|
|
5
|
+
*/
|
|
6
|
+
measurementId: string;
|
|
7
|
+
/**
|
|
8
|
+
* send hits without cookies until the visitor grants consent.
|
|
9
|
+
*/
|
|
10
|
+
requireConsent?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MediaApp } from "./MediaApp";
|
|
2
|
+
export interface ProjectHead {
|
|
3
|
+
/**
|
|
4
|
+
* `<meta name="theme-color">` content. stays a plain string.
|
|
5
|
+
*/
|
|
6
|
+
themeColor?: string;
|
|
7
|
+
/**
|
|
8
|
+
* selected media file, used as `<link rel="icon" sizes="32x32">`
|
|
9
|
+
*/
|
|
10
|
+
favicon?: MediaApp;
|
|
11
|
+
/**
|
|
12
|
+
* selected media file, used as `<link rel="icon" type="image/svg+xml">`
|
|
13
|
+
*/
|
|
14
|
+
icon?: MediaApp;
|
|
15
|
+
/**
|
|
16
|
+
* selected media file, used as `<link rel="apple-touch-icon" sizes="180x180">`
|
|
17
|
+
*/
|
|
18
|
+
appleTouchIcon?: MediaApp;
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ProjectPwaIcon } from "./ProjectPwaIcon";
|
|
2
|
+
export interface ProjectPwa {
|
|
3
|
+
/**
|
|
4
|
+
* the web app manifest's `name` - the install name, not the app identifier.
|
|
5
|
+
*/
|
|
6
|
+
name: string;
|
|
7
|
+
shortName?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
themeColor?: string;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
display?: 'fullscreen' | 'standalone' | 'minimal-ui' | 'browser';
|
|
12
|
+
orientation?: 'any' | 'natural' | 'landscape' | 'landscape-primary' | 'landscape-secondary' | 'portrait' | 'portrait-primary' | 'portrait-secondary';
|
|
13
|
+
startUrl?: string;
|
|
14
|
+
scope?: string;
|
|
15
|
+
/**
|
|
16
|
+
* the manifest `id`. usually `/` or a stable path that identifies the app.
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
categories?: string[];
|
|
20
|
+
icons?: ProjectPwaIcon[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ProjectPwaIcon {
|
|
2
|
+
/**
|
|
3
|
+
* path to the icon file, relative to the app origin or absolute.
|
|
4
|
+
*/
|
|
5
|
+
src: string;
|
|
6
|
+
/**
|
|
7
|
+
* space separated list, e.g. `192x192` or `any`.
|
|
8
|
+
*/
|
|
9
|
+
sizes: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
/**
|
|
12
|
+
* space separated list of `any`, `maskable` or `monochrome`.
|
|
13
|
+
*/
|
|
14
|
+
purpose?: string;
|
|
15
|
+
}
|
package/lib/cjs/Publish.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface RenderContext {
|
|
1
|
+
import { WorkingContext } from './WorkingContext';
|
|
2
|
+
export interface RenderContext extends WorkingContext {
|
|
3
3
|
url?: string;
|
|
4
|
-
data?: Content;
|
|
5
|
-
layout?: Content;
|
|
6
4
|
title?: string;
|
|
7
5
|
description?: string;
|
|
8
|
-
settings?: Record<string, unknown>;
|
|
9
6
|
translation?: Record<string, string>;
|
|
10
|
-
tags?: string[];
|
|
11
|
-
app?: string;
|
|
12
|
-
css?: string;
|
|
13
|
-
cdn?: string;
|
|
14
|
-
renderTarget?: 'pdf' | 'web';
|
|
15
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Right = 'read' | 'write' | 'edit' | 'delete' | 'files' | 'rename' | 'participants' | 'block';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ObjectId } from 'mongodb';
|
|
2
|
+
import type { ShiftAssignmentBreak } from './ShiftAssignmentBreak';
|
|
3
|
+
export interface ShiftFillCandidate {
|
|
4
|
+
participant: ObjectId;
|
|
5
|
+
customer: ObjectId;
|
|
6
|
+
/** The candidate fulfils the shift's required/forbidden constraints. */
|
|
7
|
+
matching: boolean;
|
|
8
|
+
/** Absolute break times to carry into the assignment; coverage leaves them to the planner. */
|
|
9
|
+
breaks?: ShiftAssignmentBreak[];
|
|
10
|
+
}
|
|
@@ -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,11 @@
|
|
|
1
|
+
import type { WithId } from 'mongodb';
|
|
2
|
+
import type { Shift } from './Shift';
|
|
3
|
+
import type { ShiftCoverage } from './ShiftCoverage';
|
|
4
|
+
export interface ShiftFillResult {
|
|
5
|
+
coverage: ShiftCoverage[];
|
|
6
|
+
fillable: boolean;
|
|
7
|
+
/** False when stop-on-unfillable ended the run before every target was evaluated. */
|
|
8
|
+
complete: boolean;
|
|
9
|
+
/** The targets after allocation; unchanged shifts keep their persisted assignments. */
|
|
10
|
+
shifts: WithId<Shift>[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
export interface ShiftFillTarget {
|
|
6
|
+
shift: WithId<Shift>;
|
|
7
|
+
conditions: StructureCondition[];
|
|
8
|
+
/** Ranked pool; unfit candidates are last but may still fill a shift as a fallback. */
|
|
9
|
+
candidates: ShiftFillCandidate[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ObjectId, WithId } from 'mongodb';
|
|
2
|
+
import type { Shift } from './Shift';
|
|
3
|
+
import type { PlanCoveragePreparation } from './PlanCoveragePreparation';
|
|
4
|
+
export interface ShiftReportContextOptions {
|
|
5
|
+
replacement?: WithId<Shift>;
|
|
6
|
+
plan?: ObjectId;
|
|
7
|
+
schedules?: WithId<Shift>[];
|
|
8
|
+
preparation?: PlanCoveragePreparation;
|
|
9
|
+
}
|
|
@@ -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
|
+
}
|