@vendasta/forms_microservice 0.0.15 → 0.0.18
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 +2 -1
- package/esm2020/lib/_internal/form-submission.api.service.mjs +4 -3
- 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 +38 -30
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/fesm2015/vendasta-forms_microservice.mjs +41 -31
- package/fesm2015/vendasta-forms_microservice.mjs.map +1 -1
- package/fesm2020/vendasta-forms_microservice.mjs +41 -31
- package/fesm2020/vendasta-forms_microservice.mjs.map +1 -1
- package/lib/_internal/enums/api.enum.d.ts +2 -1
- package/lib/_internal/form-submission.api.service.d.ts +3 -3
- package/lib/_internal/interfaces/api.interface.d.ts +8 -8
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +14 -11
- package/lib/_internal/objects/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ var FieldType;
|
|
|
19
19
|
FieldType[FieldType["FIELD_TYPE_DROPDOWN"] = 4] = "FIELD_TYPE_DROPDOWN";
|
|
20
20
|
FieldType[FieldType["FIELD_TYPE_CURRENCY"] = 5] = "FIELD_TYPE_CURRENCY";
|
|
21
21
|
FieldType[FieldType["FIELD_TYPE_BOOLEAN"] = 6] = "FIELD_TYPE_BOOLEAN";
|
|
22
|
+
FieldType[FieldType["FIELD_TYPE_RADIO"] = 7] = "FIELD_TYPE_RADIO";
|
|
22
23
|
})(FieldType || (FieldType = {}));
|
|
23
24
|
var JsonSchemaLibrary;
|
|
24
25
|
(function (JsonSchemaLibrary) {
|
|
@@ -165,7 +166,7 @@ class CreateFormSubmissionRequest {
|
|
|
165
166
|
return toReturn;
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
|
-
class
|
|
169
|
+
class CreateFormSubmissionResponse {
|
|
169
170
|
constructor(kwargs) {
|
|
170
171
|
if (!kwargs) {
|
|
171
172
|
return;
|
|
@@ -173,22 +174,19 @@ class DeleteFormRequest {
|
|
|
173
174
|
Object.assign(this, kwargs);
|
|
174
175
|
}
|
|
175
176
|
static fromProto(proto) {
|
|
176
|
-
let m = new
|
|
177
|
+
let m = new CreateFormSubmissionResponse();
|
|
177
178
|
m = Object.assign(m, proto);
|
|
178
179
|
return m;
|
|
179
180
|
}
|
|
180
181
|
toApiJson() {
|
|
181
182
|
const toReturn = {};
|
|
182
|
-
if (typeof this.
|
|
183
|
-
toReturn['
|
|
184
|
-
}
|
|
185
|
-
if (typeof this.version !== 'undefined') {
|
|
186
|
-
toReturn['version'] = this.version;
|
|
183
|
+
if (typeof this.redirectUrl !== 'undefined') {
|
|
184
|
+
toReturn['redirectUrl'] = this.redirectUrl;
|
|
187
185
|
}
|
|
188
186
|
return toReturn;
|
|
189
187
|
}
|
|
190
188
|
}
|
|
191
|
-
class
|
|
189
|
+
class DeleteFormRequest {
|
|
192
190
|
constructor(kwargs) {
|
|
193
191
|
if (!kwargs) {
|
|
194
192
|
return;
|
|
@@ -196,17 +194,17 @@ class FormConfigFieldUnmappedFieldDropdownOption {
|
|
|
196
194
|
Object.assign(this, kwargs);
|
|
197
195
|
}
|
|
198
196
|
static fromProto(proto) {
|
|
199
|
-
let m = new
|
|
197
|
+
let m = new DeleteFormRequest();
|
|
200
198
|
m = Object.assign(m, proto);
|
|
201
199
|
return m;
|
|
202
200
|
}
|
|
203
201
|
toApiJson() {
|
|
204
202
|
const toReturn = {};
|
|
205
|
-
if (typeof this.
|
|
206
|
-
toReturn['
|
|
203
|
+
if (typeof this.formId !== 'undefined') {
|
|
204
|
+
toReturn['formId'] = this.formId;
|
|
207
205
|
}
|
|
208
|
-
if (typeof this.
|
|
209
|
-
toReturn['
|
|
206
|
+
if (typeof this.version !== 'undefined') {
|
|
207
|
+
toReturn['version'] = this.version;
|
|
210
208
|
}
|
|
211
209
|
return toReturn;
|
|
212
210
|
}
|
|
@@ -262,9 +260,6 @@ class FieldValue {
|
|
|
262
260
|
if (proto.integer) {
|
|
263
261
|
m.integer = parseInt(proto.integer, 10);
|
|
264
262
|
}
|
|
265
|
-
if (proto.currency) {
|
|
266
|
-
m.currency = parseInt(proto.currency, 10);
|
|
267
|
-
}
|
|
268
263
|
return m;
|
|
269
264
|
}
|
|
270
265
|
toApiJson() {
|
|
@@ -278,15 +273,6 @@ class FieldValue {
|
|
|
278
273
|
if (typeof this.string !== 'undefined') {
|
|
279
274
|
toReturn['string'] = this.string;
|
|
280
275
|
}
|
|
281
|
-
if (typeof this.date !== 'undefined') {
|
|
282
|
-
toReturn['date'] = this.date;
|
|
283
|
-
}
|
|
284
|
-
if (typeof this.dropdown !== 'undefined') {
|
|
285
|
-
toReturn['dropdown'] = this.dropdown;
|
|
286
|
-
}
|
|
287
|
-
if (typeof this.currency !== 'undefined') {
|
|
288
|
-
toReturn['currency'] = this.currency;
|
|
289
|
-
}
|
|
290
276
|
if (typeof this.boolean !== 'undefined') {
|
|
291
277
|
toReturn['boolean'] = this.boolean;
|
|
292
278
|
}
|
|
@@ -767,6 +753,29 @@ class ListFormsResponse {
|
|
|
767
753
|
return toReturn;
|
|
768
754
|
}
|
|
769
755
|
}
|
|
756
|
+
class FormConfigFieldUnmappedFieldOption {
|
|
757
|
+
constructor(kwargs) {
|
|
758
|
+
if (!kwargs) {
|
|
759
|
+
return;
|
|
760
|
+
}
|
|
761
|
+
Object.assign(this, kwargs);
|
|
762
|
+
}
|
|
763
|
+
static fromProto(proto) {
|
|
764
|
+
let m = new FormConfigFieldUnmappedFieldOption();
|
|
765
|
+
m = Object.assign(m, proto);
|
|
766
|
+
return m;
|
|
767
|
+
}
|
|
768
|
+
toApiJson() {
|
|
769
|
+
const toReturn = {};
|
|
770
|
+
if (typeof this.value !== 'undefined') {
|
|
771
|
+
toReturn['value'] = this.value;
|
|
772
|
+
}
|
|
773
|
+
if (typeof this.label !== 'undefined') {
|
|
774
|
+
toReturn['label'] = this.label;
|
|
775
|
+
}
|
|
776
|
+
return toReturn;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
770
779
|
class PreviewFormRequest {
|
|
771
780
|
constructor(kwargs) {
|
|
772
781
|
if (!kwargs) {
|
|
@@ -977,8 +986,8 @@ class FormConfigFieldUnmappedField {
|
|
|
977
986
|
if (proto.type) {
|
|
978
987
|
m.type = enumStringToValue(FieldType, proto.type);
|
|
979
988
|
}
|
|
980
|
-
if (proto.
|
|
981
|
-
m.
|
|
989
|
+
if (proto.options) {
|
|
990
|
+
m.options = proto.options.map(FormConfigFieldUnmappedFieldOption.fromProto);
|
|
982
991
|
}
|
|
983
992
|
return m;
|
|
984
993
|
}
|
|
@@ -990,8 +999,8 @@ class FormConfigFieldUnmappedField {
|
|
|
990
999
|
if (typeof this.type !== 'undefined') {
|
|
991
1000
|
toReturn['type'] = this.type;
|
|
992
1001
|
}
|
|
993
|
-
if (typeof this.
|
|
994
|
-
toReturn['
|
|
1002
|
+
if (typeof this.options !== 'undefined' && this.options !== null) {
|
|
1003
|
+
toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
|
|
995
1004
|
}
|
|
996
1005
|
if (typeof this.currencyCode !== 'undefined') {
|
|
997
1006
|
toReturn['currencyCode'] = this.currencyCode;
|
|
@@ -1109,7 +1118,8 @@ class FormSubmissionApiService {
|
|
|
1109
1118
|
}
|
|
1110
1119
|
createFormSubmission(r) {
|
|
1111
1120
|
const request = (r.toApiJson) ? r : new CreateFormSubmissionRequest(r);
|
|
1112
|
-
return this.http.post(this._host + "/forms.v1.FormSubmissionService/CreateFormSubmission", request.toApiJson(),
|
|
1121
|
+
return this.http.post(this._host + "/forms.v1.FormSubmissionService/CreateFormSubmission", request.toApiJson(), this.apiOptions())
|
|
1122
|
+
.pipe(map(resp => CreateFormSubmissionResponse.fromProto(resp)));
|
|
1113
1123
|
}
|
|
1114
1124
|
listFormSubmission(r) {
|
|
1115
1125
|
const request = (r.toApiJson) ? r : new ListFormSubmissionRequest(r);
|
|
@@ -1204,5 +1214,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1204
1214
|
* Generated bundle index. Do not edit.
|
|
1205
1215
|
*/
|
|
1206
1216
|
|
|
1207
|
-
export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, DeleteFormRequest, FieldType, FieldValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormConfigFieldUnmappedField,
|
|
1217
|
+
export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FieldType, FieldValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormConfigFieldUnmappedField, FormConfigFieldUnmappedFieldOption, FormSubmission, FormSubmissionApiService, FormsApiService, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, GetMultiFormVersionsListRequest, GetMultiFormVersionsListResponse, GetMultiFormVersionsListResponseVersions, GetMultiRequest, GetMultiRequestFormConfigIdentifier, GetMultiResponse, HostService, JsonSchemaLibrary, ListFormSubmissionRequest, ListFormSubmissionResponse, ListFormSubmissionResponseFormSubmission, ListFormSubmissionResponseFormSubmissionSubmittedValue, ListFormsRequest, ListFormsRequestFilters, ListFormsResponse, ListFormsResponseFormRow, PagedRequestOptions, PagedResponseMetadata, PreviewFormRequest, PreviewFormResponse, RenderFormRequest, RenderFormResponse, Styles, UpdateFormRequest, UpdateFormResponse };
|
|
1208
1218
|
//# sourceMappingURL=vendasta-forms_microservice.mjs.map
|