@chronicle.app/schema 0.4.0 → 0.5.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,166 @@
1
+ import { sha256 } from '@noble/hashes/sha2.js';
2
+ /**
3
+ * The source a node identified by nothing but its URL belongs to. A URL is a
4
+ * portable identifier, like an email address or a phone number, so it belongs
5
+ * to no product, whichever source saw it.
6
+ */
7
+ export const URL_SOURCE = 'url';
8
+ /**
9
+ * Deep, recursive, stable-key canonicalization: object keys are sorted at
10
+ * every level and undefined values dropped, so equal content always produces
11
+ * identical bytes. Array order is kept, since it means something. A `Date` is
12
+ * the ISO string a store gets for it, once it's serialized.
13
+ */
14
+ export function canonicalize(value) {
15
+ if (value instanceof Date) {
16
+ return value.toISOString();
17
+ }
18
+ if (Array.isArray(value)) {
19
+ return value.map(v => canonicalize(v));
20
+ }
21
+ if (value !== null && typeof value === 'object') {
22
+ const source = value;
23
+ const out = {};
24
+ for (const key of Object.keys(source).sort()) {
25
+ const v = canonicalize(source[key]);
26
+ if (v !== undefined)
27
+ out[key] = v;
28
+ }
29
+ return out;
30
+ }
31
+ return value;
32
+ }
33
+ /** Canonical JSON: the same string whatever order the keys were added in. */
34
+ export function canonicalJson(value) {
35
+ return JSON.stringify(canonicalize(value));
36
+ }
37
+ const BASE32 = 'abcdefghijklmnopqrstuvwxyz234567';
38
+ /**
39
+ * Lowercase base32 (RFC 4648, no padding) of the sha256 of the bytes: 52
40
+ * characters, shorter than hex and safe in URLs and on case-insensitive
41
+ * filesystems.
42
+ */
43
+ export function base32Sha256(bytes) {
44
+ const bits = Array.from(sha256(bytes), byte => byte.toString(2).padStart(8, '0')).join('');
45
+ let out = '';
46
+ for (let i = 0; i < bits.length; i += 5) {
47
+ out += BASE32[Number.parseInt(bits.slice(i, i + 5).padEnd(5, '0'), 2)];
48
+ }
49
+ return out;
50
+ }
51
+ /**
52
+ * The hash of a keyset: the base32 sha256 of its canonical JSON, the same
53
+ * however its keys are ordered.
54
+ */
55
+ export function generateKeysetCID(keyset) {
56
+ // An empty keyset would hash to one key shared by every record that has one.
57
+ if (Object.keys(keyset).length === 0) {
58
+ throw new Error('Cannot compute a content key for an empty object — it carries no identity.');
59
+ }
60
+ return base32Sha256(new TextEncoder().encode(canonicalJson(keyset)));
61
+ }
62
+ /**
63
+ * The keyset a node's `@key` names: each field's value by its path, with dots
64
+ * and `[*]` splats followed into nested values and a list joined with commas.
65
+ * `source` is the source given, and an `action.` field is read from the action
66
+ * the node is in. A computed entry `{ key, value }` is `key:value`. Fields
67
+ * with no value are left out, and a keyset with none is null, so it never
68
+ * names one node shared by unrelated records. A key of nothing but `url` is
69
+ * the `url` source's, so it names the same node whichever source saw it.
70
+ */
71
+ export function keysetOf(node, source, actionContext) {
72
+ const keyFields = node['@key'];
73
+ if (!keyFields || keyFields.length === 0)
74
+ return null;
75
+ const keyset = {};
76
+ for (const field of keyFields) {
77
+ if (typeof field === 'string') {
78
+ if (field.startsWith('action.') && actionContext) {
79
+ const value = extractNestedValue(actionContext, field.slice(7));
80
+ if (value !== undefined && value !== null)
81
+ keyset[field] = value;
82
+ }
83
+ else {
84
+ const value = field === 'source' ? source : extractNestedValue(node, field);
85
+ if (value !== undefined && value !== null) {
86
+ keyset[field] = Array.isArray(value) ? value.join(',') : value;
87
+ }
88
+ }
89
+ }
90
+ else if (typeof field === 'object' && field.key && field.value !== undefined) {
91
+ keyset[`${field.key}:${field.value}`] = field.value;
92
+ }
93
+ }
94
+ if (Object.keys(keyset).length === 0)
95
+ return null;
96
+ if (Object.keys(keyset).length === 1 && typeof keyset.url === 'string') {
97
+ return { source: URL_SOURCE, url: keyset.url };
98
+ }
99
+ return keyset;
100
+ }
101
+ /**
102
+ * A node's identity: the hash of the keyset its `@key` names, or its `@id`,
103
+ * which is that hash already. With both, they must agree. With neither, it's
104
+ * its `url`, as the `url` source's, or else its `attachmentCid`, the stored
105
+ * file it is. `source` is the node's own unless given, as for a node in a
106
+ * record of that source that names none.
107
+ */
108
+ export function nodeKey(node, source = fieldOf(node, 'source'), actionContext) {
109
+ const keyset = keysetOf(node, source, actionContext);
110
+ const derived = keyset ? generateKeysetCID(keyset) : undefined;
111
+ const id = typeof node['@id'] === 'string' && node['@id'] ? node['@id'] : undefined;
112
+ if (id && derived && id !== derived) {
113
+ throw new Error(`Entity @id (${id}) does not match the hash of its @key keyset (${derived}). ` +
114
+ `Entity type: ${String(node['@type'] ?? 'unknown')}, source: ${source}`);
115
+ }
116
+ const fallback = (field, keyset) => {
117
+ const value = fieldOf(node, field);
118
+ return value ? generateKeysetCID(keyset(value)) : undefined;
119
+ };
120
+ const key = id ??
121
+ derived ??
122
+ fallback('url', url => ({ source: URL_SOURCE, url })) ??
123
+ fallback('attachmentCid', attachmentCid => ({ attachmentCid }));
124
+ if (!key) {
125
+ throw new Error(`Entity carries neither @key nor @id — no usable identity. Entity type: ${String(node['@type'] ?? 'unknown')}, source: ${source}`);
126
+ }
127
+ return key;
128
+ }
129
+ /** A node's field, when it's a string. */
130
+ function fieldOf(node, field) {
131
+ const value = node[field];
132
+ return typeof value === 'string' ? value : undefined;
133
+ }
134
+ function extractNestedValue(obj, path) {
135
+ if (!obj)
136
+ return undefined;
137
+ const parts = path.split('.');
138
+ let current = obj;
139
+ for (let i = 0; i < parts.length; i++) {
140
+ const part = parts[i];
141
+ if (part.includes('[*]')) {
142
+ const arrayProp = part.replace('[*]', '');
143
+ if (current && typeof current === 'object' && arrayProp in current) {
144
+ const arrayValue = current[arrayProp];
145
+ if (Array.isArray(arrayValue)) {
146
+ const remainingPath = parts.slice(i + 1).join('.');
147
+ if (remainingPath) {
148
+ return arrayValue
149
+ .map(item => extractNestedValue(item, remainingPath))
150
+ .filter(val => val !== undefined);
151
+ }
152
+ return arrayValue;
153
+ }
154
+ return undefined;
155
+ }
156
+ return undefined;
157
+ }
158
+ if (current && typeof current === 'object' && part in current) {
159
+ current = current[part];
160
+ }
161
+ else {
162
+ return undefined;
163
+ }
164
+ }
165
+ return current;
166
+ }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './schema.js';
2
2
  export { isDateTime, isInstant } from './datetime.js';
3
+ export { type KeyedNode, URL_SOURCE, base32Sha256, canonicalJson, canonicalize, generateKeysetCID, keysetOf, nodeKey, } from './identity.js';
3
4
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './schema.js';
2
2
  export { isDateTime, isInstant } from './datetime.js';
3
+ export { URL_SOURCE, base32Sha256, canonicalJson, canonicalize, generateKeysetCID, keysetOf, nodeKey, } from './identity.js';
package/dist/schema.d.ts CHANGED
@@ -1,9 +1,16 @@
1
- export declare const SCHEMA_VERSION: "0.3.0";
1
+ export declare const SCHEMA_VERSION: "0.4.0";
2
2
  import { z } from 'zod';
3
3
  export type KeyField = string | {
4
4
  key: string;
5
5
  value: string;
6
6
  };
7
+ /** Inverse property name → the forward property it reverses. */
8
+ export declare const INVERSE_PROPERTIES: Record<string, string>;
9
+ /** Metric property name → the form its values take and the unit they are in. */
10
+ export declare const METRIC_PROPERTIES: Record<string, {
11
+ metric: 'gauge' | 'sum';
12
+ unit: string;
13
+ }>;
7
14
  export interface Base {
8
15
  '@type': 'Base';
9
16
  source?: string;
@@ -25,7 +32,7 @@ export interface Entity extends Omit<Base, '@type'> {
25
32
  description?: string;
26
33
  emblem?: ImageObjectAndChildren;
27
34
  handle?: string;
28
- inAccount?: AgentAndChildren[];
35
+ inAccount?: (AgentAndChildren | FinancialAccountAndChildren)[];
29
36
  inRealm?: RealmAndChildren;
30
37
  isPartOf?: EntityAndChildren[];
31
38
  location?: LocationAndChildren | PlaceAndChildren;
@@ -34,8 +41,10 @@ export interface Entity extends Omit<Base, '@type'> {
34
41
  sameAs?: (EntityAndChildren | string)[];
35
42
  tags?: string[];
36
43
  url?: string;
44
+ hasPart?: EntityAndChildren[];
45
+ resultOf?: ActionAndChildren[];
37
46
  }
38
- export type EntityAndChildren = Entity | AgentAndChildren | CommandAndChildren | CreativeWorkAndChildren | EventAndChildren | IntangibleAndChildren | JourneyAndChildren | MealAndChildren | PhysicalObjectAndChildren | PlaceAndChildren | ProductModelAndChildren | RealmAndChildren | SessionAndChildren | TagAndChildren | TaskAndChildren;
47
+ export type EntityAndChildren = Entity | AgentAndChildren | CommandAndChildren | CreativeWorkAndChildren | EventAndChildren | IntangibleAndChildren | MealAndChildren | PhysicalObjectAndChildren | PlaceAndChildren | ProductModelAndChildren | RealmAndChildren | SessionAndChildren | TagAndChildren | TaskAndChildren;
39
48
  export declare const EntitySchema: z.ZodType<Entity>;
40
49
  export interface CreativeWork extends Omit<Entity, '@type'> {
41
50
  '@type': 'CreativeWork';
@@ -46,10 +55,13 @@ export interface CreativeWork extends Omit<Entity, '@type'> {
46
55
  isBasedOn?: CreativeWorkAndChildren[];
47
56
  publisher?: OrganizationAndChildren[];
48
57
  references?: EntityAndChildren[];
58
+ rendition?: MediaObjectAndChildren[];
59
+ series?: CreativeWorkAndChildren[];
49
60
  sourceFormat?: string;
50
61
  visibility?: string;
62
+ webFeed?: string[];
51
63
  }
52
- export type CreativeWorkAndChildren = CreativeWork | ArticleAndChildren | BookAndChildren | ChangesetAndChildren | ChannelAndChildren | CollectionAndChildren | MediaObjectAndChildren | MessageAndChildren | MusicAlbumAndChildren | MusicRecordingAndChildren | PodcastEpisodeAndChildren | PostAndChildren | QueryAndChildren | QuotationAndChildren | RepositoryAndChildren | ResponseAndChildren | RevisionAndChildren | SoftwareAndChildren | SoftwareSourceCodeAndChildren;
64
+ export type CreativeWorkAndChildren = CreativeWork | ArticleAndChildren | BookAndChildren | ChangesetAndChildren | ChannelAndChildren | CollectionAndChildren | MediaObjectAndChildren | MessageAndChildren | MovingImageAndChildren | MusicAlbumAndChildren | MusicRecordingAndChildren | NoteAndChildren | PodcastEpisodeAndChildren | PodcastSeriesAndChildren | PostAndChildren | QueryAndChildren | QuotationAndChildren | RepositoryAndChildren | ResponseAndChildren | RevisionAndChildren | SoftwareAndChildren | SoftwareSourceCodeAndChildren | StillImageAndChildren;
53
65
  export declare const CreativeWorkSchema: z.ZodType<CreativeWork>;
54
66
  export interface Software extends Omit<CreativeWork, '@type'> {
55
67
  '@type': 'Software';
@@ -73,7 +85,7 @@ export interface Action extends Omit<Base, '@type'> {
73
85
  target?: EntityAndChildren;
74
86
  timestamp?: Date | string;
75
87
  }
76
- export type ActionAndChildren = Action | AcceptActionAndChildren | AssessActionAndChildren | CancelActionAndChildren | CompleteActionAndChildren | ConsumeActionAndChildren | CreateActionAndChildren | DeleteActionAndChildren | ExecuteActionAndChildren | ExperienceActionAndChildren | FindActionAndChildren | InteractActionAndChildren | MessageActionAndChildren | MoveActionAndChildren | OrganizeActionAndChildren | PlanActionAndChildren | RejectActionAndChildren | TravelActionAndChildren | UpdateActionAndChildren | VisitActionAndChildren;
88
+ export type ActionAndChildren = Action | AcceptActionAndChildren | AssessActionAndChildren | CancelActionAndChildren | CompleteActionAndChildren | ConsumeActionAndChildren | CreateActionAndChildren | DeleteActionAndChildren | ExecuteActionAndChildren | ExperienceActionAndChildren | FindActionAndChildren | InteractActionAndChildren | MeasureActionAndChildren | MessageActionAndChildren | MoveActionAndChildren | OrganizeActionAndChildren | PlanActionAndChildren | RejectActionAndChildren | TradeActionAndChildren | TravelActionAndChildren | UpdateActionAndChildren | VisitActionAndChildren;
77
89
  export declare const ActionSchema: z.ZodType<Action>;
78
90
  export interface AcceptAction extends Omit<Action, '@type'> {
79
91
  '@type': 'AcceptAction';
@@ -92,6 +104,7 @@ export type AddActionAndChildren = AddAction;
92
104
  export declare const AddActionSchema: z.ZodType<AddAction>;
93
105
  export interface Agent extends Omit<Entity, '@type'> {
94
106
  '@type': 'Agent';
107
+ likes?: EntityAndChildren[];
95
108
  memberOf?: EntityAndChildren[];
96
109
  }
97
110
  export type AgentAndChildren = Agent | OrganizationAndChildren | PersonAndChildren | SoftwareAgentAndChildren;
@@ -99,7 +112,7 @@ export declare const AgentSchema: z.ZodType<Agent>;
99
112
  export interface CreateAction extends Omit<Action, '@type'> {
100
113
  '@type': 'CreateAction';
101
114
  }
102
- export type CreateActionAndChildren = CreateAction | AnnotateActionAndChildren | PhotographActionAndChildren | PublishActionAndChildren | QuoteActionAndChildren | RecordActionAndChildren;
115
+ export type CreateActionAndChildren = CreateAction | AnnotateActionAndChildren | PhotographActionAndChildren | PublishActionAndChildren | QuoteActionAndChildren | RecordActionAndChildren | ScreenshotActionAndChildren;
103
116
  export declare const CreateActionSchema: z.ZodType<CreateAction>;
104
117
  export interface AnnotateAction extends Omit<CreateAction, '@type'> {
105
118
  '@type': 'AnnotateAction';
@@ -119,8 +132,10 @@ export declare const AssessActionSchema: z.ZodType<AssessAction>;
119
132
  export interface MediaObject extends Omit<CreativeWork, '@type'> {
120
133
  '@type': 'MediaObject';
121
134
  contentPath?: string;
135
+ contentSize?: number;
122
136
  mimeType?: string;
123
137
  snapshotOf?: EntityAndChildren[];
138
+ renditionOf?: CreativeWorkAndChildren[];
124
139
  }
125
140
  export type MediaObjectAndChildren = MediaObject | AudioObjectAndChildren | DocumentObjectAndChildren | ImageObjectAndChildren | VideoObjectAndChildren;
126
141
  export declare const MediaObjectSchema: z.ZodType<MediaObject>;
@@ -167,7 +182,7 @@ export declare const InteractActionSchema: z.ZodType<InteractAction>;
167
182
  export interface CommunicateAction extends Omit<InteractAction, '@type'> {
168
183
  '@type': 'CommunicateAction';
169
184
  }
170
- export type CommunicateActionAndChildren = CommunicateAction | CallActionAndChildren | CheckInActionAndChildren;
185
+ export type CommunicateActionAndChildren = CommunicateAction | CallActionAndChildren | CheckInActionAndChildren | ShareActionAndChildren;
171
186
  export declare const CommunicateActionSchema: z.ZodType<CommunicateAction>;
172
187
  export interface CallAction extends Omit<CommunicateAction, '@type'> {
173
188
  '@type': 'CallAction';
@@ -176,13 +191,15 @@ export type CallActionAndChildren = CallAction;
176
191
  export declare const CallActionSchema: z.ZodType<CallAction>;
177
192
  export interface Session extends Omit<Entity, '@type'> {
178
193
  '@type': 'Session';
194
+ isStageOf?: SessionAndChildren;
179
195
  references?: EntityAndChildren[];
180
196
  scheduledEnd?: Date | string;
181
197
  scheduledStart?: Date | string;
182
198
  subject?: EntityAndChildren[];
183
199
  workingDirectory?: DirectoryAndChildren;
200
+ hasStage?: SessionAndChildren[];
184
201
  }
185
- export type SessionAndChildren = Session | CallSessionAndChildren | DeviceSessionAndChildren | EnrollmentAndChildren | MembershipAndChildren | RelationshipAndChildren | TenureAndChildren;
202
+ export type SessionAndChildren = Session | CallSessionAndChildren | DeviceSessionAndChildren | EnrollmentAndChildren | JourneyAndChildren | MembershipAndChildren | RelationshipAndChildren | SleepSessionAndChildren | SleepStageAndChildren | TenureAndChildren;
186
203
  export declare const SessionSchema: z.ZodType<Session>;
187
204
  export interface CallSession extends Omit<Session, '@type'> {
188
205
  '@type': 'CallSession';
@@ -198,7 +215,7 @@ export declare const CancelActionSchema: z.ZodType<CancelAction>;
198
215
  export interface Intangible extends Omit<Entity, '@type'> {
199
216
  '@type': 'Intangible';
200
217
  }
201
- export type IntangibleAndChildren = Intangible | DefinedTermAndChildren | SelectorAndChildren;
218
+ export type IntangibleAndChildren = Intangible | DefinedTermAndChildren | FinancialAccountAndChildren | FinancialPostingAndChildren | FinancialTransactionAndChildren | PaymentCardAndChildren | SelectorAndChildren;
202
219
  export declare const IntangibleSchema: z.ZodType<Intangible>;
203
220
  export interface DefinedTerm extends Omit<Intangible, '@type'> {
204
221
  '@type': 'DefinedTerm';
@@ -329,8 +346,27 @@ export declare const ExecuteActionSchema: z.ZodType<ExecuteAction>;
329
346
  export interface ExperienceAction extends Omit<Action, '@type'> {
330
347
  '@type': 'ExperienceAction';
331
348
  }
332
- export type ExperienceActionAndChildren = ExperienceAction | JoinActionAndChildren | LeaveActionAndChildren;
349
+ export type ExperienceActionAndChildren = ExperienceAction | JoinActionAndChildren | LeaveActionAndChildren | SleepActionAndChildren;
333
350
  export declare const ExperienceActionSchema: z.ZodType<ExperienceAction>;
351
+ export interface FinancialAccount extends Omit<Intangible, '@type'> {
352
+ '@type': 'FinancialAccount';
353
+ financialAccountType?: string;
354
+ }
355
+ export type FinancialAccountAndChildren = FinancialAccount;
356
+ export declare const FinancialAccountSchema: z.ZodType<FinancialAccount>;
357
+ export interface FinancialPosting extends Omit<Intangible, '@type'> {
358
+ '@type': 'FinancialPosting';
359
+ amount?: MonetaryAmountAndChildren;
360
+ }
361
+ export type FinancialPostingAndChildren = FinancialPosting;
362
+ export declare const FinancialPostingSchema: z.ZodType<FinancialPosting>;
363
+ export interface FinancialTransaction extends Omit<Intangible, '@type'> {
364
+ '@type': 'FinancialTransaction';
365
+ amount?: MonetaryAmountAndChildren;
366
+ recipient?: AgentAndChildren[];
367
+ }
368
+ export type FinancialTransactionAndChildren = FinancialTransaction;
369
+ export declare const FinancialTransactionSchema: z.ZodType<FinancialTransaction>;
334
370
  export interface FindAction extends Omit<Action, '@type'> {
335
371
  '@type': 'FindAction';
336
372
  }
@@ -344,6 +380,9 @@ export declare const FollowActionSchema: z.ZodType<FollowAction>;
344
380
  export interface ImageObject extends Omit<MediaObject, '@type'> {
345
381
  '@type': 'ImageObject';
346
382
  caption?: string;
383
+ exifData?: {
384
+ [key: string]: string | number;
385
+ };
347
386
  height?: number;
348
387
  width?: number;
349
388
  }
@@ -354,7 +393,7 @@ export interface JoinAction extends Omit<ExperienceAction, '@type'> {
354
393
  }
355
394
  export type JoinActionAndChildren = JoinAction;
356
395
  export declare const JoinActionSchema: z.ZodType<JoinAction>;
357
- export interface Journey extends Omit<Entity, '@type'> {
396
+ export interface Journey extends Omit<Session, '@type'> {
358
397
  '@type': 'Journey';
359
398
  distance?: number;
360
399
  path?: string;
@@ -370,7 +409,7 @@ export declare const LeaveActionSchema: z.ZodType<LeaveAction>;
370
409
  export interface ReactAction extends Omit<AssessAction, '@type'> {
371
410
  '@type': 'ReactAction';
372
411
  }
373
- export type ReactActionAndChildren = ReactAction | LikeActionAndChildren;
412
+ export type ReactActionAndChildren = ReactAction | LikeActionAndChildren | UnlikeActionAndChildren;
374
413
  export declare const ReactActionSchema: z.ZodType<ReactAction>;
375
414
  export interface LikeAction extends Omit<ReactAction, '@type'> {
376
415
  '@type': 'LikeAction';
@@ -385,7 +424,7 @@ export declare const ListenActionSchema: z.ZodType<ListenAction>;
385
424
  export interface StructuredValue {
386
425
  '@type': 'StructuredValue';
387
426
  }
388
- export type StructuredValueAndChildren = StructuredValue | LocationAndChildren;
427
+ export type StructuredValueAndChildren = StructuredValue | LocationAndChildren | MonetaryAmountAndChildren;
389
428
  export declare const StructuredValueSchema: z.ZodType<StructuredValue>;
390
429
  export interface Location extends Omit<StructuredValue, '@type'> {
391
430
  '@type': 'Location';
@@ -400,6 +439,11 @@ export interface Meal extends Omit<Entity, '@type'> {
400
439
  }
401
440
  export type MealAndChildren = Meal;
402
441
  export declare const MealSchema: z.ZodType<Meal>;
442
+ export interface MeasureAction extends Omit<Action, '@type'> {
443
+ '@type': 'MeasureAction';
444
+ }
445
+ export type MeasureActionAndChildren = MeasureAction;
446
+ export declare const MeasureActionSchema: z.ZodType<MeasureAction>;
403
447
  export interface Membership extends Omit<Session, '@type'> {
404
448
  '@type': 'Membership';
405
449
  role?: string;
@@ -419,11 +463,25 @@ export interface MessageAction extends Omit<Action, '@type'> {
419
463
  }
420
464
  export type MessageActionAndChildren = MessageAction;
421
465
  export declare const MessageActionSchema: z.ZodType<MessageAction>;
466
+ export interface MonetaryAmount extends Omit<StructuredValue, '@type'> {
467
+ '@type': 'MonetaryAmount';
468
+ currency?: string;
469
+ value?: number;
470
+ }
471
+ export type MonetaryAmountAndChildren = MonetaryAmount;
472
+ export declare const MonetaryAmountSchema: z.ZodType<MonetaryAmount>;
422
473
  export interface MoveAction extends Omit<Action, '@type'> {
423
474
  '@type': 'MoveAction';
424
475
  }
425
476
  export type MoveActionAndChildren = MoveAction | NavigateActionAndChildren;
426
477
  export declare const MoveActionSchema: z.ZodType<MoveAction>;
478
+ export interface MovingImage extends Omit<CreativeWork, '@type'> {
479
+ '@type': 'MovingImage';
480
+ caption?: string;
481
+ depicts?: EntityAndChildren[];
482
+ }
483
+ export type MovingImageAndChildren = MovingImage;
484
+ export declare const MovingImageSchema: z.ZodType<MovingImage>;
427
485
  export interface MusicAlbum extends Omit<CreativeWork, '@type'> {
428
486
  '@type': 'MusicAlbum';
429
487
  artist?: MusicGroupAndChildren[];
@@ -459,6 +517,11 @@ export interface NavigateAction extends Omit<MoveAction, '@type'> {
459
517
  }
460
518
  export type NavigateActionAndChildren = NavigateAction;
461
519
  export declare const NavigateActionSchema: z.ZodType<NavigateAction>;
520
+ export interface Note extends Omit<CreativeWork, '@type'> {
521
+ '@type': 'Note';
522
+ }
523
+ export type NoteAndChildren = Note;
524
+ export declare const NoteSchema: z.ZodType<Note>;
462
525
  export interface OperatingSystem extends Omit<Software, '@type'> {
463
526
  '@type': 'OperatingSystem';
464
527
  }
@@ -469,8 +532,37 @@ export interface PageSelector extends Omit<Selector, '@type'> {
469
532
  }
470
533
  export type PageSelectorAndChildren = PageSelector;
471
534
  export declare const PageSelectorSchema: z.ZodType<PageSelector>;
535
+ export interface TradeAction extends Omit<Action, '@type'> {
536
+ '@type': 'TradeAction';
537
+ }
538
+ export type TradeActionAndChildren = TradeAction | PayActionAndChildren;
539
+ export declare const TradeActionSchema: z.ZodType<TradeAction>;
540
+ export interface PayAction extends Omit<TradeAction, '@type'> {
541
+ '@type': 'PayAction';
542
+ }
543
+ export type PayActionAndChildren = PayAction;
544
+ export declare const PayActionSchema: z.ZodType<PayAction>;
545
+ export interface PaymentCard extends Omit<Intangible, '@type'> {
546
+ '@type': 'PaymentCard';
547
+ }
548
+ export type PaymentCardAndChildren = PaymentCard;
549
+ export declare const PaymentCardSchema: z.ZodType<PaymentCard>;
472
550
  export interface Person extends Omit<Agent, '@type'> {
473
551
  '@type': 'Person';
552
+ activeEnergyBurned?: number;
553
+ diastolicBloodPressure?: number;
554
+ heartRate?: number;
555
+ heartRateRecovery?: number;
556
+ heartRateVariabilitySdnn?: number;
557
+ heartRhythm?: string;
558
+ oxygenSaturation?: number;
559
+ respiratoryRate?: number;
560
+ restingHeartRate?: number;
561
+ sleepingWristTemperature?: number;
562
+ stepCount?: number;
563
+ systolicBloodPressure?: number;
564
+ walkingHeartRate?: number;
565
+ weight?: number;
474
566
  }
475
567
  export type PersonAndChildren = Person;
476
568
  export declare const PersonSchema: z.ZodType<Person>;
@@ -496,6 +588,11 @@ export interface PodcastEpisode extends Omit<CreativeWork, '@type'> {
496
588
  }
497
589
  export type PodcastEpisodeAndChildren = PodcastEpisode;
498
590
  export declare const PodcastEpisodeSchema: z.ZodType<PodcastEpisode>;
591
+ export interface PodcastSeries extends Omit<CreativeWork, '@type'> {
592
+ '@type': 'PodcastSeries';
593
+ }
594
+ export type PodcastSeriesAndChildren = PodcastSeries;
595
+ export declare const PodcastSeriesSchema: z.ZodType<PodcastSeries>;
499
596
  export interface Post extends Omit<CreativeWork, '@type'> {
500
597
  '@type': 'Post';
501
598
  }
@@ -575,6 +672,31 @@ export interface Revision extends Omit<CreativeWork, '@type'> {
575
672
  }
576
673
  export type RevisionAndChildren = Revision;
577
674
  export declare const RevisionSchema: z.ZodType<Revision>;
675
+ export interface ScreenshotAction extends Omit<CreateAction, '@type'> {
676
+ '@type': 'ScreenshotAction';
677
+ }
678
+ export type ScreenshotActionAndChildren = ScreenshotAction;
679
+ export declare const ScreenshotActionSchema: z.ZodType<ScreenshotAction>;
680
+ export interface ShareAction extends Omit<CommunicateAction, '@type'> {
681
+ '@type': 'ShareAction';
682
+ }
683
+ export type ShareActionAndChildren = ShareAction;
684
+ export declare const ShareActionSchema: z.ZodType<ShareAction>;
685
+ export interface SleepAction extends Omit<ExperienceAction, '@type'> {
686
+ '@type': 'SleepAction';
687
+ }
688
+ export type SleepActionAndChildren = SleepAction;
689
+ export declare const SleepActionSchema: z.ZodType<SleepAction>;
690
+ export interface SleepSession extends Omit<Session, '@type'> {
691
+ '@type': 'SleepSession';
692
+ }
693
+ export type SleepSessionAndChildren = SleepSession;
694
+ export declare const SleepSessionSchema: z.ZodType<SleepSession>;
695
+ export interface SleepStage extends Omit<Session, '@type'> {
696
+ '@type': 'SleepStage';
697
+ }
698
+ export type SleepStageAndChildren = SleepStage;
699
+ export declare const SleepStageSchema: z.ZodType<SleepStage>;
578
700
  export interface SoftwareAgent extends Omit<Agent, '@type'> {
579
701
  '@type': 'SoftwareAgent';
580
702
  }
@@ -590,6 +712,13 @@ export interface SoftwareSourceCode extends Omit<CreativeWork, '@type'> {
590
712
  }
591
713
  export type SoftwareSourceCodeAndChildren = SoftwareSourceCode;
592
714
  export declare const SoftwareSourceCodeSchema: z.ZodType<SoftwareSourceCode>;
715
+ export interface StillImage extends Omit<CreativeWork, '@type'> {
716
+ '@type': 'StillImage';
717
+ caption?: string;
718
+ depicts?: EntityAndChildren[];
719
+ }
720
+ export type StillImageAndChildren = StillImage;
721
+ export declare const StillImageSchema: z.ZodType<StillImage>;
593
722
  export interface Tag extends Omit<Entity, '@type'> {
594
723
  '@type': 'Tag';
595
724
  color?: string;
@@ -617,6 +746,11 @@ export interface TravelAction extends Omit<Action, '@type'> {
617
746
  }
618
747
  export type TravelActionAndChildren = TravelAction;
619
748
  export declare const TravelActionSchema: z.ZodType<TravelAction>;
749
+ export interface UnlikeAction extends Omit<ReactAction, '@type'> {
750
+ '@type': 'UnlikeAction';
751
+ }
752
+ export type UnlikeActionAndChildren = UnlikeAction;
753
+ export declare const UnlikeActionSchema: z.ZodType<UnlikeAction>;
620
754
  export interface Venue extends Omit<Place, '@type'> {
621
755
  '@type': 'Venue';
622
756
  }
@@ -651,14 +785,21 @@ export declare const VisitActionAndChildrenSchema: z.ZodType<VisitAction, z.ZodT
651
785
  export declare const ViewActionAndChildrenSchema: z.ZodType<ViewAction, z.ZodTypeDef, ViewAction>;
652
786
  export declare const VideoObjectAndChildrenSchema: z.ZodType<VideoObject, z.ZodTypeDef, VideoObject>;
653
787
  export declare const VenueAndChildrenSchema: z.ZodType<Venue, z.ZodTypeDef, Venue>;
788
+ export declare const UnlikeActionAndChildrenSchema: z.ZodType<UnlikeAction, z.ZodTypeDef, UnlikeAction>;
654
789
  export declare const TravelActionAndChildrenSchema: z.ZodType<TravelAction, z.ZodTypeDef, TravelAction>;
655
790
  export declare const ThreadAndChildrenSchema: z.ZodType<Thread, z.ZodTypeDef, Thread>;
656
791
  export declare const TenureAndChildrenSchema: z.ZodType<Tenure, z.ZodTypeDef, Tenure>;
657
792
  export declare const TaskAndChildrenSchema: z.ZodType<Task, z.ZodTypeDef, Task>;
658
793
  export declare const TagAndChildrenSchema: z.ZodType<Tag, z.ZodTypeDef, Tag>;
794
+ export declare const StillImageAndChildrenSchema: z.ZodType<StillImage, z.ZodTypeDef, StillImage>;
659
795
  export declare const SoftwareSourceCodeAndChildrenSchema: z.ZodType<SoftwareSourceCode, z.ZodTypeDef, SoftwareSourceCode>;
660
796
  export declare const SoftwareApplicationAndChildrenSchema: z.ZodType<SoftwareApplication, z.ZodTypeDef, SoftwareApplication>;
661
797
  export declare const SoftwareAgentAndChildrenSchema: z.ZodType<SoftwareAgent, z.ZodTypeDef, SoftwareAgent>;
798
+ export declare const SleepStageAndChildrenSchema: z.ZodType<SleepStage, z.ZodTypeDef, SleepStage>;
799
+ export declare const SleepSessionAndChildrenSchema: z.ZodType<SleepSession, z.ZodTypeDef, SleepSession>;
800
+ export declare const SleepActionAndChildrenSchema: z.ZodType<SleepAction, z.ZodTypeDef, SleepAction>;
801
+ export declare const ShareActionAndChildrenSchema: z.ZodType<ShareAction, z.ZodTypeDef, ShareAction>;
802
+ export declare const ScreenshotActionAndChildrenSchema: z.ZodType<ScreenshotAction, z.ZodTypeDef, ScreenshotAction>;
662
803
  export declare const RevisionAndChildrenSchema: z.ZodType<Revision, z.ZodTypeDef, Revision>;
663
804
  export declare const RespondActionAndChildrenSchema: z.ZodType<RespondAction, z.ZodTypeDef, RespondAction>;
664
805
  export declare const RepositoryAndChildrenSchema: z.ZodType<Repository, z.ZodTypeDef, Repository>;
@@ -674,23 +815,31 @@ export declare const PublishActionAndChildrenSchema: z.ZodType<PublishAction, z.
674
815
  export declare const ProjectAndChildrenSchema: z.ZodType<Project, z.ZodTypeDef, Project>;
675
816
  export declare const ProductModelAndChildrenSchema: z.ZodType<ProductModel, z.ZodTypeDef, ProductModel>;
676
817
  export declare const PostAndChildrenSchema: z.ZodType<Post, z.ZodTypeDef, Post>;
818
+ export declare const PodcastSeriesAndChildrenSchema: z.ZodType<PodcastSeries, z.ZodTypeDef, PodcastSeries>;
677
819
  export declare const PodcastEpisodeAndChildrenSchema: z.ZodType<PodcastEpisode, z.ZodTypeDef, PodcastEpisode>;
678
820
  export declare const PlanActionAndChildrenSchema: z.ZodType<PlanAction, z.ZodTypeDef, PlanAction>;
679
821
  export declare const PlaceAndChildrenSchema: z.ZodType<PlaceAndChildren>;
680
822
  export declare const PhotographActionAndChildrenSchema: z.ZodType<PhotographAction, z.ZodTypeDef, PhotographAction>;
681
823
  export declare const PersonAndChildrenSchema: z.ZodType<Person, z.ZodTypeDef, Person>;
824
+ export declare const PaymentCardAndChildrenSchema: z.ZodType<PaymentCard, z.ZodTypeDef, PaymentCard>;
825
+ export declare const PayActionAndChildrenSchema: z.ZodType<PayAction, z.ZodTypeDef, PayAction>;
826
+ export declare const TradeActionAndChildrenSchema: z.ZodType<TradeActionAndChildren>;
682
827
  export declare const PageSelectorAndChildrenSchema: z.ZodType<PageSelector, z.ZodTypeDef, PageSelector>;
683
828
  export declare const OperatingSystemAndChildrenSchema: z.ZodType<OperatingSystem, z.ZodTypeDef, OperatingSystem>;
829
+ export declare const NoteAndChildrenSchema: z.ZodType<Note, z.ZodTypeDef, Note>;
684
830
  export declare const NavigateActionAndChildrenSchema: z.ZodType<NavigateAction, z.ZodTypeDef, NavigateAction>;
685
831
  export declare const MusicRecordingAndChildrenSchema: z.ZodType<MusicRecording, z.ZodTypeDef, MusicRecording>;
686
832
  export declare const MusicGroupAndChildrenSchema: z.ZodType<MusicGroup, z.ZodTypeDef, MusicGroup>;
687
833
  export declare const PerformingGroupAndChildrenSchema: z.ZodType<PerformingGroupAndChildren>;
688
834
  export declare const OrganizationAndChildrenSchema: z.ZodType<OrganizationAndChildren>;
689
835
  export declare const MusicAlbumAndChildrenSchema: z.ZodType<MusicAlbum, z.ZodTypeDef, MusicAlbum>;
836
+ export declare const MovingImageAndChildrenSchema: z.ZodType<MovingImage, z.ZodTypeDef, MovingImage>;
690
837
  export declare const MoveActionAndChildrenSchema: z.ZodType<MoveActionAndChildren>;
838
+ export declare const MonetaryAmountAndChildrenSchema: z.ZodType<MonetaryAmount, z.ZodTypeDef, MonetaryAmount>;
691
839
  export declare const MessageActionAndChildrenSchema: z.ZodType<MessageAction, z.ZodTypeDef, MessageAction>;
692
840
  export declare const MessageAndChildrenSchema: z.ZodType<Message, z.ZodTypeDef, Message>;
693
841
  export declare const MembershipAndChildrenSchema: z.ZodType<Membership, z.ZodTypeDef, Membership>;
842
+ export declare const MeasureActionAndChildrenSchema: z.ZodType<MeasureAction, z.ZodTypeDef, MeasureAction>;
694
843
  export declare const MealAndChildrenSchema: z.ZodType<Meal, z.ZodTypeDef, Meal>;
695
844
  export declare const LocationAndChildrenSchema: z.ZodType<Location, z.ZodTypeDef, Location>;
696
845
  export declare const StructuredValueAndChildrenSchema: z.ZodType<StructuredValueAndChildren>;
@@ -703,6 +852,9 @@ export declare const JoinActionAndChildrenSchema: z.ZodType<JoinAction, z.ZodTyp
703
852
  export declare const ImageObjectAndChildrenSchema: z.ZodType<ImageObject, z.ZodTypeDef, ImageObject>;
704
853
  export declare const FollowActionAndChildrenSchema: z.ZodType<FollowAction, z.ZodTypeDef, FollowAction>;
705
854
  export declare const FindActionAndChildrenSchema: z.ZodType<FindAction, z.ZodTypeDef, FindAction>;
855
+ export declare const FinancialTransactionAndChildrenSchema: z.ZodType<FinancialTransaction, z.ZodTypeDef, FinancialTransaction>;
856
+ export declare const FinancialPostingAndChildrenSchema: z.ZodType<FinancialPosting, z.ZodTypeDef, FinancialPosting>;
857
+ export declare const FinancialAccountAndChildrenSchema: z.ZodType<FinancialAccount, z.ZodTypeDef, FinancialAccount>;
706
858
  export declare const ExperienceActionAndChildrenSchema: z.ZodType<ExperienceActionAndChildren>;
707
859
  export declare const ExecuteActionAndChildrenSchema: z.ZodType<ExecuteAction, z.ZodTypeDef, ExecuteAction>;
708
860
  export declare const EventAndChildrenSchema: z.ZodType<Event, z.ZodTypeDef, Event>;