@vendasta/forms_microservice 0.23.0 → 0.25.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.
@@ -98,6 +98,7 @@ var FieldType;
98
98
  FieldType[FieldType["FIELD_TYPE_TEXT_AREA"] = 12] = "FIELD_TYPE_TEXT_AREA";
99
99
  FieldType[FieldType["FIELD_TYPE_TAG"] = 13] = "FIELD_TYPE_TAG";
100
100
  FieldType[FieldType["FIELD_TYPE_SECTION"] = 14] = "FIELD_TYPE_SECTION";
101
+ FieldType[FieldType["FIELD_TYPE_FILE"] = 15] = "FIELD_TYPE_FILE";
101
102
  })(FieldType || (FieldType = {}));
102
103
  var FormCreationStatus;
103
104
  (function (FormCreationStatus) {
@@ -111,6 +112,28 @@ var JsonSchemaLibrary;
111
112
  JsonSchemaLibrary[JsonSchemaLibrary["JSON_SCHEMA_LIBRARY_UNDEFINED"] = 0] = "JSON_SCHEMA_LIBRARY_UNDEFINED";
112
113
  JsonSchemaLibrary[JsonSchemaLibrary["JSON_SCHEMA_LIBRARY_JSONFORM"] = 1] = "JSON_SCHEMA_LIBRARY_JSONFORM";
113
114
  })(JsonSchemaLibrary || (JsonSchemaLibrary = {}));
115
+ var FormSubmissionProcessResultErrorType;
116
+ (function (FormSubmissionProcessResultErrorType) {
117
+ FormSubmissionProcessResultErrorType[FormSubmissionProcessResultErrorType["PROCESS_RESULT_ERROR_TYPE_UNSPECIFIED"] = 0] = "PROCESS_RESULT_ERROR_TYPE_UNSPECIFIED";
118
+ FormSubmissionProcessResultErrorType[FormSubmissionProcessResultErrorType["PROCESS_RESULT_ERROR_TYPE_NOT_FOUND"] = 1] = "PROCESS_RESULT_ERROR_TYPE_NOT_FOUND";
119
+ FormSubmissionProcessResultErrorType[FormSubmissionProcessResultErrorType["PROCESS_RESULT_ERROR_TYPE_ALREADY_EXISTS"] = 2] = "PROCESS_RESULT_ERROR_TYPE_ALREADY_EXISTS";
120
+ FormSubmissionProcessResultErrorType[FormSubmissionProcessResultErrorType["PROCESS_RESULT_ERROR_TYPE_INVALID_ARGUMENT"] = 3] = "PROCESS_RESULT_ERROR_TYPE_INVALID_ARGUMENT";
121
+ })(FormSubmissionProcessResultErrorType || (FormSubmissionProcessResultErrorType = {}));
122
+ var FormSubmissionProcessResultStatus;
123
+ (function (FormSubmissionProcessResultStatus) {
124
+ FormSubmissionProcessResultStatus[FormSubmissionProcessResultStatus["PROCESS_RESULT_STATUS_UNSPECIFIED"] = 0] = "PROCESS_RESULT_STATUS_UNSPECIFIED";
125
+ FormSubmissionProcessResultStatus[FormSubmissionProcessResultStatus["PROCESS_RESULT_STATUS_IN_PROGRESS"] = 1] = "PROCESS_RESULT_STATUS_IN_PROGRESS";
126
+ FormSubmissionProcessResultStatus[FormSubmissionProcessResultStatus["PROCESS_RESULT_STATUS_COMPLETED"] = 2] = "PROCESS_RESULT_STATUS_COMPLETED";
127
+ FormSubmissionProcessResultStatus[FormSubmissionProcessResultStatus["PROCESS_RESULT_STATUS_COMPLETED_WITH_WARNINGS"] = 3] = "PROCESS_RESULT_STATUS_COMPLETED_WITH_WARNINGS";
128
+ FormSubmissionProcessResultStatus[FormSubmissionProcessResultStatus["PROCESS_RESULT_STATUS_FAILED"] = 4] = "PROCESS_RESULT_STATUS_FAILED";
129
+ })(FormSubmissionProcessResultStatus || (FormSubmissionProcessResultStatus = {}));
130
+ var ReprocessStatus;
131
+ (function (ReprocessStatus) {
132
+ ReprocessStatus[ReprocessStatus["REPROCESS_STATUS_UNSPECIFIED"] = 0] = "REPROCESS_STATUS_UNSPECIFIED";
133
+ ReprocessStatus[ReprocessStatus["STARTED"] = 1] = "STARTED";
134
+ ReprocessStatus[ReprocessStatus["ALREADY_RUNNING"] = 2] = "ALREADY_RUNNING";
135
+ ReprocessStatus[ReprocessStatus["NO_MAPPABLE_FIELDS"] = 3] = "NO_MAPPABLE_FIELDS";
136
+ })(ReprocessStatus || (ReprocessStatus = {}));
114
137
  var SectionAction;
115
138
  (function (SectionAction) {
116
139
  SectionAction[SectionAction["SECTION_ACTION_UNDEFINED"] = 0] = "SECTION_ACTION_UNDEFINED";
@@ -840,6 +863,9 @@ class FormSubmission {
840
863
  if (proto.created) {
841
864
  m.created = new Date(proto.created);
842
865
  }
866
+ if (proto.processResult) {
867
+ m.processResult = FormSubmissionProcessResult.fromProto(proto.processResult);
868
+ }
843
869
  return m;
844
870
  }
845
871
  constructor(kwargs) {
@@ -862,6 +888,9 @@ class FormSubmission {
862
888
  if (typeof this.created !== 'undefined' && this.created !== null) {
863
889
  toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
864
890
  }
891
+ if (typeof this.processResult !== 'undefined' && this.processResult !== null) {
892
+ toReturn['processResult'] = 'toApiJson' in this.processResult ? this.processResult.toApiJson() : this.processResult;
893
+ }
865
894
  return toReturn;
866
895
  }
867
896
  }
@@ -1524,6 +1553,38 @@ class PreviewFormResponse {
1524
1553
  return toReturn;
1525
1554
  }
1526
1555
  }
1556
+ class FormSubmissionProcessResult {
1557
+ static fromProto(proto) {
1558
+ let m = new FormSubmissionProcessResult();
1559
+ m = Object.assign(m, proto);
1560
+ if (proto.status) {
1561
+ m.status = enumStringToValue(FormSubmissionProcessResultStatus, proto.status);
1562
+ }
1563
+ if (proto.errors) {
1564
+ m.errors = proto.errors.map(FormSubmissionResultError.fromProto);
1565
+ }
1566
+ return m;
1567
+ }
1568
+ constructor(kwargs) {
1569
+ if (!kwargs) {
1570
+ return;
1571
+ }
1572
+ Object.assign(this, kwargs);
1573
+ }
1574
+ toApiJson() {
1575
+ const toReturn = {};
1576
+ if (typeof this.status !== 'undefined') {
1577
+ toReturn['status'] = this.status;
1578
+ }
1579
+ if (typeof this.entityIds !== 'undefined') {
1580
+ toReturn['entityIds'] = this.entityIds;
1581
+ }
1582
+ if (typeof this.errors !== 'undefined' && this.errors !== null) {
1583
+ toReturn['errors'] = 'toApiJson' in this.errors ? this.errors.toApiJson() : this.errors;
1584
+ }
1585
+ return toReturn;
1586
+ }
1587
+ }
1527
1588
  class RecoverFormRequest {
1528
1589
  static fromProto(proto) {
1529
1590
  let m = new RecoverFormRequest();
@@ -1637,6 +1698,75 @@ class RenderFormResponse {
1637
1698
  return toReturn;
1638
1699
  }
1639
1700
  }
1701
+ class ReprocessSubmissionRequest {
1702
+ static fromProto(proto) {
1703
+ let m = new ReprocessSubmissionRequest();
1704
+ m = Object.assign(m, proto);
1705
+ return m;
1706
+ }
1707
+ constructor(kwargs) {
1708
+ if (!kwargs) {
1709
+ return;
1710
+ }
1711
+ Object.assign(this, kwargs);
1712
+ }
1713
+ toApiJson() {
1714
+ const toReturn = {};
1715
+ if (typeof this.formSubmissionId !== 'undefined') {
1716
+ toReturn['formSubmissionId'] = this.formSubmissionId;
1717
+ }
1718
+ return toReturn;
1719
+ }
1720
+ }
1721
+ class ReprocessSubmissionResponse {
1722
+ static fromProto(proto) {
1723
+ let m = new ReprocessSubmissionResponse();
1724
+ m = Object.assign(m, proto);
1725
+ if (proto.status) {
1726
+ m.status = enumStringToValue(ReprocessStatus, proto.status);
1727
+ }
1728
+ return m;
1729
+ }
1730
+ constructor(kwargs) {
1731
+ if (!kwargs) {
1732
+ return;
1733
+ }
1734
+ Object.assign(this, kwargs);
1735
+ }
1736
+ toApiJson() {
1737
+ const toReturn = {};
1738
+ if (typeof this.status !== 'undefined') {
1739
+ toReturn['status'] = this.status;
1740
+ }
1741
+ return toReturn;
1742
+ }
1743
+ }
1744
+ class FormSubmissionResultError {
1745
+ static fromProto(proto) {
1746
+ let m = new FormSubmissionResultError();
1747
+ m = Object.assign(m, proto);
1748
+ if (proto.errorType) {
1749
+ m.errorType = enumStringToValue(FormSubmissionProcessResultErrorType, proto.errorType);
1750
+ }
1751
+ return m;
1752
+ }
1753
+ constructor(kwargs) {
1754
+ if (!kwargs) {
1755
+ return;
1756
+ }
1757
+ Object.assign(this, kwargs);
1758
+ }
1759
+ toApiJson() {
1760
+ const toReturn = {};
1761
+ if (typeof this.stepId !== 'undefined') {
1762
+ toReturn['stepId'] = this.stepId;
1763
+ }
1764
+ if (typeof this.errorType !== 'undefined') {
1765
+ toReturn['errorType'] = this.errorType;
1766
+ }
1767
+ return toReturn;
1768
+ }
1769
+ }
1640
1770
  class FormConfigFieldSchema {
1641
1771
  static fromProto(proto) {
1642
1772
  let m = new FormConfigFieldSchema();
@@ -2115,6 +2245,11 @@ class FormSubmissionApiService {
2115
2245
  return this.http.post(this._host + "/forms.v1.FormSubmissionService/GetMultiFormSubmission", request.toApiJson(), this.apiOptions())
2116
2246
  .pipe(map(resp => GetMultiFormSubmissionResponse.fromProto(resp)));
2117
2247
  }
2248
+ reprocessSubmission(r) {
2249
+ const request = (r.toApiJson) ? r : new ReprocessSubmissionRequest(r);
2250
+ return this.http.post(this._host + "/forms.v1.FormSubmissionService/ReprocessSubmission", request.toApiJson(), this.apiOptions())
2251
+ .pipe(map(resp => ReprocessSubmissionResponse.fromProto(resp)));
2252
+ }
2118
2253
  }
2119
2254
  FormSubmissionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormSubmissionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2120
2255
  FormSubmissionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormSubmissionApiService, providedIn: 'root' });
@@ -2298,5 +2433,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2298
2433
  * Generated bundle index. Do not edit.
2299
2434
  */
2300
2435
 
2301
- export { ActionParameters, CreateFormFromTemplateRequest, CreateFormFromTemplateResponse, CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DateDefault, DeleteFormRequest, FieldOption, FieldType, FieldValue, Filter, FilterGroup, FilterGroupOperator, FilterOperator, FilterType, FilterValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormConfigTemplateSetupSettings, FormCreationStatus, FormSubmission, FormSubmissionApiService, FormSubmissionSubmittedValue, FormSubmissionsExportService, FormTemplateApiService, FormsApiService, GenerateCustomCSSRequest, GenerateCustomCSSResponse, GetCreateFormFromTemplateStatusRequest, GetCreateFormFromTemplateStatusResponse, 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, Phone, PreviewFormRequest, PreviewFormResponse, RecoverFormRequest, RecoverFormResponse, RenderFormRequest, RenderFormResponse, RenderFormResponseDefaultValues, RenderFormResponsePreFillByUrlQueryParameter, SectionAction, SectionConfig, StringList, Styles, SubmitConditionParameters, SystemDefined, UnmappedField, UpdateFormRequest, UpdateFormResponse, UserFormSubmission, ValidationError };
2436
+ export { ActionParameters, CreateFormFromTemplateRequest, CreateFormFromTemplateResponse, CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DateDefault, DeleteFormRequest, FieldOption, FieldType, FieldValue, Filter, FilterGroup, FilterGroupOperator, FilterOperator, FilterType, FilterValue, FormConfig, FormConfigField, FormConfigFieldSchema, FormConfigTemplateSetupSettings, FormCreationStatus, FormSubmission, FormSubmissionApiService, FormSubmissionProcessResult, FormSubmissionProcessResultErrorType, FormSubmissionProcessResultStatus, FormSubmissionResultError, FormSubmissionSubmittedValue, FormSubmissionsExportService, FormTemplateApiService, FormsApiService, GenerateCustomCSSRequest, GenerateCustomCSSResponse, GetCreateFormFromTemplateStatusRequest, GetCreateFormFromTemplateStatusResponse, 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, Phone, PreviewFormRequest, PreviewFormResponse, RecoverFormRequest, RecoverFormResponse, RenderFormRequest, RenderFormResponse, RenderFormResponseDefaultValues, RenderFormResponsePreFillByUrlQueryParameter, ReprocessStatus, ReprocessSubmissionRequest, ReprocessSubmissionResponse, SectionAction, SectionConfig, StringList, Styles, SubmitConditionParameters, SystemDefined, UnmappedField, UpdateFormRequest, UpdateFormResponse, UserFormSubmission, ValidationError };
2302
2437
  //# sourceMappingURL=vendasta-forms_microservice.mjs.map