@intlayer/api 9.0.0-canary.10 → 9.0.0-canary.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cms/createAuthManager.cjs +116 -0
- package/dist/cjs/cms/createAuthManager.cjs.map +1 -0
- package/dist/cjs/cms/createIntlayerCMS.cjs +64 -0
- package/dist/cjs/cms/createIntlayerCMS.cjs.map +1 -0
- package/dist/cjs/cms/index.cjs +7 -0
- package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs +3 -2
- package/dist/cjs/distantDictionary/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs +3 -2
- package/dist/cjs/distantDictionary/fetchDistantDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/ai.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/ai.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/asset.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/asset.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/audit.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/audit.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/bitbucket.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/bitbucket.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/dictionary.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/dictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/editor.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/editor.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/environment.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/environment.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/github.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/github.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/gitlab.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/gitlab.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/index.cjs +4 -2
- package/dist/cjs/getIntlayerAPI/index.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/newsletter.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/newsletter.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/organization.cjs +19 -0
- package/dist/cjs/getIntlayerAPI/organization.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/project.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/project.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/reviewer.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/reviewer.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/search.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/search.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/showcaseProject.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/showcaseProject.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/status.cjs +48 -0
- package/dist/cjs/getIntlayerAPI/status.cjs.map +1 -0
- package/dist/cjs/getIntlayerAPI/stripe.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/stripe.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/tag.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/tag.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/translate.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/translate.cjs.map +1 -1
- package/dist/cjs/getIntlayerAPI/user.cjs +9 -0
- package/dist/cjs/getIntlayerAPI/user.cjs.map +1 -1
- package/dist/cjs/index.cjs +30 -3
- package/dist/cjs/proxy.cjs +78 -96
- package/dist/cjs/proxy.cjs.map +1 -1
- package/dist/esm/cms/createAuthManager.mjs +115 -0
- package/dist/esm/cms/createAuthManager.mjs.map +1 -0
- package/dist/esm/cms/createIntlayerCMS.mjs +62 -0
- package/dist/esm/cms/createIntlayerCMS.mjs.map +1 -0
- package/dist/esm/cms/index.mjs +4 -0
- package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs +3 -2
- package/dist/esm/distantDictionary/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/distantDictionary/fetchDistantDictionary.mjs +3 -2
- package/dist/esm/distantDictionary/fetchDistantDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/ai.mjs +9 -1
- package/dist/esm/getIntlayerAPI/ai.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/asset.mjs +9 -1
- package/dist/esm/getIntlayerAPI/asset.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/audit.mjs +9 -1
- package/dist/esm/getIntlayerAPI/audit.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/bitbucket.mjs +9 -1
- package/dist/esm/getIntlayerAPI/bitbucket.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/dictionary.mjs +9 -1
- package/dist/esm/getIntlayerAPI/dictionary.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/editor.mjs +9 -1
- package/dist/esm/getIntlayerAPI/editor.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/environment.mjs +9 -1
- package/dist/esm/getIntlayerAPI/environment.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/github.mjs +9 -1
- package/dist/esm/getIntlayerAPI/github.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/gitlab.mjs +9 -1
- package/dist/esm/getIntlayerAPI/gitlab.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/index.mjs +4 -2
- package/dist/esm/getIntlayerAPI/index.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/newsletter.mjs +9 -1
- package/dist/esm/getIntlayerAPI/newsletter.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/organization.mjs +19 -1
- package/dist/esm/getIntlayerAPI/organization.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/project.mjs +9 -1
- package/dist/esm/getIntlayerAPI/project.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/reviewer.mjs +9 -1
- package/dist/esm/getIntlayerAPI/reviewer.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/search.mjs +9 -1
- package/dist/esm/getIntlayerAPI/search.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/showcaseProject.mjs +9 -1
- package/dist/esm/getIntlayerAPI/showcaseProject.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/status.mjs +46 -0
- package/dist/esm/getIntlayerAPI/status.mjs.map +1 -0
- package/dist/esm/getIntlayerAPI/stripe.mjs +9 -1
- package/dist/esm/getIntlayerAPI/stripe.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/tag.mjs +9 -1
- package/dist/esm/getIntlayerAPI/tag.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/translate.mjs +9 -1
- package/dist/esm/getIntlayerAPI/translate.mjs.map +1 -1
- package/dist/esm/getIntlayerAPI/user.mjs +9 -1
- package/dist/esm/getIntlayerAPI/user.mjs.map +1 -1
- package/dist/esm/index.mjs +24 -21
- package/dist/esm/proxy.mjs +78 -96
- package/dist/esm/proxy.mjs.map +1 -1
- package/dist/types/apps/backend/dist/types/controllers/ai.controller.d.ts +94 -0
- package/dist/types/apps/backend/dist/types/controllers/ai.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/asset.controller.d.ts +15 -0
- package/dist/types/apps/backend/dist/types/controllers/asset.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/audit.controller.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/controllers/bitbucket.controller.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/controllers/cliSessionToken.controller.d.ts +18 -0
- package/dist/types/apps/backend/dist/types/controllers/cliSessionToken.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/dictionary.controller.d.ts +85 -0
- package/dist/types/apps/backend/dist/types/controllers/dictionary.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/environment.controller.d.ts +30 -0
- package/dist/types/apps/backend/dist/types/controllers/environment.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/eventListener.controller.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/controllers/github.controller.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/controllers/gitlab.controller.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/controllers/newsletter.controller.d.ts +25 -0
- package/dist/types/apps/backend/dist/types/controllers/newsletter.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/oAuth2.controller.d.ts +7 -0
- package/dist/types/apps/backend/dist/types/controllers/oAuth2.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/organization.controller.d.ts +71 -0
- package/dist/types/apps/backend/dist/types/controllers/organization.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/project.controller.d.ts +81 -0
- package/dist/types/apps/backend/dist/types/controllers/project.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/projectAccessKey.controller.d.ts +26 -0
- package/dist/types/apps/backend/dist/types/controllers/projectAccessKey.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/projectMemberAccess.controller.d.ts +15 -0
- package/dist/types/apps/backend/dist/types/controllers/projectMemberAccess.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts +31 -0
- package/dist/types/apps/backend/dist/types/controllers/recursiveAudit.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/reviewer.controller.d.ts +69 -0
- package/dist/types/apps/backend/dist/types/controllers/reviewer.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/searchDoc.controller.d.ts +19 -0
- package/dist/types/apps/backend/dist/types/controllers/searchDoc.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/showcaseProject.controller.d.ts +76 -0
- package/dist/types/apps/backend/dist/types/controllers/showcaseProject.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/stripe.controller.d.ts +148 -0
- package/dist/types/apps/backend/dist/types/controllers/stripe.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/tag.controller.d.ts +34 -0
- package/dist/types/apps/backend/dist/types/controllers/tag.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/translation.controller.d.ts +15 -0
- package/dist/types/apps/backend/dist/types/controllers/translation.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/controllers/user.controller.d.ts +51 -0
- package/dist/types/apps/backend/dist/types/controllers/user.controller.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/export.d.ts +37 -0
- package/dist/types/apps/backend/dist/types/routes/ai.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/asset.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/audit.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/bitbucket.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/dictionary.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/environment.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/github.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/gitlab.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/newsletter.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/organization.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/project.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/reviewer.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/showcaseProject.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/stripe.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/translate.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/routes/user.routes.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/services/audit/types.d.ts +34 -0
- package/dist/types/apps/backend/dist/types/services/audit/types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/services/ci.service.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/services/github.service.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/services/subscription.service.d.ts +13 -0
- package/dist/types/apps/backend/dist/types/services/subscription.service.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/affiliate.types.d.ts +39 -0
- package/dist/types/apps/backend/dist/types/types/affiliate.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/affiliateInvitation.types.d.ts +26 -0
- package/dist/types/apps/backend/dist/types/types/affiliateInvitation.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/aiStats.types.d.ts +23 -0
- package/dist/types/apps/backend/dist/types/types/aiStats.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/asset.types.d.ts +31 -0
- package/dist/types/apps/backend/dist/types/types/asset.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/dictionary.types.d.ts +65 -0
- package/dist/types/apps/backend/dist/types/types/dictionary.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/discussion.types.d.ts +42 -0
- package/dist/types/apps/backend/dist/types/types/discussion.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/oAuth2.types.d.ts +16 -0
- package/dist/types/apps/backend/dist/types/types/oAuth2.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/organization.types.d.ts +98 -0
- package/dist/types/apps/backend/dist/types/types/organization.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/plan.types.d.ts +23 -0
- package/dist/types/apps/backend/dist/types/types/plan.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/project.types.d.ts +122 -0
- package/dist/types/apps/backend/dist/types/types/project.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/projectInsights.types.d.ts +52 -0
- package/dist/types/apps/backend/dist/types/types/projectInsights.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/promoCode.types.d.ts +26 -0
- package/dist/types/apps/backend/dist/types/types/promoCode.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/reviewer.types.d.ts +49 -0
- package/dist/types/apps/backend/dist/types/types/reviewer.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/session.types.d.ts +2 -0
- package/dist/types/apps/backend/dist/types/types/showcaseProject.types.d.ts +59 -0
- package/dist/types/apps/backend/dist/types/types/showcaseProject.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/tag.types.d.ts +31 -0
- package/dist/types/apps/backend/dist/types/types/tag.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/types/user.types.d.ts +32 -0
- package/dist/types/apps/backend/dist/types/types/user.types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/AI/askDocQuestion/askDocQuestion.d.ts +10 -0
- package/dist/types/apps/backend/dist/types/utils/AI/askDocQuestion/askDocQuestion.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/AI/auditDictionary/index.d.ts +15 -0
- package/dist/types/apps/backend/dist/types/utils/AI/auditDictionary/index.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/AI/auditDictionaryField/index.d.ts +12 -0
- package/dist/types/apps/backend/dist/types/utils/AI/auditDictionaryField/index.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/AI/auditDictionaryMetadata/index.d.ts +2 -0
- package/dist/types/apps/backend/dist/types/utils/AI/auditTag/index.d.ts +10 -0
- package/dist/types/apps/backend/dist/types/utils/AI/auditTag/index.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/AI/chat/index.d.ts +16 -0
- package/dist/types/apps/backend/dist/types/utils/AI/chat/index.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/AI/customQuery/index.d.ts +11 -0
- package/dist/types/apps/backend/dist/types/utils/AI/customQuery/index.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/AI/translateJSON/index.d.ts +20 -0
- package/dist/types/apps/backend/dist/types/utils/AI/translateJSON/index.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/auth/getAuth.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getDictionaryFiltersAndPagination.d.ts +41 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getDictionaryFiltersAndPagination.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts +19 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getFiltersAndPaginationFromBody.d.ts +11 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getFiltersAndPaginationFromBody.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts +25 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getProjectFiltersAndPagination.d.ts +18 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getProjectFiltersAndPagination.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts +16 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getUserFiltersAndPagination.d.ts +20 -0
- package/dist/types/apps/backend/dist/types/utils/filtersAndPagination/getUserFiltersAndPagination.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/httpStatusCodes.d.ts +408 -0
- package/dist/types/apps/backend/dist/types/utils/httpStatusCodes.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/mongoDB/types.d.ts +10 -0
- package/dist/types/apps/backend/dist/types/utils/mongoDB/types.d.ts.map +1 -0
- package/dist/types/apps/backend/dist/types/utils/permissions.d.ts +1 -0
- package/dist/types/apps/backend/dist/types/utils/responseData.d.ts +27 -0
- package/dist/types/apps/backend/dist/types/utils/responseData.d.ts.map +1 -0
- package/dist/types/cms/createAuthManager.d.ts +103 -0
- package/dist/types/cms/createAuthManager.d.ts.map +1 -0
- package/dist/types/cms/createIntlayerCMS.d.ts +80 -0
- package/dist/types/cms/createIntlayerCMS.d.ts.map +1 -0
- package/dist/types/cms/index.d.ts +3 -0
- package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionary.d.ts +1 -1
- package/dist/types/distantDictionary/fetchDistantDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/ai.d.ts +22 -2
- package/dist/types/getIntlayerAPI/ai.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/asset.d.ts +20 -1
- package/dist/types/getIntlayerAPI/asset.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/audit.d.ts +25 -2
- package/dist/types/getIntlayerAPI/audit.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/bitbucket.d.ts +15 -1
- package/dist/types/getIntlayerAPI/bitbucket.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/dictionary.d.ts +19 -2
- package/dist/types/getIntlayerAPI/dictionary.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/editor.d.ts +13 -1
- package/dist/types/getIntlayerAPI/editor.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/environment.d.ts +17 -2
- package/dist/types/getIntlayerAPI/environment.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/github.d.ts +16 -1
- package/dist/types/getIntlayerAPI/github.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/gitlab.d.ts +15 -1
- package/dist/types/getIntlayerAPI/gitlab.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/index.d.ts +3 -1
- package/dist/types/getIntlayerAPI/index.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/newsletter.d.ts +14 -2
- package/dist/types/getIntlayerAPI/newsletter.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/oAuth.d.ts +2 -0
- package/dist/types/getIntlayerAPI/oAuth.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/organization.d.ts +24 -2
- package/dist/types/getIntlayerAPI/organization.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/project.d.ts +32 -2
- package/dist/types/getIntlayerAPI/project.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/reviewer.d.ts +651 -17
- package/dist/types/getIntlayerAPI/reviewer.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/search.d.ts +12 -2
- package/dist/types/getIntlayerAPI/search.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/showcaseProject.d.ts +23 -2
- package/dist/types/getIntlayerAPI/showcaseProject.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/status.d.ts +36 -0
- package/dist/types/getIntlayerAPI/status.d.ts.map +1 -0
- package/dist/types/getIntlayerAPI/stripe.d.ts +68 -2
- package/dist/types/getIntlayerAPI/stripe.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/tag.d.ts +15 -2
- package/dist/types/getIntlayerAPI/tag.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/translate.d.ts +37 -2
- package/dist/types/getIntlayerAPI/translate.d.ts.map +1 -1
- package/dist/types/getIntlayerAPI/user.d.ts +24 -3
- package/dist/types/getIntlayerAPI/user.d.ts.map +1 -1
- package/dist/types/index.d.ts +28 -22
- package/dist/types/packages/@intlayer/ai/dist/types/aiSdk.d.ts +115 -0
- package/dist/types/packages/@intlayer/ai/dist/types/aiSdk.d.ts.map +1 -0
- package/dist/types/packages/@intlayer/ai/dist/types/auditDictionaryMetadata/index.d.ts +12 -0
- package/dist/types/packages/@intlayer/ai/dist/types/auditDictionaryMetadata/index.d.ts.map +1 -0
- package/dist/types/packages/@intlayer/ai/dist/types/customQuery.d.ts +8 -0
- package/dist/types/packages/@intlayer/ai/dist/types/customQuery.d.ts.map +1 -0
- package/dist/types/packages/@intlayer/ai/dist/types/index.d.ts +27 -0
- package/dist/types/packages/@intlayer/ai/dist/types/index.d.ts.map +1 -0
- package/dist/types/packages/@intlayer/ai/dist/types/translateJSON/index.d.ts +10 -0
- package/dist/types/packages/@intlayer/ai/dist/types/translateJSON/index.d.ts.map +1 -0
- package/dist/types/packages/@intlayer/core/dist/types/messageFormat/ICU.d.ts +1 -0
- package/dist/types/packages/@intlayer/core/dist/types/messageFormat/i18next.d.ts +1 -0
- package/dist/types/packages/@intlayer/core/dist/types/messageFormat/index.d.ts +1 -0
- package/dist/types/packages/@intlayer/core/dist/types/messageFormat/po.d.ts +1 -0
- package/dist/types/packages/@intlayer/core/dist/types/messageFormat/resolveMessage.d.ts +1 -0
- package/dist/types/packages/@intlayer/core/dist/types/messageFormat/vue-i18n.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/build.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +3 -0
- package/dist/types/packages/@intlayer/engine/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/cleanOutputDir.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createType/createModuleAugmentation.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/createType/createType.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/formatDictionary.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/loadDictionaries/loadContentDeclaration.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/loadDictionaries/loadDictionaries.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/prepareIntlayer.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/writeConfiguration/index.d.ts +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +6 -0
- package/dist/types/packages/@intlayer/engine/dist/types/writeContentDeclaration/dictionaryStatus.d.ts.map +1 -0
- package/dist/types/packages/@intlayer/engine/dist/types/writeContentDeclaration/transformJSFile.d.ts +2 -0
- package/dist/types/packages/@intlayer/engine/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +3 -0
- package/dist/types/packages/@intlayer/engine/dist/types/writeContentDeclaration/writeJSFile.d.ts +2 -0
- package/dist/types/packages/intlayer-editor/server/dist/controllers/dictionary.controller.d.ts +1 -1
- package/dist/types/proxy.d.ts +11 -9
- package/dist/types/proxy.d.ts.map +1 -1
- package/dist/types/types.d.ts +1 -1
- package/package.json +19 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { fetcher } from "../fetcher.mjs";
|
|
2
|
+
import { createEndpoint } from "../cms/createIntlayerCMS.mjs";
|
|
2
3
|
import { editor } from "@intlayer/config/built";
|
|
3
4
|
|
|
4
5
|
//#region src/getIntlayerAPI/user.ts
|
|
@@ -98,7 +99,14 @@ const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
|
|
|
98
99
|
getVerifyEmailStatusURL
|
|
99
100
|
};
|
|
100
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* Authenticated `user` endpoint bound to an Intlayer CMS authenticator.
|
|
104
|
+
*
|
|
105
|
+
* Pass an authenticator created with `createIntlayerCMS`, or omit it to use
|
|
106
|
+
* the build-time configuration (`@intlayer/config/built`).
|
|
107
|
+
*/
|
|
108
|
+
const userEndpoint = createEndpoint(getUserAPI);
|
|
101
109
|
|
|
102
110
|
//#endregion
|
|
103
|
-
export { getUserAPI };
|
|
111
|
+
export { getUserAPI, userEndpoint };
|
|
104
112
|
//# sourceMappingURL=user.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.mjs","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"sourcesContent":["import type {\n CreateUserBody,\n CreateUserResult,\n GetUserByEmailParams,\n GetUserByEmailResult,\n GetUserByIdParams,\n GetUserByIdResult,\n GetUsersParams,\n GetUsersResult,\n UpdateUserBody,\n UpdateUserResult,\n UploadUserAvatarResult,\n UserAPI,\n} from '@intlayer/backend';\nimport { editor } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\ntype GetUserByAccountParams = { providerAccountId: string; provider: string };\ntype GetUserByAccountResult =
|
|
1
|
+
{"version":3,"file":"user.mjs","names":[],"sources":["../../../src/getIntlayerAPI/user.ts"],"sourcesContent":["import type {\n CreateUserBody,\n CreateUserResult,\n GetUserByEmailParams,\n GetUserByEmailResult,\n GetUserByIdParams,\n GetUserByIdResult,\n GetUsersParams,\n GetUsersResult,\n ResponseData,\n UpdateUserBody,\n UpdateUserResult,\n UploadUserAvatarResult,\n UserAPI,\n} from '@intlayer/backend';\nimport { editor } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { createEndpoint } from '../cms/createIntlayerCMS';\nimport { type FetcherOptions, fetcher } from '../fetcher';\n\ntype GetUserByAccountParams = { providerAccountId: string; provider: string };\ntype GetUserByAccountResult = ResponseData<UserAPI>;\n\nexport const getUserAPI = (\n authAPIOptions: FetcherOptions = {},\n intlayerConfig?: IntlayerConfig\n) => {\n const backendURL = intlayerConfig?.editor?.backendURL ?? editor.backendURL;\n\n const USER_API_ROUTE = `${backendURL}/api/user`;\n\n /**\n * Retrieves a list of users based on filters and pagination.\n * @param filters - Filters and pagination options.\n * @returns List of users.\n */\n const getUsers = async (\n filters?: GetUsersParams,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUsersResult>(\n USER_API_ROUTE,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n // @ts-ignore Number of parameter will be stringified by the fetcher\n params: filters,\n }\n );\n\n /**\n * Retrieves a user by ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const getUserById = async (\n userId: GetUserByIdParams['userId'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByIdResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Retrieves a user by email.\n * @param email - User email.\n * @returns User object.\n */\n const getUserByEmail = async (\n email: GetUserByEmailParams['email'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByEmailResult>(\n `${USER_API_ROUTE}/email/${email}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Retrieves a user by account.\n * @param providerAccountId - The provider account ID.\n * @param provider - The provider of the account.\n */\n const getUserByAccount = async (\n providerAccountId: GetUserByAccountParams['providerAccountId'],\n provider: GetUserByAccountParams['provider'],\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<GetUserByAccountResult>(\n `${USER_API_ROUTE}/account/${provider}/${providerAccountId}`,\n authAPIOptions,\n otherOptions,\n {\n cache: 'no-store',\n }\n );\n\n /**\n * Creates a new user.\n * @param user - User credentials.\n * @returns User object.\n */\n const createUser = async (\n user: CreateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<CreateUserResult>(\n `${USER_API_ROUTE}/`,\n authAPIOptions,\n otherOptions,\n {\n method: 'POST',\n body: user,\n }\n );\n\n /**\n * Updates the user with the provided data.\n * @param user - Updated user data.\n * @returns User object.\n */\n const updateUser = async (\n user: UpdateUserBody,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'PUT',\n body: user,\n }\n );\n\n /**\n * Deletes a user with the provided ID.\n * @param userId - User ID.\n * @returns User object.\n */\n const deleteUser = async (\n userId: string,\n otherOptions: FetcherOptions = {}\n ) =>\n await fetcher<UpdateUserResult>(\n `${USER_API_ROUTE}/${userId}`,\n authAPIOptions,\n otherOptions,\n {\n method: 'DELETE',\n }\n );\n\n /**\n * Uploads a new avatar for the authenticated user.\n * @param file - The image File object to upload.\n * @returns Updated user object.\n */\n const uploadAvatar = async (\n file: File,\n otherOptions: FetcherOptions = {}\n ) => {\n const buffer = await file.arrayBuffer();\n\n const baseHeaders: Record<string, string> = {\n 'Content-Type': file.type || 'image/jpeg',\n };\n\n // Forward auth cookies / credentials from authAPIOptions headers\n const authHeaders =\n (authAPIOptions.headers as Record<string, string> | undefined) ?? {};\n\n const response = await fetch(`${USER_API_ROUTE}/avatar`, {\n method: 'POST',\n credentials: 'include',\n headers: { ...authHeaders, ...baseHeaders },\n body: buffer,\n signal: otherOptions.signal as AbortSignal | undefined,\n });\n\n if (!response.ok) {\n const result = await response.json();\n throw new Error(JSON.stringify(result.error) ?? 'Avatar upload failed');\n }\n\n return (await response.json()) as UploadUserAvatarResult;\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 `${USER_API_ROUTE}/verify-email-status/${String(userId)}`;\n\n return {\n createUser,\n getUsers,\n getUserById,\n getUserByAccount,\n getUserByEmail,\n updateUser,\n deleteUser,\n uploadAvatar,\n getVerifyEmailStatusURL,\n };\n};\n\n/**\n * Authenticated `user` endpoint bound to an Intlayer CMS authenticator.\n *\n * Pass an authenticator created with `createIntlayerCMS`, or omit it to use\n * the build-time configuration (`@intlayer/config/built`).\n */\nexport const userEndpoint = createEndpoint(getUserAPI);\n"],"mappings":";;;;;AAuBA,MAAa,cACX,iBAAiC,EAAE,EACnC,mBACG;CAGH,MAAM,iBAAiB,GAFJ,gBAAgB,QAAQ,cAAc,OAAO,WAE3B;;;;;;CAOrC,MAAM,WAAW,OACf,SACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,gBACA,gBACA,cACA;EACE,OAAO;EAEP,QAAQ;EACT,CACF;;;;;;CAOH,MAAM,cAAc,OAClB,QACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,GAAG,UACrB,gBACA,cACA,EACE,OAAO,YACR,CACF;;;;;;CAOH,MAAM,iBAAiB,OACrB,OACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,SAAS,SAC3B,gBACA,cACA,EACE,OAAO,YACR,CACF;;;;;;CAOH,MAAM,mBAAmB,OACvB,mBACA,UACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,WAAW,SAAS,GAAG,qBACzC,gBACA,cACA,EACE,OAAO,YACR,CACF;;;;;;CAOH,MAAM,aAAa,OACjB,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,IAClB,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;CAOH,MAAM,aAAa,OACjB,MACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,kBACH,gBACA,cACA;EACE,QAAQ;EACR,MAAM;EACP,CACF;;;;;;CAOH,MAAM,aAAa,OACjB,QACA,eAA+B,EAAE,KAEjC,MAAM,QACJ,GAAG,eAAe,GAAG,UACrB,gBACA,cACA,EACE,QAAQ,UACT,CACF;;;;;;CAOH,MAAM,eAAe,OACnB,MACA,eAA+B,EAAE,KAC9B;EACH,MAAM,SAAS,MAAM,KAAK,aAAa;EAEvC,MAAM,cAAsC,EAC1C,gBAAgB,KAAK,QAAQ,cAC9B;EAGD,MAAM,cACH,eAAe,WAAkD,EAAE;EAEtE,MAAM,WAAW,MAAM,MAAM,GAAG,eAAe,UAAU;GACvD,QAAQ;GACR,aAAa;GACb,SAAS;IAAE,GAAG;IAAa,GAAG;IAAa;GAC3C,MAAM;GACN,QAAQ,aAAa;GACtB,CAAC;AAEF,MAAI,CAAC,SAAS,IAAI;GAChB,MAAM,SAAS,MAAM,SAAS,MAAM;AACpC,SAAM,IAAI,MAAM,KAAK,UAAU,OAAO,MAAM,IAAI,uBAAuB;;AAGzE,SAAQ,MAAM,SAAS,MAAM;;;;;;;CAQ/B,MAAM,2BAA2B,WAC/B,GAAG,eAAe,uBAAuB,OAAO,OAAO;AAEzD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;;;;;;;;AASH,MAAa,eAAe,eAAe,WAAW"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { fetcher, fetcherOptions } from "./fetcher.mjs";
|
|
2
|
-
import { getAiAPI } from "./getIntlayerAPI/ai.mjs";
|
|
3
|
-
import { getAssetAPI } from "./getIntlayerAPI/asset.mjs";
|
|
4
|
-
import { getAuditAPI } from "./getIntlayerAPI/audit.mjs";
|
|
5
|
-
import { getBitbucketAPI } from "./getIntlayerAPI/bitbucket.mjs";
|
|
6
|
-
import { getDictionaryAPI } from "./getIntlayerAPI/dictionary.mjs";
|
|
7
|
-
import { getEditorAPI } from "./getIntlayerAPI/editor.mjs";
|
|
8
|
-
import { getEnvironmentAPI } from "./getIntlayerAPI/environment.mjs";
|
|
9
|
-
import { getGithubAPI } from "./getIntlayerAPI/github.mjs";
|
|
10
|
-
import { getGitlabAPI } from "./getIntlayerAPI/gitlab.mjs";
|
|
11
|
-
import { getNewsletterAPI } from "./getIntlayerAPI/newsletter.mjs";
|
|
12
2
|
import { getOAuthAPI } from "./getIntlayerAPI/oAuth.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
3
|
+
import { createAuthManager } from "./cms/createAuthManager.mjs";
|
|
4
|
+
import { createEndpoint, createIntlayerCMS } from "./cms/createIntlayerCMS.mjs";
|
|
5
|
+
import { aiEndpoint, getAiAPI } from "./getIntlayerAPI/ai.mjs";
|
|
6
|
+
import { assetEndpoint, getAssetAPI } from "./getIntlayerAPI/asset.mjs";
|
|
7
|
+
import { auditEndpoint, getAuditAPI } from "./getIntlayerAPI/audit.mjs";
|
|
8
|
+
import { bitbucketEndpoint, getBitbucketAPI } from "./getIntlayerAPI/bitbucket.mjs";
|
|
9
|
+
import { dictionaryEndpoint, getDictionaryAPI } from "./getIntlayerAPI/dictionary.mjs";
|
|
10
|
+
import { editorEndpoint, getEditorAPI } from "./getIntlayerAPI/editor.mjs";
|
|
11
|
+
import { environmentEndpoint, getEnvironmentAPI } from "./getIntlayerAPI/environment.mjs";
|
|
12
|
+
import { getGithubAPI, githubEndpoint } from "./getIntlayerAPI/github.mjs";
|
|
13
|
+
import { getGitlabAPI, gitlabEndpoint } from "./getIntlayerAPI/gitlab.mjs";
|
|
14
|
+
import { getNewsletterAPI, newsletterEndpoint } from "./getIntlayerAPI/newsletter.mjs";
|
|
15
|
+
import { getOrganizationAPI, organizationEndpoint } from "./getIntlayerAPI/organization.mjs";
|
|
16
|
+
import { getProjectAPI, projectEndpoint } from "./getIntlayerAPI/project.mjs";
|
|
17
|
+
import { getReviewerAPI, reviewerEndpoint } from "./getIntlayerAPI/reviewer.mjs";
|
|
18
|
+
import { getSearchAPI, searchEndpoint } from "./getIntlayerAPI/search.mjs";
|
|
19
|
+
import { getShowcaseProjectAPI, showcaseProjectEndpoint } from "./getIntlayerAPI/showcaseProject.mjs";
|
|
20
|
+
import { getStatusAPI, statusEndpoint } from "./getIntlayerAPI/status.mjs";
|
|
21
|
+
import { getStripeAPI, stripeEndpoint } from "./getIntlayerAPI/stripe.mjs";
|
|
22
|
+
import { getTagAPI, tagEndpoint } from "./getIntlayerAPI/tag.mjs";
|
|
23
|
+
import { getTranslateAPI, translateEndpoint } from "./getIntlayerAPI/translate.mjs";
|
|
24
|
+
import { getUserAPI, userEndpoint } from "./getIntlayerAPI/user.mjs";
|
|
23
25
|
import { getIntlayerAPIProxy } from "./proxy.mjs";
|
|
24
26
|
import { fetchDistantDictionaries } from "./distantDictionary/fetchDistantDictionaries.mjs";
|
|
25
27
|
import { fetchDistantDictionary } from "./distantDictionary/fetchDistantDictionary.mjs";
|
|
28
|
+
import { getIntlayerAPI } from "./getIntlayerAPI/index.mjs";
|
|
26
29
|
|
|
27
|
-
export { fetchDistantDictionaries, fetchDistantDictionary, fetcher, fetcherOptions, getAiAPI, getAssetAPI, getAuditAPI, getBitbucketAPI, getDictionaryAPI, getEditorAPI, getEnvironmentAPI, getGithubAPI, getGitlabAPI, getIntlayerAPI, getIntlayerAPIProxy, getNewsletterAPI, getOAuthAPI, getOrganizationAPI, getProjectAPI, getReviewerAPI, getSearchAPI, getShowcaseProjectAPI, getStripeAPI, getTagAPI, getTranslateAPI, getUserAPI };
|
|
30
|
+
export { aiEndpoint, assetEndpoint, auditEndpoint, bitbucketEndpoint, createAuthManager, createEndpoint, createIntlayerCMS, dictionaryEndpoint, editorEndpoint, environmentEndpoint, fetchDistantDictionaries, fetchDistantDictionary, fetcher, fetcherOptions, getAiAPI, getAssetAPI, getAuditAPI, getBitbucketAPI, getDictionaryAPI, getEditorAPI, getEnvironmentAPI, getGithubAPI, getGitlabAPI, getIntlayerAPI, getIntlayerAPIProxy, getNewsletterAPI, getOAuthAPI, getOrganizationAPI, getProjectAPI, getReviewerAPI, getSearchAPI, getShowcaseProjectAPI, getStatusAPI, getStripeAPI, getTagAPI, getTranslateAPI, getUserAPI, githubEndpoint, gitlabEndpoint, newsletterEndpoint, organizationEndpoint, projectEndpoint, reviewerEndpoint, searchEndpoint, showcaseProjectEndpoint, statusEndpoint, stripeEndpoint, tagEndpoint, translateEndpoint, userEndpoint };
|
package/dist/esm/proxy.mjs
CHANGED
|
@@ -1,110 +1,92 @@
|
|
|
1
1
|
import { getOAuthAPI } from "./getIntlayerAPI/oAuth.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { createIntlayerCMS } from "./cms/createIntlayerCMS.mjs";
|
|
3
|
+
import { getAiAPI } from "./getIntlayerAPI/ai.mjs";
|
|
4
|
+
import { getAssetAPI } from "./getIntlayerAPI/asset.mjs";
|
|
5
|
+
import { getAuditAPI } from "./getIntlayerAPI/audit.mjs";
|
|
6
|
+
import { getBitbucketAPI } from "./getIntlayerAPI/bitbucket.mjs";
|
|
7
|
+
import { getDictionaryAPI } from "./getIntlayerAPI/dictionary.mjs";
|
|
8
|
+
import { getEditorAPI } from "./getIntlayerAPI/editor.mjs";
|
|
9
|
+
import { getEnvironmentAPI } from "./getIntlayerAPI/environment.mjs";
|
|
10
|
+
import { getGithubAPI } from "./getIntlayerAPI/github.mjs";
|
|
11
|
+
import { getGitlabAPI } from "./getIntlayerAPI/gitlab.mjs";
|
|
12
|
+
import { getNewsletterAPI } from "./getIntlayerAPI/newsletter.mjs";
|
|
13
|
+
import { getOrganizationAPI } from "./getIntlayerAPI/organization.mjs";
|
|
14
|
+
import { getProjectAPI } from "./getIntlayerAPI/project.mjs";
|
|
15
|
+
import { getReviewerAPI } from "./getIntlayerAPI/reviewer.mjs";
|
|
16
|
+
import { getSearchAPI } from "./getIntlayerAPI/search.mjs";
|
|
17
|
+
import { getShowcaseProjectAPI } from "./getIntlayerAPI/showcaseProject.mjs";
|
|
18
|
+
import { getStatusAPI } from "./getIntlayerAPI/status.mjs";
|
|
19
|
+
import { getStripeAPI } from "./getIntlayerAPI/stripe.mjs";
|
|
20
|
+
import { getTagAPI } from "./getIntlayerAPI/tag.mjs";
|
|
21
|
+
import { getTranslateAPI } from "./getIntlayerAPI/translate.mjs";
|
|
22
|
+
import { getUserAPI } from "./getIntlayerAPI/user.mjs";
|
|
3
23
|
import { editor } from "@intlayer/config/built";
|
|
4
24
|
|
|
5
25
|
//#region src/proxy.ts
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
const sectionFactories = {
|
|
27
|
+
asset: getAssetAPI,
|
|
28
|
+
organization: getOrganizationAPI,
|
|
29
|
+
project: getProjectAPI,
|
|
30
|
+
environment: getEnvironmentAPI,
|
|
31
|
+
user: getUserAPI,
|
|
32
|
+
oAuth: getOAuthAPI,
|
|
33
|
+
dictionary: getDictionaryAPI,
|
|
34
|
+
stripe: getStripeAPI,
|
|
35
|
+
ai: getAiAPI,
|
|
36
|
+
audit: getAuditAPI,
|
|
37
|
+
tag: getTagAPI,
|
|
38
|
+
search: getSearchAPI,
|
|
39
|
+
editor: getEditorAPI,
|
|
40
|
+
newsletter: getNewsletterAPI,
|
|
41
|
+
github: getGithubAPI,
|
|
42
|
+
gitlab: getGitlabAPI,
|
|
43
|
+
bitbucket: getBitbucketAPI,
|
|
44
|
+
showcaseProject: getShowcaseProjectAPI,
|
|
45
|
+
translate: getTranslateAPI,
|
|
46
|
+
reviewer: getReviewerAPI,
|
|
47
|
+
status: getStatusAPI
|
|
19
48
|
};
|
|
20
|
-
|
|
21
|
-
let currentExpiryTs;
|
|
22
|
-
let pendingRefresh;
|
|
49
|
+
const AUTH_FREE_SECTIONS = new Set(["oAuth"]);
|
|
23
50
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* - Refreshes token proactively when near expiry
|
|
28
|
-
*
|
|
29
|
-
* When `sessionToken` is provided (a CLI session token starting with
|
|
30
|
-
* "clisession_"), it is used directly as the Bearer token without any OAuth2
|
|
31
|
-
* exchange — the backend validates it against the CliSessionToken collection.
|
|
51
|
+
* Builds the **complete** auto-authenticated Intlayer API as a single lazy
|
|
52
|
+
* object. Every domain is reachable through it, so it pulls every domain client
|
|
53
|
+
* into the bundle.
|
|
32
54
|
*
|
|
33
|
-
*
|
|
55
|
+
* Prefer {@link createIntlayerCMS} together with the per-domain endpoint binders
|
|
56
|
+
* (e.g. `dictionaryEndpoint`) in bundle-sensitive code — they include only the
|
|
57
|
+
* domains you use. This helper is a convenience for Node tools (such as the CLI)
|
|
58
|
+
* where bundle size is not a concern.
|
|
34
59
|
*/
|
|
35
60
|
const getIntlayerAPIProxy = (baseAuthOptions = {}, intlayerConfig = { editor }, sessionToken) => {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
45
|
-
const baseApi = getIntlayerAPI(authOptionsRef, intlayerConfig);
|
|
46
|
-
const needsRefresh = () => {
|
|
47
|
-
if (!currentAccessToken) return true;
|
|
48
|
-
if (!currentExpiryTs) return false;
|
|
49
|
-
return Date.now() + ONE_MINUTE_MS >= currentExpiryTs;
|
|
61
|
+
const cms = createIntlayerCMS(intlayerConfig, {
|
|
62
|
+
baseFetcherOptions: baseAuthOptions,
|
|
63
|
+
sessionToken
|
|
64
|
+
});
|
|
65
|
+
const sectionCache = /* @__PURE__ */ new Map();
|
|
66
|
+
const buildSection = (key) => {
|
|
67
|
+
const factory = sectionFactories[key];
|
|
68
|
+
return cms.bindSection(factory, { skipAuth: AUTH_FREE_SECTIONS.has(key) ? true : void 0 });
|
|
50
69
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
...authOptionsRef.headers ?? {},
|
|
69
|
-
Authorization: `Bearer ${currentAccessToken}`
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
const wrapSection = (section, skipAuth = !hasCMSAuth) => {
|
|
73
|
-
return new Proxy(section, { get(target, prop, receiver) {
|
|
74
|
-
const value = Reflect.get(target, prop, receiver);
|
|
75
|
-
if (typeof value === "function") return async (...args) => {
|
|
76
|
-
if (!skipAuth) if (sessionToken) {} else {
|
|
77
|
-
await ensureValidToken();
|
|
78
|
-
applyAuthHeaderToRef();
|
|
79
|
-
}
|
|
80
|
-
try {
|
|
81
|
-
return await value.apply(target, args);
|
|
82
|
-
} catch (err) {
|
|
83
|
-
if (!skipAuth && !sessionToken) {
|
|
84
|
-
await refreshToken();
|
|
85
|
-
applyAuthHeaderToRef();
|
|
86
|
-
return await value.apply(target, args);
|
|
87
|
-
}
|
|
88
|
-
throw err;
|
|
89
|
-
}
|
|
70
|
+
return new Proxy({}, {
|
|
71
|
+
get(_target, property) {
|
|
72
|
+
const key = property;
|
|
73
|
+
if (!(key in sectionFactories)) return void 0;
|
|
74
|
+
if (!sectionCache.has(key)) sectionCache.set(key, buildSection(key));
|
|
75
|
+
return sectionCache.get(key);
|
|
76
|
+
},
|
|
77
|
+
has(_target, property) {
|
|
78
|
+
return property in sectionFactories;
|
|
79
|
+
},
|
|
80
|
+
ownKeys() {
|
|
81
|
+
return Reflect.ownKeys(sectionFactories);
|
|
82
|
+
},
|
|
83
|
+
getOwnPropertyDescriptor() {
|
|
84
|
+
return {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
configurable: true
|
|
90
87
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
};
|
|
94
|
-
return {
|
|
95
|
-
organization: wrapSection(baseApi.organization),
|
|
96
|
-
project: wrapSection(baseApi.project),
|
|
97
|
-
user: wrapSection(baseApi.user),
|
|
98
|
-
oAuth: wrapSection(baseApi.oAuth, true),
|
|
99
|
-
dictionary: wrapSection(baseApi.dictionary),
|
|
100
|
-
stripe: wrapSection(baseApi.stripe),
|
|
101
|
-
ai: wrapSection(baseApi.ai),
|
|
102
|
-
tag: wrapSection(baseApi.tag),
|
|
103
|
-
search: wrapSection(baseApi.search),
|
|
104
|
-
editor: wrapSection(baseApi.editor),
|
|
105
|
-
newsletter: wrapSection(baseApi.newsletter),
|
|
106
|
-
github: wrapSection(baseApi.github)
|
|
107
|
-
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
108
90
|
};
|
|
109
91
|
|
|
110
92
|
//#endregion
|
package/dist/esm/proxy.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.mjs","names":[],"sources":["../../src/proxy.ts"],"sourcesContent":["import { editor } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { FetcherOptions } from './fetcher';\nimport {
|
|
1
|
+
{"version":3,"file":"proxy.mjs","names":[],"sources":["../../src/proxy.ts"],"sourcesContent":["import { editor } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { createIntlayerCMS, type IntlayerCMS } from './cms/createIntlayerCMS';\nimport type { FetcherOptions } from './fetcher';\nimport { getAiAPI } from './getIntlayerAPI/ai';\nimport { getAssetAPI } from './getIntlayerAPI/asset';\nimport { getAuditAPI } from './getIntlayerAPI/audit';\nimport { getBitbucketAPI } from './getIntlayerAPI/bitbucket';\nimport { getDictionaryAPI } from './getIntlayerAPI/dictionary';\nimport { getEditorAPI } from './getIntlayerAPI/editor';\nimport { getEnvironmentAPI } from './getIntlayerAPI/environment';\nimport { getGithubAPI } from './getIntlayerAPI/github';\nimport { getGitlabAPI } from './getIntlayerAPI/gitlab';\nimport type { IntlayerAPI } from './getIntlayerAPI/index';\nimport { getNewsletterAPI } from './getIntlayerAPI/newsletter';\nimport { getOAuthAPI } from './getIntlayerAPI/oAuth';\nimport { getOrganizationAPI } from './getIntlayerAPI/organization';\nimport { getProjectAPI } from './getIntlayerAPI/project';\nimport { getReviewerAPI } from './getIntlayerAPI/reviewer';\nimport { getSearchAPI } from './getIntlayerAPI/search';\nimport { getShowcaseProjectAPI } from './getIntlayerAPI/showcaseProject';\nimport { getStatusAPI } from './getIntlayerAPI/status';\nimport { getStripeAPI } from './getIntlayerAPI/stripe';\nimport { getTagAPI } from './getIntlayerAPI/tag';\nimport { getTranslateAPI } from './getIntlayerAPI/translate';\nimport { getUserAPI } from './getIntlayerAPI/user';\n\ntype SectionKey = keyof IntlayerAPI;\n\n/**\n * Homogeneous factory map: every domain factory normalized to the same\n * `(fetcherOptions, config) => section` signature, keyed by section name.\n * Declaring it as a single mapped type lets a generic lookup stay callable\n * (a union of factory signatures would not be).\n */\ntype SectionFactories = {\n [Key in SectionKey]: (\n fetcherOptions: FetcherOptions,\n intlayerConfig: IntlayerConfig\n ) => IntlayerAPI[Key];\n};\n\nconst sectionFactories: SectionFactories = {\n asset: getAssetAPI,\n organization: getOrganizationAPI,\n project: getProjectAPI,\n environment: getEnvironmentAPI,\n user: getUserAPI,\n oAuth: getOAuthAPI,\n dictionary: getDictionaryAPI,\n stripe: getStripeAPI,\n ai: getAiAPI,\n audit: getAuditAPI,\n tag: getTagAPI,\n search: getSearchAPI,\n editor: getEditorAPI,\n newsletter: getNewsletterAPI,\n github: getGithubAPI,\n gitlab: getGitlabAPI,\n bitbucket: getBitbucketAPI,\n showcaseProject: getShowcaseProjectAPI,\n translate: getTranslateAPI,\n reviewer: getReviewerAPI,\n status: getStatusAPI,\n};\n\n// The OAuth2 token endpoint must never receive an injected Bearer token —\n// it is the call that issues one.\nconst AUTH_FREE_SECTIONS: ReadonlySet<SectionKey> = new Set<SectionKey>([\n 'oAuth',\n]);\n\n/**\n * Builds the **complete** auto-authenticated Intlayer API as a single lazy\n * object. Every domain is reachable through it, so it pulls every domain client\n * into the bundle.\n *\n * Prefer {@link createIntlayerCMS} together with the per-domain endpoint binders\n * (e.g. `dictionaryEndpoint`) in bundle-sensitive code — they include only the\n * domains you use. This helper is a convenience for Node tools (such as the CLI)\n * where bundle size is not a concern.\n */\nexport const getIntlayerAPIProxy = (\n baseAuthOptions: FetcherOptions = {},\n intlayerConfig: Pick<IntlayerConfig, 'editor'> = { editor },\n sessionToken?: string\n): IntlayerAPI => {\n const cms: IntlayerCMS = createIntlayerCMS(intlayerConfig, {\n baseFetcherOptions: baseAuthOptions,\n sessionToken,\n });\n\n const sectionCache = new Map<SectionKey, unknown>();\n\n // Generic over `Key` so `sectionFactories[key]` resolves to a single\n // `(opts, config) => IntlayerAPI[Key]` signature rather than the union of all\n // factory signatures (which would not be callable).\n const buildSection = <Key extends SectionKey>(key: Key): IntlayerAPI[Key] => {\n const factory = sectionFactories[key] as (\n fetcherOptions: FetcherOptions,\n intlayerConfig: IntlayerConfig\n ) => Record<string, unknown>;\n\n return cms.bindSection(factory, {\n skipAuth: AUTH_FREE_SECTIONS.has(key) ? true : undefined,\n }) as IntlayerAPI[Key];\n };\n\n return new Proxy({} as IntlayerAPI, {\n get(_target, property) {\n const key = property as SectionKey;\n if (!(key in sectionFactories)) return undefined;\n\n if (!sectionCache.has(key)) {\n sectionCache.set(key, buildSection(key));\n }\n\n return sectionCache.get(key);\n },\n has(_target, property) {\n return (property as SectionKey) in sectionFactories;\n },\n ownKeys() {\n return Reflect.ownKeys(sectionFactories);\n },\n getOwnPropertyDescriptor() {\n return { enumerable: true, configurable: true };\n },\n });\n};\n\n/**\n * The complete auto-authenticated Intlayer API returned by\n * {@link getIntlayerAPIProxy}. Equivalent in shape to `IntlayerAPI`.\n */\nexport type IntlayerAPIProxy = ReturnType<typeof getIntlayerAPIProxy>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,mBAAqC;CACzC,OAAO;CACP,cAAc;CACd,SAAS;CACT,aAAa;CACb,MAAM;CACN,OAAO;CACP,YAAY;CACZ,QAAQ;CACR,IAAI;CACJ,OAAO;CACP,KAAK;CACL,QAAQ;CACR,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,iBAAiB;CACjB,WAAW;CACX,UAAU;CACV,QAAQ;CACT;AAID,MAAM,qBAA8C,IAAI,IAAgB,CACtE,QACD,CAAC;;;;;;;;;;;AAYF,MAAa,uBACX,kBAAkC,EAAE,EACpC,iBAAiD,EAAE,QAAQ,EAC3D,iBACgB;CAChB,MAAM,MAAmB,kBAAkB,gBAAgB;EACzD,oBAAoB;EACpB;EACD,CAAC;CAEF,MAAM,+BAAe,IAAI,KAA0B;CAKnD,MAAM,gBAAwC,QAA+B;EAC3E,MAAM,UAAU,iBAAiB;AAKjC,SAAO,IAAI,YAAY,SAAS,EAC9B,UAAU,mBAAmB,IAAI,IAAI,GAAG,OAAO,QAChD,CAAC;;AAGJ,QAAO,IAAI,MAAM,EAAE,EAAiB;EAClC,IAAI,SAAS,UAAU;GACrB,MAAM,MAAM;AACZ,OAAI,EAAE,OAAO,kBAAmB,QAAO;AAEvC,OAAI,CAAC,aAAa,IAAI,IAAI,CACxB,cAAa,IAAI,KAAK,aAAa,IAAI,CAAC;AAG1C,UAAO,aAAa,IAAI,IAAI;;EAE9B,IAAI,SAAS,UAAU;AACrB,UAAQ,YAA2B;;EAErC,UAAU;AACR,UAAO,QAAQ,QAAQ,iBAAiB;;EAE1C,2BAA2B;AACzB,UAAO;IAAE,YAAY;IAAM,cAAc;IAAM;;EAElD,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { TagAPI } from "../types/tag.types.js";
|
|
2
|
+
import { PaginatedResponse, ResponseData } from "../utils/responseData.js";
|
|
3
|
+
import { AIStats } from "../types/aiStats.types.js";
|
|
4
|
+
import { DiscussionAPI } from "../types/discussion.types.js";
|
|
5
|
+
import { AskDocQuestionResult as AskDocQuestionResult$1 } from "../utils/AI/askDocQuestion/askDocQuestion.js";
|
|
6
|
+
import { AuditFileResultData } from "../utils/AI/auditDictionary/index.js";
|
|
7
|
+
import { AuditDictionaryFieldResultData } from "../utils/AI/auditDictionaryField/index.js";
|
|
8
|
+
import { AuditFileResultData as AuditFileResultData$1 } from "../utils/AI/auditDictionaryMetadata/index.js";
|
|
9
|
+
import { TranslateJSONResultData } from "../utils/AI/auditTag/index.js";
|
|
10
|
+
import { ChatResultData } from "../utils/AI/chat/index.js";
|
|
11
|
+
import { CustomQueryOptions, CustomQueryResultData } from "../utils/AI/customQuery/index.js";
|
|
12
|
+
import { TranslateJSONOptions, TranslateJSONResultData as TranslateJSONResultData$1 } from "../utils/AI/translateJSON/index.js";
|
|
13
|
+
import { DiscussionFiltersParams } from "../utils/filtersAndPagination/getDiscussionFiltersAndPagination.js";
|
|
14
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
15
|
+
import { AIOptions, AIOptions as AIOptions$1, ChatCompletionRequestMessage } from "@intlayer/ai";
|
|
16
|
+
import { KeyPath } from "@intlayer/types/keyPath";
|
|
17
|
+
//#region ../../../apps/backend/dist/types/controllers/ai.controller.d.ts
|
|
18
|
+
//#region src/controllers/ai.controller.d.ts
|
|
19
|
+
type ReplaceAIConfigByOptions<T> = Omit<T, 'aiConfig'> & {
|
|
20
|
+
aiOptions?: AIOptions;
|
|
21
|
+
};
|
|
22
|
+
type CustomQueryBody = ReplaceAIConfigByOptions<CustomQueryOptions> & {
|
|
23
|
+
tagsKeys?: string[];
|
|
24
|
+
applicationContext?: string;
|
|
25
|
+
};
|
|
26
|
+
type CustomQueryResult = ResponseData<CustomQueryResultData>;
|
|
27
|
+
type TranslateJSONBody = Omit<ReplaceAIConfigByOptions<TranslateJSONOptions<JSON>>, 'tags'> & {
|
|
28
|
+
tagsKeys?: string[];
|
|
29
|
+
};
|
|
30
|
+
type TranslateJSONResult = ResponseData<TranslateJSONResultData$1<JSON>>;
|
|
31
|
+
type AuditContentDeclarationBody = {
|
|
32
|
+
aiOptions?: AIOptions;
|
|
33
|
+
locales: Locale[];
|
|
34
|
+
defaultLocale: Locale;
|
|
35
|
+
fileContent: string;
|
|
36
|
+
filePath?: string;
|
|
37
|
+
tagsKeys?: string[];
|
|
38
|
+
};
|
|
39
|
+
type AuditContentDeclarationResult = ResponseData<AuditFileResultData>;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves a list of dictionaries based on filters and pagination.
|
|
42
|
+
*/
|
|
43
|
+
type AuditContentDeclarationFieldBody = {
|
|
44
|
+
aiOptions?: AIOptions;
|
|
45
|
+
locales: Locale[];
|
|
46
|
+
fileContent: string;
|
|
47
|
+
filePath?: string;
|
|
48
|
+
tagsKeys?: string[];
|
|
49
|
+
keyPath: KeyPath[];
|
|
50
|
+
};
|
|
51
|
+
type AuditContentDeclarationFieldResult = ResponseData<AuditDictionaryFieldResultData>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves a list of dictionaries based on filters and pagination.
|
|
54
|
+
*/
|
|
55
|
+
type AuditContentDeclarationMetadataBody = {
|
|
56
|
+
aiOptions?: AIOptions;
|
|
57
|
+
fileContent: string;
|
|
58
|
+
};
|
|
59
|
+
type AuditContentDeclarationMetadataResult = ResponseData<AuditFileResultData$1>;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves a list of dictionaries based on filters and pagination.
|
|
62
|
+
*/
|
|
63
|
+
type AuditTagBody = {
|
|
64
|
+
aiOptions?: AIOptions;
|
|
65
|
+
tag: TagAPI;
|
|
66
|
+
};
|
|
67
|
+
type AuditTagResult = ResponseData<TranslateJSONResultData>;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves a list of dictionaries based on filters and pagination.
|
|
70
|
+
*/
|
|
71
|
+
type AskDocQuestionResult = ResponseData<AskDocQuestionResult$1>;
|
|
72
|
+
type ChatResult = ResponseData<ChatResultData>;
|
|
73
|
+
type AutocompleteResponse = ResponseData<{
|
|
74
|
+
autocompletion: string;
|
|
75
|
+
}>;
|
|
76
|
+
type GetDiscussionsParams = ({
|
|
77
|
+
page?: string | number;
|
|
78
|
+
pageSize?: string | number;
|
|
79
|
+
includeMessages?: 'true' | 'false';
|
|
80
|
+
} & DiscussionFiltersParams) | undefined;
|
|
81
|
+
type GetDiscussionsResult = PaginatedResponse<DiscussionAPI>;
|
|
82
|
+
/**
|
|
83
|
+
* Retrieves a list of discussions with filters and pagination.
|
|
84
|
+
* Only the owner or admins can access. By default, users only see their own.
|
|
85
|
+
*/
|
|
86
|
+
type GetAIStatsResult = ResponseData<AIStats>;
|
|
87
|
+
/**
|
|
88
|
+
* Returns aggregated AI token-usage statistics for the currently selected
|
|
89
|
+
* project. Aggregates over all saved `dashboard` discussions that recorded
|
|
90
|
+
* token usage, broken down by model.
|
|
91
|
+
*/
|
|
92
|
+
//#endregion
|
|
93
|
+
export { type AIOptions$1 as AIOptions, AskDocQuestionResult, AuditContentDeclarationBody, AuditContentDeclarationFieldBody, AuditContentDeclarationFieldResult, AuditContentDeclarationMetadataBody, AuditContentDeclarationMetadataResult, AuditContentDeclarationResult, AuditTagBody, AuditTagResult, AutocompleteResponse, type ChatCompletionRequestMessage, ChatResult, CustomQueryBody, CustomQueryResult, GetAIStatsResult, GetDiscussionsParams, GetDiscussionsResult, TranslateJSONBody, TranslateJSONResult };
|
|
94
|
+
//# sourceMappingURL=ai.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.controller.d.ts","names":["AskDocQuestionResult","AskDocQuestionResult$1","TagAPI","AuditFileResultData","AuditDictionaryFieldResultData","AuditFileResultData$1","TranslateJSONResultData","ChatResultData","CustomQueryOptions","CustomQueryResultData","TranslateJSONOptions","TranslateJSONResultData$1","DiscussionFiltersParams","PaginatedResponse","ResponseData","AIStats","DiscussionAPI","AIConfig","AIOptions","AIOptions$1","AIProvider","ChatCompletionRequestMessage","ChatCompletionRequestMessage$1","Locale","KeyPath","FastifyReply","FastifyRequest","ReplaceAIConfigByOptions","T","Omit","aiOptions","CustomQueryBody","tagsKeys","applicationContext","CustomQueryResult","customQuery","Promise","Body","request","reply","TranslateJSONBody","JSON","TranslateJSONResult","translateJSON","AuditContentDeclarationBody","locales","defaultLocale","fileContent","filePath","AuditContentDeclarationResult","auditContentDeclaration","AuditContentDeclarationFieldBody","keyPath","AuditContentDeclarationFieldResult","auditContentDeclarationField","AuditContentDeclarationMetadataBody","AuditContentDeclarationMetadataResult","auditContentDeclarationMetadata","AuditTagBody","tag","AuditTagResult","auditTag","AskDocQuestionBody","messages","discussionId","askDocQuestion","ChatBody","ChatResult","chat","AutocompleteBody","text","contextBefore","currentLine","contextAfter","AutocompleteResponse","autocompletion","autocomplete","GetDiscussionsParams","page","pageSize","includeMessages","GetDiscussionsResult","getDiscussions","Querystring","GetAIStatsResult","getAIStats"],"sources":["../../../../../../../../../../apps/backend/dist/types/controllers/ai.controller.d.ts"],"mappings":";;;;;;;;;;;;;;;;;;KAmBK2B,wBAAAA,MAA8BE,IAAAA,CAAKD,CAAAA;EACtCE,SAAAA,GAAYX,SAAAA;AAAAA;AAAAA,KAETY,eAAAA,GAAkBJ,wBAAAA,CAAyBnB,kBAAAA;EAC9CwB,QAAAA;EACAC,kBAAAA;AAAAA;AAAAA,KAEGC,iBAAAA,GAAoBpB,YAAAA,CAAaL,qBAAAA;AAAAA,KAIjC+B,iBAAAA,GAAoBX,IAAAA,CAAKF,wBAAAA,CAAyBjB,oBAAAA,CAAqB+B,IAAAA;EAC1ET,QAAAA;AAAAA;AAAAA,KAEGU,mBAAAA,GAAsB5B,YAAAA,CAAaH,yBAAAA,CAA0B8B,IAAAA;AAAAA,KAI7DG,2BAAAA;EACHd,SAAAA,GAAYX,SAAAA;EACZ0B,OAAAA,EAAStB,MAAAA;EACTuB,aAAAA,EAAevB,MAAAA;EACfwB,WAAAA;EACAC,QAAAA;EACAhB,QAAAA;AAAAA;AAAAA,KAEGiB,6BAAAA,GAAgCnC,YAAAA,CAAaX,mBAAAA;;;;KAO7CgD,gCAAAA;EACHrB,SAAAA,GAAYX,SAAAA;EACZ0B,OAAAA,EAAStB,MAAAA;EACTwB,WAAAA;EACAC,QAAAA;EACAhB,QAAAA;EACAoB,OAAAA,EAAS5B,OAAAA;AAAAA;AAAAA,KAEN6B,kCAAAA,GAAqCvC,YAAAA,CAAaV,8BAAAA;;;;KAOlDmD,mCAAAA;EACHzB,SAAAA,GAAYX,SAAAA;EACZ4B,WAAAA;AAAAA;AAAAA,KAEGS,qCAAAA,GAAwC1C,YAAAA,CAAaT,qBAAAA;;;;KAOrDqD,YAAAA;EACH5B,SAAAA,GAAYX,SAAAA;EACZwC,GAAAA,EAAKzD,MAAAA;AAAAA;AAAAA,KAEF0D,cAAAA,GAAiB9C,YAAAA,CAAaR,uBAAAA;;;;KAW9BN,oBAAAA,GAAuBc,YAAAA,CAAab,sBAAAA;AAAAA,KAQpCkE,UAAAA,GAAarD,YAAAA,CAAaP,cAAAA;AAAAA,KAW1BmE,oBAAAA,GAAuB5D,YAAAA;EAC1B6D,cAAAA;AAAAA;AAAAA,KAKGE,oBAAAA;EACHC,IAAAA;EACAC,QAAAA;EACAC,eAAAA;AAAAA,IACEpE,uBAAAA;AAAAA,KACCqE,oBAAAA,GAAuBpE,iBAAAA,CAAkBG,aAAAA;;;AAzDX;;KAiE9BoE,gBAAAA,GAAmBtE,YAAAA,CAAaC,OAAAA;;;;AA9DxB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PaginatedResponse, ResponseData } from "../utils/responseData.js";
|
|
2
|
+
import { AssetAPI } from "../types/asset.types.js";
|
|
3
|
+
//#region ../../../apps/backend/dist/types/controllers/asset.controller.d.ts
|
|
4
|
+
//#region src/controllers/asset.controller.d.ts
|
|
5
|
+
type GetAssetsResult = PaginatedResponse<AssetAPI>;
|
|
6
|
+
type GetAssetByIdResult = ResponseData<AssetAPI>;
|
|
7
|
+
type UploadAssetResult = ResponseData<AssetAPI>;
|
|
8
|
+
type UpdateAssetResult = ResponseData<AssetAPI>;
|
|
9
|
+
type DeleteAssetResult = ResponseData<null>;
|
|
10
|
+
/**
|
|
11
|
+
* Lists all assets for the session's current project, paginated.
|
|
12
|
+
*/
|
|
13
|
+
//#endregion
|
|
14
|
+
export { DeleteAssetResult, GetAssetByIdResult, GetAssetsResult, UpdateAssetResult, UploadAssetResult };
|
|
15
|
+
//# sourceMappingURL=asset.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.controller.d.ts","names":["PaginatedResponse","ResponseData","AssetAPI","FastifyReply","FastifyRequest","GetAssetsResult","GetAssetByIdResult","UploadAssetResult","UpdateAssetResult","DeleteAssetResult","getAssets","Promise","Querystring","page","pageSize","request","reply","getAssetById","Params","assetId","uploadAsset","updateAsset","Body","originalName","alt","caption","deleteAsset"],"sources":["../../../../../../../../../../apps/backend/dist/types/controllers/asset.controller.d.ts"],"mappings":";;;;KAKKK,eAAAA,GAAkBL,iBAAAA,CAAkBE,QAAAA;AAAAA,KACpCI,kBAAAA,GAAqBL,YAAAA,CAAaC,QAAAA;AAAAA,KAClCK,iBAAAA,GAAoBN,YAAAA,CAAaC,QAAAA;AAAAA,KACjCM,iBAAAA,GAAoBP,YAAAA,CAAaC,QAAAA;AAAAA,KACjCO,iBAAAA,GAAoBR,YAAAA;AAJwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProjectAPI } from "../types/project.types.js";
|
|
2
|
+
import { ResponseData } from "../utils/responseData.js";
|
|
3
|
+
//#region ../../../apps/backend/dist/types/controllers/cliSessionToken.controller.d.ts
|
|
4
|
+
//#region src/controllers/cliSessionToken.controller.d.ts
|
|
5
|
+
type CreateCliSessionTokenResult = ResponseData<{
|
|
6
|
+
token: string;
|
|
7
|
+
expiresAt: Date;
|
|
8
|
+
}>;
|
|
9
|
+
type GetCliSessionMeResult = ResponseData<{
|
|
10
|
+
project: ProjectAPI;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a short-lived (2h) CLI session token tied to the authenticated user's
|
|
14
|
+
* current organization and project. Requires a valid browser session.
|
|
15
|
+
*/
|
|
16
|
+
//#endregion
|
|
17
|
+
export { CreateCliSessionTokenResult, GetCliSessionMeResult };
|
|
18
|
+
//# sourceMappingURL=cliSessionToken.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cliSessionToken.controller.d.ts","names":["ProjectAPI","ResponseData","FastifyReply","FastifyRequest","CreateCliSessionTokenResult","Date","token","expiresAt","GetCliSessionMeResult","project","createCliSessionTokenHandler","Promise","request","reply","getCliSessionMeHandler"],"sources":["../../../../../../../../../../apps/backend/dist/types/controllers/cliSessionToken.controller.d.ts"],"mappings":";;;;KAKKI,2BAAAA,GAA8BH,YAAAA;EACjCK,KAAAA;EACAC,SAAAA,EAAWF,IAAAA;AAAAA;AAAAA,KAERG,qBAAAA,GAAwBP,YAAAA;EAC3BQ,OAAAA,EAAST,UAAAA;AAAAA;;;;AAHM"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Dictionary as Dictionary$1, DictionaryAPI, DictionaryCreationData } from "../types/dictionary.types.js";
|
|
2
|
+
import { PaginatedResponse, ResponseData } from "../utils/responseData.js";
|
|
3
|
+
import { FiltersAndPagination } from "../utils/filtersAndPagination/getFiltersAndPaginationFromBody.js";
|
|
4
|
+
import { DictionaryFiltersParams } from "../utils/filtersAndPagination/getDictionaryFiltersAndPagination.js";
|
|
5
|
+
import { Dictionary, DictionaryId, LocalDictionaryId } from "@intlayer/types/dictionary";
|
|
6
|
+
//#region ../../../apps/backend/dist/types/controllers/dictionary.controller.d.ts
|
|
7
|
+
//#region src/controllers/dictionary.controller.d.ts
|
|
8
|
+
type GetDictionariesParams = FiltersAndPagination<DictionaryFiltersParams>;
|
|
9
|
+
type GetDictionariesResult = PaginatedResponse<DictionaryAPI>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves a list of dictionaries based on filters and pagination.
|
|
12
|
+
*/
|
|
13
|
+
type GetDictionariesKeysResult = ResponseData<string[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves a list of dictionaries keys based on filters and pagination.
|
|
16
|
+
*/
|
|
17
|
+
type GetDictionariesUpdateTimestampResult = ResponseData<Record<DictionaryId, {
|
|
18
|
+
key: string;
|
|
19
|
+
updatedAt: number;
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves a list of dictionaries keys based on filters and pagination.
|
|
23
|
+
*/
|
|
24
|
+
type GetDictionaryParams = {
|
|
25
|
+
dictionaryKey: string;
|
|
26
|
+
};
|
|
27
|
+
type GetDictionaryQuery = {
|
|
28
|
+
version?: string;
|
|
29
|
+
};
|
|
30
|
+
type GetDictionaryResult = ResponseData<DictionaryAPI>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a list of dictionaries based on filters and pagination.
|
|
33
|
+
*/
|
|
34
|
+
type AddDictionaryBody = {
|
|
35
|
+
dictionary: DictionaryCreationData;
|
|
36
|
+
};
|
|
37
|
+
type AddDictionaryResult = ResponseData<DictionaryAPI>;
|
|
38
|
+
/**
|
|
39
|
+
* Adds a new dictionary to the database.
|
|
40
|
+
*/
|
|
41
|
+
type PushDictionariesBody = {
|
|
42
|
+
dictionaries: Dictionary[];
|
|
43
|
+
};
|
|
44
|
+
type PushDictionariesResultData = {
|
|
45
|
+
newDictionaries: {
|
|
46
|
+
key: string;
|
|
47
|
+
localId: LocalDictionaryId;
|
|
48
|
+
id: string | undefined;
|
|
49
|
+
}[];
|
|
50
|
+
updatedDictionaries: {
|
|
51
|
+
key: string;
|
|
52
|
+
localId: LocalDictionaryId;
|
|
53
|
+
id: string | undefined;
|
|
54
|
+
}[];
|
|
55
|
+
upToDateDictionaries: {
|
|
56
|
+
key: string;
|
|
57
|
+
localId: LocalDictionaryId;
|
|
58
|
+
id: string | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
error: {
|
|
61
|
+
id: string | undefined;
|
|
62
|
+
key: string;
|
|
63
|
+
localId: LocalDictionaryId | undefined;
|
|
64
|
+
message: string;
|
|
65
|
+
}[];
|
|
66
|
+
};
|
|
67
|
+
type PushDictionariesResult = ResponseData<PushDictionariesResultData>;
|
|
68
|
+
/**
|
|
69
|
+
* Check each dictionaries, add the new ones and update the existing ones.
|
|
70
|
+
*/
|
|
71
|
+
type UpdateDictionaryBody = Partial<Dictionary$1>;
|
|
72
|
+
type UpdateDictionaryResult = ResponseData<DictionaryAPI>;
|
|
73
|
+
/**
|
|
74
|
+
* Updates an existing dictionary in the database.
|
|
75
|
+
*/
|
|
76
|
+
type DeleteDictionaryParam = {
|
|
77
|
+
dictionaryId: string;
|
|
78
|
+
};
|
|
79
|
+
type DeleteDictionaryResult = ResponseData<DictionaryAPI>;
|
|
80
|
+
/**
|
|
81
|
+
* Deletes a dictionary from the database by its ID.
|
|
82
|
+
*/
|
|
83
|
+
//#endregion
|
|
84
|
+
export { AddDictionaryBody, AddDictionaryResult, DeleteDictionaryParam, DeleteDictionaryResult, GetDictionariesKeysResult, GetDictionariesParams, GetDictionariesResult, GetDictionariesUpdateTimestampResult, GetDictionaryParams, GetDictionaryQuery, GetDictionaryResult, PushDictionariesBody, PushDictionariesResult, UpdateDictionaryBody, UpdateDictionaryResult };
|
|
85
|
+
//# sourceMappingURL=dictionary.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary.controller.d.ts","names":["Dictionary","Dictionary$1","DictionaryAPI","DictionaryCreationData","FiltersAndPagination","PaginatedResponse","ResponseData","DictionaryFiltersParams","DictionaryId","LocalDictionaryId","FastifyReply","FastifyRequest","GetDictionariesParams","GetDictionariesResult","getDictionaries","Promise","Querystring","request","reply","GetDictionariesKeysResult","getDictionariesKeys","_request","GetDictionariesUpdateTimestampResult","Record","key","updatedAt","getDictionariesUpdateTimestamp","GetDictionaryParams","dictionaryKey","GetDictionaryQuery","version","GetDictionaryResult","getDictionaryByKey","Params","AddDictionaryBody","dictionary","AddDictionaryResult","addDictionary","Body","PushDictionariesBody","dictionaries","PushDictionariesResultData","newDictionaries","localId","id","updatedDictionaries","upToDateDictionaries","error","message","PushDictionariesResult","pushDictionaries","UpdateDictionaryParam","dictionaryId","UpdateDictionaryBody","Partial","UpdateDictionaryResult","updateDictionary","DeleteDictionaryParam","DeleteDictionaryResult","deleteDictionary"],"sources":["../../../../../../../../../../apps/backend/dist/types/controllers/dictionary.controller.d.ts"],"mappings":";;;;;;;KAQKY,qBAAAA,GAAwBR,oBAAAA,CAAqBG,uBAAAA;AAAAA,KAC7CM,qBAAAA,GAAwBR,iBAAAA,CAAkBH,aAAAA;;;;KAO1CiB,yBAAAA,GAA4Bb,YAAAA;;AADE;;KAM9BgB,oCAAAA,GAAuChB,YAAAA,CAAaiB,MAAAA,CAAOf,YAAAA;EAC9DgB,GAAAA;EACAC,SAAAA;AAAAA;;;;KAMGE,mBAAAA;EACHC,aAAAA;AAAAA;AAAAA,KAEGC,kBAAAA;EACHC,OAAAA;AAAAA;AAAAA,KAEGC,mBAAAA,GAAsBzB,YAAAA,CAAaJ,aAAAA;;;AAPgE;KAenGgC,iBAAAA;EACHC,UAAAA,EAAYhC,sBAAAA;AAAAA;AAAAA,KAETiC,mBAAAA,GAAsB9B,YAAAA,CAAaJ,aAAAA;;AAb/B;;KAoBJqC,oBAAAA;EACHC,YAAAA,EAAcxC,UAAAA;AAAAA;AAAAA,KAEXyC,0BAAAA;EACHC,eAAAA;IACElB,GAAAA;IACAmB,OAAAA,EAASlC,iBAAAA;IACTmC,EAAAA;EAAAA;EAEFC,mBAAAA;IACErB,GAAAA;IACAmB,OAAAA,EAASlC,iBAAAA;IACTmC,EAAAA;EAAAA;EAEFE,oBAAAA;IACEtB,GAAAA;IACAmB,OAAAA,EAASlC,iBAAAA;IACTmC,EAAAA;EAAAA;EAEFG,KAAAA;IACEH,EAAAA;IACApB,GAAAA;IACAmB,OAAAA,EAASlC,iBAAAA;IACTuC,OAAAA;EAAAA;AAAAA;AAAAA,KAGCC,sBAAAA,GAAyB3C,YAAAA,CAAamC,0BAAAA;;;;KAUtCY,oBAAAA,GAAuBC,OAAAA,CAAQrD,YAAAA;AAAAA,KAC/BsD,sBAAAA,GAAyBjD,YAAAA,CAAaJ,aAAAA;;;;KAQtCuD,qBAAAA;EACHL,YAAAA;AAAAA;AAAAA,KAEGM,sBAAAA,GAAyBpD,YAAAA,CAAaJ,aAAAA"}
|