@intlayer/api 3.5.8

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 (63) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +240 -0
  3. package/dist/cjs/ai.cjs +89 -0
  4. package/dist/cjs/ai.cjs.map +1 -0
  5. package/dist/cjs/auth.cjs +166 -0
  6. package/dist/cjs/auth.cjs.map +1 -0
  7. package/dist/cjs/dictionary.cjs +103 -0
  8. package/dist/cjs/dictionary.cjs.map +1 -0
  9. package/dist/cjs/fetcher.cjs +98 -0
  10. package/dist/cjs/fetcher.cjs.map +1 -0
  11. package/dist/cjs/index.cjs +49 -0
  12. package/dist/cjs/index.cjs.map +1 -0
  13. package/dist/cjs/organization.cjs +121 -0
  14. package/dist/cjs/organization.cjs.map +1 -0
  15. package/dist/cjs/project.cjs +135 -0
  16. package/dist/cjs/project.cjs.map +1 -0
  17. package/dist/cjs/stripe.cjs +55 -0
  18. package/dist/cjs/stripe.cjs.map +1 -0
  19. package/dist/cjs/tag.cjs +77 -0
  20. package/dist/cjs/tag.cjs.map +1 -0
  21. package/dist/cjs/user.cjs +95 -0
  22. package/dist/cjs/user.cjs.map +1 -0
  23. package/dist/esm/ai.mjs +64 -0
  24. package/dist/esm/ai.mjs.map +1 -0
  25. package/dist/esm/auth.mjs +141 -0
  26. package/dist/esm/auth.mjs.map +1 -0
  27. package/dist/esm/dictionary.mjs +78 -0
  28. package/dist/esm/dictionary.mjs.map +1 -0
  29. package/dist/esm/fetcher.mjs +73 -0
  30. package/dist/esm/fetcher.mjs.map +1 -0
  31. package/dist/esm/index.mjs +24 -0
  32. package/dist/esm/index.mjs.map +1 -0
  33. package/dist/esm/organization.mjs +96 -0
  34. package/dist/esm/organization.mjs.map +1 -0
  35. package/dist/esm/project.mjs +110 -0
  36. package/dist/esm/project.mjs.map +1 -0
  37. package/dist/esm/stripe.mjs +31 -0
  38. package/dist/esm/stripe.mjs.map +1 -0
  39. package/dist/esm/tag.mjs +52 -0
  40. package/dist/esm/tag.mjs.map +1 -0
  41. package/dist/esm/user.mjs +70 -0
  42. package/dist/esm/user.mjs.map +1 -0
  43. package/dist/types/ai.d.ts +18 -0
  44. package/dist/types/ai.d.ts.map +1 -0
  45. package/dist/types/auth.d.ts +38 -0
  46. package/dist/types/auth.d.ts.map +1 -0
  47. package/dist/types/dictionary.d.ts +22 -0
  48. package/dist/types/dictionary.d.ts.map +1 -0
  49. package/dist/types/fetcher.d.ts +70 -0
  50. package/dist/types/fetcher.d.ts.map +1 -0
  51. package/dist/types/index.d.ts +157 -0
  52. package/dist/types/index.d.ts.map +1 -0
  53. package/dist/types/organization.d.ts +26 -0
  54. package/dist/types/organization.d.ts.map +1 -0
  55. package/dist/types/project.d.ts +28 -0
  56. package/dist/types/project.d.ts.map +1 -0
  57. package/dist/types/stripe.d.ts +8 -0
  58. package/dist/types/stripe.d.ts.map +1 -0
  59. package/dist/types/tag.d.ts +16 -0
  60. package/dist/types/tag.d.ts.map +1 -0
  61. package/dist/types/user.d.ts +22 -0
  62. package/dist/types/user.d.ts.map +1 -0
  63. package/package.json +99 -0
@@ -0,0 +1,18 @@
1
+ import type { AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationMetadataBody, AuditTagBody, AskDocQuestionBody } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getAiAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
6
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
7
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
8
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
9
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<AskDocQuestionResult>;
10
+ };
11
+ export declare const userAPI: {
12
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
13
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
14
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
15
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
16
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<AskDocQuestionResult>;
17
+ };
18
+ //# sourceMappingURL=ai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,gCAAgC,EAEhC,mCAAmC,EAGnC,YAAY,EAEZ,kBAAkB,EAGnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,QAAQ,oBACH,cAAc,mBACb,cAAc;qCAWtB,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;4BAgBrB,kBAAkB,iBACX,cAAc;CAmB/B,CAAC;AAEF,eAAO,MAAM,OAAO;qCAhGT,2BAA2B,iBACpB,cAAc;0CAkBrB,gCAAgC,iBACzB,cAAc;6CAkBrB,mCAAmC,iBAC5B,cAAc;sBAkBrB,YAAY,iBACL,cAAc;4BAgBrB,kBAAkB,iBACX,cAAc;CAqBC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { AskResetPasswordBody, CreateSessionBody, GetSessionInformationQuery, GithubLoginQueryParams, GoogleLoginQueryParams, LoginBody, RegisterBody, RegisterQuery, ResetPasswordParams, UpdatePasswordBody, ValidEmailParams, UserAPI } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getAuthAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ login: (user: LoginBody, otherOptions?: FetcherOptions) => Promise<LoginResult>;
6
+ getLoginWithGitHubURL: (params: GithubLoginQueryParams) => string;
7
+ getLoginWithGoogleURL: (params: GoogleLoginQueryParams) => string;
8
+ register: (user: RegisterBody, query?: RegisterQuery, otherOptions?: FetcherOptions) => Promise<RegisterResult>;
9
+ logout: (otherOptions?: FetcherOptions) => Promise<void>;
10
+ resetPassword: (params: ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<ResetPasswordResult>;
11
+ askResetPassword: (email: AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<AskResetPasswordResult>;
12
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<CheckIfUserHasPasswordResult>;
13
+ verifyEmail: ({ userId, secret }: ValidEmailParams, otherOptions?: FetcherOptions) => Promise<ValidEmailResult>;
14
+ getVerifyEmailStatusURL: (userId: string | UserAPI["_id"]) => string;
15
+ changePassword: (data: UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<UpdatePasswordResult>;
16
+ createSession: (data: CreateSessionBody, otherOptions?: FetcherOptions) => Promise<CreateSessionResult>;
17
+ getSession: (sessionToken?: GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<GetSessionInformationResult>;
18
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<SetCSRFTokenResult>;
19
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
20
+ };
21
+ export declare const authAPI: {
22
+ login: (user: LoginBody, otherOptions?: FetcherOptions) => Promise<LoginResult>;
23
+ getLoginWithGitHubURL: (params: GithubLoginQueryParams) => string;
24
+ getLoginWithGoogleURL: (params: GoogleLoginQueryParams) => string;
25
+ register: (user: RegisterBody, query?: RegisterQuery, otherOptions?: FetcherOptions) => Promise<RegisterResult>;
26
+ logout: (otherOptions?: FetcherOptions) => Promise<void>;
27
+ resetPassword: (params: ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<ResetPasswordResult>;
28
+ askResetPassword: (email: AskResetPasswordBody["email"], otherOptions?: FetcherOptions) => Promise<AskResetPasswordResult>;
29
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<CheckIfUserHasPasswordResult>;
30
+ verifyEmail: ({ userId, secret }: ValidEmailParams, otherOptions?: FetcherOptions) => Promise<ValidEmailResult>;
31
+ getVerifyEmailStatusURL: (userId: string | UserAPI["_id"]) => string;
32
+ changePassword: (data: UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<UpdatePasswordResult>;
33
+ createSession: (data: CreateSessionBody, otherOptions?: FetcherOptions) => Promise<CreateSessionResult>;
34
+ getSession: (sessionToken?: GetSessionInformationQuery["session_token"], otherOptions?: FetcherOptions) => Promise<GetSessionInformationResult>;
35
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<SetCSRFTokenResult>;
36
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
37
+ };
38
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,iBAAiB,EAEjB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EAEtB,SAAS,EAET,YAAY,EACZ,aAAa,EAEb,mBAAmB,EAEnB,kBAAkB,EAElB,gBAAgB,EAKhB,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,UAAU,oBACL,cAAc,mBACb,cAAc;kBAWJ,SAAS,iBAAgB,cAAc;oCAgB3B,sBAAsB,KAAG,MAAM;oCAW/B,sBAAsB,KAAG,MAAM;qBAY9D,YAAY,UACX,aAAa,iBACN,cAAc;4BAiBM,cAAc;4BAmCxC,mBAAmB,iBACb,cAAc;8BApBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;4CAoDsB,cAAc;sCAgB5C,gBAAgB,iBACtB,cAAc;sCAgBW,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;2BAnDxD,kBAAkB,iBACV,cAAc;0BA2DtB,iBAAiB,iBACT,cAAc;gCAmBb,0BAA0B,CAAC,eAAe,CAAC,iBAC5C,cAAc;kCAcY,cAAc;0CAWN,cAAc;CAmCjE,CAAC;AAEF,eAAO,MAAM,OAAO;kBA5PS,SAAS,iBAAgB,cAAc;oCAgB3B,sBAAsB,KAAG,MAAM;oCAW/B,sBAAsB,KAAG,MAAM;qBAY9D,YAAY,UACX,aAAa,iBACN,cAAc;4BAiBM,cAAc;4BAmCxC,mBAAmB,iBACb,cAAc;8BApBrB,oBAAoB,CAAC,OAAO,CAAC,iBACtB,cAAc;4CAoDsB,cAAc;sCAgB5C,gBAAgB,iBACtB,cAAc;sCAgBW,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;2BAnDxD,kBAAkB,iBACV,cAAc;0BA2DtB,iBAAiB,iBACT,cAAc;gCAmBb,0BAA0B,CAAC,eAAe,CAAC,iBAC5C,cAAc;kCAcY,cAAc;0CAWN,cAAc;CAqC/B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { AddDictionaryBody, DeleteDictionaryParam, GetDictionariesParams, UpdateDictionaryParam, UpdateDictionaryBody, PushDictionariesBody, GetDictionaryParams, GetDictionaryQuery } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getDictionaryAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
6
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
7
+ getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
8
+ pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
9
+ addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
10
+ updateDictionary: (dictionaryId: UpdateDictionaryParam["dictionaryId"], dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
11
+ deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
12
+ };
13
+ export declare const dictionaryAPI: {
14
+ getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
15
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
16
+ getDictionary: (dictionaryKey: GetDictionaryParams["dictionaryKey"], version?: GetDictionaryQuery["version"], otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
17
+ pushDictionaries: (dictionaries: PushDictionariesBody["dictionaries"], otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
18
+ addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
19
+ updateDictionary: (dictionaryId: UpdateDictionaryParam["dictionaryId"], dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
20
+ deleteDictionary: (id: DeleteDictionaryParam["dictionaryId"], otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
21
+ };
22
+ //# sourceMappingURL=dictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../src/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,qBAAqB,EAErB,qBAAqB,EAErB,qBAAqB,EACrB,oBAAoB,EAEpB,oBAAoB,EAEpB,mBAAmB,EACnB,kBAAkB,EAInB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,gBAAgB,oBACX,cAAc,mBACb,cAAc;gCAUnB,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;gCAfhB,iBAAiB,iBACf,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAqB/B,CAAC;AAEF,eAAO,MAAM,aAAa;gCAzHZ,qBAAqB,iBACjB,cAAc;yCAcmB,cAAc;mCAa9C,mBAAmB,CAAC,eAAe,CAAC,YACzC,kBAAkB,CAAC,SAAS,CAAC,iBACzB,cAAc;qCA8Bd,oBAAoB,CAAC,cAAc,CAAC,iBACpC,cAAc;gCAfhB,iBAAiB,iBACf,cAAc;qCA+Bd,qBAAqB,CAAC,cAAc,CAAC,cACvC,oBAAoB,iBAClB,cAAc;2BAiBxB,qBAAqB,CAAC,cAAc,CAAC,iBAC3B,cAAc;CAuBe,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Type definition for options used in the fetcher function.
3
+ * Extends the standard RequestInit interface (excluding 'body'),
4
+ * and adds 'body' and 'params' properties for convenience.
5
+ */
6
+ export type FetcherOptions = Omit<RequestInit, 'body'> & {
7
+ /**
8
+ * Body of the request. Should be a key-value pair object.
9
+ */
10
+ body?: Record<string, unknown>;
11
+ /**
12
+ * Query parameters to be appended to the URL.
13
+ */
14
+ params?: Record<string, string | string[] | undefined> | string[] | URLSearchParams;
15
+ };
16
+ /**
17
+ * Default options for the fetcher function.
18
+ * Sets the default method to 'GET', the 'Content-Type' header to 'application/json',
19
+ * and includes credentials in the request.
20
+ */
21
+ export declare const fetcherOptions: FetcherOptions;
22
+ /**
23
+ * Fetcher function to make HTTP requests.
24
+ * It merges default options with user-provided options,
25
+ * handles query parameters and request body,
26
+ * and returns the parsed JSON response.
27
+ *
28
+ * @template T - The expected type of the response data.
29
+ * @param url - The endpoint URL.
30
+ * @param options - Additional options to customize the request.
31
+ * @returns A promise that resolves with the response data of type T.
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * // Making a GET request with query parameters
36
+ * const data = await fetcher<MyResponseType>('https://api.example.com/data', {
37
+ * params: { search: 'query' },
38
+ * });
39
+ *
40
+ * // Making a POST request with a JSON body
41
+ * const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {
42
+ * method: 'POST',
43
+ * body: { key: 'value' },
44
+ * });
45
+ *
46
+ * // Merge body, headers, and params
47
+ * const result = await fetcher<AnotherResponseType>('https://api.example.com/submit', {
48
+ * method: 'POST',
49
+ * body: { key: 'value' },
50
+ * headers: { 'Content-Type': 'application/json' },
51
+ * params: { search: 'query' },
52
+ * },
53
+ * {
54
+ * headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
55
+ * params: { page: 1 },
56
+ * });
57
+ * ```
58
+ *
59
+ * Result:
60
+ * ```typescript
61
+ * {
62
+ * method: 'POST',
63
+ * headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
64
+ * params: { page: 1, search: 'query' },
65
+ * body: { key: 'value' },
66
+ * }
67
+ * ```
68
+ */
69
+ export declare const fetcher: <T>(url: string, ...options: FetcherOptions[]) => Promise<T>;
70
+ //# sourceMappingURL=fetcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../src/fetcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG;IACvD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAC7C,MAAM,EAAE,GACR,eAAe,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,cAM5B,CAAC;AAwCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,OAAO,GAAU,CAAC,OACxB,MAAM,cACC,cAAc,EAAE,KAC3B,OAAO,CAAC,CAAC,CAuEX,CAAC"}
@@ -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?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
6
+ getOrganization: (organizationId: GetOrganizationParam, otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
7
+ addOrganization: (organization: AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationResult>;
8
+ addOrganizationMember: (body: AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationMemberResult>;
9
+ updateOrganization: (organization: UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationResult>;
10
+ updateOrganizationMembers: (body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
11
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<DeleteOrganizationResult>;
12
+ selectOrganization: (organizationId: SelectOrganizationParam, otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
13
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
14
+ };
15
+ project: {
16
+ getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
17
+ addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
18
+ updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
19
+ updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
20
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
21
+ selectProject: (projectId: SelectProjectParam, otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
22
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
23
+ addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
24
+ deleteAccessKey: (clientId: DeleteAccessKeyBody, otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
25
+ refreshAccessKey: (clientId: RefreshAccessKeyBody, otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
26
+ };
27
+ user: {
28
+ createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
29
+ getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
30
+ getUserById: (userId: GetUserByIdParams, otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
31
+ getUserByAccount: (providerAccountId: GetUserByAccountParams, provider: GetUserByAccountParams, otherOptions?: FetcherOptions) => Promise<GetUserByAccountResult>;
32
+ getUserByEmail: (email: GetUserByEmailParams, otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
33
+ updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
34
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
35
+ };
36
+ auth: {
37
+ login: (user: LoginBody, otherOptions?: FetcherOptions) => Promise<LoginResult>;
38
+ getLoginWithGitHubURL: (params: GithubLoginQueryParams) => string;
39
+ getLoginWithGoogleURL: (params: GoogleLoginQueryParams) => string;
40
+ register: (user: RegisterBody, query?: RegisterQuery, otherOptions?: FetcherOptions) => Promise<RegisterResult>;
41
+ logout: (otherOptions?: FetcherOptions) => Promise<void>;
42
+ resetPassword: (params: ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<ResetPasswordResult>;
43
+ askResetPassword: (email: AskResetPasswordBody, otherOptions?: FetcherOptions) => Promise<AskResetPasswordResult>;
44
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<CheckIfUserHasPasswordResult>;
45
+ verifyEmail: ({ userId, secret }: ValidEmailParams, otherOptions?: FetcherOptions) => Promise<ValidEmailResult>;
46
+ getVerifyEmailStatusURL: (userId: string | UserAPI) => string;
47
+ changePassword: (data: UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<UpdatePasswordResult>;
48
+ createSession: (data: CreateSessionBody, otherOptions?: FetcherOptions) => Promise<CreateSessionResult>;
49
+ getSession: (sessionToken?: GetSessionInformationQuery, otherOptions?: FetcherOptions) => Promise<GetSessionInformationResult>;
50
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<SetCSRFTokenResult>;
51
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
52
+ };
53
+ dictionary: {
54
+ getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
55
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
56
+ getDictionary: (dictionaryKey: GetDictionaryParams, version?: GetDictionaryQuery, otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
57
+ pushDictionaries: (dictionaries: PushDictionariesBody, otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
58
+ addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
59
+ updateDictionary: (dictionaryId: UpdateDictionaryParam, dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
60
+ deleteDictionary: (id: DeleteDictionaryParam, otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
61
+ };
62
+ stripe: {
63
+ getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
64
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
65
+ };
66
+ ai: {
67
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
68
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
69
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
70
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
71
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<AskDocQuestionResult>;
72
+ };
73
+ tag: {
74
+ getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
75
+ addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
76
+ updateTag: (tagId: UpdateTagParams, tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
77
+ deleteTag: (tagId: DeleteTagParams, otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
78
+ };
79
+ };
80
+ export declare const intlayerAPI: {
81
+ organization: {
82
+ getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
83
+ getOrganization: (organizationId: GetOrganizationParam, otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
84
+ addOrganization: (organization: AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationResult>;
85
+ addOrganizationMember: (body: AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationMemberResult>;
86
+ updateOrganization: (organization: UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationResult>;
87
+ updateOrganizationMembers: (body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
88
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<DeleteOrganizationResult>;
89
+ selectOrganization: (organizationId: SelectOrganizationParam, otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
90
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
91
+ };
92
+ project: {
93
+ getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
94
+ addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
95
+ updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
96
+ updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
97
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
98
+ selectProject: (projectId: SelectProjectParam, otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
99
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
100
+ addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
101
+ deleteAccessKey: (clientId: DeleteAccessKeyBody, otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
102
+ refreshAccessKey: (clientId: RefreshAccessKeyBody, otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
103
+ };
104
+ user: {
105
+ createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
106
+ getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
107
+ getUserById: (userId: GetUserByIdParams, otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
108
+ getUserByAccount: (providerAccountId: GetUserByAccountParams, provider: GetUserByAccountParams, otherOptions?: FetcherOptions) => Promise<GetUserByAccountResult>;
109
+ getUserByEmail: (email: GetUserByEmailParams, otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
110
+ updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
111
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
112
+ };
113
+ auth: {
114
+ login: (user: LoginBody, otherOptions?: FetcherOptions) => Promise<LoginResult>;
115
+ getLoginWithGitHubURL: (params: GithubLoginQueryParams) => string;
116
+ getLoginWithGoogleURL: (params: GoogleLoginQueryParams) => string;
117
+ register: (user: RegisterBody, query?: RegisterQuery, otherOptions?: FetcherOptions) => Promise<RegisterResult>;
118
+ logout: (otherOptions?: FetcherOptions) => Promise<void>;
119
+ resetPassword: (params: ResetPasswordParams, otherOptions?: FetcherOptions) => Promise<ResetPasswordResult>;
120
+ askResetPassword: (email: AskResetPasswordBody, otherOptions?: FetcherOptions) => Promise<AskResetPasswordResult>;
121
+ checkIfUserHasPassword: (otherOptions?: FetcherOptions) => Promise<CheckIfUserHasPasswordResult>;
122
+ verifyEmail: ({ userId, secret }: ValidEmailParams, otherOptions?: FetcherOptions) => Promise<ValidEmailResult>;
123
+ getVerifyEmailStatusURL: (userId: string | UserAPI) => string;
124
+ changePassword: (data: UpdatePasswordBody, otherOptions?: FetcherOptions) => Promise<UpdatePasswordResult>;
125
+ createSession: (data: CreateSessionBody, otherOptions?: FetcherOptions) => Promise<CreateSessionResult>;
126
+ getSession: (sessionToken?: GetSessionInformationQuery, otherOptions?: FetcherOptions) => Promise<GetSessionInformationResult>;
127
+ getCSRFToken: (otherOptions?: FetcherOptions) => Promise<SetCSRFTokenResult>;
128
+ getOAuth2AccessToken: (otherOptions?: FetcherOptions) => Promise<GetOAuth2TokenResult>;
129
+ };
130
+ dictionary: {
131
+ getDictionaries: (filters?: GetDictionariesParams, otherOptions?: FetcherOptions) => Promise<GetDictionariesResult>;
132
+ getDictionariesKeys: (otherOptions?: FetcherOptions) => Promise<GetDictionariesKeysResult>;
133
+ getDictionary: (dictionaryKey: GetDictionaryParams, version?: GetDictionaryQuery, otherOptions?: FetcherOptions) => Promise<GetDictionaryResult>;
134
+ pushDictionaries: (dictionaries: PushDictionariesBody, otherOptions?: FetcherOptions) => Promise<PushDictionariesResult>;
135
+ addDictionary: (dictionary: AddDictionaryBody, otherOptions?: FetcherOptions) => Promise<AddDictionaryResult>;
136
+ updateDictionary: (dictionaryId: UpdateDictionaryParam, dictionary: UpdateDictionaryBody, otherOptions?: FetcherOptions) => Promise<UpdateDictionaryResult>;
137
+ deleteDictionary: (id: DeleteDictionaryParam, otherOptions?: FetcherOptions) => Promise<DeleteDictionaryResult>;
138
+ };
139
+ stripe: {
140
+ getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
141
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
142
+ };
143
+ ai: {
144
+ auditContentDeclaration: (body?: AuditContentDeclarationBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationResult>;
145
+ auditContentDeclarationField: (body?: AuditContentDeclarationFieldBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationFieldResult>;
146
+ auditContentDeclarationMetadata: (body?: AuditContentDeclarationMetadataBody, otherOptions?: FetcherOptions) => Promise<AuditContentDeclarationMetadataResult>;
147
+ auditTag: (body?: AuditTagBody, otherOptions?: FetcherOptions) => Promise<AuditTagResult>;
148
+ askDocQuestion: (body?: AskDocQuestionBody, otherOptions?: FetcherOptions) => Promise<AskDocQuestionResult>;
149
+ };
150
+ tag: {
151
+ getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
152
+ addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
153
+ updateTag: (tagId: UpdateTagParams, tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
154
+ deleteTag: (tagId: DeleteTagParams, otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
155
+ };
156
+ };
157
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,26 @@
1
+ import type { AddOrganizationBody, GetOrganizationParam, GetOrganizationsParams, UpdateOrganizationBody, SelectOrganizationParam, UpdateOrganizationMembersBody, AddOrganizationMemberBody } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getOrganizationAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
6
+ getOrganization: (organizationId: GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
7
+ addOrganization: (organization: AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationResult>;
8
+ addOrganizationMember: (body: AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationMemberResult>;
9
+ updateOrganization: (organization: UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationResult>;
10
+ updateOrganizationMembers: (body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
11
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<DeleteOrganizationResult>;
12
+ selectOrganization: (organizationId: SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
13
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
14
+ };
15
+ export declare const organizationAPI: {
16
+ getOrganizations: (filters?: GetOrganizationsParams, otherOptions?: FetcherOptions) => Promise<GetOrganizationsResult>;
17
+ getOrganization: (organizationId: GetOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<GetOrganizationResult>;
18
+ addOrganization: (organization: AddOrganizationBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationResult>;
19
+ addOrganizationMember: (body: AddOrganizationMemberBody, otherOptions?: FetcherOptions) => Promise<AddOrganizationMemberResult>;
20
+ updateOrganization: (organization: UpdateOrganizationBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationResult>;
21
+ updateOrganizationMembers: (body: UpdateOrganizationMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateOrganizationMembersResult>;
22
+ deleteOrganization: (otherOptions?: FetcherOptions) => Promise<DeleteOrganizationResult>;
23
+ selectOrganization: (organizationId: SelectOrganizationParam["organizationId"], otherOptions?: FetcherOptions) => Promise<SelectOrganizationResult>;
24
+ unselectOrganization: (otherOptions?: FetcherOptions) => Promise<UnselectOrganizationResult>;
25
+ };
26
+ //# sourceMappingURL=organization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/organization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAGnB,oBAAoB,EAEpB,sBAAsB,EAEtB,sBAAsB,EAEtB,uBAAuB,EAGvB,6BAA6B,EAE7B,yBAAyB,EAG1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,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"}
@@ -0,0 +1,28 @@
1
+ import type { AddProjectBody, GetProjectsParams, UpdateProjectBody, SelectProjectParam, AddNewAccessKeyBody, DeleteAccessKeyBody, RefreshAccessKeyBody, UpdateProjectMembersBody } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getProjectAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
6
+ addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
7
+ updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
8
+ updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
9
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
10
+ selectProject: (projectId: SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
11
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
12
+ addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
13
+ deleteAccessKey: (clientId: DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
14
+ refreshAccessKey: (clientId: RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
15
+ };
16
+ export declare const projectAPI: {
17
+ getProjects: (filters?: GetProjectsParams, otherOptions?: FetcherOptions) => Promise<GetProjectsResult>;
18
+ addProject: (project: AddProjectBody, otherOptions?: FetcherOptions) => Promise<AddProjectResult>;
19
+ updateProject: (project: UpdateProjectBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectResult>;
20
+ updateProjectMembers: (body: UpdateProjectMembersBody, otherOptions?: FetcherOptions) => Promise<UpdateProjectMembersResult>;
21
+ deleteProject: (otherOptions?: FetcherOptions) => Promise<DeleteProjectResult>;
22
+ selectProject: (projectId: SelectProjectParam["projectId"], otherOptions?: FetcherOptions) => Promise<SelectProjectResult>;
23
+ unselectProject: (otherOptions?: FetcherOptions) => Promise<UnselectProjectResult>;
24
+ addNewAccessKey: (accessKey: AddNewAccessKeyBody, otherOptions?: FetcherOptions) => Promise<AddNewAccessKeyResponse>;
25
+ deleteAccessKey: (clientId: DeleteAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<DeleteAccessKeyResponse>;
26
+ refreshAccessKey: (clientId: RefreshAccessKeyBody["clientId"], otherOptions?: FetcherOptions) => Promise<RefreshAccessKeyResponse>;
27
+ };
28
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAGd,iBAAiB,EAEjB,iBAAiB,EAEjB,kBAAkB,EAGlB,mBAAmB,EAEnB,mBAAmB,EAEnB,oBAAoB,EAEpB,wBAAwB,EAGzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,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"}
@@ -0,0 +1,8 @@
1
+ import type { GetCheckoutSessionBody } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getStripeAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ getSubscription: (body?: GetCheckoutSessionBody, otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
6
+ cancelSubscription: (otherOptions?: FetcherOptions) => Promise<GetCheckoutSessionResult>;
7
+ };
8
+ //# sourceMappingURL=stripe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../src/stripe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EAGvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,YAAY,oBACP,cAAc,mBACb,cAAc;6BAUtB,sBAAsB,iBACf,cAAc;wCAgBkB,cAAc;CAc/D,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AddTagBody, DeleteTagParams, GetTagsParams, UpdateTagBody, UpdateTagParams } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getTagAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
6
+ addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
7
+ updateTag: (tagId: UpdateTagParams["tagId"], tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
8
+ deleteTag: (tagId: DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
9
+ };
10
+ export declare const tagAPI: {
11
+ getTags: (filters?: GetTagsParams, otherOptions?: FetcherOptions) => Promise<GetTagsResult>;
12
+ addTag: (tag: AddTagBody, otherOptions?: FetcherOptions) => Promise<AddTagResult>;
13
+ updateTag: (tagId: UpdateTagParams["tagId"], tag: UpdateTagBody, otherOptions?: FetcherOptions) => Promise<UpdateTagResult>;
14
+ deleteTag: (tagId: DeleteTagParams["tagId"], otherOptions?: FetcherOptions) => Promise<DeleteTagResult>;
15
+ };
16
+ //# sourceMappingURL=tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,eAAe,EAEf,aAAa,EAEb,aAAa,EACb,eAAe,EAGhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,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"}
@@ -0,0 +1,22 @@
1
+ import type { CreateUserBody, GetUserByAccountParams, GetUserByEmailParams, GetUserByIdParams, GetUsersParams, UpdateUserBody } from '@intlayer/backend';
2
+ import { type IntlayerConfig } from '@intlayer/config/client';
3
+ import { type FetcherOptions } from './fetcher';
4
+ export declare const getUserAPI: (authAPIOptions?: FetcherOptions, intlayerConfig?: IntlayerConfig) => {
5
+ createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
6
+ getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
7
+ getUserById: (userId: GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
8
+ getUserByAccount: (providerAccountId: GetUserByAccountParams["providerAccountId"], provider: GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<GetUserByAccountResult>;
9
+ getUserByEmail: (email: GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
10
+ updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
11
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
12
+ };
13
+ export declare const userAPI: {
14
+ createUser: (user: CreateUserBody, otherOptions?: FetcherOptions) => Promise<CreateUserResult>;
15
+ getUsers: (filters?: GetUsersParams, otherOptions?: FetcherOptions) => Promise<GetUsersResult>;
16
+ getUserById: (userId: GetUserByIdParams["userId"], otherOptions?: FetcherOptions) => Promise<GetUserByIdResult>;
17
+ getUserByAccount: (providerAccountId: GetUserByAccountParams["providerAccountId"], provider: GetUserByAccountParams["provider"], otherOptions?: FetcherOptions) => Promise<GetUserByAccountResult>;
18
+ getUserByEmail: (email: GetUserByEmailParams["email"], otherOptions?: FetcherOptions) => Promise<GetUserByEmailResult>;
19
+ updateUser: (user: UpdateUserBody, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
20
+ deleteUser: (userId: string, otherOptions?: FetcherOptions) => Promise<UpdateUserResult>;
21
+ };
22
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,sBAAsB,EAEtB,oBAAoB,EAEpB,iBAAiB,EAEjB,cAAc,EAEd,cAAc,EAGf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,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"}
package/package.json ADDED
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "@intlayer/api",
3
+ "version": "3.5.8",
4
+ "private": false,
5
+ "description": "API",
6
+ "keywords": [
7
+ "intlayer",
8
+ "application",
9
+ "api",
10
+ "backend",
11
+ "i18n",
12
+ "internationalization"
13
+ ],
14
+ "homepage": "https://intlayer.org",
15
+ "bugs": {
16
+ "url": "https://github.com/aymericzip/intlayer/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/aymericzip/intlayer.git"
21
+ },
22
+ "license": "Apache-2.0",
23
+ "author": {
24
+ "name": "Aymeric PINEAU",
25
+ "url": "https://github.com/aymericzip"
26
+ },
27
+ "contributors": [
28
+ {
29
+ "name": "Aymeric Pineau",
30
+ "email": "ay.pineau@gmail.com",
31
+ "url": "https://github.com/aymericzip"
32
+ }
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/types/index.d.ts",
37
+ "require": "./dist/cjs/index.cjs",
38
+ "import": "./dist/esm/index.mjs"
39
+ },
40
+ "./package.json": "./package.json"
41
+ },
42
+ "main": "dist/cjs/index.cjs",
43
+ "module": "dist/esm/index.mjs",
44
+ "types": "dist/types/index.d.ts",
45
+ "typesVersions": {
46
+ "*": {
47
+ "package.json": [
48
+ "./package.json"
49
+ ]
50
+ }
51
+ },
52
+ "bin": {
53
+ "intlayer": "./dist/cjs/cli.cjs"
54
+ },
55
+ "files": [
56
+ "./dist",
57
+ "./package.json"
58
+ ],
59
+ "dependencies": {
60
+ "@intlayer/config": "3.5.8"
61
+ },
62
+ "devDependencies": {
63
+ "@changesets/changelog-github": "0.5.0",
64
+ "@changesets/cli": "2.27.10",
65
+ "@types/node": "^22.10.1",
66
+ "concurrently": "^9.1.0",
67
+ "eslint": "^9.16.0",
68
+ "prettier": "^3.4.1",
69
+ "rimraf": "^6.0.1",
70
+ "tsc-alias": "^1.8.10",
71
+ "tsup": "^8.3.5",
72
+ "typescript": "^5.7.2",
73
+ "@utils/eslint-config": "1.0.4",
74
+ "@utils/ts-config": "1.0.4",
75
+ "@utils/ts-config-types": "1.0.4",
76
+ "@utils/tsup-config": "1.0.4"
77
+ },
78
+ "peerDependencies": {
79
+ "@intlayer/config": "3.5.8"
80
+ },
81
+ "engines": {
82
+ "node": ">=14.18"
83
+ },
84
+ "bug": {
85
+ "url": "https://github.com/aymericzip/intlayer/issues"
86
+ },
87
+ "scripts": {
88
+ "build": "pnpm build:package & pnpm build:types",
89
+ "build:package": "tsup",
90
+ "build:types": "tsc --project ./tsconfig.types.json && tsc-alias --project ./tsconfig.types.json",
91
+ "clean": "rimraf ./dist",
92
+ "dev": "concurrently --prefix none \"tsup --watch\" \"tsc --project ./tsconfig.types.json --watch\" \"tsc-alias --project ./tsconfig.types.json --watch\"",
93
+ "lint": "eslint . --cache",
94
+ "lint:fix": "eslint . --cache --fix",
95
+ "prettier": "prettier . --check",
96
+ "prettier:fix": "prettier . --write",
97
+ "typecheck": "tsup --project ./tsconfig.json --noEmit"
98
+ }
99
+ }