@vendasta/forms_microservice 0.7.0 → 0.9.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/forms.api.service.mjs +7 -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 +101 -34
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/fesm2015/vendasta-forms_microservice.mjs +106 -34
- package/fesm2015/vendasta-forms_microservice.mjs.map +1 -1
- package/fesm2020/vendasta-forms_microservice.mjs +106 -34
- package/fesm2020/vendasta-forms_microservice.mjs.map +1 -1
- package/lib/_internal/forms.api.service.d.ts +3 -2
- package/lib/_internal/interfaces/api.interface.d.ts +24 -12
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +39 -21
- package/lib/_internal/objects/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -271,6 +271,29 @@ class FormConfigField {
|
|
|
271
271
|
return toReturn;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
+
class FieldOption {
|
|
275
|
+
static fromProto(proto) {
|
|
276
|
+
let m = new FieldOption();
|
|
277
|
+
m = Object.assign(m, proto);
|
|
278
|
+
return m;
|
|
279
|
+
}
|
|
280
|
+
constructor(kwargs) {
|
|
281
|
+
if (!kwargs) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
Object.assign(this, kwargs);
|
|
285
|
+
}
|
|
286
|
+
toApiJson() {
|
|
287
|
+
const toReturn = {};
|
|
288
|
+
if (typeof this.value !== 'undefined') {
|
|
289
|
+
toReturn['value'] = this.value;
|
|
290
|
+
}
|
|
291
|
+
if (typeof this.label !== 'undefined') {
|
|
292
|
+
toReturn['label'] = this.label;
|
|
293
|
+
}
|
|
294
|
+
return toReturn;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
274
297
|
class FieldValue {
|
|
275
298
|
static fromProto(proto) {
|
|
276
299
|
let m = new FieldValue();
|
|
@@ -809,18 +832,12 @@ class ListFormsResponse {
|
|
|
809
832
|
return toReturn;
|
|
810
833
|
}
|
|
811
834
|
}
|
|
812
|
-
class
|
|
835
|
+
class ListMappedFieldSchemaRequest {
|
|
813
836
|
static fromProto(proto) {
|
|
814
|
-
let m = new
|
|
837
|
+
let m = new ListMappedFieldSchemaRequest();
|
|
815
838
|
m = Object.assign(m, proto);
|
|
816
|
-
if (proto.
|
|
817
|
-
m.
|
|
818
|
-
}
|
|
819
|
-
if (proto.options) {
|
|
820
|
-
m.options = proto.options.map(FormConfigFieldOption.fromProto);
|
|
821
|
-
}
|
|
822
|
-
if (proto.systemDefined) {
|
|
823
|
-
m.systemDefined = FormConfigFieldSystemDefined.fromProto(proto.systemDefined);
|
|
839
|
+
if (proto.pagingOptions) {
|
|
840
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
824
841
|
}
|
|
825
842
|
return m;
|
|
826
843
|
}
|
|
@@ -832,28 +849,63 @@ class FormConfigFieldMappedField {
|
|
|
832
849
|
}
|
|
833
850
|
toApiJson() {
|
|
834
851
|
const toReturn = {};
|
|
835
|
-
if (typeof this.
|
|
836
|
-
toReturn['
|
|
852
|
+
if (typeof this.namespace !== 'undefined') {
|
|
853
|
+
toReturn['namespace'] = this.namespace;
|
|
837
854
|
}
|
|
838
|
-
if (typeof this.
|
|
839
|
-
toReturn['
|
|
855
|
+
if (typeof this.crmObjectType !== 'undefined') {
|
|
856
|
+
toReturn['crmObjectType'] = this.crmObjectType;
|
|
840
857
|
}
|
|
841
|
-
if (typeof this.
|
|
842
|
-
toReturn['
|
|
858
|
+
if (typeof this.crmObjectSubtype !== 'undefined') {
|
|
859
|
+
toReturn['crmObjectSubtype'] = this.crmObjectSubtype;
|
|
843
860
|
}
|
|
844
|
-
if (typeof this.
|
|
845
|
-
toReturn['
|
|
861
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
862
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
846
863
|
}
|
|
847
|
-
|
|
848
|
-
|
|
864
|
+
return toReturn;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
class ListMappedFieldSchemaResponse {
|
|
868
|
+
static fromProto(proto) {
|
|
869
|
+
let m = new ListMappedFieldSchemaResponse();
|
|
870
|
+
m = Object.assign(m, proto);
|
|
871
|
+
if (proto.fieldSchemas) {
|
|
872
|
+
m.fieldSchemas = proto.fieldSchemas.map(MappedField.fromProto);
|
|
873
|
+
}
|
|
874
|
+
if (proto.pagingMetadata) {
|
|
875
|
+
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
876
|
+
}
|
|
877
|
+
return m;
|
|
878
|
+
}
|
|
879
|
+
constructor(kwargs) {
|
|
880
|
+
if (!kwargs) {
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
Object.assign(this, kwargs);
|
|
884
|
+
}
|
|
885
|
+
toApiJson() {
|
|
886
|
+
const toReturn = {};
|
|
887
|
+
if (typeof this.fieldSchemas !== 'undefined' && this.fieldSchemas !== null) {
|
|
888
|
+
toReturn['fieldSchemas'] = 'toApiJson' in this.fieldSchemas ? this.fieldSchemas.toApiJson() : this.fieldSchemas;
|
|
889
|
+
}
|
|
890
|
+
if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
|
|
891
|
+
toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
|
|
849
892
|
}
|
|
850
893
|
return toReturn;
|
|
851
894
|
}
|
|
852
895
|
}
|
|
853
|
-
class
|
|
896
|
+
class MappedField {
|
|
854
897
|
static fromProto(proto) {
|
|
855
|
-
let m = new
|
|
898
|
+
let m = new MappedField();
|
|
856
899
|
m = Object.assign(m, proto);
|
|
900
|
+
if (proto.type) {
|
|
901
|
+
m.type = enumStringToValue(FieldType, proto.type);
|
|
902
|
+
}
|
|
903
|
+
if (proto.options) {
|
|
904
|
+
m.options = proto.options.map(FieldOption.fromProto);
|
|
905
|
+
}
|
|
906
|
+
if (proto.systemDefined) {
|
|
907
|
+
m.systemDefined = SystemDefined.fromProto(proto.systemDefined);
|
|
908
|
+
}
|
|
857
909
|
return m;
|
|
858
910
|
}
|
|
859
911
|
constructor(kwargs) {
|
|
@@ -864,11 +916,26 @@ class FormConfigFieldOption {
|
|
|
864
916
|
}
|
|
865
917
|
toApiJson() {
|
|
866
918
|
const toReturn = {};
|
|
867
|
-
if (typeof this.
|
|
868
|
-
toReturn['
|
|
919
|
+
if (typeof this.id !== 'undefined') {
|
|
920
|
+
toReturn['id'] = this.id;
|
|
869
921
|
}
|
|
870
|
-
if (typeof this.
|
|
871
|
-
toReturn['
|
|
922
|
+
if (typeof this.type !== 'undefined') {
|
|
923
|
+
toReturn['type'] = this.type;
|
|
924
|
+
}
|
|
925
|
+
if (typeof this.name !== 'undefined') {
|
|
926
|
+
toReturn['name'] = this.name;
|
|
927
|
+
}
|
|
928
|
+
if (typeof this.options !== 'undefined' && this.options !== null) {
|
|
929
|
+
toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
|
|
930
|
+
}
|
|
931
|
+
if (typeof this.mappedTo !== 'undefined') {
|
|
932
|
+
toReturn['mappedTo'] = this.mappedTo;
|
|
933
|
+
}
|
|
934
|
+
if (typeof this.systemDefined !== 'undefined' && this.systemDefined !== null) {
|
|
935
|
+
toReturn['systemDefined'] = 'toApiJson' in this.systemDefined ? this.systemDefined.toApiJson() : this.systemDefined;
|
|
936
|
+
}
|
|
937
|
+
if (typeof this.readonly !== 'undefined') {
|
|
938
|
+
toReturn['readonly'] = this.readonly;
|
|
872
939
|
}
|
|
873
940
|
return toReturn;
|
|
874
941
|
}
|
|
@@ -1017,10 +1084,10 @@ class FormConfigFieldSchema {
|
|
|
1017
1084
|
let m = new FormConfigFieldSchema();
|
|
1018
1085
|
m = Object.assign(m, proto);
|
|
1019
1086
|
if (proto.unmappedField) {
|
|
1020
|
-
m.unmappedField =
|
|
1087
|
+
m.unmappedField = UnmappedField.fromProto(proto.unmappedField);
|
|
1021
1088
|
}
|
|
1022
1089
|
if (proto.mappedField) {
|
|
1023
|
-
m.mappedField =
|
|
1090
|
+
m.mappedField = MappedField.fromProto(proto.mappedField);
|
|
1024
1091
|
}
|
|
1025
1092
|
return m;
|
|
1026
1093
|
}
|
|
@@ -1123,9 +1190,9 @@ class FormSubmissionSubmittedValue {
|
|
|
1123
1190
|
return toReturn;
|
|
1124
1191
|
}
|
|
1125
1192
|
}
|
|
1126
|
-
class
|
|
1193
|
+
class SystemDefined {
|
|
1127
1194
|
static fromProto(proto) {
|
|
1128
|
-
let m = new
|
|
1195
|
+
let m = new SystemDefined();
|
|
1129
1196
|
m = Object.assign(m, proto);
|
|
1130
1197
|
return m;
|
|
1131
1198
|
}
|
|
@@ -1143,15 +1210,15 @@ class FormConfigFieldSystemDefined {
|
|
|
1143
1210
|
return toReturn;
|
|
1144
1211
|
}
|
|
1145
1212
|
}
|
|
1146
|
-
class
|
|
1213
|
+
class UnmappedField {
|
|
1147
1214
|
static fromProto(proto) {
|
|
1148
|
-
let m = new
|
|
1215
|
+
let m = new UnmappedField();
|
|
1149
1216
|
m = Object.assign(m, proto);
|
|
1150
1217
|
if (proto.type) {
|
|
1151
1218
|
m.type = enumStringToValue(FieldType, proto.type);
|
|
1152
1219
|
}
|
|
1153
1220
|
if (proto.options) {
|
|
1154
|
-
m.options = proto.options.map(
|
|
1221
|
+
m.options = proto.options.map(FieldOption.fromProto);
|
|
1155
1222
|
}
|
|
1156
1223
|
return m;
|
|
1157
1224
|
}
|
|
@@ -1442,6 +1509,11 @@ class FormsApiService {
|
|
|
1442
1509
|
return this.http.post(this._host + "/forms.v1.Forms/PreviewForm", request.toApiJson(), this.apiOptions())
|
|
1443
1510
|
.pipe(map(resp => PreviewFormResponse.fromProto(resp)));
|
|
1444
1511
|
}
|
|
1512
|
+
listMappedFieldSchema(r) {
|
|
1513
|
+
const request = (r.toApiJson) ? r : new ListMappedFieldSchemaRequest(r);
|
|
1514
|
+
return this.http.post(this._host + "/forms.v1.Forms/ListMappedFieldSchema", request.toApiJson(), this.apiOptions())
|
|
1515
|
+
.pipe(map(resp => ListMappedFieldSchemaResponse.fromProto(resp)));
|
|
1516
|
+
}
|
|
1445
1517
|
}
|
|
1446
1518
|
FormsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormsApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1447
1519
|
FormsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormsApiService, providedIn: 'root' });
|
|
@@ -1495,5 +1567,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1495
1567
|
* Generated bundle index. Do not edit.
|
|
1496
1568
|
*/
|
|
1497
1569
|
|
|
1498
|
-
export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FieldType, FieldValue, FormConfig, FormConfigField,
|
|
1570
|
+
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 };
|
|
1499
1571
|
//# sourceMappingURL=vendasta-forms_microservice.mjs.map
|