@iveri/contracts 0.45.0 → 0.46.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.
@@ -0,0 +1,5 @@
1
+ /** How somebody asked to be reached. One sign-up giving both is two subscriptions. */
2
+ export declare enum ClinicNewsletterChannel {
3
+ EMAIL = "email",
4
+ PHONE = "phone"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** How somebody asked to be reached. One sign-up giving both is two subscriptions. */
2
+ export var ClinicNewsletterChannel;
3
+ (function (ClinicNewsletterChannel) {
4
+ ClinicNewsletterChannel["EMAIL"] = "email";
5
+ ClinicNewsletterChannel["PHONE"] = "phone";
6
+ })(ClinicNewsletterChannel || (ClinicNewsletterChannel = {}));
@@ -0,0 +1,25 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { ClinicNewsletterChannel } from './clinic-newsletter-channel.enum.js';
5
+ export interface ClinicNewsletterSubscriber {
6
+ id: UUID;
7
+ channel: ClinicNewsletterChannel;
8
+ address: string;
9
+ localeCode: string;
10
+ /** Always null for a phone. For an email, null until they have opened the link sent to it. */
11
+ confirmedAt: Nullable<IsoDateTime>;
12
+ consentedAt: IsoDateTime;
13
+ }
14
+ /** The newest subscribers, and how many there are in all. */
15
+ export interface ClinicNewsletterSubscriberList {
16
+ total: number;
17
+ items: ClinicNewsletterSubscriber[];
18
+ }
19
+ export interface SubscribeToClinicNewsletterRequest {
20
+ email?: Nullable<string>;
21
+ phone?: Nullable<string>;
22
+ localeCode: string;
23
+ /** Must be true. Nobody is added to a list without having said so. */
24
+ hasConsent: boolean;
25
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -7,6 +7,8 @@ export * from './clinic-lead-status.enum.js';
7
7
  export * from './clinic-lead.type.js';
8
8
  export * from './clinic-location.type.js';
9
9
  export * from './clinic-my-appointment.type.js';
10
+ export * from './clinic-newsletter-channel.enum.js';
11
+ export * from './clinic-newsletter.type.js';
10
12
  export * from './clinic-profile.type.js';
11
13
  export * from './clinic-promotion.type.js';
12
14
  export * from './clinic-public.type.js';
@@ -7,6 +7,8 @@ export * from './clinic-lead-status.enum.js';
7
7
  export * from './clinic-lead.type.js';
8
8
  export * from './clinic-location.type.js';
9
9
  export * from './clinic-my-appointment.type.js';
10
+ export * from './clinic-newsletter-channel.enum.js';
11
+ export * from './clinic-newsletter.type.js';
10
12
  export * from './clinic-profile.type.js';
11
13
  export * from './clinic-promotion.type.js';
12
14
  export * from './clinic-public.type.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {