@intlayer/api 4.0.2 → 4.0.4

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 (109) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs +55 -0
  3. package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs.map +1 -0
  4. package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs +59 -0
  5. package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs.map +1 -0
  6. package/dist/cjs/distantDictionary/index.cjs +25 -0
  7. package/dist/cjs/distantDictionary/index.cjs.map +1 -0
  8. package/dist/cjs/fetcher.cjs +3 -1
  9. package/dist/cjs/fetcher.cjs.map +1 -1
  10. package/dist/cjs/{ai.cjs → getIntlayerAPI/ai.cjs} +1 -1
  11. package/dist/cjs/getIntlayerAPI/ai.cjs.map +1 -0
  12. package/dist/cjs/{auth.cjs → getIntlayerAPI/auth.cjs} +1 -1
  13. package/dist/cjs/getIntlayerAPI/auth.cjs.map +1 -0
  14. package/dist/cjs/{dictionary.cjs → getIntlayerAPI/dictionary.cjs} +1 -1
  15. package/dist/cjs/getIntlayerAPI/dictionary.cjs.map +1 -0
  16. package/dist/cjs/getIntlayerAPI/index.cjs +49 -0
  17. package/dist/cjs/getIntlayerAPI/index.cjs.map +1 -0
  18. package/dist/cjs/{organization.cjs → getIntlayerAPI/organization.cjs} +1 -1
  19. package/dist/cjs/getIntlayerAPI/organization.cjs.map +1 -0
  20. package/dist/cjs/{project.cjs → getIntlayerAPI/project.cjs} +1 -1
  21. package/dist/cjs/getIntlayerAPI/project.cjs.map +1 -0
  22. package/dist/cjs/{stripe.cjs → getIntlayerAPI/stripe.cjs} +1 -1
  23. package/dist/cjs/getIntlayerAPI/stripe.cjs.map +1 -0
  24. package/dist/cjs/{tag.cjs → getIntlayerAPI/tag.cjs} +1 -1
  25. package/dist/cjs/getIntlayerAPI/tag.cjs.map +1 -0
  26. package/dist/cjs/{user.cjs → getIntlayerAPI/user.cjs} +1 -1
  27. package/dist/cjs/getIntlayerAPI/user.cjs.map +1 -0
  28. package/dist/cjs/index.cjs +7 -29
  29. package/dist/cjs/index.cjs.map +1 -1
  30. package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs +31 -0
  31. package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs.map +1 -0
  32. package/dist/esm/distantDictionary/fetchDistantDictionary.mjs +35 -0
  33. package/dist/esm/distantDictionary/fetchDistantDictionary.mjs.map +1 -0
  34. package/dist/esm/distantDictionary/index.mjs +3 -0
  35. package/dist/esm/distantDictionary/index.mjs.map +1 -0
  36. package/dist/esm/fetcher.mjs +3 -1
  37. package/dist/esm/fetcher.mjs.map +1 -1
  38. package/dist/esm/{ai.mjs → getIntlayerAPI/ai.mjs} +1 -1
  39. package/dist/esm/getIntlayerAPI/ai.mjs.map +1 -0
  40. package/dist/esm/{auth.mjs → getIntlayerAPI/auth.mjs} +1 -1
  41. package/dist/esm/getIntlayerAPI/auth.mjs.map +1 -0
  42. package/dist/esm/{dictionary.mjs → getIntlayerAPI/dictionary.mjs} +1 -1
  43. package/dist/esm/getIntlayerAPI/dictionary.mjs.map +1 -0
  44. package/dist/esm/getIntlayerAPI/index.mjs +24 -0
  45. package/dist/esm/getIntlayerAPI/index.mjs.map +1 -0
  46. package/dist/esm/{organization.mjs → getIntlayerAPI/organization.mjs} +1 -1
  47. package/dist/esm/getIntlayerAPI/organization.mjs.map +1 -0
  48. package/dist/esm/{project.mjs → getIntlayerAPI/project.mjs} +1 -1
  49. package/dist/esm/getIntlayerAPI/project.mjs.map +1 -0
  50. package/dist/esm/{stripe.mjs → getIntlayerAPI/stripe.mjs} +1 -1
  51. package/dist/esm/getIntlayerAPI/stripe.mjs.map +1 -0
  52. package/dist/esm/{tag.mjs → getIntlayerAPI/tag.mjs} +1 -1
  53. package/dist/esm/getIntlayerAPI/tag.mjs.map +1 -0
  54. package/dist/esm/{user.mjs → getIntlayerAPI/user.mjs} +1 -1
  55. package/dist/esm/getIntlayerAPI/user.mjs.map +1 -0
  56. package/dist/esm/index.mjs +3 -23
  57. package/dist/esm/index.mjs.map +1 -1
  58. package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts +7 -0
  59. package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts.map +1 -0
  60. package/dist/types/distantDictionary/fetchDistantDictionary.d.ts +7 -0
  61. package/dist/types/distantDictionary/fetchDistantDictionary.d.ts.map +1 -0
  62. package/dist/types/distantDictionary/index.d.ts +3 -0
  63. package/dist/types/distantDictionary/index.d.ts.map +1 -0
  64. package/dist/types/fetcher.d.ts.map +1 -1
  65. package/dist/types/{ai.d.ts → getIntlayerAPI/ai.d.ts} +1 -1
  66. package/dist/types/getIntlayerAPI/ai.d.ts.map +1 -0
  67. package/dist/types/{auth.d.ts → getIntlayerAPI/auth.d.ts} +1 -1
  68. package/dist/types/getIntlayerAPI/auth.d.ts.map +1 -0
  69. package/dist/types/{dictionary.d.ts → getIntlayerAPI/dictionary.d.ts} +1 -1
  70. package/dist/types/getIntlayerAPI/dictionary.d.ts.map +1 -0
  71. package/dist/types/getIntlayerAPI/index.d.ts +157 -0
  72. package/dist/types/getIntlayerAPI/index.d.ts.map +1 -0
  73. package/dist/types/{organization.d.ts → getIntlayerAPI/organization.d.ts} +1 -1
  74. package/dist/types/getIntlayerAPI/organization.d.ts.map +1 -0
  75. package/dist/types/{project.d.ts → getIntlayerAPI/project.d.ts} +1 -1
  76. package/dist/types/getIntlayerAPI/project.d.ts.map +1 -0
  77. package/dist/types/{stripe.d.ts → getIntlayerAPI/stripe.d.ts} +1 -1
  78. package/dist/types/getIntlayerAPI/stripe.d.ts.map +1 -0
  79. package/dist/types/{tag.d.ts → getIntlayerAPI/tag.d.ts} +1 -1
  80. package/dist/types/getIntlayerAPI/tag.d.ts.map +1 -0
  81. package/dist/types/{user.d.ts → getIntlayerAPI/user.d.ts} +1 -1
  82. package/dist/types/getIntlayerAPI/user.d.ts.map +1 -0
  83. package/dist/types/index.d.ts +3 -156
  84. package/dist/types/index.d.ts.map +1 -1
  85. package/package.json +7 -7
  86. package/dist/cjs/ai.cjs.map +0 -1
  87. package/dist/cjs/auth.cjs.map +0 -1
  88. package/dist/cjs/dictionary.cjs.map +0 -1
  89. package/dist/cjs/organization.cjs.map +0 -1
  90. package/dist/cjs/project.cjs.map +0 -1
  91. package/dist/cjs/stripe.cjs.map +0 -1
  92. package/dist/cjs/tag.cjs.map +0 -1
  93. package/dist/cjs/user.cjs.map +0 -1
  94. package/dist/esm/ai.mjs.map +0 -1
  95. package/dist/esm/auth.mjs.map +0 -1
  96. package/dist/esm/dictionary.mjs.map +0 -1
  97. package/dist/esm/organization.mjs.map +0 -1
  98. package/dist/esm/project.mjs.map +0 -1
  99. package/dist/esm/stripe.mjs.map +0 -1
  100. package/dist/esm/tag.mjs.map +0 -1
  101. package/dist/esm/user.mjs.map +0 -1
  102. package/dist/types/ai.d.ts.map +0 -1
  103. package/dist/types/auth.d.ts.map +0 -1
  104. package/dist/types/dictionary.d.ts.map +0 -1
  105. package/dist/types/organization.d.ts.map +0 -1
  106. package/dist/types/project.d.ts.map +0 -1
  107. package/dist/types/stripe.d.ts.map +0 -1
  108. package/dist/types/tag.d.ts.map +0 -1
  109. package/dist/types/user.d.ts.map +0 -1
@@ -0,0 +1,157 @@
1
+ import { type IntlayerConfig } from '@intlayer/config/client';
2
+ import type { FetcherOptions } from '../fetcher';
3
+ export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
4
+ organization: {
5
+ getOrganizations: (filters?: import("@intlayer/backend").GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationsResult>;
6
+ getOrganization: (organizationId: import("@intlayer/backend").GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationResult>;
7
+ addOrganization: (organization: import("@intlayer/backend").AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationResult>;
8
+ addOrganizationMember: (body: import("@intlayer/backend").AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationMemberResult>;
9
+ updateOrganization: (organization: import("@intlayer/backend").UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationResult>;
10
+ updateOrganizationMembers: (body: import("@intlayer/backend").UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationMembersResult>;
11
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteOrganizationResult>;
12
+ selectOrganization: (organizationId: import("@intlayer/backend").SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectOrganizationResult>;
13
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectOrganizationResult>;
14
+ };
15
+ project: {
16
+ getProjects: (filters?: import("@intlayer/backend").GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetProjectsResult>;
17
+ addProject: (project: import("@intlayer/backend").AddProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddProjectResult>;
18
+ updateProject: (project: import("@intlayer/backend").UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectResult>;
19
+ updateProjectMembers: (body: import("@intlayer/backend").UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectMembersResult>;
20
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteProjectResult>;
21
+ selectProject: (projectId: import("@intlayer/backend").SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectProjectResult>;
22
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectProjectResult>;
23
+ addNewAccessKey: (accessKey: import("@intlayer/backend").AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddNewAccessKeyResponse>;
24
+ deleteAccessKey: (clientId: import("@intlayer/backend").DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteAccessKeyResponse>;
25
+ refreshAccessKey: (clientId: import("@intlayer/backend").RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RefreshAccessKeyResponse>;
26
+ };
27
+ user: {
28
+ createUser: (user: import("@intlayer/backend").CreateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateUserResult>;
29
+ getUsers: (filters?: import("@intlayer/backend").GetUsersParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUsersResult>;
30
+ getUserById: (userId: import("@intlayer/backend").GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByIdResult>;
31
+ getUserByAccount: (providerAccountId: import("@intlayer/backend").GetUserByAccountParams["providerAccountId"], provider: import("@intlayer/backend").GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByAccountResult>;
32
+ getUserByEmail: (email: import("@intlayer/backend").GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByEmailResult>;
33
+ updateUser: (user: import("@intlayer/backend").UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
34
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
35
+ };
36
+ auth: {
37
+ login: (user: import("@intlayer/backend").LoginBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").LoginResult>;
38
+ getLoginWithGitHubURL: (params: import("@intlayer/backend").GithubLoginQueryParams) => string;
39
+ getLoginWithGoogleURL: (params: import("@intlayer/backend").GoogleLoginQueryParams) => string;
40
+ register: (user: import("@intlayer/backend").RegisterBody, query?: import("@intlayer/backend").RegisterQuery, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RegisterResult>;
41
+ logout: (otherOptions?: FetcherOptions) => Promise<void>;
42
+ resetPassword: (params: import("@intlayer/backend").ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ResetPasswordResult>;
43
+ askResetPassword: (email: import("@intlayer/backend").AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskResetPasswordResult>;
44
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CheckIfUserHasPasswordResult>;
45
+ verifyEmail: ({ userId, secret }: import("@intlayer/backend").ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ValidEmailResult>;
46
+ getVerifyEmailStatusURL: (userId: string | import("@intlayer/backend").UserAPI["_id"]) => string;
47
+ changePassword: (data: import("@intlayer/backend").UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdatePasswordResult>;
48
+ createSession: (data: import("@intlayer/backend").CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateSessionResult>;
49
+ getSession: (sessionToken?: import("@intlayer/backend").GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetSessionInformationResult>;
50
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SetCSRFTokenResult>;
51
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOAuth2TokenResult>;
52
+ };
53
+ dictionary: {
54
+ getDictionaries: (filters?: import("@intlayer/backend").GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesResult>;
55
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesKeysResult>;
56
+ getDictionary: (dictionaryKey: import("@intlayer/backend").GetDictionaryParams["dictionaryKey"], version?: import("@intlayer/backend").GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionaryResult>;
57
+ pushDictionaries: (dictionaries: import("@intlayer/backend").PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushDictionariesResult>;
58
+ addDictionary: (dictionary: import("@intlayer/backend").AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddDictionaryResult>;
59
+ updateDictionary: (dictionaryId: import("@intlayer/backend").UpdateDictionaryParam["dictionaryId"], dictionary: import("@intlayer/backend").UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateDictionaryResult>;
60
+ deleteDictionary: (id: import("@intlayer/backend").DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteDictionaryResult>;
61
+ };
62
+ stripe: {
63
+ getSubscription: (body?: import("@intlayer/backend").GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
64
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
65
+ };
66
+ ai: {
67
+ auditContentDeclaration: (body?: import("@intlayer/backend").AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationResult>;
68
+ auditContentDeclarationField: (body?: import("@intlayer/backend").AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationFieldResult>;
69
+ auditContentDeclarationMetadata: (body?: import("@intlayer/backend").AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationMetadataResult>;
70
+ auditTag: (body?: import("@intlayer/backend").AuditTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditTagResult>;
71
+ askDocQuestion: (body?: import("@intlayer/backend").AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskDocQuestionResult>;
72
+ };
73
+ tag: {
74
+ getTags: (filters?: import("@intlayer/backend").GetTagsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetTagsResult>;
75
+ addTag: (tag: import("@intlayer/backend").AddTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddTagResult>;
76
+ updateTag: (tagId: import("@intlayer/backend").UpdateTagParams["tagId"], tag: import("@intlayer/backend").UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateTagResult>;
77
+ deleteTag: (tagId: import("@intlayer/backend").DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteTagResult>;
78
+ };
79
+ };
80
+ export declare const intlayerAPI: {
81
+ organization: {
82
+ getOrganizations: (filters?: import("@intlayer/backend").GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationsResult>;
83
+ getOrganization: (organizationId: import("@intlayer/backend").GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationResult>;
84
+ addOrganization: (organization: import("@intlayer/backend").AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationResult>;
85
+ addOrganizationMember: (body: import("@intlayer/backend").AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationMemberResult>;
86
+ updateOrganization: (organization: import("@intlayer/backend").UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationResult>;
87
+ updateOrganizationMembers: (body: import("@intlayer/backend").UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationMembersResult>;
88
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteOrganizationResult>;
89
+ selectOrganization: (organizationId: import("@intlayer/backend").SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectOrganizationResult>;
90
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectOrganizationResult>;
91
+ };
92
+ project: {
93
+ getProjects: (filters?: import("@intlayer/backend").GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetProjectsResult>;
94
+ addProject: (project: import("@intlayer/backend").AddProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddProjectResult>;
95
+ updateProject: (project: import("@intlayer/backend").UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectResult>;
96
+ updateProjectMembers: (body: import("@intlayer/backend").UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectMembersResult>;
97
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteProjectResult>;
98
+ selectProject: (projectId: import("@intlayer/backend").SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectProjectResult>;
99
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectProjectResult>;
100
+ addNewAccessKey: (accessKey: import("@intlayer/backend").AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddNewAccessKeyResponse>;
101
+ deleteAccessKey: (clientId: import("@intlayer/backend").DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteAccessKeyResponse>;
102
+ refreshAccessKey: (clientId: import("@intlayer/backend").RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RefreshAccessKeyResponse>;
103
+ };
104
+ user: {
105
+ createUser: (user: import("@intlayer/backend").CreateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateUserResult>;
106
+ getUsers: (filters?: import("@intlayer/backend").GetUsersParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUsersResult>;
107
+ getUserById: (userId: import("@intlayer/backend").GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByIdResult>;
108
+ getUserByAccount: (providerAccountId: import("@intlayer/backend").GetUserByAccountParams["providerAccountId"], provider: import("@intlayer/backend").GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByAccountResult>;
109
+ getUserByEmail: (email: import("@intlayer/backend").GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByEmailResult>;
110
+ updateUser: (user: import("@intlayer/backend").UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
111
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
112
+ };
113
+ auth: {
114
+ login: (user: import("@intlayer/backend").LoginBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").LoginResult>;
115
+ getLoginWithGitHubURL: (params: import("@intlayer/backend").GithubLoginQueryParams) => string;
116
+ getLoginWithGoogleURL: (params: import("@intlayer/backend").GoogleLoginQueryParams) => string;
117
+ register: (user: import("@intlayer/backend").RegisterBody, query?: import("@intlayer/backend").RegisterQuery, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RegisterResult>;
118
+ logout: (otherOptions?: FetcherOptions) => Promise<void>;
119
+ resetPassword: (params: import("@intlayer/backend").ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ResetPasswordResult>;
120
+ askResetPassword: (email: import("@intlayer/backend").AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskResetPasswordResult>;
121
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CheckIfUserHasPasswordResult>;
122
+ verifyEmail: ({ userId, secret }: import("@intlayer/backend").ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ValidEmailResult>;
123
+ getVerifyEmailStatusURL: (userId: string | import("@intlayer/backend").UserAPI["_id"]) => string;
124
+ changePassword: (data: import("@intlayer/backend").UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdatePasswordResult>;
125
+ createSession: (data: import("@intlayer/backend").CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateSessionResult>;
126
+ getSession: (sessionToken?: import("@intlayer/backend").GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetSessionInformationResult>;
127
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SetCSRFTokenResult>;
128
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOAuth2TokenResult>;
129
+ };
130
+ dictionary: {
131
+ getDictionaries: (filters?: import("@intlayer/backend").GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesResult>;
132
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesKeysResult>;
133
+ getDictionary: (dictionaryKey: import("@intlayer/backend").GetDictionaryParams["dictionaryKey"], version?: import("@intlayer/backend").GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionaryResult>;
134
+ pushDictionaries: (dictionaries: import("@intlayer/backend").PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushDictionariesResult>;
135
+ addDictionary: (dictionary: import("@intlayer/backend").AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddDictionaryResult>;
136
+ updateDictionary: (dictionaryId: import("@intlayer/backend").UpdateDictionaryParam["dictionaryId"], dictionary: import("@intlayer/backend").UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateDictionaryResult>;
137
+ deleteDictionary: (id: import("@intlayer/backend").DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteDictionaryResult>;
138
+ };
139
+ stripe: {
140
+ getSubscription: (body?: import("@intlayer/backend").GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
141
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
142
+ };
143
+ ai: {
144
+ auditContentDeclaration: (body?: import("@intlayer/backend").AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationResult>;
145
+ auditContentDeclarationField: (body?: import("@intlayer/backend").AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationFieldResult>;
146
+ auditContentDeclarationMetadata: (body?: import("@intlayer/backend").AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationMetadataResult>;
147
+ auditTag: (body?: import("@intlayer/backend").AuditTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditTagResult>;
148
+ askDocQuestion: (body?: import("@intlayer/backend").AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskDocQuestionResult>;
149
+ };
150
+ tag: {
151
+ getTags: (filters?: import("@intlayer/backend").GetTagsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetTagsResult>;
152
+ addTag: (tag: import("@intlayer/backend").AddTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddTagResult>;
153
+ updateTag: (tagId: import("@intlayer/backend").UpdateTagParams["tagId"], tag: import("@intlayer/backend").UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateTagResult>;
154
+ deleteTag: (tagId: import("@intlayer/backend").DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteTagResult>;
155
+ };
156
+ };
157
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAUjD,eAAO,MAAM,cAAc,oBACT,cAAc,mBACb,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU/B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { AddOrganizationBody, AddOrganizationResult, DeleteOrganizationResult, GetOrganizationParam, GetOrganizationResult, GetOrganizationsParams, GetOrganizationsResult, UpdateOrganizationBody, UpdateOrganizationResult, SelectOrganizationParam, SelectOrganizationResult, UnselectOrganizationResult, UpdateOrganizationMembersBody, UpdateOrganizationMembersResult, AddOrganizationMemberBody, AddOrganizationMemberResult } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
- import { type FetcherOptions } from './fetcher';
3
+ import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getOrganizationAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
6
6
  getOrganization: (organizationId: GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/organization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EAEnB,qBAAqB,EAErB,wBAAwB,EAExB,oBAAoB,EAEpB,qBAAqB,EAErB,sBAAsB,EAEtB,sBAAsB,EAEtB,sBAAsB,EAEtB,wBAAwB,EAExB,uBAAuB,EAEvB,wBAAwB,EAExB,0BAA0B,EAE1B,6BAA6B,EAE7B,+BAA+B,EAE/B,yBAAyB,EAEzB,2BAA2B,EAE5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,kBAAkB,oBACb,cAAc,mBACb,cAAc;iCAUnB,sBAAsB,iBAClB,cAAc;sCAgBZ,oBAAoB,CAAC,gBAAgB,CAAC,iBACxC,cAAc;oCAad,mBAAmB,iBACnB,cAAc;kCAqDtB,yBAAyB,iBACjB,cAAc;uCArCd,sBAAsB,iBACtB,cAAc;sCAiBtB,6BAA6B,iBACrB,cAAc;wCAkCkB,cAAc;yCAe5C,uBAAuB,CAAC,gBAAgB,CAAC,iBAC3C,cAAc;0CAeoB,cAAc;CAqBjE,CAAC;AAEF,eAAO,MAAM,eAAe;iCA5Jd,sBAAsB,iBAClB,cAAc;sCAgBZ,oBAAoB,CAAC,gBAAgB,CAAC,iBACxC,cAAc;oCAad,mBAAmB,iBACnB,cAAc;kCAqDtB,yBAAyB,iBACjB,cAAc;uCArCd,sBAAsB,iBACtB,cAAc;sCAiBtB,6BAA6B,iBACrB,cAAc;wCAkCkB,cAAc;yCAe5C,uBAAuB,CAAC,gBAAgB,CAAC,iBAC3C,cAAc;0CAeoB,cAAc;CAuBf,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { AddProjectBody, AddProjectResult, DeleteProjectResult, GetProjectsParams, GetProjectsResult, UpdateProjectBody, UpdateProjectResult, SelectProjectParam, SelectProjectResult, UnselectProjectResult, AddNewAccessKeyBody, AddNewAccessKeyResponse, DeleteAccessKeyBody, DeleteAccessKeyResponse, RefreshAccessKeyBody, RefreshAccessKeyResponse, UpdateProjectMembersBody, UpdateProjectMembersResult } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
- import { type FetcherOptions } from './fetcher';
3
+ import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
6
6
  addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAEd,gBAAgB,EAEhB,mBAAmB,EAEnB,iBAAiB,EAEjB,iBAAiB,EAEjB,iBAAiB,EAEjB,mBAAmB,EAEnB,kBAAkB,EAElB,mBAAmB,EAEnB,qBAAqB,EAErB,mBAAmB,EAEnB,uBAAuB,EAEvB,mBAAmB,EAEnB,uBAAuB,EAEvB,oBAAoB,EAEpB,wBAAwB,EAExB,wBAAwB,EAExB,0BAA0B,EAE3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,aAAa,oBACR,cAAc,mBACb,cAAc;4BAUnB,iBAAiB,iBACb,cAAc;0BAgBnB,cAAc,iBACT,cAAc;6BAiBnB,iBAAiB,iBACZ,cAAc;iCAiBtB,wBAAwB,iBAChB,cAAc;mCAgBa,cAAc;+BAe5C,kBAAkB,CAAC,WAAW,CAAC,iBAC5B,cAAc;qCAee,cAAc;iCAiB9C,mBAAmB,iBAChB,cAAc;gCAmBlB,mBAAmB,CAAC,UAAU,CAAC,iBAC3B,cAAc;iCAmBlB,oBAAoB,CAAC,UAAU,CAAC,iBAC5B,cAAc;CAwB/B,CAAC;AAEF,eAAO,MAAM,UAAU;4BAzLT,iBAAiB,iBACb,cAAc;0BAgBnB,cAAc,iBACT,cAAc;6BAiBnB,iBAAiB,iBACZ,cAAc;iCAiBtB,wBAAwB,iBAChB,cAAc;mCAgBa,cAAc;+BAe5C,kBAAkB,CAAC,WAAW,CAAC,iBAC5B,cAAc;qCAee,cAAc;iCAiB9C,mBAAmB,iBAChB,cAAc;gCAmBlB,mBAAmB,CAAC,UAAU,CAAC,iBAC3B,cAAc;iCAmBlB,oBAAoB,CAAC,UAAU,CAAC,iBAC5B,cAAc;CA0BS,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { GetCheckoutSessionBody, GetCheckoutSessionResult } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
- import { type FetcherOptions } from './fetcher';
3
+ import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getStripeAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
6
6
  cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/stripe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sBAAsB,EAEtB,wBAAwB,EAEzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,YAAY,oBACP,cAAc,mBACb,cAAc;6BAUtB,sBAAsB,iBACf,cAAc;wCAgBkB,cAAc;CAc/D,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { AddTagBody, AddTagResult, DeleteTagParams, DeleteTagResult, GetTagsParams, GetTagsResult, UpdateTagBody, UpdateTagParams, UpdateTagResult } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
- import { type FetcherOptions } from './fetcher';
3
+ import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getTagAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
6
6
  addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,UAAU,EAEV,YAAY,EAEZ,eAAe,EAEf,eAAe,EAEf,aAAa,EAEb,aAAa,EAEb,aAAa,EAEb,eAAe,EAEf,eAAe,EAEhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,SAAS,oBACJ,cAAc,mBACb,cAAc;wBAUnB,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAiB/B,CAAC;AAEF,eAAO,MAAM,MAAM;wBAxEL,aAAa,iBACT,cAAc;kBAeH,UAAU,iBAAgB,cAAc;uBAgB1D,eAAe,CAAC,OAAO,CAAC,OAC1B,aAAa,iBACJ,cAAc;uBAiBrB,eAAe,CAAC,OAAO,CAAC,iBAEjB,cAAc;CAmBC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { CreateUserBody, CreateUserResult, GetUserByAccountParams, GetUserByAccountResult, GetUserByEmailParams, GetUserByEmailResult, GetUserByIdParams, GetUserByIdResult, GetUsersParams, GetUsersResult, UpdateUserBody, UpdateUserResult } from '@intlayer/backend';
2
2
  import { type IntlayerConfig } from '@intlayer/config/client';
3
- import { type FetcherOptions } from './fetcher';
3
+ import { type FetcherOptions } from '../fetcher';
4
4
  export declare const getUserAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
5
  createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
6
6
  getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/getIntlayerAPI/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAEd,gBAAgB,EAEhB,sBAAsB,EAEtB,sBAAsB,EAEtB,oBAAoB,EAEpB,oBAAoB,EAEpB,iBAAiB,EAEjB,iBAAiB,EAEjB,cAAc,EAEd,cAAc,EAEd,cAAc,EAEd,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,UAAU,oBACL,cAAc,mBACb,cAAc;uBA2EvB,cAAc,iBACN,cAAc;yBAjElB,cAAc,iBACV,cAAc;0BAiBpB,iBAAiB,CAAC,QAAQ,CAAC,iBACrB,cAAc;0CA6BT,sBAAsB,CAAC,mBAAmB,CAAC,YACpD,sBAAsB,CAAC,UAAU,CAAC,iBAC9B,cAAc;4BAjBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;uBAiDtB,cAAc,iBACN,cAAc;yBAkBpB,MAAM,iBACA,cAAc;CAoB/B,CAAC;AAEF,eAAO,MAAM,OAAO;uBA7DV,cAAc,iBACN,cAAc;yBAjElB,cAAc,iBACV,cAAc;0BAiBpB,iBAAiB,CAAC,QAAQ,CAAC,iBACrB,cAAc;0CA6BT,sBAAsB,CAAC,mBAAmB,CAAC,YACpD,sBAAsB,CAAC,UAAU,CAAC,iBAC9B,cAAc;4BAjBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;uBAiDtB,cAAc,iBACN,cAAc;yBAkBpB,MAAM,iBACA,cAAc;CAsBG,CAAC"}
@@ -1,157 +1,4 @@
1
- import { type IntlayerConfig } from '@intlayer/config/client';
2
- import type { FetcherOptions } from './fetcher';
3
- export declare const getIntlayerAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
4
- organization: {
5
- getOrganizations: (filters?: import("@intlayer/backend").GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationsResult>;
6
- getOrganization: (organizationId: import("@intlayer/backend").GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationResult>;
7
- addOrganization: (organization: import("@intlayer/backend").AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationResult>;
8
- addOrganizationMember: (body: import("@intlayer/backend").AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationMemberResult>;
9
- updateOrganization: (organization: import("@intlayer/backend").UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationResult>;
10
- updateOrganizationMembers: (body: import("@intlayer/backend").UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationMembersResult>;
11
- deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteOrganizationResult>;
12
- selectOrganization: (organizationId: import("@intlayer/backend").SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectOrganizationResult>;
13
- unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectOrganizationResult>;
14
- };
15
- project: {
16
- getProjects: (filters?: import("@intlayer/backend").GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetProjectsResult>;
17
- addProject: (project: import("@intlayer/backend").AddProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddProjectResult>;
18
- updateProject: (project: import("@intlayer/backend").UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectResult>;
19
- updateProjectMembers: (body: import("@intlayer/backend").UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectMembersResult>;
20
- deleteProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteProjectResult>;
21
- selectProject: (projectId: import("@intlayer/backend").SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectProjectResult>;
22
- unselectProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectProjectResult>;
23
- addNewAccessKey: (accessKey: import("@intlayer/backend").AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddNewAccessKeyResponse>;
24
- deleteAccessKey: (clientId: import("@intlayer/backend").DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteAccessKeyResponse>;
25
- refreshAccessKey: (clientId: import("@intlayer/backend").RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RefreshAccessKeyResponse>;
26
- };
27
- user: {
28
- createUser: (user: import("@intlayer/backend").CreateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateUserResult>;
29
- getUsers: (filters?: import("@intlayer/backend").GetUsersParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUsersResult>;
30
- getUserById: (userId: import("@intlayer/backend").GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByIdResult>;
31
- getUserByAccount: (providerAccountId: import("@intlayer/backend").GetUserByAccountParams["providerAccountId"], provider: import("@intlayer/backend").GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByAccountResult>;
32
- getUserByEmail: (email: import("@intlayer/backend").GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByEmailResult>;
33
- updateUser: (user: import("@intlayer/backend").UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
34
- deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
35
- };
36
- auth: {
37
- login: (user: import("@intlayer/backend").LoginBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").LoginResult>;
38
- getLoginWithGitHubURL: (params: import("@intlayer/backend").GithubLoginQueryParams) => string;
39
- getLoginWithGoogleURL: (params: import("@intlayer/backend").GoogleLoginQueryParams) => string;
40
- register: (user: import("@intlayer/backend").RegisterBody, query?: import("@intlayer/backend").RegisterQuery, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RegisterResult>;
41
- logout: (otherOptions?: FetcherOptions) => Promise<void>;
42
- resetPassword: (params: import("@intlayer/backend").ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ResetPasswordResult>;
43
- askResetPassword: (email: import("@intlayer/backend").AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskResetPasswordResult>;
44
- checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CheckIfUserHasPasswordResult>;
45
- verifyEmail: ({ userId, secret }: import("@intlayer/backend").ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ValidEmailResult>;
46
- getVerifyEmailStatusURL: (userId: string | import("@intlayer/backend").UserAPI["_id"]) => string;
47
- changePassword: (data: import("@intlayer/backend").UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdatePasswordResult>;
48
- createSession: (data: import("@intlayer/backend").CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateSessionResult>;
49
- getSession: (sessionToken?: import("@intlayer/backend").GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetSessionInformationResult>;
50
- getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SetCSRFTokenResult>;
51
- getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOAuth2TokenResult>;
52
- };
53
- dictionary: {
54
- getDictionaries: (filters?: import("@intlayer/backend").GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesResult>;
55
- getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesKeysResult>;
56
- getDictionary: (dictionaryKey: import("@intlayer/backend").GetDictionaryParams["dictionaryKey"], version?: import("@intlayer/backend").GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionaryResult>;
57
- pushDictionaries: (dictionaries: import("@intlayer/backend").PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushDictionariesResult>;
58
- addDictionary: (dictionary: import("@intlayer/backend").AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddDictionaryResult>;
59
- updateDictionary: (dictionaryId: import("@intlayer/backend").UpdateDictionaryParam["dictionaryId"], dictionary: import("@intlayer/backend").UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateDictionaryResult>;
60
- deleteDictionary: (id: import("@intlayer/backend").DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteDictionaryResult>;
61
- };
62
- stripe: {
63
- getSubscription: (body?: import("@intlayer/backend").GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
64
- cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
65
- };
66
- ai: {
67
- auditContentDeclaration: (body?: import("@intlayer/backend").AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationResult>;
68
- auditContentDeclarationField: (body?: import("@intlayer/backend").AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationFieldResult>;
69
- auditContentDeclarationMetadata: (body?: import("@intlayer/backend").AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationMetadataResult>;
70
- auditTag: (body?: import("@intlayer/backend").AuditTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditTagResult>;
71
- askDocQuestion: (body?: import("@intlayer/backend").AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskDocQuestionResult>;
72
- };
73
- tag: {
74
- getTags: (filters?: import("@intlayer/backend").GetTagsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetTagsResult>;
75
- addTag: (tag: import("@intlayer/backend").AddTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddTagResult>;
76
- updateTag: (tagId: import("@intlayer/backend").UpdateTagParams["tagId"], tag: import("@intlayer/backend").UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateTagResult>;
77
- deleteTag: (tagId: import("@intlayer/backend").DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteTagResult>;
78
- };
79
- };
80
- export declare const intlayerAPI: {
81
- organization: {
82
- getOrganizations: (filters?: import("@intlayer/backend").GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationsResult>;
83
- getOrganization: (organizationId: import("@intlayer/backend").GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOrganizationResult>;
84
- addOrganization: (organization: import("@intlayer/backend").AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationResult>;
85
- addOrganizationMember: (body: import("@intlayer/backend").AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddOrganizationMemberResult>;
86
- updateOrganization: (organization: import("@intlayer/backend").UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationResult>;
87
- updateOrganizationMembers: (body: import("@intlayer/backend").UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateOrganizationMembersResult>;
88
- deleteOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteOrganizationResult>;
89
- selectOrganization: (organizationId: import("@intlayer/backend").SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectOrganizationResult>;
90
- unselectOrganization: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectOrganizationResult>;
91
- };
92
- project: {
93
- getProjects: (filters?: import("@intlayer/backend").GetProjectsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetProjectsResult>;
94
- addProject: (project: import("@intlayer/backend").AddProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddProjectResult>;
95
- updateProject: (project: import("@intlayer/backend").UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectResult>;
96
- updateProjectMembers: (body: import("@intlayer/backend").UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateProjectMembersResult>;
97
- deleteProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteProjectResult>;
98
- selectProject: (projectId: import("@intlayer/backend").SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SelectProjectResult>;
99
- unselectProject: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UnselectProjectResult>;
100
- addNewAccessKey: (accessKey: import("@intlayer/backend").AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddNewAccessKeyResponse>;
101
- deleteAccessKey: (clientId: import("@intlayer/backend").DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteAccessKeyResponse>;
102
- refreshAccessKey: (clientId: import("@intlayer/backend").RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RefreshAccessKeyResponse>;
103
- };
104
- user: {
105
- createUser: (user: import("@intlayer/backend").CreateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateUserResult>;
106
- getUsers: (filters?: import("@intlayer/backend").GetUsersParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUsersResult>;
107
- getUserById: (userId: import("@intlayer/backend").GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByIdResult>;
108
- getUserByAccount: (providerAccountId: import("@intlayer/backend").GetUserByAccountParams["providerAccountId"], provider: import("@intlayer/backend").GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByAccountResult>;
109
- getUserByEmail: (email: import("@intlayer/backend").GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetUserByEmailResult>;
110
- updateUser: (user: import("@intlayer/backend").UpdateUserBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
111
- deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateUserResult>;
112
- };
113
- auth: {
114
- login: (user: import("@intlayer/backend").LoginBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").LoginResult>;
115
- getLoginWithGitHubURL: (params: import("@intlayer/backend").GithubLoginQueryParams) => string;
116
- getLoginWithGoogleURL: (params: import("@intlayer/backend").GoogleLoginQueryParams) => string;
117
- register: (user: import("@intlayer/backend").RegisterBody, query?: import("@intlayer/backend").RegisterQuery, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").RegisterResult>;
118
- logout: (otherOptions?: FetcherOptions) => Promise<void>;
119
- resetPassword: (params: import("@intlayer/backend").ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ResetPasswordResult>;
120
- askResetPassword: (email: import("@intlayer/backend").AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskResetPasswordResult>;
121
- checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CheckIfUserHasPasswordResult>;
122
- verifyEmail: ({ userId, secret }: import("@intlayer/backend").ValidEmailParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").ValidEmailResult>;
123
- getVerifyEmailStatusURL: (userId: string | import("@intlayer/backend").UserAPI["_id"]) => string;
124
- changePassword: (data: import("@intlayer/backend").UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdatePasswordResult>;
125
- createSession: (data: import("@intlayer/backend").CreateSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").CreateSessionResult>;
126
- getSession: (sessionToken?: import("@intlayer/backend").GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetSessionInformationResult>;
127
- getCSRFToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").SetCSRFTokenResult>;
128
- getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetOAuth2TokenResult>;
129
- };
130
- dictionary: {
131
- getDictionaries: (filters?: import("@intlayer/backend").GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesResult>;
132
- getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionariesKeysResult>;
133
- getDictionary: (dictionaryKey: import("@intlayer/backend").GetDictionaryParams["dictionaryKey"], version?: import("@intlayer/backend").GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetDictionaryResult>;
134
- pushDictionaries: (dictionaries: import("@intlayer/backend").PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").PushDictionariesResult>;
135
- addDictionary: (dictionary: import("@intlayer/backend").AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddDictionaryResult>;
136
- updateDictionary: (dictionaryId: import("@intlayer/backend").UpdateDictionaryParam["dictionaryId"], dictionary: import("@intlayer/backend").UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateDictionaryResult>;
137
- deleteDictionary: (id: import("@intlayer/backend").DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteDictionaryResult>;
138
- };
139
- stripe: {
140
- getSubscription: (body?: import("@intlayer/backend").GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
141
- cancelSubscription: (otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetCheckoutSessionResult>;
142
- };
143
- ai: {
144
- auditContentDeclaration: (body?: import("@intlayer/backend").AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationResult>;
145
- auditContentDeclarationField: (body?: import("@intlayer/backend").AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationFieldResult>;
146
- auditContentDeclarationMetadata: (body?: import("@intlayer/backend").AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditContentDeclarationMetadataResult>;
147
- auditTag: (body?: import("@intlayer/backend").AuditTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AuditTagResult>;
148
- askDocQuestion: (body?: import("@intlayer/backend").AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AskDocQuestionResult>;
149
- };
150
- tag: {
151
- getTags: (filters?: import("@intlayer/backend").GetTagsParams, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").GetTagsResult>;
152
- addTag: (tag: import("@intlayer/backend").AddTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").AddTagResult>;
153
- updateTag: (tagId: import("@intlayer/backend").UpdateTagParams["tagId"], tag: import("@intlayer/backend").UpdateTagBody, otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").UpdateTagResult>;
154
- deleteTag: (tagId: import("@intlayer/backend").DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<import("@intlayer/backend").DeleteTagResult>;
155
- };
156
- };
1
+ export * from './getIntlayerAPI/index';
2
+ export * from './distantDictionary/index';
3
+ export * from './fetcher';
157
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAOhD,eAAO,MAAM,cAAc,oBACT,cAAc,mBACb,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU/B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@intlayer/api",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "private": false,
5
- "description": "API",
5
+ "description": "SDK for interacting with the Intlayer API, enabling content auditing, and managing organizations, projects, and users.",
6
6
  "keywords": [
7
7
  "intlayer",
8
8
  "application",
@@ -57,7 +57,7 @@
57
57
  "./package.json"
58
58
  ],
59
59
  "dependencies": {
60
- "@intlayer/config": "4.0.2"
60
+ "@intlayer/config": "4.0.4"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@changesets/changelog-github": "0.5.0",
@@ -71,14 +71,14 @@
71
71
  "tsc-alias": "^1.8.10",
72
72
  "tsup": "^8.3.5",
73
73
  "typescript": "^5.7.3",
74
- "@intlayer/backend": "4.0.2",
74
+ "@intlayer/backend": "4.0.4",
75
75
  "@utils/eslint-config": "1.0.4",
76
- "@utils/ts-config-types": "1.0.4",
77
76
  "@utils/ts-config": "1.0.4",
78
- "@utils/tsup-config": "1.0.4"
77
+ "@utils/tsup-config": "1.0.4",
78
+ "@utils/ts-config-types": "1.0.4"
79
79
  },
80
80
  "peerDependencies": {
81
- "@intlayer/config": "4.0.2"
81
+ "@intlayer/config": "4.0.4"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=14.18"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ai.ts"],"sourcesContent":["import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationFieldBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationFieldResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationMetadataBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationMetadataResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditContentDeclarationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditTagBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AuditTagResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AskDocQuestionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AskDocQuestionResult,\n // @ts-ignore: @intlayer/backend is not built yet\n} from '@intlayer/backend';\n\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from './fetcher';\n\nexport const getAiAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { backendURL } = (intlayerConfig ?? getConfiguration()).editor;\n const AI_API_ROUTE = `${backendURL}/api/ai`;\n\n /**\n * Audits a content declaration file\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclaration = async (\n body?: AuditContentDeclarationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationResult>(\n `${AI_API_ROUTE}/audit/content-declaration`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration field\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationField = async (\n body?: AuditContentDeclarationFieldBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationFieldResult>(\n `${AI_API_ROUTE}/audit/content-declaration/field`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a content declaration file to retrieve title, description and tags\n * @param body - Audit file parameters.\n * @returns Audited file content.\n */\n const auditContentDeclarationMetadata = async (\n body?: AuditContentDeclarationMetadataBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditContentDeclarationMetadataResult>(\n `${AI_API_ROUTE}/audit/content-declaration/metadata`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Audits a tag\n * @param body - Audit tag parameters.\n * @returns Audited tag content.\n */\n const auditTag = async (\n body?: AuditTagBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AuditTagResult>(\n `${AI_API_ROUTE}/audit/tag`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n /**\n * Asks a question to the AI related to the documentation\n */\n const askDocQuestion = async (\n body?: AskDocQuestionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AskDocQuestionResult>(\n `${AI_API_ROUTE}/ask`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: body,\n }\n );\n\n return {\n auditContentDeclaration,\n auditContentDeclarationField,\n auditContentDeclarationMetadata,\n auditTag,\n askDocQuestion,\n };\n};\n\nexport const userAPI = getAiAPI();\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBA,oBAAsD;AACtD,qBAA6C;AAEtC,MAAM,WAAW,CACtB,iBAAiC,CAAC,GAClC,mBACG;AACH,QAAM,EAAE,WAAW,KAAK,sBAAkB,gCAAiB,GAAG;AAC9D,QAAM,eAAe,GAAG,UAAU;AAOlC,QAAM,0BAA0B,OAC9B,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,+BAA+B,OACnC,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,kCAAkC,OACtC,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAOF,QAAM,WAAW,OACf,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAKF,QAAM,iBAAiB,OACrB,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,YAAY;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,UAAU,SAAS;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/auth.ts"],"sourcesContent":["import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AskResetPasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AskResetPasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateSessionBody,\n // @ts-ignore: @intlayer/backend is not built yet\n CreateSessionResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetSessionInformationQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n GithubLoginQueryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GoogleLoginQueryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetSessionInformationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n LoginBody,\n // @ts-ignore: @intlayer/backend is not built yet\n LoginResult,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterBody,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n RegisterResult,\n // @ts-ignore: @intlayer/backend is not built yet\n ResetPasswordParams,\n // @ts-ignore: @intlayer/backend is not built yet\n ResetPasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdatePasswordBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdatePasswordResult,\n // @ts-ignore: @intlayer/backend is not built yet\n ValidEmailParams,\n // @ts-ignore: @intlayer/backend is not built yet\n ValidEmailResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SetCSRFTokenResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOAuth2TokenBody,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOAuth2TokenResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UserAPI,\n // @ts-ignore: @intlayer/backend is not built yet\n CheckIfUserHasPasswordResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from './fetcher';\n\nexport const getAuthAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { backendURL, clientId, clientSecret } = (\n intlayerConfig ?? getConfiguration()\n ).editor;\n const AUTH_API_ROUTE = `${backendURL}/api/auth`;\n\n /**\n * Logs in a user with the provided credentials.\n * @param user - User credentials.\n */\n const login = async (user: LoginBody, otherOptions: FetcherOptions = {}) =>\n await fetcher<LoginResult>(\n `${AUTH_API_ROUTE}/login`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Gets the login with GitHub URL.\n * @param params - The parameters for the login with GitHub URL.\n * @returns The login with GitHub URL.\n */\n const getLoginWithGitHubURL = (params: GithubLoginQueryParams): string => {\n const searchParams = new URLSearchParams(params);\n\n return `${AUTH_API_ROUTE}/login/github?${searchParams.toString()}`;\n };\n\n /**\n * Gets the login with Google URL.\n * @param params - The parameters for the login with Google URL.\n * @returns The login with Google URL.\n */\n const getLoginWithGoogleURL = (params: GoogleLoginQueryParams): string => {\n const searchParams = new URLSearchParams(params);\n\n return `${AUTH_API_ROUTE}/login/google?${searchParams.toString()}`;\n };\n\n /**\n * Registers a new user with the provided credentials.\n * @param user - User credentials.\n * @returns User object.\n */\n const register = async (\n user: RegisterBody,\n query: RegisterQuery = {},\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<RegisterResult>(\n `${AUTH_API_ROUTE}/register`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n params: query,\n }\n );\n\n /**\n * Signs out the user.\n * @returns User object.\n */\n const logout = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<void>(\n `${AUTH_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n /**\n * Ask to resets the password of a user with the provided email address.\n * @param email - Email address of the user.\n * @returns User object.\n */\n const askResetPassword = async (\n email: AskResetPasswordBody['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AskResetPasswordResult>(\n `${AUTH_API_ROUTE}/password/reset`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: { email },\n }\n );\n\n /**\n * Resets the password of a user with the provided email address.\n * @param email - Email address of the user.\n * @returns User object.\n */\n const resetPassword = async (\n params: ResetPasswordParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ResetPasswordResult>(\n `${AUTH_API_ROUTE}/password/reset`,\n authAPIOptions,\n otherOptions,\n { params, method: 'POST' }\n );\n\n /**\n * Changes the password of a user with the provided data.\n * @param data - New password and confirmation.\n * @returns User object.\n */\n const changePassword = async (\n data: UpdatePasswordBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdatePasswordResult>(\n `${AUTH_API_ROUTE}/password`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: data,\n }\n );\n\n /**\n * Checks if a user has a password.\n * @param params - User ID.\n * @returns User object.\n */\n const checkIfUserHasPassword = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<CheckIfUserHasPasswordResult>(\n `${AUTH_API_ROUTE}/password/has`,\n authAPIOptions,\n otherOptions,\n {\n method: 'GET',\n }\n );\n\n /**\n * Verifies the email address of a user with the provided token.\n * @param params - User ID and secret key.\n * @returns User object.\n */\n const verifyEmail = async (\n { userId, secret }: ValidEmailParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<ValidEmailResult>(\n `${AUTH_API_ROUTE}/active/${userId}/${secret}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Gets the verify email status URL to use in the SSE.\n * @param userId - User ID.\n * @returns The verify email status URL.\n */\n const getVerifyEmailStatusURL = (userId: string | UserAPI['_id']) =>\n `${AUTH_API_ROUTE}/verify-email-status/${String(userId)}`;\n\n /**\n * Creates a session for a user.\n * @param params - User ID and secret key.\n * @returns User object.\n */\n const createSession = async (\n data: CreateSessionBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateSessionResult>(\n `${AUTH_API_ROUTE}/session`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: data,\n }\n );\n\n /**\n * Gets a session and user.\n * @param sessionToken - Session token.\n * @param otherOptions - Fetcher options.\n * @returns Session and user information.\n */\n const getSession = async (\n sessionToken?: GetSessionInformationQuery['session_token'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetSessionInformationResult>(\n `${backendURL}/session`,\n authAPIOptions,\n otherOptions,\n { params: { session_token: sessionToken } }\n );\n\n /**\n * Gets the CSRF token.\n * @param otherOptions - Fetcher options.\n * @returns The CSRF token.\n */\n const getCSRFToken = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<SetCSRFTokenResult>(\n `${backendURL}/csrf-token`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Gets an oAuth2 accessToken\n * @return The token information\n */\n const getOAuth2AccessToken = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetOAuth2TokenResult>(\n `${backendURL}/oauth2/token`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: {\n grant_type: 'client_credentials',\n client_id: clientId!,\n client_secret: clientSecret!,\n } satisfies GetOAuth2TokenBody,\n }\n );\n\n return {\n login,\n getLoginWithGitHubURL,\n getLoginWithGoogleURL,\n register,\n logout,\n resetPassword,\n askResetPassword,\n checkIfUserHasPassword,\n verifyEmail,\n getVerifyEmailStatusURL,\n changePassword,\n createSession,\n getSession,\n getCSRFToken,\n getOAuth2AccessToken,\n };\n};\n\nexport const authAPI = getAuthAPI();\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmDA,oBAAsD;AACtD,qBAA6C;AAEtC,MAAM,aAAa,CACxB,iBAAiC,CAAC,GAClC,mBACG;AACH,QAAM,EAAE,YAAY,UAAU,aAAa,KACzC,sBAAkB,gCAAiB,GACnC;AACF,QAAM,iBAAiB,GAAG,UAAU;AAMpC,QAAM,QAAQ,OAAO,MAAiB,eAA+B,CAAC,MACpE,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAOF,QAAM,wBAAwB,CAAC,WAA2C;AACxE,UAAM,eAAe,IAAI,gBAAgB,MAAM;AAE/C,WAAO,GAAG,cAAc,iBAAiB,aAAa,SAAS,CAAC;AAAA,EAClE;AAOA,QAAM,wBAAwB,CAAC,WAA2C;AACxE,UAAM,eAAe,IAAI,gBAAgB,MAAM;AAE/C,WAAO,GAAG,cAAc,iBAAiB,aAAa,SAAS,CAAC;AAAA,EAClE;AAOA,QAAM,WAAW,OACf,MACA,QAAuB,CAAC,GACxB,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,QAAQ;AAAA,IACV;AAAA,EACF;AAMF,QAAM,SAAS,OAAO,eAA+B,CAAC,MACpD,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAOF,QAAM,mBAAmB,OACvB,OACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM,EAAE,MAAM;AAAA,IAChB;AAAA,EACF;AAOF,QAAM,gBAAgB,OACpB,QACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA,EAAE,QAAQ,QAAQ,OAAO;AAAA,EAC3B;AAOF,QAAM,iBAAiB,OACrB,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAOF,QAAM,yBAAyB,OAAO,eAA+B,CAAC,MACpE,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAOF,QAAM,cAAc,OAClB,EAAE,QAAQ,OAAO,GACjB,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,cAAc,WAAW,MAAM,IAAI,MAAM;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAOF,QAAM,0BAA0B,CAAC,WAC/B,GAAG,cAAc,wBAAwB,OAAO,MAAM,CAAC;AAOzD,QAAM,gBAAgB,OACpB,MACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,cAAc;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAQF,QAAM,aAAa,OACjB,cACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,UAAU;AAAA,IACb;AAAA,IACA;AAAA,IACA,EAAE,QAAQ,EAAE,eAAe,aAAa,EAAE;AAAA,EAC5C;AAOF,QAAM,eAAe,OAAO,eAA+B,CAAC,MAC1D,UAAM;AAAA,IACJ,GAAG,UAAU;AAAA,IACb;AAAA,IACA;AAAA,EACF;AAMF,QAAM,uBAAuB,OAAO,eAA+B,CAAC,MAClE,UAAM;AAAA,IACJ,GAAG,UAAU;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,gBAAgB;AAAA,MAClB;AAAA,MACA,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,WAAW;AAAA,QACX,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,UAAU,WAAW;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/dictionary.ts"],"sourcesContent":["import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddDictionaryBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteDictionaryParam,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryParam,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n PushDictionariesBody,\n // @ts-ignore: @intlayer/backend is not built yet\n PushDictionariesResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryQuery,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionaryResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetDictionariesKeysResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from './fetcher';\n\nexport const getDictionaryAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { backendURL } = (intlayerConfig ?? getConfiguration()).editor;\n const PROJECT_API_ROUTE = `${backendURL}/api/dictionary`;\n\n /**\n * Retrieves a list of dictionaries based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getDictionaries = async (\n filters?: GetDictionariesParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetDictionariesResult>(\n PROJECT_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves a list of dictionary keys related to the project.\n */\n const getDictionariesKeys = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<GetDictionariesKeysResult>(\n `${PROJECT_API_ROUTE}/keys`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Retrieves a dictionary by its key and version.\n * @param dictionaryKey - Dictionary key.\n * @param version - Dictionary version of content.\n */\n const getDictionary = async (\n dictionaryKey: GetDictionaryParams['dictionaryKey'],\n version?: GetDictionaryQuery['version'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetDictionaryResult>(\n `${PROJECT_API_ROUTE}/${dictionaryKey}`,\n authAPIOptions,\n otherOptions,\n {\n params: version ? { version: version.toString() } : undefined,\n }\n );\n\n /**\n * Adds a new dictionary to the database.\n * @param dictionary - Dictionary data.\n */\n const addDictionary = async (\n dictionary: AddDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: dictionary,\n }\n );\n\n const pushDictionaries = async (\n dictionaries: PushDictionariesBody['dictionaries'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<PushDictionariesResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PATCH',\n body: { dictionaries },\n }\n );\n\n /**\n * Updates an existing dictionary in the database.\n * @param dictionary - Updated dictionary data.\n */\n const updateDictionary = async (\n dictionaryId: UpdateDictionaryParam['dictionaryId'],\n dictionary: UpdateDictionaryBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateDictionaryResult>(\n `${PROJECT_API_ROUTE}/${dictionaryId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: dictionary,\n }\n );\n\n /**\n * Deletes a dictionary from the database by its ID.\n * @param id - Dictionary ID.\n */\n const deleteDictionary = async (\n id: DeleteDictionaryParam['dictionaryId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<DeleteDictionaryResult>(\n `${PROJECT_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n body: { id },\n }\n );\n\n return {\n getDictionaries,\n getDictionariesKeys,\n getDictionary,\n pushDictionaries,\n addDictionary,\n updateDictionary,\n deleteDictionary,\n };\n};\n\nexport const dictionaryAPI = getDictionaryAPI();\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCA,oBAAsD;AACtD,qBAA6C;AAEtC,MAAM,mBAAmB,CAC9B,iBAAiC,CAAC,GAClC,mBACG;AACH,QAAM,EAAE,WAAW,KAAK,sBAAkB,gCAAiB,GAAG;AAC9D,QAAM,oBAAoB,GAAG,UAAU;AAMvC,QAAM,kBAAkB,OACtB,SACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAKF,QAAM,sBAAsB,OAAO,eAA+B,CAAC,MACjE,UAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,EACF;AAOF,QAAM,gBAAgB,OACpB,eACA,SACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,iBAAiB,IAAI,aAAa;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ,UAAU,EAAE,SAAS,QAAQ,SAAS,EAAE,IAAI;AAAA,IACtD;AAAA,EACF;AAMF,QAAM,gBAAgB,OACpB,YACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAEF,QAAM,mBAAmB,OACvB,cACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM,EAAE,aAAa;AAAA,IACvB;AAAA,EACF;AAMF,QAAM,mBAAmB,OACvB,cACA,YACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,iBAAiB,IAAI,YAAY;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAMF,QAAM,mBAAmB,OACvB,IACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,iBAAiB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM,EAAE,GAAG;AAAA,IACb;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,gBAAgB,iBAAiB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/organization.ts"],"sourcesContent":["import type {\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n DeleteOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationParam,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationsParams,\n // @ts-ignore: @intlayer/backend is not built yet\n GetOrganizationsResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectOrganizationParam,\n // @ts-ignore: @intlayer/backend is not built yet\n SelectOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UnselectOrganizationResult,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationMembersBody,\n // @ts-ignore: @intlayer/backend is not built yet\n UpdateOrganizationMembersResult,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationMemberBody,\n // @ts-ignore: @intlayer/backend is not built yet\n AddOrganizationMemberResult,\n // @ts-ignore @intlayer/backend is not build yet\n} from '@intlayer/backend';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config/client';\nimport { fetcher, type FetcherOptions } from './fetcher';\n\nexport const getOrganizationAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const { backendURL } = (intlayerConfig ?? getConfiguration()).editor;\n const ORGANIZATION_API_ROUTE = `${backendURL}/api/organization`;\n\n /**\n * Retrieves a list of organizations based on filters and pagination.\n * @param filters - Filters and pagination options.\n */\n const getOrganizations = async (\n filters?: GetOrganizationsParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationsResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n params: filters,\n }\n );\n\n /**\n * Retrieves an organization by its ID.\n * @param organizationId - Organization ID.\n */\n const getOrganization = async (\n organizationId: GetOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions\n );\n\n /**\n * Adds a new organization to the database.\n * @param organization - Organization data.\n */\n const addOrganization = async (\n organization: AddOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<AddOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: organization,\n }\n );\n\n /**\n * Updates an existing organization in the database.\n * @param organization - Updated organization data.\n */\n const updateOrganization = async (\n organization: UpdateOrganizationBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: organization,\n }\n );\n\n /**\n * Update members to the organization in the database.\n * @param body - Updated organization members data.\n */\n const updateOrganizationMembers = async (\n body: UpdateOrganizationMembersBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<UpdateOrganizationMembersResult>(\n `${ORGANIZATION_API_ROUTE}/members`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body,\n }\n );\n\n /**\n * Add member to the organization in the database.\n * @param body - Updated organization members data.\n */\n const addOrganizationMember = async (\n body: AddOrganizationMemberBody,\n otherOptions: FetcherOptions = {}\n ) =>\n fetcher<AddOrganizationMemberResult>(\n `${ORGANIZATION_API_ROUTE}/member`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body,\n }\n );\n\n /**\n * Deletes an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const deleteOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<DeleteOrganizationResult>(\n ORGANIZATION_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Select an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const selectOrganization = async (\n organizationId: SelectOrganizationParam['organizationId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<SelectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/${String(organizationId)}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n }\n );\n\n /**\n * Unselect an organization from the database by its ID.\n * @param organizationId - Organization ID.\n */\n const unselectOrganization = async (otherOptions: FetcherOptions = {}) =>\n await fetcher<UnselectOrganizationResult>(\n `${ORGANIZATION_API_ROUTE}/logout`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n }\n );\n\n return {\n getOrganizations,\n getOrganization,\n addOrganization,\n addOrganizationMember,\n updateOrganization,\n updateOrganizationMembers,\n deleteOrganization,\n selectOrganization,\n unselectOrganization,\n };\n};\n\nexport const organizationAPI = getOrganizationAPI();\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmCA,oBAAsD;AACtD,qBAA6C;AAEtC,MAAM,qBAAqB,CAChC,iBAAiC,CAAC,GAClC,mBACG;AACH,QAAM,EAAE,WAAW,KAAK,sBAAkB,gCAAiB,GAAG;AAC9D,QAAM,yBAAyB,GAAG,UAAU;AAM5C,QAAM,mBAAmB,OACvB,SACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAMF,QAAM,kBAAkB,OACtB,gBACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,sBAAsB,IAAI,OAAO,cAAc,CAAC;AAAA,IACnD;AAAA,IACA;AAAA,EACF;AAMF,QAAM,kBAAkB,OACtB,cACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAMF,QAAM,qBAAqB,OACzB,cACA,eAA+B,CAAC,UAEhC;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAMF,QAAM,4BAA4B,OAChC,MACA,eAA+B,CAAC,UAEhC;AAAA,IACE,GAAG,sBAAsB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAMF,QAAM,wBAAwB,OAC5B,MACA,eAA+B,CAAC,UAEhC;AAAA,IACE,GAAG,sBAAsB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAMF,QAAM,qBAAqB,OAAO,eAA+B,CAAC,MAChE,UAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAMF,QAAM,qBAAqB,OACzB,gBACA,eAA+B,CAAC,MAEhC,UAAM;AAAA,IACJ,GAAG,sBAAsB,IAAI,OAAO,cAAc,CAAC;AAAA,IACnD;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAMF,QAAM,uBAAuB,OAAO,eAA+B,CAAC,MAClE,UAAM;AAAA,IACJ,GAAG,sBAAsB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,IACV;AAAA,EACF;AAEF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,kBAAkB,mBAAmB;","names":[]}