@vendasta/forms_microservice 0.0.3 → 0.0.6
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 +21 -0
- package/esm2020/lib/_internal/enums/index.mjs +8 -0
- package/esm2020/lib/_internal/forms.api.service.mjs +7 -2
- package/esm2020/lib/_internal/index.mjs +2 -1
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/paging.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +237 -6
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/esm2020/lib/_internal/objects/paging.mjs +7 -1
- package/fesm2015/vendasta-forms_microservice.mjs +270 -6
- package/fesm2015/vendasta-forms_microservice.mjs.map +1 -1
- package/fesm2020/vendasta-forms_microservice.mjs +270 -6
- package/fesm2020/vendasta-forms_microservice.mjs.map +1 -1
- package/lib/_internal/enums/api.enum.d.ts +12 -0
- package/lib/_internal/enums/index.d.ts +1 -0
- package/lib/_internal/forms.api.service.d.ts +3 -2
- package/lib/_internal/index.d.ts +1 -0
- package/lib/_internal/interfaces/api.interface.d.ts +40 -2
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +62 -2
- package/lib/_internal/objects/index.d.ts +1 -1
- package/lib/_internal/objects/paging.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum FieldType {
|
|
2
|
+
FIELD_TYPE_INVALID = 0,
|
|
3
|
+
FIELD_TYPE_STRING = 1,
|
|
4
|
+
FIELD_TYPE_INTEGER = 2,
|
|
5
|
+
FIELD_TYPE_DATE = 3,
|
|
6
|
+
FIELD_TYPE_DROPDOWN = 4,
|
|
7
|
+
FIELD_TYPE_CURRENCY = 5
|
|
8
|
+
}
|
|
9
|
+
export declare enum RenderFormRequestJsonSchemaLibrary {
|
|
10
|
+
RENDER_FORM_REQUEST_JSON_SCHEMA_LIBRARY_UNDEFINED = 0,
|
|
11
|
+
RENDER_FORM_REQUEST_JSON_SCHEMA_LIBRARY_JSONFORM = 1
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FieldType, RenderFormRequestJsonSchemaLibrary, } from './api.enum';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateFormRequest, CreateFormResponse, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, ListFormsRequest, ListFormsResponse, UpdateFormRequest, UpdateFormResponse, ValidateFormRequest, ValidateFormResponse } from './objects/';
|
|
2
|
-
import { CreateFormRequestInterface, GetEmbedCodeRequestInterface, GetFormRequestInterface, ListFormsRequestInterface, UpdateFormRequestInterface, ValidateFormRequestInterface } from './interfaces/';
|
|
1
|
+
import { CreateFormRequest, CreateFormResponse, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, ListFormsRequest, ListFormsResponse, RenderFormRequest, RenderFormResponse, UpdateFormRequest, UpdateFormResponse, ValidateFormRequest, ValidateFormResponse } from './objects/';
|
|
2
|
+
import { CreateFormRequestInterface, GetEmbedCodeRequestInterface, GetFormRequestInterface, ListFormsRequestInterface, RenderFormRequestInterface, UpdateFormRequestInterface, ValidateFormRequestInterface } from './interfaces/';
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
4
|
import { HostService } from '../_generated/host.service';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -16,6 +16,7 @@ export declare class FormsApiService {
|
|
|
16
16
|
updateForm(r: UpdateFormRequest | UpdateFormRequestInterface): Observable<UpdateFormResponse>;
|
|
17
17
|
listForms(r: ListFormsRequest | ListFormsRequestInterface): Observable<ListFormsResponse>;
|
|
18
18
|
validateForm(r: ValidateFormRequest | ValidateFormRequestInterface): Observable<ValidateFormResponse>;
|
|
19
|
+
renderForm(r: RenderFormRequest | RenderFormRequestInterface): Observable<RenderFormResponse>;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormsApiService, never>;
|
|
20
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormsApiService>;
|
|
21
22
|
}
|
package/lib/_internal/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PagedRequestOptionsInterface, PagedResponseMetadataInterface } from './paging.interface';
|
|
2
|
+
import * as e from '../enums';
|
|
2
3
|
export interface CreateFormRequestInterface {
|
|
3
4
|
formConfig?: FormConfigInterface;
|
|
4
5
|
}
|
|
@@ -9,6 +10,25 @@ export interface CreateFormResponseInterface {
|
|
|
9
10
|
export interface CreateFormSubmissionRequestInterface {
|
|
10
11
|
submission?: FormSubmissionInterface;
|
|
11
12
|
}
|
|
13
|
+
export interface FormConfigFieldDefaultInterface {
|
|
14
|
+
invalid?: boolean;
|
|
15
|
+
integer?: number;
|
|
16
|
+
string?: string;
|
|
17
|
+
date?: Date;
|
|
18
|
+
dropdown?: string;
|
|
19
|
+
currency?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface FormConfigFieldUnmappedFieldDropdownOptionInterface {
|
|
22
|
+
value?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface FormConfigFieldInterface {
|
|
26
|
+
schema?: FormConfigFieldSchemaInterface;
|
|
27
|
+
label?: string;
|
|
28
|
+
default?: FormConfigFieldDefaultInterface;
|
|
29
|
+
required?: boolean;
|
|
30
|
+
hidden?: boolean;
|
|
31
|
+
}
|
|
12
32
|
export interface ListFormsRequestFiltersInterface {
|
|
13
33
|
partnerId?: string;
|
|
14
34
|
}
|
|
@@ -16,8 +36,7 @@ export interface FormConfigInterface {
|
|
|
16
36
|
formId?: string;
|
|
17
37
|
version?: string;
|
|
18
38
|
styles?: StylesInterface;
|
|
19
|
-
|
|
20
|
-
uiSchema?: string;
|
|
39
|
+
fields?: FormConfigFieldInterface[];
|
|
21
40
|
formType?: string;
|
|
22
41
|
namespace?: string;
|
|
23
42
|
name?: string;
|
|
@@ -26,6 +45,7 @@ export interface FormConfigInterface {
|
|
|
26
45
|
}
|
|
27
46
|
export interface ListFormsResponseFormRowInterface {
|
|
28
47
|
form?: FormConfigInterface;
|
|
48
|
+
numberOfSubmissions?: number;
|
|
29
49
|
}
|
|
30
50
|
export interface FormSubmissionInterface {
|
|
31
51
|
formId?: string;
|
|
@@ -52,6 +72,18 @@ export interface ListFormsResponseInterface {
|
|
|
52
72
|
formRows?: ListFormsResponseFormRowInterface[];
|
|
53
73
|
pagingMetadata?: PagedResponseMetadataInterface;
|
|
54
74
|
}
|
|
75
|
+
export interface RenderFormRequestInterface {
|
|
76
|
+
formId?: string;
|
|
77
|
+
library?: e.RenderFormRequestJsonSchemaLibrary;
|
|
78
|
+
}
|
|
79
|
+
export interface RenderFormResponseInterface {
|
|
80
|
+
jsonSchema?: string;
|
|
81
|
+
jsonUiSchema?: string;
|
|
82
|
+
styles?: StylesInterface;
|
|
83
|
+
}
|
|
84
|
+
export interface FormConfigFieldSchemaInterface {
|
|
85
|
+
unmappedField?: FormConfigFieldUnmappedFieldInterface;
|
|
86
|
+
}
|
|
55
87
|
export interface StylesInterface {
|
|
56
88
|
width?: string;
|
|
57
89
|
backgroundColor?: string;
|
|
@@ -62,6 +94,12 @@ export interface StylesInterface {
|
|
|
62
94
|
padding?: string;
|
|
63
95
|
primaryFontColor?: string;
|
|
64
96
|
}
|
|
97
|
+
export interface FormConfigFieldUnmappedFieldInterface {
|
|
98
|
+
id?: string;
|
|
99
|
+
type?: e.FieldType;
|
|
100
|
+
dropdownOptions?: FormConfigFieldUnmappedFieldDropdownOptionInterface[];
|
|
101
|
+
currencyCode?: string;
|
|
102
|
+
}
|
|
65
103
|
export interface UpdateFormRequestInterface {
|
|
66
104
|
formConfig?: FormConfigInterface;
|
|
67
105
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { PagedRequestOptionsInterface, PagedResponseMetadataInterface, } from './paging.interface';
|
|
2
|
-
export { CreateFormRequestInterface, CreateFormResponseInterface, CreateFormSubmissionRequestInterface, ListFormsRequestFiltersInterface, FormConfigInterface, ListFormsResponseFormRowInterface, FormSubmissionInterface, GetEmbedCodeRequestInterface, GetEmbedCodeResponseInterface, GetFormRequestInterface, GetFormResponseInterface, ListFormsRequestInterface, ListFormsResponseInterface, StylesInterface, UpdateFormRequestInterface, UpdateFormResponseInterface, ValidateFormRequestInterface, ValidateFormResponseInterface, ValidateFormResponseValidationErrorInterface, } from './api.interface';
|
|
2
|
+
export { CreateFormRequestInterface, CreateFormResponseInterface, CreateFormSubmissionRequestInterface, FormConfigFieldDefaultInterface, FormConfigFieldUnmappedFieldDropdownOptionInterface, FormConfigFieldInterface, ListFormsRequestFiltersInterface, FormConfigInterface, ListFormsResponseFormRowInterface, FormSubmissionInterface, GetEmbedCodeRequestInterface, GetEmbedCodeResponseInterface, GetFormRequestInterface, GetFormResponseInterface, ListFormsRequestInterface, ListFormsResponseInterface, RenderFormRequestInterface, RenderFormResponseInterface, FormConfigFieldSchemaInterface, StylesInterface, FormConfigFieldUnmappedFieldInterface, UpdateFormRequestInterface, UpdateFormResponseInterface, ValidateFormRequestInterface, ValidateFormResponseInterface, ValidateFormResponseValidationErrorInterface, } from './api.interface';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i from '../interfaces';
|
|
2
2
|
import { PagedRequestOptions, PagedResponseMetadata } from './paging';
|
|
3
|
+
import * as e from '../enums';
|
|
4
|
+
export declare function enumStringToValue<E>(enumRef: any, value: string): E;
|
|
3
5
|
export declare class CreateFormRequest implements i.CreateFormRequestInterface {
|
|
4
6
|
formConfig: FormConfig;
|
|
5
7
|
static fromProto(proto: any): CreateFormRequest;
|
|
@@ -19,6 +21,34 @@ export declare class CreateFormSubmissionRequest implements i.CreateFormSubmissi
|
|
|
19
21
|
constructor(kwargs?: i.CreateFormSubmissionRequestInterface);
|
|
20
22
|
toApiJson(): object;
|
|
21
23
|
}
|
|
24
|
+
export declare class FormConfigFieldDefault implements i.FormConfigFieldDefaultInterface {
|
|
25
|
+
invalid: boolean;
|
|
26
|
+
integer: number;
|
|
27
|
+
string: string;
|
|
28
|
+
date: Date;
|
|
29
|
+
dropdown: string;
|
|
30
|
+
currency: number;
|
|
31
|
+
static fromProto(proto: any): FormConfigFieldDefault;
|
|
32
|
+
constructor(kwargs?: i.FormConfigFieldDefaultInterface);
|
|
33
|
+
toApiJson(): object;
|
|
34
|
+
}
|
|
35
|
+
export declare class FormConfigFieldUnmappedFieldDropdownOption implements i.FormConfigFieldUnmappedFieldDropdownOptionInterface {
|
|
36
|
+
value: string;
|
|
37
|
+
label: string;
|
|
38
|
+
static fromProto(proto: any): FormConfigFieldUnmappedFieldDropdownOption;
|
|
39
|
+
constructor(kwargs?: i.FormConfigFieldUnmappedFieldDropdownOptionInterface);
|
|
40
|
+
toApiJson(): object;
|
|
41
|
+
}
|
|
42
|
+
export declare class FormConfigField implements i.FormConfigFieldInterface {
|
|
43
|
+
schema: FormConfigFieldSchema;
|
|
44
|
+
label: string;
|
|
45
|
+
default: FormConfigFieldDefault;
|
|
46
|
+
required: boolean;
|
|
47
|
+
hidden: boolean;
|
|
48
|
+
static fromProto(proto: any): FormConfigField;
|
|
49
|
+
constructor(kwargs?: i.FormConfigFieldInterface);
|
|
50
|
+
toApiJson(): object;
|
|
51
|
+
}
|
|
22
52
|
export declare class ListFormsRequestFilters implements i.ListFormsRequestFiltersInterface {
|
|
23
53
|
partnerId: string;
|
|
24
54
|
static fromProto(proto: any): ListFormsRequestFilters;
|
|
@@ -29,8 +59,7 @@ export declare class FormConfig implements i.FormConfigInterface {
|
|
|
29
59
|
formId: string;
|
|
30
60
|
version: string;
|
|
31
61
|
styles: Styles;
|
|
32
|
-
|
|
33
|
-
uiSchema: string;
|
|
62
|
+
fields: FormConfigField[];
|
|
34
63
|
formType: string;
|
|
35
64
|
namespace: string;
|
|
36
65
|
name: string;
|
|
@@ -42,6 +71,7 @@ export declare class FormConfig implements i.FormConfigInterface {
|
|
|
42
71
|
}
|
|
43
72
|
export declare class ListFormsResponseFormRow implements i.ListFormsResponseFormRowInterface {
|
|
44
73
|
form: FormConfig;
|
|
74
|
+
numberOfSubmissions: number;
|
|
45
75
|
static fromProto(proto: any): ListFormsResponseFormRow;
|
|
46
76
|
constructor(kwargs?: i.ListFormsResponseFormRowInterface);
|
|
47
77
|
toApiJson(): object;
|
|
@@ -92,6 +122,27 @@ export declare class ListFormsResponse implements i.ListFormsResponseInterface {
|
|
|
92
122
|
constructor(kwargs?: i.ListFormsResponseInterface);
|
|
93
123
|
toApiJson(): object;
|
|
94
124
|
}
|
|
125
|
+
export declare class RenderFormRequest implements i.RenderFormRequestInterface {
|
|
126
|
+
formId: string;
|
|
127
|
+
library: e.RenderFormRequestJsonSchemaLibrary;
|
|
128
|
+
static fromProto(proto: any): RenderFormRequest;
|
|
129
|
+
constructor(kwargs?: i.RenderFormRequestInterface);
|
|
130
|
+
toApiJson(): object;
|
|
131
|
+
}
|
|
132
|
+
export declare class RenderFormResponse implements i.RenderFormResponseInterface {
|
|
133
|
+
jsonSchema: string;
|
|
134
|
+
jsonUiSchema: string;
|
|
135
|
+
styles: Styles;
|
|
136
|
+
static fromProto(proto: any): RenderFormResponse;
|
|
137
|
+
constructor(kwargs?: i.RenderFormResponseInterface);
|
|
138
|
+
toApiJson(): object;
|
|
139
|
+
}
|
|
140
|
+
export declare class FormConfigFieldSchema implements i.FormConfigFieldSchemaInterface {
|
|
141
|
+
unmappedField: FormConfigFieldUnmappedField;
|
|
142
|
+
static fromProto(proto: any): FormConfigFieldSchema;
|
|
143
|
+
constructor(kwargs?: i.FormConfigFieldSchemaInterface);
|
|
144
|
+
toApiJson(): object;
|
|
145
|
+
}
|
|
95
146
|
export declare class Styles implements i.StylesInterface {
|
|
96
147
|
width: string;
|
|
97
148
|
backgroundColor: string;
|
|
@@ -105,6 +156,15 @@ export declare class Styles implements i.StylesInterface {
|
|
|
105
156
|
constructor(kwargs?: i.StylesInterface);
|
|
106
157
|
toApiJson(): object;
|
|
107
158
|
}
|
|
159
|
+
export declare class FormConfigFieldUnmappedField implements i.FormConfigFieldUnmappedFieldInterface {
|
|
160
|
+
id: string;
|
|
161
|
+
type: e.FieldType;
|
|
162
|
+
dropdownOptions: FormConfigFieldUnmappedFieldDropdownOption[];
|
|
163
|
+
currencyCode: string;
|
|
164
|
+
static fromProto(proto: any): FormConfigFieldUnmappedField;
|
|
165
|
+
constructor(kwargs?: i.FormConfigFieldUnmappedFieldInterface);
|
|
166
|
+
toApiJson(): object;
|
|
167
|
+
}
|
|
108
168
|
export declare class UpdateFormRequest implements i.UpdateFormRequestInterface {
|
|
109
169
|
formConfig: FormConfig;
|
|
110
170
|
static fromProto(proto: any): UpdateFormRequest;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { PagedRequestOptions, PagedResponseMetadata, } from './paging';
|
|
2
|
-
export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, ListFormsRequestFilters, FormConfig, ListFormsResponseFormRow, FormSubmission, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, ListFormsRequest, ListFormsResponse, Styles, UpdateFormRequest, UpdateFormResponse, ValidateFormRequest, ValidateFormResponse, ValidateFormResponseValidationError, } from './api';
|
|
2
|
+
export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, FormConfigFieldDefault, FormConfigFieldUnmappedFieldDropdownOption, FormConfigField, ListFormsRequestFilters, FormConfig, ListFormsResponseFormRow, FormSubmission, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, ListFormsRequest, ListFormsResponse, RenderFormRequest, RenderFormResponse, FormConfigFieldSchema, Styles, FormConfigFieldUnmappedField, UpdateFormRequest, UpdateFormResponse, ValidateFormRequest, ValidateFormResponse, ValidateFormResponseValidationError, } from './api';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendasta/forms_microservice",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^14.0.0",
|
|
6
|
+
"@angular/core": "^14.0.0"
|
|
7
7
|
},
|
|
8
8
|
"author": "Vendasta R&D",
|
|
9
9
|
"description": "SDK to interact with the forms service",
|