/** * 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 * as runtime from '../runtime'; import type { GuestResponseSchema, ResponseSchema, ResponsesSchema, SubmitGuestResponseRequestBody } from '../models/index'; export interface GuestResponseOptionsRequest { responseId: string; } export interface ListResponsesRequest { filterStatus?: ListResponsesFilterStatusEnum; filterSurveyId?: string; filterCandidateId?: string; filterCreatedFrom?: Date; filterCreatedTo?: Date; filterModifiedFrom?: Date; filterModifiedTo?: Date; pageSize?: number; pageNumber?: number; pageAfter?: string; pageBefore?: string; } export interface ResponseOptionsRequest { responseId: string; } export interface ShowGuestResponseRequest { responseId: string; tenantId: string; token: string; } export interface ShowResponseRequest { responseId: string; } export interface SubmitGuestResponseRequest { responseId: string; submitGuestResponseRequestBody: SubmitGuestResponseRequestBody; } /** * */ export declare class ResponsesApi extends runtime.BaseAPI { /** * Creates request options for guestResponseOptions without sending the request */ guestResponseOptionsRequestOpts(requestParameters: GuestResponseOptionsRequest): Promise; /** * Enable CORS by returning correct headers * Guest Response Options */ guestResponseOptionsRaw(requestParameters: GuestResponseOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Guest Response Options */ guestResponseOptions(requestParameters: GuestResponseOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for listResponses without sending the request */ listResponsesRequestOpts(requestParameters: ListResponsesRequest): Promise; /** * Returns a collection of survey responses for the caller\'s tenant. Recruiter surface - requires a session (CUSTOM authorizer); the recipient never reaches this path. Use one filter at a time (one GSI per query): - `filterStatus=completed` - answered responses - `filterSurveyId=` - responses of one survey - `filterCandidateId=` - responses sent to one candidate `answers` is keyed by questionId and absent until the recipient answers. `results` (e.g. the NPS category) are computed server-side on submit and are read-only. The NPS number itself is derived by the reader as `(promoters - detractors) / total * 100`. * List Responses */ listResponsesRaw(requestParameters: ListResponsesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a collection of survey responses for the caller\'s tenant. Recruiter surface - requires a session (CUSTOM authorizer); the recipient never reaches this path. Use one filter at a time (one GSI per query): - `filterStatus=completed` - answered responses - `filterSurveyId=` - responses of one survey - `filterCandidateId=` - responses sent to one candidate `answers` is keyed by questionId and absent until the recipient answers. `results` (e.g. the NPS category) are computed server-side on submit and are read-only. The NPS number itself is derived by the reader as `(promoters - detractors) / total * 100`. * List Responses */ listResponses(requestParameters?: ListResponsesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for responseOptions without sending the request */ responseOptionsRequestOpts(requestParameters: ResponseOptionsRequest): Promise; /** * Enable CORS by returning correct headers * Response Options */ responseOptionsRaw(requestParameters: ResponseOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Response Options */ responseOptions(requestParameters: ResponseOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for responsesOptions without sending the request */ responsesOptionsRequestOpts(): Promise; /** * Enable CORS by returning correct headers * Responses Options */ responsesOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Responses Options */ responsesOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for showGuestResponse without sending the request */ showGuestResponseRequestOpts(requestParameters: ShowGuestResponseRequest): Promise; /** * Recipient opens the survey link from the email. There is no authorizer on this path: auth is `tenantId` + `token` (the per-response accessToken minted at create) read from the link query string, never a session. The response is an explicit allowlist - status, languageCode, candidateName, jobTitle, companyName, title, questions, answers, expiresAt, respondedAt. `title` and `questions` are the SNAPSHOT of the published survey definition stamped at mint time. No `meta` (it holds the accessToken), no candidateId / jobId, no surveyId / surveyVersion, no results, no relationships. A pending response past `expiresAt` reads back with status `expired`; an answered one reads back `completed` with the stored answers so the FE renders the thank-you state. Every failure mode (unknown tenant, unknown response, wrong token) collapses to the same 404 - existence is never leaked. * Show Guest Response */ showGuestResponseRaw(requestParameters: ShowGuestResponseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Recipient opens the survey link from the email. There is no authorizer on this path: auth is `tenantId` + `token` (the per-response accessToken minted at create) read from the link query string, never a session. The response is an explicit allowlist - status, languageCode, candidateName, jobTitle, companyName, title, questions, answers, expiresAt, respondedAt. `title` and `questions` are the SNAPSHOT of the published survey definition stamped at mint time. No `meta` (it holds the accessToken), no candidateId / jobId, no surveyId / surveyVersion, no results, no relationships. A pending response past `expiresAt` reads back with status `expired`; an answered one reads back `completed` with the stored answers so the FE renders the thank-you state. Every failure mode (unknown tenant, unknown response, wrong token) collapses to the same 404 - existence is never leaked. * Show Guest Response */ showGuestResponse(requestParameters: ShowGuestResponseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for showResponse without sending the request */ showResponseRequestOpts(requestParameters: ShowResponseRequest): Promise; /** * Returns a single survey response, including the question snapshot the recipient saw, their `answers` and the server-computed `results`. Recruiter surface - requires a session (CUSTOM authorizer). Free-text answers are recipient-authored - treat them as untrusted content and never feed them to an LLM. * Show Response */ showResponseRaw(requestParameters: ShowResponseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a single survey response, including the question snapshot the recipient saw, their `answers` and the server-computed `results`. Recruiter surface - requires a session (CUSTOM authorizer). Free-text answers are recipient-authored - treat them as untrusted content and never feed them to an LLM. * Show Response */ showResponse(requestParameters: ShowResponseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for submitGuestResponse without sending the request */ submitGuestResponseRequestOpts(requestParameters: SubmitGuestResponseRequest): Promise; /** * Recipient answers the survey. There is no authorizer on this path: auth is `meta.tenantId` + `meta.accessToken` from the emailed link, never a session. `answers` is an object keyed by the snapshot\'s questionIds. Value shape per question type: scale -> integer within scaleMin..scaleMax; single-choice -> one option `value` slug; multiple-choice -> array of unique option `value` slugs; open-text -> string (maxLength). Every answer is validated against the row\'s snapshot - unknown questionIds, missing required answers, out-of-range scales, unknown option slugs and over-length text are all rejected in ONE 400 with per-question detail. `results` (e.g. the NPS category) are computed server-side and are read-only - a client-supplied value is ignored. Single use: allowed only from status `pending` and only before `expiresAt`. A second submit is a 400-class error, never a silent overwrite. Token mismatch returns the same 404 as an unknown response. The response carries the same guest allowlist as showGuestResponse. * Submit Guest Response */ submitGuestResponseRaw(requestParameters: SubmitGuestResponseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Recipient answers the survey. There is no authorizer on this path: auth is `meta.tenantId` + `meta.accessToken` from the emailed link, never a session. `answers` is an object keyed by the snapshot\'s questionIds. Value shape per question type: scale -> integer within scaleMin..scaleMax; single-choice -> one option `value` slug; multiple-choice -> array of unique option `value` slugs; open-text -> string (maxLength). Every answer is validated against the row\'s snapshot - unknown questionIds, missing required answers, out-of-range scales, unknown option slugs and over-length text are all rejected in ONE 400 with per-question detail. `results` (e.g. the NPS category) are computed server-side and are read-only - a client-supplied value is ignored. Single use: allowed only from status `pending` and only before `expiresAt`. A second submit is a 400-class error, never a silent overwrite. Token mismatch returns the same 404 as an unknown response. The response carries the same guest allowlist as showGuestResponse. * Submit Guest Response */ submitGuestResponse(requestParameters: SubmitGuestResponseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * @export */ export declare const ListResponsesFilterStatusEnum: { readonly Pending: "pending"; readonly Completed: "completed"; readonly Expired: "expired"; }; export type ListResponsesFilterStatusEnum = typeof ListResponsesFilterStatusEnum[keyof typeof ListResponsesFilterStatusEnum]; //# sourceMappingURL=ResponsesApi.d.ts.map