@cratis/showrunner.marquee 0.0.0-stage → 1.11.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/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.ts +61 -0
- package/Acknowledging/AcknowledgeAnnouncement/index.ts +4 -0
- package/Contracts/Announcements/Display.ts +13 -0
- package/Contracts/Announcements/Importance.ts +13 -0
- package/Contracts/Announcements/index.ts +5 -0
- package/README.md +78 -2
- package/Viewing/AnnouncementForMe.ts +194 -0
- package/Viewing/index.ts +4 -0
- package/dist/cjs/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.d.ts +21 -0
- package/dist/cjs/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.d.ts.map +1 -0
- package/dist/cjs/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.js +44 -0
- package/dist/cjs/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.js.map +1 -0
- package/dist/cjs/Acknowledging/AcknowledgeAnnouncement/index.d.ts +2 -0
- package/dist/cjs/Acknowledging/AcknowledgeAnnouncement/index.d.ts.map +1 -0
- package/dist/cjs/Contracts/Announcements/Display.d.ts +6 -0
- package/dist/cjs/Contracts/Announcements/Display.d.ts.map +1 -0
- package/dist/cjs/Contracts/Announcements/Display.js +17 -0
- package/dist/cjs/Contracts/Announcements/Display.js.map +1 -0
- package/dist/cjs/Contracts/Announcements/Importance.d.ts +6 -0
- package/dist/cjs/Contracts/Announcements/Importance.d.ts.map +1 -0
- package/dist/cjs/Contracts/Announcements/Importance.js +17 -0
- package/dist/cjs/Contracts/Announcements/Importance.js.map +1 -0
- package/dist/cjs/Contracts/Announcements/index.d.ts +3 -0
- package/dist/cjs/Contracts/Announcements/index.d.ts.map +1 -0
- package/dist/cjs/Viewing/AnnouncementForMe.d.ts +72 -0
- package/dist/cjs/Viewing/AnnouncementForMe.d.ts.map +1 -0
- package/dist/cjs/Viewing/AnnouncementForMe.js +199 -0
- package/dist/cjs/Viewing/AnnouncementForMe.js.map +1 -0
- package/dist/cjs/Viewing/index.d.ts +2 -0
- package/dist/cjs/Viewing/index.d.ts.map +1 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.d.ts +21 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.d.ts.map +1 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.js +42 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.js.map +1 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/index.d.ts +2 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/index.d.ts.map +1 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/index.js +2 -0
- package/dist/esm/Acknowledging/AcknowledgeAnnouncement/index.js.map +1 -0
- package/dist/esm/Contracts/Announcements/Display.d.ts +6 -0
- package/dist/esm/Contracts/Announcements/Display.d.ts.map +1 -0
- package/dist/esm/Contracts/Announcements/Display.js +15 -0
- package/dist/esm/Contracts/Announcements/Display.js.map +1 -0
- package/dist/esm/Contracts/Announcements/Importance.d.ts +6 -0
- package/dist/esm/Contracts/Announcements/Importance.d.ts.map +1 -0
- package/dist/esm/Contracts/Announcements/Importance.js +15 -0
- package/dist/esm/Contracts/Announcements/Importance.js.map +1 -0
- package/dist/esm/Contracts/Announcements/index.d.ts +3 -0
- package/dist/esm/Contracts/Announcements/index.d.ts.map +1 -0
- package/dist/esm/Contracts/Announcements/index.js +3 -0
- package/dist/esm/Contracts/Announcements/index.js.map +1 -0
- package/dist/esm/Viewing/AnnouncementForMe.d.ts +72 -0
- package/dist/esm/Viewing/AnnouncementForMe.d.ts.map +1 -0
- package/dist/esm/Viewing/AnnouncementForMe.js +196 -0
- package/dist/esm/Viewing/AnnouncementForMe.js.map +1 -0
- package/dist/esm/Viewing/index.d.ts +2 -0
- package/dist/esm/Viewing/index.d.ts.map +1 -0
- package/dist/esm/Viewing/index.js +2 -0
- package/dist/esm/Viewing/index.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/index.ts +6 -0
- package/package.json +69 -4
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
5
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Acknowledging.AcknowledgeAnnouncement.AcknowledgeAnnouncement. Time: 2026-10-31T10:10:27.5324770Z. Hash: 230111C81078C01815C3F85C53161408D56C97716F462B33F4E3F0BB9374B5F4
|
|
6
|
+
import { Command } from '@cratis/arc/commands';
|
|
7
|
+
import { ClearCommandValues, SetCommandValues, useCommand } from '@cratis/arc.react/commands';
|
|
8
|
+
import { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
|
|
9
|
+
import { Guid } from '@cratis/fundamentals';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Records that the signed-in person saw an announcement shown in a dialog once, so it is not shown to them again on any device.
|
|
13
|
+
*/
|
|
14
|
+
export interface IAcknowledgeAnnouncement {
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The announcement.
|
|
18
|
+
*/
|
|
19
|
+
announcementId?: Guid;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Records that the signed-in person saw an announcement shown in a dialog once, so it is not shown to them again on any device.
|
|
25
|
+
*/
|
|
26
|
+
export class AcknowledgeAnnouncement extends Command<IAcknowledgeAnnouncement> implements IAcknowledgeAnnouncement {
|
|
27
|
+
static readonly sliceLocation: ArcSliceLocation = new ArcSliceLocation('', 'Acknowledging', 'AcknowledgeAnnouncement');
|
|
28
|
+
readonly route: string = '/api/acknowledging/acknowledge-announcement';
|
|
29
|
+
readonly treatWarningsAsErrors: boolean = false;
|
|
30
|
+
readonly roles: string[] = [];
|
|
31
|
+
readonly propertyDescriptors: PropertyDescriptor[] = [
|
|
32
|
+
new PropertyDescriptor('announcementId', Guid, false),
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
#announcementId!: Guid;
|
|
36
|
+
|
|
37
|
+
constructor() {
|
|
38
|
+
super(Object, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get requestParameters(): string[] {
|
|
42
|
+
return [
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The announcement.
|
|
48
|
+
*/
|
|
49
|
+
get announcementId(): Guid {
|
|
50
|
+
return this.#announcementId;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
set announcementId(value: Guid) {
|
|
54
|
+
this.#announcementId = value;
|
|
55
|
+
this.propertyChanged('announcementId');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static use(initialValues?: IAcknowledgeAnnouncement): [AcknowledgeAnnouncement, SetCommandValues<IAcknowledgeAnnouncement>, ClearCommandValues] {
|
|
59
|
+
return useCommand<AcknowledgeAnnouncement, IAcknowledgeAnnouncement>(AcknowledgeAnnouncement, initialValues);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
5
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Contracts.Announcements.Display. Time: 2026-10-31T10:10:27.5324770Z. Hash: 8138A7B492877AA7B8990D1C633B6B783F1DD9E31497F5A502CD4AA26C2B3A02
|
|
6
|
+
/**
|
|
7
|
+
* How an announcement is presented to the people it reaches.
|
|
8
|
+
*/
|
|
9
|
+
export enum Display {
|
|
10
|
+
banner = 0,
|
|
11
|
+
dialogOnce = 1,
|
|
12
|
+
dialogEverySession = 2,
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
5
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Contracts.Announcements.Importance. Time: 2026-10-31T10:10:27.5324770Z. Hash: 45D4C95C53A74F27B49CC472238A01A07AE80E8319DC7139C94B48A9727835E4
|
|
6
|
+
/**
|
|
7
|
+
* How much attention an announcement asks for.
|
|
8
|
+
*/
|
|
9
|
+
export enum Importance {
|
|
10
|
+
information = 0,
|
|
11
|
+
warning = 1,
|
|
12
|
+
critical = 2,
|
|
13
|
+
}
|
package/README.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Showrunner
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Showrunner is a set of ready-made product parts for applications built on [Cratis](https://www.cratis.io) — drop-in backend and frontend packages, built as Arc and Chronicle vertical slices.
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/Cratis/Showrunner/actions/workflows/build.yml)
|
|
7
|
+
[](https://github.com/Cratis/Showrunner/actions/workflows/publish.yml)
|
|
8
|
+
[](https://discord.gg/kt4AMpV8WV)
|
|
9
|
+
|
|
10
|
+
## Usher
|
|
11
|
+
|
|
12
|
+
**Usher** is the support part: it lets the users of an application report issues and hold support conversations with the people running it. It is a library an application hosts, not a service of its own — the backend package adds Usher's commands, queries and events to the host's Arc application and Chronicle event store, and the frontend packages give the host's React UI the generated proxies and components to drive them.
|
|
13
|
+
|
|
14
|
+
Usher is in its earliest stage: the packages are scaffolded and published, but carry no behavior yet. See [Documentation](./Documentation/index.md).
|
|
15
|
+
|
|
16
|
+
**Box Office** is the licensing part: trials, seats, modules, compute allowances and suspension, decided by the operator of a managed product and honored by the product. Its event contracts, its catalog of offers and prices, and a product's offering declaration and compute metering are in place; see [Documentation](./Documentation/BoxOffice/index.md).
|
|
17
|
+
|
|
18
|
+
**Marquee** is the announcements part: the people running a product write an announcement with an audience, a display and an exact window, and the product shows it to the people it reaches, as a banner or a dialog. Drop `<Marquee />` into the application shell and it brings its own queries and commands; see [Documentation](./Documentation/Marquee/index.md).
|
|
19
|
+
|
|
20
|
+
**Herald** is the email part: an application asks it to send an email of a kind, such as an invitation, and it fills the template for that kind and language, makes the HTML safe for email clients, embeds the images, sends it over SMTP and records the outcome. Failed sends are queued and retried; see [Documentation](./Documentation/Herald/index.md).
|
|
21
|
+
|
|
22
|
+
**Stage Manager** is the Kubernetes operator. Unlike the other parts it is a service you install with the `cratis/showrunner-operator` Helm chart: a `Performance` runs an application with its AuthProxy and its own Ante from a Cratis environment, reachable only through AuthProxy; see [Documentation](./Documentation/StageManager/index.md).
|
|
23
|
+
|
|
24
|
+
## Packages
|
|
25
|
+
|
|
26
|
+
| Package | Registry | What it is |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| `Cratis.Showrunner.BoxOffice.Catalog` | NuGet | Box Office's catalog — offers (seat plans, modules, compute packs), prices and the pricing arithmetic, published to products |
|
|
29
|
+
| `Cratis.Showrunner.BoxOffice.Offering` | NuGet | Box Office for a product — declares what the product sells (modules, meters, seat licensing) and measures its compute per tenant and day |
|
|
30
|
+
| `Cratis.Showrunner.BoxOffice.Contracts` | NuGet | Box Office's event contracts: what an operator decides about a tenant and what a product reports back |
|
|
31
|
+
| `Cratis.Showrunner.Herald.Contracts` | NuGet | Herald's event contracts: the facts recorded when an email was sent, failed or bounced |
|
|
32
|
+
| `Cratis.Showrunner.Herald` | NuGet | Herald's backend — templates, strict rendering, images, SMTP and folder transports, queued delivery with retries, recorded in the application's Chronicle event store |
|
|
33
|
+
| `cratis/showrunner-operator` | Docker Hub, Helm (OCI) | Stage Manager, the Kubernetes operator, as a container image and a Helm chart released with the same version |
|
|
34
|
+
| `Cratis.Showrunner.Usher.Contracts` | NuGet | Usher's event contracts, for hosts that react to what Usher records |
|
|
35
|
+
| `Cratis.Showrunner.Marquee.Contracts` | NuGet | Marquee's event contracts: the public events a product receives announcements through |
|
|
36
|
+
| `Cratis.Showrunner.Marquee.Authoring` | NuGet | Marquee's authoring backend — commands, query and outbox for writing announcements, built on Arc and Chronicle |
|
|
37
|
+
| `Cratis.Showrunner.Marquee` | NuGet | Marquee's backend for products — receives announcements once, shows each tenant what its audience matches and records acknowledgements |
|
|
38
|
+
| `Cratis.Showrunner.Usher` | NuGet | Usher's backend — Arc commands and queries over Chronicle |
|
|
39
|
+
| `@cratis/showrunner.marquee` | npm | The generated TypeScript proxies for Marquee's receiving commands and queries; no UI framework dependency |
|
|
40
|
+
| `@cratis/showrunner.marquee.authoring` | npm | The generated TypeScript proxies for Marquee's authoring commands and query; no UI framework dependency |
|
|
41
|
+
| `@cratis/showrunner.marquee.react` | npm | The Marquee drop-in React component: banners and dialogs for a product's announcements, built on `@cratis/arc.react` and `@cratis/components` |
|
|
42
|
+
| `@cratis/showrunner.usher` | npm | The generated TypeScript proxies for Usher's commands and queries; no UI framework dependency |
|
|
43
|
+
| `@cratis/showrunner.usher.react` | npm | React components for Usher, built on `@cratis/arc.react` and `@cratis/components` |
|
|
44
|
+
|
|
45
|
+
## Building
|
|
46
|
+
|
|
47
|
+
Prerequisites: the .NET SDK from [`global.json`](./global.json) (10.0.400 or later) and Node.js 20 or later with Corepack enabled (`corepack enable`); Yarn itself is checked in under `.yarn/releases`.
|
|
48
|
+
|
|
49
|
+
```shell
|
|
50
|
+
# Backend: Debug builds compile the inline specs and regenerate the TypeScript proxies
|
|
51
|
+
dotnet build Showrunner.slnx --configuration Debug
|
|
52
|
+
dotnet test Showrunner.slnx --configuration Debug --no-build
|
|
53
|
+
|
|
54
|
+
# Release is warnings-as-errors; clearing CratisProxiesOutputPath skips proxy generation
|
|
55
|
+
dotnet build Showrunner.slnx --configuration Release -p:CratisProxiesOutputPath=
|
|
56
|
+
|
|
57
|
+
# Frontend
|
|
58
|
+
yarn install
|
|
59
|
+
yarn lint:ci
|
|
60
|
+
yarn compile
|
|
61
|
+
yarn test
|
|
62
|
+
yarn build
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Specifications live beside the code they specify — `for_*/when_*/` folders compiled into Debug builds only for .NET, and Vitest specs in the same layout for TypeScript.
|
|
66
|
+
|
|
67
|
+
The end-to-end specifications in [`Integration`](./Integration) run Usher and a desk against a real Chronicle kernel in a container, so `dotnet test Showrunner.slnx` needs Docker. Set `USHER_CHRONICLE_IMAGE` to run them against another kernel image, and `USHER_INTEGRATION_LOG` to a file path to keep the application's log.
|
|
68
|
+
|
|
69
|
+
## Releasing
|
|
70
|
+
|
|
71
|
+
Every pull request carries exactly one of the `major`, `minor`, `patch` or `no-release` labels. Merging a version-labelled pull request to `main` releases all four packages under one semantic version through [`cratis/release-action`](https://github.com/Cratis/release-action) — NuGet packages through NuGet trusted publishing and npm packages through npm trusted publishing with provenance. The packages are built and packed in jobs without publishing rights; separate jobs that run no build or install script hold the short-lived OIDC token and only push what was packed.
|
|
72
|
+
|
|
73
|
+
## Part of the Cratis ecosystem
|
|
74
|
+
|
|
75
|
+
Showrunner is a [Cratis](https://www.cratis.io) project, built on event sourcing with [Chronicle](https://github.com/Cratis/Chronicle) and CQRS with [Arc](https://github.com/Cratis/Arc), with frontends on [`@cratis/components`](https://github.com/Cratis/Components). Join the community on [Discord](https://discord.gg/kt4AMpV8WV).
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
Showrunner is licensed under the [MIT License](LICENSE) and free to use.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
5
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Viewing.AnnouncementForMe, Cratis.Showrunner.Marquee.Viewing.AnnouncementForMe. Time: 2026-10-31T10:10:27.5324770Z. Hash: CC0FA789FC4167A9D193C883F9703196E6A76A2D05D64B13D9FB9818F899FA7D
|
|
6
|
+
import { ChangeSet, ObservableQueryFor, Paging, QueryResultWithState, Sorting, SortingActions, SortingActionsForObservableQuery } from '@cratis/arc/queries';
|
|
7
|
+
import { ObservableQueryWhen, SetPage, SetPageSize, SetSorting, useChangeStream, useObservableQuery, useObservableQueryWithPaging, useSuspenseObservableQuery, useSuspenseObservableQueryWithPaging } from '@cratis/arc.react/queries';
|
|
8
|
+
import { SliceLocation as ArcSliceLocation, ParameterDescriptor } from '@cratis/arc/reflection';
|
|
9
|
+
import { Guid, field } from '@cratis/fundamentals';
|
|
10
|
+
import { Display } from '../Contracts/Announcements/Display';
|
|
11
|
+
import { Importance } from '../Contracts/Announcements/Importance';
|
|
12
|
+
|
|
13
|
+
class AnnouncementsForMeSortBy {
|
|
14
|
+
private _activeFrom: SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
15
|
+
private _activeUntil: SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
16
|
+
private _body: SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
17
|
+
private _display: SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
18
|
+
private _id: SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
19
|
+
private _importance: SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
20
|
+
private _title: SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
21
|
+
|
|
22
|
+
constructor(readonly query: AnnouncementsForMe) {
|
|
23
|
+
this._activeFrom = new SortingActionsForObservableQuery<AnnouncementForMe[]>('activeFrom', query);
|
|
24
|
+
this._activeUntil = new SortingActionsForObservableQuery<AnnouncementForMe[]>('activeUntil', query);
|
|
25
|
+
this._body = new SortingActionsForObservableQuery<AnnouncementForMe[]>('body', query);
|
|
26
|
+
this._display = new SortingActionsForObservableQuery<AnnouncementForMe[]>('display', query);
|
|
27
|
+
this._id = new SortingActionsForObservableQuery<AnnouncementForMe[]>('id', query);
|
|
28
|
+
this._importance = new SortingActionsForObservableQuery<AnnouncementForMe[]>('importance', query);
|
|
29
|
+
this._title = new SortingActionsForObservableQuery<AnnouncementForMe[]>('title', query);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
get activeFrom(): SortingActionsForObservableQuery<AnnouncementForMe[]> {
|
|
33
|
+
return this._activeFrom;
|
|
34
|
+
}
|
|
35
|
+
get activeUntil(): SortingActionsForObservableQuery<AnnouncementForMe[]> {
|
|
36
|
+
return this._activeUntil;
|
|
37
|
+
}
|
|
38
|
+
get body(): SortingActionsForObservableQuery<AnnouncementForMe[]> {
|
|
39
|
+
return this._body;
|
|
40
|
+
}
|
|
41
|
+
get display(): SortingActionsForObservableQuery<AnnouncementForMe[]> {
|
|
42
|
+
return this._display;
|
|
43
|
+
}
|
|
44
|
+
get id(): SortingActionsForObservableQuery<AnnouncementForMe[]> {
|
|
45
|
+
return this._id;
|
|
46
|
+
}
|
|
47
|
+
get importance(): SortingActionsForObservableQuery<AnnouncementForMe[]> {
|
|
48
|
+
return this._importance;
|
|
49
|
+
}
|
|
50
|
+
get title(): SortingActionsForObservableQuery<AnnouncementForMe[]> {
|
|
51
|
+
return this._title;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
class AnnouncementsForMeSortByWithoutQuery {
|
|
56
|
+
private _activeFrom: SortingActions = new SortingActions('activeFrom');
|
|
57
|
+
private _activeUntil: SortingActions = new SortingActions('activeUntil');
|
|
58
|
+
private _body: SortingActions = new SortingActions('body');
|
|
59
|
+
private _display: SortingActions = new SortingActions('display');
|
|
60
|
+
private _id: SortingActions = new SortingActions('id');
|
|
61
|
+
private _importance: SortingActions = new SortingActions('importance');
|
|
62
|
+
private _title: SortingActions = new SortingActions('title');
|
|
63
|
+
|
|
64
|
+
get activeFrom(): SortingActions {
|
|
65
|
+
return this._activeFrom;
|
|
66
|
+
}
|
|
67
|
+
get activeUntil(): SortingActions {
|
|
68
|
+
return this._activeUntil;
|
|
69
|
+
}
|
|
70
|
+
get body(): SortingActions {
|
|
71
|
+
return this._body;
|
|
72
|
+
}
|
|
73
|
+
get display(): SortingActions {
|
|
74
|
+
return this._display;
|
|
75
|
+
}
|
|
76
|
+
get id(): SortingActions {
|
|
77
|
+
return this._id;
|
|
78
|
+
}
|
|
79
|
+
get importance(): SortingActions {
|
|
80
|
+
return this._importance;
|
|
81
|
+
}
|
|
82
|
+
get title(): SortingActions {
|
|
83
|
+
return this._title;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Observes the announcements the signed-in person is to see.
|
|
90
|
+
*/
|
|
91
|
+
export class AnnouncementsForMe extends ObservableQueryFor<AnnouncementForMe[]> {
|
|
92
|
+
static readonly sliceLocation: ArcSliceLocation = new ArcSliceLocation('', '', 'Viewing');
|
|
93
|
+
readonly route: string = '/api/viewing/announcements-for-me';
|
|
94
|
+
readonly queryName: string = 'Cratis.Showrunner.Marquee.Viewing.AnnouncementForMe.AnnouncementsForMe';
|
|
95
|
+
readonly treatWarningsAsErrors: boolean = false;
|
|
96
|
+
readonly roles: string[] = [];
|
|
97
|
+
readonly defaultValue: AnnouncementForMe[] = [];
|
|
98
|
+
private readonly _sortBy: AnnouncementsForMeSortBy;
|
|
99
|
+
private static readonly _sortBy: AnnouncementsForMeSortByWithoutQuery = new AnnouncementsForMeSortByWithoutQuery();
|
|
100
|
+
|
|
101
|
+
constructor() {
|
|
102
|
+
super(AnnouncementForMe, true);
|
|
103
|
+
this._sortBy = new AnnouncementsForMeSortBy(this);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
get requiredRequestParameters(): string[] {
|
|
107
|
+
return [
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
readonly parameterDescriptors: ParameterDescriptor[] = [
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
get sortBy(): AnnouncementsForMeSortBy {
|
|
116
|
+
return this._sortBy;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static get sortBy(): AnnouncementsForMeSortByWithoutQuery {
|
|
120
|
+
return this._sortBy;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static use(sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting] {
|
|
124
|
+
return useObservableQuery<AnnouncementForMe[], AnnouncementsForMe>(AnnouncementsForMe, undefined, sorting);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static useWithPaging(pageSize: number, sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting, SetPage, SetPageSize] {
|
|
128
|
+
return useObservableQueryWithPaging<AnnouncementForMe[], AnnouncementsForMe>(AnnouncementsForMe, new Paging(0, pageSize), undefined, sorting);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static useSuspense(sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting] {
|
|
132
|
+
return useSuspenseObservableQuery<AnnouncementForMe[], AnnouncementsForMe>(AnnouncementsForMe, undefined, sorting);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static useSuspenseWithPaging(pageSize: number, sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting, SetPage, SetPageSize] {
|
|
136
|
+
return useSuspenseObservableQueryWithPaging<AnnouncementForMe[], AnnouncementsForMe>(AnnouncementsForMe, new Paging(0, pageSize), undefined, sorting);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static useChangeStream(getKey?: (item: AnnouncementForMe) => unknown, sorting?: Sorting): ChangeSet<AnnouncementForMe> {
|
|
140
|
+
return useChangeStream<AnnouncementForMe, AnnouncementsForMe>(AnnouncementsForMe, undefined, getKey, sorting);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static when(condition: boolean): ObservableQueryWhen<AnnouncementsForMe, AnnouncementForMe[]> {
|
|
144
|
+
return new ObservableQueryWhen<AnnouncementsForMe, AnnouncementForMe[]>(AnnouncementsForMe, condition);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* An announcement the signed-in person is to see: the product holds it, it is for their tenant, and it is not a dialog they have already acknowledged.
|
|
150
|
+
*/
|
|
151
|
+
export class AnnouncementForMe {
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The announcement.
|
|
155
|
+
*/
|
|
156
|
+
@field(Guid)
|
|
157
|
+
id!: Guid;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Its title.
|
|
161
|
+
*/
|
|
162
|
+
@field(String)
|
|
163
|
+
title!: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* What it says.
|
|
167
|
+
*/
|
|
168
|
+
@field(String)
|
|
169
|
+
body!: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* How it is shown.
|
|
173
|
+
*/
|
|
174
|
+
@field(Number)
|
|
175
|
+
display!: Display;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* How important it is.
|
|
179
|
+
*/
|
|
180
|
+
@field(Number)
|
|
181
|
+
importance!: Importance;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* When it starts to be shown.
|
|
185
|
+
*/
|
|
186
|
+
@field(Date)
|
|
187
|
+
activeFrom!: Date;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* When it stops being shown.
|
|
191
|
+
*/
|
|
192
|
+
@field(Date)
|
|
193
|
+
activeUntil!: Date;
|
|
194
|
+
}
|
package/Viewing/index.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Command } from '@cratis/arc/commands';
|
|
2
|
+
import { ClearCommandValues, SetCommandValues } from '@cratis/arc.react/commands';
|
|
3
|
+
import { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';
|
|
4
|
+
import { Guid } from '@cratis/fundamentals';
|
|
5
|
+
export interface IAcknowledgeAnnouncement {
|
|
6
|
+
announcementId?: Guid;
|
|
7
|
+
}
|
|
8
|
+
export declare class AcknowledgeAnnouncement extends Command<IAcknowledgeAnnouncement> implements IAcknowledgeAnnouncement {
|
|
9
|
+
#private;
|
|
10
|
+
static readonly sliceLocation: ArcSliceLocation;
|
|
11
|
+
readonly route: string;
|
|
12
|
+
readonly treatWarningsAsErrors: boolean;
|
|
13
|
+
readonly roles: string[];
|
|
14
|
+
readonly propertyDescriptors: PropertyDescriptor[];
|
|
15
|
+
constructor();
|
|
16
|
+
get requestParameters(): string[];
|
|
17
|
+
get announcementId(): Guid;
|
|
18
|
+
set announcementId(value: Guid);
|
|
19
|
+
static use(initialValues?: IAcknowledgeAnnouncement): [AcknowledgeAnnouncement, SetCommandValues<IAcknowledgeAnnouncement>, ClearCommandValues];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=AcknowledgeAnnouncement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcknowledgeAnnouncement.d.ts","sourceRoot":"","sources":["../../../../Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAc,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAK5C,MAAM,WAAW,wBAAwB;IAKrC,cAAc,CAAC,EAAE,IAAI,CAAC;CACzB;AAMD,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,wBAAwB,CAAE,YAAW,wBAAwB;;IAC9G,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAwE;IACvH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAiD;IACvE,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAM;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,CAEhD;;IAQF,IAAI,iBAAiB,IAAI,MAAM,EAAE,CAGhC;IAKD,IAAI,cAAc,IAAI,IAAI,CAEzB;IAED,IAAI,cAAc,CAAC,KAAK,EAAE,IAAI,EAG7B;IAED,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,wBAAwB,GAAG,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,EAAE,kBAAkB,CAAC;CAGlJ"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var commands = require('@cratis/arc/commands');
|
|
4
|
+
var commands$1 = require('@cratis/arc.react/commands');
|
|
5
|
+
var reflection = require('@cratis/arc/reflection');
|
|
6
|
+
var fundamentals = require('@cratis/fundamentals');
|
|
7
|
+
|
|
8
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
9
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
10
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
11
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Acknowledging.AcknowledgeAnnouncement.AcknowledgeAnnouncement. Time: 2026-10-31T10:10:27.5324770Z. Hash: 230111C81078C01815C3F85C53161408D56C97716F462B33F4E3F0BB9374B5F4
|
|
12
|
+
/**
|
|
13
|
+
* Records that the signed-in person saw an announcement shown in a dialog once, so it is not shown to them again on any device.
|
|
14
|
+
*/ class AcknowledgeAnnouncement extends commands.Command {
|
|
15
|
+
static sliceLocation = new reflection.SliceLocation('', 'Acknowledging', 'AcknowledgeAnnouncement');
|
|
16
|
+
route = '/api/acknowledging/acknowledge-announcement';
|
|
17
|
+
treatWarningsAsErrors = false;
|
|
18
|
+
roles = [];
|
|
19
|
+
propertyDescriptors = [
|
|
20
|
+
new reflection.PropertyDescriptor('announcementId', fundamentals.Guid, false)
|
|
21
|
+
];
|
|
22
|
+
#announcementId;
|
|
23
|
+
constructor(){
|
|
24
|
+
super(Object, false);
|
|
25
|
+
}
|
|
26
|
+
get requestParameters() {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The announcement.
|
|
31
|
+
*/ get announcementId() {
|
|
32
|
+
return this.#announcementId;
|
|
33
|
+
}
|
|
34
|
+
set announcementId(value) {
|
|
35
|
+
this.#announcementId = value;
|
|
36
|
+
this.propertyChanged('announcementId');
|
|
37
|
+
}
|
|
38
|
+
static use(initialValues) {
|
|
39
|
+
return commands$1.useCommand(AcknowledgeAnnouncement, initialValues);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.AcknowledgeAnnouncement = AcknowledgeAnnouncement;
|
|
44
|
+
//# sourceMappingURL=AcknowledgeAnnouncement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcknowledgeAnnouncement.js","sources":["../../../../Acknowledging/AcknowledgeAnnouncement/AcknowledgeAnnouncement.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// **DO NOT EDIT** - This file is an automatically generated file.\n// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Acknowledging.AcknowledgeAnnouncement.AcknowledgeAnnouncement. Time: 2026-10-31T10:10:27.5324770Z. Hash: 230111C81078C01815C3F85C53161408D56C97716F462B33F4E3F0BB9374B5F4\nimport { Command } from '@cratis/arc/commands';\nimport { ClearCommandValues, SetCommandValues, useCommand } from '@cratis/arc.react/commands';\nimport { SliceLocation as ArcSliceLocation, PropertyDescriptor } from '@cratis/arc/reflection';\nimport { Guid } from '@cratis/fundamentals';\n\n/**\n * Records that the signed-in person saw an announcement shown in a dialog once, so it is not shown to them again on any device.\n */\nexport interface IAcknowledgeAnnouncement {\n\n /**\n * The announcement.\n */\n announcementId?: Guid;\n}\n\n\n/**\n * Records that the signed-in person saw an announcement shown in a dialog once, so it is not shown to them again on any device.\n */\nexport class AcknowledgeAnnouncement extends Command<IAcknowledgeAnnouncement> implements IAcknowledgeAnnouncement {\n static readonly sliceLocation: ArcSliceLocation = new ArcSliceLocation('', 'Acknowledging', 'AcknowledgeAnnouncement');\n readonly route: string = '/api/acknowledging/acknowledge-announcement';\n readonly treatWarningsAsErrors: boolean = false;\n readonly roles: string[] = [];\n readonly propertyDescriptors: PropertyDescriptor[] = [\n new PropertyDescriptor('announcementId', Guid, false),\n ];\n\n #announcementId!: Guid;\n\n constructor() {\n super(Object, false);\n }\n\n get requestParameters(): string[] {\n return [\n ];\n }\n\n /**\n * The announcement.\n */\n get announcementId(): Guid {\n return this.#announcementId;\n }\n\n set announcementId(value: Guid) {\n this.#announcementId = value;\n this.propertyChanged('announcementId');\n }\n\n static use(initialValues?: IAcknowledgeAnnouncement): [AcknowledgeAnnouncement, SetCommandValues<IAcknowledgeAnnouncement>, ClearCommandValues] {\n return useCommand<AcknowledgeAnnouncement, IAcknowledgeAnnouncement>(AcknowledgeAnnouncement, initialValues);\n }\n}\n"],"names":["AcknowledgeAnnouncement","Command","sliceLocation","ArcSliceLocation","route","treatWarningsAsErrors","roles","propertyDescriptors","PropertyDescriptor","Guid","Object","requestParameters","announcementId","value","propertyChanged","use","initialValues","useCommand"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AAkBA;;IAGO,MAAMA,uBAAAA,SAAgCC,gBAAAA,CAAAA;AACzC,IAAA,OAAgBC,aAAAA,GAAkC,IAAIC,wBAAAA,CAAiB,EAAA,EAAI,iBAAiB,yBAAA,CAAA;AACnFC,IAAAA,KAAAA,GAAgB,6CAAA;AAChBC,IAAAA,qBAAAA,GAAiC,KAAA;AACjCC,IAAAA,KAAAA,GAAkB,EAAE;IACpBC,mBAAAA,GAA4C;QACjD,IAAIC,6BAAAA,CAAmB,kBAAkBC,iBAAAA,EAAM,KAAA;KAClD;AAED,IAAA,eAAe;IAEf,WAAA,EAAc;AACV,QAAA,KAAK,CAACC,MAAAA,EAAQ,KAAA,CAAA;AAClB,IAAA;AAEA,IAAA,IAAIC,iBAAAA,GAA8B;AAC9B,QAAA,OAAO,EACN;AACL,IAAA;AAEA;;AAEC,QACD,IAAIC,cAAAA,GAAuB;QACvB,OAAO,IAAI,CAAC,eAAe;AAC/B,IAAA;IAEA,IAAIA,cAAAA,CAAeC,KAAW,EAAE;QAC5B,IAAI,CAAC,eAAe,GAAGA,KAAAA;QACvB,IAAI,CAACC,eAAe,CAAC,gBAAA,CAAA;AACzB,IAAA;IAEA,OAAOC,GAAAA,CAAIC,aAAwC,EAA6F;AAC5I,QAAA,OAAOC,sBAA8DjB,uBAAAA,EAAyBgB,aAAAA,CAAAA;AAClG,IAAA;AACJ;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Acknowledging/AcknowledgeAnnouncement/index.ts"],"names":[],"mappings":"AAGA,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Display.d.ts","sourceRoot":"","sources":["../../../../Contracts/Announcements/Display.ts"],"names":[],"mappings":"AAQA,oBAAY,OAAO;IACf,MAAM,IAAI;IACV,UAAU,IAAI;IACd,kBAAkB,IAAI;CACzB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
6
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Contracts.Announcements.Display. Time: 2026-10-31T10:10:27.5324770Z. Hash: 8138A7B492877AA7B8990D1C633B6B783F1DD9E31497F5A502CD4AA26C2B3A02
|
|
7
|
+
/**
|
|
8
|
+
* How an announcement is presented to the people it reaches.
|
|
9
|
+
*/ var Display = /*#__PURE__*/ function(Display) {
|
|
10
|
+
Display[Display["banner"] = 0] = "banner";
|
|
11
|
+
Display[Display["dialogOnce"] = 1] = "dialogOnce";
|
|
12
|
+
Display[Display["dialogEverySession"] = 2] = "dialogEverySession";
|
|
13
|
+
return Display;
|
|
14
|
+
}({});
|
|
15
|
+
|
|
16
|
+
exports.Display = Display;
|
|
17
|
+
//# sourceMappingURL=Display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Display.js","sources":["../../../../Contracts/Announcements/Display.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// **DO NOT EDIT** - This file is an automatically generated file.\n// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Contracts.Announcements.Display. Time: 2026-10-31T10:10:27.5324770Z. Hash: 8138A7B492877AA7B8990D1C633B6B783F1DD9E31497F5A502CD4AA26C2B3A02\n/**\n * How an announcement is presented to the people it reaches.\n */\nexport enum Display {\n banner = 0,\n dialogOnce = 1,\n dialogEverySession = 2,\n}\n"],"names":["Display"],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;;IAGO,IAAKA,OAAAA,iBAAAA,SAAAA,OAAAA,EAAAA;AACC,IAAA,OAAA,CAAA,OAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA;AACI,IAAA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAA;AACQ,IAAA,OAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,oBAAA;AAHbA,IAAAA,OAAAA,OAAAA;AAIX,CAAA,CAAA,EAAA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Importance.d.ts","sourceRoot":"","sources":["../../../../Contracts/Announcements/Importance.ts"],"names":[],"mappings":"AAQA,oBAAY,UAAU;IAClB,WAAW,IAAI;IACf,OAAO,IAAI;IACX,QAAQ,IAAI;CACf"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
// **DO NOT EDIT** - This file is an automatically generated file.
|
|
6
|
+
// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Contracts.Announcements.Importance. Time: 2026-10-31T10:10:27.5324770Z. Hash: 45D4C95C53A74F27B49CC472238A01A07AE80E8319DC7139C94B48A9727835E4
|
|
7
|
+
/**
|
|
8
|
+
* How much attention an announcement asks for.
|
|
9
|
+
*/ var Importance = /*#__PURE__*/ function(Importance) {
|
|
10
|
+
Importance[Importance["information"] = 0] = "information";
|
|
11
|
+
Importance[Importance["warning"] = 1] = "warning";
|
|
12
|
+
Importance[Importance["critical"] = 2] = "critical";
|
|
13
|
+
return Importance;
|
|
14
|
+
}({});
|
|
15
|
+
|
|
16
|
+
exports.Importance = Importance;
|
|
17
|
+
//# sourceMappingURL=Importance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Importance.js","sources":["../../../../Contracts/Announcements/Importance.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// **DO NOT EDIT** - This file is an automatically generated file.\n// @generated by Cratis. Source: Cratis.Showrunner.Marquee.Contracts.Announcements.Importance. Time: 2026-10-31T10:10:27.5324770Z. Hash: 45D4C95C53A74F27B49CC472238A01A07AE80E8319DC7139C94B48A9727835E4\n/**\n * How much attention an announcement asks for.\n */\nexport enum Importance {\n information = 0,\n warning = 1,\n critical = 2,\n}\n"],"names":["Importance"],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;;IAGO,IAAKA,UAAAA,iBAAAA,SAAAA,UAAAA,EAAAA;AACM,IAAA,UAAA,CAAA,UAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAA;AACJ,IAAA,UAAA,CAAA,UAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAA;AACC,IAAA,UAAA,CAAA,UAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;AAHHA,IAAAA,OAAAA,UAAAA;AAIX,CAAA,CAAA,EAAA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Contracts/Announcements/index.ts"],"names":[],"mappings":"AAGA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ChangeSet, ObservableQueryFor, QueryResultWithState, Sorting, SortingActions, SortingActionsForObservableQuery } from '@cratis/arc/queries';
|
|
2
|
+
import { ObservableQueryWhen, SetPage, SetPageSize, SetSorting } from '@cratis/arc.react/queries';
|
|
3
|
+
import { SliceLocation as ArcSliceLocation, ParameterDescriptor } from '@cratis/arc/reflection';
|
|
4
|
+
import { Guid } from '@cratis/fundamentals';
|
|
5
|
+
import { Display } from '../Contracts/Announcements/Display';
|
|
6
|
+
import { Importance } from '../Contracts/Announcements/Importance';
|
|
7
|
+
declare class AnnouncementsForMeSortBy {
|
|
8
|
+
readonly query: AnnouncementsForMe;
|
|
9
|
+
private _activeFrom;
|
|
10
|
+
private _activeUntil;
|
|
11
|
+
private _body;
|
|
12
|
+
private _display;
|
|
13
|
+
private _id;
|
|
14
|
+
private _importance;
|
|
15
|
+
private _title;
|
|
16
|
+
constructor(query: AnnouncementsForMe);
|
|
17
|
+
get activeFrom(): SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
18
|
+
get activeUntil(): SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
19
|
+
get body(): SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
20
|
+
get display(): SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
21
|
+
get id(): SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
22
|
+
get importance(): SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
23
|
+
get title(): SortingActionsForObservableQuery<AnnouncementForMe[]>;
|
|
24
|
+
}
|
|
25
|
+
declare class AnnouncementsForMeSortByWithoutQuery {
|
|
26
|
+
private _activeFrom;
|
|
27
|
+
private _activeUntil;
|
|
28
|
+
private _body;
|
|
29
|
+
private _display;
|
|
30
|
+
private _id;
|
|
31
|
+
private _importance;
|
|
32
|
+
private _title;
|
|
33
|
+
get activeFrom(): SortingActions;
|
|
34
|
+
get activeUntil(): SortingActions;
|
|
35
|
+
get body(): SortingActions;
|
|
36
|
+
get display(): SortingActions;
|
|
37
|
+
get id(): SortingActions;
|
|
38
|
+
get importance(): SortingActions;
|
|
39
|
+
get title(): SortingActions;
|
|
40
|
+
}
|
|
41
|
+
export declare class AnnouncementsForMe extends ObservableQueryFor<AnnouncementForMe[]> {
|
|
42
|
+
static readonly sliceLocation: ArcSliceLocation;
|
|
43
|
+
readonly route: string;
|
|
44
|
+
readonly queryName: string;
|
|
45
|
+
readonly treatWarningsAsErrors: boolean;
|
|
46
|
+
readonly roles: string[];
|
|
47
|
+
readonly defaultValue: AnnouncementForMe[];
|
|
48
|
+
private readonly _sortBy;
|
|
49
|
+
private static readonly _sortBy;
|
|
50
|
+
constructor();
|
|
51
|
+
get requiredRequestParameters(): string[];
|
|
52
|
+
readonly parameterDescriptors: ParameterDescriptor[];
|
|
53
|
+
get sortBy(): AnnouncementsForMeSortBy;
|
|
54
|
+
static get sortBy(): AnnouncementsForMeSortByWithoutQuery;
|
|
55
|
+
static use(sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting];
|
|
56
|
+
static useWithPaging(pageSize: number, sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting, SetPage, SetPageSize];
|
|
57
|
+
static useSuspense(sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting];
|
|
58
|
+
static useSuspenseWithPaging(pageSize: number, sorting?: Sorting): [QueryResultWithState<AnnouncementForMe[]>, SetSorting, SetPage, SetPageSize];
|
|
59
|
+
static useChangeStream(getKey?: (item: AnnouncementForMe) => unknown, sorting?: Sorting): ChangeSet<AnnouncementForMe>;
|
|
60
|
+
static when(condition: boolean): ObservableQueryWhen<AnnouncementsForMe, AnnouncementForMe[]>;
|
|
61
|
+
}
|
|
62
|
+
export declare class AnnouncementForMe {
|
|
63
|
+
id: Guid;
|
|
64
|
+
title: string;
|
|
65
|
+
body: string;
|
|
66
|
+
display: Display;
|
|
67
|
+
importance: Importance;
|
|
68
|
+
activeFrom: Date;
|
|
69
|
+
activeUntil: Date;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=AnnouncementForMe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnnouncementForMe.d.ts","sourceRoot":"","sources":["../../../Viewing/AnnouncementForMe.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAU,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAC7J,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAuI,MAAM,2BAA2B,CAAC;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