@communecter/cocolight-api-client 1.0.132 → 1.0.134
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/dist/cocolight-api-client.browser.js +1 -1
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/src/Api.ts +5 -5
- package/src/api/Answer.ts +1080 -24
- package/src/api/BaseEntity.ts +94 -4
- package/src/api/Form.ts +38 -0
- package/src/api/Project.ts +6 -5
- package/src/api/serverDataType/Answer.ts +19 -0
- package/types/api/Answer.d.ts +416 -6
- package/types/api/BaseEntity.d.ts +56 -3
- package/types/api/Form.d.ts +24 -0
- package/types/api/Project.d.ts +5 -5
- package/types/api/serverDataType/Answer.d.ts +14 -0
package/package.json
CHANGED
package/src/Api.ts
CHANGED
|
@@ -184,7 +184,7 @@ export default class Api {
|
|
|
184
184
|
*/
|
|
185
185
|
async event(eventData: EntityData): Promise<Event> {
|
|
186
186
|
try {
|
|
187
|
-
const event = new Event(this._client, eventData, { EndpointApi, User, Organization, Project, Poi, Badge, News, Comment });
|
|
187
|
+
const event = new Event(this._client, eventData, { EndpointApi, User, Organization, Project, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
188
188
|
if (!eventData.id && !eventData.slug) {
|
|
189
189
|
throw new Error("Vous devez fournir un id ou un slug pour créer une instance Event.");
|
|
190
190
|
}
|
|
@@ -201,7 +201,7 @@ export default class Api {
|
|
|
201
201
|
*/
|
|
202
202
|
async poi(poiData: EntityData): Promise<Poi> {
|
|
203
203
|
try {
|
|
204
|
-
const poi = new Poi(this._client, poiData, { EndpointApi, User, Organization, Project, Poi, Badge, News, Comment });
|
|
204
|
+
const poi = new Poi(this._client, poiData, { EndpointApi, User, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
205
205
|
if (!poiData.id && !poiData.slug) {
|
|
206
206
|
throw new Error("Vous devez fournir un id ou un slug pour créer une instance Poi.");
|
|
207
207
|
}
|
|
@@ -218,7 +218,7 @@ export default class Api {
|
|
|
218
218
|
*/
|
|
219
219
|
async answer(answerData: { id: string }): Promise<Answer> {
|
|
220
220
|
try {
|
|
221
|
-
const answer = new Answer(this._client, answerData, { EndpointApi, User, Organization, Project, Event, Poi, Badge, News, Comment });
|
|
221
|
+
const answer = new Answer(this._client, answerData, { EndpointApi, User, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
222
222
|
if (!answerData.id) {
|
|
223
223
|
throw new Error("Vous devez fournir un id pour créer une instance Answer.");
|
|
224
224
|
}
|
|
@@ -235,7 +235,7 @@ export default class Api {
|
|
|
235
235
|
*/
|
|
236
236
|
async form(formData: { id: string }): Promise<Form> {
|
|
237
237
|
try {
|
|
238
|
-
const form = new Form(this._client, formData, { EndpointApi, User, Organization, Project });
|
|
238
|
+
const form = new Form(this._client, formData, { EndpointApi, User, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
239
239
|
if (!formData.id) {
|
|
240
240
|
throw new Error("Vous devez fournir un id pour créer une instance Form.");
|
|
241
241
|
}
|
|
@@ -249,7 +249,7 @@ export default class Api {
|
|
|
249
249
|
|
|
250
250
|
async classified(classifiedData: EntityData): Promise<Classified> {
|
|
251
251
|
try {
|
|
252
|
-
const classified = new Classified(this._client, classifiedData, { EndpointApi, User, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified });
|
|
252
|
+
const classified = new Classified(this._client, classifiedData, { EndpointApi, User, Organization, Project, Event, Poi, Badge, News, Comment, Answer, Form, Classified, Action });
|
|
253
253
|
if (!classifiedData.id && !classifiedData.slug) {
|
|
254
254
|
throw new Error("Vous devez fournir un id ou un slug pour créer une instance Classified.");
|
|
255
255
|
}
|