@vendasta/forms_microservice 0.0.25 → 0.1.1

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.
@@ -37,12 +37,6 @@ function enumStringToValue$1(enumRef, value) {
37
37
  return enumRef[value];
38
38
  }
39
39
  class PagedRequestOptions {
40
- constructor(kwargs) {
41
- if (!kwargs) {
42
- return;
43
- }
44
- Object.assign(this, kwargs);
45
- }
46
40
  static fromProto(proto) {
47
41
  let m = new PagedRequestOptions();
48
42
  m = Object.assign(m, proto);
@@ -51,6 +45,12 @@ class PagedRequestOptions {
51
45
  }
52
46
  return m;
53
47
  }
48
+ constructor(kwargs) {
49
+ if (!kwargs) {
50
+ return;
51
+ }
52
+ Object.assign(this, kwargs);
53
+ }
54
54
  toApiJson() {
55
55
  const toReturn = {};
56
56
  if (typeof this.cursor !== 'undefined') {
@@ -63,12 +63,6 @@ class PagedRequestOptions {
63
63
  }
64
64
  }
65
65
  class PagedResponseMetadata {
66
- constructor(kwargs) {
67
- if (!kwargs) {
68
- return;
69
- }
70
- Object.assign(this, kwargs);
71
- }
72
66
  static fromProto(proto) {
73
67
  let m = new PagedResponseMetadata();
74
68
  m = Object.assign(m, proto);
@@ -77,6 +71,12 @@ class PagedResponseMetadata {
77
71
  }
78
72
  return m;
79
73
  }
74
+ constructor(kwargs) {
75
+ if (!kwargs) {
76
+ return;
77
+ }
78
+ Object.assign(this, kwargs);
79
+ }
80
80
  toApiJson() {
81
81
  const toReturn = {};
82
82
  if (typeof this.nextCursor !== 'undefined') {
@@ -99,12 +99,6 @@ function enumStringToValue(enumRef, value) {
99
99
  return enumRef[value];
100
100
  }
101
101
  class CreateFormRequest {
102
- constructor(kwargs) {
103
- if (!kwargs) {
104
- return;
105
- }
106
- Object.assign(this, kwargs);
107
- }
108
102
  static fromProto(proto) {
109
103
  let m = new CreateFormRequest();
110
104
  m = Object.assign(m, proto);
@@ -113,6 +107,12 @@ class CreateFormRequest {
113
107
  }
114
108
  return m;
115
109
  }
110
+ constructor(kwargs) {
111
+ if (!kwargs) {
112
+ return;
113
+ }
114
+ Object.assign(this, kwargs);
115
+ }
116
116
  toApiJson() {
117
117
  const toReturn = {};
118
118
  if (typeof this.formConfig !== 'undefined' && this.formConfig !== null) {
@@ -122,17 +122,20 @@ class CreateFormRequest {
122
122
  }
123
123
  }
124
124
  class CreateFormResponse {
125
+ static fromProto(proto) {
126
+ let m = new CreateFormResponse();
127
+ m = Object.assign(m, proto);
128
+ if (proto.errors) {
129
+ m.errors = proto.errors.map(ValidationError.fromProto);
130
+ }
131
+ return m;
132
+ }
125
133
  constructor(kwargs) {
126
134
  if (!kwargs) {
127
135
  return;
128
136
  }
129
137
  Object.assign(this, kwargs);
130
138
  }
131
- static fromProto(proto) {
132
- let m = new CreateFormResponse();
133
- m = Object.assign(m, proto);
134
- return m;
135
- }
136
139
  toApiJson() {
137
140
  const toReturn = {};
138
141
  if (typeof this.formId !== 'undefined') {
@@ -141,16 +144,13 @@ class CreateFormResponse {
141
144
  if (typeof this.version !== 'undefined') {
142
145
  toReturn['version'] = this.version;
143
146
  }
147
+ if (typeof this.errors !== 'undefined' && this.errors !== null) {
148
+ toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
149
+ }
144
150
  return toReturn;
145
151
  }
146
152
  }
147
153
  class CreateFormSubmissionRequest {
148
- constructor(kwargs) {
149
- if (!kwargs) {
150
- return;
151
- }
152
- Object.assign(this, kwargs);
153
- }
154
154
  static fromProto(proto) {
155
155
  let m = new CreateFormSubmissionRequest();
156
156
  m = Object.assign(m, proto);
@@ -159,6 +159,12 @@ class CreateFormSubmissionRequest {
159
159
  }
160
160
  return m;
161
161
  }
162
+ constructor(kwargs) {
163
+ if (!kwargs) {
164
+ return;
165
+ }
166
+ Object.assign(this, kwargs);
167
+ }
162
168
  toApiJson() {
163
169
  const toReturn = {};
164
170
  if (typeof this.submission !== 'undefined' && this.submission !== null) {
@@ -171,17 +177,17 @@ class CreateFormSubmissionRequest {
171
177
  }
172
178
  }
173
179
  class CreateFormSubmissionResponse {
180
+ static fromProto(proto) {
181
+ let m = new CreateFormSubmissionResponse();
182
+ m = Object.assign(m, proto);
183
+ return m;
184
+ }
174
185
  constructor(kwargs) {
175
186
  if (!kwargs) {
176
187
  return;
177
188
  }
178
189
  Object.assign(this, kwargs);
179
190
  }
180
- static fromProto(proto) {
181
- let m = new CreateFormSubmissionResponse();
182
- m = Object.assign(m, proto);
183
- return m;
184
- }
185
191
  toApiJson() {
186
192
  const toReturn = {};
187
193
  if (typeof this.redirectUrl !== 'undefined') {
@@ -191,17 +197,17 @@ class CreateFormSubmissionResponse {
191
197
  }
192
198
  }
193
199
  class DeleteFormRequest {
200
+ static fromProto(proto) {
201
+ let m = new DeleteFormRequest();
202
+ m = Object.assign(m, proto);
203
+ return m;
204
+ }
194
205
  constructor(kwargs) {
195
206
  if (!kwargs) {
196
207
  return;
197
208
  }
198
209
  Object.assign(this, kwargs);
199
210
  }
200
- static fromProto(proto) {
201
- let m = new DeleteFormRequest();
202
- m = Object.assign(m, proto);
203
- return m;
204
- }
205
211
  toApiJson() {
206
212
  const toReturn = {};
207
213
  if (typeof this.formId !== 'undefined') {
@@ -214,12 +220,6 @@ class DeleteFormRequest {
214
220
  }
215
221
  }
216
222
  class FormConfigField {
217
- constructor(kwargs) {
218
- if (!kwargs) {
219
- return;
220
- }
221
- Object.assign(this, kwargs);
222
- }
223
223
  static fromProto(proto) {
224
224
  let m = new FormConfigField();
225
225
  m = Object.assign(m, proto);
@@ -231,6 +231,12 @@ class FormConfigField {
231
231
  }
232
232
  return m;
233
233
  }
234
+ constructor(kwargs) {
235
+ if (!kwargs) {
236
+ return;
237
+ }
238
+ Object.assign(this, kwargs);
239
+ }
234
240
  toApiJson() {
235
241
  const toReturn = {};
236
242
  if (typeof this.schema !== 'undefined' && this.schema !== null) {
@@ -258,12 +264,6 @@ class FormConfigField {
258
264
  }
259
265
  }
260
266
  class FieldValue {
261
- constructor(kwargs) {
262
- if (!kwargs) {
263
- return;
264
- }
265
- Object.assign(this, kwargs);
266
- }
267
267
  static fromProto(proto) {
268
268
  let m = new FieldValue();
269
269
  m = Object.assign(m, proto);
@@ -272,6 +272,12 @@ class FieldValue {
272
272
  }
273
273
  return m;
274
274
  }
275
+ constructor(kwargs) {
276
+ if (!kwargs) {
277
+ return;
278
+ }
279
+ Object.assign(this, kwargs);
280
+ }
275
281
  toApiJson() {
276
282
  const toReturn = {};
277
283
  if (typeof this.invalid !== 'undefined') {
@@ -290,17 +296,17 @@ class FieldValue {
290
296
  }
291
297
  }
292
298
  class ListFormsRequestFilters {
299
+ static fromProto(proto) {
300
+ let m = new ListFormsRequestFilters();
301
+ m = Object.assign(m, proto);
302
+ return m;
303
+ }
293
304
  constructor(kwargs) {
294
305
  if (!kwargs) {
295
306
  return;
296
307
  }
297
308
  Object.assign(this, kwargs);
298
309
  }
299
- static fromProto(proto) {
300
- let m = new ListFormsRequestFilters();
301
- m = Object.assign(m, proto);
302
- return m;
303
- }
304
310
  toApiJson() {
305
311
  const toReturn = {};
306
312
  if (typeof this.partnerId !== 'undefined') {
@@ -310,12 +316,6 @@ class ListFormsRequestFilters {
310
316
  }
311
317
  }
312
318
  class FormConfig {
313
- constructor(kwargs) {
314
- if (!kwargs) {
315
- return;
316
- }
317
- Object.assign(this, kwargs);
318
- }
319
319
  static fromProto(proto) {
320
320
  let m = new FormConfig();
321
321
  m = Object.assign(m, proto);
@@ -333,6 +333,12 @@ class FormConfig {
333
333
  }
334
334
  return m;
335
335
  }
336
+ constructor(kwargs) {
337
+ if (!kwargs) {
338
+ return;
339
+ }
340
+ Object.assign(this, kwargs);
341
+ }
336
342
  toApiJson() {
337
343
  const toReturn = {};
338
344
  if (typeof this.formId !== 'undefined') {
@@ -381,17 +387,17 @@ class FormConfig {
381
387
  }
382
388
  }
383
389
  class GetMultiRequestFormConfigIdentifier {
390
+ static fromProto(proto) {
391
+ let m = new GetMultiRequestFormConfigIdentifier();
392
+ m = Object.assign(m, proto);
393
+ return m;
394
+ }
384
395
  constructor(kwargs) {
385
396
  if (!kwargs) {
386
397
  return;
387
398
  }
388
399
  Object.assign(this, kwargs);
389
400
  }
390
- static fromProto(proto) {
391
- let m = new GetMultiRequestFormConfigIdentifier();
392
- m = Object.assign(m, proto);
393
- return m;
394
- }
395
401
  toApiJson() {
396
402
  const toReturn = {};
397
403
  if (typeof this.formId !== 'undefined') {
@@ -404,12 +410,6 @@ class GetMultiRequestFormConfigIdentifier {
404
410
  }
405
411
  }
406
412
  class ListFormsResponseFormRow {
407
- constructor(kwargs) {
408
- if (!kwargs) {
409
- return;
410
- }
411
- Object.assign(this, kwargs);
412
- }
413
413
  static fromProto(proto) {
414
414
  let m = new ListFormsResponseFormRow();
415
415
  m = Object.assign(m, proto);
@@ -421,6 +421,12 @@ class ListFormsResponseFormRow {
421
421
  }
422
422
  return m;
423
423
  }
424
+ constructor(kwargs) {
425
+ if (!kwargs) {
426
+ return;
427
+ }
428
+ Object.assign(this, kwargs);
429
+ }
424
430
  toApiJson() {
425
431
  const toReturn = {};
426
432
  if (typeof this.form !== 'undefined' && this.form !== null) {
@@ -432,13 +438,33 @@ class ListFormsResponseFormRow {
432
438
  return toReturn;
433
439
  }
434
440
  }
435
- class ListFormSubmissionResponseFormSubmission {
441
+ class FormSubmission {
442
+ static fromProto(proto) {
443
+ let m = new FormSubmission();
444
+ m = Object.assign(m, proto);
445
+ return m;
446
+ }
436
447
  constructor(kwargs) {
437
448
  if (!kwargs) {
438
449
  return;
439
450
  }
440
451
  Object.assign(this, kwargs);
441
452
  }
453
+ toApiJson() {
454
+ const toReturn = {};
455
+ if (typeof this.formId !== 'undefined') {
456
+ toReturn['formId'] = this.formId;
457
+ }
458
+ if (typeof this.version !== 'undefined') {
459
+ toReturn['version'] = this.version;
460
+ }
461
+ if (typeof this.values !== 'undefined') {
462
+ toReturn['values'] = this.values;
463
+ }
464
+ return toReturn;
465
+ }
466
+ }
467
+ class ListFormSubmissionResponseFormSubmission {
442
468
  static fromProto(proto) {
443
469
  let m = new ListFormSubmissionResponseFormSubmission();
444
470
  m = Object.assign(m, proto);
@@ -450,6 +476,12 @@ class ListFormSubmissionResponseFormSubmission {
450
476
  }
451
477
  return m;
452
478
  }
479
+ constructor(kwargs) {
480
+ if (!kwargs) {
481
+ return;
482
+ }
483
+ Object.assign(this, kwargs);
484
+ }
453
485
  toApiJson() {
454
486
  const toReturn = {};
455
487
  if (typeof this.formSubmissionId !== 'undefined') {
@@ -467,44 +499,18 @@ class ListFormSubmissionResponseFormSubmission {
467
499
  return toReturn;
468
500
  }
469
501
  }
470
- class FormSubmission {
471
- constructor(kwargs) {
472
- if (!kwargs) {
473
- return;
474
- }
475
- Object.assign(this, kwargs);
476
- }
502
+ class GetEmbedCodeRequest {
477
503
  static fromProto(proto) {
478
- let m = new FormSubmission();
504
+ let m = new GetEmbedCodeRequest();
479
505
  m = Object.assign(m, proto);
480
506
  return m;
481
507
  }
482
- toApiJson() {
483
- const toReturn = {};
484
- if (typeof this.formId !== 'undefined') {
485
- toReturn['formId'] = this.formId;
486
- }
487
- if (typeof this.version !== 'undefined') {
488
- toReturn['version'] = this.version;
489
- }
490
- if (typeof this.values !== 'undefined') {
491
- toReturn['values'] = this.values;
492
- }
493
- return toReturn;
494
- }
495
- }
496
- class GetEmbedCodeRequest {
497
508
  constructor(kwargs) {
498
509
  if (!kwargs) {
499
510
  return;
500
511
  }
501
512
  Object.assign(this, kwargs);
502
513
  }
503
- static fromProto(proto) {
504
- let m = new GetEmbedCodeRequest();
505
- m = Object.assign(m, proto);
506
- return m;
507
- }
508
514
  toApiJson() {
509
515
  const toReturn = {};
510
516
  if (typeof this.formId !== 'undefined') {
@@ -514,17 +520,17 @@ class GetEmbedCodeRequest {
514
520
  }
515
521
  }
516
522
  class GetEmbedCodeResponse {
523
+ static fromProto(proto) {
524
+ let m = new GetEmbedCodeResponse();
525
+ m = Object.assign(m, proto);
526
+ return m;
527
+ }
517
528
  constructor(kwargs) {
518
529
  if (!kwargs) {
519
530
  return;
520
531
  }
521
532
  Object.assign(this, kwargs);
522
533
  }
523
- static fromProto(proto) {
524
- let m = new GetEmbedCodeResponse();
525
- m = Object.assign(m, proto);
526
- return m;
527
- }
528
534
  toApiJson() {
529
535
  const toReturn = {};
530
536
  if (typeof this.embedCode !== 'undefined') {
@@ -534,17 +540,17 @@ class GetEmbedCodeResponse {
534
540
  }
535
541
  }
536
542
  class GetFormRequest {
543
+ static fromProto(proto) {
544
+ let m = new GetFormRequest();
545
+ m = Object.assign(m, proto);
546
+ return m;
547
+ }
537
548
  constructor(kwargs) {
538
549
  if (!kwargs) {
539
550
  return;
540
551
  }
541
552
  Object.assign(this, kwargs);
542
553
  }
543
- static fromProto(proto) {
544
- let m = new GetFormRequest();
545
- m = Object.assign(m, proto);
546
- return m;
547
- }
548
554
  toApiJson() {
549
555
  const toReturn = {};
550
556
  if (typeof this.formId !== 'undefined') {
@@ -554,12 +560,6 @@ class GetFormRequest {
554
560
  }
555
561
  }
556
562
  class GetFormResponse {
557
- constructor(kwargs) {
558
- if (!kwargs) {
559
- return;
560
- }
561
- Object.assign(this, kwargs);
562
- }
563
563
  static fromProto(proto) {
564
564
  let m = new GetFormResponse();
565
565
  m = Object.assign(m, proto);
@@ -568,6 +568,12 @@ class GetFormResponse {
568
568
  }
569
569
  return m;
570
570
  }
571
+ constructor(kwargs) {
572
+ if (!kwargs) {
573
+ return;
574
+ }
575
+ Object.assign(this, kwargs);
576
+ }
571
577
  toApiJson() {
572
578
  const toReturn = {};
573
579
  if (typeof this.formConfig !== 'undefined' && this.formConfig !== null) {
@@ -577,17 +583,17 @@ class GetFormResponse {
577
583
  }
578
584
  }
579
585
  class GetMultiFormVersionsListRequest {
586
+ static fromProto(proto) {
587
+ let m = new GetMultiFormVersionsListRequest();
588
+ m = Object.assign(m, proto);
589
+ return m;
590
+ }
580
591
  constructor(kwargs) {
581
592
  if (!kwargs) {
582
593
  return;
583
594
  }
584
595
  Object.assign(this, kwargs);
585
596
  }
586
- static fromProto(proto) {
587
- let m = new GetMultiFormVersionsListRequest();
588
- m = Object.assign(m, proto);
589
- return m;
590
- }
591
597
  toApiJson() {
592
598
  const toReturn = {};
593
599
  if (typeof this.formIds !== 'undefined') {
@@ -597,12 +603,6 @@ class GetMultiFormVersionsListRequest {
597
603
  }
598
604
  }
599
605
  class GetMultiFormVersionsListResponse {
600
- constructor(kwargs) {
601
- if (!kwargs) {
602
- return;
603
- }
604
- Object.assign(this, kwargs);
605
- }
606
606
  static fromProto(proto) {
607
607
  let m = new GetMultiFormVersionsListResponse();
608
608
  m = Object.assign(m, proto);
@@ -611,6 +611,12 @@ class GetMultiFormVersionsListResponse {
611
611
  }
612
612
  return m;
613
613
  }
614
+ constructor(kwargs) {
615
+ if (!kwargs) {
616
+ return;
617
+ }
618
+ Object.assign(this, kwargs);
619
+ }
614
620
  toApiJson() {
615
621
  const toReturn = {};
616
622
  if (typeof this.versions !== 'undefined' && this.versions !== null) {
@@ -620,12 +626,6 @@ class GetMultiFormVersionsListResponse {
620
626
  }
621
627
  }
622
628
  class GetMultiRequest {
623
- constructor(kwargs) {
624
- if (!kwargs) {
625
- return;
626
- }
627
- Object.assign(this, kwargs);
628
- }
629
629
  static fromProto(proto) {
630
630
  let m = new GetMultiRequest();
631
631
  m = Object.assign(m, proto);
@@ -634,6 +634,12 @@ class GetMultiRequest {
634
634
  }
635
635
  return m;
636
636
  }
637
+ constructor(kwargs) {
638
+ if (!kwargs) {
639
+ return;
640
+ }
641
+ Object.assign(this, kwargs);
642
+ }
637
643
  toApiJson() {
638
644
  const toReturn = {};
639
645
  if (typeof this.formConfigIdentifiers !== 'undefined' && this.formConfigIdentifiers !== null) {
@@ -643,12 +649,6 @@ class GetMultiRequest {
643
649
  }
644
650
  }
645
651
  class GetMultiResponse {
646
- constructor(kwargs) {
647
- if (!kwargs) {
648
- return;
649
- }
650
- Object.assign(this, kwargs);
651
- }
652
652
  static fromProto(proto) {
653
653
  let m = new GetMultiResponse();
654
654
  m = Object.assign(m, proto);
@@ -657,6 +657,12 @@ class GetMultiResponse {
657
657
  }
658
658
  return m;
659
659
  }
660
+ constructor(kwargs) {
661
+ if (!kwargs) {
662
+ return;
663
+ }
664
+ Object.assign(this, kwargs);
665
+ }
660
666
  toApiJson() {
661
667
  const toReturn = {};
662
668
  if (typeof this.formConfigs !== 'undefined' && this.formConfigs !== null) {
@@ -666,12 +672,6 @@ class GetMultiResponse {
666
672
  }
667
673
  }
668
674
  class ListFormSubmissionRequest {
669
- constructor(kwargs) {
670
- if (!kwargs) {
671
- return;
672
- }
673
- Object.assign(this, kwargs);
674
- }
675
675
  static fromProto(proto) {
676
676
  let m = new ListFormSubmissionRequest();
677
677
  m = Object.assign(m, proto);
@@ -680,6 +680,12 @@ class ListFormSubmissionRequest {
680
680
  }
681
681
  return m;
682
682
  }
683
+ constructor(kwargs) {
684
+ if (!kwargs) {
685
+ return;
686
+ }
687
+ Object.assign(this, kwargs);
688
+ }
683
689
  toApiJson() {
684
690
  const toReturn = {};
685
691
  if (typeof this.formId !== 'undefined') {
@@ -692,12 +698,6 @@ class ListFormSubmissionRequest {
692
698
  }
693
699
  }
694
700
  class ListFormSubmissionResponse {
695
- constructor(kwargs) {
696
- if (!kwargs) {
697
- return;
698
- }
699
- Object.assign(this, kwargs);
700
- }
701
701
  static fromProto(proto) {
702
702
  let m = new ListFormSubmissionResponse();
703
703
  m = Object.assign(m, proto);
@@ -709,6 +709,12 @@ class ListFormSubmissionResponse {
709
709
  }
710
710
  return m;
711
711
  }
712
+ constructor(kwargs) {
713
+ if (!kwargs) {
714
+ return;
715
+ }
716
+ Object.assign(this, kwargs);
717
+ }
712
718
  toApiJson() {
713
719
  const toReturn = {};
714
720
  if (typeof this.submissions !== 'undefined' && this.submissions !== null) {
@@ -721,12 +727,6 @@ class ListFormSubmissionResponse {
721
727
  }
722
728
  }
723
729
  class ListFormsRequest {
724
- constructor(kwargs) {
725
- if (!kwargs) {
726
- return;
727
- }
728
- Object.assign(this, kwargs);
729
- }
730
730
  static fromProto(proto) {
731
731
  let m = new ListFormsRequest();
732
732
  m = Object.assign(m, proto);
@@ -738,6 +738,12 @@ class ListFormsRequest {
738
738
  }
739
739
  return m;
740
740
  }
741
+ constructor(kwargs) {
742
+ if (!kwargs) {
743
+ return;
744
+ }
745
+ Object.assign(this, kwargs);
746
+ }
741
747
  toApiJson() {
742
748
  const toReturn = {};
743
749
  if (typeof this.filters !== 'undefined' && this.filters !== null) {
@@ -750,12 +756,6 @@ class ListFormsRequest {
750
756
  }
751
757
  }
752
758
  class ListFormsResponse {
753
- constructor(kwargs) {
754
- if (!kwargs) {
755
- return;
756
- }
757
- Object.assign(this, kwargs);
758
- }
759
759
  static fromProto(proto) {
760
760
  let m = new ListFormsResponse();
761
761
  m = Object.assign(m, proto);
@@ -767,6 +767,12 @@ class ListFormsResponse {
767
767
  }
768
768
  return m;
769
769
  }
770
+ constructor(kwargs) {
771
+ if (!kwargs) {
772
+ return;
773
+ }
774
+ Object.assign(this, kwargs);
775
+ }
770
776
  toApiJson() {
771
777
  const toReturn = {};
772
778
  if (typeof this.formRows !== 'undefined' && this.formRows !== null) {
@@ -778,18 +784,53 @@ class ListFormsResponse {
778
784
  return toReturn;
779
785
  }
780
786
  }
781
- class FormConfigFieldUnmappedFieldOption {
787
+ class FormConfigFieldMappedField {
788
+ static fromProto(proto) {
789
+ let m = new FormConfigFieldMappedField();
790
+ m = Object.assign(m, proto);
791
+ if (proto.type) {
792
+ m.type = enumStringToValue(FieldType, proto.type);
793
+ }
794
+ if (proto.options) {
795
+ m.options = proto.options.map(FormConfigFieldOption.fromProto);
796
+ }
797
+ return m;
798
+ }
782
799
  constructor(kwargs) {
783
800
  if (!kwargs) {
784
801
  return;
785
802
  }
786
803
  Object.assign(this, kwargs);
787
804
  }
805
+ toApiJson() {
806
+ const toReturn = {};
807
+ if (typeof this.id !== 'undefined') {
808
+ toReturn['id'] = this.id;
809
+ }
810
+ if (typeof this.type !== 'undefined') {
811
+ toReturn['type'] = this.type;
812
+ }
813
+ if (typeof this.options !== 'undefined' && this.options !== null) {
814
+ toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
815
+ }
816
+ if (typeof this.mappedTo !== 'undefined') {
817
+ toReturn['mappedTo'] = this.mappedTo;
818
+ }
819
+ return toReturn;
820
+ }
821
+ }
822
+ class FormConfigFieldOption {
788
823
  static fromProto(proto) {
789
- let m = new FormConfigFieldUnmappedFieldOption();
824
+ let m = new FormConfigFieldOption();
790
825
  m = Object.assign(m, proto);
791
826
  return m;
792
827
  }
828
+ constructor(kwargs) {
829
+ if (!kwargs) {
830
+ return;
831
+ }
832
+ Object.assign(this, kwargs);
833
+ }
793
834
  toApiJson() {
794
835
  const toReturn = {};
795
836
  if (typeof this.value !== 'undefined') {
@@ -802,17 +843,17 @@ class FormConfigFieldUnmappedFieldOption {
802
843
  }
803
844
  }
804
845
  class RenderFormResponsePreFillByUrlQueryParameter {
846
+ static fromProto(proto) {
847
+ let m = new RenderFormResponsePreFillByUrlQueryParameter();
848
+ m = Object.assign(m, proto);
849
+ return m;
850
+ }
805
851
  constructor(kwargs) {
806
852
  if (!kwargs) {
807
853
  return;
808
854
  }
809
855
  Object.assign(this, kwargs);
810
856
  }
811
- static fromProto(proto) {
812
- let m = new RenderFormResponsePreFillByUrlQueryParameter();
813
- m = Object.assign(m, proto);
814
- return m;
815
- }
816
857
  toApiJson() {
817
858
  const toReturn = {};
818
859
  if (typeof this.fieldId !== 'undefined') {
@@ -825,12 +866,6 @@ class RenderFormResponsePreFillByUrlQueryParameter {
825
866
  }
826
867
  }
827
868
  class PreviewFormRequest {
828
- constructor(kwargs) {
829
- if (!kwargs) {
830
- return;
831
- }
832
- Object.assign(this, kwargs);
833
- }
834
869
  static fromProto(proto) {
835
870
  let m = new PreviewFormRequest();
836
871
  m = Object.assign(m, proto);
@@ -842,6 +877,12 @@ class PreviewFormRequest {
842
877
  }
843
878
  return m;
844
879
  }
880
+ constructor(kwargs) {
881
+ if (!kwargs) {
882
+ return;
883
+ }
884
+ Object.assign(this, kwargs);
885
+ }
845
886
  toApiJson() {
846
887
  const toReturn = {};
847
888
  if (typeof this.formConfig !== 'undefined' && this.formConfig !== null) {
@@ -854,17 +895,17 @@ class PreviewFormRequest {
854
895
  }
855
896
  }
856
897
  class PreviewFormResponse {
898
+ static fromProto(proto) {
899
+ let m = new PreviewFormResponse();
900
+ m = Object.assign(m, proto);
901
+ return m;
902
+ }
857
903
  constructor(kwargs) {
858
904
  if (!kwargs) {
859
905
  return;
860
906
  }
861
907
  Object.assign(this, kwargs);
862
908
  }
863
- static fromProto(proto) {
864
- let m = new PreviewFormResponse();
865
- m = Object.assign(m, proto);
866
- return m;
867
- }
868
909
  toApiJson() {
869
910
  const toReturn = {};
870
911
  if (typeof this.jsonSchema !== 'undefined') {
@@ -877,12 +918,6 @@ class PreviewFormResponse {
877
918
  }
878
919
  }
879
920
  class RenderFormRequest {
880
- constructor(kwargs) {
881
- if (!kwargs) {
882
- return;
883
- }
884
- Object.assign(this, kwargs);
885
- }
886
921
  static fromProto(proto) {
887
922
  let m = new RenderFormRequest();
888
923
  m = Object.assign(m, proto);
@@ -891,6 +926,12 @@ class RenderFormRequest {
891
926
  }
892
927
  return m;
893
928
  }
929
+ constructor(kwargs) {
930
+ if (!kwargs) {
931
+ return;
932
+ }
933
+ Object.assign(this, kwargs);
934
+ }
894
935
  toApiJson() {
895
936
  const toReturn = {};
896
937
  if (typeof this.formId !== 'undefined') {
@@ -903,12 +944,6 @@ class RenderFormRequest {
903
944
  }
904
945
  }
905
946
  class RenderFormResponse {
906
- constructor(kwargs) {
907
- if (!kwargs) {
908
- return;
909
- }
910
- Object.assign(this, kwargs);
911
- }
912
947
  static fromProto(proto) {
913
948
  let m = new RenderFormResponse();
914
949
  m = Object.assign(m, proto);
@@ -920,6 +955,12 @@ class RenderFormResponse {
920
955
  }
921
956
  return m;
922
957
  }
958
+ constructor(kwargs) {
959
+ if (!kwargs) {
960
+ return;
961
+ }
962
+ Object.assign(this, kwargs);
963
+ }
923
964
  toApiJson() {
924
965
  const toReturn = {};
925
966
  if (typeof this.jsonSchema !== 'undefined') {
@@ -941,40 +982,46 @@ class RenderFormResponse {
941
982
  }
942
983
  }
943
984
  class FormConfigFieldSchema {
944
- constructor(kwargs) {
945
- if (!kwargs) {
946
- return;
947
- }
948
- Object.assign(this, kwargs);
949
- }
950
985
  static fromProto(proto) {
951
986
  let m = new FormConfigFieldSchema();
952
987
  m = Object.assign(m, proto);
953
988
  if (proto.unmappedField) {
954
989
  m.unmappedField = FormConfigFieldUnmappedField.fromProto(proto.unmappedField);
955
990
  }
991
+ if (proto.mappedField) {
992
+ m.mappedField = FormConfigFieldMappedField.fromProto(proto.mappedField);
993
+ }
956
994
  return m;
957
995
  }
996
+ constructor(kwargs) {
997
+ if (!kwargs) {
998
+ return;
999
+ }
1000
+ Object.assign(this, kwargs);
1001
+ }
958
1002
  toApiJson() {
959
1003
  const toReturn = {};
960
1004
  if (typeof this.unmappedField !== 'undefined' && this.unmappedField !== null) {
961
1005
  toReturn['unmappedField'] = 'toApiJson' in this.unmappedField ? this.unmappedField.toApiJson() : this.unmappedField;
962
1006
  }
1007
+ if (typeof this.mappedField !== 'undefined' && this.mappedField !== null) {
1008
+ toReturn['mappedField'] = 'toApiJson' in this.mappedField ? this.mappedField.toApiJson() : this.mappedField;
1009
+ }
963
1010
  return toReturn;
964
1011
  }
965
1012
  }
966
1013
  class Styles {
1014
+ static fromProto(proto) {
1015
+ let m = new Styles();
1016
+ m = Object.assign(m, proto);
1017
+ return m;
1018
+ }
967
1019
  constructor(kwargs) {
968
1020
  if (!kwargs) {
969
1021
  return;
970
1022
  }
971
1023
  Object.assign(this, kwargs);
972
1024
  }
973
- static fromProto(proto) {
974
- let m = new Styles();
975
- m = Object.assign(m, proto);
976
- return m;
977
- }
978
1025
  toApiJson() {
979
1026
  const toReturn = {};
980
1027
  if (typeof this.width !== 'undefined') {
@@ -1011,12 +1058,6 @@ class Styles {
1011
1058
  }
1012
1059
  }
1013
1060
  class ListFormSubmissionResponseFormSubmissionSubmittedValue {
1014
- constructor(kwargs) {
1015
- if (!kwargs) {
1016
- return;
1017
- }
1018
- Object.assign(this, kwargs);
1019
- }
1020
1061
  static fromProto(proto) {
1021
1062
  let m = new ListFormSubmissionResponseFormSubmissionSubmittedValue();
1022
1063
  m = Object.assign(m, proto);
@@ -1025,6 +1066,12 @@ class ListFormSubmissionResponseFormSubmissionSubmittedValue {
1025
1066
  }
1026
1067
  return m;
1027
1068
  }
1069
+ constructor(kwargs) {
1070
+ if (!kwargs) {
1071
+ return;
1072
+ }
1073
+ Object.assign(this, kwargs);
1074
+ }
1028
1075
  toApiJson() {
1029
1076
  const toReturn = {};
1030
1077
  if (typeof this.fieldId !== 'undefined') {
@@ -1037,12 +1084,6 @@ class ListFormSubmissionResponseFormSubmissionSubmittedValue {
1037
1084
  }
1038
1085
  }
1039
1086
  class FormConfigFieldUnmappedField {
1040
- constructor(kwargs) {
1041
- if (!kwargs) {
1042
- return;
1043
- }
1044
- Object.assign(this, kwargs);
1045
- }
1046
1087
  static fromProto(proto) {
1047
1088
  let m = new FormConfigFieldUnmappedField();
1048
1089
  m = Object.assign(m, proto);
@@ -1050,10 +1091,16 @@ class FormConfigFieldUnmappedField {
1050
1091
  m.type = enumStringToValue(FieldType, proto.type);
1051
1092
  }
1052
1093
  if (proto.options) {
1053
- m.options = proto.options.map(FormConfigFieldUnmappedFieldOption.fromProto);
1094
+ m.options = proto.options.map(FormConfigFieldOption.fromProto);
1054
1095
  }
1055
1096
  return m;
1056
1097
  }
1098
+ constructor(kwargs) {
1099
+ if (!kwargs) {
1100
+ return;
1101
+ }
1102
+ Object.assign(this, kwargs);
1103
+ }
1057
1104
  toApiJson() {
1058
1105
  const toReturn = {};
1059
1106
  if (typeof this.id !== 'undefined') {
@@ -1072,12 +1119,6 @@ class FormConfigFieldUnmappedField {
1072
1119
  }
1073
1120
  }
1074
1121
  class UpdateFormRequest {
1075
- constructor(kwargs) {
1076
- if (!kwargs) {
1077
- return;
1078
- }
1079
- Object.assign(this, kwargs);
1080
- }
1081
1122
  static fromProto(proto) {
1082
1123
  let m = new UpdateFormRequest();
1083
1124
  m = Object.assign(m, proto);
@@ -1086,6 +1127,12 @@ class UpdateFormRequest {
1086
1127
  }
1087
1128
  return m;
1088
1129
  }
1130
+ constructor(kwargs) {
1131
+ if (!kwargs) {
1132
+ return;
1133
+ }
1134
+ Object.assign(this, kwargs);
1135
+ }
1089
1136
  toApiJson() {
1090
1137
  const toReturn = {};
1091
1138
  if (typeof this.formConfig !== 'undefined' && this.formConfig !== null) {
@@ -1095,37 +1142,66 @@ class UpdateFormRequest {
1095
1142
  }
1096
1143
  }
1097
1144
  class UpdateFormResponse {
1145
+ static fromProto(proto) {
1146
+ let m = new UpdateFormResponse();
1147
+ m = Object.assign(m, proto);
1148
+ if (proto.errors) {
1149
+ m.errors = proto.errors.map(ValidationError.fromProto);
1150
+ }
1151
+ return m;
1152
+ }
1098
1153
  constructor(kwargs) {
1099
1154
  if (!kwargs) {
1100
1155
  return;
1101
1156
  }
1102
1157
  Object.assign(this, kwargs);
1103
1158
  }
1104
- static fromProto(proto) {
1105
- let m = new UpdateFormResponse();
1106
- m = Object.assign(m, proto);
1107
- return m;
1108
- }
1109
1159
  toApiJson() {
1110
1160
  const toReturn = {};
1111
1161
  if (typeof this.version !== 'undefined') {
1112
1162
  toReturn['version'] = this.version;
1113
1163
  }
1164
+ if (typeof this.errors !== 'undefined' && this.errors !== null) {
1165
+ toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
1166
+ }
1114
1167
  return toReturn;
1115
1168
  }
1116
1169
  }
1117
- class GetMultiFormVersionsListResponseVersions {
1170
+ class ValidationError {
1171
+ static fromProto(proto) {
1172
+ let m = new ValidationError();
1173
+ m = Object.assign(m, proto);
1174
+ return m;
1175
+ }
1118
1176
  constructor(kwargs) {
1119
1177
  if (!kwargs) {
1120
1178
  return;
1121
1179
  }
1122
1180
  Object.assign(this, kwargs);
1123
1181
  }
1182
+ toApiJson() {
1183
+ const toReturn = {};
1184
+ if (typeof this.ruleId !== 'undefined') {
1185
+ toReturn['ruleId'] = this.ruleId;
1186
+ }
1187
+ if (typeof this.message !== 'undefined') {
1188
+ toReturn['message'] = this.message;
1189
+ }
1190
+ return toReturn;
1191
+ }
1192
+ }
1193
+ class GetMultiFormVersionsListResponseVersions {
1124
1194
  static fromProto(proto) {
1125
1195
  let m = new GetMultiFormVersionsListResponseVersions();
1126
1196
  m = Object.assign(m, proto);
1127
1197
  return m;
1128
1198
  }
1199
+ constructor(kwargs) {
1200
+ if (!kwargs) {
1201
+ return;
1202
+ }
1203
+ Object.assign(this, kwargs);
1204
+ }
1129
1205
  toApiJson() {
1130
1206
  const toReturn = {};
1131
1207
  if (typeof this.formId !== 'undefined') {
@@ -1157,9 +1233,9 @@ class HostService {
1157
1233
  return 'https://' + this.host;
1158
1234
  }
1159
1235
  }
1160
- HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1161
- HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: HostService, providedIn: 'root' });
1162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: HostService, decorators: [{
1236
+ HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1237
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, providedIn: 'root' });
1238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: HostService, decorators: [{
1163
1239
  type: Injectable,
1164
1240
  args: [{ providedIn: 'root' }]
1165
1241
  }] });
@@ -1190,9 +1266,9 @@ class FormSubmissionApiService {
1190
1266
  .pipe(map(resp => ListFormSubmissionResponse.fromProto(resp)));
1191
1267
  }
1192
1268
  }
1193
- FormSubmissionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormSubmissionApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
1194
- FormSubmissionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormSubmissionApiService, providedIn: 'root' });
1195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormSubmissionApiService, decorators: [{
1269
+ FormSubmissionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormSubmissionApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
1270
+ FormSubmissionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormSubmissionApiService, providedIn: 'root' });
1271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormSubmissionApiService, decorators: [{
1196
1272
  type: Injectable,
1197
1273
  args: [{ providedIn: 'root' }]
1198
1274
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
@@ -1262,9 +1338,9 @@ class FormsApiService {
1262
1338
  .pipe(map(resp => PreviewFormResponse.fromProto(resp)));
1263
1339
  }
1264
1340
  }
1265
- FormsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
1266
- FormsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormsApiService, providedIn: 'root' });
1267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormsApiService, decorators: [{
1341
+ FormsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
1342
+ FormsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormsApiService, providedIn: 'root' });
1343
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormsApiService, decorators: [{
1268
1344
  type: Injectable,
1269
1345
  args: [{ providedIn: 'root' }]
1270
1346
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
@@ -1295,9 +1371,9 @@ class FormSubmissionsExportService {
1295
1371
  }));
1296
1372
  }
1297
1373
  }
1298
- FormSubmissionsExportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormSubmissionsExportService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
1299
- FormSubmissionsExportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormSubmissionsExportService, providedIn: 'root' });
1300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FormSubmissionsExportService, decorators: [{
1374
+ FormSubmissionsExportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormSubmissionsExportService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
1375
+ FormSubmissionsExportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormSubmissionsExportService, providedIn: 'root' });
1376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: FormSubmissionsExportService, decorators: [{
1301
1377
  type: Injectable,
1302
1378
  args: [{ providedIn: 'root' }]
1303
1379
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
@@ -1308,5 +1384,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
1308
1384
  * Generated bundle index. Do not edit.
1309
1385
  */
1310
1386
 
1311
- export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FieldType, FieldValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormConfigFieldUnmappedField, FormConfigFieldUnmappedFieldOption, FormSubmission, FormSubmissionApiService, FormSubmissionsExportService, 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, RenderFormResponsePreFillByUrlQueryParameter, Styles, UpdateFormRequest, UpdateFormResponse };
1387
+ export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FieldType, FieldValue, FormConfig, FormConfigField, FormConfigFieldMappedField, FormConfigFieldOption, FormConfigFieldSchema, FormConfigFieldUnmappedField, FormSubmission, FormSubmissionApiService, FormSubmissionsExportService, 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, RenderFormResponsePreFillByUrlQueryParameter, Styles, UpdateFormRequest, UpdateFormResponse, ValidationError };
1312
1388
  //# sourceMappingURL=vendasta-forms_microservice.mjs.map