|
| 1 | +import * as Joi from 'joi'; |
| 2 | +import { OaValidationError } from '../oaValidationError'; |
| 3 | +import * as oa from '../oa'; |
| 4 | +import * as schema from '../schema'; |
| 5 | +/** |
| 6 | + * test:AttendeeAbsentSimulateAction |
| 7 | + * |
| 8 | + * [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.] |
| 9 | + * |
| 10 | + * This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used. |
| 11 | + */ |
| 12 | +export declare type AttendeeAbsentSimulateAction = { |
| 13 | + '@type': 'AttendeeAbsentSimulateAction'; |
| 14 | + '@context'?: string | string[]; |
| 15 | + /** |
| 16 | + * The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. |
| 17 | + * |
| 18 | + */ |
| 19 | + identifier?: schema.PropertyValueOrSubClass | string; |
| 20 | + /** |
| 21 | + * The name of the item. |
| 22 | + */ |
| 23 | + name?: string; |
| 24 | + /** |
| 25 | + * A description of the item. |
| 26 | + */ |
| 27 | + description?: string; |
| 28 | + /** |
| 29 | + * A unique url based identifier for the record |
| 30 | + */ |
| 31 | + '@id'?: string; |
| 32 | + /** |
| 33 | + * The object upon which the action is carried out, whose state is kept intact or changed. |
| 34 | + * |
| 35 | + * ```json |
| 36 | + * "object": { |
| 37 | + * "@type": "SessionSeries", |
| 38 | + * "@id": "https://id.booking-system.example.com/session-series/42" |
| 39 | + * } |
| 40 | + * ``` |
| 41 | + */ |
| 42 | + object?: oa.OrderOrSubClass | oa.Event_OrSubClass; |
| 43 | + /** |
| 44 | + * The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. e.g. John wrote a book from *January* to December. For media, including audio and video, it's the time offset of the start of a clip within a larger file.\n\nNote that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. |
| 45 | + */ |
| 46 | + startTime?: string; |
| 47 | + /** |
| 48 | + * The object that helped the agent perform the action. e.g. John wrote a book with *a pen*. |
| 49 | + */ |
| 50 | + instrument?: schema.ThingOrSubClass | string; |
| 51 | + /** |
| 52 | + * Indicates the current disposition of the Action. |
| 53 | + */ |
| 54 | + actionStatus?: schema.ActionStatusTypeOrSubClass | string; |
| 55 | + /** |
| 56 | + * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. |
| 57 | + */ |
| 58 | + agent?: schema.PersonOrSubClass | schema.OrganizationOrSubClass | string; |
| 59 | + /** |
| 60 | + * Other co-agents that participated in the action indirectly. e.g. John wrote a book with *Steve*. |
| 61 | + */ |
| 62 | + participant?: schema.PersonOrSubClass | schema.OrganizationOrSubClass | string; |
| 63 | + /** |
| 64 | + * Indicates a target EntryPoint for an Action. |
| 65 | + */ |
| 66 | + target?: schema.EntryPointOrSubClass | string; |
| 67 | + /** |
| 68 | + * The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. e.g. John wrote a book from January to *December*. For media, including audio and video, it's the time offset of the end of a clip within a larger file.\n\nNote that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. |
| 69 | + */ |
| 70 | + endTime?: string; |
| 71 | + /** |
| 72 | + * For failed actions, more information on the cause of the failure. |
| 73 | + */ |
| 74 | + error?: schema.ThingOrSubClass | string; |
| 75 | + /** |
| 76 | + * The result produced in the action. e.g. John wrote *a book*. |
| 77 | + */ |
| 78 | + result?: schema.ThingOrSubClass | string; |
| 79 | + /** |
| 80 | + * The location of, for example, where an event is happening, where an organization is located, or where an action takes place. |
| 81 | + */ |
| 82 | + location?: schema.PlaceOrSubClass | string | schema.VirtualLocationOrSubClass | schema.PostalAddressOrSubClass; |
| 83 | + /** |
| 84 | + * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website. |
| 85 | + */ |
| 86 | + sameAs?: string; |
| 87 | + /** |
| 88 | + * A CreativeWork or Event about this Thing. |
| 89 | + */ |
| 90 | + subjectOf?: schema.Event_OrSubClass | schema.CreativeWorkOrSubClass | string; |
| 91 | + /** |
| 92 | + * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. |
| 93 | + */ |
| 94 | + potentialAction?: schema.ActionOrSubClass | string; |
| 95 | + /** |
| 96 | + * Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details. |
| 97 | + */ |
| 98 | + mainEntityOfPage?: schema.CreativeWorkOrSubClass | string; |
| 99 | + /** |
| 100 | + * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. |
| 101 | + */ |
| 102 | + additionalType?: string; |
| 103 | + /** |
| 104 | + * An alias for the item. |
| 105 | + */ |
| 106 | + alternateName?: string; |
| 107 | + /** |
| 108 | + * URL of the item. |
| 109 | + */ |
| 110 | + url?: string; |
| 111 | + /** |
| 112 | + * An image of the item. This can be a [[URL]] or a fully described [[ImageObject]]. |
| 113 | + */ |
| 114 | + image?: schema.ImageObjectOrSubClass | string; |
| 115 | + /** |
| 116 | + * A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation. |
| 117 | + */ |
| 118 | + disambiguatingDescription?: string; |
| 119 | +}; |
| 120 | +/** |
| 121 | + * test:AttendeeAbsentSimulateAction |
| 122 | + * |
| 123 | + * [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.] |
| 124 | + * |
| 125 | + * This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used. |
| 126 | + * |
| 127 | + * This differs from AttendeeAbsentSimulateAction because it also allows for objects that have the type of a model that |
| 128 | + * sub-classes this model. e.g. `Event_OrSubClass` allows `Event`s as well as `ScheduledSession`s, `SessionSeries`, |
| 129 | + * etc. |
| 130 | + */ |
| 131 | +export declare type AttendeeAbsentSimulateActionOrSubClass = AttendeeAbsentSimulateAction; |
| 132 | +/** |
| 133 | + * test:AttendeeAbsentSimulateAction - Validation schema (w/ JOI) |
| 134 | + * |
| 135 | + * [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.] |
| 136 | + * |
| 137 | + * This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used. |
| 138 | + */ |
| 139 | +export declare const AttendeeAbsentSimulateActionJoiSchema: Joi.ObjectSchema; |
| 140 | +/** |
| 141 | + * test:AttendeeAbsentSimulateAction - Validation schema (w/ JOI) |
| 142 | + * |
| 143 | + * [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.] |
| 144 | + * |
| 145 | + * This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used. |
| 146 | + * |
| 147 | + * This differs from AttendeeAbsentSimulateActionJoiSchema because it also allows for objects that have the type of a model that |
| 148 | + * sub-classes this model. e.g. `Event.OrSubClassJoiSchema` allows `Event`s as well as `ScheduledSession`s, |
| 149 | + * `SessionSeries`, etc. |
| 150 | + */ |
| 151 | +export declare const AttendeeAbsentSimulateActionOrSubClassJoiSchema: Joi.AlternativesSchema; |
| 152 | +/** |
| 153 | + * Runtime validator for test:AttendeeAbsentSimulateAction. |
| 154 | + * |
| 155 | + * If some data has a structure which matches a test:AttendeeAbsentSimulateAction, it will be returned with the correct type. |
| 156 | + * Otherwise, this function returns an OAValidationError with details about why the data does not match. |
| 157 | + * |
| 158 | + * Use this to e.g. check a JSON object received in an HTTP request. Example usage (for an express request handler): |
| 159 | + * |
| 160 | + * ```ts |
| 161 | + * const maybeAttendeeAbsentSimulateAction = validateAttendeeAbsentSimulateAction(req.body); // `req.body` will have type `any` or `unknown` |
| 162 | + * if (maybeAttendeeAbsentSimulateAction instanceof OaValidationError) { |
| 163 | + * // From this point on, `maybeAttendeeAbsentSimulateAction` will have type `OaValidationError` |
| 164 | + * const error = maybeAttendeeAbsentSimulateAction; |
| 165 | + * // Do something with the error. Maybe ignore it? Or log it? Or throw? Up to you. |
| 166 | + * } |
| 167 | + * // From this point on, `maybeAttendeeAbsentSimulateAction` will have type `AttendeeAbsentSimulateAction` |
| 168 | + * const attendeeAbsentSimulateAction = maybeAttendeeAbsentSimulateAction; |
| 169 | + * ``` |
| 170 | + */ |
| 171 | +export declare function validateAttendeeAbsentSimulateAction(maybeAttendeeAbsentSimulateAction: unknown): AttendeeAbsentSimulateAction | OaValidationError; |
0 commit comments