@vendasta/forms_microservice 0.0.15 → 0.0.16

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.
@@ -188,29 +188,6 @@ class DeleteFormRequest {
188
188
  return toReturn;
189
189
  }
190
190
  }
191
- class FormConfigFieldUnmappedFieldDropdownOption {
192
- constructor(kwargs) {
193
- if (!kwargs) {
194
- return;
195
- }
196
- Object.assign(this, kwargs);
197
- }
198
- static fromProto(proto) {
199
- let m = new FormConfigFieldUnmappedFieldDropdownOption();
200
- m = Object.assign(m, proto);
201
- return m;
202
- }
203
- toApiJson() {
204
- const toReturn = {};
205
- if (typeof this.value !== 'undefined') {
206
- toReturn['value'] = this.value;
207
- }
208
- if (typeof this.label !== 'undefined') {
209
- toReturn['label'] = this.label;
210
- }
211
- return toReturn;
212
- }
213
- }
214
191
  class FormConfigField {
215
192
  constructor(kwargs) {
216
193
  if (!kwargs) {
@@ -262,9 +239,6 @@ class FieldValue {
262
239
  if (proto.integer) {
263
240
  m.integer = parseInt(proto.integer, 10);
264
241
  }
265
- if (proto.currency) {
266
- m.currency = parseInt(proto.currency, 10);
267
- }
268
242
  return m;
269
243
  }
270
244
  toApiJson() {
@@ -278,15 +252,6 @@ class FieldValue {
278
252
  if (typeof this.string !== 'undefined') {
279
253
  toReturn['string'] = this.string;
280
254
  }
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
255
  if (typeof this.boolean !== 'undefined') {
291
256
  toReturn['boolean'] = this.boolean;
292
257
  }
@@ -427,7 +392,7 @@ class ListFormsResponseFormRow {
427
392
  return toReturn;
428
393
  }
429
394
  }
430
- class FormSubmission {
395
+ class ListFormSubmissionResponseFormSubmission {
431
396
  constructor(kwargs) {
432
397
  if (!kwargs) {
433
398
  return;
@@ -435,25 +400,28 @@ class FormSubmission {
435
400
  Object.assign(this, kwargs);
436
401
  }
437
402
  static fromProto(proto) {
438
- let m = new FormSubmission();
403
+ let m = new ListFormSubmissionResponseFormSubmission();
439
404
  m = Object.assign(m, proto);
405
+ if (proto.values) {
406
+ m.values = proto.values.map(ListFormSubmissionResponseFormSubmissionSubmittedValue.fromProto);
407
+ }
440
408
  return m;
441
409
  }
442
410
  toApiJson() {
443
411
  const toReturn = {};
444
- if (typeof this.formId !== 'undefined') {
445
- toReturn['formId'] = this.formId;
412
+ if (typeof this.formSubmissionId !== 'undefined') {
413
+ toReturn['formSubmissionId'] = this.formSubmissionId;
446
414
  }
447
- if (typeof this.version !== 'undefined') {
448
- toReturn['version'] = this.version;
415
+ if (typeof this.formVersion !== 'undefined') {
416
+ toReturn['formVersion'] = this.formVersion;
449
417
  }
450
- if (typeof this.values !== 'undefined') {
451
- toReturn['values'] = this.values;
418
+ if (typeof this.values !== 'undefined' && this.values !== null) {
419
+ toReturn['values'] = 'toApiJson' in this.values ? this.values.toApiJson() : this.values;
452
420
  }
453
421
  return toReturn;
454
422
  }
455
423
  }
456
- class ListFormSubmissionResponseFormSubmission {
424
+ class FormSubmission {
457
425
  constructor(kwargs) {
458
426
  if (!kwargs) {
459
427
  return;
@@ -461,23 +429,20 @@ class ListFormSubmissionResponseFormSubmission {
461
429
  Object.assign(this, kwargs);
462
430
  }
463
431
  static fromProto(proto) {
464
- let m = new ListFormSubmissionResponseFormSubmission();
432
+ let m = new FormSubmission();
465
433
  m = Object.assign(m, proto);
466
- if (proto.values) {
467
- m.values = proto.values.map(ListFormSubmissionResponseFormSubmissionSubmittedValue.fromProto);
468
- }
469
434
  return m;
470
435
  }
471
436
  toApiJson() {
472
437
  const toReturn = {};
473
- if (typeof this.formSubmissionId !== 'undefined') {
474
- toReturn['formSubmissionId'] = this.formSubmissionId;
438
+ if (typeof this.formId !== 'undefined') {
439
+ toReturn['formId'] = this.formId;
475
440
  }
476
- if (typeof this.formVersion !== 'undefined') {
477
- toReturn['formVersion'] = this.formVersion;
441
+ if (typeof this.version !== 'undefined') {
442
+ toReturn['version'] = this.version;
478
443
  }
479
- if (typeof this.values !== 'undefined' && this.values !== null) {
480
- toReturn['values'] = 'toApiJson' in this.values ? this.values.toApiJson() : this.values;
444
+ if (typeof this.values !== 'undefined') {
445
+ toReturn['values'] = this.values;
481
446
  }
482
447
  return toReturn;
483
448
  }
@@ -767,6 +732,29 @@ class ListFormsResponse {
767
732
  return toReturn;
768
733
  }
769
734
  }
735
+ class FormConfigFieldUnmappedFieldOption {
736
+ constructor(kwargs) {
737
+ if (!kwargs) {
738
+ return;
739
+ }
740
+ Object.assign(this, kwargs);
741
+ }
742
+ static fromProto(proto) {
743
+ let m = new FormConfigFieldUnmappedFieldOption();
744
+ m = Object.assign(m, proto);
745
+ return m;
746
+ }
747
+ toApiJson() {
748
+ const toReturn = {};
749
+ if (typeof this.value !== 'undefined') {
750
+ toReturn['value'] = this.value;
751
+ }
752
+ if (typeof this.label !== 'undefined') {
753
+ toReturn['label'] = this.label;
754
+ }
755
+ return toReturn;
756
+ }
757
+ }
770
758
  class PreviewFormRequest {
771
759
  constructor(kwargs) {
772
760
  if (!kwargs) {
@@ -977,8 +965,8 @@ class FormConfigFieldUnmappedField {
977
965
  if (proto.type) {
978
966
  m.type = enumStringToValue(FieldType, proto.type);
979
967
  }
980
- if (proto.dropdownOptions) {
981
- m.dropdownOptions = proto.dropdownOptions.map(FormConfigFieldUnmappedFieldDropdownOption.fromProto);
968
+ if (proto.options) {
969
+ m.options = proto.options.map(FormConfigFieldUnmappedFieldOption.fromProto);
982
970
  }
983
971
  return m;
984
972
  }
@@ -990,8 +978,8 @@ class FormConfigFieldUnmappedField {
990
978
  if (typeof this.type !== 'undefined') {
991
979
  toReturn['type'] = this.type;
992
980
  }
993
- if (typeof this.dropdownOptions !== 'undefined' && this.dropdownOptions !== null) {
994
- toReturn['dropdownOptions'] = 'toApiJson' in this.dropdownOptions ? this.dropdownOptions.toApiJson() : this.dropdownOptions;
981
+ if (typeof this.options !== 'undefined' && this.options !== null) {
982
+ toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
995
983
  }
996
984
  if (typeof this.currencyCode !== 'undefined') {
997
985
  toReturn['currencyCode'] = this.currencyCode;
@@ -1204,5 +1192,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
1204
1192
  * Generated bundle index. Do not edit.
1205
1193
  */
1206
1194
 
1207
- export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, DeleteFormRequest, FieldType, FieldValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormConfigFieldUnmappedField, FormConfigFieldUnmappedFieldDropdownOption, 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 };
1195
+ export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, 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
1196
  //# sourceMappingURL=vendasta-forms_microservice.mjs.map