@equinor/fusion-framework-module-services 7.0.2 → 7.1.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.
- package/CHANGELOG.md +13 -0
- package/dist/esm/bookmarks/client.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.get.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.patch.js +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.patch.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.post.js +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.post.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/user-bookmarks.get.js +3 -1
- package/dist/esm/bookmarks/endpoints/user-bookmarks.get.js.map +1 -1
- package/dist/esm/bookmarks/schemas.js +1 -1
- package/dist/esm/bookmarks/schemas.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/bookmarks/endpoints/bookmark-apply.get.d.ts +3 -13
- package/dist/types/bookmarks/endpoints/bookmark.delete.d.ts +1 -5
- package/dist/types/bookmarks/endpoints/bookmark.get.d.ts +66 -274
- package/dist/types/bookmarks/endpoints/bookmark.patch.d.ts +37 -195
- package/dist/types/bookmarks/endpoints/bookmark.post.d.ts +35 -171
- package/dist/types/bookmarks/endpoints/user-bookmark-favourite.delete.d.ts +1 -5
- package/dist/types/bookmarks/endpoints/user-bookmark-favourite.head.d.ts +1 -5
- package/dist/types/bookmarks/endpoints/user-bookmark-favourite.post.d.ts +1 -5
- package/dist/types/bookmarks/endpoints/user-bookmarks.get.d.ts +74 -349
- package/dist/types/bookmarks/schemas.d.ts +79 -301
- package/dist/types/utils.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +4 -4
- package/src/bookmarks/client.ts +1 -1
- package/src/bookmarks/endpoints/bookmark.get.ts +2 -2
- package/src/bookmarks/endpoints/bookmark.patch.ts +1 -1
- package/src/bookmarks/endpoints/bookmark.post.ts +1 -1
- package/src/bookmarks/endpoints/user-bookmarks.get.ts +7 -5
- package/src/bookmarks/schemas.ts +1 -1
- package/src/utils.ts +2 -4
- package/src/version.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const ApiDateSchema: z.
|
|
2
|
+
export declare const ApiDateSchema: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
3
3
|
export declare const ApiPersonSchema: {
|
|
4
4
|
"1.0": z.ZodObject<{
|
|
5
5
|
azureUniqueId: z.ZodString;
|
|
@@ -7,55 +7,33 @@ export declare const ApiPersonSchema: {
|
|
|
7
7
|
mail: z.ZodOptional<z.ZodString>;
|
|
8
8
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
9
9
|
jobTitle: z.ZodOptional<z.ZodString>;
|
|
10
|
-
accountType: z.ZodOptional<z.ZodEnum<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
mail?: string | undefined;
|
|
24
|
-
phoneNumber?: string | undefined;
|
|
25
|
-
jobTitle?: string | undefined;
|
|
26
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
27
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
28
|
-
}>;
|
|
10
|
+
accountType: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
Employee: "Employee";
|
|
12
|
+
Consultant: "Consultant";
|
|
13
|
+
External: "External";
|
|
14
|
+
Application: "Application";
|
|
15
|
+
Local: "Local";
|
|
16
|
+
}>>;
|
|
17
|
+
accountClassification: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
18
|
+
External: "External";
|
|
19
|
+
Unclassified: "Unclassified";
|
|
20
|
+
Internal: "Internal";
|
|
21
|
+
}>>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
29
23
|
};
|
|
30
24
|
export declare const ApiSourceSystem: {
|
|
31
25
|
"1.0": z.ZodObject<{
|
|
32
26
|
identifier: z.ZodString;
|
|
33
27
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
28
|
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
-
},
|
|
36
|
-
identifier: string;
|
|
37
|
-
name?: string | null | undefined;
|
|
38
|
-
subSystem?: string | null | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
identifier: string;
|
|
41
|
-
name?: string | null | undefined;
|
|
42
|
-
subSystem?: string | null | undefined;
|
|
43
|
-
}>;
|
|
29
|
+
}, z.core.$strip>;
|
|
44
30
|
};
|
|
45
31
|
export declare const ApiFusionContext: {
|
|
46
32
|
"1.0": z.ZodObject<{
|
|
47
33
|
id: z.ZodString;
|
|
48
34
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
35
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
-
},
|
|
51
|
-
id: string;
|
|
52
|
-
type?: string | null | undefined;
|
|
53
|
-
name?: string | null | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
id: string;
|
|
56
|
-
type?: string | null | undefined;
|
|
57
|
-
name?: string | null | undefined;
|
|
58
|
-
}>;
|
|
36
|
+
}, z.core.$strip>;
|
|
59
37
|
};
|
|
60
38
|
/**
|
|
61
39
|
* Defines the schema for the API bookmark entity, which includes various properties such as the unique identifier, name, application key, description, sharing status, context, creator and updater information, creation and update timestamps, and source system details.
|
|
@@ -73,153 +51,53 @@ export declare const ApiBookmarkSchema: {
|
|
|
73
51
|
id: z.ZodString;
|
|
74
52
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
53
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
-
},
|
|
77
|
-
id: string;
|
|
78
|
-
type?: string | null | undefined;
|
|
79
|
-
name?: string | null | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
id: string;
|
|
82
|
-
type?: string | null | undefined;
|
|
83
|
-
name?: string | null | undefined;
|
|
84
|
-
}>>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
85
55
|
createdBy: z.ZodObject<{
|
|
86
56
|
azureUniqueId: z.ZodString;
|
|
87
57
|
name: z.ZodString;
|
|
88
58
|
mail: z.ZodOptional<z.ZodString>;
|
|
89
59
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
90
60
|
jobTitle: z.ZodOptional<z.ZodString>;
|
|
91
|
-
accountType: z.ZodOptional<z.ZodEnum<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
mail?: string | undefined;
|
|
105
|
-
phoneNumber?: string | undefined;
|
|
106
|
-
jobTitle?: string | undefined;
|
|
107
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
108
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
109
|
-
}>;
|
|
61
|
+
accountType: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
Employee: "Employee";
|
|
63
|
+
Consultant: "Consultant";
|
|
64
|
+
External: "External";
|
|
65
|
+
Application: "Application";
|
|
66
|
+
Local: "Local";
|
|
67
|
+
}>>;
|
|
68
|
+
accountClassification: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
69
|
+
External: "External";
|
|
70
|
+
Unclassified: "Unclassified";
|
|
71
|
+
Internal: "Internal";
|
|
72
|
+
}>>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
110
74
|
updatedBy: z.ZodOptional<z.ZodObject<{
|
|
111
75
|
azureUniqueId: z.ZodString;
|
|
112
76
|
name: z.ZodString;
|
|
113
77
|
mail: z.ZodOptional<z.ZodString>;
|
|
114
78
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
115
79
|
jobTitle: z.ZodOptional<z.ZodString>;
|
|
116
|
-
accountType: z.ZodOptional<z.ZodEnum<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
jobTitle?: string | undefined;
|
|
132
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
133
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
134
|
-
}>>;
|
|
135
|
-
created: z.ZodEffects<z.ZodString, Date, string>;
|
|
136
|
-
updated: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
|
|
80
|
+
accountType: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
Employee: "Employee";
|
|
82
|
+
Consultant: "Consultant";
|
|
83
|
+
External: "External";
|
|
84
|
+
Application: "Application";
|
|
85
|
+
Local: "Local";
|
|
86
|
+
}>>;
|
|
87
|
+
accountClassification: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
88
|
+
External: "External";
|
|
89
|
+
Unclassified: "Unclassified";
|
|
90
|
+
Internal: "Internal";
|
|
91
|
+
}>>>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
created: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
94
|
+
updated: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>;
|
|
137
95
|
sourceSystem: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
138
96
|
identifier: z.ZodString;
|
|
139
97
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
98
|
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
name?: string | null | undefined;
|
|
144
|
-
subSystem?: string | null | undefined;
|
|
145
|
-
}, {
|
|
146
|
-
identifier: string;
|
|
147
|
-
name?: string | null | undefined;
|
|
148
|
-
subSystem?: string | null | undefined;
|
|
149
|
-
}>>>;
|
|
150
|
-
}, "strip", z.ZodTypeAny, {
|
|
151
|
-
id: string;
|
|
152
|
-
name: string;
|
|
153
|
-
appKey: string;
|
|
154
|
-
createdBy: {
|
|
155
|
-
azureUniqueId: string;
|
|
156
|
-
name: string;
|
|
157
|
-
mail?: string | undefined;
|
|
158
|
-
phoneNumber?: string | undefined;
|
|
159
|
-
jobTitle?: string | undefined;
|
|
160
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
161
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
162
|
-
};
|
|
163
|
-
created: Date;
|
|
164
|
-
description?: string | undefined;
|
|
165
|
-
isShared?: boolean | undefined;
|
|
166
|
-
context?: {
|
|
167
|
-
id: string;
|
|
168
|
-
type?: string | null | undefined;
|
|
169
|
-
name?: string | null | undefined;
|
|
170
|
-
} | undefined;
|
|
171
|
-
updatedBy?: {
|
|
172
|
-
azureUniqueId: string;
|
|
173
|
-
name: string;
|
|
174
|
-
mail?: string | undefined;
|
|
175
|
-
phoneNumber?: string | undefined;
|
|
176
|
-
jobTitle?: string | undefined;
|
|
177
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
178
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
179
|
-
} | undefined;
|
|
180
|
-
updated?: Date | undefined;
|
|
181
|
-
sourceSystem?: {
|
|
182
|
-
identifier: string;
|
|
183
|
-
name?: string | null | undefined;
|
|
184
|
-
subSystem?: string | null | undefined;
|
|
185
|
-
} | null | undefined;
|
|
186
|
-
}, {
|
|
187
|
-
id: string;
|
|
188
|
-
name: string;
|
|
189
|
-
appKey: string;
|
|
190
|
-
createdBy: {
|
|
191
|
-
azureUniqueId: string;
|
|
192
|
-
name: string;
|
|
193
|
-
mail?: string | undefined;
|
|
194
|
-
phoneNumber?: string | undefined;
|
|
195
|
-
jobTitle?: string | undefined;
|
|
196
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
197
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
198
|
-
};
|
|
199
|
-
created: string;
|
|
200
|
-
description?: string | undefined;
|
|
201
|
-
isShared?: boolean | undefined;
|
|
202
|
-
context?: {
|
|
203
|
-
id: string;
|
|
204
|
-
type?: string | null | undefined;
|
|
205
|
-
name?: string | null | undefined;
|
|
206
|
-
} | undefined;
|
|
207
|
-
updatedBy?: {
|
|
208
|
-
azureUniqueId: string;
|
|
209
|
-
name: string;
|
|
210
|
-
mail?: string | undefined;
|
|
211
|
-
phoneNumber?: string | undefined;
|
|
212
|
-
jobTitle?: string | undefined;
|
|
213
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
214
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
215
|
-
} | undefined;
|
|
216
|
-
updated?: string | undefined;
|
|
217
|
-
sourceSystem?: {
|
|
218
|
-
identifier: string;
|
|
219
|
-
name?: string | null | undefined;
|
|
220
|
-
subSystem?: string | null | undefined;
|
|
221
|
-
} | null | undefined;
|
|
222
|
-
}>;
|
|
99
|
+
}, z.core.$strip>>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
223
101
|
readonly "2.0": z.ZodObject<{
|
|
224
102
|
id: z.ZodString;
|
|
225
103
|
name: z.ZodString;
|
|
@@ -230,154 +108,54 @@ export declare const ApiBookmarkSchema: {
|
|
|
230
108
|
id: z.ZodString;
|
|
231
109
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
110
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
-
},
|
|
234
|
-
id: string;
|
|
235
|
-
type?: string | null | undefined;
|
|
236
|
-
name?: string | null | undefined;
|
|
237
|
-
}, {
|
|
238
|
-
id: string;
|
|
239
|
-
type?: string | null | undefined;
|
|
240
|
-
name?: string | null | undefined;
|
|
241
|
-
}>>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
242
112
|
createdBy: z.ZodObject<{
|
|
243
113
|
azureUniqueId: z.ZodString;
|
|
244
114
|
name: z.ZodString;
|
|
245
115
|
mail: z.ZodOptional<z.ZodString>;
|
|
246
116
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
247
117
|
jobTitle: z.ZodOptional<z.ZodString>;
|
|
248
|
-
accountType: z.ZodOptional<z.ZodEnum<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
mail?: string | undefined;
|
|
262
|
-
phoneNumber?: string | undefined;
|
|
263
|
-
jobTitle?: string | undefined;
|
|
264
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
265
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
266
|
-
}>;
|
|
118
|
+
accountType: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
Employee: "Employee";
|
|
120
|
+
Consultant: "Consultant";
|
|
121
|
+
External: "External";
|
|
122
|
+
Application: "Application";
|
|
123
|
+
Local: "Local";
|
|
124
|
+
}>>;
|
|
125
|
+
accountClassification: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
126
|
+
External: "External";
|
|
127
|
+
Unclassified: "Unclassified";
|
|
128
|
+
Internal: "Internal";
|
|
129
|
+
}>>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
267
131
|
updatedBy: z.ZodOptional<z.ZodObject<{
|
|
268
132
|
azureUniqueId: z.ZodString;
|
|
269
133
|
name: z.ZodString;
|
|
270
134
|
mail: z.ZodOptional<z.ZodString>;
|
|
271
135
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
272
136
|
jobTitle: z.ZodOptional<z.ZodString>;
|
|
273
|
-
accountType: z.ZodOptional<z.ZodEnum<
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
jobTitle?: string | undefined;
|
|
289
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
290
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
291
|
-
}>>;
|
|
292
|
-
created: z.ZodEffects<z.ZodString, Date, string>;
|
|
293
|
-
updated: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
|
|
137
|
+
accountType: z.ZodOptional<z.ZodEnum<{
|
|
138
|
+
Employee: "Employee";
|
|
139
|
+
Consultant: "Consultant";
|
|
140
|
+
External: "External";
|
|
141
|
+
Application: "Application";
|
|
142
|
+
Local: "Local";
|
|
143
|
+
}>>;
|
|
144
|
+
accountClassification: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
145
|
+
External: "External";
|
|
146
|
+
Unclassified: "Unclassified";
|
|
147
|
+
Internal: "Internal";
|
|
148
|
+
}>>>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
created: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
151
|
+
updated: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>;
|
|
294
152
|
sourceSystem: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
295
153
|
identifier: z.ZodString;
|
|
296
154
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
297
155
|
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
name?: string | null | undefined;
|
|
301
|
-
subSystem?: string | null | undefined;
|
|
302
|
-
}, {
|
|
303
|
-
identifier: string;
|
|
304
|
-
name?: string | null | undefined;
|
|
305
|
-
subSystem?: string | null | undefined;
|
|
306
|
-
}>>>;
|
|
307
|
-
}, "strip", z.ZodTypeAny, {
|
|
308
|
-
id: string;
|
|
309
|
-
name: string;
|
|
310
|
-
appKey: string;
|
|
311
|
-
createdBy: {
|
|
312
|
-
azureUniqueId: string;
|
|
313
|
-
name: string;
|
|
314
|
-
mail?: string | undefined;
|
|
315
|
-
phoneNumber?: string | undefined;
|
|
316
|
-
jobTitle?: string | undefined;
|
|
317
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
318
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
319
|
-
};
|
|
320
|
-
created: Date;
|
|
321
|
-
description?: string | undefined;
|
|
322
|
-
isShared?: boolean | undefined;
|
|
323
|
-
context?: {
|
|
324
|
-
id: string;
|
|
325
|
-
type?: string | null | undefined;
|
|
326
|
-
name?: string | null | undefined;
|
|
327
|
-
} | undefined;
|
|
328
|
-
updatedBy?: {
|
|
329
|
-
azureUniqueId: string;
|
|
330
|
-
name: string;
|
|
331
|
-
mail?: string | undefined;
|
|
332
|
-
phoneNumber?: string | undefined;
|
|
333
|
-
jobTitle?: string | undefined;
|
|
334
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
335
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
336
|
-
} | undefined;
|
|
337
|
-
updated?: Date | undefined;
|
|
338
|
-
sourceSystem?: {
|
|
339
|
-
identifier: string;
|
|
340
|
-
name?: string | null | undefined;
|
|
341
|
-
subSystem?: string | null | undefined;
|
|
342
|
-
} | null | undefined;
|
|
343
|
-
}, {
|
|
344
|
-
id: string;
|
|
345
|
-
name: string;
|
|
346
|
-
appKey: string;
|
|
347
|
-
createdBy: {
|
|
348
|
-
azureUniqueId: string;
|
|
349
|
-
name: string;
|
|
350
|
-
mail?: string | undefined;
|
|
351
|
-
phoneNumber?: string | undefined;
|
|
352
|
-
jobTitle?: string | undefined;
|
|
353
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
354
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
355
|
-
};
|
|
356
|
-
created: string;
|
|
357
|
-
description?: string | undefined;
|
|
358
|
-
isShared?: boolean | undefined;
|
|
359
|
-
context?: {
|
|
360
|
-
id: string;
|
|
361
|
-
type?: string | null | undefined;
|
|
362
|
-
name?: string | null | undefined;
|
|
363
|
-
} | undefined;
|
|
364
|
-
updatedBy?: {
|
|
365
|
-
azureUniqueId: string;
|
|
366
|
-
name: string;
|
|
367
|
-
mail?: string | undefined;
|
|
368
|
-
phoneNumber?: string | undefined;
|
|
369
|
-
jobTitle?: string | undefined;
|
|
370
|
-
accountType?: "Employee" | "Consultant" | "External" | "Application" | "Local" | undefined;
|
|
371
|
-
accountClassification?: "External" | "Unclassified" | "Internal" | null | undefined;
|
|
372
|
-
} | undefined;
|
|
373
|
-
updated?: string | undefined;
|
|
374
|
-
sourceSystem?: {
|
|
375
|
-
identifier: string;
|
|
376
|
-
name?: string | null | undefined;
|
|
377
|
-
subSystem?: string | null | undefined;
|
|
378
|
-
} | null | undefined;
|
|
379
|
-
}>;
|
|
156
|
+
}, z.core.$strip>>>;
|
|
157
|
+
}, z.core.$strip>;
|
|
380
158
|
};
|
|
381
159
|
export declare const ApiBookmarkPayload: {
|
|
382
|
-
readonly "1.0": z.
|
|
160
|
+
readonly "1.0": z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodString]>>>, z.ZodTransform<any, string | Record<string, unknown>>>;
|
|
383
161
|
};
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export declare const extractVersion: <TApiVersions extends Record<string, string
|
|
|
15
15
|
* @param schema - The Zod schema to use for parsing the response body.
|
|
16
16
|
* @returns A response selector function that parses the response body using the provided schema.
|
|
17
17
|
*/
|
|
18
|
-
export declare const schemaSelector: <Output
|
|
18
|
+
export declare const schemaSelector: <Output>(schema: z.ZodSchema<Output>) => ResponseSelector<Output>;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "7.0
|
|
1
|
+
export declare const version = "7.1.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-module-services",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
"dependencies": {
|
|
125
125
|
"odata-query": "^8.0.4",
|
|
126
|
-
"zod": "^
|
|
126
|
+
"zod": "^4.1.8"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
129
|
"@faker-js/faker": "^9.5.1",
|
|
@@ -131,8 +131,8 @@
|
|
|
131
131
|
"typescript": "^5.8.2",
|
|
132
132
|
"vitest": "^3.2.4",
|
|
133
133
|
"@equinor/fusion-framework-module": "^5.0.1",
|
|
134
|
-
"@equinor/fusion-framework-module-service-discovery": "^
|
|
135
|
-
"@equinor/fusion-framework-module-http": "^
|
|
134
|
+
"@equinor/fusion-framework-module-service-discovery": "^9.0.0",
|
|
135
|
+
"@equinor/fusion-framework-module-http": "^7.0.0"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {
|
|
138
138
|
"odata-query": "^8.0.4",
|
package/src/bookmarks/client.ts
CHANGED
|
@@ -179,7 +179,7 @@ export class BookmarksApiClient<
|
|
|
179
179
|
init?: ClientRequestInit<TClient, TResponse>,
|
|
180
180
|
): GetBookmarksResult<TVersion, TMethod, TResponse> {
|
|
181
181
|
const fn = getBookmarks(version, this._client, this._method);
|
|
182
|
-
return fn(args, init);
|
|
182
|
+
return fn(args as Parameters<typeof fn>[0], init);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
/**
|
|
@@ -27,7 +27,7 @@ const ArgSchema = {
|
|
|
27
27
|
[ApiVersion.v2]: z.object({
|
|
28
28
|
bookmarkId: z.string(),
|
|
29
29
|
}),
|
|
30
|
-
};
|
|
30
|
+
} as const;
|
|
31
31
|
|
|
32
32
|
/** Schema for the response from the API. */
|
|
33
33
|
const ApiResponseSchema = {
|
|
@@ -101,7 +101,7 @@ const executeApiCall = <TVersion extends AllowedVersions, TMethod extends keyof
|
|
|
101
101
|
input: MethodArg<MethodVersion>,
|
|
102
102
|
init?: ClientRequestInit<IHttpClient, TResponse>,
|
|
103
103
|
): TResult => {
|
|
104
|
-
const args = ArgSchema[apiVersion].parse(input)
|
|
104
|
+
const args = ArgSchema[apiVersion].parse(input) as z.infer<(typeof ArgSchema)[MethodVersion]>;
|
|
105
105
|
return client[method](
|
|
106
106
|
generateApiPath(apiVersion, args),
|
|
107
107
|
generateRequestParameters(apiVersion, args, init),
|
|
@@ -28,7 +28,7 @@ const ArgSchema = {
|
|
|
28
28
|
description: z.string().nullish(),
|
|
29
29
|
isShared: z.boolean().nullish(),
|
|
30
30
|
payload: z
|
|
31
|
-
.record(z.unknown())
|
|
31
|
+
.record(z.string(), z.unknown())
|
|
32
32
|
.or(z.string())
|
|
33
33
|
.nullish()
|
|
34
34
|
.transform((x) => (typeof x === 'object' ? JSON.stringify(x) : x)),
|
|
@@ -24,7 +24,7 @@ const ArgSchema = {
|
|
|
24
24
|
[ApiVersion.v1]: z.object({
|
|
25
25
|
name: z.string(),
|
|
26
26
|
appKey: z.string(),
|
|
27
|
-
payload: z.record(z.unknown()).or(z.string()).optional(),
|
|
27
|
+
payload: z.record(z.string(), z.unknown()).or(z.string()).optional(),
|
|
28
28
|
description: z.string().nullish(),
|
|
29
29
|
isShared: z.boolean().nullish(),
|
|
30
30
|
contextId: z.string().nullish(),
|
|
@@ -75,7 +75,7 @@ const ArgSchema = {
|
|
|
75
75
|
filter: z.string().or(filterSchema_v2).optional(),
|
|
76
76
|
})
|
|
77
77
|
.optional(),
|
|
78
|
-
};
|
|
78
|
+
} as const;
|
|
79
79
|
|
|
80
80
|
/** Schema for the response from the API. */
|
|
81
81
|
const ApiResponseSchema = {
|
|
@@ -131,8 +131,10 @@ const generateApiPath = <TVersion extends AvailableVersions>(
|
|
|
131
131
|
args?.filter && params.append('$filter', args.filter);
|
|
132
132
|
return `/persons/me/bookmarks/?${String(params)}`;
|
|
133
133
|
}
|
|
134
|
+
default: {
|
|
135
|
+
throw new Error(`Unknown API version: ${version}`);
|
|
136
|
+
}
|
|
134
137
|
}
|
|
135
|
-
throw Error(`Unknown API version: ${version}`);
|
|
136
138
|
};
|
|
137
139
|
|
|
138
140
|
/** executes the api call */
|
|
@@ -150,9 +152,9 @@ const executeApiCall = <TVersion extends AllowedVersions, TMethod extends keyof
|
|
|
150
152
|
input: MethodArg<MethodVersion>,
|
|
151
153
|
init?: ClientRequestInit<IHttpClient, TResponse>,
|
|
152
154
|
): TResult => {
|
|
153
|
-
const args = ArgSchema[apiVersion].parse(input)
|
|
154
|
-
const path = generateApiPath(apiVersion, args);
|
|
155
|
-
const params = generateRequestParameters(apiVersion, args, init);
|
|
155
|
+
const args = ArgSchema[apiVersion].parse(input) as z.infer<(typeof ArgSchema)[MethodVersion]>;
|
|
156
|
+
const path = generateApiPath(apiVersion as AvailableVersions, args);
|
|
157
|
+
const params = generateRequestParameters(apiVersion as AvailableVersions, args, init);
|
|
156
158
|
return client[method](path, params) as TResult;
|
|
157
159
|
};
|
|
158
160
|
};
|
package/src/bookmarks/schemas.ts
CHANGED
package/src/utils.ts
CHANGED
|
@@ -40,8 +40,6 @@ export const extractVersion = <
|
|
|
40
40
|
* @returns A response selector function that parses the response body using the provided schema.
|
|
41
41
|
*/
|
|
42
42
|
export const schemaSelector =
|
|
43
|
-
<Output
|
|
44
|
-
|
|
45
|
-
): ResponseSelector<Output> =>
|
|
46
|
-
async (response: FetchResponse<Input>) =>
|
|
43
|
+
<Output>(schema: z.ZodSchema<Output>): ResponseSelector<Output> =>
|
|
44
|
+
async (response: FetchResponse<unknown>) =>
|
|
47
45
|
schema.parse(await jsonSelector(response));
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '7.0
|
|
2
|
+
export const version = '7.1.0';
|