@lokalise/harmony 1.29.5-exp-teamSwitch.2 → 1.30.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/dist/harmony.cjs +21 -20
- package/dist/harmony.cjs.map +1 -1
- package/dist/harmony.mjs +25 -24
- package/dist/harmony100.cjs +6 -132
- package/dist/harmony100.cjs.map +1 -1
- package/dist/harmony100.mjs +5 -131
- package/dist/harmony100.mjs.map +1 -1
- package/dist/harmony101.cjs +132 -12
- package/dist/harmony101.cjs.map +1 -1
- package/dist/harmony101.mjs +131 -11
- package/dist/harmony101.mjs.map +1 -1
- package/dist/harmony102.cjs +13 -6
- package/dist/harmony102.cjs.map +1 -1
- package/dist/harmony102.mjs +12 -5
- package/dist/harmony102.mjs.map +1 -1
- package/dist/harmony103.cjs +5 -40
- package/dist/harmony103.cjs.map +1 -1
- package/dist/harmony103.mjs +5 -40
- package/dist/harmony103.mjs.map +1 -1
- package/dist/harmony104.cjs +33 -53
- package/dist/harmony104.cjs.map +1 -1
- package/dist/harmony104.mjs +34 -54
- package/dist/harmony104.mjs.map +1 -1
- package/dist/harmony105.cjs +59 -6
- package/dist/harmony105.cjs.map +1 -1
- package/dist/harmony105.mjs +59 -6
- package/dist/harmony105.mjs.map +1 -1
- package/dist/harmony106.cjs +7 -6
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +6 -5
- package/dist/harmony106.mjs.map +1 -1
- package/dist/harmony107.cjs +1 -1
- package/dist/harmony107.mjs +1 -1
- package/dist/harmony108.cjs +1 -1
- package/dist/harmony108.mjs +1 -1
- package/dist/harmony109.cjs +95 -61
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +95 -61
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +13 -88
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +13 -88
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +15 -19
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +14 -18
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +34 -94
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +34 -94
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +26 -11
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +26 -11
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +60 -12
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +60 -12
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +88 -36
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +88 -36
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +19 -29
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +18 -28
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +13 -7
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +13 -7
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +15 -57
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +15 -57
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +15 -59
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +15 -59
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony120.cjs +12 -19
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +11 -18
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony121.cjs +15 -12
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +15 -12
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony122.cjs +19 -13
- package/dist/harmony122.cjs.map +1 -1
- package/dist/harmony122.mjs +19 -13
- package/dist/harmony122.mjs.map +1 -1
- package/dist/harmony123.cjs +10 -14
- package/dist/harmony123.cjs.map +1 -1
- package/dist/harmony123.mjs +10 -14
- package/dist/harmony123.mjs.map +1 -1
- package/dist/harmony124.cjs +7 -11
- package/dist/harmony124.cjs.map +1 -1
- package/dist/harmony124.mjs +7 -11
- package/dist/harmony124.mjs.map +1 -1
- package/dist/harmony125.cjs +56 -15
- package/dist/harmony125.cjs.map +1 -1
- package/dist/harmony125.mjs +56 -15
- package/dist/harmony125.mjs.map +1 -1
- package/dist/harmony126.cjs +59 -20
- package/dist/harmony126.cjs.map +1 -1
- package/dist/harmony126.mjs +59 -20
- package/dist/harmony126.mjs.map +1 -1
- package/dist/harmony127.cjs +19 -13
- package/dist/harmony127.cjs.map +1 -1
- package/dist/harmony127.mjs +18 -12
- package/dist/harmony127.mjs.map +1 -1
- package/dist/harmony129.cjs +1 -1
- package/dist/harmony129.mjs +1 -1
- package/dist/harmony132.cjs +1 -1
- package/dist/harmony132.mjs +1 -1
- package/dist/harmony15.cjs +1 -1
- package/dist/harmony15.mjs +1 -1
- package/dist/harmony22.cjs +2 -2
- package/dist/harmony22.mjs +2 -2
- package/dist/harmony23.cjs +1 -1
- package/dist/harmony23.mjs +1 -1
- package/dist/harmony24.cjs +1 -1
- package/dist/harmony24.mjs +1 -1
- package/dist/harmony25.cjs +1 -1
- package/dist/harmony25.mjs +1 -1
- package/dist/harmony30.cjs +11 -1
- package/dist/harmony30.cjs.map +1 -1
- package/dist/harmony30.mjs +13 -3
- package/dist/harmony30.mjs.map +1 -1
- package/dist/harmony31.cjs +0 -9
- package/dist/harmony31.cjs.map +1 -1
- package/dist/harmony31.mjs +3 -12
- package/dist/harmony31.mjs.map +1 -1
- package/dist/harmony36.cjs +6 -5
- package/dist/harmony36.cjs.map +1 -1
- package/dist/harmony36.mjs +6 -5
- package/dist/harmony36.mjs.map +1 -1
- package/dist/harmony37.cjs +6 -14
- package/dist/harmony37.cjs.map +1 -1
- package/dist/harmony37.mjs +7 -15
- package/dist/harmony37.mjs.map +1 -1
- package/dist/harmony38.cjs +15 -7
- package/dist/harmony38.cjs.map +1 -1
- package/dist/harmony38.mjs +15 -7
- package/dist/harmony38.mjs.map +1 -1
- package/dist/harmony39.cjs +7 -11
- package/dist/harmony39.cjs.map +1 -1
- package/dist/harmony39.mjs +9 -13
- package/dist/harmony39.mjs.map +1 -1
- package/dist/harmony40.cjs +8 -8
- package/dist/harmony40.cjs.map +1 -1
- package/dist/harmony40.mjs +8 -8
- package/dist/harmony40.mjs.map +1 -1
- package/dist/harmony41.cjs +14 -12
- package/dist/harmony41.cjs.map +1 -1
- package/dist/harmony41.mjs +14 -12
- package/dist/harmony41.mjs.map +1 -1
- package/dist/harmony42.cjs +8 -8
- package/dist/harmony42.cjs.map +1 -1
- package/dist/harmony42.mjs +9 -9
- package/dist/harmony42.mjs.map +1 -1
- package/dist/harmony43.cjs +9 -9
- package/dist/harmony43.cjs.map +1 -1
- package/dist/harmony43.mjs +10 -10
- package/dist/harmony43.mjs.map +1 -1
- package/dist/harmony44.cjs +12 -14
- package/dist/harmony44.cjs.map +1 -1
- package/dist/harmony44.mjs +12 -14
- package/dist/harmony44.mjs.map +1 -1
- package/dist/harmony45.cjs +10 -10
- package/dist/harmony45.cjs.map +1 -1
- package/dist/harmony45.mjs +10 -10
- package/dist/harmony45.mjs.map +1 -1
- package/dist/harmony46.cjs +8 -8
- package/dist/harmony46.cjs.map +1 -1
- package/dist/harmony46.mjs +8 -8
- package/dist/harmony46.mjs.map +1 -1
- package/dist/harmony47.cjs +7 -7
- package/dist/harmony47.cjs.map +1 -1
- package/dist/harmony47.mjs +7 -7
- package/dist/harmony47.mjs.map +1 -1
- package/dist/harmony48.cjs +14 -12
- package/dist/harmony48.cjs.map +1 -1
- package/dist/harmony48.mjs +14 -12
- package/dist/harmony48.mjs.map +1 -1
- package/dist/harmony49.cjs +12 -14
- package/dist/harmony49.cjs.map +1 -1
- package/dist/harmony49.mjs +12 -14
- package/dist/harmony49.mjs.map +1 -1
- package/dist/harmony50.cjs +8 -8
- package/dist/harmony50.cjs.map +1 -1
- package/dist/harmony50.mjs +8 -8
- package/dist/harmony50.mjs.map +1 -1
- package/dist/harmony51.cjs +9 -5
- package/dist/harmony51.cjs.map +1 -1
- package/dist/harmony51.mjs +12 -8
- package/dist/harmony51.mjs.map +1 -1
- package/dist/harmony59.cjs +22 -4
- package/dist/harmony59.cjs.map +1 -1
- package/dist/harmony59.mjs +22 -4
- package/dist/harmony59.mjs.map +1 -1
- package/dist/harmony62.cjs +1 -7
- package/dist/harmony62.cjs.map +1 -1
- package/dist/harmony62.mjs +1 -7
- package/dist/harmony62.mjs.map +1 -1
- package/dist/harmony67.cjs +1 -1
- package/dist/harmony67.mjs +1 -1
- package/dist/harmony69.cjs +1 -1
- package/dist/harmony69.mjs +1 -1
- package/dist/harmony70.cjs +1 -1
- package/dist/harmony70.mjs +1 -1
- package/dist/harmony71.cjs +1 -1
- package/dist/harmony71.mjs +1 -1
- package/dist/harmony72.cjs +2 -2
- package/dist/harmony72.mjs +2 -2
- package/dist/harmony73.cjs +2 -2
- package/dist/harmony73.mjs +2 -2
- package/dist/harmony74.cjs +2 -2
- package/dist/harmony74.mjs +2 -2
- package/dist/harmony75.cjs +2 -2
- package/dist/harmony75.mjs +2 -2
- package/dist/harmony76.cjs +3 -3
- package/dist/harmony76.mjs +3 -3
- package/dist/harmony77.cjs +6 -6
- package/dist/harmony77.mjs +6 -6
- package/dist/harmony80.cjs +2 -2
- package/dist/harmony80.mjs +2 -2
- package/dist/harmony82.cjs +7 -12
- package/dist/harmony82.cjs.map +1 -1
- package/dist/harmony82.mjs +6 -11
- package/dist/harmony82.mjs.map +1 -1
- package/dist/harmony83.cjs +8 -20
- package/dist/harmony83.cjs.map +1 -1
- package/dist/harmony83.mjs +8 -20
- package/dist/harmony83.mjs.map +1 -1
- package/dist/harmony84.cjs +6 -3
- package/dist/harmony84.cjs.map +1 -1
- package/dist/harmony84.mjs +6 -3
- package/dist/harmony84.mjs.map +1 -1
- package/dist/harmony85.cjs +57 -9
- package/dist/harmony85.cjs.map +1 -1
- package/dist/harmony85.mjs +56 -8
- package/dist/harmony85.mjs.map +1 -1
- package/dist/harmony86.cjs +42 -9
- package/dist/harmony86.cjs.map +1 -1
- package/dist/harmony86.mjs +41 -8
- package/dist/harmony86.mjs.map +1 -1
- package/dist/harmony87.cjs +5 -57
- package/dist/harmony87.cjs.map +1 -1
- package/dist/harmony87.mjs +5 -57
- package/dist/harmony87.mjs.map +1 -1
- package/dist/harmony88.cjs +9 -42
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +8 -41
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony89.cjs +25 -6
- package/dist/harmony89.cjs.map +1 -1
- package/dist/harmony89.mjs +24 -5
- package/dist/harmony89.mjs.map +1 -1
- package/dist/harmony90.cjs +3 -6
- package/dist/harmony90.cjs.map +1 -1
- package/dist/harmony90.mjs +3 -6
- package/dist/harmony90.mjs.map +1 -1
- package/dist/harmony91.cjs +21 -24
- package/dist/harmony91.cjs.map +1 -1
- package/dist/harmony91.mjs +20 -23
- package/dist/harmony91.mjs.map +1 -1
- package/dist/harmony92.cjs +9 -3
- package/dist/harmony92.cjs.map +1 -1
- package/dist/harmony92.mjs +9 -3
- package/dist/harmony92.mjs.map +1 -1
- package/dist/harmony93.cjs +9 -19
- package/dist/harmony93.cjs.map +1 -1
- package/dist/harmony93.mjs +11 -21
- package/dist/harmony93.mjs.map +1 -1
- package/dist/harmony94.cjs +20 -11
- package/dist/harmony94.cjs.map +1 -1
- package/dist/harmony94.mjs +20 -11
- package/dist/harmony94.mjs.map +1 -1
- package/dist/harmony95.cjs +99 -18
- package/dist/harmony95.cjs.map +1 -1
- package/dist/harmony95.mjs +82 -18
- package/dist/harmony95.mjs.map +1 -1
- package/dist/harmony96.cjs +18 -14
- package/dist/harmony96.cjs.map +1 -1
- package/dist/harmony96.mjs +18 -14
- package/dist/harmony96.mjs.map +1 -1
- package/dist/harmony97.cjs +11 -96
- package/dist/harmony97.cjs.map +1 -1
- package/dist/harmony97.mjs +11 -79
- package/dist/harmony97.mjs.map +1 -1
- package/dist/types/src/features/publicApi/hooks/useCreateScoreMutation.d.ts +29 -0
- package/dist/types/src/features/publicApi/node.d.ts +1 -1
- package/dist/types/src/features/publicApi/score.d.ts +115 -0
- package/dist/types/src/features/publicApi/team.d.ts +0 -61
- package/dist/types/src/features/publicApi/types/scoreTypes.d.ts +73 -11
- package/dist/types/src/features/publicApi/types/teamTypes.d.ts +0 -10
- package/dist/types/tests/utils/apiHelpers.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/src/features/publicApi/hooks/useSwitchTeamMutation.d.ts +0 -15
- package/dist/types/src/features/publicApi/hooks/useSwitchTeamMutation.test.d.ts +0 -1
package/dist/harmony97.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony97.cjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony97.cjs","sources":["../src/features/auth/frontend/events/NewJwtIssuedEvent.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype NewJwtIssuedEventDetail = {\n\ttoken: JwtToken\n\tpayload: JwtTokenPayload | undefined\n}\n\n/**\n * This event is emitted when a new JWT token is issued or refreshed.\n */\nexport class NewJwtIssuedEvent extends CustomEvent<NewJwtIssuedEventDetail> {\n\tstatic readonly eventName = 'new-jwt-issued' as const\n\n\tconstructor(token: JwtToken) {\n\t\tsuper(NewJwtIssuedEvent.eventName, {\n\t\t\tdetail: { token, payload: parseJwtTokenPayload(token.accessToken) },\n\t\t})\n\t}\n}\n\nexport const isNewJwtIssuedEvent = (event: Event): event is NewJwtIssuedEvent =>\n\tevent.type === NewJwtIssuedEvent.eventName\n\ndeclare global {\n\tinterface WindowEventMap {\n\t\t[NewJwtIssuedEvent.eventName]: NewJwtIssuedEvent\n\t}\n}\n"],"names":["parseJwtTokenPayload"],"mappings":";;;;;;AAYO,MAAM,qBAAN,MAAM,2BAA0B,YAAqC;AAAA,EAG3E,YAAY,OAAiB;AAC5B,UAAM,mBAAkB,WAAW;AAAA,MAClC,QAAQ,EAAE,OAAO,SAASA,gBAAAA,qBAAqB,MAAM,WAAW,EAAE;AAAA,IAAA,CAClE;AAAA,EAAA;AAEH;AAPC,cADY,oBACI,aAAY;AADtB,IAAM,oBAAN;;"}
|
package/dist/harmony97.mjs
CHANGED
@@ -1,85 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
return throttle(resizeCallback, refreshRate, refreshOptions);
|
10
|
-
default:
|
11
|
-
return resizeCallback;
|
12
|
-
}
|
13
|
-
};
|
14
|
-
const useCallbackRef = (
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
16
|
-
(callback) => {
|
17
|
-
const callbackRef = React.useRef(callback);
|
18
|
-
React.useEffect(() => {
|
19
|
-
callbackRef.current = callback;
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
4
|
+
import { parseJwtTokenPayload } from "./harmony15.mjs";
|
5
|
+
const _NewJwtIssuedEvent = class _NewJwtIssuedEvent extends CustomEvent {
|
6
|
+
constructor(token) {
|
7
|
+
super(_NewJwtIssuedEvent.eventName, {
|
8
|
+
detail: { token, payload: parseJwtTokenPayload(token.accessToken) }
|
20
9
|
});
|
21
|
-
return React.useMemo(() => (...args) => {
|
22
|
-
var _a;
|
23
|
-
return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
|
24
|
-
}, []);
|
25
|
-
}
|
26
|
-
);
|
27
|
-
const useRefProxy = (
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
29
|
-
(targetRef) => {
|
30
|
-
const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
|
31
|
-
if (targetRef) {
|
32
|
-
setTimeout(() => {
|
33
|
-
if (targetRef.current !== refElement) {
|
34
|
-
setRefElement(targetRef.current);
|
35
|
-
}
|
36
|
-
}, 0);
|
37
|
-
}
|
38
|
-
const refProxy = React.useMemo(() => new Proxy((node) => {
|
39
|
-
if (node !== refElement) {
|
40
|
-
setRefElement(node);
|
41
|
-
}
|
42
|
-
}, {
|
43
|
-
get(target, prop) {
|
44
|
-
if (prop === "current") {
|
45
|
-
return refElement;
|
46
|
-
}
|
47
|
-
return target[prop];
|
48
|
-
},
|
49
|
-
set(target, prop, value) {
|
50
|
-
if (prop === "current") {
|
51
|
-
setRefElement(value);
|
52
|
-
} else {
|
53
|
-
target[prop] = value;
|
54
|
-
}
|
55
|
-
return true;
|
56
|
-
}
|
57
|
-
}), [refElement]);
|
58
|
-
return { refProxy, refElement, setRefElement };
|
59
|
-
}
|
60
|
-
);
|
61
|
-
const getDimensions = (entry, box) => {
|
62
|
-
if (box === "border-box") {
|
63
|
-
return {
|
64
|
-
width: entry.borderBoxSize[0].inlineSize,
|
65
|
-
height: entry.borderBoxSize[0].blockSize
|
66
|
-
};
|
67
|
-
}
|
68
|
-
if (box === "content-box") {
|
69
|
-
return {
|
70
|
-
width: entry.contentBoxSize[0].inlineSize,
|
71
|
-
height: entry.contentBoxSize[0].blockSize
|
72
|
-
};
|
73
10
|
}
|
74
|
-
return {
|
75
|
-
width: entry.contentRect.width,
|
76
|
-
height: entry.contentRect.height
|
77
|
-
};
|
78
11
|
};
|
12
|
+
__publicField(_NewJwtIssuedEvent, "eventName", "new-jwt-issued");
|
13
|
+
let NewJwtIssuedEvent = _NewJwtIssuedEvent;
|
79
14
|
export {
|
80
|
-
|
81
|
-
patchResizeCallback,
|
82
|
-
useCallbackRef,
|
83
|
-
useRefProxy
|
15
|
+
NewJwtIssuedEvent
|
84
16
|
};
|
85
17
|
//# sourceMappingURL=harmony97.mjs.map
|
package/dist/harmony97.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony97.mjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony97.mjs","sources":["../src/features/auth/frontend/events/NewJwtIssuedEvent.ts"],"sourcesContent":["import type { JwtTokenPayload } from '@features/auth/core/types/jwtTokenPayload'\nimport { parseJwtTokenPayload } from '@features/auth/core/utils/jwtTokenPayload'\nimport type { JwtToken } from '@features/publicApi/types/userTokenTypes'\n\ntype NewJwtIssuedEventDetail = {\n\ttoken: JwtToken\n\tpayload: JwtTokenPayload | undefined\n}\n\n/**\n * This event is emitted when a new JWT token is issued or refreshed.\n */\nexport class NewJwtIssuedEvent extends CustomEvent<NewJwtIssuedEventDetail> {\n\tstatic readonly eventName = 'new-jwt-issued' as const\n\n\tconstructor(token: JwtToken) {\n\t\tsuper(NewJwtIssuedEvent.eventName, {\n\t\t\tdetail: { token, payload: parseJwtTokenPayload(token.accessToken) },\n\t\t})\n\t}\n}\n\nexport const isNewJwtIssuedEvent = (event: Event): event is NewJwtIssuedEvent =>\n\tevent.type === NewJwtIssuedEvent.eventName\n\ndeclare global {\n\tinterface WindowEventMap {\n\t\t[NewJwtIssuedEvent.eventName]: NewJwtIssuedEvent\n\t}\n}\n"],"names":[],"mappings":";;;;AAYO,MAAM,qBAAN,MAAM,2BAA0B,YAAqC;AAAA,EAG3E,YAAY,OAAiB;AAC5B,UAAM,mBAAkB,WAAW;AAAA,MAClC,QAAQ,EAAE,OAAO,SAAS,qBAAqB,MAAM,WAAW,EAAE;AAAA,IAAA,CAClE;AAAA,EAAA;AAEH;AAPC,cADY,oBACI,aAAY;AADtB,IAAM,oBAAN;"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
|
2
|
+
import { ApiMutationOverrides } from '../../../utils/types/apiMutationOverrides';
|
3
|
+
import { Wretch } from 'wretch';
|
4
|
+
import { CreateScorePathParams, CreateScoreRequestBody, CreateScoreResponseBody } from '../types/scoreTypes';
|
5
|
+
import { BaseApiEndpointHeader } from '../types/sharedTypes';
|
6
|
+
/**
|
7
|
+
* A react-router wrapper about the createProject public API endpoint
|
8
|
+
*
|
9
|
+
* @param wretchClient - Wretch instance configured to a public API instance.
|
10
|
+
* @param headers - A header builder instance to resolve the headers for the request.
|
11
|
+
* @param overrides - Additional options to pass to the query.
|
12
|
+
*/
|
13
|
+
export declare function useCreateScoreMutation<T>(wretchClient: Wretch<T>, headers: HeaderBuilder<BaseApiEndpointHeader>, overrides?: ApiMutationOverrides<CreateScoreResponseBody, CreateScoreRequestBody & CreateScorePathParams>): import('@tanstack/react-query').UseMutationResult<{
|
14
|
+
issues: {
|
15
|
+
category: string;
|
16
|
+
comment: string;
|
17
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
18
|
+
}[];
|
19
|
+
score: number;
|
20
|
+
hasMajorIssue: boolean;
|
21
|
+
hasCriticalIssue: boolean;
|
22
|
+
}, undefined, {
|
23
|
+
segmentId: number;
|
24
|
+
sourceLanguageId: number;
|
25
|
+
} & {
|
26
|
+
projectId: string;
|
27
|
+
keyId: number;
|
28
|
+
languageId: string;
|
29
|
+
}, undefined>;
|
@@ -8,6 +8,7 @@ export * from './teamUsers';
|
|
8
8
|
export * from './userToken';
|
9
9
|
export * from './hooks/useAddLanguagesToProjectMutation';
|
10
10
|
export * from './hooks/useBulkUpdateProjectLanguagesMutation';
|
11
|
+
export * from './hooks/useCreateScoreMutation';
|
11
12
|
export * from './hooks/useCreateProjectMutation';
|
12
13
|
export * from './hooks/useDeleteScoreMutation';
|
13
14
|
export * from './hooks/useDeleteProjectMutation';
|
@@ -23,7 +24,6 @@ export * from './hooks/useListTeamsQuery';
|
|
23
24
|
export * from './hooks/useRetrieveContributorQuery';
|
24
25
|
export * from './hooks/useRetrieveProjectQuery';
|
25
26
|
export * from './hooks/useRetrieveTeamQuery';
|
26
|
-
export * from './hooks/useSwitchTeamMutation';
|
27
27
|
export * from './hooks/useUpdateProjectMutation';
|
28
28
|
export * from './types/contributorTypes';
|
29
29
|
export * from './types/languageTypes';
|
@@ -171,3 +171,118 @@ export declare const deleteScore: import('@lokalise/api-contracts').DeleteRouteD
|
|
171
171
|
}, {
|
172
172
|
'X-LOKALISE-PLUGIN': string;
|
173
173
|
}>]>>, false, true>;
|
174
|
+
export declare const createScore: import('@lokalise/api-contracts').PayloadRouteDefinition<{
|
175
|
+
projectId: string;
|
176
|
+
keyId: number;
|
177
|
+
languageId: string;
|
178
|
+
}, import('zod').ZodObject<{
|
179
|
+
segmentId: import('zod').ZodNumber;
|
180
|
+
sourceLanguageId: import('zod').ZodNumber;
|
181
|
+
}, "strip", import('zod').ZodTypeAny, {
|
182
|
+
segmentId: number;
|
183
|
+
sourceLanguageId: number;
|
184
|
+
}, {
|
185
|
+
segmentId: number;
|
186
|
+
sourceLanguageId: number;
|
187
|
+
}>, import('zod').ZodObject<{
|
188
|
+
score: import('zod').ZodNumber;
|
189
|
+
hasCriticalIssue: import('zod').ZodBoolean;
|
190
|
+
hasMajorIssue: import('zod').ZodBoolean;
|
191
|
+
issues: import('zod').ZodArray<import('zod').ZodObject<{
|
192
|
+
category: import('zod').ZodString;
|
193
|
+
comment: import('zod').ZodString;
|
194
|
+
severity: import('zod').ZodEnum<["critical", "major", "minor", "neutral"]>;
|
195
|
+
}, "strip", import('zod').ZodTypeAny, {
|
196
|
+
category: string;
|
197
|
+
comment: string;
|
198
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
199
|
+
}, {
|
200
|
+
category: string;
|
201
|
+
comment: string;
|
202
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
203
|
+
}>, "many">;
|
204
|
+
}, "strip", import('zod').ZodTypeAny, {
|
205
|
+
issues: {
|
206
|
+
category: string;
|
207
|
+
comment: string;
|
208
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
209
|
+
}[];
|
210
|
+
score: number;
|
211
|
+
hasMajorIssue: boolean;
|
212
|
+
hasCriticalIssue: boolean;
|
213
|
+
}, {
|
214
|
+
issues: {
|
215
|
+
category: string;
|
216
|
+
comment: string;
|
217
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
218
|
+
}[];
|
219
|
+
score: number;
|
220
|
+
hasMajorIssue: boolean;
|
221
|
+
hasCriticalIssue: boolean;
|
222
|
+
}>, import('zod').ZodObject<{
|
223
|
+
projectId: import('zod').ZodString;
|
224
|
+
keyId: import('zod').ZodNumber;
|
225
|
+
languageId: import('zod').ZodString;
|
226
|
+
}, "strip", import('zod').ZodTypeAny, {
|
227
|
+
projectId: string;
|
228
|
+
keyId: number;
|
229
|
+
languageId: string;
|
230
|
+
}, {
|
231
|
+
projectId: string;
|
232
|
+
keyId: number;
|
233
|
+
languageId: string;
|
234
|
+
}>, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
|
235
|
+
authorization: import('zod').ZodString;
|
236
|
+
}, "strip", import('zod').ZodTypeAny, {
|
237
|
+
authorization: string;
|
238
|
+
}, {
|
239
|
+
authorization: string;
|
240
|
+
}>, import('zod').ZodObject<{
|
241
|
+
AUTHORIZATION: import('zod').ZodString;
|
242
|
+
}, "strip", import('zod').ZodTypeAny, {
|
243
|
+
AUTHORIZATION: string;
|
244
|
+
}, {
|
245
|
+
AUTHORIZATION: string;
|
246
|
+
}>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
247
|
+
'X-API-Token': import('zod').ZodString;
|
248
|
+
}, "strip", import('zod').ZodTypeAny, {
|
249
|
+
'X-API-Token': string;
|
250
|
+
}, {
|
251
|
+
'X-API-Token': string;
|
252
|
+
}>, import('zod').ZodObject<{
|
253
|
+
'X-Api-Token': import('zod').ZodString;
|
254
|
+
}, "strip", import('zod').ZodTypeAny, {
|
255
|
+
'X-Api-Token': string;
|
256
|
+
}, {
|
257
|
+
'X-Api-Token': string;
|
258
|
+
}>, import('zod').ZodObject<{
|
259
|
+
'x-api-token': import('zod').ZodString;
|
260
|
+
}, "strip", import('zod').ZodTypeAny, {
|
261
|
+
'x-api-token': string;
|
262
|
+
}, {
|
263
|
+
'x-api-token': string;
|
264
|
+
}>, import('zod').ZodObject<{
|
265
|
+
'X-API-TOKEN': import('zod').ZodString;
|
266
|
+
}, "strip", import('zod').ZodTypeAny, {
|
267
|
+
'X-API-TOKEN': string;
|
268
|
+
}, {
|
269
|
+
'X-API-TOKEN': string;
|
270
|
+
}>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
271
|
+
'X-Lokalise-Plugin': import('zod').ZodString;
|
272
|
+
}, "strip", import('zod').ZodTypeAny, {
|
273
|
+
'X-Lokalise-Plugin': string;
|
274
|
+
}, {
|
275
|
+
'X-Lokalise-Plugin': string;
|
276
|
+
}>, import('zod').ZodObject<{
|
277
|
+
'x-lokalise-plugin': import('zod').ZodString;
|
278
|
+
}, "strip", import('zod').ZodTypeAny, {
|
279
|
+
'x-lokalise-plugin': string;
|
280
|
+
}, {
|
281
|
+
'x-lokalise-plugin': string;
|
282
|
+
}>, import('zod').ZodObject<{
|
283
|
+
'X-LOKALISE-PLUGIN': import('zod').ZodString;
|
284
|
+
}, "strip", import('zod').ZodTypeAny, {
|
285
|
+
'X-LOKALISE-PLUGIN': string;
|
286
|
+
}, {
|
287
|
+
'X-LOKALISE-PLUGIN': string;
|
288
|
+
}>]>>, false, false>;
|
@@ -374,64 +374,3 @@ export declare const retrieveTeam: import('@lokalise/api-contracts').GetRouteDef
|
|
374
374
|
}, {
|
375
375
|
'X-LOKALISE-PLUGIN': string;
|
376
376
|
}>]>>, false, false>;
|
377
|
-
export declare const switchTeam: import('@lokalise/api-contracts').PayloadRouteDefinition<never, import('zod').ZodObject<{
|
378
|
-
id: import('zod').ZodNumber;
|
379
|
-
}, "strip", import('zod').ZodTypeAny, {
|
380
|
-
id: number;
|
381
|
-
}, {
|
382
|
-
id: number;
|
383
|
-
}>, import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodVoid>>, undefined, undefined, import('zod').ZodIntersection<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<{
|
384
|
-
authorization: import('zod').ZodString;
|
385
|
-
}, "strip", import('zod').ZodTypeAny, {
|
386
|
-
authorization: string;
|
387
|
-
}, {
|
388
|
-
authorization: string;
|
389
|
-
}>, import('zod').ZodObject<{
|
390
|
-
AUTHORIZATION: import('zod').ZodString;
|
391
|
-
}, "strip", import('zod').ZodTypeAny, {
|
392
|
-
AUTHORIZATION: string;
|
393
|
-
}, {
|
394
|
-
AUTHORIZATION: string;
|
395
|
-
}>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
396
|
-
'X-API-Token': import('zod').ZodString;
|
397
|
-
}, "strip", import('zod').ZodTypeAny, {
|
398
|
-
'X-API-Token': string;
|
399
|
-
}, {
|
400
|
-
'X-API-Token': string;
|
401
|
-
}>, import('zod').ZodObject<{
|
402
|
-
'X-Api-Token': import('zod').ZodString;
|
403
|
-
}, "strip", import('zod').ZodTypeAny, {
|
404
|
-
'X-Api-Token': string;
|
405
|
-
}, {
|
406
|
-
'X-Api-Token': string;
|
407
|
-
}>, import('zod').ZodObject<{
|
408
|
-
'x-api-token': import('zod').ZodString;
|
409
|
-
}, "strip", import('zod').ZodTypeAny, {
|
410
|
-
'x-api-token': string;
|
411
|
-
}, {
|
412
|
-
'x-api-token': string;
|
413
|
-
}>, import('zod').ZodObject<{
|
414
|
-
'X-API-TOKEN': import('zod').ZodString;
|
415
|
-
}, "strip", import('zod').ZodTypeAny, {
|
416
|
-
'X-API-TOKEN': string;
|
417
|
-
}, {
|
418
|
-
'X-API-TOKEN': string;
|
419
|
-
}>]>]>, import('zod').ZodUnion<[import('zod').ZodObject<{
|
420
|
-
'X-Lokalise-Plugin': import('zod').ZodString;
|
421
|
-
}, "strip", import('zod').ZodTypeAny, {
|
422
|
-
'X-Lokalise-Plugin': string;
|
423
|
-
}, {
|
424
|
-
'X-Lokalise-Plugin': string;
|
425
|
-
}>, import('zod').ZodObject<{
|
426
|
-
'x-lokalise-plugin': import('zod').ZodString;
|
427
|
-
}, "strip", import('zod').ZodTypeAny, {
|
428
|
-
'x-lokalise-plugin': string;
|
429
|
-
}, {
|
430
|
-
'x-lokalise-plugin': string;
|
431
|
-
}>, import('zod').ZodObject<{
|
432
|
-
'X-LOKALISE-PLUGIN': import('zod').ZodString;
|
433
|
-
}, "strip", import('zod').ZodTypeAny, {
|
434
|
-
'X-LOKALISE-PLUGIN': string;
|
435
|
-
}, {
|
436
|
-
'X-LOKALISE-PLUGIN': string;
|
437
|
-
}>]>>, false, false>;
|
@@ -1,15 +1,4 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export declare const GET_SCORE_REQUEST_QUERY_SCHEMA: z.ZodObject<{
|
3
|
-
projectId: z.ZodString;
|
4
|
-
translationId: z.ZodNumber;
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
6
|
-
projectId: string;
|
7
|
-
translationId: number;
|
8
|
-
}, {
|
9
|
-
projectId: string;
|
10
|
-
translationId: number;
|
11
|
-
}>;
|
12
|
-
export type GetScoreRequestQuery = z.infer<typeof GET_SCORE_REQUEST_QUERY_SCHEMA>;
|
13
2
|
export declare const SEVERITY_ENUM: z.ZodEnum<["critical", "major", "minor", "neutral"]>;
|
14
3
|
export type Severity = z.infer<typeof SEVERITY_ENUM>;
|
15
4
|
export declare const ISSUE_SCHEMA: z.ZodObject<{
|
@@ -26,6 +15,17 @@ export declare const ISSUE_SCHEMA: z.ZodObject<{
|
|
26
15
|
severity: "critical" | "major" | "minor" | "neutral";
|
27
16
|
}>;
|
28
17
|
export type Issue = z.infer<typeof ISSUE_SCHEMA>;
|
18
|
+
export declare const GET_SCORE_REQUEST_QUERY_SCHEMA: z.ZodObject<{
|
19
|
+
projectId: z.ZodString;
|
20
|
+
translationId: z.ZodNumber;
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
22
|
+
projectId: string;
|
23
|
+
translationId: number;
|
24
|
+
}, {
|
25
|
+
projectId: string;
|
26
|
+
translationId: number;
|
27
|
+
}>;
|
28
|
+
export type GetScoreRequestQuery = z.infer<typeof GET_SCORE_REQUEST_QUERY_SCHEMA>;
|
29
29
|
export declare const GET_SCORE_RESPONSE_SCHEMA: z.ZodObject<{
|
30
30
|
score: z.ZodNumber;
|
31
31
|
hasMajorIssue: z.ZodBoolean;
|
@@ -79,3 +79,65 @@ export declare const DELETE_SCORE_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
79
79
|
export type DeleteScorePathParms = z.infer<typeof DELETE_SCORE_PATH_PARAMS_SCHEMA>;
|
80
80
|
export declare const DELETE_SCORE_RESPONSE_SCHEMA: z.ZodNull;
|
81
81
|
export type DeleteScoreResponseBody = z.infer<typeof DELETE_SCORE_RESPONSE_SCHEMA>;
|
82
|
+
export declare const CREATE_SCORE_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
83
|
+
projectId: z.ZodString;
|
84
|
+
keyId: z.ZodNumber;
|
85
|
+
languageId: z.ZodString;
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
87
|
+
projectId: string;
|
88
|
+
keyId: number;
|
89
|
+
languageId: string;
|
90
|
+
}, {
|
91
|
+
projectId: string;
|
92
|
+
keyId: number;
|
93
|
+
languageId: string;
|
94
|
+
}>;
|
95
|
+
export type CreateScorePathParams = z.infer<typeof CREATE_SCORE_PATH_PARAMS_SCHEMA>;
|
96
|
+
export declare const CREATE_SCORE_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
97
|
+
segmentId: z.ZodNumber;
|
98
|
+
sourceLanguageId: z.ZodNumber;
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
100
|
+
segmentId: number;
|
101
|
+
sourceLanguageId: number;
|
102
|
+
}, {
|
103
|
+
segmentId: number;
|
104
|
+
sourceLanguageId: number;
|
105
|
+
}>;
|
106
|
+
export type CreateScoreRequestBody = z.infer<typeof CREATE_SCORE_REQUEST_BODY_SCHEMA>;
|
107
|
+
export declare const CREATE_SCORE_RESPONSE_SCHEMA: z.ZodObject<{
|
108
|
+
score: z.ZodNumber;
|
109
|
+
hasCriticalIssue: z.ZodBoolean;
|
110
|
+
hasMajorIssue: z.ZodBoolean;
|
111
|
+
issues: z.ZodArray<z.ZodObject<{
|
112
|
+
category: z.ZodString;
|
113
|
+
comment: z.ZodString;
|
114
|
+
severity: z.ZodEnum<["critical", "major", "minor", "neutral"]>;
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
116
|
+
category: string;
|
117
|
+
comment: string;
|
118
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
119
|
+
}, {
|
120
|
+
category: string;
|
121
|
+
comment: string;
|
122
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
123
|
+
}>, "many">;
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
125
|
+
issues: {
|
126
|
+
category: string;
|
127
|
+
comment: string;
|
128
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
129
|
+
}[];
|
130
|
+
score: number;
|
131
|
+
hasMajorIssue: boolean;
|
132
|
+
hasCriticalIssue: boolean;
|
133
|
+
}, {
|
134
|
+
issues: {
|
135
|
+
category: string;
|
136
|
+
comment: string;
|
137
|
+
severity: "critical" | "major" | "minor" | "neutral";
|
138
|
+
}[];
|
139
|
+
score: number;
|
140
|
+
hasMajorIssue: boolean;
|
141
|
+
hasCriticalIssue: boolean;
|
142
|
+
}>;
|
143
|
+
export type CreateScoreResponseBody = z.infer<typeof CREATE_SCORE_RESPONSE_SCHEMA>;
|
@@ -412,13 +412,3 @@ export declare const RETRIEVE_TEAM_RESPONSE_SCHEMA: z.ZodObject<{
|
|
412
412
|
};
|
413
413
|
}>;
|
414
414
|
export type RetrieveTeamResponse = z.infer<typeof RETRIEVE_TEAM_RESPONSE_SCHEMA>;
|
415
|
-
export declare const SWITCH_TEAM_REQUEST_BODY_SCHEMA: z.ZodObject<{
|
416
|
-
id: z.ZodNumber;
|
417
|
-
}, "strip", z.ZodTypeAny, {
|
418
|
-
id: number;
|
419
|
-
}, {
|
420
|
-
id: number;
|
421
|
-
}>;
|
422
|
-
export type SwitchTeamRequestBody = z.infer<typeof SWITCH_TEAM_REQUEST_BODY_SCHEMA>;
|
423
|
-
export declare const SWITCH_TEAM_RESPONSE_SCHEMA: z.ZodOptional<z.ZodNullable<z.ZodVoid>>;
|
424
|
-
export type SwitchTeamResponse = z.infer<typeof SWITCH_TEAM_RESPONSE_SCHEMA>;
|
@@ -11,7 +11,6 @@ export declare const apiHeaderBuilder: HeaderBuilder<{
|
|
11
11
|
authorization: `Bearer ${string}`;
|
12
12
|
}>;
|
13
13
|
export declare const mockGetResponse: (url: string, responseData?: JsonBodyType) => void;
|
14
|
-
export declare const mockPostResponse: (url: string, responseData?: JsonBodyType) => void;
|
15
14
|
type RenderQueryHookArgs = {
|
16
15
|
client: typeof apiWretchClient;
|
17
16
|
builder: typeof apiHeaderBuilder;
|
package/package.json
CHANGED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { HeaderBuilder } from '../../auth/core/headers/headerBuilder';
|
2
|
-
import { ApiMutationOverrides } from '../../../utils/types/apiMutationOverrides';
|
3
|
-
import { Wretch } from 'wretch';
|
4
|
-
import { ProjectApiBaseHeaders } from '../types/projectTypes';
|
5
|
-
import { SwitchTeamRequestBody, SwitchTeamResponse } from '../types/teamTypes';
|
6
|
-
/**
|
7
|
-
* A react-query wrapper about the team switch public API endpoint
|
8
|
-
*
|
9
|
-
* @param wretchClient - Wretch instance configured to a public API instance.
|
10
|
-
* @param headers - Headers to include in the request.
|
11
|
-
* @param overrides - Additional options to pass to the query.
|
12
|
-
*/
|
13
|
-
export declare function useSwitchTeamMutation<T>(wretchClient: Wretch<T>, headers: HeaderBuilder<ProjectApiBaseHeaders>, overrides?: ApiMutationOverrides<SwitchTeamResponse, SwitchTeamRequestBody>): import('@tanstack/react-query').UseMutationResult<void | null, undefined, {
|
14
|
-
id: number;
|
15
|
-
}, undefined>;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|