Skip to content

Commit 0cfaf89

Browse files
committed
Update node SDK from OpenAPI Generator
1 parent 2169921 commit 0cfaf89

11 files changed

Lines changed: 568 additions & 1 deletion

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ docs/HelloAssoApiV5ModelsEnumsSortField.md
4848
docs/HelloAssoApiV5ModelsEnumsSortOrder.md
4949
docs/HelloAssoApiV5ModelsEnumsTagType.md
5050
docs/HelloAssoApiV5ModelsEnumsTierType.md
51+
docs/HelloAssoApiV5ModelsFormsCustomFieldPublicModel.md
52+
docs/HelloAssoApiV5ModelsFormsExtraOptionPublicModel.md
5153
docs/HelloAssoApiV5ModelsFormsFormBasicModel.md
5254
docs/HelloAssoApiV5ModelsFormsFormLightModel.md
5355
docs/HelloAssoApiV5ModelsFormsFormPublicModel.md
@@ -168,6 +170,8 @@ src/model/HelloAssoApiV5ModelsEnumsSortField.js
168170
src/model/HelloAssoApiV5ModelsEnumsSortOrder.js
169171
src/model/HelloAssoApiV5ModelsEnumsTagType.js
170172
src/model/HelloAssoApiV5ModelsEnumsTierType.js
173+
src/model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel.js
174+
src/model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel.js
171175
src/model/HelloAssoApiV5ModelsFormsFormBasicModel.js
172176
src/model/HelloAssoApiV5ModelsFormsFormLightModel.js
173177
src/model/HelloAssoApiV5ModelsFormsFormPublicModel.js
@@ -223,3 +227,5 @@ src/model/ResultsWithPaginationModelPayment.js
223227
src/model/ResultsWithPaginationModelPublicPaymentModel.js
224228
src/model/ResultsWithPaginationModelSynchronizableFormModel.js
225229
src/model/ResultsWithPaginationModelSynchronizableOrganizationModel.js
230+
test/model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel.spec.js
231+
test/model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel.spec.js
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# HelloAssoApi.HelloAssoApiV5ModelsFormsCustomFieldPublicModel
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **Number** | Id of the customField | [optional] [readonly]
8+
**values** | **[String]** | The list of possible values if type is a CHOICE_LIST | [optional] [readonly]
9+
**isRequired** | **Boolean** | True if the custom field must be filled by the user before validating a cart | [optional] [readonly]
10+
**type** | [**HelloAssoApiV5ModelsEnumsFieldType**](HelloAssoApiV5ModelsEnumsFieldType.md) | | [optional]
11+
**label** | **String** | The label to be displayed to the user | [optional] [readonly]
12+
13+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# HelloAssoApi.HelloAssoApiV5ModelsFormsExtraOptionPublicModel
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**customFields** | [**[HelloAssoApiV5ModelsFormsCustomFieldPublicModel]**](HelloAssoApiV5ModelsFormsCustomFieldPublicModel.md) | List of custom fields to be filled by the user | [optional]
8+
**id** | **Number** | Id | [optional]
9+
**price** | **Number** | Price of the extraOption, can be free | [optional]
10+
**vatRate** | **Number** | Vat rate if applicable Amount have to be 0.10 for 10% | [optional]
11+
**label** | **String** | The name of the option | [optional]
12+
**description** | **String** | The description of the option | [optional]
13+
**isRequired** | **Boolean** | Additional option is required/mandatory | [optional] [readonly]
14+
15+

docs/HelloAssoApiV5ModelsFormsTierPublicModel.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**customFields** | [**[HelloAssoApiV5ModelsFormsCustomFieldPublicModel]**](HelloAssoApiV5ModelsFormsCustomFieldPublicModel.md) | List of custom fields to be filled by the user | [optional]
8+
**extraOptions** | [**[HelloAssoApiV5ModelsFormsExtraOptionPublicModel]**](HelloAssoApiV5ModelsFormsExtraOptionPublicModel.md) | List of available extra options to buy along the tier | [optional]
79
**id** | **Number** | id | [optional]
810
**label** | **String** | label | [optional]
911
**description** | **String** | description | [optional]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "helloasso-node",
3-
"version": "v1.0.1",
3+
"version": "v1.0.2",
44
"description": "HelloAsso auto-generated SDK",
55
"license": "GPL-3.0-or-later",
66
"main": "dist/index.js",

src/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ import HelloAssoApiV5ModelsEnumsSortField from './model/HelloAssoApiV5ModelsEnum
5656
import HelloAssoApiV5ModelsEnumsSortOrder from './model/HelloAssoApiV5ModelsEnumsSortOrder';
5757
import HelloAssoApiV5ModelsEnumsTagType from './model/HelloAssoApiV5ModelsEnumsTagType';
5858
import HelloAssoApiV5ModelsEnumsTierType from './model/HelloAssoApiV5ModelsEnumsTierType';
59+
import HelloAssoApiV5ModelsFormsCustomFieldPublicModel from './model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel';
60+
import HelloAssoApiV5ModelsFormsExtraOptionPublicModel from './model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel';
5961
import HelloAssoApiV5ModelsFormsFormBasicModel from './model/HelloAssoApiV5ModelsFormsFormBasicModel';
6062
import HelloAssoApiV5ModelsFormsFormLightModel from './model/HelloAssoApiV5ModelsFormsFormLightModel';
6163
import HelloAssoApiV5ModelsFormsFormPublicModel from './model/HelloAssoApiV5ModelsFormsFormPublicModel';
@@ -420,6 +422,18 @@ export {
420422
*/
421423
HelloAssoApiV5ModelsEnumsTierType,
422424

425+
/**
426+
* The HelloAssoApiV5ModelsFormsCustomFieldPublicModel model constructor.
427+
* @property {module:model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel}
428+
*/
429+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel,
430+
431+
/**
432+
* The HelloAssoApiV5ModelsFormsExtraOptionPublicModel model constructor.
433+
* @property {module:model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel}
434+
*/
435+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel,
436+
423437
/**
424438
* The HelloAssoApiV5ModelsFormsFormBasicModel model constructor.
425439
* @property {module:model/HelloAssoApiV5ModelsFormsFormBasicModel}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
/**
2+
* HelloAsso API
3+
* HelloAsso auto-generated SDK
4+
*
5+
* The version of the OpenAPI document: public
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*
12+
*/
13+
14+
import ApiClient from '../ApiClient';
15+
import HelloAssoApiV5ModelsEnumsFieldType from './HelloAssoApiV5ModelsEnumsFieldType';
16+
17+
/**
18+
* The HelloAssoApiV5ModelsFormsCustomFieldPublicModel model module.
19+
* @module model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel
20+
* @version public
21+
*/
22+
class HelloAssoApiV5ModelsFormsCustomFieldPublicModel {
23+
/**
24+
* Constructs a new <code>HelloAssoApiV5ModelsFormsCustomFieldPublicModel</code>.
25+
* A custom field can be assigned to a Tier or an ExtraOption It is used to give extra information during the reservation of a tier
26+
* @alias module:model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel
27+
*/
28+
constructor() {
29+
30+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel.initialize(this);
31+
}
32+
33+
/**
34+
* Initializes the fields of this object.
35+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
36+
* Only for internal use.
37+
*/
38+
static initialize(obj) {
39+
}
40+
41+
/**
42+
* Constructs a <code>HelloAssoApiV5ModelsFormsCustomFieldPublicModel</code> from a plain JavaScript object, optionally creating a new instance.
43+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
44+
* @param {Object} data The plain JavaScript object bearing properties of interest.
45+
* @param {module:model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel} obj Optional instance to populate.
46+
* @return {module:model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel} The populated <code>HelloAssoApiV5ModelsFormsCustomFieldPublicModel</code> instance.
47+
*/
48+
static constructFromObject(data, obj) {
49+
if (data) {
50+
obj = obj || new HelloAssoApiV5ModelsFormsCustomFieldPublicModel();
51+
52+
if (data.hasOwnProperty('id')) {
53+
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
54+
}
55+
if (data.hasOwnProperty('values')) {
56+
obj['values'] = ApiClient.convertToType(data['values'], ['String']);
57+
}
58+
if (data.hasOwnProperty('isRequired')) {
59+
obj['isRequired'] = ApiClient.convertToType(data['isRequired'], 'Boolean');
60+
}
61+
if (data.hasOwnProperty('type')) {
62+
obj['type'] = HelloAssoApiV5ModelsEnumsFieldType.constructFromObject(data['type']);
63+
}
64+
if (data.hasOwnProperty('label')) {
65+
obj['label'] = ApiClient.convertToType(data['label'], 'String');
66+
}
67+
}
68+
return obj;
69+
}
70+
71+
/**
72+
* Validates the JSON data with respect to <code>HelloAssoApiV5ModelsFormsCustomFieldPublicModel</code>.
73+
* @param {Object} data The plain JavaScript object bearing properties of interest.
74+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>HelloAssoApiV5ModelsFormsCustomFieldPublicModel</code>.
75+
*/
76+
static validateJSON(data) {
77+
// ensure the json data is an array
78+
if (!Array.isArray(data['values'])) {
79+
throw new Error("Expected the field `values` to be an array in the JSON data but got " + data['values']);
80+
}
81+
// ensure the json data is a string
82+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
83+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
84+
}
85+
86+
return true;
87+
}
88+
89+
90+
}
91+
92+
93+
94+
/**
95+
* Id of the customField
96+
* @member {Number} id
97+
*/
98+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel.prototype['id'] = undefined;
99+
100+
/**
101+
* The list of possible values if type is a CHOICE_LIST
102+
* @member {Array.<String>} values
103+
*/
104+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel.prototype['values'] = undefined;
105+
106+
/**
107+
* True if the custom field must be filled by the user before validating a cart
108+
* @member {Boolean} isRequired
109+
*/
110+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel.prototype['isRequired'] = undefined;
111+
112+
/**
113+
* @member {module:model/HelloAssoApiV5ModelsEnumsFieldType} type
114+
*/
115+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel.prototype['type'] = undefined;
116+
117+
/**
118+
* The label to be displayed to the user
119+
* @member {String} label
120+
*/
121+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel.prototype['label'] = undefined;
122+
123+
124+
125+
126+
127+
128+
export default HelloAssoApiV5ModelsFormsCustomFieldPublicModel;
129+
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
/**
2+
* HelloAsso API
3+
* HelloAsso auto-generated SDK
4+
*
5+
* The version of the OpenAPI document: public
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*
12+
*/
13+
14+
import ApiClient from '../ApiClient';
15+
import HelloAssoApiV5ModelsFormsCustomFieldPublicModel from './HelloAssoApiV5ModelsFormsCustomFieldPublicModel';
16+
17+
/**
18+
* The HelloAssoApiV5ModelsFormsExtraOptionPublicModel model module.
19+
* @module model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel
20+
* @version public
21+
*/
22+
class HelloAssoApiV5ModelsFormsExtraOptionPublicModel {
23+
/**
24+
* Constructs a new <code>HelloAssoApiV5ModelsFormsExtraOptionPublicModel</code>.
25+
* ExtraOptionFullModel
26+
* @alias module:model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel
27+
*/
28+
constructor() {
29+
30+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.initialize(this);
31+
}
32+
33+
/**
34+
* Initializes the fields of this object.
35+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
36+
* Only for internal use.
37+
*/
38+
static initialize(obj) {
39+
}
40+
41+
/**
42+
* Constructs a <code>HelloAssoApiV5ModelsFormsExtraOptionPublicModel</code> from a plain JavaScript object, optionally creating a new instance.
43+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
44+
* @param {Object} data The plain JavaScript object bearing properties of interest.
45+
* @param {module:model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel} obj Optional instance to populate.
46+
* @return {module:model/HelloAssoApiV5ModelsFormsExtraOptionPublicModel} The populated <code>HelloAssoApiV5ModelsFormsExtraOptionPublicModel</code> instance.
47+
*/
48+
static constructFromObject(data, obj) {
49+
if (data) {
50+
obj = obj || new HelloAssoApiV5ModelsFormsExtraOptionPublicModel();
51+
52+
if (data.hasOwnProperty('customFields')) {
53+
obj['customFields'] = ApiClient.convertToType(data['customFields'], [HelloAssoApiV5ModelsFormsCustomFieldPublicModel]);
54+
}
55+
if (data.hasOwnProperty('id')) {
56+
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
57+
}
58+
if (data.hasOwnProperty('price')) {
59+
obj['price'] = ApiClient.convertToType(data['price'], 'Number');
60+
}
61+
if (data.hasOwnProperty('vatRate')) {
62+
obj['vatRate'] = ApiClient.convertToType(data['vatRate'], 'Number');
63+
}
64+
if (data.hasOwnProperty('label')) {
65+
obj['label'] = ApiClient.convertToType(data['label'], 'String');
66+
}
67+
if (data.hasOwnProperty('description')) {
68+
obj['description'] = ApiClient.convertToType(data['description'], 'String');
69+
}
70+
if (data.hasOwnProperty('isRequired')) {
71+
obj['isRequired'] = ApiClient.convertToType(data['isRequired'], 'Boolean');
72+
}
73+
}
74+
return obj;
75+
}
76+
77+
/**
78+
* Validates the JSON data with respect to <code>HelloAssoApiV5ModelsFormsExtraOptionPublicModel</code>.
79+
* @param {Object} data The plain JavaScript object bearing properties of interest.
80+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>HelloAssoApiV5ModelsFormsExtraOptionPublicModel</code>.
81+
*/
82+
static validateJSON(data) {
83+
if (data['customFields']) { // data not null
84+
// ensure the json data is an array
85+
if (!Array.isArray(data['customFields'])) {
86+
throw new Error("Expected the field `customFields` to be an array in the JSON data but got " + data['customFields']);
87+
}
88+
// validate the optional field `customFields` (array)
89+
for (const item of data['customFields']) {
90+
HelloAssoApiV5ModelsFormsCustomFieldPublicModel.validateJSON(item);
91+
};
92+
}
93+
// ensure the json data is a string
94+
if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
95+
throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
96+
}
97+
// ensure the json data is a string
98+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
99+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
100+
}
101+
102+
return true;
103+
}
104+
105+
106+
}
107+
108+
109+
110+
/**
111+
* List of custom fields to be filled by the user
112+
* @member {Array.<module:model/HelloAssoApiV5ModelsFormsCustomFieldPublicModel>} customFields
113+
*/
114+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.prototype['customFields'] = undefined;
115+
116+
/**
117+
* Id
118+
* @member {Number} id
119+
*/
120+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.prototype['id'] = undefined;
121+
122+
/**
123+
* Price of the extraOption, can be free
124+
* @member {Number} price
125+
*/
126+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.prototype['price'] = undefined;
127+
128+
/**
129+
* Vat rate if applicable Amount have to be 0.10 for 10%
130+
* @member {Number} vatRate
131+
*/
132+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.prototype['vatRate'] = undefined;
133+
134+
/**
135+
* The name of the option
136+
* @member {String} label
137+
*/
138+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.prototype['label'] = undefined;
139+
140+
/**
141+
* The description of the option
142+
* @member {String} description
143+
*/
144+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.prototype['description'] = undefined;
145+
146+
/**
147+
* Additional option is required/mandatory
148+
* @member {Boolean} isRequired
149+
*/
150+
HelloAssoApiV5ModelsFormsExtraOptionPublicModel.prototype['isRequired'] = undefined;
151+
152+
153+
154+
155+
156+
157+
export default HelloAssoApiV5ModelsFormsExtraOptionPublicModel;
158+

0 commit comments

Comments
 (0)