@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,25 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ApiClientArguments } from '../..';
|
|
3
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
4
|
+
import { ApiVersions, DeleteBookmarkFavoriteArgs } 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: DeleteBookmarkFavoriteArgs<TVersion>,
|
|
14
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
15
|
+
): ApiClientArguments<TClient, TResult> => {
|
|
16
|
+
const path = generateEndpoint(version, args);
|
|
17
|
+
|
|
18
|
+
const requestParams: ClientRequestInit<TClient, TResult> = Object.assign(
|
|
19
|
+
{},
|
|
20
|
+
{ method: 'Delete' },
|
|
21
|
+
init,
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
return [path, requestParams];
|
|
25
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { DeleteBookmarksFavoriteArgsV1 } from './types-v1';
|
|
5
|
+
|
|
6
|
+
export type DeleteBookmarkFavoriteResult<TVersion extends ApiVersions> =
|
|
7
|
+
DeleteBookmarksFavoriteVersions[TVersion]['result'];
|
|
8
|
+
|
|
9
|
+
export type DeleteBookmarkFavoriteArgs<TVersion extends ApiVersions> =
|
|
10
|
+
DeleteBookmarksFavoriteVersions[TVersion]['args'];
|
|
11
|
+
|
|
12
|
+
export type DeleteBookmarksFavoriteResult<
|
|
13
|
+
TVersion extends ApiVersions,
|
|
14
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
15
|
+
TResult = DeleteBookmarkFavoriteResult<TVersion>,
|
|
16
|
+
> = ClientMethod<TResult>[TMethod];
|
|
17
|
+
|
|
18
|
+
export type DeleteBookmarksFavoriteFn<
|
|
19
|
+
TVersion extends ApiVersions,
|
|
20
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
21
|
+
TClient extends IHttpClient = IHttpClient,
|
|
22
|
+
TResult = DeleteBookmarkFavoriteResult<TVersion>,
|
|
23
|
+
> = (
|
|
24
|
+
args: DeleteBookmarkFavoriteArgs<TVersion>,
|
|
25
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
26
|
+
) => DeleteBookmarksFavoriteResult<TVersion, TMethod, TResult>;
|
|
27
|
+
|
|
28
|
+
export type DeleteBookmarksFavoriteVersions = {
|
|
29
|
+
['v1']: { args: DeleteBookmarksFavoriteArgsV1; result: undefined };
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**Api versions for bookmarks service */
|
|
33
|
+
export type ApiVersions = keyof DeleteBookmarksFavoriteVersions;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ClientMethod } from '../..';
|
|
3
|
+
import { generateParameters } from './generate-parameters';
|
|
4
|
+
import {
|
|
5
|
+
ApiVersions,
|
|
6
|
+
HeadBookmarkFavoriteArgs,
|
|
7
|
+
HeadBookmarkFavoriteResult,
|
|
8
|
+
HeadBookmarksFavoriteResult,
|
|
9
|
+
} from './types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Verify that the bookmark is owned by the current user.
|
|
13
|
+
* @param client - client for execution of request
|
|
14
|
+
* @param version - version of API to call
|
|
15
|
+
* @param method - client method to call
|
|
16
|
+
*/
|
|
17
|
+
export const verifyBookmarkFavorite =
|
|
18
|
+
<
|
|
19
|
+
TVersion extends ApiVersions = ApiVersions,
|
|
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
|
+
<TResult = HeadBookmarkFavoriteResult<TVersion>>(
|
|
28
|
+
args: HeadBookmarkFavoriteArgs<TVersion>,
|
|
29
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
30
|
+
): HeadBookmarksFavoriteResult<TVersion, TMethod, TResult> =>
|
|
31
|
+
client[method](
|
|
32
|
+
...generateParameters<TResult, TVersion, TClient>(version, args, init),
|
|
33
|
+
) as HeadBookmarksFavoriteResult<TVersion, TMethod, TResult>;
|
|
34
|
+
|
|
35
|
+
export default verifyBookmarkFavorite;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApiVersions, HeadBookmarkFavoriteArgs } 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: HeadBookmarkFavoriteArgs<TVersion>,
|
|
9
|
+
) => {
|
|
10
|
+
switch (version) {
|
|
11
|
+
case 'v1':
|
|
12
|
+
default: {
|
|
13
|
+
const { bookmarkId } = args as { bookmarkId: string };
|
|
14
|
+
const params = new URLSearchParams();
|
|
15
|
+
params.append('api-version', version);
|
|
16
|
+
return `/persons/me/bookmarks/favourites/${bookmarkId}?${String(params)}`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -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, HeadBookmarkFavoriteArgs } 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: HeadBookmarkFavoriteArgs<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: 'head', headers: headers },
|
|
24
|
+
init,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return [path, requestParams];
|
|
28
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IHttpClient } from '@equinor/fusion-framework-module-http';
|
|
2
|
+
import { ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
|
|
3
|
+
import { ClientMethod } from '../..';
|
|
4
|
+
|
|
5
|
+
export type HeadBookmarkFavoriteResult<TVersion extends ApiVersions> =
|
|
6
|
+
HeadBookmarksFavoriteVersions[TVersion]['result'];
|
|
7
|
+
|
|
8
|
+
export type HeadBookmarkFavoriteArgs<TVersion extends ApiVersions> =
|
|
9
|
+
HeadBookmarksFavoriteVersions[TVersion]['args'];
|
|
10
|
+
|
|
11
|
+
export type HeadBookmarksFavoriteResult<
|
|
12
|
+
TVersion extends ApiVersions,
|
|
13
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
14
|
+
TResult = HeadBookmarkFavoriteResult<TVersion>,
|
|
15
|
+
> = ClientMethod<TResult>[TMethod];
|
|
16
|
+
|
|
17
|
+
export type HeadBookmarkFavoriteFn<
|
|
18
|
+
TVersion extends ApiVersions,
|
|
19
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
20
|
+
TClient extends IHttpClient = IHttpClient,
|
|
21
|
+
TResult = HeadBookmarkFavoriteResult<TVersion>,
|
|
22
|
+
> = (
|
|
23
|
+
args: HeadBookmarkFavoriteArgs<TVersion>,
|
|
24
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
25
|
+
) => HeadBookmarksFavoriteResult<TVersion, TMethod, TResult>;
|
|
26
|
+
|
|
27
|
+
export interface HeadBookmarksFavoriteArgsV1 {
|
|
28
|
+
bookmarkId: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type HeadBookmarksFavoriteVersions = {
|
|
32
|
+
['v1']: { args: HeadBookmarksFavoriteArgsV1; result: Response };
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type ApiVersions = keyof HeadBookmarksFavoriteVersions;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ClientMethod } from '../..';
|
|
3
|
+
import { generateParameters } from './generate-parameters';
|
|
4
|
+
import {
|
|
5
|
+
ApiVersions,
|
|
6
|
+
PostBookmarkFavoriteArgs,
|
|
7
|
+
PostBookmarkFavoriteResult,
|
|
8
|
+
PostBookmarksFavoriteResult,
|
|
9
|
+
} from './types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Method for adding other users bookmark to your favorites.
|
|
13
|
+
* @param client - client for execution of request
|
|
14
|
+
* @param version - version of API to call
|
|
15
|
+
* @param method - client method to call
|
|
16
|
+
*/
|
|
17
|
+
export const addBookmarkFavorite =
|
|
18
|
+
<
|
|
19
|
+
TVersion extends ApiVersions = ApiVersions,
|
|
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
|
+
<TResult = PostBookmarkFavoriteResult<TVersion>>(
|
|
28
|
+
args: PostBookmarkFavoriteArgs<TVersion>,
|
|
29
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
30
|
+
): PostBookmarksFavoriteResult<TVersion, TMethod, TResult> =>
|
|
31
|
+
client[method](
|
|
32
|
+
...generateParameters<TResult, TVersion, TClient>(version, args, init),
|
|
33
|
+
) as PostBookmarksFavoriteResult<TVersion, TMethod, TResult>;
|
|
34
|
+
|
|
35
|
+
export default addBookmarkFavorite;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiVersions, PostBookmarkFavoriteArgs } 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: PostBookmarkFavoriteArgs<TVersion>,
|
|
9
|
+
) => {
|
|
10
|
+
switch (version) {
|
|
11
|
+
case 'v1':
|
|
12
|
+
default: {
|
|
13
|
+
const params = new URLSearchParams();
|
|
14
|
+
params.append('api-version', version);
|
|
15
|
+
return `/persons/me/bookmarks/favourites?${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, PostBookmarkFavoriteArgs } 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: PostBookmarkFavoriteArgs<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,35 @@
|
|
|
1
|
+
import { IHttpClient } from '@equinor/fusion-framework-module-http';
|
|
2
|
+
import { ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
|
|
3
|
+
import { ClientMethod } from '../..';
|
|
4
|
+
|
|
5
|
+
export type PostBookmarkFavoriteResult<TVersion extends ApiVersions> =
|
|
6
|
+
PostBookmarksFavoriteVersions[TVersion]['result'];
|
|
7
|
+
|
|
8
|
+
export type PostBookmarkFavoriteArgs<TVersion extends ApiVersions> =
|
|
9
|
+
PostBookmarksFavoriteVersions[TVersion]['args'];
|
|
10
|
+
|
|
11
|
+
export type PostBookmarksFavoriteResult<
|
|
12
|
+
TVersion extends ApiVersions,
|
|
13
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
14
|
+
TResult = PostBookmarkFavoriteResult<TVersion>,
|
|
15
|
+
> = ClientMethod<TResult>[TMethod];
|
|
16
|
+
|
|
17
|
+
export type PostBookmarkFavoriteFn<
|
|
18
|
+
TVersion extends ApiVersions,
|
|
19
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
20
|
+
TClient extends IHttpClient = IHttpClient,
|
|
21
|
+
TResult = PostBookmarkFavoriteResult<TVersion>,
|
|
22
|
+
> = (
|
|
23
|
+
args: PostBookmarkFavoriteArgs<TVersion>,
|
|
24
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
25
|
+
) => PostBookmarksFavoriteResult<TVersion, TMethod, TResult>;
|
|
26
|
+
|
|
27
|
+
export interface PostBookmarksFavoriteArgsV1 {
|
|
28
|
+
bookmarkId: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type PostBookmarksFavoriteVersions = {
|
|
32
|
+
['v1']: { args: PostBookmarksFavoriteArgsV1; result: Response };
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type ApiVersions = keyof PostBookmarksFavoriteVersions;
|
|
@@ -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, GetBookmarkArgs, GetBookmarkResult, GetBookmarksResult } 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 getBookmark =
|
|
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 = GetBookmarkResult<TVersion, unknown>>(
|
|
23
|
+
args: GetBookmarkArgs<TVersion>,
|
|
24
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
25
|
+
): GetBookmarksResult<TVersion, TMethod, unknown, TResult> =>
|
|
26
|
+
client[method](
|
|
27
|
+
...generateParameters<TResult, TVersion, TClient>(version, args, init),
|
|
28
|
+
) as GetBookmarksResult<TVersion, TMethod, unknown, TResult>;
|
|
29
|
+
|
|
30
|
+
export default getBookmark;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApiVersions, GetBookmarkArgs } 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: GetBookmarkArgs<TVersion>,
|
|
9
|
+
) => {
|
|
10
|
+
switch (version) {
|
|
11
|
+
case 'v1': {
|
|
12
|
+
const { id } = args as { id: string };
|
|
13
|
+
const params = new URLSearchParams();
|
|
14
|
+
params.append('api-version', '1.0');
|
|
15
|
+
return `/bookmarks/${id}/?${String(params)}`;
|
|
16
|
+
}
|
|
17
|
+
default: {
|
|
18
|
+
const { id } = args as { id: string };
|
|
19
|
+
const params = new URLSearchParams();
|
|
20
|
+
params.append('api-version', version);
|
|
21
|
+
return `/bookmarks/${id}/?${String(params)}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ApiClientArguments } from '../..';
|
|
3
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
4
|
+
import { ApiVersions, GetBookmarkArgs } 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: GetBookmarkArgs<TVersion>,
|
|
14
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
15
|
+
): ApiClientArguments<TClient, TResult> => {
|
|
16
|
+
const path = generateEndpoint(version, args);
|
|
17
|
+
return [path, init];
|
|
18
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 GetBookmarkResult<
|
|
7
|
+
TVersion extends ApiVersions,
|
|
8
|
+
TPayload,
|
|
9
|
+
> = GetBookmarksVersions<TPayload>[TVersion]['result'];
|
|
10
|
+
|
|
11
|
+
/** Returns args for GetBookmark based on version*/
|
|
12
|
+
export type GetBookmarkArgs<TVersion extends ApiVersions> = GetBookmarksVersions[TVersion]['args'];
|
|
13
|
+
|
|
14
|
+
/**Gets result type for GetBookmark call based on version and method */
|
|
15
|
+
export type GetBookmarksResult<
|
|
16
|
+
TVersion extends ApiVersions,
|
|
17
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
18
|
+
TPayload = unknown,
|
|
19
|
+
TResult = GetBookmarkResult<TVersion, TPayload>,
|
|
20
|
+
> = ClientMethod<TResult>[TMethod];
|
|
21
|
+
|
|
22
|
+
export type GetBookmarksFn<
|
|
23
|
+
TVersion extends ApiVersions,
|
|
24
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
25
|
+
TClient extends IHttpClient = IHttpClient,
|
|
26
|
+
TPayload = unknown,
|
|
27
|
+
TResult = GetBookmarkResult<TVersion, TPayload>,
|
|
28
|
+
> = (
|
|
29
|
+
args: GetBookmarkArgs<TVersion>,
|
|
30
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
31
|
+
) => GetBookmarksResult<TVersion, TMethod, TPayload, TResult>;
|
|
32
|
+
|
|
33
|
+
type GetBookmarksArgsV1 = { id: string };
|
|
34
|
+
|
|
35
|
+
export type GetBookmarksVersions<TPayload = unknown> = {
|
|
36
|
+
['v1']: { args: GetBookmarksArgsV1; result: ApiBookmarkEntityV1<TPayload> };
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type ApiVersions = keyof GetBookmarksVersions<unknown>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ClientMethod } from '../..';
|
|
3
|
+
|
|
4
|
+
import { generateParameters } from './generate-parameters';
|
|
5
|
+
import { ApiVersions, GetAllBookmarkResult, GetAllBookmarksResult } from './types';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Method for fetching all bookmarks for the current user from bookmark service
|
|
9
|
+
* @param client - client for execution of request
|
|
10
|
+
* @param version - version of API to call
|
|
11
|
+
* @param method - client method to call
|
|
12
|
+
*/
|
|
13
|
+
export const getAllBookmarks =
|
|
14
|
+
<
|
|
15
|
+
TVersion extends ApiVersions = ApiVersions,
|
|
16
|
+
TMethod extends keyof ClientMethod = keyof ClientMethod,
|
|
17
|
+
TClient extends IHttpClient = IHttpClient,
|
|
18
|
+
>(
|
|
19
|
+
client: TClient,
|
|
20
|
+
version: TVersion,
|
|
21
|
+
method: TMethod = 'json' as TMethod,
|
|
22
|
+
) =>
|
|
23
|
+
<TResult = GetAllBookmarkResult<TVersion, unknown>>(
|
|
24
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
25
|
+
): GetAllBookmarksResult<TVersion, TMethod, unknown, TResult> =>
|
|
26
|
+
client[method](
|
|
27
|
+
...generateParameters<TResult, TVersion, TClient>(version, init),
|
|
28
|
+
) as GetAllBookmarksResult<TVersion, TMethod, unknown, TResult>;
|
|
29
|
+
|
|
30
|
+
export default getAllBookmarks;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApiVersions } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Method for generating endpoint for getting all bookmarks
|
|
5
|
+
*/
|
|
6
|
+
export const generateEndpoint = <TVersion extends ApiVersions>(version: TVersion) => {
|
|
7
|
+
switch (version) {
|
|
8
|
+
case 'v1':
|
|
9
|
+
default: {
|
|
10
|
+
const params = new URLSearchParams();
|
|
11
|
+
params.append('api-version', version);
|
|
12
|
+
return `persons/me/bookmarks/?${String(params)}`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
|
|
2
|
+
import { ApiClientArguments } from '../types';
|
|
3
|
+
|
|
4
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
5
|
+
import { ApiVersions } from './types';
|
|
6
|
+
|
|
7
|
+
/** function for creating http client arguments */
|
|
8
|
+
export const generateParameters = <
|
|
9
|
+
TResult,
|
|
10
|
+
TVersion extends ApiVersions,
|
|
11
|
+
TClient extends IHttpClient = IHttpClient,
|
|
12
|
+
>(
|
|
13
|
+
version: TVersion,
|
|
14
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
15
|
+
): ApiClientArguments<TClient, TResult> => {
|
|
16
|
+
const path = generateEndpoint(version);
|
|
17
|
+
return [path, init];
|
|
18
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ApiBookmarkEntityV1 } from '../api-models';
|
|
2
|
+
import { ClientMethod } from '../types';
|
|
3
|
+
|
|
4
|
+
/**Gets result type for GetAllBookmark call based on version and method */
|
|
5
|
+
export type GetAllBookmarksResult<
|
|
6
|
+
TVersion extends ApiVersions,
|
|
7
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
8
|
+
TPayload = unknown,
|
|
9
|
+
TResult = GetAllBookmarkResult<TVersion, TPayload>,
|
|
10
|
+
> = ClientMethod<TResult>[TMethod];
|
|
11
|
+
|
|
12
|
+
export type GetAllBookmarkResult<
|
|
13
|
+
TVersion extends ApiVersions,
|
|
14
|
+
TPayload,
|
|
15
|
+
> = GetAllBookmarksVersions<TPayload>[TVersion]['result'];
|
|
16
|
+
|
|
17
|
+
export type GetAllBookmarksVersions<TPayload = unknown> = {
|
|
18
|
+
['v1']: { result: Array<ApiBookmarkEntityV1<TPayload>> };
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type ApiVersions = keyof GetAllBookmarksVersions<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, PatchBookmarkArgs, PatchBookmarkResult, PatchBookmarksResult } from './types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Method for updating bookmark
|
|
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 patchBookmark =
|
|
13
|
+
<
|
|
14
|
+
TClient extends IHttpClient = IHttpClient,
|
|
15
|
+
TVersion extends ApiVersions = ApiVersions,
|
|
16
|
+
TMethod extends keyof ClientMethod = keyof ClientMethod,
|
|
17
|
+
>(
|
|
18
|
+
client: TClient,
|
|
19
|
+
version: TVersion,
|
|
20
|
+
method: TMethod = 'json' as TMethod,
|
|
21
|
+
) =>
|
|
22
|
+
<TResult = PatchBookmarkResult<TVersion, unknown>>(
|
|
23
|
+
args: PatchBookmarkArgs<TVersion>,
|
|
24
|
+
init?: ClientRequestInit<TClient, TResult>,
|
|
25
|
+
): PatchBookmarksResult<TVersion, TMethod, unknown, TResult> =>
|
|
26
|
+
client[method](
|
|
27
|
+
...generateParameters<TResult, TVersion, TClient>(version, args, init),
|
|
28
|
+
) as PatchBookmarksResult<TVersion, TMethod, unknown, TResult>;
|
|
29
|
+
|
|
30
|
+
export default patchBookmark;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiVersions, PatchBookmarkArgs } 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: PatchBookmarkArgs<TVersion>,
|
|
9
|
+
) => {
|
|
10
|
+
switch (version) {
|
|
11
|
+
case 'v1':
|
|
12
|
+
default: {
|
|
13
|
+
const params = new URLSearchParams();
|
|
14
|
+
params.append('api-version', version);
|
|
15
|
+
return `/bookmarks/${_args.id}?${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, PatchBookmarkArgs } 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: PatchBookmarkArgs<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: 'patch', body: JSON.stringify(args), headers: headers },
|
|
24
|
+
init,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return [path, requestParams];
|
|
28
|
+
};
|