@webitel/api-services 26.12.4 → 26.12.6
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
CHANGED
|
@@ -19,7 +19,12 @@ import type {
|
|
|
19
19
|
NestedUpdateItemParams,
|
|
20
20
|
} from '../_shared/types';
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
// [Claude] expiryDays is a create-only query param, not a body field
|
|
23
|
+
const fieldsToSend = getShallowFieldsToSendFromZodSchema(
|
|
24
|
+
userTokenSchema.omit({
|
|
25
|
+
expiryDays: true,
|
|
26
|
+
}),
|
|
27
|
+
);
|
|
23
28
|
|
|
24
29
|
const getUserTokensList = async (params: ApiParams) => {
|
|
25
30
|
const { page, size, search, sort, fields, parentId } = applyTransform(
|
|
@@ -88,6 +93,9 @@ const addUserToken = async ({
|
|
|
88
93
|
const response = await getUserAccessTokens().addUserAccessToken(
|
|
89
94
|
String(parentId),
|
|
90
95
|
item,
|
|
96
|
+
{
|
|
97
|
+
expiry_days: itemInstance.expiryDays || undefined,
|
|
98
|
+
},
|
|
91
99
|
);
|
|
92
100
|
return applyTransform(response.data, [
|
|
93
101
|
snakeToCamel(),
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
import { flexibleLookupSchema } from '../_shared/lookup.validations';
|
|
4
|
+
|
|
3
5
|
export const userTokenSchema = z.object({
|
|
4
|
-
usage: z.string().default(''),
|
|
6
|
+
usage: z.string().min(1).default(''),
|
|
7
|
+
expiryDays: z.number().int().min(0).nullish(),
|
|
8
|
+
notifyUsers: z.array(flexibleLookupSchema).optional().default([]),
|
|
5
9
|
});
|