/** * SmartyMeet Dev03 API REST * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.1 * Contact: developer@smartymeet.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { ResourceTimestampsSchema } from './ResourceTimestampsSchema'; /** * * @export * @interface FormAttributesSchema */ export interface FormAttributesSchema { /** * * @type {string} * @memberof FormAttributesSchema */ name: string; /** * * @type {string} * @memberof FormAttributesSchema */ status?: string; /** * Role marker. Identifies which downstream resource this form's * submission becomes: * - jobBrief: produces a Brief about a Job (email/api intake; * consumed by the create-job-from-brief workflow). * - candidateSubmission: produces a Submission about a * Candidate (apply form intake). * - talentSubmission: produces a Submission about a Talent. * - general: catch-all / undecided. * Tenant pins one form per kind as its default via * `tenant.relationships.forms`. Mirrors the role-marker pattern * used on Feedback (`stage`). * @type {FormAttributesSchemaKindEnum} * @memberof FormAttributesSchema */ kind?: FormAttributesSchemaKindEnum; /** * * @type {string} * @memberof FormAttributesSchema */ shortCode?: string; /** * The field schema, JSON-encoded: a flat map of `fieldId -> field`. * A field carries `label` and `description` as locale maps, a * `type` (text, textarea, select, checkbox, file, email, phone, * date, number), `required`, and for a select an `options` list of * `{value, label}` - the candidate submits `value`, never the * localized label. * * A knockout field adds `knockout: true`, `verifies` (the criterion * it gates on) and `expectedAnswer` (the PASSING answer, matching * one of the option values for a select). The submission gate * rejects a candidate on a failed knockout without any AI spend, so * a knockout missing `expectedAnswer` is refused: the gate would * skip it and admit everyone. A knockout on a checkbox is refused * too - a required checkbox renders as must-tick, so "No" cannot be * expressed and the gate could never fire. * * Every label and option label must carry text in the form's * `languageCode` or in `en-US` - the locales the apply page falls * back to. A label that resolves in neither renders blank for the * candidate and is refused. * * An apply form (`kind: candidateSubmission`) must keep the * `fullName`, `email`, `phone` and `cv` fields: the apply page maps * them onto first-class submission slots. * * Rejections come back as one error object per violation, each with * a `source.pointer` at the offending field. Limit: 131072 bytes. * @type {string} * @memberof FormAttributesSchema */ content?: string; /** * Publish transition. `true` mirrors `content` to the CDN and flips * the form to `active`, the state guest submission intake requires. * Send it on the same PATCH that carries the edit, or on its own to * republish what is already stored. Needs the recruiting tier or * above; publishing a form with no content is a 400. * @type {boolean} * @memberof FormAttributesSchema */ publish?: boolean; /** * The form's own language as a BCP-47 tag (e.g. `pl-PL`). Stamped by * the build pipeline; settable at create and changeable by PATCH. * * It is part of the RENDER FALLBACK CHAIN: the apply page tries the * candidate's locale, then this one, then `en-US`. Every label and * option label must resolve somewhere in that chain - in this locale * OR in `en-US`, not necessarily both. A form with no `languageCode` * is held to `en-US` alone. Change it and the labels in the same * PATCH; the new text is validated against the new chain. * @type {string} * @memberof FormAttributesSchema */ languageCode?: string; /** * Optimistic-concurrency token, bumped atomically on every write. * Send it back as `If-Match: ""` on PATCH to make the * write conditional; a mismatch is a 409 `SM_FORM_STALE`, meaning * someone else saved since your read. Without the header the write * is unconditional and the last writer wins - which for a form * means silently replacing the whole field schema. * @type {number} * @memberof FormAttributesSchema */ readonly revision?: number; /** * Fill missing locales on the field schema, asynchronously. Fires * after the write lands, so it can ride the same PATCH as an edit or * be sent alone. Targets the tenant's active languages plus the * form's own `languageCode`, translating FROM the `en-US` text - a * field with no `en-US` label is skipped rather than invented. * * Fill-only-missing: text already present in a locale is never * overwritten, and an operator edit that lands mid-run wins (the * fill re-merges only what is still missing). Field ids, * `options[].value`, `knockout`, `verifies` and `expectedAnswer` are * never touched, so the tokens the submission gate compares survive. * * The outcome lands in `meta.translation` * (`status`, `translated`, `locales`, `startedAt`, `finishedAt`); * poll `showForm` for it. Publishing is separate: the filled text * reaches the apply page on the next `publish: true`. * @type {boolean} * @memberof FormAttributesSchema */ translate?: boolean; /** * Where the published document lives. Server-managed: the server * owns the key it wrote, so never compose this URL client-side - a * URL built from the wrong tenant shortCode is indistinguishable * from a correct one. * @type {string} * @memberof FormAttributesSchema */ readonly publishedUrl?: string; /** * * @type {string} * @memberof FormAttributesSchema */ ttl?: string; /** * * @type {string} * @memberof FormAttributesSchema */ source?: string; /** * * @type {ResourceTimestampsSchema} * @memberof FormAttributesSchema */ timestamps?: ResourceTimestampsSchema; } /** * @export */ export declare const FormAttributesSchemaKindEnum: { readonly JobBrief: "jobBrief"; readonly CandidateSubmission: "candidateSubmission"; readonly TalentSubmission: "talentSubmission"; readonly General: "general"; }; export type FormAttributesSchemaKindEnum = typeof FormAttributesSchemaKindEnum[keyof typeof FormAttributesSchemaKindEnum]; /** * Check if a given object implements the FormAttributesSchema interface. */ export declare function instanceOfFormAttributesSchema(value: object): value is FormAttributesSchema; export declare function FormAttributesSchemaFromJSON(json: any): FormAttributesSchema; export declare function FormAttributesSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): FormAttributesSchema; export declare function FormAttributesSchemaToJSON(json: any): FormAttributesSchema; export declare function FormAttributesSchemaToJSONTyped(value?: Omit | null, ignoreDiscriminator?: boolean): any; //# sourceMappingURL=FormAttributesSchema.d.ts.map