@socialgouv/kali-data-types 2.626.0 → 2.627.1
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/package.json +1 -1
- package/src/index.d.ts +96 -96
- package/src/index.js +2 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export function getAgreement(agreementIdOrIdcc: number | string): KaliData.Agree
|
|
|
16
16
|
* @deprecated Use `getAgreementArticlesWithPath()` instead.
|
|
17
17
|
*/
|
|
18
18
|
export function getAgreementArticlesWithParentSections(
|
|
19
|
-
|
|
19
|
+
agreementIdOrIdcc: number | string,
|
|
20
20
|
): KaliData.AgreementArticleWithParentSections[];
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -26,7 +26,7 @@ export function getAgreementArticlesWithParentSections(
|
|
|
26
26
|
* @see https://github.com/syntax-tree/unist
|
|
27
27
|
*/
|
|
28
28
|
export function getAgreementArticlesWithPath(
|
|
29
|
-
|
|
29
|
+
agreementIdOrIdcc: number | string,
|
|
30
30
|
): KaliData.AgreementArticleWithPath[];
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -52,7 +52,7 @@ export function getArticles(): KaliData.IndexedArticle[];
|
|
|
52
52
|
* @deprecated Use `getArticleWithPath()` instead.
|
|
53
53
|
*/
|
|
54
54
|
export function getArticleWithParentSections(
|
|
55
|
-
|
|
55
|
+
articleIdOrCid: string,
|
|
56
56
|
): KaliData.AgreementArticleWithParentSections;
|
|
57
57
|
|
|
58
58
|
/**
|
|
@@ -97,129 +97,129 @@ export as namespace KaliData;
|
|
|
97
97
|
* - VIGUEUR_NON_ETEN: ...
|
|
98
98
|
*/
|
|
99
99
|
type State =
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
| "ABROGE"
|
|
101
|
+
| "DENONCE"
|
|
102
|
+
| "MODIFIE"
|
|
103
|
+
| "PERIME"
|
|
104
|
+
| "REMPLACE"
|
|
105
|
+
| "VIGUEUR"
|
|
106
|
+
| "VIGUEUR_ETEN"
|
|
107
|
+
| "VIGUEUR_NON_ETEN";
|
|
108
108
|
|
|
109
109
|
type Agreement = {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
type: "convention collective";
|
|
111
|
+
data: AgreementData;
|
|
112
|
+
children: AgreementSection[];
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
type AgreementData = {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
num: number;
|
|
117
|
+
title: string;
|
|
118
|
+
id: string;
|
|
119
|
+
shortTitle: string;
|
|
120
|
+
categorisation: string[];
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
type AgreementSection = {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
type: "section";
|
|
125
|
+
data: AgreementSectionData;
|
|
126
|
+
children: (AgreementArticle | AgreementSection)[];
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
type AgreementSectionData = {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
cid: string;
|
|
131
|
+
intOrdre: number;
|
|
132
|
+
id: string;
|
|
133
|
+
title: string;
|
|
134
|
+
etat: State;
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
type AgreementArticle = {
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
type: "article";
|
|
139
|
+
data: AgreementArticleData;
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
type AgreementArticleData = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
143
|
+
cid: string;
|
|
144
|
+
intOrdre: number;
|
|
145
|
+
id: string;
|
|
146
|
+
/** Legal index */
|
|
147
|
+
num?: string;
|
|
148
|
+
/** HTML content */
|
|
149
|
+
content: string;
|
|
150
|
+
etat: State;
|
|
151
|
+
surtitre?: string;
|
|
152
|
+
historique?: string;
|
|
153
|
+
lstLienModification: AgreementArticleDataLinkUpdate[];
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
type AgreementArticleDataLinkUpdate = {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
157
|
+
textCid: string;
|
|
158
|
+
textTitle: string;
|
|
159
|
+
linkType:
|
|
160
|
+
| "ABROGATION"
|
|
161
|
+
| "ABROGE"
|
|
162
|
+
| "CREATION"
|
|
163
|
+
| "CREE"
|
|
164
|
+
| "DENONCE"
|
|
165
|
+
| "DENONCIATION"
|
|
166
|
+
| "ELARGISSEMENT"
|
|
167
|
+
| "ELARGIT"
|
|
168
|
+
| "ETEND"
|
|
169
|
+
| "EXTENSION"
|
|
170
|
+
| "MODIFICATION"
|
|
171
|
+
| "MODIFIE"
|
|
172
|
+
| "PEREMPTION"
|
|
173
|
+
| "PERIME";
|
|
174
|
+
linkOrientation: "cible" | "source";
|
|
175
|
+
articleNum: string;
|
|
176
|
+
articleId: string;
|
|
177
|
+
natureText: string;
|
|
178
|
+
/** Publication date (YYYY-MM-DD) */
|
|
179
|
+
datePubliTexte: string | null;
|
|
180
|
+
/** ??? date (YYYY-MM-DD) */
|
|
181
|
+
dateSignaTexte: string | null;
|
|
182
|
+
/** ??? date (YYYY-MM-DD) */
|
|
183
|
+
dateDebutCible: string | null;
|
|
184
184
|
};
|
|
185
185
|
|
|
186
186
|
type IndexedAgreement = {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
187
|
+
active?: boolean;
|
|
188
|
+
/** Publication ISO date */
|
|
189
|
+
date_publi?: string;
|
|
190
|
+
effectif?: number;
|
|
191
|
+
etat?: State;
|
|
192
|
+
/** Agreement ID */
|
|
193
|
+
id?: string;
|
|
194
|
+
mtime?: number;
|
|
195
|
+
nature?: "IDCC";
|
|
196
|
+
/** Agreement IDCC */
|
|
197
|
+
num: number;
|
|
198
|
+
shortTitle: string;
|
|
199
|
+
texte_de_base?: string;
|
|
200
|
+
title: string;
|
|
201
|
+
url?: string;
|
|
202
|
+
synonymes?: string[];
|
|
203
203
|
};
|
|
204
204
|
|
|
205
205
|
type IndexedArticle = {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
206
|
+
/** Agreement ID */
|
|
207
|
+
agreementId: string;
|
|
208
|
+
/** Article CID */
|
|
209
|
+
articleCid: string;
|
|
210
|
+
/** Article ID */
|
|
211
|
+
articleId: string;
|
|
212
|
+
/** Sections path */
|
|
213
|
+
path: string[];
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
type AgreementArticleWithParentSections = AgreementArticle & {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
sections: Array<{
|
|
218
|
+
type: "section";
|
|
219
|
+
data: AgreementSectionData;
|
|
220
|
+
}>;
|
|
221
221
|
};
|
|
222
222
|
|
|
223
223
|
type AgreementArticleWithPath = AgreementArticle & {
|
|
224
|
-
|
|
224
|
+
path: string[];
|
|
225
225
|
};
|
package/src/index.js
CHANGED
|
@@ -11,6 +11,7 @@ const getArticles = require("./libs/getArticles");
|
|
|
11
11
|
const getIndexedArticle = require("./libs/getIndexedArticle");
|
|
12
12
|
const hasAgreement = require("./libs/hasAgreement");
|
|
13
13
|
const hasArticle = require("./libs/hasArticle");
|
|
14
|
+
const getAgreementsWithNoId = require("./libs/getAgreementsWithNoId");
|
|
14
15
|
|
|
15
16
|
module.exports = {
|
|
16
17
|
getAgreement,
|
|
@@ -18,6 +19,7 @@ module.exports = {
|
|
|
18
19
|
getAgreementArticlesWithPath,
|
|
19
20
|
getAgreementIdFromIdOrIdcc,
|
|
20
21
|
getAgreements,
|
|
22
|
+
getAgreementsWithNoId,
|
|
21
23
|
getArticleWithParentSections,
|
|
22
24
|
getArticleWithPath,
|
|
23
25
|
getArticles,
|