@vendasta/forms_microservice 0.1.0 → 0.2.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.
@@ -6,9 +6,10 @@ export interface CreateFormRequestInterface {
6
6
  export interface CreateFormResponseInterface {
7
7
  formId?: string;
8
8
  version?: string;
9
+ errors?: ValidationErrorInterface[];
9
10
  }
10
11
  export interface CreateFormSubmissionRequestInterface {
11
- submission?: FormSubmissionInterface;
12
+ submission?: UserFormSubmissionInterface;
12
13
  recaptchaToken?: string;
13
14
  }
14
15
  export interface CreateFormSubmissionResponseInterface {
@@ -60,17 +61,12 @@ export interface ListFormsResponseFormRowInterface {
60
61
  form?: FormConfigInterface;
61
62
  numberOfSubmissions?: number;
62
63
  }
63
- export interface ListFormSubmissionResponseFormSubmissionInterface {
64
+ export interface FormSubmissionInterface {
64
65
  formSubmissionId?: string;
65
66
  formVersion?: string;
66
- values?: ListFormSubmissionResponseFormSubmissionSubmittedValueInterface[];
67
+ values?: FormSubmissionSubmittedValueInterface[];
67
68
  created?: Date;
68
69
  }
69
- export interface FormSubmissionInterface {
70
- formId?: string;
71
- version?: string;
72
- values?: string;
73
- }
74
70
  export interface GetEmbedCodeRequestInterface {
75
71
  formId?: string;
76
72
  }
@@ -83,6 +79,12 @@ export interface GetFormRequestInterface {
83
79
  export interface GetFormResponseInterface {
84
80
  formConfig?: FormConfigInterface;
85
81
  }
82
+ export interface GetMultiFormSubmissionRequestInterface {
83
+ formSubmissionIds?: string[];
84
+ }
85
+ export interface GetMultiFormSubmissionResponseInterface {
86
+ submissions?: FormSubmissionInterface[];
87
+ }
86
88
  export interface GetMultiFormVersionsListRequestInterface {
87
89
  formIds?: string[];
88
90
  }
@@ -100,7 +102,7 @@ export interface ListFormSubmissionRequestInterface {
100
102
  pagingOptions?: PagedRequestOptionsInterface;
101
103
  }
102
104
  export interface ListFormSubmissionResponseInterface {
103
- submissions?: ListFormSubmissionResponseFormSubmissionInterface[];
105
+ submissions?: FormSubmissionInterface[];
104
106
  pagingMetadata?: PagedResponseMetadataInterface;
105
107
  }
106
108
  export interface ListFormsRequestInterface {
@@ -111,7 +113,13 @@ export interface ListFormsResponseInterface {
111
113
  formRows?: ListFormsResponseFormRowInterface[];
112
114
  pagingMetadata?: PagedResponseMetadataInterface;
113
115
  }
114
- export interface FormConfigFieldUnmappedFieldOptionInterface {
116
+ export interface FormConfigFieldMappedFieldInterface {
117
+ id?: string;
118
+ type?: e.FieldType;
119
+ options?: FormConfigFieldOptionInterface[];
120
+ mappedTo?: string;
121
+ }
122
+ export interface FormConfigFieldOptionInterface {
115
123
  value?: string;
116
124
  label?: string;
117
125
  }
@@ -140,6 +148,7 @@ export interface RenderFormResponseInterface {
140
148
  }
141
149
  export interface FormConfigFieldSchemaInterface {
142
150
  unmappedField?: FormConfigFieldUnmappedFieldInterface;
151
+ mappedField?: FormConfigFieldMappedFieldInterface;
143
152
  }
144
153
  export interface StylesInterface {
145
154
  width?: string;
@@ -153,14 +162,16 @@ export interface StylesInterface {
153
162
  primaryColor?: string;
154
163
  onPrimaryColor?: string;
155
164
  }
156
- export interface ListFormSubmissionResponseFormSubmissionSubmittedValueInterface {
165
+ export interface FormSubmissionSubmittedValueInterface {
157
166
  fieldId?: string;
158
167
  fieldValue?: FieldValueInterface;
168
+ fieldType?: e.FieldType;
169
+ mappedToResource?: string;
159
170
  }
160
171
  export interface FormConfigFieldUnmappedFieldInterface {
161
172
  id?: string;
162
173
  type?: e.FieldType;
163
- options?: FormConfigFieldUnmappedFieldOptionInterface[];
174
+ options?: FormConfigFieldOptionInterface[];
164
175
  currencyCode?: string;
165
176
  }
166
177
  export interface UpdateFormRequestInterface {
@@ -168,6 +179,16 @@ export interface UpdateFormRequestInterface {
168
179
  }
169
180
  export interface UpdateFormResponseInterface {
170
181
  version?: string;
182
+ errors?: ValidationErrorInterface[];
183
+ }
184
+ export interface UserFormSubmissionInterface {
185
+ formId?: string;
186
+ version?: string;
187
+ values?: string;
188
+ }
189
+ export interface ValidationErrorInterface {
190
+ ruleId?: string;
191
+ message?: string;
171
192
  }
172
193
  export interface GetMultiFormVersionsListResponseVersionsInterface {
173
194
  formId?: string;
@@ -1,2 +1,2 @@
1
1
  export { PagedRequestOptionsInterface, PagedResponseMetadataInterface, } from './paging.interface';
2
- export { CreateFormRequestInterface, CreateFormResponseInterface, CreateFormSubmissionRequestInterface, CreateFormSubmissionResponseInterface, DeleteFormRequestInterface, FormConfigFieldInterface, FieldValueInterface, ListFormsRequestFiltersInterface, FormConfigInterface, GetMultiRequestFormConfigIdentifierInterface, ListFormsResponseFormRowInterface, ListFormSubmissionResponseFormSubmissionInterface, FormSubmissionInterface, GetEmbedCodeRequestInterface, GetEmbedCodeResponseInterface, GetFormRequestInterface, GetFormResponseInterface, GetMultiFormVersionsListRequestInterface, GetMultiFormVersionsListResponseInterface, GetMultiRequestInterface, GetMultiResponseInterface, ListFormSubmissionRequestInterface, ListFormSubmissionResponseInterface, ListFormsRequestInterface, ListFormsResponseInterface, FormConfigFieldUnmappedFieldOptionInterface, RenderFormResponsePreFillByUrlQueryParameterInterface, PreviewFormRequestInterface, PreviewFormResponseInterface, RenderFormRequestInterface, RenderFormResponseInterface, FormConfigFieldSchemaInterface, StylesInterface, ListFormSubmissionResponseFormSubmissionSubmittedValueInterface, FormConfigFieldUnmappedFieldInterface, UpdateFormRequestInterface, UpdateFormResponseInterface, GetMultiFormVersionsListResponseVersionsInterface, } from './api.interface';
2
+ export { CreateFormRequestInterface, CreateFormResponseInterface, CreateFormSubmissionRequestInterface, CreateFormSubmissionResponseInterface, DeleteFormRequestInterface, FormConfigFieldInterface, FieldValueInterface, ListFormsRequestFiltersInterface, FormConfigInterface, GetMultiRequestFormConfigIdentifierInterface, ListFormsResponseFormRowInterface, FormSubmissionInterface, GetEmbedCodeRequestInterface, GetEmbedCodeResponseInterface, GetFormRequestInterface, GetFormResponseInterface, GetMultiFormSubmissionRequestInterface, GetMultiFormSubmissionResponseInterface, GetMultiFormVersionsListRequestInterface, GetMultiFormVersionsListResponseInterface, GetMultiRequestInterface, GetMultiResponseInterface, ListFormSubmissionRequestInterface, ListFormSubmissionResponseInterface, ListFormsRequestInterface, ListFormsResponseInterface, FormConfigFieldMappedFieldInterface, FormConfigFieldOptionInterface, RenderFormResponsePreFillByUrlQueryParameterInterface, PreviewFormRequestInterface, PreviewFormResponseInterface, RenderFormRequestInterface, RenderFormResponseInterface, FormConfigFieldSchemaInterface, StylesInterface, FormSubmissionSubmittedValueInterface, FormConfigFieldUnmappedFieldInterface, UpdateFormRequestInterface, UpdateFormResponseInterface, UserFormSubmissionInterface, ValidationErrorInterface, GetMultiFormVersionsListResponseVersionsInterface, } from './api.interface';
@@ -11,12 +11,13 @@ export declare class CreateFormRequest implements i.CreateFormRequestInterface {
11
11
  export declare class CreateFormResponse implements i.CreateFormResponseInterface {
12
12
  formId: string;
13
13
  version: string;
14
+ errors: ValidationError[];
14
15
  static fromProto(proto: any): CreateFormResponse;
15
16
  constructor(kwargs?: i.CreateFormResponseInterface);
16
17
  toApiJson(): object;
17
18
  }
18
19
  export declare class CreateFormSubmissionRequest implements i.CreateFormSubmissionRequestInterface {
19
- submission: FormSubmission;
20
+ submission: UserFormSubmission;
20
21
  recaptchaToken: string;
21
22
  static fromProto(proto: any): CreateFormSubmissionRequest;
22
23
  constructor(kwargs?: i.CreateFormSubmissionRequestInterface);
@@ -95,19 +96,11 @@ export declare class ListFormsResponseFormRow implements i.ListFormsResponseForm
95
96
  constructor(kwargs?: i.ListFormsResponseFormRowInterface);
96
97
  toApiJson(): object;
97
98
  }
98
- export declare class ListFormSubmissionResponseFormSubmission implements i.ListFormSubmissionResponseFormSubmissionInterface {
99
+ export declare class FormSubmission implements i.FormSubmissionInterface {
99
100
  formSubmissionId: string;
100
101
  formVersion: string;
101
- values: ListFormSubmissionResponseFormSubmissionSubmittedValue[];
102
+ values: FormSubmissionSubmittedValue[];
102
103
  created: Date;
103
- static fromProto(proto: any): ListFormSubmissionResponseFormSubmission;
104
- constructor(kwargs?: i.ListFormSubmissionResponseFormSubmissionInterface);
105
- toApiJson(): object;
106
- }
107
- export declare class FormSubmission implements i.FormSubmissionInterface {
108
- formId: string;
109
- version: string;
110
- values: string;
111
104
  static fromProto(proto: any): FormSubmission;
112
105
  constructor(kwargs?: i.FormSubmissionInterface);
113
106
  toApiJson(): object;
@@ -136,6 +129,18 @@ export declare class GetFormResponse implements i.GetFormResponseInterface {
136
129
  constructor(kwargs?: i.GetFormResponseInterface);
137
130
  toApiJson(): object;
138
131
  }
132
+ export declare class GetMultiFormSubmissionRequest implements i.GetMultiFormSubmissionRequestInterface {
133
+ formSubmissionIds: string[];
134
+ static fromProto(proto: any): GetMultiFormSubmissionRequest;
135
+ constructor(kwargs?: i.GetMultiFormSubmissionRequestInterface);
136
+ toApiJson(): object;
137
+ }
138
+ export declare class GetMultiFormSubmissionResponse implements i.GetMultiFormSubmissionResponseInterface {
139
+ submissions: FormSubmission[];
140
+ static fromProto(proto: any): GetMultiFormSubmissionResponse;
141
+ constructor(kwargs?: i.GetMultiFormSubmissionResponseInterface);
142
+ toApiJson(): object;
143
+ }
139
144
  export declare class GetMultiFormVersionsListRequest implements i.GetMultiFormVersionsListRequestInterface {
140
145
  formIds: string[];
141
146
  static fromProto(proto: any): GetMultiFormVersionsListRequest;
@@ -168,7 +173,7 @@ export declare class ListFormSubmissionRequest implements i.ListFormSubmissionRe
168
173
  toApiJson(): object;
169
174
  }
170
175
  export declare class ListFormSubmissionResponse implements i.ListFormSubmissionResponseInterface {
171
- submissions: ListFormSubmissionResponseFormSubmission[];
176
+ submissions: FormSubmission[];
172
177
  pagingMetadata: PagedResponseMetadata;
173
178
  static fromProto(proto: any): ListFormSubmissionResponse;
174
179
  constructor(kwargs?: i.ListFormSubmissionResponseInterface);
@@ -188,11 +193,20 @@ export declare class ListFormsResponse implements i.ListFormsResponseInterface {
188
193
  constructor(kwargs?: i.ListFormsResponseInterface);
189
194
  toApiJson(): object;
190
195
  }
191
- export declare class FormConfigFieldUnmappedFieldOption implements i.FormConfigFieldUnmappedFieldOptionInterface {
196
+ export declare class FormConfigFieldMappedField implements i.FormConfigFieldMappedFieldInterface {
197
+ id: string;
198
+ type: e.FieldType;
199
+ options: FormConfigFieldOption[];
200
+ mappedTo: string;
201
+ static fromProto(proto: any): FormConfigFieldMappedField;
202
+ constructor(kwargs?: i.FormConfigFieldMappedFieldInterface);
203
+ toApiJson(): object;
204
+ }
205
+ export declare class FormConfigFieldOption implements i.FormConfigFieldOptionInterface {
192
206
  value: string;
193
207
  label: string;
194
- static fromProto(proto: any): FormConfigFieldUnmappedFieldOption;
195
- constructor(kwargs?: i.FormConfigFieldUnmappedFieldOptionInterface);
208
+ static fromProto(proto: any): FormConfigFieldOption;
209
+ constructor(kwargs?: i.FormConfigFieldOptionInterface);
196
210
  toApiJson(): object;
197
211
  }
198
212
  export declare class RenderFormResponsePreFillByUrlQueryParameter implements i.RenderFormResponsePreFillByUrlQueryParameterInterface {
@@ -235,6 +249,7 @@ export declare class RenderFormResponse implements i.RenderFormResponseInterface
235
249
  }
236
250
  export declare class FormConfigFieldSchema implements i.FormConfigFieldSchemaInterface {
237
251
  unmappedField: FormConfigFieldUnmappedField;
252
+ mappedField: FormConfigFieldMappedField;
238
253
  static fromProto(proto: any): FormConfigFieldSchema;
239
254
  constructor(kwargs?: i.FormConfigFieldSchemaInterface);
240
255
  toApiJson(): object;
@@ -254,17 +269,19 @@ export declare class Styles implements i.StylesInterface {
254
269
  constructor(kwargs?: i.StylesInterface);
255
270
  toApiJson(): object;
256
271
  }
257
- export declare class ListFormSubmissionResponseFormSubmissionSubmittedValue implements i.ListFormSubmissionResponseFormSubmissionSubmittedValueInterface {
272
+ export declare class FormSubmissionSubmittedValue implements i.FormSubmissionSubmittedValueInterface {
258
273
  fieldId: string;
259
274
  fieldValue: FieldValue;
260
- static fromProto(proto: any): ListFormSubmissionResponseFormSubmissionSubmittedValue;
261
- constructor(kwargs?: i.ListFormSubmissionResponseFormSubmissionSubmittedValueInterface);
275
+ fieldType: e.FieldType;
276
+ mappedToResource: string;
277
+ static fromProto(proto: any): FormSubmissionSubmittedValue;
278
+ constructor(kwargs?: i.FormSubmissionSubmittedValueInterface);
262
279
  toApiJson(): object;
263
280
  }
264
281
  export declare class FormConfigFieldUnmappedField implements i.FormConfigFieldUnmappedFieldInterface {
265
282
  id: string;
266
283
  type: e.FieldType;
267
- options: FormConfigFieldUnmappedFieldOption[];
284
+ options: FormConfigFieldOption[];
268
285
  currencyCode: string;
269
286
  static fromProto(proto: any): FormConfigFieldUnmappedField;
270
287
  constructor(kwargs?: i.FormConfigFieldUnmappedFieldInterface);
@@ -278,10 +295,26 @@ export declare class UpdateFormRequest implements i.UpdateFormRequestInterface {
278
295
  }
279
296
  export declare class UpdateFormResponse implements i.UpdateFormResponseInterface {
280
297
  version: string;
298
+ errors: ValidationError[];
281
299
  static fromProto(proto: any): UpdateFormResponse;
282
300
  constructor(kwargs?: i.UpdateFormResponseInterface);
283
301
  toApiJson(): object;
284
302
  }
303
+ export declare class UserFormSubmission implements i.UserFormSubmissionInterface {
304
+ formId: string;
305
+ version: string;
306
+ values: string;
307
+ static fromProto(proto: any): UserFormSubmission;
308
+ constructor(kwargs?: i.UserFormSubmissionInterface);
309
+ toApiJson(): object;
310
+ }
311
+ export declare class ValidationError implements i.ValidationErrorInterface {
312
+ ruleId: string;
313
+ message: string;
314
+ static fromProto(proto: any): ValidationError;
315
+ constructor(kwargs?: i.ValidationErrorInterface);
316
+ toApiJson(): object;
317
+ }
285
318
  export declare class GetMultiFormVersionsListResponseVersions implements i.GetMultiFormVersionsListResponseVersionsInterface {
286
319
  formId: string;
287
320
  versions: string[];
@@ -1,2 +1,2 @@
1
1
  export { PagedRequestOptions, PagedResponseMetadata, } from './paging';
2
- export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FormConfigField, FieldValue, ListFormsRequestFilters, FormConfig, GetMultiRequestFormConfigIdentifier, ListFormsResponseFormRow, ListFormSubmissionResponseFormSubmission, FormSubmission, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, GetMultiFormVersionsListRequest, GetMultiFormVersionsListResponse, GetMultiRequest, GetMultiResponse, ListFormSubmissionRequest, ListFormSubmissionResponse, ListFormsRequest, ListFormsResponse, FormConfigFieldUnmappedFieldOption, RenderFormResponsePreFillByUrlQueryParameter, PreviewFormRequest, PreviewFormResponse, RenderFormRequest, RenderFormResponse, FormConfigFieldSchema, Styles, ListFormSubmissionResponseFormSubmissionSubmittedValue, FormConfigFieldUnmappedField, UpdateFormRequest, UpdateFormResponse, GetMultiFormVersionsListResponseVersions, } from './api';
2
+ export { CreateFormRequest, CreateFormResponse, CreateFormSubmissionRequest, CreateFormSubmissionResponse, DeleteFormRequest, FormConfigField, FieldValue, ListFormsRequestFilters, FormConfig, GetMultiRequestFormConfigIdentifier, ListFormsResponseFormRow, FormSubmission, GetEmbedCodeRequest, GetEmbedCodeResponse, GetFormRequest, GetFormResponse, GetMultiFormSubmissionRequest, GetMultiFormSubmissionResponse, GetMultiFormVersionsListRequest, GetMultiFormVersionsListResponse, GetMultiRequest, GetMultiResponse, ListFormSubmissionRequest, ListFormSubmissionResponse, ListFormsRequest, ListFormsResponse, FormConfigFieldMappedField, FormConfigFieldOption, RenderFormResponsePreFillByUrlQueryParameter, PreviewFormRequest, PreviewFormResponse, RenderFormRequest, RenderFormResponse, FormConfigFieldSchema, Styles, FormSubmissionSubmittedValue, FormConfigFieldUnmappedField, UpdateFormRequest, UpdateFormResponse, UserFormSubmission, ValidationError, GetMultiFormVersionsListResponseVersions, } from './api';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendasta/forms_microservice",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.1.0",
6
6
  "@angular/core": "^15.1.0"