@lokalise/harmony 1.8.0 → 1.8.2

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.
Files changed (52) hide show
  1. package/README.md +0 -64
  2. package/dist/harmony.cjs +1 -1
  3. package/dist/harmony.mjs +507 -923
  4. package/dist/types/src/node.d.ts +1 -2
  5. package/package.json +4 -20
  6. package/dist/types/src/features/auth/backend/services/getAuthenticatedSessionDetailFromRequest.d.ts +0 -10
  7. package/dist/types/src/features/auth/backend/services/getAuthenticatedSessionPayloadFromRequest.test.d.ts +0 -1
  8. package/dist/types/src/features/auth/core/jwtTokenPayload.d.ts +0 -7
  9. package/dist/types/src/features/auth/core/jwtTokenPayload.test.d.ts +0 -1
  10. package/dist/types/src/features/auth/core/lokaliseAuthAddon.d.ts +0 -14
  11. package/dist/types/src/features/auth/core/middleware/jwtAuthMiddleware.d.ts +0 -13
  12. package/dist/types/src/features/auth/core/middleware/jwtAuthMiddleware.test.d.ts +0 -1
  13. package/dist/types/src/features/auth/core/middleware/publicApiHeadersMiddleware.d.ts +0 -5
  14. package/dist/types/src/features/auth/core/types/jwtTokenPayload.d.ts +0 -42
  15. package/dist/types/src/features/auth/core/types/jwtTokenPayload.fixture.d.ts +0 -27
  16. package/dist/types/src/features/auth/core/utils/makeAuthHeader.d.ts +0 -2
  17. package/dist/types/src/features/auth/core/utils/makeAuthHeader.test.d.ts +0 -1
  18. package/dist/types/src/features/auth/frontend/addon/lokaliseAuthBrowserAddon.d.ts +0 -35
  19. package/dist/types/src/features/auth/frontend/events/NewJwtIssuedEvent.d.ts +0 -20
  20. package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +0 -28
  21. package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedSessionPayload.d.ts +0 -18
  22. package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedUser.d.ts +0 -18
  23. package/dist/types/src/features/auth/frontend/hooks/useGetPromotedClassicSessionJwtQuery.d.ts +0 -12
  24. package/dist/types/src/features/auth/frontend/middleware/promoteClassicSessionToJwtMiddleware.d.ts +0 -14
  25. package/dist/types/src/features/auth/frontend/middleware/promoteClassicSessionToJwtMiddleware.test.d.ts +0 -1
  26. package/dist/types/src/features/auth/frontend/utils/cookieTokenUtils.d.ts +0 -4
  27. package/dist/types/src/features/auth/frontend/utils/cookieTokenUtils.test.d.ts +0 -1
  28. package/dist/types/src/features/auth/node.d.ts +0 -9
  29. package/dist/types/src/features/node.d.ts +0 -2
  30. package/dist/types/src/features/publicApi/contributors.d.ts +0 -111
  31. package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +0 -76
  32. package/dist/types/src/features/publicApi/hooks/useGetTeamUsersQuery.d.ts +0 -26
  33. package/dist/types/src/features/publicApi/hooks/useGetUserTokenQuery.d.ts +0 -20
  34. package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +0 -81
  35. package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +0 -34
  36. package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +0 -72
  37. package/dist/types/src/features/publicApi/node.d.ts +0 -16
  38. package/dist/types/src/features/publicApi/projects.d.ts +0 -1132
  39. package/dist/types/src/features/publicApi/teamUsers.d.ts +0 -61
  40. package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +0 -171
  41. package/dist/types/src/features/publicApi/types/languageTypes.d.ts +0 -29
  42. package/dist/types/src/features/publicApi/types/projectTypes.d.ts +0 -1061
  43. package/dist/types/src/features/publicApi/types/teamRoleTypes.d.ts +0 -3
  44. package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +0 -70
  45. package/dist/types/src/features/publicApi/types/userTokenTypes.d.ts +0 -26
  46. package/dist/types/src/features/publicApi/userToken.d.ts +0 -35
  47. package/dist/types/src/utils/testing/createMockFactoryWithDefaults.d.ts +0 -2
  48. package/dist/types/src/utils/testing/createMockFactoryWithDefaults.test.d.ts +0 -1
  49. package/dist/types/src/utils/testing/deepOverride.d.ts +0 -4
  50. package/dist/types/src/utils/testing/deepOverride.test.d.ts +0 -1
  51. package/dist/types/src/utils/types/apiMutationOverrides.d.ts +0 -2
  52. package/dist/types/src/utils/types/apiQueryOverrides.d.ts +0 -2
@@ -1,81 +0,0 @@
1
- import { ListProjectsRequestQuery, ListProjectsSuccessResponseBody } from '../types/projectTypes';
2
- import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
3
- import { Wretch } from 'wretch';
4
- /**
5
- * Factory for the listProjects public API endpoint key
6
- */
7
- export declare const listProjectsKey: {
8
- paramsKey: (params: ListProjectsRequestQuery) => readonly ["listProjects", {
9
- page?: number | undefined;
10
- project_type?: "localization_files" | "paged_documents" | "marketing" | undefined;
11
- filter_team_id?: number | undefined;
12
- filter_names?: string | undefined;
13
- include_statistics?: boolean | undefined;
14
- include_settings?: boolean | undefined;
15
- limit?: number | undefined;
16
- }];
17
- };
18
- /**
19
- * A react-router wrapper about the listProjects public API endpoint
20
- *
21
- * @param wretchClient - Wretch instance configured to a public API instance.
22
- * @param overrides - Additional options to pass to the query.
23
- */
24
- export declare function useListProjectsQuery<T>(wretchClient: Wretch<T>, overrides: ApiQueryOverrides<ListProjectsSuccessResponseBody, typeof listProjectsKey>): import('@tanstack/react-query').UseQueryResult<({
25
- name: string;
26
- created_at: string;
27
- created_at_timestamp: number;
28
- team_id: number;
29
- description: string;
30
- project_id: string;
31
- uuid: string;
32
- project_type: "localization_files" | "paged_documents" | "marketing";
33
- created_by: number;
34
- created_by_email: string;
35
- base_language_id: number;
36
- base_language_iso: string;
37
- } | {
38
- settings?: {
39
- per_platform_key_names: boolean;
40
- reviewing: boolean;
41
- auto_toggle_unverified: boolean;
42
- offline_translation: boolean;
43
- key_editing: boolean;
44
- inline_machine_translations: boolean;
45
- custom_translation_statuses: boolean;
46
- custom_translation_statuses_allow_multiple: boolean;
47
- segmentation: boolean;
48
- contributor_preview_download_enabled: boolean;
49
- } | undefined;
50
- statistics?: {
51
- team: number;
52
- languages: {
53
- progress: number;
54
- language_id: number;
55
- language_iso: string;
56
- words_to_do: number;
57
- }[];
58
- progress_total: number;
59
- keys_total: number;
60
- base_words: number;
61
- qa_issues_total: number;
62
- qa_issues: {
63
- not_reviewed: number;
64
- unverified: number;
65
- spelling_grammar: number;
66
- inconsistent_placeholders: number;
67
- inconsistent_html: number;
68
- different_number_of_urls: number;
69
- different_urls: number;
70
- leading_whitespace: number;
71
- trailing_whitespace: number;
72
- different_number_of_email_address: number;
73
- different_email_address: number;
74
- different_brackets: number;
75
- different_numbers: number;
76
- double_space: number;
77
- special_placeholder: number;
78
- unbalanced_brackets: number;
79
- };
80
- } | undefined;
81
- })[], undefined>;
@@ -1,34 +0,0 @@
1
- import { RetrieveContributorsResponse } from '../types/contributorTypes';
2
- import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
3
- import { Wretch } from 'wretch';
4
- /**
5
- * Factory for creating keys for the useRetrieveContributorQuery hook
6
- */
7
- export declare const retrieveContributorKeys: {
8
- projectUserKey: (projectId: string, userId: number) => readonly ["RetrieveContributor", string, number];
9
- };
10
- /**
11
- * A react-router wrapper about the retrieveContributor public API endpoint
12
- *
13
- * @param wretchClient - Wretch instance configured to a public API instance.
14
- * @param overrides - Additional options to pass to the query.
15
- */
16
- export declare const useRetrieveContributorQuery: <T>(wretchClient: Wretch<T>, overrides: ApiQueryOverrides<RetrieveContributorsResponse, typeof retrieveContributorKeys>) => import('@tanstack/react-query').UseQueryResult<{
17
- contributors: {
18
- email: string;
19
- user_id: number;
20
- fullname: string;
21
- created_at: string;
22
- created_at_timestamp: number;
23
- admin_rights: string[];
24
- languages: {
25
- lang_id: number;
26
- lang_iso: string;
27
- lang_name: string;
28
- is_writable: 0 | 1;
29
- }[];
30
- is_admin: boolean;
31
- is_reviewer: boolean;
32
- }[];
33
- project_id: string;
34
- }, undefined>;
@@ -1,72 +0,0 @@
1
- import { ApiQueryOverrides } from '../../../utils/types/apiQueryOverrides';
2
- import { Wretch } from 'wretch';
3
- import { Project } from '../types/projectTypes';
4
- /**
5
- * Factory function to create the query key for the retrieveProject query
6
- */
7
- export declare const retrieveProjectQueryKey: {
8
- projectIdKey: (projectId: string) => string[];
9
- };
10
- /**
11
- * A react-router wrapper about the retrieveProject public API endpoint
12
- *
13
- * @param wretchClient - Wretch instance configured to a public API instance.
14
- * @param overrides - Additional options to pass to the query.
15
- */
16
- export declare function useRetrieveProjectQuery<T>(wretchClient: Wretch<T>, overrides: ApiQueryOverrides<Project, typeof retrieveProjectQueryKey>): import('@tanstack/react-query').UseQueryResult<{
17
- name: string;
18
- created_at: string;
19
- created_at_timestamp: number;
20
- team_id: number;
21
- description: string;
22
- project_id: string;
23
- uuid: string;
24
- project_type: "localization_files" | "paged_documents" | "marketing";
25
- created_by: number;
26
- created_by_email: string;
27
- base_language_id: number;
28
- base_language_iso: string;
29
- settings: {
30
- per_platform_key_names: boolean;
31
- reviewing: boolean;
32
- auto_toggle_unverified: boolean;
33
- offline_translation: boolean;
34
- key_editing: boolean;
35
- inline_machine_translations: boolean;
36
- custom_translation_statuses: boolean;
37
- custom_translation_statuses_allow_multiple: boolean;
38
- segmentation: boolean;
39
- contributor_preview_download_enabled: boolean;
40
- };
41
- statistics: {
42
- team: number;
43
- languages: {
44
- progress: number;
45
- language_id: number;
46
- language_iso: string;
47
- words_to_do: number;
48
- }[];
49
- progress_total: number;
50
- keys_total: number;
51
- base_words: number;
52
- qa_issues_total: number;
53
- qa_issues: {
54
- not_reviewed: number;
55
- unverified: number;
56
- spelling_grammar: number;
57
- inconsistent_placeholders: number;
58
- inconsistent_html: number;
59
- different_number_of_urls: number;
60
- different_urls: number;
61
- leading_whitespace: number;
62
- trailing_whitespace: number;
63
- different_number_of_email_address: number;
64
- different_email_address: number;
65
- different_brackets: number;
66
- different_numbers: number;
67
- double_space: number;
68
- special_placeholder: number;
69
- unbalanced_brackets: number;
70
- };
71
- };
72
- }, undefined>;
@@ -1,16 +0,0 @@
1
- export * from './contributors';
2
- export * from './projects';
3
- export * from './teamUsers';
4
- export * from './userToken';
5
- export type { LanguageStatistics, LanguageIso } from './types/languageTypes';
6
- export type { Project, ProjectQaIssues, ProjectType, ProjectSettings } from './types/projectTypes';
7
- export type { TeamRole } from './types/teamRoleTypes';
8
- export type { Contributor, ContributorLanguage } from './types/contributorTypes';
9
- export type { TeamUser } from './types/teamUserTypes';
10
- export type { AuthenticatedRequestHeader, JwtToken } from './types/userTokenTypes';
11
- export * from './hooks/useCreateProjectMutation';
12
- export * from './hooks/useGetTeamUsersQuery';
13
- export * from './hooks/useGetUserTokenQuery';
14
- export * from './hooks/useListProjectsQuery';
15
- export * from './hooks/useRetrieveContributorQuery';
16
- export * from './hooks/useRetrieveProjectQuery';