@vendasta/forms_microservice 0.15.0 → 0.17.0
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/esm2020/lib/_internal/enums/api.enum.mjs +11 -1
- package/esm2020/lib/_internal/enums/index.mjs +2 -2
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +187 -1
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/fesm2015/vendasta-forms_microservice.mjs +197 -1
- package/fesm2015/vendasta-forms_microservice.mjs.map +1 -1
- package/fesm2020/vendasta-forms_microservice.mjs +197 -1
- package/fesm2020/vendasta-forms_microservice.mjs.map +1 -1
- package/lib/_internal/enums/api.enum.d.ts +10 -1
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/interfaces/api.interface.d.ts +31 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +49 -0
- package/lib/_internal/objects/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -25,12 +25,22 @@ var FieldType;
|
|
|
25
25
|
FieldType[FieldType["FIELD_TYPE_PHONE"] = 10] = "FIELD_TYPE_PHONE";
|
|
26
26
|
FieldType[FieldType["FIELD_TYPE_BUSINESS_SEARCH"] = 11] = "FIELD_TYPE_BUSINESS_SEARCH";
|
|
27
27
|
FieldType[FieldType["FIELD_TYPE_TEXT_AREA"] = 12] = "FIELD_TYPE_TEXT_AREA";
|
|
28
|
+
FieldType[FieldType["FIELD_TYPE_TAG"] = 13] = "FIELD_TYPE_TAG";
|
|
29
|
+
FieldType[FieldType["FIELD_TYPE_SECTION"] = 14] = "FIELD_TYPE_SECTION";
|
|
28
30
|
})(FieldType || (FieldType = {}));
|
|
29
31
|
var JsonSchemaLibrary;
|
|
30
32
|
(function (JsonSchemaLibrary) {
|
|
31
33
|
JsonSchemaLibrary[JsonSchemaLibrary["JSON_SCHEMA_LIBRARY_UNDEFINED"] = 0] = "JSON_SCHEMA_LIBRARY_UNDEFINED";
|
|
32
34
|
JsonSchemaLibrary[JsonSchemaLibrary["JSON_SCHEMA_LIBRARY_JSONFORM"] = 1] = "JSON_SCHEMA_LIBRARY_JSONFORM";
|
|
33
35
|
})(JsonSchemaLibrary || (JsonSchemaLibrary = {}));
|
|
36
|
+
var SectionAction;
|
|
37
|
+
(function (SectionAction) {
|
|
38
|
+
SectionAction[SectionAction["SECTION_ACTION_UNDEFINED"] = 0] = "SECTION_ACTION_UNDEFINED";
|
|
39
|
+
SectionAction[SectionAction["SECTION_ACTION_SUBMIT"] = 1] = "SECTION_ACTION_SUBMIT";
|
|
40
|
+
SectionAction[SectionAction["SECTION_ACTION_SUBMIT_CONDITION"] = 2] = "SECTION_ACTION_SUBMIT_CONDITION";
|
|
41
|
+
SectionAction[SectionAction["SECTION_ACTION_NEXT_PAGE"] = 3] = "SECTION_ACTION_NEXT_PAGE";
|
|
42
|
+
SectionAction[SectionAction["SECTION_ACTION_NEXT_APPEND"] = 4] = "SECTION_ACTION_NEXT_APPEND";
|
|
43
|
+
})(SectionAction || (SectionAction = {}));
|
|
34
44
|
|
|
35
45
|
// *********************************
|
|
36
46
|
// Code generated by sdkgen
|
|
@@ -107,6 +117,35 @@ function enumStringToValue(enumRef, value) {
|
|
|
107
117
|
}
|
|
108
118
|
return enumRef[value];
|
|
109
119
|
}
|
|
120
|
+
class ActionParameters {
|
|
121
|
+
static fromProto(proto) {
|
|
122
|
+
let m = new ActionParameters();
|
|
123
|
+
m = Object.assign(m, proto);
|
|
124
|
+
if (proto.submitConditionParams) {
|
|
125
|
+
m.submitConditionParams = SubmitConditionParameters.fromProto(proto.submitConditionParams);
|
|
126
|
+
}
|
|
127
|
+
if (proto.nextParameters) {
|
|
128
|
+
m.nextParameters = NextParameters.fromProto(proto.nextParameters);
|
|
129
|
+
}
|
|
130
|
+
return m;
|
|
131
|
+
}
|
|
132
|
+
constructor(kwargs) {
|
|
133
|
+
if (!kwargs) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
Object.assign(this, kwargs);
|
|
137
|
+
}
|
|
138
|
+
toApiJson() {
|
|
139
|
+
const toReturn = {};
|
|
140
|
+
if (typeof this.submitConditionParams !== 'undefined' && this.submitConditionParams !== null) {
|
|
141
|
+
toReturn['submitConditionParams'] = 'toApiJson' in this.submitConditionParams ? this.submitConditionParams.toApiJson() : this.submitConditionParams;
|
|
142
|
+
}
|
|
143
|
+
if (typeof this.nextParameters !== 'undefined' && this.nextParameters !== null) {
|
|
144
|
+
toReturn['nextParameters'] = 'toApiJson' in this.nextParameters ? this.nextParameters.toApiJson() : this.nextParameters;
|
|
145
|
+
}
|
|
146
|
+
return toReturn;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
110
149
|
class CreateFormRequest {
|
|
111
150
|
static fromProto(proto) {
|
|
112
151
|
let m = new CreateFormRequest();
|
|
@@ -205,6 +244,29 @@ class CreateFormSubmissionResponse {
|
|
|
205
244
|
return toReturn;
|
|
206
245
|
}
|
|
207
246
|
}
|
|
247
|
+
class RenderFormResponseDefaultValues {
|
|
248
|
+
static fromProto(proto) {
|
|
249
|
+
let m = new RenderFormResponseDefaultValues();
|
|
250
|
+
m = Object.assign(m, proto);
|
|
251
|
+
return m;
|
|
252
|
+
}
|
|
253
|
+
constructor(kwargs) {
|
|
254
|
+
if (!kwargs) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
Object.assign(this, kwargs);
|
|
258
|
+
}
|
|
259
|
+
toApiJson() {
|
|
260
|
+
const toReturn = {};
|
|
261
|
+
if (typeof this.fieldId !== 'undefined') {
|
|
262
|
+
toReturn['fieldId'] = this.fieldId;
|
|
263
|
+
}
|
|
264
|
+
if (typeof this.jsonValue !== 'undefined') {
|
|
265
|
+
toReturn['jsonValue'] = this.jsonValue;
|
|
266
|
+
}
|
|
267
|
+
return toReturn;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
208
270
|
class DeleteFormRequest {
|
|
209
271
|
static fromProto(proto) {
|
|
210
272
|
let m = new DeleteFormRequest();
|
|
@@ -238,6 +300,9 @@ class FormConfigField {
|
|
|
238
300
|
if (proto.defaultValue) {
|
|
239
301
|
m.defaultValue = FieldValue.fromProto(proto.defaultValue);
|
|
240
302
|
}
|
|
303
|
+
if (proto.sectionConfig) {
|
|
304
|
+
m.sectionConfig = SectionConfig.fromProto(proto.sectionConfig);
|
|
305
|
+
}
|
|
241
306
|
return m;
|
|
242
307
|
}
|
|
243
308
|
constructor(kwargs) {
|
|
@@ -272,6 +337,9 @@ class FormConfigField {
|
|
|
272
337
|
if (typeof this.defaultPhoneIsoCountryCode !== 'undefined') {
|
|
273
338
|
toReturn['defaultPhoneIsoCountryCode'] = this.defaultPhoneIsoCountryCode;
|
|
274
339
|
}
|
|
340
|
+
if (typeof this.sectionConfig !== 'undefined' && this.sectionConfig !== null) {
|
|
341
|
+
toReturn['sectionConfig'] = 'toApiJson' in this.sectionConfig ? this.sectionConfig.toApiJson() : this.sectionConfig;
|
|
342
|
+
}
|
|
275
343
|
return toReturn;
|
|
276
344
|
}
|
|
277
345
|
}
|
|
@@ -305,6 +373,9 @@ class FieldValue {
|
|
|
305
373
|
if (proto.integer) {
|
|
306
374
|
m.integer = parseInt(proto.integer, 10);
|
|
307
375
|
}
|
|
376
|
+
if (proto.stringValues) {
|
|
377
|
+
m.stringValues = StringList.fromProto(proto.stringValues);
|
|
378
|
+
}
|
|
308
379
|
return m;
|
|
309
380
|
}
|
|
310
381
|
constructor(kwargs) {
|
|
@@ -324,6 +395,9 @@ class FieldValue {
|
|
|
324
395
|
if (typeof this.string !== 'undefined') {
|
|
325
396
|
toReturn['string'] = this.string;
|
|
326
397
|
}
|
|
398
|
+
if (typeof this.stringValues !== 'undefined' && this.stringValues !== null) {
|
|
399
|
+
toReturn['stringValues'] = 'toApiJson' in this.stringValues ? this.stringValues.toApiJson() : this.stringValues;
|
|
400
|
+
}
|
|
327
401
|
if (typeof this.boolean !== 'undefined') {
|
|
328
402
|
toReturn['boolean'] = this.boolean;
|
|
329
403
|
}
|
|
@@ -950,6 +1024,26 @@ class MappedField {
|
|
|
950
1024
|
return toReturn;
|
|
951
1025
|
}
|
|
952
1026
|
}
|
|
1027
|
+
class NextParameters {
|
|
1028
|
+
static fromProto(proto) {
|
|
1029
|
+
let m = new NextParameters();
|
|
1030
|
+
m = Object.assign(m, proto);
|
|
1031
|
+
return m;
|
|
1032
|
+
}
|
|
1033
|
+
constructor(kwargs) {
|
|
1034
|
+
if (!kwargs) {
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
Object.assign(this, kwargs);
|
|
1038
|
+
}
|
|
1039
|
+
toApiJson() {
|
|
1040
|
+
const toReturn = {};
|
|
1041
|
+
if (typeof this.nextSectionId !== 'undefined') {
|
|
1042
|
+
toReturn['nextSectionId'] = this.nextSectionId;
|
|
1043
|
+
}
|
|
1044
|
+
return toReturn;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
953
1047
|
class RenderFormResponsePreFillByUrlQueryParameter {
|
|
954
1048
|
static fromProto(proto) {
|
|
955
1049
|
let m = new RenderFormResponsePreFillByUrlQueryParameter();
|
|
@@ -1061,6 +1155,9 @@ class RenderFormResponse {
|
|
|
1061
1155
|
if (proto.fieldQueryParams) {
|
|
1062
1156
|
m.fieldQueryParams = proto.fieldQueryParams.map(RenderFormResponsePreFillByUrlQueryParameter.fromProto);
|
|
1063
1157
|
}
|
|
1158
|
+
if (proto.defaultValues) {
|
|
1159
|
+
m.defaultValues = proto.defaultValues.map(RenderFormResponseDefaultValues.fromProto);
|
|
1160
|
+
}
|
|
1064
1161
|
return m;
|
|
1065
1162
|
}
|
|
1066
1163
|
constructor(kwargs) {
|
|
@@ -1086,6 +1183,9 @@ class RenderFormResponse {
|
|
|
1086
1183
|
if (typeof this.recaptchaSiteKey !== 'undefined') {
|
|
1087
1184
|
toReturn['recaptchaSiteKey'] = this.recaptchaSiteKey;
|
|
1088
1185
|
}
|
|
1186
|
+
if (typeof this.defaultValues !== 'undefined' && this.defaultValues !== null) {
|
|
1187
|
+
toReturn['defaultValues'] = 'toApiJson' in this.defaultValues ? this.defaultValues.toApiJson() : this.defaultValues;
|
|
1188
|
+
}
|
|
1089
1189
|
return toReturn;
|
|
1090
1190
|
}
|
|
1091
1191
|
}
|
|
@@ -1118,6 +1218,58 @@ class FormConfigFieldSchema {
|
|
|
1118
1218
|
return toReturn;
|
|
1119
1219
|
}
|
|
1120
1220
|
}
|
|
1221
|
+
class SectionConfig {
|
|
1222
|
+
static fromProto(proto) {
|
|
1223
|
+
let m = new SectionConfig();
|
|
1224
|
+
m = Object.assign(m, proto);
|
|
1225
|
+
if (proto.buttonAction) {
|
|
1226
|
+
m.buttonAction = enumStringToValue(SectionAction, proto.buttonAction);
|
|
1227
|
+
}
|
|
1228
|
+
if (proto.actionParameters) {
|
|
1229
|
+
m.actionParameters = ActionParameters.fromProto(proto.actionParameters);
|
|
1230
|
+
}
|
|
1231
|
+
return m;
|
|
1232
|
+
}
|
|
1233
|
+
constructor(kwargs) {
|
|
1234
|
+
if (!kwargs) {
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
Object.assign(this, kwargs);
|
|
1238
|
+
}
|
|
1239
|
+
toApiJson() {
|
|
1240
|
+
const toReturn = {};
|
|
1241
|
+
if (typeof this.buttonLabel !== 'undefined') {
|
|
1242
|
+
toReturn['buttonLabel'] = this.buttonLabel;
|
|
1243
|
+
}
|
|
1244
|
+
if (typeof this.buttonAction !== 'undefined') {
|
|
1245
|
+
toReturn['buttonAction'] = this.buttonAction;
|
|
1246
|
+
}
|
|
1247
|
+
if (typeof this.actionParameters !== 'undefined' && this.actionParameters !== null) {
|
|
1248
|
+
toReturn['actionParameters'] = 'toApiJson' in this.actionParameters ? this.actionParameters.toApiJson() : this.actionParameters;
|
|
1249
|
+
}
|
|
1250
|
+
return toReturn;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
class StringList {
|
|
1254
|
+
static fromProto(proto) {
|
|
1255
|
+
let m = new StringList();
|
|
1256
|
+
m = Object.assign(m, proto);
|
|
1257
|
+
return m;
|
|
1258
|
+
}
|
|
1259
|
+
constructor(kwargs) {
|
|
1260
|
+
if (!kwargs) {
|
|
1261
|
+
return;
|
|
1262
|
+
}
|
|
1263
|
+
Object.assign(this, kwargs);
|
|
1264
|
+
}
|
|
1265
|
+
toApiJson() {
|
|
1266
|
+
const toReturn = {};
|
|
1267
|
+
if (typeof this.values !== 'undefined') {
|
|
1268
|
+
toReturn['values'] = this.values;
|
|
1269
|
+
}
|
|
1270
|
+
return toReturn;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1121
1273
|
class Styles {
|
|
1122
1274
|
static fromProto(proto) {
|
|
1123
1275
|
let m = new Styles();
|
|
@@ -1165,6 +1317,50 @@ class Styles {
|
|
|
1165
1317
|
return toReturn;
|
|
1166
1318
|
}
|
|
1167
1319
|
}
|
|
1320
|
+
class SubmitConditionParameters {
|
|
1321
|
+
static fromProto(proto) {
|
|
1322
|
+
let m = new SubmitConditionParameters();
|
|
1323
|
+
m = Object.assign(m, proto);
|
|
1324
|
+
if (proto.onConditionFailure) {
|
|
1325
|
+
m.onConditionFailure = enumStringToValue(SectionAction, proto.onConditionFailure);
|
|
1326
|
+
}
|
|
1327
|
+
if (proto.onConditionFailureParameters) {
|
|
1328
|
+
m.onConditionFailureParameters = ActionParameters.fromProto(proto.onConditionFailureParameters);
|
|
1329
|
+
}
|
|
1330
|
+
return m;
|
|
1331
|
+
}
|
|
1332
|
+
constructor(kwargs) {
|
|
1333
|
+
if (!kwargs) {
|
|
1334
|
+
return;
|
|
1335
|
+
}
|
|
1336
|
+
Object.assign(this, kwargs);
|
|
1337
|
+
}
|
|
1338
|
+
toApiJson() {
|
|
1339
|
+
const toReturn = {};
|
|
1340
|
+
if (typeof this.fieldId !== 'undefined') {
|
|
1341
|
+
toReturn['fieldId'] = this.fieldId;
|
|
1342
|
+
}
|
|
1343
|
+
if (typeof this.noValue !== 'undefined') {
|
|
1344
|
+
toReturn['noValue'] = this.noValue;
|
|
1345
|
+
}
|
|
1346
|
+
if (typeof this.anyValue !== 'undefined') {
|
|
1347
|
+
toReturn['anyValue'] = this.anyValue;
|
|
1348
|
+
}
|
|
1349
|
+
if (typeof this.isValue !== 'undefined') {
|
|
1350
|
+
toReturn['isValue'] = this.isValue;
|
|
1351
|
+
}
|
|
1352
|
+
if (typeof this.isNotValue !== 'undefined') {
|
|
1353
|
+
toReturn['isNotValue'] = this.isNotValue;
|
|
1354
|
+
}
|
|
1355
|
+
if (typeof this.onConditionFailure !== 'undefined') {
|
|
1356
|
+
toReturn['onConditionFailure'] = this.onConditionFailure;
|
|
1357
|
+
}
|
|
1358
|
+
if (typeof this.onConditionFailureParameters !== 'undefined' && this.onConditionFailureParameters !== null) {
|
|
1359
|
+
toReturn['onConditionFailureParameters'] = 'toApiJson' in this.onConditionFailureParameters ? this.onConditionFailureParameters.toApiJson() : this.onConditionFailureParameters;
|
|
1360
|
+
}
|
|
1361
|
+
return toReturn;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1168
1364
|
class FormSubmissionSubmittedValue {
|
|
1169
1365
|
static fromProto(proto) {
|
|
1170
1366
|
let m = new FormSubmissionSubmittedValue();
|
|
@@ -1583,5 +1779,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1583
1779
|
* Generated bundle index. Do not edit.
|
|
1584
1780
|
*/
|
|
1585
1781
|
|
|
1586
|
-
export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FieldOption, FieldType, FieldValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormSubmission, FormSubmissionApiService, FormSubmissionSubmittedValue, FormSubmissionsExportService, FormsApiService, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, GetMultiFormSubmissionRequest, GetMultiFormSubmissionResponse, GetMultiFormVersionsListRequest, GetMultiFormVersionsListResponse, GetMultiFormVersionsListResponseVersions, GetMultiRequest, GetMultiRequestFormConfigIdentifier, GetMultiResponse, HostService, JsonSchemaLibrary, ListFormSubmissionRequest, ListFormSubmissionResponse, ListFormsRequest, ListFormsRequestFilters, ListFormsResponse, ListFormsResponseFormRow, ListMappedFieldSchemaRequest, ListMappedFieldSchemaResponse, MappedField, PagedRequestOptions, PagedResponseMetadata, PreviewFormRequest, PreviewFormResponse, RenderFormRequest, RenderFormResponse, RenderFormResponsePreFillByUrlQueryParameter, Styles, SystemDefined, UnmappedField, UpdateFormRequest, UpdateFormResponse, UserFormSubmission, ValidationError };
|
|
1782
|
+
export { ActionParameters, CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FieldOption, FieldType, FieldValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormSubmission, FormSubmissionApiService, FormSubmissionSubmittedValue, FormSubmissionsExportService, FormsApiService, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, GetMultiFormSubmissionRequest, GetMultiFormSubmissionResponse, GetMultiFormVersionsListRequest, GetMultiFormVersionsListResponse, GetMultiFormVersionsListResponseVersions, GetMultiRequest, GetMultiRequestFormConfigIdentifier, GetMultiResponse, HostService, JsonSchemaLibrary, ListFormSubmissionRequest, ListFormSubmissionResponse, ListFormsRequest, ListFormsRequestFilters, ListFormsResponse, ListFormsResponseFormRow, ListMappedFieldSchemaRequest, ListMappedFieldSchemaResponse, MappedField, NextParameters, PagedRequestOptions, PagedResponseMetadata, PreviewFormRequest, PreviewFormResponse, RenderFormRequest, RenderFormResponse, RenderFormResponseDefaultValues, RenderFormResponsePreFillByUrlQueryParameter, SectionAction, SectionConfig, StringList, Styles, SubmitConditionParameters, SystemDefined, UnmappedField, UpdateFormRequest, UpdateFormResponse, UserFormSubmission, ValidationError };
|
|
1587
1783
|
//# sourceMappingURL=vendasta-forms_microservice.mjs.map
|