@equinor/fusion-framework-module-services 0.0.0-next-20230915111233
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/.turbo/turbo-build.log +4 -0
- package/CHANGELOG.md +1470 -0
- package/LICENSE +21 -0
- package/dist/esm/bookmarks/api-models.js +2 -0
- package/dist/esm/bookmarks/api-models.js.map +1 -0
- package/dist/esm/bookmarks/client.js +48 -0
- package/dist/esm/bookmarks/client.js.map +1 -0
- package/dist/esm/bookmarks/delete/client.js +4 -0
- package/dist/esm/bookmarks/delete/client.js.map +1 -0
- package/dist/esm/bookmarks/delete/generate-endpoint.js +17 -0
- package/dist/esm/bookmarks/delete/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/delete/generate-parameters.js +7 -0
- package/dist/esm/bookmarks/delete/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/delete/index.js +5 -0
- package/dist/esm/bookmarks/delete/index.js.map +1 -0
- package/dist/esm/bookmarks/delete/types-v1.js +2 -0
- package/dist/esm/bookmarks/delete/types-v1.js.map +1 -0
- package/dist/esm/bookmarks/delete/types.js +2 -0
- package/dist/esm/bookmarks/delete/types.js.map +1 -0
- package/dist/esm/bookmarks/favorites/delete/client.js +4 -0
- package/dist/esm/bookmarks/favorites/delete/client.js.map +1 -0
- package/dist/esm/bookmarks/favorites/delete/generate-endpoint.js +12 -0
- package/dist/esm/bookmarks/favorites/delete/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/favorites/delete/generate-parameters.js +7 -0
- package/dist/esm/bookmarks/favorites/delete/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/favorites/delete/index.js +5 -0
- package/dist/esm/bookmarks/favorites/delete/index.js.map +1 -0
- package/dist/esm/bookmarks/favorites/delete/types-v1.js +2 -0
- package/dist/esm/bookmarks/favorites/delete/types-v1.js.map +1 -0
- package/dist/esm/bookmarks/favorites/delete/types.js +2 -0
- package/dist/esm/bookmarks/favorites/delete/types.js.map +1 -0
- package/dist/esm/bookmarks/favorites/head/client.js +4 -0
- package/dist/esm/bookmarks/favorites/head/client.js.map +1 -0
- package/dist/esm/bookmarks/favorites/head/generate-endpoint.js +12 -0
- package/dist/esm/bookmarks/favorites/head/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/favorites/head/generate-parameters.js +9 -0
- package/dist/esm/bookmarks/favorites/head/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/favorites/head/index.js +5 -0
- package/dist/esm/bookmarks/favorites/head/index.js.map +1 -0
- package/dist/esm/bookmarks/favorites/head/types.js +2 -0
- package/dist/esm/bookmarks/favorites/head/types.js.map +1 -0
- package/dist/esm/bookmarks/favorites/post/client.js +4 -0
- package/dist/esm/bookmarks/favorites/post/client.js.map +1 -0
- package/dist/esm/bookmarks/favorites/post/generate-endpoint.js +11 -0
- package/dist/esm/bookmarks/favorites/post/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/favorites/post/generate-parameters.js +9 -0
- package/dist/esm/bookmarks/favorites/post/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/favorites/post/index.js +5 -0
- package/dist/esm/bookmarks/favorites/post/index.js.map +1 -0
- package/dist/esm/bookmarks/favorites/post/types.js +2 -0
- package/dist/esm/bookmarks/favorites/post/types.js.map +1 -0
- package/dist/esm/bookmarks/get/client.js +4 -0
- package/dist/esm/bookmarks/get/client.js.map +1 -0
- package/dist/esm/bookmarks/get/generate-endpoint.js +17 -0
- package/dist/esm/bookmarks/get/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/get/generate-parameters.js +6 -0
- package/dist/esm/bookmarks/get/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/get/index.js +5 -0
- package/dist/esm/bookmarks/get/index.js.map +1 -0
- package/dist/esm/bookmarks/get/types.js +2 -0
- package/dist/esm/bookmarks/get/types.js.map +1 -0
- package/dist/esm/bookmarks/getAll/client.js +4 -0
- package/dist/esm/bookmarks/getAll/client.js.map +1 -0
- package/dist/esm/bookmarks/getAll/generate-endpoint.js +11 -0
- package/dist/esm/bookmarks/getAll/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/getAll/generate-parameters.js +6 -0
- package/dist/esm/bookmarks/getAll/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/getAll/index.js +5 -0
- package/dist/esm/bookmarks/getAll/index.js.map +1 -0
- package/dist/esm/bookmarks/getAll/types.js +2 -0
- package/dist/esm/bookmarks/getAll/types.js.map +1 -0
- package/dist/esm/bookmarks/index.js +4 -0
- package/dist/esm/bookmarks/index.js.map +1 -0
- package/dist/esm/bookmarks/patch/client.js +4 -0
- package/dist/esm/bookmarks/patch/client.js.map +1 -0
- package/dist/esm/bookmarks/patch/generate-endpoint.js +11 -0
- package/dist/esm/bookmarks/patch/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/patch/generate-parameters.js +9 -0
- package/dist/esm/bookmarks/patch/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/patch/index.js +5 -0
- package/dist/esm/bookmarks/patch/index.js.map +1 -0
- package/dist/esm/bookmarks/patch/types.js +2 -0
- package/dist/esm/bookmarks/patch/types.js.map +1 -0
- package/dist/esm/bookmarks/post/client.js +4 -0
- package/dist/esm/bookmarks/post/client.js.map +1 -0
- package/dist/esm/bookmarks/post/generate-endpoint.js +11 -0
- package/dist/esm/bookmarks/post/generate-endpoint.js.map +1 -0
- package/dist/esm/bookmarks/post/generate-parameters.js +9 -0
- package/dist/esm/bookmarks/post/generate-parameters.js.map +1 -0
- package/dist/esm/bookmarks/post/index.js +5 -0
- package/dist/esm/bookmarks/post/index.js.map +1 -0
- package/dist/esm/bookmarks/post/types.js +2 -0
- package/dist/esm/bookmarks/post/types.js.map +1 -0
- package/dist/esm/bookmarks/types.js +2 -0
- package/dist/esm/bookmarks/types.js.map +1 -0
- package/dist/esm/configurator.js +3 -0
- package/dist/esm/configurator.js.map +1 -0
- package/dist/esm/context/api-models.js +2 -0
- package/dist/esm/context/api-models.js.map +1 -0
- package/dist/esm/context/client.js +27 -0
- package/dist/esm/context/client.js.map +1 -0
- package/dist/esm/context/get/client.js +4 -0
- package/dist/esm/context/get/client.js.map +1 -0
- package/dist/esm/context/get/generate-endpoint.js +18 -0
- package/dist/esm/context/get/generate-endpoint.js.map +1 -0
- package/dist/esm/context/get/generate-parameters.js +7 -0
- package/dist/esm/context/get/generate-parameters.js.map +1 -0
- package/dist/esm/context/get/index.js +6 -0
- package/dist/esm/context/get/index.js.map +1 -0
- package/dist/esm/context/get/types.js +2 -0
- package/dist/esm/context/get/types.js.map +1 -0
- package/dist/esm/context/index.js +5 -0
- package/dist/esm/context/index.js.map +1 -0
- package/dist/esm/context/query/client.js +4 -0
- package/dist/esm/context/query/client.js.map +1 -0
- package/dist/esm/context/query/generate-endpoint.js +49 -0
- package/dist/esm/context/query/generate-endpoint.js.map +1 -0
- package/dist/esm/context/query/generate-parameters.js +7 -0
- package/dist/esm/context/query/generate-parameters.js.map +1 -0
- package/dist/esm/context/query/index.js +6 -0
- package/dist/esm/context/query/index.js.map +1 -0
- package/dist/esm/context/query/types.js +2 -0
- package/dist/esm/context/query/types.js.map +1 -0
- package/dist/esm/context/related/client.js +4 -0
- package/dist/esm/context/related/client.js.map +1 -0
- package/dist/esm/context/related/generate-endpoint.js +46 -0
- package/dist/esm/context/related/generate-endpoint.js.map +1 -0
- package/dist/esm/context/related/generate-parameters.js +7 -0
- package/dist/esm/context/related/generate-parameters.js.map +1 -0
- package/dist/esm/context/related/index.js +6 -0
- package/dist/esm/context/related/index.js.map +1 -0
- package/dist/esm/context/related/types.js +2 -0
- package/dist/esm/context/related/types.js.map +1 -0
- package/dist/esm/context/static.js +6 -0
- package/dist/esm/context/static.js.map +1 -0
- package/dist/esm/context/types.js +2 -0
- package/dist/esm/context/types.js.map +1 -0
- package/dist/esm/errors.js +7 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/module.js +51 -0
- package/dist/esm/module.js.map +1 -0
- package/dist/esm/notification/api-models.js +2 -0
- package/dist/esm/notification/api-models.js.map +1 -0
- package/dist/esm/notification/client.js +43 -0
- package/dist/esm/notification/client.js.map +1 -0
- package/dist/esm/notification/index.js +5 -0
- package/dist/esm/notification/index.js.map +1 -0
- package/dist/esm/notification/notification/delete/client.js +4 -0
- package/dist/esm/notification/notification/delete/client.js.map +1 -0
- package/dist/esm/notification/notification/delete/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/delete/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/delete/generate-parameters.js +10 -0
- package/dist/esm/notification/notification/delete/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/delete/index.js +6 -0
- package/dist/esm/notification/notification/delete/index.js.map +1 -0
- package/dist/esm/notification/notification/delete/types.js +2 -0
- package/dist/esm/notification/notification/delete/types.js.map +1 -0
- package/dist/esm/notification/notification/get/client.js +4 -0
- package/dist/esm/notification/notification/get/client.js.map +1 -0
- package/dist/esm/notification/notification/get/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/get/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/get/generate-parameters.js +7 -0
- package/dist/esm/notification/notification/get/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/get/index.js +6 -0
- package/dist/esm/notification/notification/get/index.js.map +1 -0
- package/dist/esm/notification/notification/get/types.js +2 -0
- package/dist/esm/notification/notification/get/types.js.map +1 -0
- package/dist/esm/notification/notification/getAll/client.js +4 -0
- package/dist/esm/notification/notification/getAll/client.js.map +1 -0
- package/dist/esm/notification/notification/getAll/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/getAll/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/getAll/generate-parameters.js +7 -0
- package/dist/esm/notification/notification/getAll/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/getAll/index.js +6 -0
- package/dist/esm/notification/notification/getAll/index.js.map +1 -0
- package/dist/esm/notification/notification/getAll/types.js +2 -0
- package/dist/esm/notification/notification/getAll/types.js.map +1 -0
- package/dist/esm/notification/notification/index.js +6 -0
- package/dist/esm/notification/notification/index.js.map +1 -0
- package/dist/esm/notification/notification/patch/client.js +4 -0
- package/dist/esm/notification/notification/patch/client.js.map +1 -0
- package/dist/esm/notification/notification/patch/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/patch/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/patch/generate-parameters.js +10 -0
- package/dist/esm/notification/notification/patch/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/patch/index.js +6 -0
- package/dist/esm/notification/notification/patch/index.js.map +1 -0
- package/dist/esm/notification/notification/patch/types.js +2 -0
- package/dist/esm/notification/notification/patch/types.js.map +1 -0
- package/dist/esm/notification/notification/post/client.js +4 -0
- package/dist/esm/notification/notification/post/client.js.map +1 -0
- package/dist/esm/notification/notification/post/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/post/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/post/generate-parameters.js +10 -0
- package/dist/esm/notification/notification/post/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/post/index.js +6 -0
- package/dist/esm/notification/notification/post/index.js.map +1 -0
- package/dist/esm/notification/notification/post/types.js +2 -0
- package/dist/esm/notification/notification/post/types.js.map +1 -0
- package/dist/esm/notification/settings/get/client.js +4 -0
- package/dist/esm/notification/settings/get/client.js.map +1 -0
- package/dist/esm/notification/settings/get/generate-endpoint.js +18 -0
- package/dist/esm/notification/settings/get/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/settings/get/generate-parameters.js +7 -0
- package/dist/esm/notification/settings/get/generate-parameters.js.map +1 -0
- package/dist/esm/notification/settings/get/index.js +6 -0
- package/dist/esm/notification/settings/get/index.js.map +1 -0
- package/dist/esm/notification/settings/get/types.js +2 -0
- package/dist/esm/notification/settings/get/types.js.map +1 -0
- package/dist/esm/notification/settings/put/client.js +4 -0
- package/dist/esm/notification/settings/put/client.js.map +1 -0
- package/dist/esm/notification/settings/put/generate-endpoint.js +18 -0
- package/dist/esm/notification/settings/put/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/settings/put/generate-parameters.js +10 -0
- package/dist/esm/notification/settings/put/generate-parameters.js.map +1 -0
- package/dist/esm/notification/settings/put/index.js +6 -0
- package/dist/esm/notification/settings/put/index.js.map +1 -0
- package/dist/esm/notification/settings/put/types.js +2 -0
- package/dist/esm/notification/settings/put/types.js.map +1 -0
- package/dist/esm/notification/static.js +6 -0
- package/dist/esm/notification/static.js.map +1 -0
- package/dist/esm/notification/types.js +2 -0
- package/dist/esm/notification/types.js.map +1 -0
- package/dist/esm/people/api-models.js +2 -0
- package/dist/esm/people/api-models.js.map +1 -0
- package/dist/esm/people/api-models.v2.js +2 -0
- package/dist/esm/people/api-models.v2.js.map +1 -0
- package/dist/esm/people/api-models.v4.js +2 -0
- package/dist/esm/people/api-models.v4.js.map +1 -0
- package/dist/esm/people/client.js +26 -0
- package/dist/esm/people/client.js.map +1 -0
- package/dist/esm/people/index.js +4 -0
- package/dist/esm/people/index.js.map +1 -0
- package/dist/esm/people/person-details/client.js +4 -0
- package/dist/esm/people/person-details/client.js.map +1 -0
- package/dist/esm/people/person-details/generate-endpoint.js +21 -0
- package/dist/esm/people/person-details/generate-endpoint.js.map +1 -0
- package/dist/esm/people/person-details/generate-parameters.js +7 -0
- package/dist/esm/people/person-details/generate-parameters.js.map +1 -0
- package/dist/esm/people/person-details/index.js +5 -0
- package/dist/esm/people/person-details/index.js.map +1 -0
- package/dist/esm/people/person-details/types.js +2 -0
- package/dist/esm/people/person-details/types.js.map +1 -0
- package/dist/esm/people/person-photo/client.js +4 -0
- package/dist/esm/people/person-photo/client.js.map +1 -0
- package/dist/esm/people/person-photo/generate-endpoint.js +18 -0
- package/dist/esm/people/person-photo/generate-endpoint.js.map +1 -0
- package/dist/esm/people/person-photo/generate-parameters.js +7 -0
- package/dist/esm/people/person-photo/generate-parameters.js.map +1 -0
- package/dist/esm/people/person-photo/index.js +5 -0
- package/dist/esm/people/person-photo/index.js.map +1 -0
- package/dist/esm/people/person-photo/types.js +2 -0
- package/dist/esm/people/person-photo/types.js.map +1 -0
- package/dist/esm/people/query/client.js +4 -0
- package/dist/esm/people/query/client.js.map +1 -0
- package/dist/esm/people/query/generate-endpoint.js +19 -0
- package/dist/esm/people/query/generate-endpoint.js.map +1 -0
- package/dist/esm/people/query/generate-parameters.js +7 -0
- package/dist/esm/people/query/generate-parameters.js.map +1 -0
- package/dist/esm/people/query/index.js +5 -0
- package/dist/esm/people/query/index.js.map +1 -0
- package/dist/esm/people/query/types.js +2 -0
- package/dist/esm/people/query/types.js.map +1 -0
- package/dist/esm/people/static.js +6 -0
- package/dist/esm/people/static.js.map +1 -0
- package/dist/esm/provider.js +70 -0
- package/dist/esm/provider.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/version.js +2 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/bookmarks/api-models.d.ts +42 -0
- package/dist/types/bookmarks/client.d.ts +24 -0
- package/dist/types/bookmarks/delete/client.d.ts +5 -0
- package/dist/types/bookmarks/delete/generate-endpoint.d.ts +2 -0
- package/dist/types/bookmarks/delete/generate-parameters.d.ts +4 -0
- package/dist/types/bookmarks/delete/index.d.ts +4 -0
- package/dist/types/bookmarks/delete/types-v1.d.ts +3 -0
- package/dist/types/bookmarks/delete/types.d.ts +15 -0
- package/dist/types/bookmarks/favorites/delete/client.d.ts +5 -0
- package/dist/types/bookmarks/favorites/delete/generate-endpoint.d.ts +2 -0
- package/dist/types/bookmarks/favorites/delete/generate-parameters.d.ts +4 -0
- package/dist/types/bookmarks/favorites/delete/index.d.ts +4 -0
- package/dist/types/bookmarks/favorites/delete/types-v1.d.ts +3 -0
- package/dist/types/bookmarks/favorites/delete/types.d.ts +15 -0
- package/dist/types/bookmarks/favorites/head/client.d.ts +5 -0
- package/dist/types/bookmarks/favorites/head/generate-endpoint.d.ts +2 -0
- package/dist/types/bookmarks/favorites/head/generate-parameters.d.ts +4 -0
- package/dist/types/bookmarks/favorites/head/index.d.ts +4 -0
- package/dist/types/bookmarks/favorites/head/types.d.ts +17 -0
- package/dist/types/bookmarks/favorites/post/client.d.ts +5 -0
- package/dist/types/bookmarks/favorites/post/generate-endpoint.d.ts +2 -0
- package/dist/types/bookmarks/favorites/post/generate-parameters.d.ts +4 -0
- package/dist/types/bookmarks/favorites/post/index.d.ts +4 -0
- package/dist/types/bookmarks/favorites/post/types.d.ts +17 -0
- package/dist/types/bookmarks/get/client.d.ts +5 -0
- package/dist/types/bookmarks/get/generate-endpoint.d.ts +2 -0
- package/dist/types/bookmarks/get/generate-parameters.d.ts +4 -0
- package/dist/types/bookmarks/get/index.d.ts +4 -0
- package/dist/types/bookmarks/get/types.d.ts +19 -0
- package/dist/types/bookmarks/getAll/client.d.ts +5 -0
- package/dist/types/bookmarks/getAll/generate-endpoint.d.ts +1 -0
- package/dist/types/bookmarks/getAll/generate-parameters.d.ts +3 -0
- package/dist/types/bookmarks/getAll/index.d.ts +4 -0
- package/dist/types/bookmarks/getAll/types.d.ts +10 -0
- package/dist/types/bookmarks/index.d.ts +3 -0
- package/dist/types/bookmarks/patch/client.d.ts +5 -0
- package/dist/types/bookmarks/patch/generate-endpoint.d.ts +2 -0
- package/dist/types/bookmarks/patch/generate-parameters.d.ts +4 -0
- package/dist/types/bookmarks/patch/index.d.ts +4 -0
- package/dist/types/bookmarks/patch/types.d.ts +19 -0
- package/dist/types/bookmarks/post/client.d.ts +5 -0
- package/dist/types/bookmarks/post/generate-endpoint.d.ts +2 -0
- package/dist/types/bookmarks/post/generate-parameters.d.ts +4 -0
- package/dist/types/bookmarks/post/index.d.ts +4 -0
- package/dist/types/bookmarks/post/types.d.ts +28 -0
- package/dist/types/bookmarks/types.d.ts +1 -0
- package/dist/types/configurator.d.ts +6 -0
- package/dist/types/context/api-models.d.ts +31 -0
- package/dist/types/context/client.d.ts +16 -0
- package/dist/types/context/get/client.d.ts +4 -0
- package/dist/types/context/get/generate-endpoint.d.ts +2 -0
- package/dist/types/context/get/generate-parameters.d.ts +4 -0
- package/dist/types/context/get/index.d.ts +5 -0
- package/dist/types/context/get/types.d.ts +19 -0
- package/dist/types/context/index.d.ts +4 -0
- package/dist/types/context/query/client.d.ts +4 -0
- package/dist/types/context/query/generate-endpoint.d.ts +3 -0
- package/dist/types/context/query/generate-parameters.d.ts +4 -0
- package/dist/types/context/query/index.d.ts +5 -0
- package/dist/types/context/query/types.d.ts +32 -0
- package/dist/types/context/related/client.d.ts +4 -0
- package/dist/types/context/related/generate-endpoint.d.ts +3 -0
- package/dist/types/context/related/generate-parameters.d.ts +4 -0
- package/dist/types/context/related/index.d.ts +5 -0
- package/dist/types/context/related/types.d.ts +33 -0
- package/dist/types/context/static.d.ts +4 -0
- package/dist/types/context/types.d.ts +1 -0
- package/dist/types/errors.d.ts +4 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/module.d.ts +20 -0
- package/dist/types/notification/api-models.d.ts +54 -0
- package/dist/types/notification/client.d.ts +24 -0
- package/dist/types/notification/index.d.ts +4 -0
- package/dist/types/notification/notification/delete/client.d.ts +5 -0
- package/dist/types/notification/notification/delete/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/delete/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/delete/index.d.ts +5 -0
- package/dist/types/notification/notification/delete/types.d.ts +21 -0
- package/dist/types/notification/notification/get/client.d.ts +5 -0
- package/dist/types/notification/notification/get/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/get/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/get/index.d.ts +5 -0
- package/dist/types/notification/notification/get/types.d.ts +21 -0
- package/dist/types/notification/notification/getAll/client.d.ts +5 -0
- package/dist/types/notification/notification/getAll/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/getAll/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/getAll/index.d.ts +5 -0
- package/dist/types/notification/notification/getAll/types.d.ts +21 -0
- package/dist/types/notification/notification/index.d.ts +5 -0
- package/dist/types/notification/notification/patch/client.d.ts +5 -0
- package/dist/types/notification/notification/patch/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/patch/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/patch/index.d.ts +5 -0
- package/dist/types/notification/notification/patch/types.d.ts +22 -0
- package/dist/types/notification/notification/post/client.d.ts +5 -0
- package/dist/types/notification/notification/post/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/post/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/post/index.d.ts +5 -0
- package/dist/types/notification/notification/post/types.d.ts +33 -0
- package/dist/types/notification/settings/get/client.d.ts +5 -0
- package/dist/types/notification/settings/get/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/settings/get/generate-parameters.d.ts +5 -0
- package/dist/types/notification/settings/get/index.d.ts +5 -0
- package/dist/types/notification/settings/get/types.d.ts +21 -0
- package/dist/types/notification/settings/put/client.d.ts +5 -0
- package/dist/types/notification/settings/put/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/settings/put/generate-parameters.d.ts +5 -0
- package/dist/types/notification/settings/put/index.d.ts +5 -0
- package/dist/types/notification/settings/put/types.d.ts +17 -0
- package/dist/types/notification/static.d.ts +4 -0
- package/dist/types/notification/types.d.ts +1 -0
- package/dist/types/people/api-models.d.ts +34 -0
- package/dist/types/people/api-models.v2.d.ts +25 -0
- package/dist/types/people/api-models.v4.d.ts +81 -0
- package/dist/types/people/client.d.ts +15 -0
- package/dist/types/people/index.d.ts +3 -0
- package/dist/types/people/person-details/client.d.ts +5 -0
- package/dist/types/people/person-details/generate-endpoint.d.ts +2 -0
- package/dist/types/people/person-details/generate-parameters.d.ts +5 -0
- package/dist/types/people/person-details/index.d.ts +4 -0
- package/dist/types/people/person-details/types.d.ts +30 -0
- package/dist/types/people/person-photo/client.d.ts +5 -0
- package/dist/types/people/person-photo/generate-endpoint.d.ts +2 -0
- package/dist/types/people/person-photo/generate-parameters.d.ts +5 -0
- package/dist/types/people/person-photo/index.d.ts +4 -0
- package/dist/types/people/person-photo/types.d.ts +16 -0
- package/dist/types/people/query/client.d.ts +5 -0
- package/dist/types/people/query/generate-endpoint.d.ts +2 -0
- package/dist/types/people/query/generate-parameters.d.ts +5 -0
- package/dist/types/people/query/index.d.ts +4 -0
- package/dist/types/people/query/types.d.ts +17 -0
- package/dist/types/people/static.d.ts +4 -0
- package/dist/types/provider.d.ts +37 -0
- package/dist/types/types.d.ts +17 -0
- package/dist/types/version.d.ts +1 -0
- package/package.json +85 -0
- package/src/bookmarks/api-models.ts +46 -0
- package/src/bookmarks/client.ts +132 -0
- package/src/bookmarks/delete/client.ts +35 -0
- package/src/bookmarks/delete/generate-endpoint.ts +24 -0
- package/src/bookmarks/delete/generate-parameters.ts +25 -0
- package/src/bookmarks/delete/index.ts +6 -0
- package/src/bookmarks/delete/types-v1.ts +2 -0
- package/src/bookmarks/delete/types.ts +35 -0
- package/src/bookmarks/favorites/delete/client.ts +35 -0
- package/src/bookmarks/favorites/delete/generate-endpoint.ts +19 -0
- package/src/bookmarks/favorites/delete/generate-parameters.ts +25 -0
- package/src/bookmarks/favorites/delete/index.ts +6 -0
- package/src/bookmarks/favorites/delete/types-v1.ts +2 -0
- package/src/bookmarks/favorites/delete/types.ts +33 -0
- package/src/bookmarks/favorites/head/client.ts +35 -0
- package/src/bookmarks/favorites/head/generate-endpoint.ts +19 -0
- package/src/bookmarks/favorites/head/generate-parameters.ts +28 -0
- package/src/bookmarks/favorites/head/index.ts +6 -0
- package/src/bookmarks/favorites/head/types.ts +35 -0
- package/src/bookmarks/favorites/post/client.ts +35 -0
- package/src/bookmarks/favorites/post/generate-endpoint.ts +18 -0
- package/src/bookmarks/favorites/post/generate-parameters.ts +28 -0
- package/src/bookmarks/favorites/post/index.ts +6 -0
- package/src/bookmarks/favorites/post/types.ts +35 -0
- package/src/bookmarks/get/client.ts +30 -0
- package/src/bookmarks/get/generate-endpoint.ts +24 -0
- package/src/bookmarks/get/generate-parameters.ts +18 -0
- package/src/bookmarks/get/index.ts +6 -0
- package/src/bookmarks/get/types.ts +39 -0
- package/src/bookmarks/getAll/client.ts +30 -0
- package/src/bookmarks/getAll/generate-endpoint.ts +15 -0
- package/src/bookmarks/getAll/generate-parameters.ts +18 -0
- package/src/bookmarks/getAll/index.ts +6 -0
- package/src/bookmarks/getAll/types.ts +21 -0
- package/src/bookmarks/index.ts +4 -0
- package/src/bookmarks/patch/client.ts +30 -0
- package/src/bookmarks/patch/generate-endpoint.ts +18 -0
- package/src/bookmarks/patch/generate-parameters.ts +28 -0
- package/src/bookmarks/patch/index.ts +6 -0
- package/src/bookmarks/patch/types.ts +45 -0
- package/src/bookmarks/post/client.ts +30 -0
- package/src/bookmarks/post/generate-endpoint.ts +18 -0
- package/src/bookmarks/post/generate-parameters.ts +28 -0
- package/src/bookmarks/post/index.ts +6 -0
- package/src/bookmarks/post/types.ts +58 -0
- package/src/bookmarks/types.ts +1 -0
- package/src/configurator.ts +8 -0
- package/src/context/api-models.ts +42 -0
- package/src/context/client.ts +76 -0
- package/src/context/get/client.ts +33 -0
- package/src/context/get/generate-endpoint.ts +25 -0
- package/src/context/get/generate-parameters.ts +23 -0
- package/src/context/get/index.ts +8 -0
- package/src/context/get/types.ts +45 -0
- package/src/context/index.ts +6 -0
- package/src/context/query/client.ts +35 -0
- package/src/context/query/generate-endpoint.ts +67 -0
- package/src/context/query/generate-parameters.ts +23 -0
- package/src/context/query/index.ts +8 -0
- package/src/context/query/types.ts +56 -0
- package/src/context/related/client.ts +35 -0
- package/src/context/related/generate-endpoint.ts +63 -0
- package/src/context/related/generate-parameters.ts +23 -0
- package/src/context/related/index.ts +8 -0
- package/src/context/related/types.ts +61 -0
- package/src/context/static.ts +6 -0
- package/src/context/types.ts +1 -0
- package/src/errors.ts +8 -0
- package/src/index.ts +6 -0
- package/src/module.ts +104 -0
- package/src/notification/api-models.ts +70 -0
- package/src/notification/client.ts +170 -0
- package/src/notification/index.ts +6 -0
- package/src/notification/notification/delete/client.ts +37 -0
- package/src/notification/notification/delete/generate-endpoint.ts +24 -0
- package/src/notification/notification/delete/generate-parameters.ts +32 -0
- package/src/notification/notification/delete/index.ts +8 -0
- package/src/notification/notification/delete/types.ts +44 -0
- package/src/notification/notification/get/client.ts +33 -0
- package/src/notification/notification/get/generate-endpoint.ts +25 -0
- package/src/notification/notification/get/generate-parameters.ts +22 -0
- package/src/notification/notification/get/index.ts +8 -0
- package/src/notification/notification/get/types.ts +44 -0
- package/src/notification/notification/getAll/client.ts +37 -0
- package/src/notification/notification/getAll/generate-endpoint.ts +25 -0
- package/src/notification/notification/getAll/generate-parameters.ts +22 -0
- package/src/notification/notification/getAll/index.ts +8 -0
- package/src/notification/notification/getAll/types.ts +44 -0
- package/src/notification/notification/index.ts +5 -0
- package/src/notification/notification/patch/client.ts +37 -0
- package/src/notification/notification/patch/generate-endpoint.ts +24 -0
- package/src/notification/notification/patch/generate-parameters.ts +32 -0
- package/src/notification/notification/patch/index.ts +8 -0
- package/src/notification/notification/patch/types.ts +45 -0
- package/src/notification/notification/post/client.ts +37 -0
- package/src/notification/notification/post/generate-endpoint.ts +25 -0
- package/src/notification/notification/post/generate-parameters.ts +32 -0
- package/src/notification/notification/post/index.ts +8 -0
- package/src/notification/notification/post/types.ts +57 -0
- package/src/notification/settings/get/client.ts +37 -0
- package/src/notification/settings/get/generate-endpoint.ts +25 -0
- package/src/notification/settings/get/generate-parameters.ts +22 -0
- package/src/notification/settings/get/index.ts +8 -0
- package/src/notification/settings/get/types.ts +44 -0
- package/src/notification/settings/put/client.ts +37 -0
- package/src/notification/settings/put/generate-endpoint.ts +25 -0
- package/src/notification/settings/put/generate-parameters.ts +34 -0
- package/src/notification/settings/put/index.ts +8 -0
- package/src/notification/settings/put/types.ts +38 -0
- package/src/notification/static.ts +6 -0
- package/src/notification/types.ts +1 -0
- package/src/people/api-models.ts +52 -0
- package/src/people/api-models.v2.ts +31 -0
- package/src/people/api-models.v4.ts +100 -0
- package/src/people/client.ts +109 -0
- package/src/people/index.ts +5 -0
- package/src/people/person-details/client.ts +33 -0
- package/src/people/person-details/generate-endpoint.ts +28 -0
- package/src/people/person-details/generate-parameters.ts +22 -0
- package/src/people/person-details/index.ts +6 -0
- package/src/people/person-details/types.ts +54 -0
- package/src/people/person-photo/client.ts +33 -0
- package/src/people/person-photo/generate-endpoint.ts +25 -0
- package/src/people/person-photo/generate-parameters.ts +22 -0
- package/src/people/person-photo/index.ts +6 -0
- package/src/people/person-photo/types.ts +24 -0
- package/src/people/query/client.ts +33 -0
- package/src/people/query/generate-endpoint.ts +26 -0
- package/src/people/query/generate-parameters.ts +22 -0
- package/src/people/query/index.ts +6 -0
- package/src/people/query/types.ts +28 -0
- package/src/people/static.ts +4 -0
- package/src/provider.ts +115 -0
- package/src/types.ts +46 -0
- package/src/version.ts +2 -0
- package/tsconfig.json +38 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IHttpClient } from '@equinor/fusion-framework-module-http';
|
|
2
|
+
import { ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
|
|
3
|
+
import { ClientMethod } from '../..';
|
|
4
|
+
import { ApiBookmarkEntityV1 } from '../api-models';
|
|
5
|
+
import { PostBookmarksArgsV1 } from '../post';
|
|
6
|
+
|
|
7
|
+
export type PatchBookmarkResult<
|
|
8
|
+
TVersion extends ApiVersions,
|
|
9
|
+
TPayload,
|
|
10
|
+
> = PatchBookmarksVersions<TPayload>[TVersion]['result'];
|
|
11
|
+
|
|
12
|
+
/** Returns args for PutBookmark based on version*/
|
|
13
|
+
export type PatchBookmarkArgs<
|
|
14
|
+
TVersion extends ApiVersions,
|
|
15
|
+
TPayload = unknown,
|
|
16
|
+
> = PatchBookmarksVersions<TPayload>[TVersion]['args'];
|
|
17
|
+
|
|
18
|
+
/**Gets result type for PutBookmark call based on version and method */
|
|
19
|
+
export type PatchBookmarksResult<
|
|
20
|
+
TVersion extends ApiVersions,
|
|
21
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
22
|
+
TPayload = unknown,
|
|
23
|
+
TResult = PatchBookmarkResult<TVersion, TPayload>,
|
|
24
|
+
> = ClientMethod<TResult>[TMethod];
|
|
25
|
+
|
|
26
|
+
export type PatchBookmarkFn<
|
|
27
|
+
TVersion extends ApiVersions,
|
|
28
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
29
|
+
TClient extends IHttpClient = IHttpClient,
|
|
30
|
+
TPayload = unknown,
|
|
31
|
+
TResult = PatchBookmarkResult<TVersion, TPayload>,
|
|
32
|
+
> = (
|
|
33
|
+
args: PatchBookmarkArgs<TVersion>,
|
|
34
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
35
|
+
) => PatchBookmarksResult<TVersion, TMethod, TPayload, TResult>;
|
|
36
|
+
|
|
37
|
+
export interface PatchBookmarksArgsV1<T = unknown> extends Partial<PostBookmarksArgsV1<T>> {
|
|
38
|
+
id: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type PatchBookmarksVersions<TPayload = unknown> = {
|
|
42
|
+
['v1']: { args: PatchBookmarksArgsV1<TPayload>; result: ApiBookmarkEntityV1<TPayload> };
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type ApiVersions = keyof PatchBookmarksVersions<unknown>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ClientMethod } from '../..';
|
|
3
|
+
import { generateParameters } from './generate-parameters';
|
|
4
|
+
import { ApiVersions, PostBookmarkArgs, PostBookmarkResult, PostBookmarksResult } from './types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Method for fetching bookmark by it`s id from bookmark service
|
|
8
|
+
* @param client - client for execution of request
|
|
9
|
+
* @param version - version of API to call
|
|
10
|
+
* @param method - client method to call
|
|
11
|
+
*/
|
|
12
|
+
export const postBookmark =
|
|
13
|
+
<
|
|
14
|
+
TVersion extends ApiVersions = ApiVersions,
|
|
15
|
+
TMethod extends keyof ClientMethod = keyof ClientMethod,
|
|
16
|
+
TClient extends IHttpClient = IHttpClient,
|
|
17
|
+
>(
|
|
18
|
+
client: TClient,
|
|
19
|
+
version: TVersion,
|
|
20
|
+
method: TMethod = 'json' as TMethod,
|
|
21
|
+
) =>
|
|
22
|
+
<TResult = PostBookmarkResult<TVersion, unknown>>(
|
|
23
|
+
args: PostBookmarkArgs<TVersion>,
|
|
24
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
25
|
+
): PostBookmarksResult<TVersion, TMethod, unknown, TResult> =>
|
|
26
|
+
client[method](
|
|
27
|
+
...generateParameters<TResult, TVersion, TClient>(version, args, init),
|
|
28
|
+
) as PostBookmarksResult<TVersion, TMethod, unknown, TResult>;
|
|
29
|
+
|
|
30
|
+
export default postBookmark;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiVersions, PostBookmarkArgs } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Method for generating endpoint for getting bookmark by id
|
|
5
|
+
*/
|
|
6
|
+
export const generateEndpoint = <TVersion extends ApiVersions>(
|
|
7
|
+
version: TVersion,
|
|
8
|
+
_args: PostBookmarkArgs<TVersion>,
|
|
9
|
+
) => {
|
|
10
|
+
switch (version) {
|
|
11
|
+
case 'v1':
|
|
12
|
+
default: {
|
|
13
|
+
const params = new URLSearchParams();
|
|
14
|
+
params.append('api-version', version);
|
|
15
|
+
return `/bookmarks?${String(params)}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ApiClientArguments } from '../..';
|
|
3
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
4
|
+
import { ApiVersions, PostBookmarkArgs } from './types';
|
|
5
|
+
|
|
6
|
+
/** function for creating http client arguments */
|
|
7
|
+
export const generateParameters = <
|
|
8
|
+
TResult,
|
|
9
|
+
TVersion extends ApiVersions,
|
|
10
|
+
TClient extends IHttpClient = IHttpClient,
|
|
11
|
+
>(
|
|
12
|
+
version: TVersion,
|
|
13
|
+
args: PostBookmarkArgs<TVersion>,
|
|
14
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
15
|
+
): ApiClientArguments<TClient, TResult> => {
|
|
16
|
+
const path = generateEndpoint(version, args);
|
|
17
|
+
|
|
18
|
+
const headers = new Headers();
|
|
19
|
+
headers.append('content-type', 'application/json');
|
|
20
|
+
|
|
21
|
+
const requestParams: ClientRequestInit<TClient, TResult> = Object.assign(
|
|
22
|
+
{},
|
|
23
|
+
{ method: 'post', body: JSON.stringify(args), headers: headers },
|
|
24
|
+
init,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return [path, requestParams];
|
|
28
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IHttpClient } from '@equinor/fusion-framework-module-http';
|
|
2
|
+
import { ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
|
|
3
|
+
import { ClientMethod } from '../..';
|
|
4
|
+
import { ApiBookmarkEntityV1 } from '../api-models';
|
|
5
|
+
|
|
6
|
+
export type PostBookmarkResult<
|
|
7
|
+
TVersion extends ApiVersions,
|
|
8
|
+
TPayload,
|
|
9
|
+
> = PostBookmarksVersions<TPayload>[TVersion]['result'];
|
|
10
|
+
|
|
11
|
+
/** Returns args for GetBookmark based on version*/
|
|
12
|
+
export type PostBookmarkArgs<
|
|
13
|
+
TVersion extends ApiVersions,
|
|
14
|
+
TPayload = unknown,
|
|
15
|
+
> = PostBookmarksVersions<TPayload>[TVersion]['args'];
|
|
16
|
+
|
|
17
|
+
/**Gets result type for GetBookmark call based on version and method */
|
|
18
|
+
export type PostBookmarksResult<
|
|
19
|
+
TVersion extends ApiVersions,
|
|
20
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
21
|
+
TPayload = unknown,
|
|
22
|
+
TResult = PostBookmarkResult<TVersion, TPayload>,
|
|
23
|
+
> = ClientMethod<TResult>[TMethod];
|
|
24
|
+
|
|
25
|
+
export type PostBookmarkFn<
|
|
26
|
+
TVersion extends ApiVersions,
|
|
27
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
28
|
+
TClient extends IHttpClient = IHttpClient,
|
|
29
|
+
TPayload = unknown,
|
|
30
|
+
TResult = PostBookmarkResult<TVersion, TPayload>,
|
|
31
|
+
> = (
|
|
32
|
+
args: PostBookmarkArgs<TVersion>,
|
|
33
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
34
|
+
) => PostBookmarksResult<TVersion, TMethod, TPayload, TResult>;
|
|
35
|
+
|
|
36
|
+
export interface PostBookmarksArgsV1<T = unknown> {
|
|
37
|
+
/** Display name of the bookmark */
|
|
38
|
+
name: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
/** Is the bookmark shared with others */
|
|
41
|
+
isShared: boolean;
|
|
42
|
+
/** Name of the app it belongs too, should correspond to a fusion appkey */
|
|
43
|
+
appKey: string;
|
|
44
|
+
contextId?: string;
|
|
45
|
+
/** Any JSON object to store as the bookmark payload */
|
|
46
|
+
payload: T;
|
|
47
|
+
sourceSystem?: {
|
|
48
|
+
identifier?: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
subSystem?: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type PostBookmarksVersions<TPayload = unknown> = {
|
|
55
|
+
['v1']: { args: PostBookmarksArgsV1<TPayload>; result: ApiBookmarkEntityV1<TPayload> };
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type ApiVersions = keyof PostBookmarksVersions<unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ClientMethodType, ClientMethod, ApiClientArguments } from '..';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ApiVersion } from './static';
|
|
2
|
+
|
|
3
|
+
type ApiContextEntity_v1 = {
|
|
4
|
+
id: string;
|
|
5
|
+
externalId: string | null;
|
|
6
|
+
source: string | null;
|
|
7
|
+
type: ApiContextType_v1;
|
|
8
|
+
value: Record<string, unknown> | null;
|
|
9
|
+
title: string | null;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
isDeleted: boolean;
|
|
12
|
+
created: string;
|
|
13
|
+
updated: string | null;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type ApiContextEntity_v2 = unknown;
|
|
17
|
+
|
|
18
|
+
type ApiContextEntityTypes = {
|
|
19
|
+
[ApiVersion.v1]: ApiContextEntity_v1;
|
|
20
|
+
[ApiVersion.v2]: ApiContextEntity_v2;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type ApiContextEntity<T extends string = ApiVersion> = T extends ApiVersion
|
|
24
|
+
? ApiContextEntityTypes[T]
|
|
25
|
+
: unknown;
|
|
26
|
+
|
|
27
|
+
/** === types === */
|
|
28
|
+
|
|
29
|
+
type ApiContextType_v1 = {
|
|
30
|
+
id: string;
|
|
31
|
+
isChildType: boolean;
|
|
32
|
+
parentTypeIds: string[] | null;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type ApiContextType_v2 = unknown;
|
|
36
|
+
|
|
37
|
+
type ApiContextTypeTypes = {
|
|
38
|
+
[ApiVersion.v1]: ApiContextType_v1;
|
|
39
|
+
[ApiVersion.v2]: ApiContextType_v2;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type ApiContextType<T extends ApiVersion> = ApiContextTypeTypes[T];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { IHttpClient } from '@equinor/fusion-framework-module-http';
|
|
2
|
+
|
|
3
|
+
import type { ClientMethod } from './types';
|
|
4
|
+
import { ApiVersion } from './static';
|
|
5
|
+
|
|
6
|
+
import { getContext, GetContextFn, GetContextResponse, GetContextResult } from './get';
|
|
7
|
+
|
|
8
|
+
import { queryContext, QueryContextFn, QueryContextResponse, QueryContextResult } from './query';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
RelatedContextFn,
|
|
12
|
+
RelatedContextResponse,
|
|
13
|
+
RelatedContextResult,
|
|
14
|
+
relatedContexts,
|
|
15
|
+
} from './related';
|
|
16
|
+
|
|
17
|
+
export class ContextApiClient<
|
|
18
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
19
|
+
TClient extends IHttpClient = IHttpClient,
|
|
20
|
+
> {
|
|
21
|
+
get Version(): typeof ApiVersion {
|
|
22
|
+
return ApiVersion;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
protected _client: TClient,
|
|
27
|
+
protected _method: TMethod,
|
|
28
|
+
) {}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Fetch context by id
|
|
32
|
+
* @see {@link get/client}
|
|
33
|
+
*/
|
|
34
|
+
public get<
|
|
35
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
36
|
+
TResult = GetContextResponse<TVersion>,
|
|
37
|
+
>(
|
|
38
|
+
version: TVersion,
|
|
39
|
+
...args: Parameters<GetContextFn<TVersion, TMethod, TClient, TResult>>
|
|
40
|
+
): GetContextResult<TVersion, TMethod, TResult> {
|
|
41
|
+
const fn = getContext<TVersion, TMethod, TClient>(this._client, version, this._method);
|
|
42
|
+
return fn<TResult>(...args);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Query context service
|
|
47
|
+
* @see {@link query/client}
|
|
48
|
+
*/
|
|
49
|
+
public query<
|
|
50
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
51
|
+
TResult = QueryContextResponse<TVersion>,
|
|
52
|
+
>(
|
|
53
|
+
version: TVersion,
|
|
54
|
+
...args: Parameters<QueryContextFn<TVersion, TMethod, TClient, TResult>>
|
|
55
|
+
): QueryContextResult<TVersion, TMethod, TResult> {
|
|
56
|
+
const fn = queryContext<TVersion, TMethod, TClient>(this._client, version, this._method);
|
|
57
|
+
return fn<TResult>(...args);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Query context service
|
|
62
|
+
* @see {@link query/client}
|
|
63
|
+
*/
|
|
64
|
+
public related<
|
|
65
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
66
|
+
TResult = RelatedContextResponse<TVersion>,
|
|
67
|
+
>(
|
|
68
|
+
version: TVersion,
|
|
69
|
+
...args: Parameters<RelatedContextFn<TVersion, TMethod, TClient, TResult>>
|
|
70
|
+
): RelatedContextResult<TVersion, TMethod, TResult> {
|
|
71
|
+
const fn = relatedContexts<TVersion, TMethod, TClient>(this._client, version, this._method);
|
|
72
|
+
return fn<TResult>(...args);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default ContextApiClient;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
|
|
3
|
+
import { ApiVersion } from '..';
|
|
4
|
+
|
|
5
|
+
import { generateParameters } from './generate-parameters';
|
|
6
|
+
|
|
7
|
+
import type { ClientMethod, GetContextArgs, GetContextResponse, GetContextResult } from './types';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Method for fetching context item from context service
|
|
11
|
+
* @param client - client for execution of request
|
|
12
|
+
* @param version - version of API to call
|
|
13
|
+
* @param method - client method to call
|
|
14
|
+
*/
|
|
15
|
+
export const getContext =
|
|
16
|
+
<
|
|
17
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
18
|
+
TMethod extends keyof ClientMethod = keyof ClientMethod,
|
|
19
|
+
TClient extends IHttpClient = IHttpClient,
|
|
20
|
+
>(
|
|
21
|
+
client: TClient,
|
|
22
|
+
version: TVersion,
|
|
23
|
+
method: TMethod = 'json' as TMethod,
|
|
24
|
+
) =>
|
|
25
|
+
<T = GetContextResponse<TVersion>>(
|
|
26
|
+
args: GetContextArgs<TVersion>,
|
|
27
|
+
init?: ClientRequestInit<TClient, T>,
|
|
28
|
+
): GetContextResult<TVersion, TMethod, T> =>
|
|
29
|
+
client[method](
|
|
30
|
+
...generateParameters<T, TVersion, TClient>(version, args, init),
|
|
31
|
+
) as GetContextResult<TVersion, TMethod, T>;
|
|
32
|
+
|
|
33
|
+
export default getContext;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '../../errors';
|
|
2
|
+
import { ApiVersion } from '..';
|
|
3
|
+
|
|
4
|
+
import type { GetContextArgs } from './types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Method for generating endpoint for getting context by id
|
|
8
|
+
*/
|
|
9
|
+
export const generateEndpoint = <TVersion extends string = keyof typeof ApiVersion>(
|
|
10
|
+
version: TVersion,
|
|
11
|
+
args: GetContextArgs<TVersion>,
|
|
12
|
+
) => {
|
|
13
|
+
const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
|
|
14
|
+
switch (apiVersion) {
|
|
15
|
+
case ApiVersion.v2:
|
|
16
|
+
throw new UnsupportedApiVersion(version);
|
|
17
|
+
case ApiVersion.v1:
|
|
18
|
+
default: {
|
|
19
|
+
const { id } = args as { id: string };
|
|
20
|
+
const params = new URLSearchParams();
|
|
21
|
+
params.append('api-version', apiVersion);
|
|
22
|
+
return `/contexts/${id}/?${String(params)}`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
|
|
3
|
+
import { ApiVersion } from '..';
|
|
4
|
+
|
|
5
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
6
|
+
|
|
7
|
+
import type { ApiClientArguments, GetContextArgs } from './types';
|
|
8
|
+
|
|
9
|
+
/** function for creating http client arguments */
|
|
10
|
+
export const generateParameters = <
|
|
11
|
+
TResult,
|
|
12
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
13
|
+
TClient extends IHttpClient = IHttpClient,
|
|
14
|
+
>(
|
|
15
|
+
version: TVersion,
|
|
16
|
+
args: GetContextArgs<TVersion>,
|
|
17
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
18
|
+
): ApiClientArguments<TClient, TResult> => {
|
|
19
|
+
const path = generateEndpoint(version, args);
|
|
20
|
+
return [path, init];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default generateParameters;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
|
|
3
|
+
import { ApiVersion, ApiContextEntity, ClientMethod } from '..';
|
|
4
|
+
|
|
5
|
+
export { ApiClientArguments, ClientMethod } from '..';
|
|
6
|
+
|
|
7
|
+
type GetContextArgs_v1 = {
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type GetContextArgs_v2 = GetContextArgs_v1;
|
|
12
|
+
|
|
13
|
+
type GetContextArgsTypes = {
|
|
14
|
+
[ApiVersion.v1]: GetContextArgs_v1;
|
|
15
|
+
[ApiVersion.v2]: GetContextArgs_v2;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type GetContextArgs<T extends string> = T extends keyof typeof ApiVersion
|
|
19
|
+
? GetContextArgsTypes[(typeof ApiVersion)[T]]
|
|
20
|
+
: unknown;
|
|
21
|
+
|
|
22
|
+
type GetContextResponseTypes = {
|
|
23
|
+
[ApiVersion.v1]: ApiContextEntity<ApiVersion.v1>;
|
|
24
|
+
[ApiVersion.v2]: ApiContextEntity<ApiVersion.v2>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type GetContextResponse<T> = T extends keyof typeof ApiVersion
|
|
28
|
+
? GetContextResponseTypes[(typeof ApiVersion)[T]]
|
|
29
|
+
: unknown;
|
|
30
|
+
|
|
31
|
+
export type GetContextFn<
|
|
32
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
33
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
34
|
+
TClient extends IHttpClient = IHttpClient,
|
|
35
|
+
TResult = GetContextResponse<TVersion>,
|
|
36
|
+
> = (
|
|
37
|
+
args: GetContextArgs<TVersion>,
|
|
38
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
39
|
+
) => GetContextResult<TVersion, TMethod, TResult>;
|
|
40
|
+
|
|
41
|
+
export type GetContextResult<
|
|
42
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
43
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
44
|
+
TResult = GetContextResponse<TVersion>,
|
|
45
|
+
> = ClientMethod<TResult>[TMethod];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
|
|
3
|
+
import { ApiVersion } from '..';
|
|
4
|
+
|
|
5
|
+
import { generateParameters } from './generate-parameters';
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
QueryContextArgs,
|
|
9
|
+
QueryContextResponse,
|
|
10
|
+
QueryContextResult,
|
|
11
|
+
ClientMethod,
|
|
12
|
+
} from './types';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Function for querying the context service
|
|
16
|
+
*/
|
|
17
|
+
export const queryContext =
|
|
18
|
+
<
|
|
19
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
20
|
+
TMethod extends keyof ClientMethod = keyof ClientMethod,
|
|
21
|
+
TClient extends IHttpClient = IHttpClient,
|
|
22
|
+
>(
|
|
23
|
+
client: TClient,
|
|
24
|
+
version: TVersion,
|
|
25
|
+
method: TMethod = 'json' as TMethod,
|
|
26
|
+
) =>
|
|
27
|
+
<T = QueryContextResponse<TVersion>>(
|
|
28
|
+
args: QueryContextArgs<TVersion>,
|
|
29
|
+
init?: ClientRequestInit<TClient, T>,
|
|
30
|
+
): QueryContextResult<TVersion, TMethod, T> =>
|
|
31
|
+
client[method](
|
|
32
|
+
...generateParameters<T, TVersion, TClient>(version, args, init),
|
|
33
|
+
) as QueryContextResult<TVersion, TMethod, T>;
|
|
34
|
+
|
|
35
|
+
export default queryContext;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import buildOdataQuery from 'odata-query';
|
|
2
|
+
|
|
3
|
+
import { UnsupportedApiVersion } from '../../errors';
|
|
4
|
+
|
|
5
|
+
import { ApiVersion } from '..';
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
QueryContextArgs,
|
|
9
|
+
QueryContextOdataFilter,
|
|
10
|
+
QueryContextOdataParameters,
|
|
11
|
+
} from './types';
|
|
12
|
+
|
|
13
|
+
const buildOdataFilter = (filterObj: QueryContextOdataFilter) => {
|
|
14
|
+
return Object.keys(filterObj).reduce((acc, key) => {
|
|
15
|
+
switch (key) {
|
|
16
|
+
case 'type':
|
|
17
|
+
return filterObj[key]?.length ? { ...acc, [key]: { in: filterObj[key] } } : acc;
|
|
18
|
+
default:
|
|
19
|
+
return { ...acc, [key]: filterObj[key as keyof typeof filterObj] };
|
|
20
|
+
}
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
}, {} as any);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const buildOdataObject = (parameters: QueryContextOdataParameters) => {
|
|
26
|
+
return Object.entries(parameters)
|
|
27
|
+
.filter(([_, value]) => !!value)
|
|
28
|
+
.reduce((acc, [key, value]) => {
|
|
29
|
+
switch (key) {
|
|
30
|
+
case 'filter':
|
|
31
|
+
return {
|
|
32
|
+
...acc,
|
|
33
|
+
[key]: buildOdataFilter(value as QueryContextOdataFilter),
|
|
34
|
+
};
|
|
35
|
+
default:
|
|
36
|
+
return { ...acc, [key]: parameters[key as keyof typeof parameters] };
|
|
37
|
+
}
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
+
}, {} as any);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const createSearchParameters = (args: string | QueryContextOdataParameters) => {
|
|
43
|
+
return typeof args === 'string' ? args : buildOdataQuery(buildOdataObject(args));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const generateEndpoint = <TVersion extends string = keyof typeof ApiVersion>(
|
|
47
|
+
version: TVersion,
|
|
48
|
+
args: QueryContextArgs<TVersion>,
|
|
49
|
+
) => {
|
|
50
|
+
const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
|
|
51
|
+
switch (apiVersion) {
|
|
52
|
+
case ApiVersion.v2:
|
|
53
|
+
throw new UnsupportedApiVersion(version);
|
|
54
|
+
case ApiVersion.v1:
|
|
55
|
+
default: {
|
|
56
|
+
const { query, includeDeleted } = args as QueryContextArgs<'v1'>;
|
|
57
|
+
const params = new URLSearchParams(createSearchParameters(query));
|
|
58
|
+
params.append('api-version', apiVersion);
|
|
59
|
+
if (includeDeleted) {
|
|
60
|
+
params.append('includeDeleted', 'true');
|
|
61
|
+
}
|
|
62
|
+
return `/contexts/?${String(params)}`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default generateEndpoint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
|
|
3
|
+
import { ApiVersion } from '..';
|
|
4
|
+
|
|
5
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
6
|
+
|
|
7
|
+
import type { QueryContextArgs, ApiClientArguments } from './types';
|
|
8
|
+
|
|
9
|
+
/** Function for generating parameter for querying context service */
|
|
10
|
+
export const generateParameters = <
|
|
11
|
+
TResult,
|
|
12
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
13
|
+
TClient extends IHttpClient = IHttpClient,
|
|
14
|
+
>(
|
|
15
|
+
version: TVersion,
|
|
16
|
+
args: QueryContextArgs<TVersion>,
|
|
17
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
18
|
+
): ApiClientArguments<TClient, TResult> => {
|
|
19
|
+
const path = generateEndpoint(version, args);
|
|
20
|
+
return [path, init];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default generateParameters;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
|
|
3
|
+
import { ApiVersion, ApiContextEntity, ClientMethod } from '..';
|
|
4
|
+
|
|
5
|
+
export { ApiClientArguments, ClientMethod } from '..';
|
|
6
|
+
|
|
7
|
+
export type QueryContextOdataFilter = {
|
|
8
|
+
type?: string[];
|
|
9
|
+
externalId?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type QueryContextOdataParameters = {
|
|
13
|
+
search?: string;
|
|
14
|
+
filter?: QueryContextOdataFilter;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type QueryContextArgs_v1 = {
|
|
18
|
+
query: string | QueryContextOdataParameters;
|
|
19
|
+
includeDeleted?: boolean;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type QueryContextArgs_v2 = QueryContextArgs_v1;
|
|
23
|
+
|
|
24
|
+
type SearchContextArgTypes = {
|
|
25
|
+
[ApiVersion.v1]: QueryContextArgs_v1;
|
|
26
|
+
[ApiVersion.v2]: QueryContextArgs_v2;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type QueryContextArgs<T> = T extends keyof typeof ApiVersion
|
|
30
|
+
? SearchContextArgTypes[(typeof ApiVersion)[T]]
|
|
31
|
+
: { query: { search: string } };
|
|
32
|
+
|
|
33
|
+
type QueryContextResponseTypes = {
|
|
34
|
+
[ApiVersion.v1]: Array<ApiContextEntity<ApiVersion.v1>>;
|
|
35
|
+
[ApiVersion.v2]: Array<ApiContextEntity<ApiVersion.v2>>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type QueryContextResponse<T> = T extends keyof typeof ApiVersion
|
|
39
|
+
? QueryContextResponseTypes[(typeof ApiVersion)[T]]
|
|
40
|
+
: unknown;
|
|
41
|
+
|
|
42
|
+
export type QueryContextFn<
|
|
43
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
44
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
45
|
+
TClient extends IHttpClient = IHttpClient,
|
|
46
|
+
TResult = QueryContextResponse<TVersion>,
|
|
47
|
+
> = (
|
|
48
|
+
args: QueryContextArgs<TVersion>,
|
|
49
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
50
|
+
) => QueryContextResult<TVersion, TMethod, TResult>;
|
|
51
|
+
|
|
52
|
+
export type QueryContextResult<
|
|
53
|
+
TVersion extends string = keyof typeof ApiVersion,
|
|
54
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
55
|
+
TResult = QueryContextResponse<TVersion>,
|
|
56
|
+
> = ClientMethod<TResult>[TMethod];
|