/** * 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 { CreateSurveyRequestBody, SurveySchema, SurveysSchema, UpdateSurveyRequestBody } from '../models/index'; export interface CreateSurveyRequest { createSurveyRequestBody: CreateSurveyRequestBody; } export interface DeleteSurveyRequest { surveyId: string; permanentDelete?: DeleteSurveyPermanentDeleteEnum; } export interface ListSurveysRequest { filterStatus?: ListSurveysFilterStatusEnum; filterKind?: ListSurveysFilterKindEnum; filterCreatedFrom?: Date; filterCreatedTo?: Date; filterModifiedFrom?: Date; filterModifiedTo?: Date; pageSize?: number; pageNumber?: number; pageAfter?: string; pageBefore?: string; } export interface ShowSurveyRequest { surveyId: string; } export interface SurveyOptionsRequest { surveyId: string; } export interface UpdateSurveyRequest { surveyId: string; updateSurveyRequestBody: UpdateSurveyRequestBody; } /** * */ export declare class SurveysApi extends runtime.BaseAPI { /** * Creates request options for createSurvey without sending the request */ createSurveyRequestOpts(requestParameters: CreateSurveyRequest): Promise; /** * Creates a survey definition. Always born a DRAFT with `version` 0 - there is no create-and-publish shortcut; publish it with `PATCH status=active` so a survey can never go live without passing publish validation. `content` holds `{title, questions}`. Questions saved without a `questionId` get a server-assigned one. `kind` defaults to `general` and is IMMUTABLE after create (`cnps` is the candidate NPS kind the rejection workflow resolves by default). Question types: `scale` (optional `subtype: nps` pins 0-10 and enables detractor/passive/promoter classification on submit), `single-choice` / `multiple-choice` (options carry a stable slug `value` plus a locale-map `label`; recipients submit the value, never the label), `open-text` (`maxLength`, default 2000). * Create Survey */ createSurveyRaw(requestParameters: CreateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Creates a survey definition. Always born a DRAFT with `version` 0 - there is no create-and-publish shortcut; publish it with `PATCH status=active` so a survey can never go live without passing publish validation. `content` holds `{title, questions}`. Questions saved without a `questionId` get a server-assigned one. `kind` defaults to `general` and is IMMUTABLE after create (`cnps` is the candidate NPS kind the rejection workflow resolves by default). Question types: `scale` (optional `subtype: nps` pins 0-10 and enables detractor/passive/promoter classification on submit), `single-choice` / `multiple-choice` (options carry a stable slug `value` plus a locale-map `label`; recipients submit the value, never the label), `open-text` (`maxLength`, default 2000). * Create Survey */ createSurvey(requestParameters: CreateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for deleteSurvey without sending the request */ deleteSurveyRequestOpts(requestParameters: DeleteSurveyRequest): Promise; /** * Soft archive by default (`status=archived` - existing invitations keep working from their snapshots; new invitations against the survey fail). `?permanentDelete=true` removes the row. * Delete Survey */ deleteSurveyRaw(requestParameters: DeleteSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Soft archive by default (`status=archived` - existing invitations keep working from their snapshots; new invitations against the survey fail). `?permanentDelete=true` removes the row. * Delete Survey */ deleteSurvey(requestParameters: DeleteSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for listSurveys without sending the request */ listSurveysRequestOpts(requestParameters: ListSurveysRequest): Promise; /** * Returns a collection of survey definitions for the caller\'s tenant. Use one filter at a time (one GSI per query): - `filterStatus=active` - published surveys - `filterKind=cnps` - the candidate NPS kind `version` is 0 until the first publish. `publishedContent`, `version` and `publishedAt` are server-managed - they change only through the publish transition. * List Surveys */ listSurveysRaw(requestParameters: ListSurveysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a collection of survey definitions for the caller\'s tenant. Use one filter at a time (one GSI per query): - `filterStatus=active` - published surveys - `filterKind=cnps` - the candidate NPS kind `version` is 0 until the first publish. `publishedContent`, `version` and `publishedAt` are server-managed - they change only through the publish transition. * List Surveys */ listSurveys(requestParameters?: ListSurveysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for showSurvey without sending the request */ showSurveyRequestOpts(requestParameters: ShowSurveyRequest): Promise; /** * Returns a single survey definition, including the draft `content` and (after the first publish) the frozen `publishedContent` + `version`. * Show Survey */ showSurveyRaw(requestParameters: ShowSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a single survey definition, including the draft `content` and (after the first publish) the frozen `publishedContent` + `version`. * Show Survey */ showSurvey(requestParameters: ShowSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for surveyOptions without sending the request */ surveyOptionsRequestOpts(requestParameters: SurveyOptionsRequest): Promise; /** * Enable CORS by returning correct headers * Survey Options */ surveyOptionsRaw(requestParameters: SurveyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Survey Options */ surveyOptions(requestParameters: SurveyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for surveysOptions without sending the request */ surveysOptionsRequestOpts(): Promise; /** * Enable CORS by returning correct headers * Surveys Options */ surveysOptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Enable CORS by returning correct headers * Surveys Options */ surveysOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for updateSurvey without sending the request */ updateSurveyRequestOpts(requestParameters: UpdateSurveyRequest): Promise; /** * Edits the draft copy and/or runs a lifecycle transition. - `content` / `name` edits land on the DRAFT copy and change nothing live until the next publish. - `status: active` is the PUBLISH door: the effective content is publish-validated (title with en-US, 1-50 well-formed questions, unique questionIds and option values, nps pinned to 0-10), then copied to `publishedContent` with `version += 1`. Re-sending `status: active` on an already-active survey re-publishes the edited draft; reactivating an archived survey publishes too. - `kind` is immutable. Archived surveys accept no edits except the reactivating publish. Allowed transitions: draft->active, draft->archived, active->archived, archived->active. * Update Survey */ updateSurveyRaw(requestParameters: UpdateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Edits the draft copy and/or runs a lifecycle transition. - `content` / `name` edits land on the DRAFT copy and change nothing live until the next publish. - `status: active` is the PUBLISH door: the effective content is publish-validated (title with en-US, 1-50 well-formed questions, unique questionIds and option values, nps pinned to 0-10), then copied to `publishedContent` with `version += 1`. Re-sending `status: active` on an already-active survey re-publishes the edited draft; reactivating an archived survey publishes too. - `kind` is immutable. Archived surveys accept no edits except the reactivating publish. Allowed transitions: draft->active, draft->archived, active->archived, archived->active. * Update Survey */ updateSurvey(requestParameters: UpdateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } /** * @export */ export declare const DeleteSurveyPermanentDeleteEnum: { readonly True: "true"; readonly False: "false"; }; export type DeleteSurveyPermanentDeleteEnum = typeof DeleteSurveyPermanentDeleteEnum[keyof typeof DeleteSurveyPermanentDeleteEnum]; /** * @export */ export declare const ListSurveysFilterStatusEnum: { readonly Draft: "draft"; readonly Active: "active"; readonly Archived: "archived"; }; export type ListSurveysFilterStatusEnum = typeof ListSurveysFilterStatusEnum[keyof typeof ListSurveysFilterStatusEnum]; /** * @export */ export declare const ListSurveysFilterKindEnum: { readonly Cnps: "cnps"; readonly General: "general"; }; export type ListSurveysFilterKindEnum = typeof ListSurveysFilterKindEnum[keyof typeof ListSurveysFilterKindEnum]; //# sourceMappingURL=SurveysApi.d.ts.map