@smartytalent/api-client 0.8.0 → 0.8.2
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.
- package/dist/apis/FindersApi.d.ts +10 -10
- package/dist/apis/FindersApi.js +10 -10
- package/dist/apis/ResponsesApi.d.ts +157 -0
- package/dist/apis/ResponsesApi.d.ts.map +1 -0
- package/dist/apis/ResponsesApi.js +364 -0
- package/dist/apis/ResponsesApi.js.map +1 -0
- package/dist/apis/SurveysApi.d.ts +69 -54
- package/dist/apis/SurveysApi.d.ts.map +1 -1
- package/dist/apis/SurveysApi.js +137 -110
- package/dist/apis/SurveysApi.js.map +1 -1
- package/dist/apis/TalentsApi.d.ts +2 -2
- package/dist/apis/TalentsApi.js +2 -2
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.d.ts.map +1 -1
- package/dist/apis/index.js +1 -0
- package/dist/apis/index.js.map +1 -1
- package/dist/models/CreateSurveyRequestBody.d.ts +34 -0
- package/dist/models/CreateSurveyRequestBody.d.ts.map +1 -0
- package/dist/models/CreateSurveyRequestBody.js +52 -0
- package/dist/models/CreateSurveyRequestBody.js.map +1 -0
- package/dist/models/CreateSurveyRequestBodyData.d.ts +47 -0
- package/dist/models/CreateSurveyRequestBodyData.d.ts.map +1 -0
- package/dist/models/CreateSurveyRequestBodyData.js +63 -0
- package/dist/models/CreateSurveyRequestBodyData.js.map +1 -0
- package/dist/models/CreateSurveyRequestBodyDataAttributes.d.ts +54 -0
- package/dist/models/CreateSurveyRequestBodyDataAttributes.d.ts.map +1 -0
- package/dist/models/CreateSurveyRequestBodyDataAttributes.js +64 -0
- package/dist/models/CreateSurveyRequestBodyDataAttributes.js.map +1 -0
- package/dist/models/FinderQueryCandidatesSchema.d.ts +0 -12
- package/dist/models/FinderQueryCandidatesSchema.d.ts.map +1 -1
- package/dist/models/FinderQueryCandidatesSchema.js +0 -4
- package/dist/models/FinderQueryCandidatesSchema.js.map +1 -1
- package/dist/models/FinderQueryTalentsSchema.d.ts +0 -6
- package/dist/models/FinderQueryTalentsSchema.d.ts.map +1 -1
- package/dist/models/FinderQueryTalentsSchema.js +0 -2
- package/dist/models/FinderQueryTalentsSchema.js.map +1 -1
- package/dist/models/GuestResponseAttributesSchema.d.ts +102 -0
- package/dist/models/GuestResponseAttributesSchema.d.ts.map +1 -0
- package/dist/models/{GuestSurveyAttributesSchema.js → GuestResponseAttributesSchema.js} +23 -22
- package/dist/models/GuestResponseAttributesSchema.js.map +1 -0
- package/dist/models/GuestResponseMetaSchema.d.ts +45 -0
- package/dist/models/GuestResponseMetaSchema.d.ts.map +1 -0
- package/dist/models/{GuestSurveyMetaSchema.js → GuestResponseMetaSchema.js} +14 -14
- package/dist/models/GuestResponseMetaSchema.js.map +1 -0
- package/dist/models/GuestResponseResourceSchema.d.ts +53 -0
- package/dist/models/GuestResponseResourceSchema.d.ts.map +1 -0
- package/dist/models/GuestResponseResourceSchema.js +61 -0
- package/dist/models/GuestResponseResourceSchema.js.map +1 -0
- package/dist/models/GuestResponseSchema.d.ts +39 -0
- package/dist/models/GuestResponseSchema.d.ts.map +1 -0
- package/dist/models/GuestResponseSchema.js +50 -0
- package/dist/models/GuestResponseSchema.js.map +1 -0
- package/dist/models/ResponseAttributesSchema.d.ts +184 -0
- package/dist/models/ResponseAttributesSchema.d.ts.map +1 -0
- package/dist/models/ResponseAttributesSchema.js +100 -0
- package/dist/models/ResponseAttributesSchema.js.map +1 -0
- package/dist/models/ResponseRelationshipsCandidateSchema.d.ts +34 -0
- package/dist/models/ResponseRelationshipsCandidateSchema.d.ts.map +1 -0
- package/dist/models/ResponseRelationshipsCandidateSchema.js +50 -0
- package/dist/models/ResponseRelationshipsCandidateSchema.js.map +1 -0
- package/dist/models/ResponseRelationshipsCandidateSchemaData.d.ts +39 -0
- package/dist/models/ResponseRelationshipsCandidateSchemaData.d.ts.map +1 -0
- package/dist/models/ResponseRelationshipsCandidateSchemaData.js +51 -0
- package/dist/models/ResponseRelationshipsCandidateSchemaData.js.map +1 -0
- package/dist/models/ResponseRelationshipsJobSchema.d.ts +34 -0
- package/dist/models/ResponseRelationshipsJobSchema.d.ts.map +1 -0
- package/dist/models/ResponseRelationshipsJobSchema.js +50 -0
- package/dist/models/ResponseRelationshipsJobSchema.js.map +1 -0
- package/dist/models/ResponseRelationshipsSchema.d.ts +48 -0
- package/dist/models/ResponseRelationshipsSchema.d.ts.map +1 -0
- package/dist/models/ResponseRelationshipsSchema.js +56 -0
- package/dist/models/ResponseRelationshipsSchema.js.map +1 -0
- package/dist/models/ResponseRelationshipsSurveySchema.d.ts +34 -0
- package/dist/models/ResponseRelationshipsSurveySchema.d.ts.map +1 -0
- package/dist/models/ResponseRelationshipsSurveySchema.js +50 -0
- package/dist/models/ResponseRelationshipsSurveySchema.js.map +1 -0
- package/dist/models/ResponseRelationshipsSurveySchemaData.d.ts +39 -0
- package/dist/models/ResponseRelationshipsSurveySchemaData.d.ts.map +1 -0
- package/dist/models/ResponseRelationshipsSurveySchemaData.js +51 -0
- package/dist/models/ResponseRelationshipsSurveySchemaData.js.map +1 -0
- package/dist/models/ResponseResourceSchema.d.ts +75 -0
- package/dist/models/ResponseResourceSchema.d.ts.map +1 -0
- package/dist/models/ResponseResourceSchema.js +75 -0
- package/dist/models/ResponseResourceSchema.js.map +1 -0
- package/dist/models/ResponseSchema.d.ts +49 -0
- package/dist/models/ResponseSchema.d.ts.map +1 -0
- package/dist/models/ResponseSchema.js +55 -0
- package/dist/models/ResponseSchema.js.map +1 -0
- package/dist/models/ResponsesSchema.d.ts +48 -0
- package/dist/models/ResponsesSchema.d.ts.map +1 -0
- package/dist/models/ResponsesSchema.js +56 -0
- package/dist/models/ResponsesSchema.js.map +1 -0
- package/dist/models/SubmitGuestResponseRequestBody.d.ts +41 -0
- package/dist/models/SubmitGuestResponseRequestBody.d.ts.map +1 -0
- package/dist/models/SubmitGuestResponseRequestBody.js +57 -0
- package/dist/models/SubmitGuestResponseRequestBody.js.map +1 -0
- package/dist/models/SubmitGuestResponseRequestBodyData.d.ts +53 -0
- package/dist/models/SubmitGuestResponseRequestBodyData.d.ts.map +1 -0
- package/dist/models/SubmitGuestResponseRequestBodyData.js +65 -0
- package/dist/models/SubmitGuestResponseRequestBodyData.js.map +1 -0
- package/dist/models/SubmitGuestResponseRequestBodyDataAttributes.d.ts +33 -0
- package/dist/models/SubmitGuestResponseRequestBodyDataAttributes.d.ts.map +1 -0
- package/dist/models/SubmitGuestResponseRequestBodyDataAttributes.js +51 -0
- package/dist/models/SubmitGuestResponseRequestBodyDataAttributes.js.map +1 -0
- package/dist/models/SurveyAttributesSchema.d.ts +42 -91
- package/dist/models/SurveyAttributesSchema.d.ts.map +1 -1
- package/dist/models/SurveyAttributesSchema.js +18 -32
- package/dist/models/SurveyAttributesSchema.js.map +1 -1
- package/dist/models/SurveyContentSchema.d.ts +42 -0
- package/dist/models/SurveyContentSchema.d.ts.map +1 -0
- package/dist/models/SurveyContentSchema.js +52 -0
- package/dist/models/SurveyContentSchema.js.map +1 -0
- package/dist/models/SurveyQuestionOptionSchema.d.ts +41 -0
- package/dist/models/SurveyQuestionOptionSchema.d.ts.map +1 -0
- package/dist/models/SurveyQuestionOptionSchema.js +51 -0
- package/dist/models/SurveyQuestionOptionSchema.js.map +1 -0
- package/dist/models/SurveyQuestionSchema.d.ts +119 -0
- package/dist/models/SurveyQuestionSchema.d.ts.map +1 -0
- package/dist/models/SurveyQuestionSchema.js +85 -0
- package/dist/models/SurveyQuestionSchema.js.map +1 -0
- package/dist/models/SurveyQuestionSchemaScaleLabels.d.ts +43 -0
- package/dist/models/SurveyQuestionSchemaScaleLabels.d.ts.map +1 -0
- package/dist/models/SurveyQuestionSchemaScaleLabels.js +51 -0
- package/dist/models/SurveyQuestionSchemaScaleLabels.js.map +1 -0
- package/dist/models/SurveyResourceSchema.d.ts +2 -3
- package/dist/models/SurveyResourceSchema.d.ts.map +1 -1
- package/dist/models/SurveyResourceSchema.js +2 -3
- package/dist/models/SurveyResourceSchema.js.map +1 -1
- package/dist/models/TalentAttributesSchema.d.ts +12 -0
- package/dist/models/TalentAttributesSchema.d.ts.map +1 -1
- package/dist/models/TalentAttributesSchema.js +4 -0
- package/dist/models/TalentAttributesSchema.js.map +1 -1
- package/dist/models/UpdateSurveyRequestBody.d.ts +34 -0
- package/dist/models/UpdateSurveyRequestBody.d.ts.map +1 -0
- package/dist/models/UpdateSurveyRequestBody.js +52 -0
- package/dist/models/UpdateSurveyRequestBody.js.map +1 -0
- package/dist/models/UpdateSurveyRequestBodyData.d.ts +53 -0
- package/dist/models/UpdateSurveyRequestBodyData.d.ts.map +1 -0
- package/dist/models/UpdateSurveyRequestBodyData.js +63 -0
- package/dist/models/UpdateSurveyRequestBodyData.js.map +1 -0
- package/dist/models/UpdateSurveyRequestBodyDataAttributes.d.ts +55 -0
- package/dist/models/UpdateSurveyRequestBodyDataAttributes.d.ts.map +1 -0
- package/dist/models/UpdateSurveyRequestBodyDataAttributes.js +63 -0
- package/dist/models/UpdateSurveyRequestBodyDataAttributes.js.map +1 -0
- package/dist/models/index.d.ts +27 -11
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +27 -11
- package/dist/models/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/models/GuestSurveyAttributesSchema.d.ts +0 -98
- package/dist/models/GuestSurveyAttributesSchema.d.ts.map +0 -1
- package/dist/models/GuestSurveyAttributesSchema.js.map +0 -1
- package/dist/models/GuestSurveyMetaSchema.d.ts +0 -45
- package/dist/models/GuestSurveyMetaSchema.d.ts.map +0 -1
- package/dist/models/GuestSurveyMetaSchema.js.map +0 -1
- package/dist/models/GuestSurveyResourceSchema.d.ts +0 -53
- package/dist/models/GuestSurveyResourceSchema.d.ts.map +0 -1
- package/dist/models/GuestSurveyResourceSchema.js +0 -61
- package/dist/models/GuestSurveyResourceSchema.js.map +0 -1
- package/dist/models/GuestSurveySchema.d.ts +0 -38
- package/dist/models/GuestSurveySchema.d.ts.map +0 -1
- package/dist/models/GuestSurveySchema.js +0 -50
- package/dist/models/GuestSurveySchema.js.map +0 -1
- package/dist/models/SubmitGuestSurveyRequestBody.d.ts +0 -41
- package/dist/models/SubmitGuestSurveyRequestBody.d.ts.map +0 -1
- package/dist/models/SubmitGuestSurveyRequestBody.js +0 -57
- package/dist/models/SubmitGuestSurveyRequestBody.js.map +0 -1
- package/dist/models/SubmitGuestSurveyRequestBodyData.d.ts +0 -53
- package/dist/models/SubmitGuestSurveyRequestBodyData.d.ts.map +0 -1
- package/dist/models/SubmitGuestSurveyRequestBodyData.js +0 -65
- package/dist/models/SubmitGuestSurveyRequestBodyData.js.map +0 -1
- package/dist/models/SubmitGuestSurveyRequestBodyDataAttributes.d.ts +0 -39
- package/dist/models/SubmitGuestSurveyRequestBodyDataAttributes.d.ts.map +0 -1
- package/dist/models/SubmitGuestSurveyRequestBodyDataAttributes.js +0 -53
- package/dist/models/SubmitGuestSurveyRequestBodyDataAttributes.js.map +0 -1
- package/dist/models/SurveyRelationshipsCandidateSchema.d.ts +0 -34
- package/dist/models/SurveyRelationshipsCandidateSchema.d.ts.map +0 -1
- package/dist/models/SurveyRelationshipsCandidateSchema.js +0 -50
- package/dist/models/SurveyRelationshipsCandidateSchema.js.map +0 -1
- package/dist/models/SurveyRelationshipsCandidateSchemaData.d.ts +0 -39
- package/dist/models/SurveyRelationshipsCandidateSchemaData.d.ts.map +0 -1
- package/dist/models/SurveyRelationshipsCandidateSchemaData.js +0 -51
- package/dist/models/SurveyRelationshipsCandidateSchemaData.js.map +0 -1
- package/dist/models/SurveyRelationshipsJobSchema.d.ts +0 -34
- package/dist/models/SurveyRelationshipsJobSchema.d.ts.map +0 -1
- package/dist/models/SurveyRelationshipsJobSchema.js +0 -50
- package/dist/models/SurveyRelationshipsJobSchema.js.map +0 -1
- package/dist/models/SurveyRelationshipsSchema.d.ts +0 -41
- package/dist/models/SurveyRelationshipsSchema.d.ts.map +0 -1
- package/dist/models/SurveyRelationshipsSchema.js +0 -53
- package/dist/models/SurveyRelationshipsSchema.js.map +0 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* SmartyMeet Dev03 API REST
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.1
|
|
9
|
+
* Contact: developer@smartymeet.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.ListResponsesFilterStatusEnum = exports.ResponsesApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class ResponsesApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Creates request options for guestResponseOptions without sending the request
|
|
58
|
+
*/
|
|
59
|
+
async guestResponseOptionsRequestOpts(requestParameters) {
|
|
60
|
+
if (requestParameters['responseId'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('responseId', 'Required parameter "responseId" was null or undefined when calling guestResponseOptions().');
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
let urlPath = `/v1/guest/responses/{responseId}`;
|
|
66
|
+
urlPath = urlPath.replace(`{${"responseId"}}`, encodeURIComponent(String(requestParameters['responseId'])));
|
|
67
|
+
return {
|
|
68
|
+
path: urlPath,
|
|
69
|
+
method: 'OPTIONS',
|
|
70
|
+
headers: headerParameters,
|
|
71
|
+
query: queryParameters,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Enable CORS by returning correct headers
|
|
76
|
+
* Guest Response Options
|
|
77
|
+
*/
|
|
78
|
+
async guestResponseOptionsRaw(requestParameters, initOverrides) {
|
|
79
|
+
const requestOptions = await this.guestResponseOptionsRequestOpts(requestParameters);
|
|
80
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
81
|
+
return new runtime.VoidApiResponse(response);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Enable CORS by returning correct headers
|
|
85
|
+
* Guest Response Options
|
|
86
|
+
*/
|
|
87
|
+
async guestResponseOptions(requestParameters, initOverrides) {
|
|
88
|
+
await this.guestResponseOptionsRaw(requestParameters, initOverrides);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates request options for listResponses without sending the request
|
|
92
|
+
*/
|
|
93
|
+
async listResponsesRequestOpts(requestParameters) {
|
|
94
|
+
const queryParameters = {};
|
|
95
|
+
if (requestParameters['filterStatus'] != null) {
|
|
96
|
+
queryParameters['filterStatus'] = requestParameters['filterStatus'];
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters['filterSurveyId'] != null) {
|
|
99
|
+
queryParameters['filterSurveyId'] = requestParameters['filterSurveyId'];
|
|
100
|
+
}
|
|
101
|
+
if (requestParameters['filterCandidateId'] != null) {
|
|
102
|
+
queryParameters['filterCandidateId'] = requestParameters['filterCandidateId'];
|
|
103
|
+
}
|
|
104
|
+
if (requestParameters['filterCreatedFrom'] != null) {
|
|
105
|
+
queryParameters['filterCreatedFrom'] = requestParameters['filterCreatedFrom'].toISOString();
|
|
106
|
+
}
|
|
107
|
+
if (requestParameters['filterCreatedTo'] != null) {
|
|
108
|
+
queryParameters['filterCreatedTo'] = requestParameters['filterCreatedTo'].toISOString();
|
|
109
|
+
}
|
|
110
|
+
if (requestParameters['filterModifiedFrom'] != null) {
|
|
111
|
+
queryParameters['filterModifiedFrom'] = requestParameters['filterModifiedFrom'].toISOString();
|
|
112
|
+
}
|
|
113
|
+
if (requestParameters['filterModifiedTo'] != null) {
|
|
114
|
+
queryParameters['filterModifiedTo'] = requestParameters['filterModifiedTo'].toISOString();
|
|
115
|
+
}
|
|
116
|
+
if (requestParameters['pageSize'] != null) {
|
|
117
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
118
|
+
}
|
|
119
|
+
if (requestParameters['pageNumber'] != null) {
|
|
120
|
+
queryParameters['pageNumber'] = requestParameters['pageNumber'];
|
|
121
|
+
}
|
|
122
|
+
if (requestParameters['pageAfter'] != null) {
|
|
123
|
+
queryParameters['pageAfter'] = requestParameters['pageAfter'];
|
|
124
|
+
}
|
|
125
|
+
if (requestParameters['pageBefore'] != null) {
|
|
126
|
+
queryParameters['pageBefore'] = requestParameters['pageBefore'];
|
|
127
|
+
}
|
|
128
|
+
const headerParameters = {};
|
|
129
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
130
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
131
|
+
}
|
|
132
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
133
|
+
// oauth required
|
|
134
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
135
|
+
}
|
|
136
|
+
let urlPath = `/v1/responses`;
|
|
137
|
+
return {
|
|
138
|
+
path: urlPath,
|
|
139
|
+
method: 'GET',
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* 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=<id>` - responses of one survey - `filterCandidateId=<id>` - 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`.
|
|
146
|
+
* List Responses
|
|
147
|
+
*/
|
|
148
|
+
async listResponsesRaw(requestParameters, initOverrides) {
|
|
149
|
+
const requestOptions = await this.listResponsesRequestOpts(requestParameters);
|
|
150
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ResponsesSchemaFromJSON)(jsonValue));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 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=<id>` - responses of one survey - `filterCandidateId=<id>` - 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`.
|
|
155
|
+
* List Responses
|
|
156
|
+
*/
|
|
157
|
+
async listResponses(requestParameters = {}, initOverrides) {
|
|
158
|
+
const response = await this.listResponsesRaw(requestParameters, initOverrides);
|
|
159
|
+
return await response.value();
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Creates request options for responseOptions without sending the request
|
|
163
|
+
*/
|
|
164
|
+
async responseOptionsRequestOpts(requestParameters) {
|
|
165
|
+
if (requestParameters['responseId'] == null) {
|
|
166
|
+
throw new runtime.RequiredError('responseId', 'Required parameter "responseId" was null or undefined when calling responseOptions().');
|
|
167
|
+
}
|
|
168
|
+
const queryParameters = {};
|
|
169
|
+
const headerParameters = {};
|
|
170
|
+
let urlPath = `/v1/responses/{responseId}`;
|
|
171
|
+
urlPath = urlPath.replace(`{${"responseId"}}`, encodeURIComponent(String(requestParameters['responseId'])));
|
|
172
|
+
return {
|
|
173
|
+
path: urlPath,
|
|
174
|
+
method: 'OPTIONS',
|
|
175
|
+
headers: headerParameters,
|
|
176
|
+
query: queryParameters,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Enable CORS by returning correct headers
|
|
181
|
+
* Response Options
|
|
182
|
+
*/
|
|
183
|
+
async responseOptionsRaw(requestParameters, initOverrides) {
|
|
184
|
+
const requestOptions = await this.responseOptionsRequestOpts(requestParameters);
|
|
185
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
186
|
+
return new runtime.VoidApiResponse(response);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Enable CORS by returning correct headers
|
|
190
|
+
* Response Options
|
|
191
|
+
*/
|
|
192
|
+
async responseOptions(requestParameters, initOverrides) {
|
|
193
|
+
await this.responseOptionsRaw(requestParameters, initOverrides);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Creates request options for responsesOptions without sending the request
|
|
197
|
+
*/
|
|
198
|
+
async responsesOptionsRequestOpts() {
|
|
199
|
+
const queryParameters = {};
|
|
200
|
+
const headerParameters = {};
|
|
201
|
+
let urlPath = `/v1/responses`;
|
|
202
|
+
return {
|
|
203
|
+
path: urlPath,
|
|
204
|
+
method: 'OPTIONS',
|
|
205
|
+
headers: headerParameters,
|
|
206
|
+
query: queryParameters,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Enable CORS by returning correct headers
|
|
211
|
+
* Responses Options
|
|
212
|
+
*/
|
|
213
|
+
async responsesOptionsRaw(initOverrides) {
|
|
214
|
+
const requestOptions = await this.responsesOptionsRequestOpts();
|
|
215
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
216
|
+
return new runtime.VoidApiResponse(response);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Enable CORS by returning correct headers
|
|
220
|
+
* Responses Options
|
|
221
|
+
*/
|
|
222
|
+
async responsesOptions(initOverrides) {
|
|
223
|
+
await this.responsesOptionsRaw(initOverrides);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Creates request options for showGuestResponse without sending the request
|
|
227
|
+
*/
|
|
228
|
+
async showGuestResponseRequestOpts(requestParameters) {
|
|
229
|
+
if (requestParameters['responseId'] == null) {
|
|
230
|
+
throw new runtime.RequiredError('responseId', 'Required parameter "responseId" was null or undefined when calling showGuestResponse().');
|
|
231
|
+
}
|
|
232
|
+
if (requestParameters['tenantId'] == null) {
|
|
233
|
+
throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling showGuestResponse().');
|
|
234
|
+
}
|
|
235
|
+
if (requestParameters['token'] == null) {
|
|
236
|
+
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling showGuestResponse().');
|
|
237
|
+
}
|
|
238
|
+
const queryParameters = {};
|
|
239
|
+
if (requestParameters['tenantId'] != null) {
|
|
240
|
+
queryParameters['tenantId'] = requestParameters['tenantId'];
|
|
241
|
+
}
|
|
242
|
+
if (requestParameters['token'] != null) {
|
|
243
|
+
queryParameters['token'] = requestParameters['token'];
|
|
244
|
+
}
|
|
245
|
+
const headerParameters = {};
|
|
246
|
+
let urlPath = `/v1/guest/responses/{responseId}`;
|
|
247
|
+
urlPath = urlPath.replace(`{${"responseId"}}`, encodeURIComponent(String(requestParameters['responseId'])));
|
|
248
|
+
return {
|
|
249
|
+
path: urlPath,
|
|
250
|
+
method: 'GET',
|
|
251
|
+
headers: headerParameters,
|
|
252
|
+
query: queryParameters,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* 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.
|
|
257
|
+
* Show Guest Response
|
|
258
|
+
*/
|
|
259
|
+
async showGuestResponseRaw(requestParameters, initOverrides) {
|
|
260
|
+
const requestOptions = await this.showGuestResponseRequestOpts(requestParameters);
|
|
261
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
262
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GuestResponseSchemaFromJSON)(jsonValue));
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* 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.
|
|
266
|
+
* Show Guest Response
|
|
267
|
+
*/
|
|
268
|
+
async showGuestResponse(requestParameters, initOverrides) {
|
|
269
|
+
const response = await this.showGuestResponseRaw(requestParameters, initOverrides);
|
|
270
|
+
return await response.value();
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Creates request options for showResponse without sending the request
|
|
274
|
+
*/
|
|
275
|
+
async showResponseRequestOpts(requestParameters) {
|
|
276
|
+
if (requestParameters['responseId'] == null) {
|
|
277
|
+
throw new runtime.RequiredError('responseId', 'Required parameter "responseId" was null or undefined when calling showResponse().');
|
|
278
|
+
}
|
|
279
|
+
const queryParameters = {};
|
|
280
|
+
const headerParameters = {};
|
|
281
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
282
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
283
|
+
}
|
|
284
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
285
|
+
// oauth required
|
|
286
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
287
|
+
}
|
|
288
|
+
let urlPath = `/v1/responses/{responseId}`;
|
|
289
|
+
urlPath = urlPath.replace(`{${"responseId"}}`, encodeURIComponent(String(requestParameters['responseId'])));
|
|
290
|
+
return {
|
|
291
|
+
path: urlPath,
|
|
292
|
+
method: 'GET',
|
|
293
|
+
headers: headerParameters,
|
|
294
|
+
query: queryParameters,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* 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.
|
|
299
|
+
* Show Response
|
|
300
|
+
*/
|
|
301
|
+
async showResponseRaw(requestParameters, initOverrides) {
|
|
302
|
+
const requestOptions = await this.showResponseRequestOpts(requestParameters);
|
|
303
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
304
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ResponseSchemaFromJSON)(jsonValue));
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* 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.
|
|
308
|
+
* Show Response
|
|
309
|
+
*/
|
|
310
|
+
async showResponse(requestParameters, initOverrides) {
|
|
311
|
+
const response = await this.showResponseRaw(requestParameters, initOverrides);
|
|
312
|
+
return await response.value();
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Creates request options for submitGuestResponse without sending the request
|
|
316
|
+
*/
|
|
317
|
+
async submitGuestResponseRequestOpts(requestParameters) {
|
|
318
|
+
if (requestParameters['responseId'] == null) {
|
|
319
|
+
throw new runtime.RequiredError('responseId', 'Required parameter "responseId" was null or undefined when calling submitGuestResponse().');
|
|
320
|
+
}
|
|
321
|
+
if (requestParameters['submitGuestResponseRequestBody'] == null) {
|
|
322
|
+
throw new runtime.RequiredError('submitGuestResponseRequestBody', 'Required parameter "submitGuestResponseRequestBody" was null or undefined when calling submitGuestResponse().');
|
|
323
|
+
}
|
|
324
|
+
const queryParameters = {};
|
|
325
|
+
const headerParameters = {};
|
|
326
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
327
|
+
let urlPath = `/v1/guest/responses/{responseId}`;
|
|
328
|
+
urlPath = urlPath.replace(`{${"responseId"}}`, encodeURIComponent(String(requestParameters['responseId'])));
|
|
329
|
+
return {
|
|
330
|
+
path: urlPath,
|
|
331
|
+
method: 'PATCH',
|
|
332
|
+
headers: headerParameters,
|
|
333
|
+
query: queryParameters,
|
|
334
|
+
body: (0, index_1.SubmitGuestResponseRequestBodyToJSON)(requestParameters['submitGuestResponseRequestBody']),
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* 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.
|
|
339
|
+
* Submit Guest Response
|
|
340
|
+
*/
|
|
341
|
+
async submitGuestResponseRaw(requestParameters, initOverrides) {
|
|
342
|
+
const requestOptions = await this.submitGuestResponseRequestOpts(requestParameters);
|
|
343
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
344
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GuestResponseSchemaFromJSON)(jsonValue));
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* 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.
|
|
348
|
+
* Submit Guest Response
|
|
349
|
+
*/
|
|
350
|
+
async submitGuestResponse(requestParameters, initOverrides) {
|
|
351
|
+
const response = await this.submitGuestResponseRaw(requestParameters, initOverrides);
|
|
352
|
+
return await response.value();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
exports.ResponsesApi = ResponsesApi;
|
|
356
|
+
/**
|
|
357
|
+
* @export
|
|
358
|
+
*/
|
|
359
|
+
exports.ListResponsesFilterStatusEnum = {
|
|
360
|
+
Pending: 'pending',
|
|
361
|
+
Completed: 'completed',
|
|
362
|
+
Expired: 'expired'
|
|
363
|
+
};
|
|
364
|
+
//# sourceMappingURL=ResponsesApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsesApi.js","sourceRoot":"","sources":["../../src/apis/ResponsesApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,oDAAsC;AAQtC,2CAWyB;AAuCzB;;GAEG;AACH,MAAa,YAAa,SAAQ,OAAO,CAAC,OAAO;IAE7C;;OAEG;IACH,KAAK,CAAC,+BAA+B,CAAC,iBAA8C;QAChF,IAAI,iBAAiB,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAC;YAC1C,MAAM,IAAI,OAAO,CAAC,aAAa,CAC3B,YAAY,EACZ,4FAA4F,CAC/F,CAAC;QACN,CAAC;QAED,MAAM,eAAe,GA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AA0D;QAClI,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,CAAC;QACpF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAEnE,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,IAAA,mCAA2B,EAAC,SAAS,CAAC,CAAC,CAAC;IACxG,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,mBAAmB,CAAC,iBAA6C,EAAE,aAA0D;QAC/H,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QACrF,OAAO,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;CAEJ;AAtZD,oCAsZC;AAED;;GAEG;AACU,QAAA,6BAA6B,GAAG;IACzC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACZ,CAAC"}
|
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
14
|
-
export interface
|
|
13
|
+
import type { CreateSurveyRequestBody, SurveySchema, SurveysSchema, UpdateSurveyRequestBody } from '../models/index';
|
|
14
|
+
export interface CreateSurveyRequest {
|
|
15
|
+
createSurveyRequestBody: CreateSurveyRequestBody;
|
|
16
|
+
}
|
|
17
|
+
export interface DeleteSurveyRequest {
|
|
15
18
|
surveyId: string;
|
|
19
|
+
permanentDelete?: DeleteSurveyPermanentDeleteEnum;
|
|
16
20
|
}
|
|
17
21
|
export interface ListSurveysRequest {
|
|
18
22
|
filterStatus?: ListSurveysFilterStatusEnum;
|
|
19
|
-
|
|
23
|
+
filterKind?: ListSurveysFilterKindEnum;
|
|
20
24
|
filterCreatedFrom?: Date;
|
|
21
25
|
filterCreatedTo?: Date;
|
|
22
26
|
filterModifiedFrom?: Date;
|
|
@@ -26,95 +30,76 @@ export interface ListSurveysRequest {
|
|
|
26
30
|
pageAfter?: string;
|
|
27
31
|
pageBefore?: string;
|
|
28
32
|
}
|
|
29
|
-
export interface ShowGuestSurveyRequest {
|
|
30
|
-
surveyId: string;
|
|
31
|
-
tenantId: string;
|
|
32
|
-
token: string;
|
|
33
|
-
}
|
|
34
33
|
export interface ShowSurveyRequest {
|
|
35
34
|
surveyId: string;
|
|
36
35
|
}
|
|
37
|
-
export interface
|
|
36
|
+
export interface SurveyOptionsRequest {
|
|
38
37
|
surveyId: string;
|
|
39
|
-
submitGuestSurveyRequestBody: SubmitGuestSurveyRequestBody;
|
|
40
38
|
}
|
|
41
|
-
export interface
|
|
39
|
+
export interface UpdateSurveyRequest {
|
|
42
40
|
surveyId: string;
|
|
41
|
+
updateSurveyRequestBody: UpdateSurveyRequestBody;
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
44
|
*
|
|
46
45
|
*/
|
|
47
46
|
export declare class SurveysApi extends runtime.BaseAPI {
|
|
48
47
|
/**
|
|
49
|
-
* Creates request options for
|
|
48
|
+
* Creates request options for createSurvey without sending the request
|
|
50
49
|
*/
|
|
51
|
-
|
|
50
|
+
createSurveyRequestOpts(requestParameters: CreateSurveyRequest): Promise<runtime.RequestOpts>;
|
|
52
51
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* 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).
|
|
53
|
+
* Create Survey
|
|
55
54
|
*/
|
|
56
|
-
|
|
55
|
+
createSurveyRaw(requestParameters: CreateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SurveySchema>>;
|
|
57
56
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
57
|
+
* 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).
|
|
58
|
+
* Create Survey
|
|
60
59
|
*/
|
|
61
|
-
|
|
60
|
+
createSurvey(requestParameters: CreateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SurveySchema>;
|
|
62
61
|
/**
|
|
63
|
-
* Creates request options for
|
|
62
|
+
* Creates request options for deleteSurvey without sending the request
|
|
64
63
|
*/
|
|
65
|
-
|
|
64
|
+
deleteSurveyRequestOpts(requestParameters: DeleteSurveyRequest): Promise<runtime.RequestOpts>;
|
|
66
65
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
66
|
+
* Soft archive by default (`status=archived` - existing invitations keep working from their snapshots; new invitations against the survey fail). `?permanentDelete=true` removes the row.
|
|
67
|
+
* Delete Survey
|
|
69
68
|
*/
|
|
70
|
-
|
|
69
|
+
deleteSurveyRaw(requestParameters: DeleteSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
71
70
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
71
|
+
* Soft archive by default (`status=archived` - existing invitations keep working from their snapshots; new invitations against the survey fail). `?permanentDelete=true` removes the row.
|
|
72
|
+
* Delete Survey
|
|
74
73
|
*/
|
|
75
|
-
|
|
74
|
+
deleteSurvey(requestParameters: DeleteSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
76
75
|
/**
|
|
77
|
-
* Creates request options for
|
|
76
|
+
* Creates request options for listSurveys without sending the request
|
|
78
77
|
*/
|
|
79
|
-
|
|
78
|
+
listSurveysRequestOpts(requestParameters: ListSurveysRequest): Promise<runtime.RequestOpts>;
|
|
80
79
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
80
|
+
* 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.
|
|
81
|
+
* List Surveys
|
|
83
82
|
*/
|
|
84
|
-
|
|
83
|
+
listSurveysRaw(requestParameters: ListSurveysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SurveysSchema>>;
|
|
85
84
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
85
|
+
* 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.
|
|
86
|
+
* List Surveys
|
|
88
87
|
*/
|
|
89
|
-
|
|
88
|
+
listSurveys(requestParameters?: ListSurveysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SurveysSchema>;
|
|
90
89
|
/**
|
|
91
90
|
* Creates request options for showSurvey without sending the request
|
|
92
91
|
*/
|
|
93
92
|
showSurveyRequestOpts(requestParameters: ShowSurveyRequest): Promise<runtime.RequestOpts>;
|
|
94
93
|
/**
|
|
95
|
-
* Returns a single
|
|
94
|
+
* Returns a single survey definition, including the draft `content` and (after the first publish) the frozen `publishedContent` + `version`.
|
|
96
95
|
* Show Survey
|
|
97
96
|
*/
|
|
98
97
|
showSurveyRaw(requestParameters: ShowSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SurveySchema>>;
|
|
99
98
|
/**
|
|
100
|
-
* Returns a single
|
|
99
|
+
* Returns a single survey definition, including the draft `content` and (after the first publish) the frozen `publishedContent` + `version`.
|
|
101
100
|
* Show Survey
|
|
102
101
|
*/
|
|
103
102
|
showSurvey(requestParameters: ShowSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SurveySchema>;
|
|
104
|
-
/**
|
|
105
|
-
* Creates request options for submitGuestSurvey without sending the request
|
|
106
|
-
*/
|
|
107
|
-
submitGuestSurveyRequestOpts(requestParameters: SubmitGuestSurveyRequest): Promise<runtime.RequestOpts>;
|
|
108
|
-
/**
|
|
109
|
-
* Candidate answers the survey. There is no authorizer on this path: auth is `meta.tenantId` + `meta.accessToken` from the emailed link, never a session. `score` is a required integer 0-10; `comment` is optional free text (max 2000 characters). `npsCategory` is computed server-side from the score and is 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 survey. The response carries the same guest allowlist as showGuestSurvey.
|
|
110
|
-
* Submit Guest Survey
|
|
111
|
-
*/
|
|
112
|
-
submitGuestSurveyRaw(requestParameters: SubmitGuestSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GuestSurveySchema>>;
|
|
113
|
-
/**
|
|
114
|
-
* Candidate answers the survey. There is no authorizer on this path: auth is `meta.tenantId` + `meta.accessToken` from the emailed link, never a session. `score` is a required integer 0-10; `comment` is optional free text (max 2000 characters). `npsCategory` is computed server-side from the score and is 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 survey. The response carries the same guest allowlist as showGuestSurvey.
|
|
115
|
-
* Submit Guest Survey
|
|
116
|
-
*/
|
|
117
|
-
submitGuestSurvey(requestParameters: SubmitGuestSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GuestSurveySchema>;
|
|
118
103
|
/**
|
|
119
104
|
* Creates request options for surveyOptions without sending the request
|
|
120
105
|
*/
|
|
@@ -143,14 +128,44 @@ export declare class SurveysApi extends runtime.BaseAPI {
|
|
|
143
128
|
* Surveys Options
|
|
144
129
|
*/
|
|
145
130
|
surveysOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Creates request options for updateSurvey without sending the request
|
|
133
|
+
*/
|
|
134
|
+
updateSurveyRequestOpts(requestParameters: UpdateSurveyRequest): Promise<runtime.RequestOpts>;
|
|
135
|
+
/**
|
|
136
|
+
* 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.
|
|
137
|
+
* Update Survey
|
|
138
|
+
*/
|
|
139
|
+
updateSurveyRaw(requestParameters: UpdateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SurveySchema>>;
|
|
140
|
+
/**
|
|
141
|
+
* 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.
|
|
142
|
+
* Update Survey
|
|
143
|
+
*/
|
|
144
|
+
updateSurvey(requestParameters: UpdateSurveyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SurveySchema>;
|
|
146
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* @export
|
|
148
|
+
*/
|
|
149
|
+
export declare const DeleteSurveyPermanentDeleteEnum: {
|
|
150
|
+
readonly True: "true";
|
|
151
|
+
readonly False: "false";
|
|
152
|
+
};
|
|
153
|
+
export type DeleteSurveyPermanentDeleteEnum = typeof DeleteSurveyPermanentDeleteEnum[keyof typeof DeleteSurveyPermanentDeleteEnum];
|
|
147
154
|
/**
|
|
148
155
|
* @export
|
|
149
156
|
*/
|
|
150
157
|
export declare const ListSurveysFilterStatusEnum: {
|
|
151
|
-
readonly
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
158
|
+
readonly Draft: "draft";
|
|
159
|
+
readonly Active: "active";
|
|
160
|
+
readonly Archived: "archived";
|
|
154
161
|
};
|
|
155
162
|
export type ListSurveysFilterStatusEnum = typeof ListSurveysFilterStatusEnum[keyof typeof ListSurveysFilterStatusEnum];
|
|
163
|
+
/**
|
|
164
|
+
* @export
|
|
165
|
+
*/
|
|
166
|
+
export declare const ListSurveysFilterKindEnum: {
|
|
167
|
+
readonly Cnps: "cnps";
|
|
168
|
+
readonly General: "general";
|
|
169
|
+
};
|
|
170
|
+
export type ListSurveysFilterKindEnum = typeof ListSurveysFilterKindEnum[keyof typeof ListSurveysFilterKindEnum];
|
|
156
171
|
//# sourceMappingURL=SurveysApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurveysApi.d.ts","sourceRoot":"","sources":["../../src/apis/SurveysApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,OAAO,MAAM,YA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