@communecter/cocolight-api-client 1.0.87 → 1.0.89
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/serverDataType/Event.ts +30 -2
- package/src/api/serverDataType/Organization.ts +15 -2
- package/src/endpoints.module.ts +18 -18
- package/src/index.ts +4 -0
- package/types/api/serverDataType/Event.d.ts +7 -2
- package/types/api/serverDataType/Organization.d.ts +7 -2
- package/types/endpoints.module.d.ts +9 -0
- package/types/index.d.ts +2 -0
package/package.json
CHANGED
|
@@ -20,11 +20,39 @@ export interface EventLinksBlock {
|
|
|
20
20
|
[k: string]: unknown;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Types d'événements supportés
|
|
25
|
+
*/
|
|
26
|
+
export const EVENT_TYPES = [
|
|
27
|
+
"workshop",
|
|
28
|
+
"competition",
|
|
29
|
+
"concert",
|
|
30
|
+
"contest",
|
|
31
|
+
"conference",
|
|
32
|
+
"debate",
|
|
33
|
+
"exhibition",
|
|
34
|
+
"festival",
|
|
35
|
+
"crowdfunding",
|
|
36
|
+
"fair",
|
|
37
|
+
"course",
|
|
38
|
+
"protest",
|
|
39
|
+
"market",
|
|
40
|
+
"film",
|
|
41
|
+
"getTogether",
|
|
42
|
+
"meeting",
|
|
43
|
+
"spectacle",
|
|
44
|
+
"internship",
|
|
45
|
+
"stand",
|
|
46
|
+
"others",
|
|
47
|
+
] as const;
|
|
48
|
+
|
|
49
|
+
export type EventType = (typeof EVENT_TYPES)[number];
|
|
50
|
+
|
|
23
51
|
export interface EventItemJson {
|
|
24
52
|
_id: IdObject;
|
|
25
53
|
collection: "events";
|
|
26
54
|
name: string;
|
|
27
|
-
type
|
|
55
|
+
type?: EventType;
|
|
28
56
|
startDate: DateValue;
|
|
29
57
|
endDate: DateValue;
|
|
30
58
|
created?: DateValue;
|
|
@@ -54,7 +82,7 @@ export interface EventItemNormalized {
|
|
|
54
82
|
_id: ObjectID;
|
|
55
83
|
collection: "events";
|
|
56
84
|
name: string;
|
|
57
|
-
type
|
|
85
|
+
type?: EventType;
|
|
58
86
|
startDate: Date;
|
|
59
87
|
endDate: Date;
|
|
60
88
|
created?: Date;
|
|
@@ -24,6 +24,19 @@ export interface OrganizationLinksBlock {
|
|
|
24
24
|
[k: string]: unknown;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Types d'organisations supportés
|
|
29
|
+
*/
|
|
30
|
+
export const ORGANIZATION_TYPES = [
|
|
31
|
+
"NGO",
|
|
32
|
+
"LocalBusiness",
|
|
33
|
+
"Group",
|
|
34
|
+
"GovernmentOrganization",
|
|
35
|
+
"Cooperative",
|
|
36
|
+
] as const;
|
|
37
|
+
|
|
38
|
+
export type OrganizationType = (typeof ORGANIZATION_TYPES)[number];
|
|
39
|
+
|
|
27
40
|
export interface OrganizationItemJson {
|
|
28
41
|
_id: IdObject;
|
|
29
42
|
collection: "organizations";
|
|
@@ -35,7 +48,7 @@ export interface OrganizationItemJson {
|
|
|
35
48
|
description?: string;
|
|
36
49
|
shortDescription?: string;
|
|
37
50
|
slug?: string;
|
|
38
|
-
type?:
|
|
51
|
+
type?: OrganizationType;
|
|
39
52
|
address?: PostalAddress;
|
|
40
53
|
geo?: GeoCoordinates;
|
|
41
54
|
geoPosition?: GeoPosition;
|
|
@@ -63,7 +76,7 @@ export interface OrganizationItemNormalized {
|
|
|
63
76
|
description?: string;
|
|
64
77
|
shortDescription?: string;
|
|
65
78
|
slug?: string;
|
|
66
|
-
type?:
|
|
79
|
+
type?: OrganizationType;
|
|
67
80
|
address?: PostalAddress;
|
|
68
81
|
geo?: GeoCoordinates;
|
|
69
82
|
geoPosition?: GeoPosition;
|