From 4c780f6a4afc765ce2186e623443c8b5b889a00e Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Tue, 14 Feb 2023 13:43:48 +0800 Subject: [PATCH] chore: move @halo-dev/api-client package to console --- package.json | 2 +- packages/api-client/.eslintignore | 2 + packages/api-client/.eslintrc.js | 14 + packages/api-client/.gitignore | 69 + packages/api-client/.prettierrc.js | 6 + packages/api-client/README.md | 24 + packages/api-client/build.config.ts | 11 + packages/api-client/openapitools.json | 7 + packages/api-client/package.json | 59 + packages/api-client/src/.gitignore | 4 + packages/api-client/src/.npmignore | 1 + .../api-client/src/.openapi-generator-ignore | 23 + .../api-client/src/.openapi-generator/FILES | 178 +++ .../api-client/src/.openapi-generator/VERSION | 1 + packages/api-client/src/.openapi_config.yaml | 5 + packages/api-client/src/api.ts | 52 + ...onsole-halo-run-v1alpha1-attachment-api.ts | 486 +++++++ ...i-console-halo-run-v1alpha1-comment-api.ts | 659 +++++++++ ...i-console-halo-run-v1alpha1-indices-api.ts | 139 ++ ...pi-console-halo-run-v1alpha1-plugin-api.ts | 922 ++++++++++++ .../api-console-halo-run-v1alpha1-post-api.ts | 1221 ++++++++++++++++ ...api-console-halo-run-v1alpha1-reply-api.ts | 256 ++++ ...nsole-halo-run-v1alpha1-single-page-api.ts | 983 +++++++++++++ ...api-console-halo-run-v1alpha1-stats-api.ts | 141 ++ ...api-console-halo-run-v1alpha1-theme-api.ts | 1143 +++++++++++++++ .../api-console-halo-run-v1alpha1-user-api.ts | 573 ++++++++ .../api/api-halo-run-v1alpha1-comment-api.ts | 729 ++++++++++ .../src/api/api-halo-run-v1alpha1-post-api.ts | 237 +++ .../api/api-halo-run-v1alpha1-tracker-api.ts | 356 +++++ .../content-halo-run-v1alpha1-category-api.ts | 657 +++++++++ .../content-halo-run-v1alpha1-comment-api.ts | 657 +++++++++ .../api/content-halo-run-v1alpha1-post-api.ts | 647 +++++++++ .../content-halo-run-v1alpha1-reply-api.ts | 650 +++++++++ ...ntent-halo-run-v1alpha1-single-page-api.ts | 663 +++++++++ .../content-halo-run-v1alpha1-snapshot-api.ts | 657 +++++++++ .../api/content-halo-run-v1alpha1-tag-api.ts | 647 +++++++++ .../metrics-halo-run-v1alpha1-counter-api.ts | 657 +++++++++ .../plugin-halo-run-v1alpha1-plugin-api.ts | 650 +++++++++ ...gin-halo-run-v1alpha1-reverse-proxy-api.ts | 663 +++++++++ ...gin-halo-run-v1alpha1-search-engine-api.ts | 663 +++++++++ ...torage-halo-run-v1alpha1-attachment-api.ts | 663 +++++++++ .../storage-halo-run-v1alpha1-group-api.ts | 650 +++++++++ .../storage-halo-run-v1alpha1-policy-api.ts | 657 +++++++++ ...e-halo-run-v1alpha1-policy-template-api.ts | 666 +++++++++ .../api/theme-halo-run-v1alpha1-theme-api.ts | 647 +++++++++ .../api/v1alpha1-annotation-setting-api.ts | 657 +++++++++ .../src/api/v1alpha1-config-map-api.ts | 638 ++++++++ .../api-client/src/api/v1alpha1-menu-api.ts | 619 ++++++++ .../src/api/v1alpha1-menu-item-api.ts | 636 ++++++++ .../api/v1alpha1-personal-access-token-api.ts | 657 +++++++++ .../api-client/src/api/v1alpha1-role-api.ts | 619 ++++++++ .../src/api/v1alpha1-role-binding-api.ts | 641 +++++++++ .../src/api/v1alpha1-setting-api.ts | 636 ++++++++ .../api-client/src/api/v1alpha1-user-api.ts | 619 ++++++++ packages/api-client/src/base.ts | 75 + packages/api-client/src/common.ts | 159 ++ packages/api-client/src/configuration.ts | 108 ++ packages/api-client/src/git_push.sh | 57 + packages/api-client/src/index.ts | 17 + .../src/models/annotation-setting-list.ts | 79 + .../src/models/annotation-setting-spec.ts | 37 + .../src/models/annotation-setting.ts | 52 + .../api-client/src/models/attachment-list.ts | 79 + .../api-client/src/models/attachment-spec.ts | 63 + .../src/models/attachment-status.ts | 27 + packages/api-client/src/models/attachment.ts | 61 + packages/api-client/src/models/author.ts | 33 + .../api-client/src/models/category-list.ts | 79 + .../api-client/src/models/category-spec.ts | 63 + .../api-client/src/models/category-status.ts | 39 + packages/api-client/src/models/category.ts | 61 + .../src/models/change-password-request.ts | 27 + .../src/models/comment-email-owner.ts | 45 + .../api-client/src/models/comment-list.ts | 79 + .../api-client/src/models/comment-owner.ts | 45 + .../api-client/src/models/comment-request.ts | 58 + .../api-client/src/models/comment-spec.ts | 106 ++ .../api-client/src/models/comment-status.ts | 45 + .../api-client/src/models/comment-vo-list.ts | 79 + packages/api-client/src/models/comment-vo.ts | 58 + packages/api-client/src/models/comment.ts | 61 + packages/api-client/src/models/condition.ts | 59 + .../api-client/src/models/config-map-list.ts | 79 + packages/api-client/src/models/config-map.ts | 49 + .../api-client/src/models/content-wrapper.ts | 45 + packages/api-client/src/models/content.ts | 39 + packages/api-client/src/models/contributor.ts | 39 + .../api-client/src/models/counter-list.ts | 79 + .../api-client/src/models/counter-request.ts | 63 + packages/api-client/src/models/counter.ts | 73 + .../api-client/src/models/custom-templates.ts | 43 + .../api-client/src/models/dashboard-stats.ts | 57 + packages/api-client/src/models/excerpt.ts | 33 + packages/api-client/src/models/extension.ts | 43 + .../src/models/file-reverse-proxy-provider.ts | 33 + .../api-client/src/models/grant-request.ts | 27 + packages/api-client/src/models/group-kind.ts | 33 + packages/api-client/src/models/group-list.ts | 79 + packages/api-client/src/models/group-spec.ts | 27 + .../api-client/src/models/group-status.ts | 33 + packages/api-client/src/models/group.ts | 61 + packages/api-client/src/models/index.ts | 130 ++ packages/api-client/src/models/license.ts | 33 + .../src/models/listed-comment-list.ts | 79 + .../api-client/src/models/listed-comment.ts | 49 + .../api-client/src/models/listed-post-list.ts | 79 + packages/api-client/src/models/listed-post.ts | 73 + .../src/models/listed-reply-list.ts | 79 + .../api-client/src/models/listed-reply.ts | 40 + .../src/models/listed-single-page-list.ts | 79 + .../src/models/listed-single-page.ts | 55 + .../api-client/src/models/login-history.ts | 51 + .../api-client/src/models/menu-item-list.ts | 79 + .../api-client/src/models/menu-item-spec.ts | 70 + .../api-client/src/models/menu-item-status.ts | 33 + packages/api-client/src/models/menu-item.ts | 61 + packages/api-client/src/models/menu-list.ts | 79 + packages/api-client/src/models/menu-spec.ts | 33 + packages/api-client/src/models/menu.ts | 52 + packages/api-client/src/models/metadata.ts | 69 + packages/api-client/src/models/owner-info.ts | 51 + .../src/models/personal-access-token-list.ts | 79 + .../src/models/personal-access-token-spec.ts | 57 + .../src/models/personal-access-token.ts | 52 + .../api-client/src/models/plugin-author.ts | 33 + packages/api-client/src/models/plugin-list.ts | 79 + packages/api-client/src/models/plugin-spec.ts | 107 ++ .../api-client/src/models/plugin-status.ts | 80 + packages/api-client/src/models/plugin.ts | 61 + packages/api-client/src/models/policy-list.ts | 79 + packages/api-client/src/models/policy-rule.ts | 51 + packages/api-client/src/models/policy-spec.ts | 39 + .../src/models/policy-template-list.ts | 79 + .../src/models/policy-template-spec.ts | 33 + .../api-client/src/models/policy-template.ts | 52 + packages/api-client/src/models/policy.ts | 52 + packages/api-client/src/models/post-hit.ts | 51 + packages/api-client/src/models/post-hits.ts | 55 + packages/api-client/src/models/post-list.ts | 79 + .../api-client/src/models/post-request.ts | 40 + packages/api-client/src/models/post-spec.ts | 147 ++ packages/api-client/src/models/post-status.ts | 73 + packages/api-client/src/models/post.ts | 61 + packages/api-client/src/models/ref.ts | 45 + packages/api-client/src/models/reply-list.ts | 79 + .../api-client/src/models/reply-request.ts | 55 + packages/api-client/src/models/reply-spec.ts | 103 ++ .../api-client/src/models/reply-vo-list.ts | 79 + packages/api-client/src/models/reply-vo.ts | 49 + packages/api-client/src/models/reply.ts | 52 + .../src/models/reverse-proxy-list.ts | 79 + .../src/models/reverse-proxy-rule.ts | 37 + .../api-client/src/models/reverse-proxy.ts | 52 + .../src/models/role-binding-list.ts | 79 + .../api-client/src/models/role-binding.ts | 61 + packages/api-client/src/models/role-list.ts | 79 + packages/api-client/src/models/role-ref.ts | 39 + packages/api-client/src/models/role.ts | 52 + .../src/models/search-engine-list.ts | 79 + .../src/models/search-engine-spec.ts | 61 + .../api-client/src/models/search-engine.ts | 52 + .../api-client/src/models/setting-form.ts | 39 + .../api-client/src/models/setting-list.ts | 79 + .../api-client/src/models/setting-spec.ts | 31 + packages/api-client/src/models/setting.ts | 52 + .../api-client/src/models/single-page-list.ts | 79 + .../src/models/single-page-request.ts | 40 + .../api-client/src/models/single-page-spec.ts | 135 ++ .../src/models/single-page-status.ts | 73 + packages/api-client/src/models/single-page.ts | 61 + .../api-client/src/models/snap-shot-spec.ts | 73 + .../api-client/src/models/snapshot-list.ts | 79 + packages/api-client/src/models/snapshot.ts | 52 + packages/api-client/src/models/stats.ts | 45 + packages/api-client/src/models/subject.ts | 39 + packages/api-client/src/models/tag-list.ts | 79 + packages/api-client/src/models/tag-spec.ts | 45 + packages/api-client/src/models/tag-status.ts | 39 + packages/api-client/src/models/tag.ts | 61 + .../src/models/template-descriptor.ts | 45 + packages/api-client/src/models/theme-list.ts | 79 + packages/api-client/src/models/theme-spec.ts | 101 ++ .../api-client/src/models/theme-status.ts | 51 + packages/api-client/src/models/theme.ts | 61 + packages/api-client/src/models/user-list.ts | 79 + .../api-client/src/models/user-permission.ts | 37 + packages/api-client/src/models/user-spec.ts | 81 ++ packages/api-client/src/models/user-status.ts | 43 + packages/api-client/src/models/user.ts | 61 + .../api-client/src/models/vote-request.ts | 39 + packages/api-client/tsconfig.json | 14 + pnpm-lock.yaml | 1281 ++++++++++++++++- 192 files changed, 34046 insertions(+), 77 deletions(-) create mode 100644 packages/api-client/.eslintignore create mode 100644 packages/api-client/.eslintrc.js create mode 100644 packages/api-client/.gitignore create mode 100644 packages/api-client/.prettierrc.js create mode 100644 packages/api-client/README.md create mode 100644 packages/api-client/build.config.ts create mode 100644 packages/api-client/openapitools.json create mode 100644 packages/api-client/package.json create mode 100644 packages/api-client/src/.gitignore create mode 100644 packages/api-client/src/.npmignore create mode 100644 packages/api-client/src/.openapi-generator-ignore create mode 100644 packages/api-client/src/.openapi-generator/FILES create mode 100644 packages/api-client/src/.openapi-generator/VERSION create mode 100644 packages/api-client/src/.openapi_config.yaml create mode 100644 packages/api-client/src/api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-attachment-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-comment-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-indices-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-plugin-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-post-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-reply-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-single-page-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-stats-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-theme-api.ts create mode 100644 packages/api-client/src/api/api-console-halo-run-v1alpha1-user-api.ts create mode 100644 packages/api-client/src/api/api-halo-run-v1alpha1-comment-api.ts create mode 100644 packages/api-client/src/api/api-halo-run-v1alpha1-post-api.ts create mode 100644 packages/api-client/src/api/api-halo-run-v1alpha1-tracker-api.ts create mode 100644 packages/api-client/src/api/content-halo-run-v1alpha1-category-api.ts create mode 100644 packages/api-client/src/api/content-halo-run-v1alpha1-comment-api.ts create mode 100644 packages/api-client/src/api/content-halo-run-v1alpha1-post-api.ts create mode 100644 packages/api-client/src/api/content-halo-run-v1alpha1-reply-api.ts create mode 100644 packages/api-client/src/api/content-halo-run-v1alpha1-single-page-api.ts create mode 100644 packages/api-client/src/api/content-halo-run-v1alpha1-snapshot-api.ts create mode 100644 packages/api-client/src/api/content-halo-run-v1alpha1-tag-api.ts create mode 100644 packages/api-client/src/api/metrics-halo-run-v1alpha1-counter-api.ts create mode 100644 packages/api-client/src/api/plugin-halo-run-v1alpha1-plugin-api.ts create mode 100644 packages/api-client/src/api/plugin-halo-run-v1alpha1-reverse-proxy-api.ts create mode 100644 packages/api-client/src/api/plugin-halo-run-v1alpha1-search-engine-api.ts create mode 100644 packages/api-client/src/api/storage-halo-run-v1alpha1-attachment-api.ts create mode 100644 packages/api-client/src/api/storage-halo-run-v1alpha1-group-api.ts create mode 100644 packages/api-client/src/api/storage-halo-run-v1alpha1-policy-api.ts create mode 100644 packages/api-client/src/api/storage-halo-run-v1alpha1-policy-template-api.ts create mode 100644 packages/api-client/src/api/theme-halo-run-v1alpha1-theme-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-annotation-setting-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-config-map-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-menu-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-menu-item-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-personal-access-token-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-role-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-role-binding-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-setting-api.ts create mode 100644 packages/api-client/src/api/v1alpha1-user-api.ts create mode 100644 packages/api-client/src/base.ts create mode 100644 packages/api-client/src/common.ts create mode 100644 packages/api-client/src/configuration.ts create mode 100644 packages/api-client/src/git_push.sh create mode 100644 packages/api-client/src/index.ts create mode 100644 packages/api-client/src/models/annotation-setting-list.ts create mode 100644 packages/api-client/src/models/annotation-setting-spec.ts create mode 100644 packages/api-client/src/models/annotation-setting.ts create mode 100644 packages/api-client/src/models/attachment-list.ts create mode 100644 packages/api-client/src/models/attachment-spec.ts create mode 100644 packages/api-client/src/models/attachment-status.ts create mode 100644 packages/api-client/src/models/attachment.ts create mode 100644 packages/api-client/src/models/author.ts create mode 100644 packages/api-client/src/models/category-list.ts create mode 100644 packages/api-client/src/models/category-spec.ts create mode 100644 packages/api-client/src/models/category-status.ts create mode 100644 packages/api-client/src/models/category.ts create mode 100644 packages/api-client/src/models/change-password-request.ts create mode 100644 packages/api-client/src/models/comment-email-owner.ts create mode 100644 packages/api-client/src/models/comment-list.ts create mode 100644 packages/api-client/src/models/comment-owner.ts create mode 100644 packages/api-client/src/models/comment-request.ts create mode 100644 packages/api-client/src/models/comment-spec.ts create mode 100644 packages/api-client/src/models/comment-status.ts create mode 100644 packages/api-client/src/models/comment-vo-list.ts create mode 100644 packages/api-client/src/models/comment-vo.ts create mode 100644 packages/api-client/src/models/comment.ts create mode 100644 packages/api-client/src/models/condition.ts create mode 100644 packages/api-client/src/models/config-map-list.ts create mode 100644 packages/api-client/src/models/config-map.ts create mode 100644 packages/api-client/src/models/content-wrapper.ts create mode 100644 packages/api-client/src/models/content.ts create mode 100644 packages/api-client/src/models/contributor.ts create mode 100644 packages/api-client/src/models/counter-list.ts create mode 100644 packages/api-client/src/models/counter-request.ts create mode 100644 packages/api-client/src/models/counter.ts create mode 100644 packages/api-client/src/models/custom-templates.ts create mode 100644 packages/api-client/src/models/dashboard-stats.ts create mode 100644 packages/api-client/src/models/excerpt.ts create mode 100644 packages/api-client/src/models/extension.ts create mode 100644 packages/api-client/src/models/file-reverse-proxy-provider.ts create mode 100644 packages/api-client/src/models/grant-request.ts create mode 100644 packages/api-client/src/models/group-kind.ts create mode 100644 packages/api-client/src/models/group-list.ts create mode 100644 packages/api-client/src/models/group-spec.ts create mode 100644 packages/api-client/src/models/group-status.ts create mode 100644 packages/api-client/src/models/group.ts create mode 100644 packages/api-client/src/models/index.ts create mode 100644 packages/api-client/src/models/license.ts create mode 100644 packages/api-client/src/models/listed-comment-list.ts create mode 100644 packages/api-client/src/models/listed-comment.ts create mode 100644 packages/api-client/src/models/listed-post-list.ts create mode 100644 packages/api-client/src/models/listed-post.ts create mode 100644 packages/api-client/src/models/listed-reply-list.ts create mode 100644 packages/api-client/src/models/listed-reply.ts create mode 100644 packages/api-client/src/models/listed-single-page-list.ts create mode 100644 packages/api-client/src/models/listed-single-page.ts create mode 100644 packages/api-client/src/models/login-history.ts create mode 100644 packages/api-client/src/models/menu-item-list.ts create mode 100644 packages/api-client/src/models/menu-item-spec.ts create mode 100644 packages/api-client/src/models/menu-item-status.ts create mode 100644 packages/api-client/src/models/menu-item.ts create mode 100644 packages/api-client/src/models/menu-list.ts create mode 100644 packages/api-client/src/models/menu-spec.ts create mode 100644 packages/api-client/src/models/menu.ts create mode 100644 packages/api-client/src/models/metadata.ts create mode 100644 packages/api-client/src/models/owner-info.ts create mode 100644 packages/api-client/src/models/personal-access-token-list.ts create mode 100644 packages/api-client/src/models/personal-access-token-spec.ts create mode 100644 packages/api-client/src/models/personal-access-token.ts create mode 100644 packages/api-client/src/models/plugin-author.ts create mode 100644 packages/api-client/src/models/plugin-list.ts create mode 100644 packages/api-client/src/models/plugin-spec.ts create mode 100644 packages/api-client/src/models/plugin-status.ts create mode 100644 packages/api-client/src/models/plugin.ts create mode 100644 packages/api-client/src/models/policy-list.ts create mode 100644 packages/api-client/src/models/policy-rule.ts create mode 100644 packages/api-client/src/models/policy-spec.ts create mode 100644 packages/api-client/src/models/policy-template-list.ts create mode 100644 packages/api-client/src/models/policy-template-spec.ts create mode 100644 packages/api-client/src/models/policy-template.ts create mode 100644 packages/api-client/src/models/policy.ts create mode 100644 packages/api-client/src/models/post-hit.ts create mode 100644 packages/api-client/src/models/post-hits.ts create mode 100644 packages/api-client/src/models/post-list.ts create mode 100644 packages/api-client/src/models/post-request.ts create mode 100644 packages/api-client/src/models/post-spec.ts create mode 100644 packages/api-client/src/models/post-status.ts create mode 100644 packages/api-client/src/models/post.ts create mode 100644 packages/api-client/src/models/ref.ts create mode 100644 packages/api-client/src/models/reply-list.ts create mode 100644 packages/api-client/src/models/reply-request.ts create mode 100644 packages/api-client/src/models/reply-spec.ts create mode 100644 packages/api-client/src/models/reply-vo-list.ts create mode 100644 packages/api-client/src/models/reply-vo.ts create mode 100644 packages/api-client/src/models/reply.ts create mode 100644 packages/api-client/src/models/reverse-proxy-list.ts create mode 100644 packages/api-client/src/models/reverse-proxy-rule.ts create mode 100644 packages/api-client/src/models/reverse-proxy.ts create mode 100644 packages/api-client/src/models/role-binding-list.ts create mode 100644 packages/api-client/src/models/role-binding.ts create mode 100644 packages/api-client/src/models/role-list.ts create mode 100644 packages/api-client/src/models/role-ref.ts create mode 100644 packages/api-client/src/models/role.ts create mode 100644 packages/api-client/src/models/search-engine-list.ts create mode 100644 packages/api-client/src/models/search-engine-spec.ts create mode 100644 packages/api-client/src/models/search-engine.ts create mode 100644 packages/api-client/src/models/setting-form.ts create mode 100644 packages/api-client/src/models/setting-list.ts create mode 100644 packages/api-client/src/models/setting-spec.ts create mode 100644 packages/api-client/src/models/setting.ts create mode 100644 packages/api-client/src/models/single-page-list.ts create mode 100644 packages/api-client/src/models/single-page-request.ts create mode 100644 packages/api-client/src/models/single-page-spec.ts create mode 100644 packages/api-client/src/models/single-page-status.ts create mode 100644 packages/api-client/src/models/single-page.ts create mode 100644 packages/api-client/src/models/snap-shot-spec.ts create mode 100644 packages/api-client/src/models/snapshot-list.ts create mode 100644 packages/api-client/src/models/snapshot.ts create mode 100644 packages/api-client/src/models/stats.ts create mode 100644 packages/api-client/src/models/subject.ts create mode 100644 packages/api-client/src/models/tag-list.ts create mode 100644 packages/api-client/src/models/tag-spec.ts create mode 100644 packages/api-client/src/models/tag-status.ts create mode 100644 packages/api-client/src/models/tag.ts create mode 100644 packages/api-client/src/models/template-descriptor.ts create mode 100644 packages/api-client/src/models/theme-list.ts create mode 100644 packages/api-client/src/models/theme-spec.ts create mode 100644 packages/api-client/src/models/theme-status.ts create mode 100644 packages/api-client/src/models/theme.ts create mode 100644 packages/api-client/src/models/user-list.ts create mode 100644 packages/api-client/src/models/user-permission.ts create mode 100644 packages/api-client/src/models/user-spec.ts create mode 100644 packages/api-client/src/models/user-status.ts create mode 100644 packages/api-client/src/models/user.ts create mode 100644 packages/api-client/src/models/vote-request.ts create mode 100644 packages/api-client/tsconfig.json diff --git a/package.json b/package.json index c8f94db9c..80f4bff03 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@formkit/utils": "^1.0.0-beta.12", "@formkit/validation": "1.0.0-beta.12", "@formkit/vue": "^1.0.0-beta.12", - "@halo-dev/api-client": "0.0.71", + "@halo-dev/api-client": "workspace:*", "@halo-dev/components": "workspace:*", "@halo-dev/console-shared": "workspace:*", "@halo-dev/richtext-editor": "0.0.0-alpha.19", diff --git a/packages/api-client/.eslintignore b/packages/api-client/.eslintignore new file mode 100644 index 000000000..3dddf3f67 --- /dev/null +++ b/packages/api-client/.eslintignore @@ -0,0 +1,2 @@ +dist/* +node_modules/* diff --git a/packages/api-client/.eslintrc.js b/packages/api-client/.eslintrc.js new file mode 100644 index 000000000..a734d08a4 --- /dev/null +++ b/packages/api-client/.eslintrc.js @@ -0,0 +1,14 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], + env: { + browser: true, + node: true, + }, + rules: { + '@typescript-eslint/no-explicit-any': ['off'], + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + }, +} diff --git a/packages/api-client/.gitignore b/packages/api-client/.gitignore new file mode 100644 index 000000000..c291c0867 --- /dev/null +++ b/packages/api-client/.gitignore @@ -0,0 +1,69 @@ +# Node template +dist/ +tsconfig.tsbuildinfo +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.tsbuildinfo + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# IDE +.idea/* +*.iml +*.sublime-* + +# OSX +.DS_Store + +docs diff --git a/packages/api-client/.prettierrc.js b/packages/api-client/.prettierrc.js new file mode 100644 index 000000000..5c66eb952 --- /dev/null +++ b/packages/api-client/.prettierrc.js @@ -0,0 +1,6 @@ +module.exports = { + printWidth: 120, + semi: false, + trailingComma: 'all', + singleQuote: true, +} diff --git a/packages/api-client/README.md b/packages/api-client/README.md new file mode 100644 index 000000000..cba5e2b41 --- /dev/null +++ b/packages/api-client/README.md @@ -0,0 +1,24 @@ +# @halo-dev/api-client + +Halo 2.0 的 JavaScript API 客户端请求库。使用 [OpenAPI Generator](https://openapi-generator.tech/) 生成。 + +## 开发环境 + +```bash +pnpm install +``` + +```bash +# 根据 OpenAPI 3.0 生成类型和网络请求的代码,此步骤需要启动 Halo 2.0 后端。 +pnpm gen +``` + +```bash +pnpm build +``` + +## 发布版本 + +```bash +pnpm release +``` diff --git a/packages/api-client/build.config.ts b/packages/api-client/build.config.ts new file mode 100644 index 000000000..5494ff657 --- /dev/null +++ b/packages/api-client/build.config.ts @@ -0,0 +1,11 @@ +import { defineBuildConfig } from 'unbuild' + +export default defineBuildConfig({ + entries: ['src/index'], + declaration: true, + clean: true, + rollup: { + emitCJS: true, + }, + externals: ['axios'], +}) diff --git a/packages/api-client/openapitools.json b/packages/api-client/openapitools.json new file mode 100644 index 000000000..6755cd244 --- /dev/null +++ b/packages/api-client/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "6.3.0" + } +} diff --git a/packages/api-client/package.json b/packages/api-client/package.json new file mode 100644 index 000000000..b882901f2 --- /dev/null +++ b/packages/api-client/package.json @@ -0,0 +1,59 @@ +{ + "name": "@halo-dev/api-client", + "version": "2.3.0-SNAPSHOT", + "description": "", + "scripts": { + "build": "unbuild", + "dev": "unbuild --stub", + "lint": "eslint . --fix", + "prettier": "prettier --write './src/**/*.{js,jsx,ts,tsx,json,yml,yaml}'", + "typecheck": "tsc --noEmit", + "release": "bumpp", + "gen": "openapi-generator-cli generate -i http://localhost:8090/v3/api-docs/all-api -g typescript-axios -c ./src/.openapi_config.yaml -o ./src --type-mappings='set=Array' && pnpm lint && pnpm prettier" + }, + "keywords": [], + "author": "@halo-dev", + "contributors": [ + { + "name": "Ryan Wang", + "url": "https://github.com/ruibaby" + } + ], + "license": "GPL-3.0", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": "./dist/index.cjs", + "import": "./dist/index.mjs" + } + }, + "main": "./dist/index.mjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "./dist/*", + "./dist/index.d.ts" + ] + } + }, + "files": [ + "dist" + ], + "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.5.2", + "@types/node": "^18.13.0", + "@typescript-eslint/eslint-plugin": "^5.52.0", + "@typescript-eslint/parser": "^5.52.0", + "axios": "^0.27.2", + "bumpp": "^8.2.1", + "eslint": "^8.34.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-prettier": "^4.2.1", + "prettier": "^2.8.4", + "typescript": "^4.9.5", + "unbuild": "^0.7.6", + "vitest": "^0.18.1" + } +} diff --git a/packages/api-client/src/.gitignore b/packages/api-client/src/.gitignore new file mode 100644 index 000000000..149b57654 --- /dev/null +++ b/packages/api-client/src/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/api-client/src/.npmignore b/packages/api-client/src/.npmignore new file mode 100644 index 000000000..999d88df6 --- /dev/null +++ b/packages/api-client/src/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/api-client/src/.openapi-generator-ignore b/packages/api-client/src/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/packages/api-client/src/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/api-client/src/.openapi-generator/FILES b/packages/api-client/src/.openapi-generator/FILES new file mode 100644 index 000000000..06a63513b --- /dev/null +++ b/packages/api-client/src/.openapi-generator/FILES @@ -0,0 +1,178 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +api/api-console-halo-run-v1alpha1-attachment-api.ts +api/api-console-halo-run-v1alpha1-comment-api.ts +api/api-console-halo-run-v1alpha1-indices-api.ts +api/api-console-halo-run-v1alpha1-plugin-api.ts +api/api-console-halo-run-v1alpha1-post-api.ts +api/api-console-halo-run-v1alpha1-reply-api.ts +api/api-console-halo-run-v1alpha1-single-page-api.ts +api/api-console-halo-run-v1alpha1-stats-api.ts +api/api-console-halo-run-v1alpha1-theme-api.ts +api/api-console-halo-run-v1alpha1-user-api.ts +api/api-halo-run-v1alpha1-comment-api.ts +api/api-halo-run-v1alpha1-post-api.ts +api/api-halo-run-v1alpha1-tracker-api.ts +api/content-halo-run-v1alpha1-category-api.ts +api/content-halo-run-v1alpha1-comment-api.ts +api/content-halo-run-v1alpha1-post-api.ts +api/content-halo-run-v1alpha1-reply-api.ts +api/content-halo-run-v1alpha1-single-page-api.ts +api/content-halo-run-v1alpha1-snapshot-api.ts +api/content-halo-run-v1alpha1-tag-api.ts +api/metrics-halo-run-v1alpha1-counter-api.ts +api/plugin-halo-run-v1alpha1-plugin-api.ts +api/plugin-halo-run-v1alpha1-reverse-proxy-api.ts +api/plugin-halo-run-v1alpha1-search-engine-api.ts +api/storage-halo-run-v1alpha1-attachment-api.ts +api/storage-halo-run-v1alpha1-group-api.ts +api/storage-halo-run-v1alpha1-policy-api.ts +api/storage-halo-run-v1alpha1-policy-template-api.ts +api/theme-halo-run-v1alpha1-theme-api.ts +api/v1alpha1-annotation-setting-api.ts +api/v1alpha1-config-map-api.ts +api/v1alpha1-menu-api.ts +api/v1alpha1-menu-item-api.ts +api/v1alpha1-personal-access-token-api.ts +api/v1alpha1-role-api.ts +api/v1alpha1-role-binding-api.ts +api/v1alpha1-setting-api.ts +api/v1alpha1-user-api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts +models/annotation-setting-list.ts +models/annotation-setting-spec.ts +models/annotation-setting.ts +models/attachment-list.ts +models/attachment-spec.ts +models/attachment-status.ts +models/attachment.ts +models/author.ts +models/category-list.ts +models/category-spec.ts +models/category-status.ts +models/category.ts +models/change-password-request.ts +models/comment-email-owner.ts +models/comment-list.ts +models/comment-owner.ts +models/comment-request.ts +models/comment-spec.ts +models/comment-status.ts +models/comment-vo-list.ts +models/comment-vo.ts +models/comment.ts +models/condition.ts +models/config-map-list.ts +models/config-map.ts +models/content-wrapper.ts +models/content.ts +models/contributor.ts +models/counter-list.ts +models/counter-request.ts +models/counter.ts +models/custom-templates.ts +models/dashboard-stats.ts +models/excerpt.ts +models/extension.ts +models/file-reverse-proxy-provider.ts +models/grant-request.ts +models/group-kind.ts +models/group-list.ts +models/group-spec.ts +models/group-status.ts +models/group.ts +models/index.ts +models/license.ts +models/listed-comment-list.ts +models/listed-comment.ts +models/listed-post-list.ts +models/listed-post.ts +models/listed-reply-list.ts +models/listed-reply.ts +models/listed-single-page-list.ts +models/listed-single-page.ts +models/login-history.ts +models/menu-item-list.ts +models/menu-item-spec.ts +models/menu-item-status.ts +models/menu-item.ts +models/menu-list.ts +models/menu-spec.ts +models/menu.ts +models/metadata.ts +models/owner-info.ts +models/personal-access-token-list.ts +models/personal-access-token-spec.ts +models/personal-access-token.ts +models/plugin-author.ts +models/plugin-list.ts +models/plugin-spec.ts +models/plugin-status.ts +models/plugin.ts +models/policy-list.ts +models/policy-rule.ts +models/policy-spec.ts +models/policy-template-list.ts +models/policy-template-spec.ts +models/policy-template.ts +models/policy.ts +models/post-hit.ts +models/post-hits.ts +models/post-list.ts +models/post-request.ts +models/post-spec.ts +models/post-status.ts +models/post.ts +models/ref.ts +models/reply-list.ts +models/reply-request.ts +models/reply-spec.ts +models/reply-vo-list.ts +models/reply-vo.ts +models/reply.ts +models/reverse-proxy-list.ts +models/reverse-proxy-rule.ts +models/reverse-proxy.ts +models/role-binding-list.ts +models/role-binding.ts +models/role-list.ts +models/role-ref.ts +models/role.ts +models/search-engine-list.ts +models/search-engine-spec.ts +models/search-engine.ts +models/setting-form.ts +models/setting-list.ts +models/setting-spec.ts +models/setting.ts +models/single-page-list.ts +models/single-page-request.ts +models/single-page-spec.ts +models/single-page-status.ts +models/single-page.ts +models/snap-shot-spec.ts +models/snapshot-list.ts +models/snapshot.ts +models/stats.ts +models/subject.ts +models/tag-list.ts +models/tag-spec.ts +models/tag-status.ts +models/tag.ts +models/template-descriptor.ts +models/theme-list.ts +models/theme-spec.ts +models/theme-status.ts +models/theme.ts +models/user-list.ts +models/user-permission.ts +models/user-spec.ts +models/user-status.ts +models/user.ts +models/vote-request.ts diff --git a/packages/api-client/src/.openapi-generator/VERSION b/packages/api-client/src/.openapi-generator/VERSION new file mode 100644 index 000000000..e7e42a4b5 --- /dev/null +++ b/packages/api-client/src/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.3.0 \ No newline at end of file diff --git a/packages/api-client/src/.openapi_config.yaml b/packages/api-client/src/.openapi_config.yaml new file mode 100644 index 000000000..873ee6f15 --- /dev/null +++ b/packages/api-client/src/.openapi_config.yaml @@ -0,0 +1,5 @@ +supportsES6: true +useSingleRequestParameter: true +withSeparateModelsAndApi: true +apiPackage: api +modelPackage: models diff --git a/packages/api-client/src/api.ts b/packages/api-client/src/api.ts new file mode 100644 index 000000000..b104e1209 --- /dev/null +++ b/packages/api-client/src/api.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export * from './api/api-console-halo-run-v1alpha1-attachment-api' +export * from './api/api-console-halo-run-v1alpha1-comment-api' +export * from './api/api-console-halo-run-v1alpha1-indices-api' +export * from './api/api-console-halo-run-v1alpha1-plugin-api' +export * from './api/api-console-halo-run-v1alpha1-post-api' +export * from './api/api-console-halo-run-v1alpha1-reply-api' +export * from './api/api-console-halo-run-v1alpha1-single-page-api' +export * from './api/api-console-halo-run-v1alpha1-stats-api' +export * from './api/api-console-halo-run-v1alpha1-theme-api' +export * from './api/api-console-halo-run-v1alpha1-user-api' +export * from './api/api-halo-run-v1alpha1-comment-api' +export * from './api/api-halo-run-v1alpha1-post-api' +export * from './api/api-halo-run-v1alpha1-tracker-api' +export * from './api/content-halo-run-v1alpha1-category-api' +export * from './api/content-halo-run-v1alpha1-comment-api' +export * from './api/content-halo-run-v1alpha1-post-api' +export * from './api/content-halo-run-v1alpha1-reply-api' +export * from './api/content-halo-run-v1alpha1-single-page-api' +export * from './api/content-halo-run-v1alpha1-snapshot-api' +export * from './api/content-halo-run-v1alpha1-tag-api' +export * from './api/metrics-halo-run-v1alpha1-counter-api' +export * from './api/plugin-halo-run-v1alpha1-plugin-api' +export * from './api/plugin-halo-run-v1alpha1-reverse-proxy-api' +export * from './api/plugin-halo-run-v1alpha1-search-engine-api' +export * from './api/storage-halo-run-v1alpha1-attachment-api' +export * from './api/storage-halo-run-v1alpha1-group-api' +export * from './api/storage-halo-run-v1alpha1-policy-api' +export * from './api/storage-halo-run-v1alpha1-policy-template-api' +export * from './api/theme-halo-run-v1alpha1-theme-api' +export * from './api/v1alpha1-annotation-setting-api' +export * from './api/v1alpha1-config-map-api' +export * from './api/v1alpha1-menu-api' +export * from './api/v1alpha1-menu-item-api' +export * from './api/v1alpha1-personal-access-token-api' +export * from './api/v1alpha1-role-api' +export * from './api/v1alpha1-role-binding-api' +export * from './api/v1alpha1-setting-api' +export * from './api/v1alpha1-user-api' diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-attachment-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-attachment-api.ts new file mode 100644 index 000000000..086e02254 --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-attachment-api.ts @@ -0,0 +1,486 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Attachment } from '../models' +// @ts-ignore +import { AttachmentList } from '../models' +/** + * ApiConsoleHaloRunV1alpha1AttachmentApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1AttachmentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {string} [policy] Name of policy + * @param {Array} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp, size + * @param {string} [displayName] Display name of attachment + * @param {string} [group] Name of group + * @param {boolean} [ungrouped] Filter attachments without group. This parameter will ignore group parameter. + * @param {string} [uploadedBy] Name of user who uploaded the attachment + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchAttachments: async ( + policy?: string, + sort?: Array, + displayName?: string, + group?: string, + ungrouped?: boolean, + uploadedBy?: string, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/attachments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (policy !== undefined) { + localVarQueryParameter['policy'] = policy + } + + if (sort) { + localVarQueryParameter['sort'] = Array.from(sort) + } + + if (displayName !== undefined) { + localVarQueryParameter['displayName'] = displayName + } + + if (group !== undefined) { + localVarQueryParameter['group'] = group + } + + if (ungrouped !== undefined) { + localVarQueryParameter['ungrouped'] = ungrouped + } + + if (uploadedBy !== undefined) { + localVarQueryParameter['uploadedBy'] = uploadedBy + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * + * @param {File} file + * @param {string} policyName Storage policy name + * @param {string} [groupName] The name of the group to which the attachment belongs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadAttachment: async ( + file: File, + policyName: string, + groupName?: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'file' is not null or undefined + assertParamExists('uploadAttachment', 'file', file) + // verify required parameter 'policyName' is not null or undefined + assertParamExists('uploadAttachment', 'policyName', policyName) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/attachments/upload` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (file !== undefined) { + localVarFormParams.append('file', file as any) + } + + if (policyName !== undefined) { + localVarFormParams.append('policyName', policyName as any) + } + + if (groupName !== undefined) { + localVarFormParams.append('groupName', groupName as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1AttachmentApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1AttachmentApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1AttachmentApiAxiosParamCreator(configuration) + return { + /** + * + * @param {string} [policy] Name of policy + * @param {Array} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp, size + * @param {string} [displayName] Display name of attachment + * @param {string} [group] Name of group + * @param {boolean} [ungrouped] Filter attachments without group. This parameter will ignore group parameter. + * @param {string} [uploadedBy] Name of user who uploaded the attachment + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async searchAttachments( + policy?: string, + sort?: Array, + displayName?: string, + group?: string, + ungrouped?: boolean, + uploadedBy?: string, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchAttachments( + policy, + sort, + displayName, + group, + ungrouped, + uploadedBy, + size, + page, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * + * @param {File} file + * @param {string} policyName Storage policy name + * @param {string} [groupName] The name of the group to which the attachment belongs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadAttachment( + file: File, + policyName: string, + groupName?: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadAttachment(file, policyName, groupName, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1AttachmentApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1AttachmentApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1AttachmentApiFp(configuration) + return { + /** + * + * @param {ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachmentsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchAttachments( + requestParameters: ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachmentsRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .searchAttachments( + requestParameters.policy, + requestParameters.sort, + requestParameters.displayName, + requestParameters.group, + requestParameters.ungrouped, + requestParameters.uploadedBy, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * + * @param {ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadAttachment( + requestParameters: ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachmentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .uploadAttachment(requestParameters.file, requestParameters.policyName, requestParameters.groupName, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for searchAttachments operation in ApiConsoleHaloRunV1alpha1AttachmentApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachmentsRequest + */ +export interface ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachmentsRequest { + /** + * Name of policy + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly policy?: string + + /** + * Sort property and direction of the list result. Supported fields: creationTimestamp, size + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly sort?: Array + + /** + * Display name of attachment + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly displayName?: string + + /** + * Name of group + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly group?: string + + /** + * Filter attachments without group. This parameter will ignore group parameter. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly ungrouped?: boolean + + /** + * Name of user who uploaded the attachment + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly uploadedBy?: string + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly page?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachments + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for uploadAttachment operation in ApiConsoleHaloRunV1alpha1AttachmentApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachmentRequest + */ +export interface ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachmentRequest { + /** + * + * @type {File} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachment + */ + readonly file: File + + /** + * Storage policy name + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachment + */ + readonly policyName: string + + /** + * The name of the group to which the attachment belongs + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachment + */ + readonly groupName?: string +} + +/** + * ApiConsoleHaloRunV1alpha1AttachmentApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1AttachmentApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1AttachmentApi extends BaseAPI { + /** + * + * @param {ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachmentsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApi + */ + public searchAttachments( + requestParameters: ApiConsoleHaloRunV1alpha1AttachmentApiSearchAttachmentsRequest = {}, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1AttachmentApiFp(this.configuration) + .searchAttachments( + requestParameters.policy, + requestParameters.sort, + requestParameters.displayName, + requestParameters.group, + requestParameters.ungrouped, + requestParameters.uploadedBy, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * + * @param {ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1AttachmentApi + */ + public uploadAttachment( + requestParameters: ApiConsoleHaloRunV1alpha1AttachmentApiUploadAttachmentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1AttachmentApiFp(this.configuration) + .uploadAttachment(requestParameters.file, requestParameters.policyName, requestParameters.groupName, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-comment-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-comment-api.ts new file mode 100644 index 000000000..e3f3b7526 --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-comment-api.ts @@ -0,0 +1,659 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Comment } from '../models' +// @ts-ignore +import { CommentRequest } from '../models' +// @ts-ignore +import { ListedCommentList } from '../models' +// @ts-ignore +import { Reply } from '../models' +// @ts-ignore +import { ReplyRequest } from '../models' +/** + * ApiConsoleHaloRunV1alpha1CommentApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1CommentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a comment. + * @param {CommentRequest} commentRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createComment: async (commentRequest: CommentRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'commentRequest' is not null or undefined + assertParamExists('createComment', 'commentRequest', commentRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/comments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(commentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Create a reply. + * @param {string} name + * @param {ReplyRequest} replyRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReply: async ( + name: string, + replyRequest: ReplyRequest, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('createReply', 'name', name) + // verify required parameter 'replyRequest' is not null or undefined + assertParamExists('createReply', 'replyRequest', replyRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/comments/{name}/reply`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(replyRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List comments. + * @param {'LAST_REPLY_TIME' | 'REPLY_COUNT' | 'CREATE_TIME'} [sort] Comment collation. + * @param {string} [keyword] Comments filtered by keyword. + * @param {boolean} [hidden] The comment is hidden from the theme side. + * @param {boolean} [top] Comment top display. + * @param {boolean} [approved] Comments approved. + * @param {boolean} [sortOrder] ascending order If it is true; otherwise, it is in descending order. + * @param {boolean} [allowNotification] Send notifications when there are new replies. + * @param {string} [ownerKind] Commenter kind. + * @param {string} [ownerName] Commenter name. + * @param {string} [subjectKind] Comment subject kind. + * @param {string} [subjectName] Comment subject name. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listComments: async ( + sort?: 'LAST_REPLY_TIME' | 'REPLY_COUNT' | 'CREATE_TIME', + keyword?: string, + hidden?: boolean, + top?: boolean, + approved?: boolean, + sortOrder?: boolean, + allowNotification?: boolean, + ownerKind?: string, + ownerName?: string, + subjectKind?: string, + subjectName?: string, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/comments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (hidden !== undefined) { + localVarQueryParameter['hidden'] = hidden + } + + if (top !== undefined) { + localVarQueryParameter['top'] = top + } + + if (approved !== undefined) { + localVarQueryParameter['approved'] = approved + } + + if (sortOrder !== undefined) { + localVarQueryParameter['sortOrder'] = sortOrder + } + + if (allowNotification !== undefined) { + localVarQueryParameter['allowNotification'] = allowNotification + } + + if (ownerKind !== undefined) { + localVarQueryParameter['ownerKind'] = ownerKind + } + + if (ownerName !== undefined) { + localVarQueryParameter['ownerName'] = ownerName + } + + if (subjectKind !== undefined) { + localVarQueryParameter['subjectKind'] = subjectKind + } + + if (subjectName !== undefined) { + localVarQueryParameter['subjectName'] = subjectName + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1CommentApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1CommentApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1CommentApiAxiosParamCreator(configuration) + return { + /** + * Create a comment. + * @param {CommentRequest} commentRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createComment( + commentRequest: CommentRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createComment(commentRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Create a reply. + * @param {string} name + * @param {ReplyRequest} replyRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createReply( + name: string, + replyRequest: ReplyRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createReply(name, replyRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List comments. + * @param {'LAST_REPLY_TIME' | 'REPLY_COUNT' | 'CREATE_TIME'} [sort] Comment collation. + * @param {string} [keyword] Comments filtered by keyword. + * @param {boolean} [hidden] The comment is hidden from the theme side. + * @param {boolean} [top] Comment top display. + * @param {boolean} [approved] Comments approved. + * @param {boolean} [sortOrder] ascending order If it is true; otherwise, it is in descending order. + * @param {boolean} [allowNotification] Send notifications when there are new replies. + * @param {string} [ownerKind] Commenter kind. + * @param {string} [ownerName] Commenter name. + * @param {string} [subjectKind] Comment subject kind. + * @param {string} [subjectName] Comment subject name. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listComments( + sort?: 'LAST_REPLY_TIME' | 'REPLY_COUNT' | 'CREATE_TIME', + keyword?: string, + hidden?: boolean, + top?: boolean, + approved?: boolean, + sortOrder?: boolean, + allowNotification?: boolean, + ownerKind?: string, + ownerName?: string, + subjectKind?: string, + subjectName?: string, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listComments( + sort, + keyword, + hidden, + top, + approved, + sortOrder, + allowNotification, + ownerKind, + ownerName, + subjectKind, + subjectName, + size, + page, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1CommentApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1CommentApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1CommentApiFp(configuration) + return { + /** + * Create a comment. + * @param {ApiConsoleHaloRunV1alpha1CommentApiCreateCommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createComment( + requestParameters: ApiConsoleHaloRunV1alpha1CommentApiCreateCommentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createComment(requestParameters.commentRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Create a reply. + * @param {ApiConsoleHaloRunV1alpha1CommentApiCreateReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReply( + requestParameters: ApiConsoleHaloRunV1alpha1CommentApiCreateReplyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createReply(requestParameters.name, requestParameters.replyRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * List comments. + * @param {ApiConsoleHaloRunV1alpha1CommentApiListCommentsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listComments( + requestParameters: ApiConsoleHaloRunV1alpha1CommentApiListCommentsRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listComments( + requestParameters.sort, + requestParameters.keyword, + requestParameters.hidden, + requestParameters.top, + requestParameters.approved, + requestParameters.sortOrder, + requestParameters.allowNotification, + requestParameters.ownerKind, + requestParameters.ownerName, + requestParameters.subjectKind, + requestParameters.subjectName, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createComment operation in ApiConsoleHaloRunV1alpha1CommentApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1CommentApiCreateCommentRequest + */ +export interface ApiConsoleHaloRunV1alpha1CommentApiCreateCommentRequest { + /** + * + * @type {CommentRequest} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiCreateComment + */ + readonly commentRequest: CommentRequest +} + +/** + * Request parameters for createReply operation in ApiConsoleHaloRunV1alpha1CommentApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1CommentApiCreateReplyRequest + */ +export interface ApiConsoleHaloRunV1alpha1CommentApiCreateReplyRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiCreateReply + */ + readonly name: string + + /** + * + * @type {ReplyRequest} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiCreateReply + */ + readonly replyRequest: ReplyRequest +} + +/** + * Request parameters for listComments operation in ApiConsoleHaloRunV1alpha1CommentApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1CommentApiListCommentsRequest + */ +export interface ApiConsoleHaloRunV1alpha1CommentApiListCommentsRequest { + /** + * Comment collation. + * @type {'LAST_REPLY_TIME' | 'REPLY_COUNT' | 'CREATE_TIME'} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly sort?: 'LAST_REPLY_TIME' | 'REPLY_COUNT' | 'CREATE_TIME' + + /** + * Comments filtered by keyword. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly keyword?: string + + /** + * The comment is hidden from the theme side. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly hidden?: boolean + + /** + * Comment top display. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly top?: boolean + + /** + * Comments approved. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly approved?: boolean + + /** + * ascending order If it is true; otherwise, it is in descending order. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly sortOrder?: boolean + + /** + * Send notifications when there are new replies. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly allowNotification?: boolean + + /** + * Commenter kind. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly ownerKind?: string + + /** + * Commenter name. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly ownerName?: string + + /** + * Comment subject kind. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly subjectKind?: string + + /** + * Comment subject name. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly subjectName?: string + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly page?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1CommentApiListComments + */ + readonly fieldSelector?: Array +} + +/** + * ApiConsoleHaloRunV1alpha1CommentApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1CommentApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1CommentApi extends BaseAPI { + /** + * Create a comment. + * @param {ApiConsoleHaloRunV1alpha1CommentApiCreateCommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1CommentApi + */ + public createComment( + requestParameters: ApiConsoleHaloRunV1alpha1CommentApiCreateCommentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1CommentApiFp(this.configuration) + .createComment(requestParameters.commentRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Create a reply. + * @param {ApiConsoleHaloRunV1alpha1CommentApiCreateReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1CommentApi + */ + public createReply( + requestParameters: ApiConsoleHaloRunV1alpha1CommentApiCreateReplyRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1CommentApiFp(this.configuration) + .createReply(requestParameters.name, requestParameters.replyRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List comments. + * @param {ApiConsoleHaloRunV1alpha1CommentApiListCommentsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1CommentApi + */ + public listComments( + requestParameters: ApiConsoleHaloRunV1alpha1CommentApiListCommentsRequest = {}, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1CommentApiFp(this.configuration) + .listComments( + requestParameters.sort, + requestParameters.keyword, + requestParameters.hidden, + requestParameters.top, + requestParameters.approved, + requestParameters.sortOrder, + requestParameters.allowNotification, + requestParameters.ownerKind, + requestParameters.ownerName, + requestParameters.subjectKind, + requestParameters.subjectName, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-indices-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-indices-api.ts new file mode 100644 index 000000000..b0cd40939 --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-indices-api.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +/** + * ApiConsoleHaloRunV1alpha1IndicesApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1IndicesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Build or rebuild post indices for full text search + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + buildPostIndices: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/indices/post` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1IndicesApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1IndicesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1IndicesApiAxiosParamCreator(configuration) + return { + /** + * Build or rebuild post indices for full text search + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async buildPostIndices( + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.buildPostIndices(options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1IndicesApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1IndicesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1IndicesApiFp(configuration) + return { + /** + * Build or rebuild post indices for full text search + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + buildPostIndices(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.buildPostIndices(options).then((request) => request(axios, basePath)) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1IndicesApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1IndicesApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1IndicesApi extends BaseAPI { + /** + * Build or rebuild post indices for full text search + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1IndicesApi + */ + public buildPostIndices(options?: AxiosRequestConfig) { + return ApiConsoleHaloRunV1alpha1IndicesApiFp(this.configuration) + .buildPostIndices(options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-plugin-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-plugin-api.ts new file mode 100644 index 000000000..5b183b96d --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-plugin-api.ts @@ -0,0 +1,922 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { ConfigMap } from '../models' +// @ts-ignore +import { Plugin } from '../models' +// @ts-ignore +import { PluginList } from '../models' +// @ts-ignore +import { Setting } from '../models' +/** + * ApiConsoleHaloRunV1alpha1PluginApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1PluginApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Fetch configMap of plugin by configured configMapName. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPluginConfig: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchPluginConfig', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/plugins/{name}/config`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch setting of plugin. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPluginSetting: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchPluginSetting', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/plugins/{name}/setting`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Install a plugin by uploading a Jar file. + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + installPlugin: async (file: File, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'file' is not null or undefined + assertParamExists('installPlugin', 'file', file) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/plugins/install` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (file !== undefined) { + localVarFormParams.append('file', file as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List plugins using query criteria and sort params + * @param {Array} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp + * @param {string} [keyword] Keyword of plugin name or description + * @param {boolean} [enabled] Whether the plugin is enabled + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPlugins: async ( + sort?: Array, + keyword?: string, + enabled?: boolean, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/plugins` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (sort) { + localVarQueryParameter['sort'] = Array.from(sort) + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (enabled !== undefined) { + localVarQueryParameter['enabled'] = enabled + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Reset the configMap of plugin setting. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resetPluginConfig: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('resetPluginConfig', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/plugins/{name}/reset-config`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update the configMap of plugin setting. + * @param {string} name + * @param {ConfigMap} configMap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePluginConfig: async ( + name: string, + configMap: ConfigMap, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatePluginConfig', 'name', name) + // verify required parameter 'configMap' is not null or undefined + assertParamExists('updatePluginConfig', 'configMap', configMap) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/plugins/{name}/config`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(configMap, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Upgrade a plugin by uploading a Jar file + * @param {string} name + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upgradePlugin: async (name: string, file: File, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('upgradePlugin', 'name', name) + // verify required parameter 'file' is not null or undefined + assertParamExists('upgradePlugin', 'file', file) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/plugins/{name}/upgrade`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (file !== undefined) { + localVarFormParams.append('file', file as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1PluginApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1PluginApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1PluginApiAxiosParamCreator(configuration) + return { + /** + * Fetch configMap of plugin by configured configMapName. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchPluginConfig( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPluginConfig(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch setting of plugin. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchPluginSetting( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPluginSetting(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Install a plugin by uploading a Jar file. + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async installPlugin( + file: File, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.installPlugin(file, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List plugins using query criteria and sort params + * @param {Array} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp + * @param {string} [keyword] Keyword of plugin name or description + * @param {boolean} [enabled] Whether the plugin is enabled + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listPlugins( + sort?: Array, + keyword?: string, + enabled?: boolean, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPlugins( + sort, + keyword, + enabled, + size, + page, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Reset the configMap of plugin setting. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async resetPluginConfig( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resetPluginConfig(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update the configMap of plugin setting. + * @param {string} name + * @param {ConfigMap} configMap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePluginConfig( + name: string, + configMap: ConfigMap, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePluginConfig(name, configMap, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Upgrade a plugin by uploading a Jar file + * @param {string} name + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async upgradePlugin( + name: string, + file: File, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.upgradePlugin(name, file, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1PluginApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1PluginApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1PluginApiFp(configuration) + return { + /** + * Fetch configMap of plugin by configured configMapName. + * @param {ApiConsoleHaloRunV1alpha1PluginApiFetchPluginConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPluginConfig( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiFetchPluginConfigRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.fetchPluginConfig(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Fetch setting of plugin. + * @param {ApiConsoleHaloRunV1alpha1PluginApiFetchPluginSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPluginSetting( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiFetchPluginSettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.fetchPluginSetting(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Install a plugin by uploading a Jar file. + * @param {ApiConsoleHaloRunV1alpha1PluginApiInstallPluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + installPlugin( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiInstallPluginRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.installPlugin(requestParameters.file, options).then((request) => request(axios, basePath)) + }, + /** + * List plugins using query criteria and sort params + * @param {ApiConsoleHaloRunV1alpha1PluginApiListPluginsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPlugins( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiListPluginsRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listPlugins( + requestParameters.sort, + requestParameters.keyword, + requestParameters.enabled, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Reset the configMap of plugin setting. + * @param {ApiConsoleHaloRunV1alpha1PluginApiResetPluginConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resetPluginConfig( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiResetPluginConfigRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.resetPluginConfig(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Update the configMap of plugin setting. + * @param {ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePluginConfig( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfigRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatePluginConfig(requestParameters.name, requestParameters.configMap, options) + .then((request) => request(axios, basePath)) + }, + /** + * Upgrade a plugin by uploading a Jar file + * @param {ApiConsoleHaloRunV1alpha1PluginApiUpgradePluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upgradePlugin( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiUpgradePluginRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .upgradePlugin(requestParameters.name, requestParameters.file, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for fetchPluginConfig operation in ApiConsoleHaloRunV1alpha1PluginApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PluginApiFetchPluginConfigRequest + */ +export interface ApiConsoleHaloRunV1alpha1PluginApiFetchPluginConfigRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiFetchPluginConfig + */ + readonly name: string +} + +/** + * Request parameters for fetchPluginSetting operation in ApiConsoleHaloRunV1alpha1PluginApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PluginApiFetchPluginSettingRequest + */ +export interface ApiConsoleHaloRunV1alpha1PluginApiFetchPluginSettingRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiFetchPluginSetting + */ + readonly name: string +} + +/** + * Request parameters for installPlugin operation in ApiConsoleHaloRunV1alpha1PluginApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PluginApiInstallPluginRequest + */ +export interface ApiConsoleHaloRunV1alpha1PluginApiInstallPluginRequest { + /** + * + * @type {File} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiInstallPlugin + */ + readonly file: File +} + +/** + * Request parameters for listPlugins operation in ApiConsoleHaloRunV1alpha1PluginApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PluginApiListPluginsRequest + */ +export interface ApiConsoleHaloRunV1alpha1PluginApiListPluginsRequest { + /** + * Sort property and direction of the list result. Supported fields: creationTimestamp + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiListPlugins + */ + readonly sort?: Array + + /** + * Keyword of plugin name or description + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiListPlugins + */ + readonly keyword?: string + + /** + * Whether the plugin is enabled + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiListPlugins + */ + readonly enabled?: boolean + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiListPlugins + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiListPlugins + */ + readonly page?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiListPlugins + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiListPlugins + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for resetPluginConfig operation in ApiConsoleHaloRunV1alpha1PluginApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PluginApiResetPluginConfigRequest + */ +export interface ApiConsoleHaloRunV1alpha1PluginApiResetPluginConfigRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiResetPluginConfig + */ + readonly name: string +} + +/** + * Request parameters for updatePluginConfig operation in ApiConsoleHaloRunV1alpha1PluginApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfigRequest + */ +export interface ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfigRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfig + */ + readonly name: string + + /** + * + * @type {ConfigMap} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfig + */ + readonly configMap: ConfigMap +} + +/** + * Request parameters for upgradePlugin operation in ApiConsoleHaloRunV1alpha1PluginApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PluginApiUpgradePluginRequest + */ +export interface ApiConsoleHaloRunV1alpha1PluginApiUpgradePluginRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiUpgradePlugin + */ + readonly name: string + + /** + * + * @type {File} + * @memberof ApiConsoleHaloRunV1alpha1PluginApiUpgradePlugin + */ + readonly file: File +} + +/** + * ApiConsoleHaloRunV1alpha1PluginApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1PluginApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1PluginApi extends BaseAPI { + /** + * Fetch configMap of plugin by configured configMapName. + * @param {ApiConsoleHaloRunV1alpha1PluginApiFetchPluginConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PluginApi + */ + public fetchPluginConfig( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiFetchPluginConfigRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PluginApiFp(this.configuration) + .fetchPluginConfig(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch setting of plugin. + * @param {ApiConsoleHaloRunV1alpha1PluginApiFetchPluginSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PluginApi + */ + public fetchPluginSetting( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiFetchPluginSettingRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PluginApiFp(this.configuration) + .fetchPluginSetting(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Install a plugin by uploading a Jar file. + * @param {ApiConsoleHaloRunV1alpha1PluginApiInstallPluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PluginApi + */ + public installPlugin( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiInstallPluginRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PluginApiFp(this.configuration) + .installPlugin(requestParameters.file, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List plugins using query criteria and sort params + * @param {ApiConsoleHaloRunV1alpha1PluginApiListPluginsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PluginApi + */ + public listPlugins( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiListPluginsRequest = {}, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PluginApiFp(this.configuration) + .listPlugins( + requestParameters.sort, + requestParameters.keyword, + requestParameters.enabled, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Reset the configMap of plugin setting. + * @param {ApiConsoleHaloRunV1alpha1PluginApiResetPluginConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PluginApi + */ + public resetPluginConfig( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiResetPluginConfigRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PluginApiFp(this.configuration) + .resetPluginConfig(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update the configMap of plugin setting. + * @param {ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PluginApi + */ + public updatePluginConfig( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiUpdatePluginConfigRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PluginApiFp(this.configuration) + .updatePluginConfig(requestParameters.name, requestParameters.configMap, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Upgrade a plugin by uploading a Jar file + * @param {ApiConsoleHaloRunV1alpha1PluginApiUpgradePluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PluginApi + */ + public upgradePlugin( + requestParameters: ApiConsoleHaloRunV1alpha1PluginApiUpgradePluginRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PluginApiFp(this.configuration) + .upgradePlugin(requestParameters.name, requestParameters.file, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-post-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-post-api.ts new file mode 100644 index 000000000..5f346c3dc --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-post-api.ts @@ -0,0 +1,1221 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Content } from '../models' +// @ts-ignore +import { ContentWrapper } from '../models' +// @ts-ignore +import { ListedPostList } from '../models' +// @ts-ignore +import { Post } from '../models' +// @ts-ignore +import { PostRequest } from '../models' +/** + * ApiConsoleHaloRunV1alpha1PostApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1PostApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Draft a post. + * @param {PostRequest} postRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + draftPost: async (postRequest: PostRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'postRequest' is not null or undefined + assertParamExists('draftPost', 'postRequest', postRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(postRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch head content of post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPostHeadContent: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchPostHeadContent', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts/{name}/head-content`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch release content of post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPostReleaseContent: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchPostReleaseContent', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts/{name}/release-content`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List posts. + * @param {'PUBLISH_TIME' | 'CREATE_TIME'} [sort] Post collation. + * @param {string} [keyword] Posts filtered by keyword. + * @param {'PUBLIC' | 'INTERNAL' | 'PRIVATE'} [visible] + * @param {Array} [tag] + * @param {Array} [category] + * @param {boolean} [sortOrder] ascending order If it is true; otherwise, it is in descending order. + * @param {'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED'} [publishPhase] + * @param {Array} [contributor] + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPosts: async ( + sort?: 'PUBLISH_TIME' | 'CREATE_TIME', + keyword?: string, + visible?: 'PUBLIC' | 'INTERNAL' | 'PRIVATE', + tag?: Array, + category?: Array, + sortOrder?: boolean, + publishPhase?: 'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED', + contributor?: Array, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (visible !== undefined) { + localVarQueryParameter['visible'] = visible + } + + if (tag) { + localVarQueryParameter['tag'] = Array.from(tag) + } + + if (category) { + localVarQueryParameter['category'] = Array.from(category) + } + + if (sortOrder !== undefined) { + localVarQueryParameter['sortOrder'] = sortOrder + } + + if (publishPhase !== undefined) { + localVarQueryParameter['publishPhase'] = publishPhase + } + + if (contributor) { + localVarQueryParameter['contributor'] = Array.from(contributor) + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Publish a post. + * @param {string} name + * @param {string} [headSnapshot] Head snapshot name of content. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishPost: async ( + name: string, + headSnapshot?: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('publishPost', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts/{name}/publish`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (headSnapshot !== undefined) { + localVarQueryParameter['headSnapshot'] = headSnapshot + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Recycle a post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recyclePost: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('recyclePost', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts/{name}/recycle`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Publish a post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unpublishPost: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('unpublishPost', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts/{name}/unpublish`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update a post. + * @param {string} name + * @param {PostRequest} postRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateDraftPost: async ( + name: string, + postRequest: PostRequest, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updateDraftPost', 'name', name) + // verify required parameter 'postRequest' is not null or undefined + assertParamExists('updateDraftPost', 'postRequest', postRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(postRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update a post\'s content. + * @param {string} name + * @param {Content} content + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePostContent: async ( + name: string, + content: Content, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatePostContent', 'name', name) + // verify required parameter 'content' is not null or undefined + assertParamExists('updatePostContent', 'content', content) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/posts/{name}/content`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(content, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1PostApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1PostApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1PostApiAxiosParamCreator(configuration) + return { + /** + * Draft a post. + * @param {PostRequest} postRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async draftPost( + postRequest: PostRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.draftPost(postRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch head content of post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchPostHeadContent( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPostHeadContent(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch release content of post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchPostReleaseContent( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchPostReleaseContent(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List posts. + * @param {'PUBLISH_TIME' | 'CREATE_TIME'} [sort] Post collation. + * @param {string} [keyword] Posts filtered by keyword. + * @param {'PUBLIC' | 'INTERNAL' | 'PRIVATE'} [visible] + * @param {Array} [tag] + * @param {Array} [category] + * @param {boolean} [sortOrder] ascending order If it is true; otherwise, it is in descending order. + * @param {'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED'} [publishPhase] + * @param {Array} [contributor] + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listPosts( + sort?: 'PUBLISH_TIME' | 'CREATE_TIME', + keyword?: string, + visible?: 'PUBLIC' | 'INTERNAL' | 'PRIVATE', + tag?: Array, + category?: Array, + sortOrder?: boolean, + publishPhase?: 'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED', + contributor?: Array, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPosts( + sort, + keyword, + visible, + tag, + category, + sortOrder, + publishPhase, + contributor, + size, + page, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Publish a post. + * @param {string} name + * @param {string} [headSnapshot] Head snapshot name of content. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishPost( + name: string, + headSnapshot?: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishPost(name, headSnapshot, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Recycle a post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async recyclePost( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recyclePost(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Publish a post. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async unpublishPost( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.unpublishPost(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update a post. + * @param {string} name + * @param {PostRequest} postRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateDraftPost( + name: string, + postRequest: PostRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateDraftPost(name, postRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update a post\'s content. + * @param {string} name + * @param {Content} content + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePostContent( + name: string, + content: Content, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePostContent(name, content, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1PostApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1PostApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1PostApiFp(configuration) + return { + /** + * Draft a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiDraftPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + draftPost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiDraftPostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.draftPost(requestParameters.postRequest, options).then((request) => request(axios, basePath)) + }, + /** + * Fetch head content of post. + * @param {ApiConsoleHaloRunV1alpha1PostApiFetchPostHeadContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPostHeadContent( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiFetchPostHeadContentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fetchPostHeadContent(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Fetch release content of post. + * @param {ApiConsoleHaloRunV1alpha1PostApiFetchPostReleaseContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchPostReleaseContent( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiFetchPostReleaseContentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fetchPostReleaseContent(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List posts. + * @param {ApiConsoleHaloRunV1alpha1PostApiListPostsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPosts( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiListPostsRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listPosts( + requestParameters.sort, + requestParameters.keyword, + requestParameters.visible, + requestParameters.tag, + requestParameters.category, + requestParameters.sortOrder, + requestParameters.publishPhase, + requestParameters.contributor, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Publish a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiPublishPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishPost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiPublishPostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .publishPost(requestParameters.name, requestParameters.headSnapshot, options) + .then((request) => request(axios, basePath)) + }, + /** + * Recycle a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiRecyclePostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + recyclePost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiRecyclePostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.recyclePost(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Publish a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiUnpublishPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + unpublishPost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiUnpublishPostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.unpublishPost(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Update a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateDraftPost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateDraftPost(requestParameters.name, requestParameters.postRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Update a post\'s content. + * @param {ApiConsoleHaloRunV1alpha1PostApiUpdatePostContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePostContent( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiUpdatePostContentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatePostContent(requestParameters.name, requestParameters.content, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for draftPost operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiDraftPostRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiDraftPostRequest { + /** + * + * @type {PostRequest} + * @memberof ApiConsoleHaloRunV1alpha1PostApiDraftPost + */ + readonly postRequest: PostRequest +} + +/** + * Request parameters for fetchPostHeadContent operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiFetchPostHeadContentRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiFetchPostHeadContentRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiFetchPostHeadContent + */ + readonly name: string +} + +/** + * Request parameters for fetchPostReleaseContent operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiFetchPostReleaseContentRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiFetchPostReleaseContentRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiFetchPostReleaseContent + */ + readonly name: string +} + +/** + * Request parameters for listPosts operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiListPostsRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiListPostsRequest { + /** + * Post collation. + * @type {'PUBLISH_TIME' | 'CREATE_TIME'} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly sort?: 'PUBLISH_TIME' | 'CREATE_TIME' + + /** + * Posts filtered by keyword. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly keyword?: string + + /** + * + * @type {'PUBLIC' | 'INTERNAL' | 'PRIVATE'} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly visible?: 'PUBLIC' | 'INTERNAL' | 'PRIVATE' + + /** + * + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly tag?: Array + + /** + * + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly category?: Array + + /** + * ascending order If it is true; otherwise, it is in descending order. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly sortOrder?: boolean + + /** + * + * @type {'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED'} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly publishPhase?: 'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED' + + /** + * + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly contributor?: Array + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly page?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1PostApiListPosts + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for publishPost operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiPublishPostRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiPublishPostRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiPublishPost + */ + readonly name: string + + /** + * Head snapshot name of content. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiPublishPost + */ + readonly headSnapshot?: string +} + +/** + * Request parameters for recyclePost operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiRecyclePostRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiRecyclePostRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiRecyclePost + */ + readonly name: string +} + +/** + * Request parameters for unpublishPost operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiUnpublishPostRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiUnpublishPostRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiUnpublishPost + */ + readonly name: string +} + +/** + * Request parameters for updateDraftPost operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPostRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPostRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPost + */ + readonly name: string + + /** + * + * @type {PostRequest} + * @memberof ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPost + */ + readonly postRequest: PostRequest +} + +/** + * Request parameters for updatePostContent operation in ApiConsoleHaloRunV1alpha1PostApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1PostApiUpdatePostContentRequest + */ +export interface ApiConsoleHaloRunV1alpha1PostApiUpdatePostContentRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1PostApiUpdatePostContent + */ + readonly name: string + + /** + * + * @type {Content} + * @memberof ApiConsoleHaloRunV1alpha1PostApiUpdatePostContent + */ + readonly content: Content +} + +/** + * ApiConsoleHaloRunV1alpha1PostApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1PostApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1PostApi extends BaseAPI { + /** + * Draft a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiDraftPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public draftPost(requestParameters: ApiConsoleHaloRunV1alpha1PostApiDraftPostRequest, options?: AxiosRequestConfig) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .draftPost(requestParameters.postRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch head content of post. + * @param {ApiConsoleHaloRunV1alpha1PostApiFetchPostHeadContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public fetchPostHeadContent( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiFetchPostHeadContentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .fetchPostHeadContent(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch release content of post. + * @param {ApiConsoleHaloRunV1alpha1PostApiFetchPostReleaseContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public fetchPostReleaseContent( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiFetchPostReleaseContentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .fetchPostReleaseContent(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List posts. + * @param {ApiConsoleHaloRunV1alpha1PostApiListPostsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public listPosts( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiListPostsRequest = {}, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .listPosts( + requestParameters.sort, + requestParameters.keyword, + requestParameters.visible, + requestParameters.tag, + requestParameters.category, + requestParameters.sortOrder, + requestParameters.publishPhase, + requestParameters.contributor, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Publish a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiPublishPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public publishPost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiPublishPostRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .publishPost(requestParameters.name, requestParameters.headSnapshot, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Recycle a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiRecyclePostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public recyclePost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiRecyclePostRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .recyclePost(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Publish a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiUnpublishPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public unpublishPost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiUnpublishPostRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .unpublishPost(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update a post. + * @param {ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public updateDraftPost( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiUpdateDraftPostRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .updateDraftPost(requestParameters.name, requestParameters.postRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update a post\'s content. + * @param {ApiConsoleHaloRunV1alpha1PostApiUpdatePostContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1PostApi + */ + public updatePostContent( + requestParameters: ApiConsoleHaloRunV1alpha1PostApiUpdatePostContentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1PostApiFp(this.configuration) + .updatePostContent(requestParameters.name, requestParameters.content, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-reply-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-reply-api.ts new file mode 100644 index 000000000..e284af201 --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-reply-api.ts @@ -0,0 +1,256 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { ListedReplyList } from '../models' +/** + * ApiConsoleHaloRunV1alpha1ReplyApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1ReplyApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * List replies. + * @param {string} [commentName] Replies filtered by commentName. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listReplies: async ( + commentName?: string, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/replies` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (commentName !== undefined) { + localVarQueryParameter['commentName'] = commentName + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1ReplyApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1ReplyApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1ReplyApiAxiosParamCreator(configuration) + return { + /** + * List replies. + * @param {string} [commentName] Replies filtered by commentName. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listReplies( + commentName?: string, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listReplies( + commentName, + size, + page, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1ReplyApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1ReplyApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1ReplyApiFp(configuration) + return { + /** + * List replies. + * @param {ApiConsoleHaloRunV1alpha1ReplyApiListRepliesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listReplies( + requestParameters: ApiConsoleHaloRunV1alpha1ReplyApiListRepliesRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listReplies( + requestParameters.commentName, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for listReplies operation in ApiConsoleHaloRunV1alpha1ReplyApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ReplyApiListRepliesRequest + */ +export interface ApiConsoleHaloRunV1alpha1ReplyApiListRepliesRequest { + /** + * Replies filtered by commentName. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ReplyApiListReplies + */ + readonly commentName?: string + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1ReplyApiListReplies + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1ReplyApiListReplies + */ + readonly page?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1ReplyApiListReplies + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1ReplyApiListReplies + */ + readonly fieldSelector?: Array +} + +/** + * ApiConsoleHaloRunV1alpha1ReplyApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1ReplyApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1ReplyApi extends BaseAPI { + /** + * List replies. + * @param {ApiConsoleHaloRunV1alpha1ReplyApiListRepliesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ReplyApi + */ + public listReplies( + requestParameters: ApiConsoleHaloRunV1alpha1ReplyApiListRepliesRequest = {}, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ReplyApiFp(this.configuration) + .listReplies( + requestParameters.commentName, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-single-page-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-single-page-api.ts new file mode 100644 index 000000000..1ce7fe52d --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-single-page-api.ts @@ -0,0 +1,983 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Content } from '../models' +// @ts-ignore +import { ContentWrapper } from '../models' +// @ts-ignore +import { ListedSinglePageList } from '../models' +// @ts-ignore +import { Post } from '../models' +// @ts-ignore +import { SinglePage } from '../models' +// @ts-ignore +import { SinglePageRequest } from '../models' +/** + * ApiConsoleHaloRunV1alpha1SinglePageApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1SinglePageApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Draft a single page. + * @param {SinglePageRequest} singlePageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + draftSinglePage: async ( + singlePageRequest: SinglePageRequest, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'singlePageRequest' is not null or undefined + assertParamExists('draftSinglePage', 'singlePageRequest', singlePageRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(singlePageRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch head content of single page. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchSinglePageHeadContent: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchSinglePageHeadContent', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/head-content`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch release content of single page. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchSinglePageReleaseContent: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchSinglePageReleaseContent', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/release-content`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List single pages. + * @param {'PUBLISH_TIME' | 'CREATE_TIME'} [sort] SinglePage collation. + * @param {string} [keyword] SinglePages filtered by keyword. + * @param {'PUBLIC' | 'INTERNAL' | 'PRIVATE'} [visible] + * @param {boolean} [sortOrder] ascending order If it is true; otherwise, it is in descending order. + * @param {'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED'} [publishPhase] + * @param {Array} [contributor] + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSinglePages: async ( + sort?: 'PUBLISH_TIME' | 'CREATE_TIME', + keyword?: string, + visible?: 'PUBLIC' | 'INTERNAL' | 'PRIVATE', + sortOrder?: boolean, + publishPhase?: 'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED', + contributor?: Array, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort + } + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (visible !== undefined) { + localVarQueryParameter['visible'] = visible + } + + if (sortOrder !== undefined) { + localVarQueryParameter['sortOrder'] = sortOrder + } + + if (publishPhase !== undefined) { + localVarQueryParameter['publishPhase'] = publishPhase + } + + if (contributor) { + localVarQueryParameter['contributor'] = Array.from(contributor) + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Publish a single page. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishSinglePage: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('publishSinglePage', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/publish`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update a single page. + * @param {string} name + * @param {SinglePageRequest} singlePageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateDraftSinglePage: async ( + name: string, + singlePageRequest: SinglePageRequest, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updateDraftSinglePage', 'name', name) + // verify required parameter 'singlePageRequest' is not null or undefined + assertParamExists('updateDraftSinglePage', 'singlePageRequest', singlePageRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(singlePageRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update a single page\'s content. + * @param {string} name + * @param {Content} content + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateSinglePageContent: async ( + name: string, + content: Content, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updateSinglePageContent', 'name', name) + // verify required parameter 'content' is not null or undefined + assertParamExists('updateSinglePageContent', 'content', content) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/singlepages/{name}/content`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(content, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1SinglePageApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1SinglePageApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1SinglePageApiAxiosParamCreator(configuration) + return { + /** + * Draft a single page. + * @param {SinglePageRequest} singlePageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async draftSinglePage( + singlePageRequest: SinglePageRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.draftSinglePage(singlePageRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch head content of single page. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchSinglePageHeadContent( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSinglePageHeadContent(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch release content of single page. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchSinglePageReleaseContent( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchSinglePageReleaseContent(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List single pages. + * @param {'PUBLISH_TIME' | 'CREATE_TIME'} [sort] SinglePage collation. + * @param {string} [keyword] SinglePages filtered by keyword. + * @param {'PUBLIC' | 'INTERNAL' | 'PRIVATE'} [visible] + * @param {boolean} [sortOrder] ascending order If it is true; otherwise, it is in descending order. + * @param {'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED'} [publishPhase] + * @param {Array} [contributor] + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listSinglePages( + sort?: 'PUBLISH_TIME' | 'CREATE_TIME', + keyword?: string, + visible?: 'PUBLIC' | 'INTERNAL' | 'PRIVATE', + sortOrder?: boolean, + publishPhase?: 'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED', + contributor?: Array, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSinglePages( + sort, + keyword, + visible, + sortOrder, + publishPhase, + contributor, + size, + page, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Publish a single page. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async publishSinglePage( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.publishSinglePage(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update a single page. + * @param {string} name + * @param {SinglePageRequest} singlePageRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateDraftSinglePage( + name: string, + singlePageRequest: SinglePageRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateDraftSinglePage(name, singlePageRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update a single page\'s content. + * @param {string} name + * @param {Content} content + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateSinglePageContent( + name: string, + content: Content, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSinglePageContent(name, content, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1SinglePageApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1SinglePageApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1SinglePageApiFp(configuration) + return { + /** + * Draft a single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + draftSinglePage( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .draftSinglePage(requestParameters.singlePageRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Fetch head content of single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchSinglePageHeadContent( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fetchSinglePageHeadContent(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Fetch release content of single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchSinglePageReleaseContent( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fetchSinglePageReleaseContent(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List single pages. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSinglePages( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listSinglePages( + requestParameters.sort, + requestParameters.keyword, + requestParameters.visible, + requestParameters.sortOrder, + requestParameters.publishPhase, + requestParameters.contributor, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Publish a single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + publishSinglePage( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.publishSinglePage(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Update a single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateDraftSinglePage( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateDraftSinglePage(requestParameters.name, requestParameters.singlePageRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Update a single page\'s content. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateSinglePageContent( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateSinglePageContent(requestParameters.name, requestParameters.content, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for draftSinglePage operation in ApiConsoleHaloRunV1alpha1SinglePageApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest + */ +export interface ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest { + /** + * + * @type {SinglePageRequest} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePage + */ + readonly singlePageRequest: SinglePageRequest +} + +/** + * Request parameters for fetchSinglePageHeadContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest + */ +export interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContent + */ + readonly name: string +} + +/** + * Request parameters for fetchSinglePageReleaseContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest + */ +export interface ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContent + */ + readonly name: string +} + +/** + * Request parameters for listSinglePages operation in ApiConsoleHaloRunV1alpha1SinglePageApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest + */ +export interface ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest { + /** + * SinglePage collation. + * @type {'PUBLISH_TIME' | 'CREATE_TIME'} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly sort?: 'PUBLISH_TIME' | 'CREATE_TIME' + + /** + * SinglePages filtered by keyword. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly keyword?: string + + /** + * + * @type {'PUBLIC' | 'INTERNAL' | 'PRIVATE'} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly visible?: 'PUBLIC' | 'INTERNAL' | 'PRIVATE' + + /** + * ascending order If it is true; otherwise, it is in descending order. + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly sortOrder?: boolean + + /** + * + * @type {'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED'} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly publishPhase?: 'DRAFT' | 'PENDING_APPROVAL' | 'PUBLISHED' | 'FAILED' + + /** + * + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly contributor?: Array + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly page?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePages + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for publishSinglePage operation in ApiConsoleHaloRunV1alpha1SinglePageApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest + */ +export interface ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePage + */ + readonly name: string +} + +/** + * Request parameters for updateDraftSinglePage operation in ApiConsoleHaloRunV1alpha1SinglePageApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest + */ +export interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePage + */ + readonly name: string + + /** + * + * @type {SinglePageRequest} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePage + */ + readonly singlePageRequest: SinglePageRequest +} + +/** + * Request parameters for updateSinglePageContent operation in ApiConsoleHaloRunV1alpha1SinglePageApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest + */ +export interface ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContent + */ + readonly name: string + + /** + * + * @type {Content} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContent + */ + readonly content: Content +} + +/** + * ApiConsoleHaloRunV1alpha1SinglePageApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1SinglePageApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1SinglePageApi extends BaseAPI { + /** + * Draft a single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApi + */ + public draftSinglePage( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiDraftSinglePageRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration) + .draftSinglePage(requestParameters.singlePageRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch head content of single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApi + */ + public fetchSinglePageHeadContent( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageHeadContentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration) + .fetchSinglePageHeadContent(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch release content of single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApi + */ + public fetchSinglePageReleaseContent( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiFetchSinglePageReleaseContentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration) + .fetchSinglePageReleaseContent(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List single pages. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApi + */ + public listSinglePages( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiListSinglePagesRequest = {}, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration) + .listSinglePages( + requestParameters.sort, + requestParameters.keyword, + requestParameters.visible, + requestParameters.sortOrder, + requestParameters.publishPhase, + requestParameters.contributor, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Publish a single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApi + */ + public publishSinglePage( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiPublishSinglePageRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration) + .publishSinglePage(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update a single page. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApi + */ + public updateDraftSinglePage( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateDraftSinglePageRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration) + .updateDraftSinglePage(requestParameters.name, requestParameters.singlePageRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update a single page\'s content. + * @param {ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1SinglePageApi + */ + public updateSinglePageContent( + requestParameters: ApiConsoleHaloRunV1alpha1SinglePageApiUpdateSinglePageContentRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1SinglePageApiFp(this.configuration) + .updateSinglePageContent(requestParameters.name, requestParameters.content, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-stats-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-stats-api.ts new file mode 100644 index 000000000..5072cff1f --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-stats-api.ts @@ -0,0 +1,141 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { DashboardStats } from '../models' +/** + * ApiConsoleHaloRunV1alpha1StatsApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1StatsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get stats. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStats: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/stats` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1StatsApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1StatsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1StatsApiAxiosParamCreator(configuration) + return { + /** + * Get stats. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStats( + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStats(options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1StatsApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1StatsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1StatsApiFp(configuration) + return { + /** + * Get stats. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStats(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getStats(options).then((request) => request(axios, basePath)) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1StatsApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1StatsApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1StatsApi extends BaseAPI { + /** + * Get stats. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1StatsApi + */ + public getStats(options?: AxiosRequestConfig) { + return ApiConsoleHaloRunV1alpha1StatsApiFp(this.configuration) + .getStats(options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-theme-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-theme-api.ts new file mode 100644 index 000000000..4ba780afa --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-theme-api.ts @@ -0,0 +1,1143 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { ConfigMap } from '../models' +// @ts-ignore +import { Setting } from '../models' +// @ts-ignore +import { Theme } from '../models' +// @ts-ignore +import { ThemeList } from '../models' +/** + * ApiConsoleHaloRunV1alpha1ThemeApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1ThemeApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Activate a theme by name. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activateTheme: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('activateTheme', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/{name}/activation`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch the activated theme. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchActivatedTheme: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/-/activation` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch configMap of theme by configured configMapName. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchThemeConfig: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchThemeConfig', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/{name}/config`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Fetch setting of theme. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchThemeSetting: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('fetchThemeSetting', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/{name}/setting`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Install a theme by uploading a zip file. + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + installTheme: async (file: File, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'file' is not null or undefined + assertParamExists('installTheme', 'file', file) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/install` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (file !== undefined) { + localVarFormParams.append('file', file as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List themes. + * @param {boolean} uninstalled + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listThemes: async ( + uninstalled: boolean, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'uninstalled' is not null or undefined + assertParamExists('listThemes', 'uninstalled', uninstalled) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (uninstalled !== undefined) { + localVarQueryParameter['uninstalled'] = uninstalled + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Reload theme setting. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reload: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('reload', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/{name}/reload`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Reset the configMap of theme setting. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resetThemeConfig: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('resetThemeConfig', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/{name}/reset-config`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update the configMap of theme setting. + * @param {string} name + * @param {ConfigMap} configMap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateThemeConfig: async ( + name: string, + configMap: ConfigMap, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updateThemeConfig', 'name', name) + // verify required parameter 'configMap' is not null or undefined + assertParamExists('updateThemeConfig', 'configMap', configMap) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/{name}/config`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(configMap, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Upgrade theme + * @param {string} name + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upgradeTheme: async (name: string, file: File, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('upgradeTheme', 'name', name) + // verify required parameter 'file' is not null or undefined + assertParamExists('upgradeTheme', 'file', file) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/{name}/upgrade`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)() + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (file !== undefined) { + localVarFormParams.append('file', file as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = localVarFormParams + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1ThemeApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1ThemeApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1ThemeApiAxiosParamCreator(configuration) + return { + /** + * Activate a theme by name. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async activateTheme( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.activateTheme(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch the activated theme. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchActivatedTheme( + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchActivatedTheme(options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch configMap of theme by configured configMapName. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchThemeConfig( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchThemeConfig(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Fetch setting of theme. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async fetchThemeSetting( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.fetchThemeSetting(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Install a theme by uploading a zip file. + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async installTheme( + file: File, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.installTheme(file, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List themes. + * @param {boolean} uninstalled + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listThemes( + uninstalled: boolean, + size?: number, + page?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listThemes( + uninstalled, + size, + page, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Reload theme setting. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reload( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.reload(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Reset the configMap of theme setting. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async resetThemeConfig( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resetThemeConfig(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update the configMap of theme setting. + * @param {string} name + * @param {ConfigMap} configMap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateThemeConfig( + name: string, + configMap: ConfigMap, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateThemeConfig(name, configMap, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Upgrade theme + * @param {string} name + * @param {File} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async upgradeTheme( + name: string, + file: File, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.upgradeTheme(name, file, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1ThemeApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1ThemeApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1ThemeApiFp(configuration) + return { + /** + * Activate a theme by name. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activateTheme( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.activateTheme(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Fetch the activated theme. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchActivatedTheme(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.fetchActivatedTheme(options).then((request) => request(axios, basePath)) + }, + /** + * Fetch configMap of theme by configured configMapName. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchThemeConfig( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.fetchThemeConfig(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Fetch setting of theme. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fetchThemeSetting( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.fetchThemeSetting(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Install a theme by uploading a zip file. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + installTheme( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.installTheme(requestParameters.file, options).then((request) => request(axios, basePath)) + }, + /** + * List themes. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listThemes( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listThemes( + requestParameters.uninstalled, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Reload theme setting. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reload( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.reload(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Reset the configMap of theme setting. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + resetThemeConfig( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.resetThemeConfig(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Update the configMap of theme setting. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateThemeConfig( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateThemeConfig(requestParameters.name, requestParameters.configMap, options) + .then((request) => request(axios, basePath)) + }, + /** + * Upgrade theme + * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upgradeTheme( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .upgradeTheme(requestParameters.name, requestParameters.file, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for activateTheme operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiActivateTheme + */ + readonly name: string +} + +/** + * Request parameters for fetchThemeConfig operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfig + */ + readonly name: string +} + +/** + * Request parameters for fetchThemeSetting operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSetting + */ + readonly name: string +} + +/** + * Request parameters for installTheme operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeRequest { + /** + * + * @type {File} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiInstallTheme + */ + readonly file: File +} + +/** + * Request parameters for listThemes operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest { + /** + * + * @type {boolean} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiListThemes + */ + readonly uninstalled: boolean + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiListThemes + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiListThemes + */ + readonly page?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiListThemes + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiListThemes + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for reload operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiReload + */ + readonly name: string +} + +/** + * Request parameters for resetThemeConfig operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfig + */ + readonly name: string +} + +/** + * Request parameters for updateThemeConfig operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfig + */ + readonly name: string + + /** + * + * @type {ConfigMap} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfig + */ + readonly configMap: ConfigMap +} + +/** + * Request parameters for upgradeTheme operation in ApiConsoleHaloRunV1alpha1ThemeApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest + */ +export interface ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest { + /** + * + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpgradeTheme + */ + readonly name: string + + /** + * + * @type {File} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpgradeTheme + */ + readonly file: File +} + +/** + * ApiConsoleHaloRunV1alpha1ThemeApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1ThemeApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1ThemeApi extends BaseAPI { + /** + * Activate a theme by name. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public activateTheme( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .activateTheme(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch the activated theme. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public fetchActivatedTheme(options?: AxiosRequestConfig) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .fetchActivatedTheme(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch configMap of theme by configured configMapName. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public fetchThemeConfig( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .fetchThemeConfig(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Fetch setting of theme. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public fetchThemeSetting( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .fetchThemeSetting(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Install a theme by uploading a zip file. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public installTheme( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .installTheme(requestParameters.file, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List themes. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public listThemes( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .listThemes( + requestParameters.uninstalled, + requestParameters.size, + requestParameters.page, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Reload theme setting. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public reload(requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest, options?: AxiosRequestConfig) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .reload(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Reset the configMap of theme setting. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public resetThemeConfig( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .resetThemeConfig(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update the configMap of theme setting. + * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public updateThemeConfig( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .updateThemeConfig(requestParameters.name, requestParameters.configMap, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Upgrade theme + * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1ThemeApi + */ + public upgradeTheme( + requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration) + .upgradeTheme(requestParameters.name, requestParameters.file, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-console-halo-run-v1alpha1-user-api.ts b/packages/api-client/src/api/api-console-halo-run-v1alpha1-user-api.ts new file mode 100644 index 000000000..83b848e3f --- /dev/null +++ b/packages/api-client/src/api/api-console-halo-run-v1alpha1-user-api.ts @@ -0,0 +1,573 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { ChangePasswordRequest } from '../models' +// @ts-ignore +import { GrantRequest } from '../models' +// @ts-ignore +import { User } from '../models' +// @ts-ignore +import { UserPermission } from '../models' +/** + * ApiConsoleHaloRunV1alpha1UserApi - axios parameter creator + * @export + */ +export const ApiConsoleHaloRunV1alpha1UserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Change password of user. + * @param {string} name Name of user. If the name is equal to \'-\', it will change the password of current user. + * @param {ChangePasswordRequest} changePasswordRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + changePassword: async ( + name: string, + changePasswordRequest: ChangePasswordRequest, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('changePassword', 'name', name) + // verify required parameter 'changePasswordRequest' is not null or undefined + assertParamExists('changePassword', 'changePasswordRequest', changePasswordRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/users/{name}/password`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(changePasswordRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get current user detail + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCurrentUserDetail: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/apis/api.console.halo.run/v1alpha1/users/-` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get permissions of user + * @param {string} name User name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPermissions: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getPermissions', 'name', name) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/users/{name}/permissions`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Grant permissions to user + * @param {string} name User name + * @param {GrantRequest} grantRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + grantPermission: async ( + name: string, + grantRequest: GrantRequest, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('grantPermission', 'name', name) + // verify required parameter 'grantRequest' is not null or undefined + assertParamExists('grantPermission', 'grantRequest', grantRequest) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/users/{name}/permissions`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(grantRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update current user profile, but password. + * @param {User} user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateCurrentUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'user' is not null or undefined + assertParamExists('updateCurrentUser', 'user', user) + const localVarPath = `/apis/api.console.halo.run/v1alpha1/users/-` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1UserApi - functional programming interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1UserApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiConsoleHaloRunV1alpha1UserApiAxiosParamCreator(configuration) + return { + /** + * Change password of user. + * @param {string} name Name of user. If the name is equal to \'-\', it will change the password of current user. + * @param {ChangePasswordRequest} changePasswordRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async changePassword( + name: string, + changePasswordRequest: ChangePasswordRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.changePassword(name, changePasswordRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get current user detail + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCurrentUserDetail( + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUserDetail(options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get permissions of user + * @param {string} name User name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPermissions( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPermissions(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Grant permissions to user + * @param {string} name User name + * @param {GrantRequest} grantRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async grantPermission( + name: string, + grantRequest: GrantRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.grantPermission(name, grantRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update current user profile, but password. + * @param {User} user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateCurrentUser( + user: User, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateCurrentUser(user, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiConsoleHaloRunV1alpha1UserApi - factory interface + * @export + */ +export const ApiConsoleHaloRunV1alpha1UserApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiConsoleHaloRunV1alpha1UserApiFp(configuration) + return { + /** + * Change password of user. + * @param {ApiConsoleHaloRunV1alpha1UserApiChangePasswordRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + changePassword( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiChangePasswordRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .changePassword(requestParameters.name, requestParameters.changePasswordRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get current user detail + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCurrentUserDetail(options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.getCurrentUserDetail(options).then((request) => request(axios, basePath)) + }, + /** + * Get permissions of user + * @param {ApiConsoleHaloRunV1alpha1UserApiGetPermissionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPermissions( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiGetPermissionsRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.getPermissions(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Grant permissions to user + * @param {ApiConsoleHaloRunV1alpha1UserApiGrantPermissionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + grantPermission( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiGrantPermissionRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .grantPermission(requestParameters.name, requestParameters.grantRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Update current user profile, but password. + * @param {ApiConsoleHaloRunV1alpha1UserApiUpdateCurrentUserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateCurrentUser( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiUpdateCurrentUserRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.updateCurrentUser(requestParameters.user, options).then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for changePassword operation in ApiConsoleHaloRunV1alpha1UserApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1UserApiChangePasswordRequest + */ +export interface ApiConsoleHaloRunV1alpha1UserApiChangePasswordRequest { + /** + * Name of user. If the name is equal to \'-\', it will change the password of current user. + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1UserApiChangePassword + */ + readonly name: string + + /** + * + * @type {ChangePasswordRequest} + * @memberof ApiConsoleHaloRunV1alpha1UserApiChangePassword + */ + readonly changePasswordRequest: ChangePasswordRequest +} + +/** + * Request parameters for getPermissions operation in ApiConsoleHaloRunV1alpha1UserApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1UserApiGetPermissionsRequest + */ +export interface ApiConsoleHaloRunV1alpha1UserApiGetPermissionsRequest { + /** + * User name + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1UserApiGetPermissions + */ + readonly name: string +} + +/** + * Request parameters for grantPermission operation in ApiConsoleHaloRunV1alpha1UserApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1UserApiGrantPermissionRequest + */ +export interface ApiConsoleHaloRunV1alpha1UserApiGrantPermissionRequest { + /** + * User name + * @type {string} + * @memberof ApiConsoleHaloRunV1alpha1UserApiGrantPermission + */ + readonly name: string + + /** + * + * @type {GrantRequest} + * @memberof ApiConsoleHaloRunV1alpha1UserApiGrantPermission + */ + readonly grantRequest: GrantRequest +} + +/** + * Request parameters for updateCurrentUser operation in ApiConsoleHaloRunV1alpha1UserApi. + * @export + * @interface ApiConsoleHaloRunV1alpha1UserApiUpdateCurrentUserRequest + */ +export interface ApiConsoleHaloRunV1alpha1UserApiUpdateCurrentUserRequest { + /** + * + * @type {User} + * @memberof ApiConsoleHaloRunV1alpha1UserApiUpdateCurrentUser + */ + readonly user: User +} + +/** + * ApiConsoleHaloRunV1alpha1UserApi - object-oriented interface + * @export + * @class ApiConsoleHaloRunV1alpha1UserApi + * @extends {BaseAPI} + */ +export class ApiConsoleHaloRunV1alpha1UserApi extends BaseAPI { + /** + * Change password of user. + * @param {ApiConsoleHaloRunV1alpha1UserApiChangePasswordRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1UserApi + */ + public changePassword( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiChangePasswordRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1UserApiFp(this.configuration) + .changePassword(requestParameters.name, requestParameters.changePasswordRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get current user detail + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1UserApi + */ + public getCurrentUserDetail(options?: AxiosRequestConfig) { + return ApiConsoleHaloRunV1alpha1UserApiFp(this.configuration) + .getCurrentUserDetail(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get permissions of user + * @param {ApiConsoleHaloRunV1alpha1UserApiGetPermissionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1UserApi + */ + public getPermissions( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiGetPermissionsRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1UserApiFp(this.configuration) + .getPermissions(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Grant permissions to user + * @param {ApiConsoleHaloRunV1alpha1UserApiGrantPermissionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1UserApi + */ + public grantPermission( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiGrantPermissionRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1UserApiFp(this.configuration) + .grantPermission(requestParameters.name, requestParameters.grantRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update current user profile, but password. + * @param {ApiConsoleHaloRunV1alpha1UserApiUpdateCurrentUserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiConsoleHaloRunV1alpha1UserApi + */ + public updateCurrentUser( + requestParameters: ApiConsoleHaloRunV1alpha1UserApiUpdateCurrentUserRequest, + options?: AxiosRequestConfig, + ) { + return ApiConsoleHaloRunV1alpha1UserApiFp(this.configuration) + .updateCurrentUser(requestParameters.user, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-halo-run-v1alpha1-comment-api.ts b/packages/api-client/src/api/api-halo-run-v1alpha1-comment-api.ts new file mode 100644 index 000000000..dbbb55a67 --- /dev/null +++ b/packages/api-client/src/api/api-halo-run-v1alpha1-comment-api.ts @@ -0,0 +1,729 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Comment } from '../models' +// @ts-ignore +import { CommentRequest } from '../models' +// @ts-ignore +import { CommentVoList } from '../models' +// @ts-ignore +import { Reply } from '../models' +// @ts-ignore +import { ReplyRequest } from '../models' +// @ts-ignore +import { ReplyVoList } from '../models' +/** + * ApiHaloRunV1alpha1CommentApi - axios parameter creator + * @export + */ +export const ApiHaloRunV1alpha1CommentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a comment. + * @param {CommentRequest} commentRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createComment1: async (commentRequest: CommentRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'commentRequest' is not null or undefined + assertParamExists('createComment1', 'commentRequest', commentRequest) + const localVarPath = `/apis/api.halo.run/v1alpha1/comments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(commentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Create a reply. + * @param {string} name + * @param {ReplyRequest} replyRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReply1: async ( + name: string, + replyRequest: ReplyRequest, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('createReply1', 'name', name) + // verify required parameter 'replyRequest' is not null or undefined + assertParamExists('createReply1', 'replyRequest', replyRequest) + const localVarPath = `/apis/api.halo.run/v1alpha1/comments/{name}/reply`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(replyRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get a comment. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getComment: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getComment', 'name', name) + const localVarPath = `/apis/api.halo.run/v1alpha1/comments/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List comment replies. + * @param {string} name + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCommentReplies: async ( + name: string, + size?: number, + page?: number, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('listCommentReplies', 'name', name) + const localVarPath = `/apis/api.halo.run/v1alpha1/comments/{name}/reply`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List comments. + * @param {string} name The comment subject name. + * @param {string} version The comment subject version. + * @param {string} kind The comment subject kind. + * @param {string} [group] The comment subject group. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listComments1: async ( + name: string, + version: string, + kind: string, + group?: string, + size?: number, + page?: number, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('listComments1', 'name', name) + // verify required parameter 'version' is not null or undefined + assertParamExists('listComments1', 'version', version) + // verify required parameter 'kind' is not null or undefined + assertParamExists('listComments1', 'kind', kind) + const localVarPath = `/apis/api.halo.run/v1alpha1/comments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (name !== undefined) { + localVarQueryParameter['name'] = name + } + + if (version !== undefined) { + localVarQueryParameter['version'] = version + } + + if (group !== undefined) { + localVarQueryParameter['group'] = group + } + + if (kind !== undefined) { + localVarQueryParameter['kind'] = kind + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiHaloRunV1alpha1CommentApi - functional programming interface + * @export + */ +export const ApiHaloRunV1alpha1CommentApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiHaloRunV1alpha1CommentApiAxiosParamCreator(configuration) + return { + /** + * Create a comment. + * @param {CommentRequest} commentRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createComment1( + commentRequest: CommentRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createComment1(commentRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Create a reply. + * @param {string} name + * @param {ReplyRequest} replyRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createReply1( + name: string, + replyRequest: ReplyRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createReply1(name, replyRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get a comment. + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getComment( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getComment(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List comment replies. + * @param {string} name + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCommentReplies( + name: string, + size?: number, + page?: number, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCommentReplies(name, size, page, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List comments. + * @param {string} name The comment subject name. + * @param {string} version The comment subject version. + * @param {string} kind The comment subject kind. + * @param {string} [group] The comment subject group. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {number} [page] The page number. Zero indicates no page. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listComments1( + name: string, + version: string, + kind: string, + group?: string, + size?: number, + page?: number, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listComments1( + name, + version, + kind, + group, + size, + page, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiHaloRunV1alpha1CommentApi - factory interface + * @export + */ +export const ApiHaloRunV1alpha1CommentApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiHaloRunV1alpha1CommentApiFp(configuration) + return { + /** + * Create a comment. + * @param {ApiHaloRunV1alpha1CommentApiCreateComment1Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createComment1( + requestParameters: ApiHaloRunV1alpha1CommentApiCreateComment1Request, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createComment1(requestParameters.commentRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Create a reply. + * @param {ApiHaloRunV1alpha1CommentApiCreateReply1Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createReply1( + requestParameters: ApiHaloRunV1alpha1CommentApiCreateReply1Request, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createReply1(requestParameters.name, requestParameters.replyRequest, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get a comment. + * @param {ApiHaloRunV1alpha1CommentApiGetCommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getComment( + requestParameters: ApiHaloRunV1alpha1CommentApiGetCommentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.getComment(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * List comment replies. + * @param {ApiHaloRunV1alpha1CommentApiListCommentRepliesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCommentReplies( + requestParameters: ApiHaloRunV1alpha1CommentApiListCommentRepliesRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listCommentReplies(requestParameters.name, requestParameters.size, requestParameters.page, options) + .then((request) => request(axios, basePath)) + }, + /** + * List comments. + * @param {ApiHaloRunV1alpha1CommentApiListComments1Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listComments1( + requestParameters: ApiHaloRunV1alpha1CommentApiListComments1Request, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listComments1( + requestParameters.name, + requestParameters.version, + requestParameters.kind, + requestParameters.group, + requestParameters.size, + requestParameters.page, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createComment1 operation in ApiHaloRunV1alpha1CommentApi. + * @export + * @interface ApiHaloRunV1alpha1CommentApiCreateComment1Request + */ +export interface ApiHaloRunV1alpha1CommentApiCreateComment1Request { + /** + * + * @type {CommentRequest} + * @memberof ApiHaloRunV1alpha1CommentApiCreateComment1 + */ + readonly commentRequest: CommentRequest +} + +/** + * Request parameters for createReply1 operation in ApiHaloRunV1alpha1CommentApi. + * @export + * @interface ApiHaloRunV1alpha1CommentApiCreateReply1Request + */ +export interface ApiHaloRunV1alpha1CommentApiCreateReply1Request { + /** + * + * @type {string} + * @memberof ApiHaloRunV1alpha1CommentApiCreateReply1 + */ + readonly name: string + + /** + * + * @type {ReplyRequest} + * @memberof ApiHaloRunV1alpha1CommentApiCreateReply1 + */ + readonly replyRequest: ReplyRequest +} + +/** + * Request parameters for getComment operation in ApiHaloRunV1alpha1CommentApi. + * @export + * @interface ApiHaloRunV1alpha1CommentApiGetCommentRequest + */ +export interface ApiHaloRunV1alpha1CommentApiGetCommentRequest { + /** + * + * @type {string} + * @memberof ApiHaloRunV1alpha1CommentApiGetComment + */ + readonly name: string +} + +/** + * Request parameters for listCommentReplies operation in ApiHaloRunV1alpha1CommentApi. + * @export + * @interface ApiHaloRunV1alpha1CommentApiListCommentRepliesRequest + */ +export interface ApiHaloRunV1alpha1CommentApiListCommentRepliesRequest { + /** + * + * @type {string} + * @memberof ApiHaloRunV1alpha1CommentApiListCommentReplies + */ + readonly name: string + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiHaloRunV1alpha1CommentApiListCommentReplies + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiHaloRunV1alpha1CommentApiListCommentReplies + */ + readonly page?: number +} + +/** + * Request parameters for listComments1 operation in ApiHaloRunV1alpha1CommentApi. + * @export + * @interface ApiHaloRunV1alpha1CommentApiListComments1Request + */ +export interface ApiHaloRunV1alpha1CommentApiListComments1Request { + /** + * The comment subject name. + * @type {string} + * @memberof ApiHaloRunV1alpha1CommentApiListComments1 + */ + readonly name: string + + /** + * The comment subject version. + * @type {string} + * @memberof ApiHaloRunV1alpha1CommentApiListComments1 + */ + readonly version: string + + /** + * The comment subject kind. + * @type {string} + * @memberof ApiHaloRunV1alpha1CommentApiListComments1 + */ + readonly kind: string + + /** + * The comment subject group. + * @type {string} + * @memberof ApiHaloRunV1alpha1CommentApiListComments1 + */ + readonly group?: string + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ApiHaloRunV1alpha1CommentApiListComments1 + */ + readonly size?: number + + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ApiHaloRunV1alpha1CommentApiListComments1 + */ + readonly page?: number +} + +/** + * ApiHaloRunV1alpha1CommentApi - object-oriented interface + * @export + * @class ApiHaloRunV1alpha1CommentApi + * @extends {BaseAPI} + */ +export class ApiHaloRunV1alpha1CommentApi extends BaseAPI { + /** + * Create a comment. + * @param {ApiHaloRunV1alpha1CommentApiCreateComment1Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1CommentApi + */ + public createComment1( + requestParameters: ApiHaloRunV1alpha1CommentApiCreateComment1Request, + options?: AxiosRequestConfig, + ) { + return ApiHaloRunV1alpha1CommentApiFp(this.configuration) + .createComment1(requestParameters.commentRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Create a reply. + * @param {ApiHaloRunV1alpha1CommentApiCreateReply1Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1CommentApi + */ + public createReply1( + requestParameters: ApiHaloRunV1alpha1CommentApiCreateReply1Request, + options?: AxiosRequestConfig, + ) { + return ApiHaloRunV1alpha1CommentApiFp(this.configuration) + .createReply1(requestParameters.name, requestParameters.replyRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a comment. + * @param {ApiHaloRunV1alpha1CommentApiGetCommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1CommentApi + */ + public getComment(requestParameters: ApiHaloRunV1alpha1CommentApiGetCommentRequest, options?: AxiosRequestConfig) { + return ApiHaloRunV1alpha1CommentApiFp(this.configuration) + .getComment(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List comment replies. + * @param {ApiHaloRunV1alpha1CommentApiListCommentRepliesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1CommentApi + */ + public listCommentReplies( + requestParameters: ApiHaloRunV1alpha1CommentApiListCommentRepliesRequest, + options?: AxiosRequestConfig, + ) { + return ApiHaloRunV1alpha1CommentApiFp(this.configuration) + .listCommentReplies(requestParameters.name, requestParameters.size, requestParameters.page, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List comments. + * @param {ApiHaloRunV1alpha1CommentApiListComments1Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1CommentApi + */ + public listComments1( + requestParameters: ApiHaloRunV1alpha1CommentApiListComments1Request, + options?: AxiosRequestConfig, + ) { + return ApiHaloRunV1alpha1CommentApiFp(this.configuration) + .listComments1( + requestParameters.name, + requestParameters.version, + requestParameters.kind, + requestParameters.group, + requestParameters.size, + requestParameters.page, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-halo-run-v1alpha1-post-api.ts b/packages/api-client/src/api/api-halo-run-v1alpha1-post-api.ts new file mode 100644 index 000000000..404593d16 --- /dev/null +++ b/packages/api-client/src/api/api-halo-run-v1alpha1-post-api.ts @@ -0,0 +1,237 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { PostHits } from '../models' +/** + * ApiHaloRunV1alpha1PostApi - axios parameter creator + * @export + */ +export const ApiHaloRunV1alpha1PostApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Search posts with fuzzy query + * @param {string} keyword + * @param {number} [limit] + * @param {string} [highlightPreTag] + * @param {string} [highlightPostTag] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchPost: async ( + keyword: string, + limit?: number, + highlightPreTag?: string, + highlightPostTag?: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'keyword' is not null or undefined + assertParamExists('searchPost', 'keyword', keyword) + const localVarPath = `/apis/api.halo.run/v1alpha1/indices/post` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (keyword !== undefined) { + localVarQueryParameter['keyword'] = keyword + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit + } + + if (highlightPreTag !== undefined) { + localVarQueryParameter['highlightPreTag'] = highlightPreTag + } + + if (highlightPostTag !== undefined) { + localVarQueryParameter['highlightPostTag'] = highlightPostTag + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiHaloRunV1alpha1PostApi - functional programming interface + * @export + */ +export const ApiHaloRunV1alpha1PostApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiHaloRunV1alpha1PostApiAxiosParamCreator(configuration) + return { + /** + * Search posts with fuzzy query + * @param {string} keyword + * @param {number} [limit] + * @param {string} [highlightPreTag] + * @param {string} [highlightPostTag] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async searchPost( + keyword: string, + limit?: number, + highlightPreTag?: string, + highlightPostTag?: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.searchPost( + keyword, + limit, + highlightPreTag, + highlightPostTag, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiHaloRunV1alpha1PostApi - factory interface + * @export + */ +export const ApiHaloRunV1alpha1PostApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiHaloRunV1alpha1PostApiFp(configuration) + return { + /** + * Search posts with fuzzy query + * @param {ApiHaloRunV1alpha1PostApiSearchPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + searchPost( + requestParameters: ApiHaloRunV1alpha1PostApiSearchPostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .searchPost( + requestParameters.keyword, + requestParameters.limit, + requestParameters.highlightPreTag, + requestParameters.highlightPostTag, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for searchPost operation in ApiHaloRunV1alpha1PostApi. + * @export + * @interface ApiHaloRunV1alpha1PostApiSearchPostRequest + */ +export interface ApiHaloRunV1alpha1PostApiSearchPostRequest { + /** + * + * @type {string} + * @memberof ApiHaloRunV1alpha1PostApiSearchPost + */ + readonly keyword: string + + /** + * + * @type {number} + * @memberof ApiHaloRunV1alpha1PostApiSearchPost + */ + readonly limit?: number + + /** + * + * @type {string} + * @memberof ApiHaloRunV1alpha1PostApiSearchPost + */ + readonly highlightPreTag?: string + + /** + * + * @type {string} + * @memberof ApiHaloRunV1alpha1PostApiSearchPost + */ + readonly highlightPostTag?: string +} + +/** + * ApiHaloRunV1alpha1PostApi - object-oriented interface + * @export + * @class ApiHaloRunV1alpha1PostApi + * @extends {BaseAPI} + */ +export class ApiHaloRunV1alpha1PostApi extends BaseAPI { + /** + * Search posts with fuzzy query + * @param {ApiHaloRunV1alpha1PostApiSearchPostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1PostApi + */ + public searchPost(requestParameters: ApiHaloRunV1alpha1PostApiSearchPostRequest, options?: AxiosRequestConfig) { + return ApiHaloRunV1alpha1PostApiFp(this.configuration) + .searchPost( + requestParameters.keyword, + requestParameters.limit, + requestParameters.highlightPreTag, + requestParameters.highlightPostTag, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/api-halo-run-v1alpha1-tracker-api.ts b/packages/api-client/src/api/api-halo-run-v1alpha1-tracker-api.ts new file mode 100644 index 000000000..7bc184601 --- /dev/null +++ b/packages/api-client/src/api/api-halo-run-v1alpha1-tracker-api.ts @@ -0,0 +1,356 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { CounterRequest } from '../models' +// @ts-ignore +import { VoteRequest } from '../models' +/** + * ApiHaloRunV1alpha1TrackerApi - axios parameter creator + * @export + */ +export const ApiHaloRunV1alpha1TrackerApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Count an extension resource visits. + * @param {CounterRequest} counterRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + count: async (counterRequest: CounterRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'counterRequest' is not null or undefined + assertParamExists('count', 'counterRequest', counterRequest) + const localVarPath = `/apis/api.halo.run/v1alpha1/trackers/counter` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(counterRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Downvote an extension resource. + * @param {VoteRequest} voteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + downvote: async (voteRequest: VoteRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'voteRequest' is not null or undefined + assertParamExists('downvote', 'voteRequest', voteRequest) + const localVarPath = `/apis/api.halo.run/v1alpha1/trackers/downvote` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(voteRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Upvote an extension resource. + * @param {VoteRequest} voteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upvote: async (voteRequest: VoteRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'voteRequest' is not null or undefined + assertParamExists('upvote', 'voteRequest', voteRequest) + const localVarPath = `/apis/api.halo.run/v1alpha1/trackers/upvote` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(voteRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiHaloRunV1alpha1TrackerApi - functional programming interface + * @export + */ +export const ApiHaloRunV1alpha1TrackerApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiHaloRunV1alpha1TrackerApiAxiosParamCreator(configuration) + return { + /** + * Count an extension resource visits. + * @param {CounterRequest} counterRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async count( + counterRequest: CounterRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.count(counterRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Downvote an extension resource. + * @param {VoteRequest} voteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async downvote( + voteRequest: VoteRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downvote(voteRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Upvote an extension resource. + * @param {VoteRequest} voteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async upvote( + voteRequest: VoteRequest, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.upvote(voteRequest, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ApiHaloRunV1alpha1TrackerApi - factory interface + * @export + */ +export const ApiHaloRunV1alpha1TrackerApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiHaloRunV1alpha1TrackerApiFp(configuration) + return { + /** + * Count an extension resource visits. + * @param {ApiHaloRunV1alpha1TrackerApiCountRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + count( + requestParameters: ApiHaloRunV1alpha1TrackerApiCountRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.count(requestParameters.counterRequest, options).then((request) => request(axios, basePath)) + }, + /** + * Downvote an extension resource. + * @param {ApiHaloRunV1alpha1TrackerApiDownvoteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + downvote( + requestParameters: ApiHaloRunV1alpha1TrackerApiDownvoteRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.downvote(requestParameters.voteRequest, options).then((request) => request(axios, basePath)) + }, + /** + * Upvote an extension resource. + * @param {ApiHaloRunV1alpha1TrackerApiUpvoteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + upvote( + requestParameters: ApiHaloRunV1alpha1TrackerApiUpvoteRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.upvote(requestParameters.voteRequest, options).then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for count operation in ApiHaloRunV1alpha1TrackerApi. + * @export + * @interface ApiHaloRunV1alpha1TrackerApiCountRequest + */ +export interface ApiHaloRunV1alpha1TrackerApiCountRequest { + /** + * + * @type {CounterRequest} + * @memberof ApiHaloRunV1alpha1TrackerApiCount + */ + readonly counterRequest: CounterRequest +} + +/** + * Request parameters for downvote operation in ApiHaloRunV1alpha1TrackerApi. + * @export + * @interface ApiHaloRunV1alpha1TrackerApiDownvoteRequest + */ +export interface ApiHaloRunV1alpha1TrackerApiDownvoteRequest { + /** + * + * @type {VoteRequest} + * @memberof ApiHaloRunV1alpha1TrackerApiDownvote + */ + readonly voteRequest: VoteRequest +} + +/** + * Request parameters for upvote operation in ApiHaloRunV1alpha1TrackerApi. + * @export + * @interface ApiHaloRunV1alpha1TrackerApiUpvoteRequest + */ +export interface ApiHaloRunV1alpha1TrackerApiUpvoteRequest { + /** + * + * @type {VoteRequest} + * @memberof ApiHaloRunV1alpha1TrackerApiUpvote + */ + readonly voteRequest: VoteRequest +} + +/** + * ApiHaloRunV1alpha1TrackerApi - object-oriented interface + * @export + * @class ApiHaloRunV1alpha1TrackerApi + * @extends {BaseAPI} + */ +export class ApiHaloRunV1alpha1TrackerApi extends BaseAPI { + /** + * Count an extension resource visits. + * @param {ApiHaloRunV1alpha1TrackerApiCountRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1TrackerApi + */ + public count(requestParameters: ApiHaloRunV1alpha1TrackerApiCountRequest, options?: AxiosRequestConfig) { + return ApiHaloRunV1alpha1TrackerApiFp(this.configuration) + .count(requestParameters.counterRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Downvote an extension resource. + * @param {ApiHaloRunV1alpha1TrackerApiDownvoteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1TrackerApi + */ + public downvote(requestParameters: ApiHaloRunV1alpha1TrackerApiDownvoteRequest, options?: AxiosRequestConfig) { + return ApiHaloRunV1alpha1TrackerApiFp(this.configuration) + .downvote(requestParameters.voteRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Upvote an extension resource. + * @param {ApiHaloRunV1alpha1TrackerApiUpvoteRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiHaloRunV1alpha1TrackerApi + */ + public upvote(requestParameters: ApiHaloRunV1alpha1TrackerApiUpvoteRequest, options?: AxiosRequestConfig) { + return ApiHaloRunV1alpha1TrackerApiFp(this.configuration) + .upvote(requestParameters.voteRequest, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/content-halo-run-v1alpha1-category-api.ts b/packages/api-client/src/api/content-halo-run-v1alpha1-category-api.ts new file mode 100644 index 000000000..fa17a78e9 --- /dev/null +++ b/packages/api-client/src/api/content-halo-run-v1alpha1-category-api.ts @@ -0,0 +1,657 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Category } from '../models' +// @ts-ignore +import { CategoryList } from '../models' +/** + * ContentHaloRunV1alpha1CategoryApi - axios parameter creator + * @export + */ +export const ContentHaloRunV1alpha1CategoryApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create content.halo.run/v1alpha1/Category + * @param {Category} [category] Fresh category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Category: async ( + category?: Category, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/categories` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(category, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete content.halo.run/v1alpha1/Category + * @param {string} name Name of category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Category: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletecontentHaloRunV1alpha1Category', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/categories/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get content.halo.run/v1alpha1/Category + * @param {string} name Name of category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Category: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getcontentHaloRunV1alpha1Category', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/categories/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List content.halo.run/v1alpha1/Category + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Category: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/categories` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update content.halo.run/v1alpha1/Category + * @param {string} name Name of category + * @param {Category} [category] Updated category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Category: async ( + name: string, + category?: Category, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatecontentHaloRunV1alpha1Category', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/categories/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(category, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContentHaloRunV1alpha1CategoryApi - functional programming interface + * @export + */ +export const ContentHaloRunV1alpha1CategoryApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ContentHaloRunV1alpha1CategoryApiAxiosParamCreator(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Category + * @param {Category} [category] Fresh category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createcontentHaloRunV1alpha1Category( + category?: Category, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createcontentHaloRunV1alpha1Category(category, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete content.halo.run/v1alpha1/Category + * @param {string} name Name of category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletecontentHaloRunV1alpha1Category( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletecontentHaloRunV1alpha1Category(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get content.halo.run/v1alpha1/Category + * @param {string} name Name of category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getcontentHaloRunV1alpha1Category( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getcontentHaloRunV1alpha1Category(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List content.halo.run/v1alpha1/Category + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listcontentHaloRunV1alpha1Category( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listcontentHaloRunV1alpha1Category( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update content.halo.run/v1alpha1/Category + * @param {string} name Name of category + * @param {Category} [category] Updated category + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatecontentHaloRunV1alpha1Category( + name: string, + category?: Category, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatecontentHaloRunV1alpha1Category( + name, + category, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ContentHaloRunV1alpha1CategoryApi - factory interface + * @export + */ +export const ContentHaloRunV1alpha1CategoryApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentHaloRunV1alpha1CategoryApiFp(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiCreatecontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiCreatecontentHaloRunV1alpha1CategoryRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createcontentHaloRunV1alpha1Category(requestParameters.category, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiDeletecontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiDeletecontentHaloRunV1alpha1CategoryRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletecontentHaloRunV1alpha1Category(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiGetcontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiGetcontentHaloRunV1alpha1CategoryRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getcontentHaloRunV1alpha1Category(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1CategoryRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listcontentHaloRunV1alpha1Category( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1CategoryRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatecontentHaloRunV1alpha1Category(requestParameters.name, requestParameters.category, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createcontentHaloRunV1alpha1Category operation in ContentHaloRunV1alpha1CategoryApi. + * @export + * @interface ContentHaloRunV1alpha1CategoryApiCreatecontentHaloRunV1alpha1CategoryRequest + */ +export interface ContentHaloRunV1alpha1CategoryApiCreatecontentHaloRunV1alpha1CategoryRequest { + /** + * Fresh category + * @type {Category} + * @memberof ContentHaloRunV1alpha1CategoryApiCreatecontentHaloRunV1alpha1Category + */ + readonly category?: Category +} + +/** + * Request parameters for deletecontentHaloRunV1alpha1Category operation in ContentHaloRunV1alpha1CategoryApi. + * @export + * @interface ContentHaloRunV1alpha1CategoryApiDeletecontentHaloRunV1alpha1CategoryRequest + */ +export interface ContentHaloRunV1alpha1CategoryApiDeletecontentHaloRunV1alpha1CategoryRequest { + /** + * Name of category + * @type {string} + * @memberof ContentHaloRunV1alpha1CategoryApiDeletecontentHaloRunV1alpha1Category + */ + readonly name: string +} + +/** + * Request parameters for getcontentHaloRunV1alpha1Category operation in ContentHaloRunV1alpha1CategoryApi. + * @export + * @interface ContentHaloRunV1alpha1CategoryApiGetcontentHaloRunV1alpha1CategoryRequest + */ +export interface ContentHaloRunV1alpha1CategoryApiGetcontentHaloRunV1alpha1CategoryRequest { + /** + * Name of category + * @type {string} + * @memberof ContentHaloRunV1alpha1CategoryApiGetcontentHaloRunV1alpha1Category + */ + readonly name: string +} + +/** + * Request parameters for listcontentHaloRunV1alpha1Category operation in ContentHaloRunV1alpha1CategoryApi. + * @export + * @interface ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1CategoryRequest + */ +export interface ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1CategoryRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1Category + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1Category + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1Category + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1Category + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatecontentHaloRunV1alpha1Category operation in ContentHaloRunV1alpha1CategoryApi. + * @export + * @interface ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1CategoryRequest + */ +export interface ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1CategoryRequest { + /** + * Name of category + * @type {string} + * @memberof ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1Category + */ + readonly name: string + + /** + * Updated category + * @type {Category} + * @memberof ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1Category + */ + readonly category?: Category +} + +/** + * ContentHaloRunV1alpha1CategoryApi - object-oriented interface + * @export + * @class ContentHaloRunV1alpha1CategoryApi + * @extends {BaseAPI} + */ +export class ContentHaloRunV1alpha1CategoryApi extends BaseAPI { + /** + * Create content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiCreatecontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CategoryApi + */ + public createcontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiCreatecontentHaloRunV1alpha1CategoryRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CategoryApiFp(this.configuration) + .createcontentHaloRunV1alpha1Category(requestParameters.category, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiDeletecontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CategoryApi + */ + public deletecontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiDeletecontentHaloRunV1alpha1CategoryRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CategoryApiFp(this.configuration) + .deletecontentHaloRunV1alpha1Category(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiGetcontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CategoryApi + */ + public getcontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiGetcontentHaloRunV1alpha1CategoryRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CategoryApiFp(this.configuration) + .getcontentHaloRunV1alpha1Category(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CategoryApi + */ + public listcontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiListcontentHaloRunV1alpha1CategoryRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CategoryApiFp(this.configuration) + .listcontentHaloRunV1alpha1Category( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update content.halo.run/v1alpha1/Category + * @param {ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1CategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CategoryApi + */ + public updatecontentHaloRunV1alpha1Category( + requestParameters: ContentHaloRunV1alpha1CategoryApiUpdatecontentHaloRunV1alpha1CategoryRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CategoryApiFp(this.configuration) + .updatecontentHaloRunV1alpha1Category(requestParameters.name, requestParameters.category, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/content-halo-run-v1alpha1-comment-api.ts b/packages/api-client/src/api/content-halo-run-v1alpha1-comment-api.ts new file mode 100644 index 000000000..d02031426 --- /dev/null +++ b/packages/api-client/src/api/content-halo-run-v1alpha1-comment-api.ts @@ -0,0 +1,657 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Comment } from '../models' +// @ts-ignore +import { CommentList } from '../models' +/** + * ContentHaloRunV1alpha1CommentApi - axios parameter creator + * @export + */ +export const ContentHaloRunV1alpha1CommentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create content.halo.run/v1alpha1/Comment + * @param {Comment} [comment] Fresh comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Comment: async ( + comment?: Comment, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/comments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(comment, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete content.halo.run/v1alpha1/Comment + * @param {string} name Name of comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Comment: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletecontentHaloRunV1alpha1Comment', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/comments/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get content.halo.run/v1alpha1/Comment + * @param {string} name Name of comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Comment: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getcontentHaloRunV1alpha1Comment', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/comments/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List content.halo.run/v1alpha1/Comment + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Comment: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/comments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update content.halo.run/v1alpha1/Comment + * @param {string} name Name of comment + * @param {Comment} [comment] Updated comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Comment: async ( + name: string, + comment?: Comment, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatecontentHaloRunV1alpha1Comment', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/comments/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(comment, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContentHaloRunV1alpha1CommentApi - functional programming interface + * @export + */ +export const ContentHaloRunV1alpha1CommentApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ContentHaloRunV1alpha1CommentApiAxiosParamCreator(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Comment + * @param {Comment} [comment] Fresh comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createcontentHaloRunV1alpha1Comment( + comment?: Comment, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createcontentHaloRunV1alpha1Comment(comment, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete content.halo.run/v1alpha1/Comment + * @param {string} name Name of comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletecontentHaloRunV1alpha1Comment( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletecontentHaloRunV1alpha1Comment(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get content.halo.run/v1alpha1/Comment + * @param {string} name Name of comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getcontentHaloRunV1alpha1Comment( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getcontentHaloRunV1alpha1Comment(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List content.halo.run/v1alpha1/Comment + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listcontentHaloRunV1alpha1Comment( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listcontentHaloRunV1alpha1Comment( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update content.halo.run/v1alpha1/Comment + * @param {string} name Name of comment + * @param {Comment} [comment] Updated comment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatecontentHaloRunV1alpha1Comment( + name: string, + comment?: Comment, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatecontentHaloRunV1alpha1Comment( + name, + comment, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ContentHaloRunV1alpha1CommentApi - factory interface + * @export + */ +export const ContentHaloRunV1alpha1CommentApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentHaloRunV1alpha1CommentApiFp(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiCreatecontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiCreatecontentHaloRunV1alpha1CommentRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createcontentHaloRunV1alpha1Comment(requestParameters.comment, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiDeletecontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiDeletecontentHaloRunV1alpha1CommentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletecontentHaloRunV1alpha1Comment(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiGetcontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiGetcontentHaloRunV1alpha1CommentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getcontentHaloRunV1alpha1Comment(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1CommentRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listcontentHaloRunV1alpha1Comment( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1CommentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatecontentHaloRunV1alpha1Comment(requestParameters.name, requestParameters.comment, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createcontentHaloRunV1alpha1Comment operation in ContentHaloRunV1alpha1CommentApi. + * @export + * @interface ContentHaloRunV1alpha1CommentApiCreatecontentHaloRunV1alpha1CommentRequest + */ +export interface ContentHaloRunV1alpha1CommentApiCreatecontentHaloRunV1alpha1CommentRequest { + /** + * Fresh comment + * @type {Comment} + * @memberof ContentHaloRunV1alpha1CommentApiCreatecontentHaloRunV1alpha1Comment + */ + readonly comment?: Comment +} + +/** + * Request parameters for deletecontentHaloRunV1alpha1Comment operation in ContentHaloRunV1alpha1CommentApi. + * @export + * @interface ContentHaloRunV1alpha1CommentApiDeletecontentHaloRunV1alpha1CommentRequest + */ +export interface ContentHaloRunV1alpha1CommentApiDeletecontentHaloRunV1alpha1CommentRequest { + /** + * Name of comment + * @type {string} + * @memberof ContentHaloRunV1alpha1CommentApiDeletecontentHaloRunV1alpha1Comment + */ + readonly name: string +} + +/** + * Request parameters for getcontentHaloRunV1alpha1Comment operation in ContentHaloRunV1alpha1CommentApi. + * @export + * @interface ContentHaloRunV1alpha1CommentApiGetcontentHaloRunV1alpha1CommentRequest + */ +export interface ContentHaloRunV1alpha1CommentApiGetcontentHaloRunV1alpha1CommentRequest { + /** + * Name of comment + * @type {string} + * @memberof ContentHaloRunV1alpha1CommentApiGetcontentHaloRunV1alpha1Comment + */ + readonly name: string +} + +/** + * Request parameters for listcontentHaloRunV1alpha1Comment operation in ContentHaloRunV1alpha1CommentApi. + * @export + * @interface ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1CommentRequest + */ +export interface ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1CommentRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1Comment + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1Comment + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1Comment + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1Comment + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatecontentHaloRunV1alpha1Comment operation in ContentHaloRunV1alpha1CommentApi. + * @export + * @interface ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1CommentRequest + */ +export interface ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1CommentRequest { + /** + * Name of comment + * @type {string} + * @memberof ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1Comment + */ + readonly name: string + + /** + * Updated comment + * @type {Comment} + * @memberof ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1Comment + */ + readonly comment?: Comment +} + +/** + * ContentHaloRunV1alpha1CommentApi - object-oriented interface + * @export + * @class ContentHaloRunV1alpha1CommentApi + * @extends {BaseAPI} + */ +export class ContentHaloRunV1alpha1CommentApi extends BaseAPI { + /** + * Create content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiCreatecontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CommentApi + */ + public createcontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiCreatecontentHaloRunV1alpha1CommentRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CommentApiFp(this.configuration) + .createcontentHaloRunV1alpha1Comment(requestParameters.comment, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiDeletecontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CommentApi + */ + public deletecontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiDeletecontentHaloRunV1alpha1CommentRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CommentApiFp(this.configuration) + .deletecontentHaloRunV1alpha1Comment(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiGetcontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CommentApi + */ + public getcontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiGetcontentHaloRunV1alpha1CommentRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CommentApiFp(this.configuration) + .getcontentHaloRunV1alpha1Comment(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CommentApi + */ + public listcontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiListcontentHaloRunV1alpha1CommentRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CommentApiFp(this.configuration) + .listcontentHaloRunV1alpha1Comment( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update content.halo.run/v1alpha1/Comment + * @param {ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1CommentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1CommentApi + */ + public updatecontentHaloRunV1alpha1Comment( + requestParameters: ContentHaloRunV1alpha1CommentApiUpdatecontentHaloRunV1alpha1CommentRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1CommentApiFp(this.configuration) + .updatecontentHaloRunV1alpha1Comment(requestParameters.name, requestParameters.comment, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/content-halo-run-v1alpha1-post-api.ts b/packages/api-client/src/api/content-halo-run-v1alpha1-post-api.ts new file mode 100644 index 000000000..239f1f038 --- /dev/null +++ b/packages/api-client/src/api/content-halo-run-v1alpha1-post-api.ts @@ -0,0 +1,647 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Post } from '../models' +// @ts-ignore +import { PostList } from '../models' +/** + * ContentHaloRunV1alpha1PostApi - axios parameter creator + * @export + */ +export const ContentHaloRunV1alpha1PostApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create content.halo.run/v1alpha1/Post + * @param {Post} [post] Fresh post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Post: async (post?: Post, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/posts` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(post, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete content.halo.run/v1alpha1/Post + * @param {string} name Name of post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Post: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletecontentHaloRunV1alpha1Post', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/posts/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get content.halo.run/v1alpha1/Post + * @param {string} name Name of post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Post: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getcontentHaloRunV1alpha1Post', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/posts/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List content.halo.run/v1alpha1/Post + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Post: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/posts` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update content.halo.run/v1alpha1/Post + * @param {string} name Name of post + * @param {Post} [post] Updated post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Post: async ( + name: string, + post?: Post, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatecontentHaloRunV1alpha1Post', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/posts/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(post, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContentHaloRunV1alpha1PostApi - functional programming interface + * @export + */ +export const ContentHaloRunV1alpha1PostApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ContentHaloRunV1alpha1PostApiAxiosParamCreator(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Post + * @param {Post} [post] Fresh post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createcontentHaloRunV1alpha1Post( + post?: Post, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createcontentHaloRunV1alpha1Post(post, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete content.halo.run/v1alpha1/Post + * @param {string} name Name of post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletecontentHaloRunV1alpha1Post( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletecontentHaloRunV1alpha1Post(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get content.halo.run/v1alpha1/Post + * @param {string} name Name of post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getcontentHaloRunV1alpha1Post( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getcontentHaloRunV1alpha1Post(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List content.halo.run/v1alpha1/Post + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listcontentHaloRunV1alpha1Post( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listcontentHaloRunV1alpha1Post( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update content.halo.run/v1alpha1/Post + * @param {string} name Name of post + * @param {Post} [post] Updated post + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatecontentHaloRunV1alpha1Post( + name: string, + post?: Post, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatecontentHaloRunV1alpha1Post(name, post, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ContentHaloRunV1alpha1PostApi - factory interface + * @export + */ +export const ContentHaloRunV1alpha1PostApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentHaloRunV1alpha1PostApiFp(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiCreatecontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiCreatecontentHaloRunV1alpha1PostRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createcontentHaloRunV1alpha1Post(requestParameters.post, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiDeletecontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiDeletecontentHaloRunV1alpha1PostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletecontentHaloRunV1alpha1Post(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiGetcontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiGetcontentHaloRunV1alpha1PostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getcontentHaloRunV1alpha1Post(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1PostRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listcontentHaloRunV1alpha1Post( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1PostRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatecontentHaloRunV1alpha1Post(requestParameters.name, requestParameters.post, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createcontentHaloRunV1alpha1Post operation in ContentHaloRunV1alpha1PostApi. + * @export + * @interface ContentHaloRunV1alpha1PostApiCreatecontentHaloRunV1alpha1PostRequest + */ +export interface ContentHaloRunV1alpha1PostApiCreatecontentHaloRunV1alpha1PostRequest { + /** + * Fresh post + * @type {Post} + * @memberof ContentHaloRunV1alpha1PostApiCreatecontentHaloRunV1alpha1Post + */ + readonly post?: Post +} + +/** + * Request parameters for deletecontentHaloRunV1alpha1Post operation in ContentHaloRunV1alpha1PostApi. + * @export + * @interface ContentHaloRunV1alpha1PostApiDeletecontentHaloRunV1alpha1PostRequest + */ +export interface ContentHaloRunV1alpha1PostApiDeletecontentHaloRunV1alpha1PostRequest { + /** + * Name of post + * @type {string} + * @memberof ContentHaloRunV1alpha1PostApiDeletecontentHaloRunV1alpha1Post + */ + readonly name: string +} + +/** + * Request parameters for getcontentHaloRunV1alpha1Post operation in ContentHaloRunV1alpha1PostApi. + * @export + * @interface ContentHaloRunV1alpha1PostApiGetcontentHaloRunV1alpha1PostRequest + */ +export interface ContentHaloRunV1alpha1PostApiGetcontentHaloRunV1alpha1PostRequest { + /** + * Name of post + * @type {string} + * @memberof ContentHaloRunV1alpha1PostApiGetcontentHaloRunV1alpha1Post + */ + readonly name: string +} + +/** + * Request parameters for listcontentHaloRunV1alpha1Post operation in ContentHaloRunV1alpha1PostApi. + * @export + * @interface ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1PostRequest + */ +export interface ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1PostRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1Post + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1Post + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1Post + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1Post + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatecontentHaloRunV1alpha1Post operation in ContentHaloRunV1alpha1PostApi. + * @export + * @interface ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1PostRequest + */ +export interface ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1PostRequest { + /** + * Name of post + * @type {string} + * @memberof ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1Post + */ + readonly name: string + + /** + * Updated post + * @type {Post} + * @memberof ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1Post + */ + readonly post?: Post +} + +/** + * ContentHaloRunV1alpha1PostApi - object-oriented interface + * @export + * @class ContentHaloRunV1alpha1PostApi + * @extends {BaseAPI} + */ +export class ContentHaloRunV1alpha1PostApi extends BaseAPI { + /** + * Create content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiCreatecontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1PostApi + */ + public createcontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiCreatecontentHaloRunV1alpha1PostRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1PostApiFp(this.configuration) + .createcontentHaloRunV1alpha1Post(requestParameters.post, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiDeletecontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1PostApi + */ + public deletecontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiDeletecontentHaloRunV1alpha1PostRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1PostApiFp(this.configuration) + .deletecontentHaloRunV1alpha1Post(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiGetcontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1PostApi + */ + public getcontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiGetcontentHaloRunV1alpha1PostRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1PostApiFp(this.configuration) + .getcontentHaloRunV1alpha1Post(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1PostApi + */ + public listcontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiListcontentHaloRunV1alpha1PostRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1PostApiFp(this.configuration) + .listcontentHaloRunV1alpha1Post( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update content.halo.run/v1alpha1/Post + * @param {ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1PostRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1PostApi + */ + public updatecontentHaloRunV1alpha1Post( + requestParameters: ContentHaloRunV1alpha1PostApiUpdatecontentHaloRunV1alpha1PostRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1PostApiFp(this.configuration) + .updatecontentHaloRunV1alpha1Post(requestParameters.name, requestParameters.post, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/content-halo-run-v1alpha1-reply-api.ts b/packages/api-client/src/api/content-halo-run-v1alpha1-reply-api.ts new file mode 100644 index 000000000..206e84bf6 --- /dev/null +++ b/packages/api-client/src/api/content-halo-run-v1alpha1-reply-api.ts @@ -0,0 +1,650 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Reply } from '../models' +// @ts-ignore +import { ReplyList } from '../models' +/** + * ContentHaloRunV1alpha1ReplyApi - axios parameter creator + * @export + */ +export const ContentHaloRunV1alpha1ReplyApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create content.halo.run/v1alpha1/Reply + * @param {Reply} [reply] Fresh reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Reply: async ( + reply?: Reply, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/replies` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(reply, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete content.halo.run/v1alpha1/Reply + * @param {string} name Name of reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Reply: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletecontentHaloRunV1alpha1Reply', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/replies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get content.halo.run/v1alpha1/Reply + * @param {string} name Name of reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Reply: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getcontentHaloRunV1alpha1Reply', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/replies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List content.halo.run/v1alpha1/Reply + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Reply: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/replies` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update content.halo.run/v1alpha1/Reply + * @param {string} name Name of reply + * @param {Reply} [reply] Updated reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Reply: async ( + name: string, + reply?: Reply, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatecontentHaloRunV1alpha1Reply', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/replies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(reply, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContentHaloRunV1alpha1ReplyApi - functional programming interface + * @export + */ +export const ContentHaloRunV1alpha1ReplyApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ContentHaloRunV1alpha1ReplyApiAxiosParamCreator(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Reply + * @param {Reply} [reply] Fresh reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createcontentHaloRunV1alpha1Reply( + reply?: Reply, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createcontentHaloRunV1alpha1Reply(reply, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete content.halo.run/v1alpha1/Reply + * @param {string} name Name of reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletecontentHaloRunV1alpha1Reply( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletecontentHaloRunV1alpha1Reply(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get content.halo.run/v1alpha1/Reply + * @param {string} name Name of reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getcontentHaloRunV1alpha1Reply( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getcontentHaloRunV1alpha1Reply(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List content.halo.run/v1alpha1/Reply + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listcontentHaloRunV1alpha1Reply( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listcontentHaloRunV1alpha1Reply( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update content.halo.run/v1alpha1/Reply + * @param {string} name Name of reply + * @param {Reply} [reply] Updated reply + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatecontentHaloRunV1alpha1Reply( + name: string, + reply?: Reply, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatecontentHaloRunV1alpha1Reply(name, reply, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ContentHaloRunV1alpha1ReplyApi - factory interface + * @export + */ +export const ContentHaloRunV1alpha1ReplyApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentHaloRunV1alpha1ReplyApiFp(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiCreatecontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiCreatecontentHaloRunV1alpha1ReplyRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createcontentHaloRunV1alpha1Reply(requestParameters.reply, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiDeletecontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiDeletecontentHaloRunV1alpha1ReplyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletecontentHaloRunV1alpha1Reply(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiGetcontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiGetcontentHaloRunV1alpha1ReplyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getcontentHaloRunV1alpha1Reply(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1ReplyRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listcontentHaloRunV1alpha1Reply( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1ReplyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatecontentHaloRunV1alpha1Reply(requestParameters.name, requestParameters.reply, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createcontentHaloRunV1alpha1Reply operation in ContentHaloRunV1alpha1ReplyApi. + * @export + * @interface ContentHaloRunV1alpha1ReplyApiCreatecontentHaloRunV1alpha1ReplyRequest + */ +export interface ContentHaloRunV1alpha1ReplyApiCreatecontentHaloRunV1alpha1ReplyRequest { + /** + * Fresh reply + * @type {Reply} + * @memberof ContentHaloRunV1alpha1ReplyApiCreatecontentHaloRunV1alpha1Reply + */ + readonly reply?: Reply +} + +/** + * Request parameters for deletecontentHaloRunV1alpha1Reply operation in ContentHaloRunV1alpha1ReplyApi. + * @export + * @interface ContentHaloRunV1alpha1ReplyApiDeletecontentHaloRunV1alpha1ReplyRequest + */ +export interface ContentHaloRunV1alpha1ReplyApiDeletecontentHaloRunV1alpha1ReplyRequest { + /** + * Name of reply + * @type {string} + * @memberof ContentHaloRunV1alpha1ReplyApiDeletecontentHaloRunV1alpha1Reply + */ + readonly name: string +} + +/** + * Request parameters for getcontentHaloRunV1alpha1Reply operation in ContentHaloRunV1alpha1ReplyApi. + * @export + * @interface ContentHaloRunV1alpha1ReplyApiGetcontentHaloRunV1alpha1ReplyRequest + */ +export interface ContentHaloRunV1alpha1ReplyApiGetcontentHaloRunV1alpha1ReplyRequest { + /** + * Name of reply + * @type {string} + * @memberof ContentHaloRunV1alpha1ReplyApiGetcontentHaloRunV1alpha1Reply + */ + readonly name: string +} + +/** + * Request parameters for listcontentHaloRunV1alpha1Reply operation in ContentHaloRunV1alpha1ReplyApi. + * @export + * @interface ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1ReplyRequest + */ +export interface ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1ReplyRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1Reply + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1Reply + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1Reply + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1Reply + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatecontentHaloRunV1alpha1Reply operation in ContentHaloRunV1alpha1ReplyApi. + * @export + * @interface ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1ReplyRequest + */ +export interface ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1ReplyRequest { + /** + * Name of reply + * @type {string} + * @memberof ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1Reply + */ + readonly name: string + + /** + * Updated reply + * @type {Reply} + * @memberof ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1Reply + */ + readonly reply?: Reply +} + +/** + * ContentHaloRunV1alpha1ReplyApi - object-oriented interface + * @export + * @class ContentHaloRunV1alpha1ReplyApi + * @extends {BaseAPI} + */ +export class ContentHaloRunV1alpha1ReplyApi extends BaseAPI { + /** + * Create content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiCreatecontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1ReplyApi + */ + public createcontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiCreatecontentHaloRunV1alpha1ReplyRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1ReplyApiFp(this.configuration) + .createcontentHaloRunV1alpha1Reply(requestParameters.reply, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiDeletecontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1ReplyApi + */ + public deletecontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiDeletecontentHaloRunV1alpha1ReplyRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1ReplyApiFp(this.configuration) + .deletecontentHaloRunV1alpha1Reply(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiGetcontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1ReplyApi + */ + public getcontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiGetcontentHaloRunV1alpha1ReplyRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1ReplyApiFp(this.configuration) + .getcontentHaloRunV1alpha1Reply(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1ReplyApi + */ + public listcontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiListcontentHaloRunV1alpha1ReplyRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1ReplyApiFp(this.configuration) + .listcontentHaloRunV1alpha1Reply( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update content.halo.run/v1alpha1/Reply + * @param {ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1ReplyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1ReplyApi + */ + public updatecontentHaloRunV1alpha1Reply( + requestParameters: ContentHaloRunV1alpha1ReplyApiUpdatecontentHaloRunV1alpha1ReplyRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1ReplyApiFp(this.configuration) + .updatecontentHaloRunV1alpha1Reply(requestParameters.name, requestParameters.reply, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/content-halo-run-v1alpha1-single-page-api.ts b/packages/api-client/src/api/content-halo-run-v1alpha1-single-page-api.ts new file mode 100644 index 000000000..9d032a688 --- /dev/null +++ b/packages/api-client/src/api/content-halo-run-v1alpha1-single-page-api.ts @@ -0,0 +1,663 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { SinglePage } from '../models' +// @ts-ignore +import { SinglePageList } from '../models' +/** + * ContentHaloRunV1alpha1SinglePageApi - axios parameter creator + * @export + */ +export const ContentHaloRunV1alpha1SinglePageApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create content.halo.run/v1alpha1/SinglePage + * @param {SinglePage} [singlePage] Fresh singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1SinglePage: async ( + singlePage?: SinglePage, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/singlepages` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(singlePage, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete content.halo.run/v1alpha1/SinglePage + * @param {string} name Name of singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1SinglePage: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletecontentHaloRunV1alpha1SinglePage', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/singlepages/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get content.halo.run/v1alpha1/SinglePage + * @param {string} name Name of singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1SinglePage: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getcontentHaloRunV1alpha1SinglePage', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/singlepages/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List content.halo.run/v1alpha1/SinglePage + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1SinglePage: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/singlepages` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update content.halo.run/v1alpha1/SinglePage + * @param {string} name Name of singlepage + * @param {SinglePage} [singlePage] Updated singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1SinglePage: async ( + name: string, + singlePage?: SinglePage, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatecontentHaloRunV1alpha1SinglePage', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/singlepages/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(singlePage, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContentHaloRunV1alpha1SinglePageApi - functional programming interface + * @export + */ +export const ContentHaloRunV1alpha1SinglePageApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ContentHaloRunV1alpha1SinglePageApiAxiosParamCreator(configuration) + return { + /** + * Create content.halo.run/v1alpha1/SinglePage + * @param {SinglePage} [singlePage] Fresh singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createcontentHaloRunV1alpha1SinglePage( + singlePage?: SinglePage, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createcontentHaloRunV1alpha1SinglePage( + singlePage, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete content.halo.run/v1alpha1/SinglePage + * @param {string} name Name of singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletecontentHaloRunV1alpha1SinglePage( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletecontentHaloRunV1alpha1SinglePage(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get content.halo.run/v1alpha1/SinglePage + * @param {string} name Name of singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getcontentHaloRunV1alpha1SinglePage( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getcontentHaloRunV1alpha1SinglePage(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List content.halo.run/v1alpha1/SinglePage + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listcontentHaloRunV1alpha1SinglePage( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listcontentHaloRunV1alpha1SinglePage( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update content.halo.run/v1alpha1/SinglePage + * @param {string} name Name of singlepage + * @param {SinglePage} [singlePage] Updated singlepage + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatecontentHaloRunV1alpha1SinglePage( + name: string, + singlePage?: SinglePage, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatecontentHaloRunV1alpha1SinglePage( + name, + singlePage, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ContentHaloRunV1alpha1SinglePageApi - factory interface + * @export + */ +export const ContentHaloRunV1alpha1SinglePageApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentHaloRunV1alpha1SinglePageApiFp(configuration) + return { + /** + * Create content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiCreatecontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiCreatecontentHaloRunV1alpha1SinglePageRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createcontentHaloRunV1alpha1SinglePage(requestParameters.singlePage, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiDeletecontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiDeletecontentHaloRunV1alpha1SinglePageRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletecontentHaloRunV1alpha1SinglePage(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiGetcontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiGetcontentHaloRunV1alpha1SinglePageRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getcontentHaloRunV1alpha1SinglePage(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePageRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listcontentHaloRunV1alpha1SinglePage( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePageRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatecontentHaloRunV1alpha1SinglePage(requestParameters.name, requestParameters.singlePage, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createcontentHaloRunV1alpha1SinglePage operation in ContentHaloRunV1alpha1SinglePageApi. + * @export + * @interface ContentHaloRunV1alpha1SinglePageApiCreatecontentHaloRunV1alpha1SinglePageRequest + */ +export interface ContentHaloRunV1alpha1SinglePageApiCreatecontentHaloRunV1alpha1SinglePageRequest { + /** + * Fresh singlepage + * @type {SinglePage} + * @memberof ContentHaloRunV1alpha1SinglePageApiCreatecontentHaloRunV1alpha1SinglePage + */ + readonly singlePage?: SinglePage +} + +/** + * Request parameters for deletecontentHaloRunV1alpha1SinglePage operation in ContentHaloRunV1alpha1SinglePageApi. + * @export + * @interface ContentHaloRunV1alpha1SinglePageApiDeletecontentHaloRunV1alpha1SinglePageRequest + */ +export interface ContentHaloRunV1alpha1SinglePageApiDeletecontentHaloRunV1alpha1SinglePageRequest { + /** + * Name of singlepage + * @type {string} + * @memberof ContentHaloRunV1alpha1SinglePageApiDeletecontentHaloRunV1alpha1SinglePage + */ + readonly name: string +} + +/** + * Request parameters for getcontentHaloRunV1alpha1SinglePage operation in ContentHaloRunV1alpha1SinglePageApi. + * @export + * @interface ContentHaloRunV1alpha1SinglePageApiGetcontentHaloRunV1alpha1SinglePageRequest + */ +export interface ContentHaloRunV1alpha1SinglePageApiGetcontentHaloRunV1alpha1SinglePageRequest { + /** + * Name of singlepage + * @type {string} + * @memberof ContentHaloRunV1alpha1SinglePageApiGetcontentHaloRunV1alpha1SinglePage + */ + readonly name: string +} + +/** + * Request parameters for listcontentHaloRunV1alpha1SinglePage operation in ContentHaloRunV1alpha1SinglePageApi. + * @export + * @interface ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePageRequest + */ +export interface ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePageRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePage + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePage + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePage + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePage + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatecontentHaloRunV1alpha1SinglePage operation in ContentHaloRunV1alpha1SinglePageApi. + * @export + * @interface ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePageRequest + */ +export interface ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePageRequest { + /** + * Name of singlepage + * @type {string} + * @memberof ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePage + */ + readonly name: string + + /** + * Updated singlepage + * @type {SinglePage} + * @memberof ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePage + */ + readonly singlePage?: SinglePage +} + +/** + * ContentHaloRunV1alpha1SinglePageApi - object-oriented interface + * @export + * @class ContentHaloRunV1alpha1SinglePageApi + * @extends {BaseAPI} + */ +export class ContentHaloRunV1alpha1SinglePageApi extends BaseAPI { + /** + * Create content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiCreatecontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SinglePageApi + */ + public createcontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiCreatecontentHaloRunV1alpha1SinglePageRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SinglePageApiFp(this.configuration) + .createcontentHaloRunV1alpha1SinglePage(requestParameters.singlePage, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiDeletecontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SinglePageApi + */ + public deletecontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiDeletecontentHaloRunV1alpha1SinglePageRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SinglePageApiFp(this.configuration) + .deletecontentHaloRunV1alpha1SinglePage(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiGetcontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SinglePageApi + */ + public getcontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiGetcontentHaloRunV1alpha1SinglePageRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SinglePageApiFp(this.configuration) + .getcontentHaloRunV1alpha1SinglePage(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SinglePageApi + */ + public listcontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiListcontentHaloRunV1alpha1SinglePageRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SinglePageApiFp(this.configuration) + .listcontentHaloRunV1alpha1SinglePage( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update content.halo.run/v1alpha1/SinglePage + * @param {ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePageRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SinglePageApi + */ + public updatecontentHaloRunV1alpha1SinglePage( + requestParameters: ContentHaloRunV1alpha1SinglePageApiUpdatecontentHaloRunV1alpha1SinglePageRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SinglePageApiFp(this.configuration) + .updatecontentHaloRunV1alpha1SinglePage(requestParameters.name, requestParameters.singlePage, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/content-halo-run-v1alpha1-snapshot-api.ts b/packages/api-client/src/api/content-halo-run-v1alpha1-snapshot-api.ts new file mode 100644 index 000000000..5c4fd8a9c --- /dev/null +++ b/packages/api-client/src/api/content-halo-run-v1alpha1-snapshot-api.ts @@ -0,0 +1,657 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Snapshot } from '../models' +// @ts-ignore +import { SnapshotList } from '../models' +/** + * ContentHaloRunV1alpha1SnapshotApi - axios parameter creator + * @export + */ +export const ContentHaloRunV1alpha1SnapshotApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create content.halo.run/v1alpha1/Snapshot + * @param {Snapshot} [snapshot] Fresh snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Snapshot: async ( + snapshot?: Snapshot, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/snapshots` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(snapshot, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete content.halo.run/v1alpha1/Snapshot + * @param {string} name Name of snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Snapshot: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletecontentHaloRunV1alpha1Snapshot', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/snapshots/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get content.halo.run/v1alpha1/Snapshot + * @param {string} name Name of snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Snapshot: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getcontentHaloRunV1alpha1Snapshot', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/snapshots/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List content.halo.run/v1alpha1/Snapshot + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Snapshot: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/snapshots` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update content.halo.run/v1alpha1/Snapshot + * @param {string} name Name of snapshot + * @param {Snapshot} [snapshot] Updated snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Snapshot: async ( + name: string, + snapshot?: Snapshot, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatecontentHaloRunV1alpha1Snapshot', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/snapshots/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(snapshot, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContentHaloRunV1alpha1SnapshotApi - functional programming interface + * @export + */ +export const ContentHaloRunV1alpha1SnapshotApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ContentHaloRunV1alpha1SnapshotApiAxiosParamCreator(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Snapshot + * @param {Snapshot} [snapshot] Fresh snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createcontentHaloRunV1alpha1Snapshot( + snapshot?: Snapshot, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createcontentHaloRunV1alpha1Snapshot(snapshot, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete content.halo.run/v1alpha1/Snapshot + * @param {string} name Name of snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletecontentHaloRunV1alpha1Snapshot( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletecontentHaloRunV1alpha1Snapshot(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get content.halo.run/v1alpha1/Snapshot + * @param {string} name Name of snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getcontentHaloRunV1alpha1Snapshot( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getcontentHaloRunV1alpha1Snapshot(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List content.halo.run/v1alpha1/Snapshot + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listcontentHaloRunV1alpha1Snapshot( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listcontentHaloRunV1alpha1Snapshot( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update content.halo.run/v1alpha1/Snapshot + * @param {string} name Name of snapshot + * @param {Snapshot} [snapshot] Updated snapshot + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatecontentHaloRunV1alpha1Snapshot( + name: string, + snapshot?: Snapshot, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatecontentHaloRunV1alpha1Snapshot( + name, + snapshot, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ContentHaloRunV1alpha1SnapshotApi - factory interface + * @export + */ +export const ContentHaloRunV1alpha1SnapshotApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentHaloRunV1alpha1SnapshotApiFp(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiCreatecontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiCreatecontentHaloRunV1alpha1SnapshotRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createcontentHaloRunV1alpha1Snapshot(requestParameters.snapshot, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiDeletecontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiDeletecontentHaloRunV1alpha1SnapshotRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletecontentHaloRunV1alpha1Snapshot(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiGetcontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiGetcontentHaloRunV1alpha1SnapshotRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getcontentHaloRunV1alpha1Snapshot(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1SnapshotRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listcontentHaloRunV1alpha1Snapshot( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1SnapshotRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatecontentHaloRunV1alpha1Snapshot(requestParameters.name, requestParameters.snapshot, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createcontentHaloRunV1alpha1Snapshot operation in ContentHaloRunV1alpha1SnapshotApi. + * @export + * @interface ContentHaloRunV1alpha1SnapshotApiCreatecontentHaloRunV1alpha1SnapshotRequest + */ +export interface ContentHaloRunV1alpha1SnapshotApiCreatecontentHaloRunV1alpha1SnapshotRequest { + /** + * Fresh snapshot + * @type {Snapshot} + * @memberof ContentHaloRunV1alpha1SnapshotApiCreatecontentHaloRunV1alpha1Snapshot + */ + readonly snapshot?: Snapshot +} + +/** + * Request parameters for deletecontentHaloRunV1alpha1Snapshot operation in ContentHaloRunV1alpha1SnapshotApi. + * @export + * @interface ContentHaloRunV1alpha1SnapshotApiDeletecontentHaloRunV1alpha1SnapshotRequest + */ +export interface ContentHaloRunV1alpha1SnapshotApiDeletecontentHaloRunV1alpha1SnapshotRequest { + /** + * Name of snapshot + * @type {string} + * @memberof ContentHaloRunV1alpha1SnapshotApiDeletecontentHaloRunV1alpha1Snapshot + */ + readonly name: string +} + +/** + * Request parameters for getcontentHaloRunV1alpha1Snapshot operation in ContentHaloRunV1alpha1SnapshotApi. + * @export + * @interface ContentHaloRunV1alpha1SnapshotApiGetcontentHaloRunV1alpha1SnapshotRequest + */ +export interface ContentHaloRunV1alpha1SnapshotApiGetcontentHaloRunV1alpha1SnapshotRequest { + /** + * Name of snapshot + * @type {string} + * @memberof ContentHaloRunV1alpha1SnapshotApiGetcontentHaloRunV1alpha1Snapshot + */ + readonly name: string +} + +/** + * Request parameters for listcontentHaloRunV1alpha1Snapshot operation in ContentHaloRunV1alpha1SnapshotApi. + * @export + * @interface ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1SnapshotRequest + */ +export interface ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1SnapshotRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1Snapshot + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1Snapshot + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1Snapshot + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1Snapshot + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatecontentHaloRunV1alpha1Snapshot operation in ContentHaloRunV1alpha1SnapshotApi. + * @export + * @interface ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1SnapshotRequest + */ +export interface ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1SnapshotRequest { + /** + * Name of snapshot + * @type {string} + * @memberof ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1Snapshot + */ + readonly name: string + + /** + * Updated snapshot + * @type {Snapshot} + * @memberof ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1Snapshot + */ + readonly snapshot?: Snapshot +} + +/** + * ContentHaloRunV1alpha1SnapshotApi - object-oriented interface + * @export + * @class ContentHaloRunV1alpha1SnapshotApi + * @extends {BaseAPI} + */ +export class ContentHaloRunV1alpha1SnapshotApi extends BaseAPI { + /** + * Create content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiCreatecontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SnapshotApi + */ + public createcontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiCreatecontentHaloRunV1alpha1SnapshotRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SnapshotApiFp(this.configuration) + .createcontentHaloRunV1alpha1Snapshot(requestParameters.snapshot, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiDeletecontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SnapshotApi + */ + public deletecontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiDeletecontentHaloRunV1alpha1SnapshotRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SnapshotApiFp(this.configuration) + .deletecontentHaloRunV1alpha1Snapshot(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiGetcontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SnapshotApi + */ + public getcontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiGetcontentHaloRunV1alpha1SnapshotRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SnapshotApiFp(this.configuration) + .getcontentHaloRunV1alpha1Snapshot(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SnapshotApi + */ + public listcontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiListcontentHaloRunV1alpha1SnapshotRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SnapshotApiFp(this.configuration) + .listcontentHaloRunV1alpha1Snapshot( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update content.halo.run/v1alpha1/Snapshot + * @param {ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1SnapshotRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1SnapshotApi + */ + public updatecontentHaloRunV1alpha1Snapshot( + requestParameters: ContentHaloRunV1alpha1SnapshotApiUpdatecontentHaloRunV1alpha1SnapshotRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1SnapshotApiFp(this.configuration) + .updatecontentHaloRunV1alpha1Snapshot(requestParameters.name, requestParameters.snapshot, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/content-halo-run-v1alpha1-tag-api.ts b/packages/api-client/src/api/content-halo-run-v1alpha1-tag-api.ts new file mode 100644 index 000000000..14e322455 --- /dev/null +++ b/packages/api-client/src/api/content-halo-run-v1alpha1-tag-api.ts @@ -0,0 +1,647 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Tag } from '../models' +// @ts-ignore +import { TagList } from '../models' +/** + * ContentHaloRunV1alpha1TagApi - axios parameter creator + * @export + */ +export const ContentHaloRunV1alpha1TagApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create content.halo.run/v1alpha1/Tag + * @param {Tag} [tag] Fresh tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Tag: async (tag?: Tag, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/tags` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(tag, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete content.halo.run/v1alpha1/Tag + * @param {string} name Name of tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Tag: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletecontentHaloRunV1alpha1Tag', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/tags/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get content.halo.run/v1alpha1/Tag + * @param {string} name Name of tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Tag: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getcontentHaloRunV1alpha1Tag', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/tags/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List content.halo.run/v1alpha1/Tag + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Tag: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/content.halo.run/v1alpha1/tags` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update content.halo.run/v1alpha1/Tag + * @param {string} name Name of tag + * @param {Tag} [tag] Updated tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Tag: async ( + name: string, + tag?: Tag, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatecontentHaloRunV1alpha1Tag', 'name', name) + const localVarPath = `/apis/content.halo.run/v1alpha1/tags/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(tag, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContentHaloRunV1alpha1TagApi - functional programming interface + * @export + */ +export const ContentHaloRunV1alpha1TagApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ContentHaloRunV1alpha1TagApiAxiosParamCreator(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Tag + * @param {Tag} [tag] Fresh tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createcontentHaloRunV1alpha1Tag( + tag?: Tag, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createcontentHaloRunV1alpha1Tag(tag, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete content.halo.run/v1alpha1/Tag + * @param {string} name Name of tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletecontentHaloRunV1alpha1Tag( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletecontentHaloRunV1alpha1Tag(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get content.halo.run/v1alpha1/Tag + * @param {string} name Name of tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getcontentHaloRunV1alpha1Tag( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getcontentHaloRunV1alpha1Tag(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List content.halo.run/v1alpha1/Tag + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listcontentHaloRunV1alpha1Tag( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listcontentHaloRunV1alpha1Tag( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update content.halo.run/v1alpha1/Tag + * @param {string} name Name of tag + * @param {Tag} [tag] Updated tag + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatecontentHaloRunV1alpha1Tag( + name: string, + tag?: Tag, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatecontentHaloRunV1alpha1Tag(name, tag, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ContentHaloRunV1alpha1TagApi - factory interface + * @export + */ +export const ContentHaloRunV1alpha1TagApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentHaloRunV1alpha1TagApiFp(configuration) + return { + /** + * Create content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiCreatecontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createcontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiCreatecontentHaloRunV1alpha1TagRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createcontentHaloRunV1alpha1Tag(requestParameters.tag, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiDeletecontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletecontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiDeletecontentHaloRunV1alpha1TagRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletecontentHaloRunV1alpha1Tag(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiGetcontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getcontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiGetcontentHaloRunV1alpha1TagRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getcontentHaloRunV1alpha1Tag(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listcontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1TagRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listcontentHaloRunV1alpha1Tag( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatecontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1TagRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatecontentHaloRunV1alpha1Tag(requestParameters.name, requestParameters.tag, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createcontentHaloRunV1alpha1Tag operation in ContentHaloRunV1alpha1TagApi. + * @export + * @interface ContentHaloRunV1alpha1TagApiCreatecontentHaloRunV1alpha1TagRequest + */ +export interface ContentHaloRunV1alpha1TagApiCreatecontentHaloRunV1alpha1TagRequest { + /** + * Fresh tag + * @type {Tag} + * @memberof ContentHaloRunV1alpha1TagApiCreatecontentHaloRunV1alpha1Tag + */ + readonly tag?: Tag +} + +/** + * Request parameters for deletecontentHaloRunV1alpha1Tag operation in ContentHaloRunV1alpha1TagApi. + * @export + * @interface ContentHaloRunV1alpha1TagApiDeletecontentHaloRunV1alpha1TagRequest + */ +export interface ContentHaloRunV1alpha1TagApiDeletecontentHaloRunV1alpha1TagRequest { + /** + * Name of tag + * @type {string} + * @memberof ContentHaloRunV1alpha1TagApiDeletecontentHaloRunV1alpha1Tag + */ + readonly name: string +} + +/** + * Request parameters for getcontentHaloRunV1alpha1Tag operation in ContentHaloRunV1alpha1TagApi. + * @export + * @interface ContentHaloRunV1alpha1TagApiGetcontentHaloRunV1alpha1TagRequest + */ +export interface ContentHaloRunV1alpha1TagApiGetcontentHaloRunV1alpha1TagRequest { + /** + * Name of tag + * @type {string} + * @memberof ContentHaloRunV1alpha1TagApiGetcontentHaloRunV1alpha1Tag + */ + readonly name: string +} + +/** + * Request parameters for listcontentHaloRunV1alpha1Tag operation in ContentHaloRunV1alpha1TagApi. + * @export + * @interface ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1TagRequest + */ +export interface ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1TagRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1Tag + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1Tag + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1Tag + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1Tag + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatecontentHaloRunV1alpha1Tag operation in ContentHaloRunV1alpha1TagApi. + * @export + * @interface ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1TagRequest + */ +export interface ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1TagRequest { + /** + * Name of tag + * @type {string} + * @memberof ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1Tag + */ + readonly name: string + + /** + * Updated tag + * @type {Tag} + * @memberof ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1Tag + */ + readonly tag?: Tag +} + +/** + * ContentHaloRunV1alpha1TagApi - object-oriented interface + * @export + * @class ContentHaloRunV1alpha1TagApi + * @extends {BaseAPI} + */ +export class ContentHaloRunV1alpha1TagApi extends BaseAPI { + /** + * Create content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiCreatecontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1TagApi + */ + public createcontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiCreatecontentHaloRunV1alpha1TagRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1TagApiFp(this.configuration) + .createcontentHaloRunV1alpha1Tag(requestParameters.tag, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiDeletecontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1TagApi + */ + public deletecontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiDeletecontentHaloRunV1alpha1TagRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1TagApiFp(this.configuration) + .deletecontentHaloRunV1alpha1Tag(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiGetcontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1TagApi + */ + public getcontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiGetcontentHaloRunV1alpha1TagRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1TagApiFp(this.configuration) + .getcontentHaloRunV1alpha1Tag(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1TagApi + */ + public listcontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiListcontentHaloRunV1alpha1TagRequest = {}, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1TagApiFp(this.configuration) + .listcontentHaloRunV1alpha1Tag( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update content.halo.run/v1alpha1/Tag + * @param {ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1TagRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentHaloRunV1alpha1TagApi + */ + public updatecontentHaloRunV1alpha1Tag( + requestParameters: ContentHaloRunV1alpha1TagApiUpdatecontentHaloRunV1alpha1TagRequest, + options?: AxiosRequestConfig, + ) { + return ContentHaloRunV1alpha1TagApiFp(this.configuration) + .updatecontentHaloRunV1alpha1Tag(requestParameters.name, requestParameters.tag, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/metrics-halo-run-v1alpha1-counter-api.ts b/packages/api-client/src/api/metrics-halo-run-v1alpha1-counter-api.ts new file mode 100644 index 000000000..ad7cd7e8c --- /dev/null +++ b/packages/api-client/src/api/metrics-halo-run-v1alpha1-counter-api.ts @@ -0,0 +1,657 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Counter } from '../models' +// @ts-ignore +import { CounterList } from '../models' +/** + * MetricsHaloRunV1alpha1CounterApi - axios parameter creator + * @export + */ +export const MetricsHaloRunV1alpha1CounterApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create metrics.halo.run/v1alpha1/Counter + * @param {Counter} [counter] Fresh counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createmetricsHaloRunV1alpha1Counter: async ( + counter?: Counter, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/metrics.halo.run/v1alpha1/counters` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(counter, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete metrics.halo.run/v1alpha1/Counter + * @param {string} name Name of counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletemetricsHaloRunV1alpha1Counter: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletemetricsHaloRunV1alpha1Counter', 'name', name) + const localVarPath = `/apis/metrics.halo.run/v1alpha1/counters/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get metrics.halo.run/v1alpha1/Counter + * @param {string} name Name of counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getmetricsHaloRunV1alpha1Counter: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getmetricsHaloRunV1alpha1Counter', 'name', name) + const localVarPath = `/apis/metrics.halo.run/v1alpha1/counters/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List metrics.halo.run/v1alpha1/Counter + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listmetricsHaloRunV1alpha1Counter: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/metrics.halo.run/v1alpha1/counters` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update metrics.halo.run/v1alpha1/Counter + * @param {string} name Name of counter + * @param {Counter} [counter] Updated counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatemetricsHaloRunV1alpha1Counter: async ( + name: string, + counter?: Counter, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatemetricsHaloRunV1alpha1Counter', 'name', name) + const localVarPath = `/apis/metrics.halo.run/v1alpha1/counters/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(counter, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * MetricsHaloRunV1alpha1CounterApi - functional programming interface + * @export + */ +export const MetricsHaloRunV1alpha1CounterApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = MetricsHaloRunV1alpha1CounterApiAxiosParamCreator(configuration) + return { + /** + * Create metrics.halo.run/v1alpha1/Counter + * @param {Counter} [counter] Fresh counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createmetricsHaloRunV1alpha1Counter( + counter?: Counter, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createmetricsHaloRunV1alpha1Counter(counter, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete metrics.halo.run/v1alpha1/Counter + * @param {string} name Name of counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletemetricsHaloRunV1alpha1Counter( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletemetricsHaloRunV1alpha1Counter(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get metrics.halo.run/v1alpha1/Counter + * @param {string} name Name of counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getmetricsHaloRunV1alpha1Counter( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getmetricsHaloRunV1alpha1Counter(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List metrics.halo.run/v1alpha1/Counter + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listmetricsHaloRunV1alpha1Counter( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listmetricsHaloRunV1alpha1Counter( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update metrics.halo.run/v1alpha1/Counter + * @param {string} name Name of counter + * @param {Counter} [counter] Updated counter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatemetricsHaloRunV1alpha1Counter( + name: string, + counter?: Counter, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatemetricsHaloRunV1alpha1Counter( + name, + counter, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * MetricsHaloRunV1alpha1CounterApi - factory interface + * @export + */ +export const MetricsHaloRunV1alpha1CounterApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = MetricsHaloRunV1alpha1CounterApiFp(configuration) + return { + /** + * Create metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiCreatemetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createmetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiCreatemetricsHaloRunV1alpha1CounterRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createmetricsHaloRunV1alpha1Counter(requestParameters.counter, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiDeletemetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletemetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiDeletemetricsHaloRunV1alpha1CounterRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletemetricsHaloRunV1alpha1Counter(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiGetmetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getmetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiGetmetricsHaloRunV1alpha1CounterRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getmetricsHaloRunV1alpha1Counter(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listmetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1CounterRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listmetricsHaloRunV1alpha1Counter( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatemetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1CounterRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatemetricsHaloRunV1alpha1Counter(requestParameters.name, requestParameters.counter, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createmetricsHaloRunV1alpha1Counter operation in MetricsHaloRunV1alpha1CounterApi. + * @export + * @interface MetricsHaloRunV1alpha1CounterApiCreatemetricsHaloRunV1alpha1CounterRequest + */ +export interface MetricsHaloRunV1alpha1CounterApiCreatemetricsHaloRunV1alpha1CounterRequest { + /** + * Fresh counter + * @type {Counter} + * @memberof MetricsHaloRunV1alpha1CounterApiCreatemetricsHaloRunV1alpha1Counter + */ + readonly counter?: Counter +} + +/** + * Request parameters for deletemetricsHaloRunV1alpha1Counter operation in MetricsHaloRunV1alpha1CounterApi. + * @export + * @interface MetricsHaloRunV1alpha1CounterApiDeletemetricsHaloRunV1alpha1CounterRequest + */ +export interface MetricsHaloRunV1alpha1CounterApiDeletemetricsHaloRunV1alpha1CounterRequest { + /** + * Name of counter + * @type {string} + * @memberof MetricsHaloRunV1alpha1CounterApiDeletemetricsHaloRunV1alpha1Counter + */ + readonly name: string +} + +/** + * Request parameters for getmetricsHaloRunV1alpha1Counter operation in MetricsHaloRunV1alpha1CounterApi. + * @export + * @interface MetricsHaloRunV1alpha1CounterApiGetmetricsHaloRunV1alpha1CounterRequest + */ +export interface MetricsHaloRunV1alpha1CounterApiGetmetricsHaloRunV1alpha1CounterRequest { + /** + * Name of counter + * @type {string} + * @memberof MetricsHaloRunV1alpha1CounterApiGetmetricsHaloRunV1alpha1Counter + */ + readonly name: string +} + +/** + * Request parameters for listmetricsHaloRunV1alpha1Counter operation in MetricsHaloRunV1alpha1CounterApi. + * @export + * @interface MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1CounterRequest + */ +export interface MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1CounterRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1Counter + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1Counter + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1Counter + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1Counter + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatemetricsHaloRunV1alpha1Counter operation in MetricsHaloRunV1alpha1CounterApi. + * @export + * @interface MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1CounterRequest + */ +export interface MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1CounterRequest { + /** + * Name of counter + * @type {string} + * @memberof MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1Counter + */ + readonly name: string + + /** + * Updated counter + * @type {Counter} + * @memberof MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1Counter + */ + readonly counter?: Counter +} + +/** + * MetricsHaloRunV1alpha1CounterApi - object-oriented interface + * @export + * @class MetricsHaloRunV1alpha1CounterApi + * @extends {BaseAPI} + */ +export class MetricsHaloRunV1alpha1CounterApi extends BaseAPI { + /** + * Create metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiCreatemetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetricsHaloRunV1alpha1CounterApi + */ + public createmetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiCreatemetricsHaloRunV1alpha1CounterRequest = {}, + options?: AxiosRequestConfig, + ) { + return MetricsHaloRunV1alpha1CounterApiFp(this.configuration) + .createmetricsHaloRunV1alpha1Counter(requestParameters.counter, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiDeletemetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetricsHaloRunV1alpha1CounterApi + */ + public deletemetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiDeletemetricsHaloRunV1alpha1CounterRequest, + options?: AxiosRequestConfig, + ) { + return MetricsHaloRunV1alpha1CounterApiFp(this.configuration) + .deletemetricsHaloRunV1alpha1Counter(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiGetmetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetricsHaloRunV1alpha1CounterApi + */ + public getmetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiGetmetricsHaloRunV1alpha1CounterRequest, + options?: AxiosRequestConfig, + ) { + return MetricsHaloRunV1alpha1CounterApiFp(this.configuration) + .getmetricsHaloRunV1alpha1Counter(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetricsHaloRunV1alpha1CounterApi + */ + public listmetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiListmetricsHaloRunV1alpha1CounterRequest = {}, + options?: AxiosRequestConfig, + ) { + return MetricsHaloRunV1alpha1CounterApiFp(this.configuration) + .listmetricsHaloRunV1alpha1Counter( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update metrics.halo.run/v1alpha1/Counter + * @param {MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1CounterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetricsHaloRunV1alpha1CounterApi + */ + public updatemetricsHaloRunV1alpha1Counter( + requestParameters: MetricsHaloRunV1alpha1CounterApiUpdatemetricsHaloRunV1alpha1CounterRequest, + options?: AxiosRequestConfig, + ) { + return MetricsHaloRunV1alpha1CounterApiFp(this.configuration) + .updatemetricsHaloRunV1alpha1Counter(requestParameters.name, requestParameters.counter, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/plugin-halo-run-v1alpha1-plugin-api.ts b/packages/api-client/src/api/plugin-halo-run-v1alpha1-plugin-api.ts new file mode 100644 index 000000000..9d247188a --- /dev/null +++ b/packages/api-client/src/api/plugin-halo-run-v1alpha1-plugin-api.ts @@ -0,0 +1,650 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Plugin } from '../models' +// @ts-ignore +import { PluginList } from '../models' +/** + * PluginHaloRunV1alpha1PluginApi - axios parameter creator + * @export + */ +export const PluginHaloRunV1alpha1PluginApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create plugin.halo.run/v1alpha1/Plugin + * @param {Plugin} [plugin] Fresh plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createpluginHaloRunV1alpha1Plugin: async ( + plugin?: Plugin, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/plugin.halo.run/v1alpha1/plugins` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(plugin, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete plugin.halo.run/v1alpha1/Plugin + * @param {string} name Name of plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletepluginHaloRunV1alpha1Plugin: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletepluginHaloRunV1alpha1Plugin', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/plugins/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get plugin.halo.run/v1alpha1/Plugin + * @param {string} name Name of plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getpluginHaloRunV1alpha1Plugin: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getpluginHaloRunV1alpha1Plugin', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/plugins/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List plugin.halo.run/v1alpha1/Plugin + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listpluginHaloRunV1alpha1Plugin: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/plugin.halo.run/v1alpha1/plugins` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update plugin.halo.run/v1alpha1/Plugin + * @param {string} name Name of plugin + * @param {Plugin} [plugin] Updated plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatepluginHaloRunV1alpha1Plugin: async ( + name: string, + plugin?: Plugin, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatepluginHaloRunV1alpha1Plugin', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/plugins/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(plugin, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * PluginHaloRunV1alpha1PluginApi - functional programming interface + * @export + */ +export const PluginHaloRunV1alpha1PluginApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = PluginHaloRunV1alpha1PluginApiAxiosParamCreator(configuration) + return { + /** + * Create plugin.halo.run/v1alpha1/Plugin + * @param {Plugin} [plugin] Fresh plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createpluginHaloRunV1alpha1Plugin( + plugin?: Plugin, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createpluginHaloRunV1alpha1Plugin(plugin, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete plugin.halo.run/v1alpha1/Plugin + * @param {string} name Name of plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletepluginHaloRunV1alpha1Plugin( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletepluginHaloRunV1alpha1Plugin(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get plugin.halo.run/v1alpha1/Plugin + * @param {string} name Name of plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getpluginHaloRunV1alpha1Plugin( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getpluginHaloRunV1alpha1Plugin(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List plugin.halo.run/v1alpha1/Plugin + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listpluginHaloRunV1alpha1Plugin( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listpluginHaloRunV1alpha1Plugin( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update plugin.halo.run/v1alpha1/Plugin + * @param {string} name Name of plugin + * @param {Plugin} [plugin] Updated plugin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatepluginHaloRunV1alpha1Plugin( + name: string, + plugin?: Plugin, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatepluginHaloRunV1alpha1Plugin(name, plugin, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * PluginHaloRunV1alpha1PluginApi - factory interface + * @export + */ +export const PluginHaloRunV1alpha1PluginApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PluginHaloRunV1alpha1PluginApiFp(configuration) + return { + /** + * Create plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiCreatepluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createpluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiCreatepluginHaloRunV1alpha1PluginRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createpluginHaloRunV1alpha1Plugin(requestParameters.plugin, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiDeletepluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletepluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiDeletepluginHaloRunV1alpha1PluginRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletepluginHaloRunV1alpha1Plugin(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiGetpluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getpluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiGetpluginHaloRunV1alpha1PluginRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getpluginHaloRunV1alpha1Plugin(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listpluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1PluginRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listpluginHaloRunV1alpha1Plugin( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatepluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1PluginRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatepluginHaloRunV1alpha1Plugin(requestParameters.name, requestParameters.plugin, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createpluginHaloRunV1alpha1Plugin operation in PluginHaloRunV1alpha1PluginApi. + * @export + * @interface PluginHaloRunV1alpha1PluginApiCreatepluginHaloRunV1alpha1PluginRequest + */ +export interface PluginHaloRunV1alpha1PluginApiCreatepluginHaloRunV1alpha1PluginRequest { + /** + * Fresh plugin + * @type {Plugin} + * @memberof PluginHaloRunV1alpha1PluginApiCreatepluginHaloRunV1alpha1Plugin + */ + readonly plugin?: Plugin +} + +/** + * Request parameters for deletepluginHaloRunV1alpha1Plugin operation in PluginHaloRunV1alpha1PluginApi. + * @export + * @interface PluginHaloRunV1alpha1PluginApiDeletepluginHaloRunV1alpha1PluginRequest + */ +export interface PluginHaloRunV1alpha1PluginApiDeletepluginHaloRunV1alpha1PluginRequest { + /** + * Name of plugin + * @type {string} + * @memberof PluginHaloRunV1alpha1PluginApiDeletepluginHaloRunV1alpha1Plugin + */ + readonly name: string +} + +/** + * Request parameters for getpluginHaloRunV1alpha1Plugin operation in PluginHaloRunV1alpha1PluginApi. + * @export + * @interface PluginHaloRunV1alpha1PluginApiGetpluginHaloRunV1alpha1PluginRequest + */ +export interface PluginHaloRunV1alpha1PluginApiGetpluginHaloRunV1alpha1PluginRequest { + /** + * Name of plugin + * @type {string} + * @memberof PluginHaloRunV1alpha1PluginApiGetpluginHaloRunV1alpha1Plugin + */ + readonly name: string +} + +/** + * Request parameters for listpluginHaloRunV1alpha1Plugin operation in PluginHaloRunV1alpha1PluginApi. + * @export + * @interface PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1PluginRequest + */ +export interface PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1PluginRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1Plugin + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1Plugin + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1Plugin + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1Plugin + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatepluginHaloRunV1alpha1Plugin operation in PluginHaloRunV1alpha1PluginApi. + * @export + * @interface PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1PluginRequest + */ +export interface PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1PluginRequest { + /** + * Name of plugin + * @type {string} + * @memberof PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1Plugin + */ + readonly name: string + + /** + * Updated plugin + * @type {Plugin} + * @memberof PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1Plugin + */ + readonly plugin?: Plugin +} + +/** + * PluginHaloRunV1alpha1PluginApi - object-oriented interface + * @export + * @class PluginHaloRunV1alpha1PluginApi + * @extends {BaseAPI} + */ +export class PluginHaloRunV1alpha1PluginApi extends BaseAPI { + /** + * Create plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiCreatepluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1PluginApi + */ + public createpluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiCreatepluginHaloRunV1alpha1PluginRequest = {}, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1PluginApiFp(this.configuration) + .createpluginHaloRunV1alpha1Plugin(requestParameters.plugin, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiDeletepluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1PluginApi + */ + public deletepluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiDeletepluginHaloRunV1alpha1PluginRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1PluginApiFp(this.configuration) + .deletepluginHaloRunV1alpha1Plugin(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiGetpluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1PluginApi + */ + public getpluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiGetpluginHaloRunV1alpha1PluginRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1PluginApiFp(this.configuration) + .getpluginHaloRunV1alpha1Plugin(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1PluginApi + */ + public listpluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiListpluginHaloRunV1alpha1PluginRequest = {}, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1PluginApiFp(this.configuration) + .listpluginHaloRunV1alpha1Plugin( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update plugin.halo.run/v1alpha1/Plugin + * @param {PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1PluginRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1PluginApi + */ + public updatepluginHaloRunV1alpha1Plugin( + requestParameters: PluginHaloRunV1alpha1PluginApiUpdatepluginHaloRunV1alpha1PluginRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1PluginApiFp(this.configuration) + .updatepluginHaloRunV1alpha1Plugin(requestParameters.name, requestParameters.plugin, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/plugin-halo-run-v1alpha1-reverse-proxy-api.ts b/packages/api-client/src/api/plugin-halo-run-v1alpha1-reverse-proxy-api.ts new file mode 100644 index 000000000..300c74df6 --- /dev/null +++ b/packages/api-client/src/api/plugin-halo-run-v1alpha1-reverse-proxy-api.ts @@ -0,0 +1,663 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { ReverseProxy } from '../models' +// @ts-ignore +import { ReverseProxyList } from '../models' +/** + * PluginHaloRunV1alpha1ReverseProxyApi - axios parameter creator + * @export + */ +export const PluginHaloRunV1alpha1ReverseProxyApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create plugin.halo.run/v1alpha1/ReverseProxy + * @param {ReverseProxy} [reverseProxy] Fresh reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createpluginHaloRunV1alpha1ReverseProxy: async ( + reverseProxy?: ReverseProxy, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/plugin.halo.run/v1alpha1/reverseproxies` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(reverseProxy, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete plugin.halo.run/v1alpha1/ReverseProxy + * @param {string} name Name of reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletepluginHaloRunV1alpha1ReverseProxy: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletepluginHaloRunV1alpha1ReverseProxy', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/reverseproxies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get plugin.halo.run/v1alpha1/ReverseProxy + * @param {string} name Name of reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getpluginHaloRunV1alpha1ReverseProxy: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getpluginHaloRunV1alpha1ReverseProxy', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/reverseproxies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List plugin.halo.run/v1alpha1/ReverseProxy + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listpluginHaloRunV1alpha1ReverseProxy: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/plugin.halo.run/v1alpha1/reverseproxies` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update plugin.halo.run/v1alpha1/ReverseProxy + * @param {string} name Name of reverseproxy + * @param {ReverseProxy} [reverseProxy] Updated reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatepluginHaloRunV1alpha1ReverseProxy: async ( + name: string, + reverseProxy?: ReverseProxy, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatepluginHaloRunV1alpha1ReverseProxy', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/reverseproxies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(reverseProxy, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * PluginHaloRunV1alpha1ReverseProxyApi - functional programming interface + * @export + */ +export const PluginHaloRunV1alpha1ReverseProxyApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = PluginHaloRunV1alpha1ReverseProxyApiAxiosParamCreator(configuration) + return { + /** + * Create plugin.halo.run/v1alpha1/ReverseProxy + * @param {ReverseProxy} [reverseProxy] Fresh reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createpluginHaloRunV1alpha1ReverseProxy( + reverseProxy?: ReverseProxy, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createpluginHaloRunV1alpha1ReverseProxy( + reverseProxy, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete plugin.halo.run/v1alpha1/ReverseProxy + * @param {string} name Name of reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletepluginHaloRunV1alpha1ReverseProxy( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletepluginHaloRunV1alpha1ReverseProxy(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get plugin.halo.run/v1alpha1/ReverseProxy + * @param {string} name Name of reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getpluginHaloRunV1alpha1ReverseProxy( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getpluginHaloRunV1alpha1ReverseProxy(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List plugin.halo.run/v1alpha1/ReverseProxy + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listpluginHaloRunV1alpha1ReverseProxy( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listpluginHaloRunV1alpha1ReverseProxy( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update plugin.halo.run/v1alpha1/ReverseProxy + * @param {string} name Name of reverseproxy + * @param {ReverseProxy} [reverseProxy] Updated reverseproxy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatepluginHaloRunV1alpha1ReverseProxy( + name: string, + reverseProxy?: ReverseProxy, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatepluginHaloRunV1alpha1ReverseProxy( + name, + reverseProxy, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * PluginHaloRunV1alpha1ReverseProxyApi - factory interface + * @export + */ +export const PluginHaloRunV1alpha1ReverseProxyApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PluginHaloRunV1alpha1ReverseProxyApiFp(configuration) + return { + /** + * Create plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiCreatepluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createpluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiCreatepluginHaloRunV1alpha1ReverseProxyRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createpluginHaloRunV1alpha1ReverseProxy(requestParameters.reverseProxy, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiDeletepluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletepluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiDeletepluginHaloRunV1alpha1ReverseProxyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletepluginHaloRunV1alpha1ReverseProxy(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiGetpluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getpluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiGetpluginHaloRunV1alpha1ReverseProxyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getpluginHaloRunV1alpha1ReverseProxy(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listpluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxyRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listpluginHaloRunV1alpha1ReverseProxy( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatepluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatepluginHaloRunV1alpha1ReverseProxy(requestParameters.name, requestParameters.reverseProxy, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createpluginHaloRunV1alpha1ReverseProxy operation in PluginHaloRunV1alpha1ReverseProxyApi. + * @export + * @interface PluginHaloRunV1alpha1ReverseProxyApiCreatepluginHaloRunV1alpha1ReverseProxyRequest + */ +export interface PluginHaloRunV1alpha1ReverseProxyApiCreatepluginHaloRunV1alpha1ReverseProxyRequest { + /** + * Fresh reverseproxy + * @type {ReverseProxy} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiCreatepluginHaloRunV1alpha1ReverseProxy + */ + readonly reverseProxy?: ReverseProxy +} + +/** + * Request parameters for deletepluginHaloRunV1alpha1ReverseProxy operation in PluginHaloRunV1alpha1ReverseProxyApi. + * @export + * @interface PluginHaloRunV1alpha1ReverseProxyApiDeletepluginHaloRunV1alpha1ReverseProxyRequest + */ +export interface PluginHaloRunV1alpha1ReverseProxyApiDeletepluginHaloRunV1alpha1ReverseProxyRequest { + /** + * Name of reverseproxy + * @type {string} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiDeletepluginHaloRunV1alpha1ReverseProxy + */ + readonly name: string +} + +/** + * Request parameters for getpluginHaloRunV1alpha1ReverseProxy operation in PluginHaloRunV1alpha1ReverseProxyApi. + * @export + * @interface PluginHaloRunV1alpha1ReverseProxyApiGetpluginHaloRunV1alpha1ReverseProxyRequest + */ +export interface PluginHaloRunV1alpha1ReverseProxyApiGetpluginHaloRunV1alpha1ReverseProxyRequest { + /** + * Name of reverseproxy + * @type {string} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiGetpluginHaloRunV1alpha1ReverseProxy + */ + readonly name: string +} + +/** + * Request parameters for listpluginHaloRunV1alpha1ReverseProxy operation in PluginHaloRunV1alpha1ReverseProxyApi. + * @export + * @interface PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxyRequest + */ +export interface PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxyRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxy + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxy + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxy + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxy + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatepluginHaloRunV1alpha1ReverseProxy operation in PluginHaloRunV1alpha1ReverseProxyApi. + * @export + * @interface PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxyRequest + */ +export interface PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxyRequest { + /** + * Name of reverseproxy + * @type {string} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxy + */ + readonly name: string + + /** + * Updated reverseproxy + * @type {ReverseProxy} + * @memberof PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxy + */ + readonly reverseProxy?: ReverseProxy +} + +/** + * PluginHaloRunV1alpha1ReverseProxyApi - object-oriented interface + * @export + * @class PluginHaloRunV1alpha1ReverseProxyApi + * @extends {BaseAPI} + */ +export class PluginHaloRunV1alpha1ReverseProxyApi extends BaseAPI { + /** + * Create plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiCreatepluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1ReverseProxyApi + */ + public createpluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiCreatepluginHaloRunV1alpha1ReverseProxyRequest = {}, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1ReverseProxyApiFp(this.configuration) + .createpluginHaloRunV1alpha1ReverseProxy(requestParameters.reverseProxy, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiDeletepluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1ReverseProxyApi + */ + public deletepluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiDeletepluginHaloRunV1alpha1ReverseProxyRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1ReverseProxyApiFp(this.configuration) + .deletepluginHaloRunV1alpha1ReverseProxy(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiGetpluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1ReverseProxyApi + */ + public getpluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiGetpluginHaloRunV1alpha1ReverseProxyRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1ReverseProxyApiFp(this.configuration) + .getpluginHaloRunV1alpha1ReverseProxy(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1ReverseProxyApi + */ + public listpluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiListpluginHaloRunV1alpha1ReverseProxyRequest = {}, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1ReverseProxyApiFp(this.configuration) + .listpluginHaloRunV1alpha1ReverseProxy( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update plugin.halo.run/v1alpha1/ReverseProxy + * @param {PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1ReverseProxyApi + */ + public updatepluginHaloRunV1alpha1ReverseProxy( + requestParameters: PluginHaloRunV1alpha1ReverseProxyApiUpdatepluginHaloRunV1alpha1ReverseProxyRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1ReverseProxyApiFp(this.configuration) + .updatepluginHaloRunV1alpha1ReverseProxy(requestParameters.name, requestParameters.reverseProxy, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/plugin-halo-run-v1alpha1-search-engine-api.ts b/packages/api-client/src/api/plugin-halo-run-v1alpha1-search-engine-api.ts new file mode 100644 index 000000000..9dbf80993 --- /dev/null +++ b/packages/api-client/src/api/plugin-halo-run-v1alpha1-search-engine-api.ts @@ -0,0 +1,663 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { SearchEngine } from '../models' +// @ts-ignore +import { SearchEngineList } from '../models' +/** + * PluginHaloRunV1alpha1SearchEngineApi - axios parameter creator + * @export + */ +export const PluginHaloRunV1alpha1SearchEngineApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create plugin.halo.run/v1alpha1/SearchEngine + * @param {SearchEngine} [searchEngine] Fresh searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createpluginHaloRunV1alpha1SearchEngine: async ( + searchEngine?: SearchEngine, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/plugin.halo.run/v1alpha1/searchengines` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(searchEngine, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete plugin.halo.run/v1alpha1/SearchEngine + * @param {string} name Name of searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletepluginHaloRunV1alpha1SearchEngine: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletepluginHaloRunV1alpha1SearchEngine', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/searchengines/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get plugin.halo.run/v1alpha1/SearchEngine + * @param {string} name Name of searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getpluginHaloRunV1alpha1SearchEngine: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getpluginHaloRunV1alpha1SearchEngine', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/searchengines/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List plugin.halo.run/v1alpha1/SearchEngine + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listpluginHaloRunV1alpha1SearchEngine: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/plugin.halo.run/v1alpha1/searchengines` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update plugin.halo.run/v1alpha1/SearchEngine + * @param {string} name Name of searchengine + * @param {SearchEngine} [searchEngine] Updated searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatepluginHaloRunV1alpha1SearchEngine: async ( + name: string, + searchEngine?: SearchEngine, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatepluginHaloRunV1alpha1SearchEngine', 'name', name) + const localVarPath = `/apis/plugin.halo.run/v1alpha1/searchengines/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(searchEngine, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * PluginHaloRunV1alpha1SearchEngineApi - functional programming interface + * @export + */ +export const PluginHaloRunV1alpha1SearchEngineApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = PluginHaloRunV1alpha1SearchEngineApiAxiosParamCreator(configuration) + return { + /** + * Create plugin.halo.run/v1alpha1/SearchEngine + * @param {SearchEngine} [searchEngine] Fresh searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createpluginHaloRunV1alpha1SearchEngine( + searchEngine?: SearchEngine, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createpluginHaloRunV1alpha1SearchEngine( + searchEngine, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete plugin.halo.run/v1alpha1/SearchEngine + * @param {string} name Name of searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletepluginHaloRunV1alpha1SearchEngine( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletepluginHaloRunV1alpha1SearchEngine(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get plugin.halo.run/v1alpha1/SearchEngine + * @param {string} name Name of searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getpluginHaloRunV1alpha1SearchEngine( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getpluginHaloRunV1alpha1SearchEngine(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List plugin.halo.run/v1alpha1/SearchEngine + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listpluginHaloRunV1alpha1SearchEngine( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listpluginHaloRunV1alpha1SearchEngine( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update plugin.halo.run/v1alpha1/SearchEngine + * @param {string} name Name of searchengine + * @param {SearchEngine} [searchEngine] Updated searchengine + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatepluginHaloRunV1alpha1SearchEngine( + name: string, + searchEngine?: SearchEngine, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatepluginHaloRunV1alpha1SearchEngine( + name, + searchEngine, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * PluginHaloRunV1alpha1SearchEngineApi - factory interface + * @export + */ +export const PluginHaloRunV1alpha1SearchEngineApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PluginHaloRunV1alpha1SearchEngineApiFp(configuration) + return { + /** + * Create plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiCreatepluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createpluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiCreatepluginHaloRunV1alpha1SearchEngineRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createpluginHaloRunV1alpha1SearchEngine(requestParameters.searchEngine, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiDeletepluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletepluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiDeletepluginHaloRunV1alpha1SearchEngineRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletepluginHaloRunV1alpha1SearchEngine(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiGetpluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getpluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiGetpluginHaloRunV1alpha1SearchEngineRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getpluginHaloRunV1alpha1SearchEngine(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listpluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngineRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listpluginHaloRunV1alpha1SearchEngine( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatepluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngineRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatepluginHaloRunV1alpha1SearchEngine(requestParameters.name, requestParameters.searchEngine, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createpluginHaloRunV1alpha1SearchEngine operation in PluginHaloRunV1alpha1SearchEngineApi. + * @export + * @interface PluginHaloRunV1alpha1SearchEngineApiCreatepluginHaloRunV1alpha1SearchEngineRequest + */ +export interface PluginHaloRunV1alpha1SearchEngineApiCreatepluginHaloRunV1alpha1SearchEngineRequest { + /** + * Fresh searchengine + * @type {SearchEngine} + * @memberof PluginHaloRunV1alpha1SearchEngineApiCreatepluginHaloRunV1alpha1SearchEngine + */ + readonly searchEngine?: SearchEngine +} + +/** + * Request parameters for deletepluginHaloRunV1alpha1SearchEngine operation in PluginHaloRunV1alpha1SearchEngineApi. + * @export + * @interface PluginHaloRunV1alpha1SearchEngineApiDeletepluginHaloRunV1alpha1SearchEngineRequest + */ +export interface PluginHaloRunV1alpha1SearchEngineApiDeletepluginHaloRunV1alpha1SearchEngineRequest { + /** + * Name of searchengine + * @type {string} + * @memberof PluginHaloRunV1alpha1SearchEngineApiDeletepluginHaloRunV1alpha1SearchEngine + */ + readonly name: string +} + +/** + * Request parameters for getpluginHaloRunV1alpha1SearchEngine operation in PluginHaloRunV1alpha1SearchEngineApi. + * @export + * @interface PluginHaloRunV1alpha1SearchEngineApiGetpluginHaloRunV1alpha1SearchEngineRequest + */ +export interface PluginHaloRunV1alpha1SearchEngineApiGetpluginHaloRunV1alpha1SearchEngineRequest { + /** + * Name of searchengine + * @type {string} + * @memberof PluginHaloRunV1alpha1SearchEngineApiGetpluginHaloRunV1alpha1SearchEngine + */ + readonly name: string +} + +/** + * Request parameters for listpluginHaloRunV1alpha1SearchEngine operation in PluginHaloRunV1alpha1SearchEngineApi. + * @export + * @interface PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngineRequest + */ +export interface PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngineRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngine + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngine + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngine + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngine + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatepluginHaloRunV1alpha1SearchEngine operation in PluginHaloRunV1alpha1SearchEngineApi. + * @export + * @interface PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngineRequest + */ +export interface PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngineRequest { + /** + * Name of searchengine + * @type {string} + * @memberof PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngine + */ + readonly name: string + + /** + * Updated searchengine + * @type {SearchEngine} + * @memberof PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngine + */ + readonly searchEngine?: SearchEngine +} + +/** + * PluginHaloRunV1alpha1SearchEngineApi - object-oriented interface + * @export + * @class PluginHaloRunV1alpha1SearchEngineApi + * @extends {BaseAPI} + */ +export class PluginHaloRunV1alpha1SearchEngineApi extends BaseAPI { + /** + * Create plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiCreatepluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1SearchEngineApi + */ + public createpluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiCreatepluginHaloRunV1alpha1SearchEngineRequest = {}, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1SearchEngineApiFp(this.configuration) + .createpluginHaloRunV1alpha1SearchEngine(requestParameters.searchEngine, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiDeletepluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1SearchEngineApi + */ + public deletepluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiDeletepluginHaloRunV1alpha1SearchEngineRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1SearchEngineApiFp(this.configuration) + .deletepluginHaloRunV1alpha1SearchEngine(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiGetpluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1SearchEngineApi + */ + public getpluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiGetpluginHaloRunV1alpha1SearchEngineRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1SearchEngineApiFp(this.configuration) + .getpluginHaloRunV1alpha1SearchEngine(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1SearchEngineApi + */ + public listpluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiListpluginHaloRunV1alpha1SearchEngineRequest = {}, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1SearchEngineApiFp(this.configuration) + .listpluginHaloRunV1alpha1SearchEngine( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update plugin.halo.run/v1alpha1/SearchEngine + * @param {PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngineRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PluginHaloRunV1alpha1SearchEngineApi + */ + public updatepluginHaloRunV1alpha1SearchEngine( + requestParameters: PluginHaloRunV1alpha1SearchEngineApiUpdatepluginHaloRunV1alpha1SearchEngineRequest, + options?: AxiosRequestConfig, + ) { + return PluginHaloRunV1alpha1SearchEngineApiFp(this.configuration) + .updatepluginHaloRunV1alpha1SearchEngine(requestParameters.name, requestParameters.searchEngine, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/storage-halo-run-v1alpha1-attachment-api.ts b/packages/api-client/src/api/storage-halo-run-v1alpha1-attachment-api.ts new file mode 100644 index 000000000..0591ede4e --- /dev/null +++ b/packages/api-client/src/api/storage-halo-run-v1alpha1-attachment-api.ts @@ -0,0 +1,663 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Attachment } from '../models' +// @ts-ignore +import { AttachmentList } from '../models' +/** + * StorageHaloRunV1alpha1AttachmentApi - axios parameter creator + * @export + */ +export const StorageHaloRunV1alpha1AttachmentApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create storage.halo.run/v1alpha1/Attachment + * @param {Attachment} [attachment] Fresh attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1Attachment: async ( + attachment?: Attachment, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/attachments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(attachment, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete storage.halo.run/v1alpha1/Attachment + * @param {string} name Name of attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1Attachment: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletestorageHaloRunV1alpha1Attachment', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/attachments/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get storage.halo.run/v1alpha1/Attachment + * @param {string} name Name of attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1Attachment: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getstorageHaloRunV1alpha1Attachment', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/attachments/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List storage.halo.run/v1alpha1/Attachment + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1Attachment: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/attachments` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update storage.halo.run/v1alpha1/Attachment + * @param {string} name Name of attachment + * @param {Attachment} [attachment] Updated attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1Attachment: async ( + name: string, + attachment?: Attachment, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatestorageHaloRunV1alpha1Attachment', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/attachments/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(attachment, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * StorageHaloRunV1alpha1AttachmentApi - functional programming interface + * @export + */ +export const StorageHaloRunV1alpha1AttachmentApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = StorageHaloRunV1alpha1AttachmentApiAxiosParamCreator(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/Attachment + * @param {Attachment} [attachment] Fresh attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createstorageHaloRunV1alpha1Attachment( + attachment?: Attachment, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createstorageHaloRunV1alpha1Attachment( + attachment, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete storage.halo.run/v1alpha1/Attachment + * @param {string} name Name of attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletestorageHaloRunV1alpha1Attachment( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletestorageHaloRunV1alpha1Attachment(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get storage.halo.run/v1alpha1/Attachment + * @param {string} name Name of attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getstorageHaloRunV1alpha1Attachment( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getstorageHaloRunV1alpha1Attachment(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List storage.halo.run/v1alpha1/Attachment + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async liststorageHaloRunV1alpha1Attachment( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.liststorageHaloRunV1alpha1Attachment( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update storage.halo.run/v1alpha1/Attachment + * @param {string} name Name of attachment + * @param {Attachment} [attachment] Updated attachment + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatestorageHaloRunV1alpha1Attachment( + name: string, + attachment?: Attachment, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatestorageHaloRunV1alpha1Attachment( + name, + attachment, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * StorageHaloRunV1alpha1AttachmentApi - factory interface + * @export + */ +export const StorageHaloRunV1alpha1AttachmentApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = StorageHaloRunV1alpha1AttachmentApiFp(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiCreatestorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiCreatestorageHaloRunV1alpha1AttachmentRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createstorageHaloRunV1alpha1Attachment(requestParameters.attachment, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiDeletestorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiDeletestorageHaloRunV1alpha1AttachmentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletestorageHaloRunV1alpha1Attachment(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiGetstorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiGetstorageHaloRunV1alpha1AttachmentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getstorageHaloRunV1alpha1Attachment(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1AttachmentRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .liststorageHaloRunV1alpha1Attachment( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1AttachmentRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatestorageHaloRunV1alpha1Attachment(requestParameters.name, requestParameters.attachment, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createstorageHaloRunV1alpha1Attachment operation in StorageHaloRunV1alpha1AttachmentApi. + * @export + * @interface StorageHaloRunV1alpha1AttachmentApiCreatestorageHaloRunV1alpha1AttachmentRequest + */ +export interface StorageHaloRunV1alpha1AttachmentApiCreatestorageHaloRunV1alpha1AttachmentRequest { + /** + * Fresh attachment + * @type {Attachment} + * @memberof StorageHaloRunV1alpha1AttachmentApiCreatestorageHaloRunV1alpha1Attachment + */ + readonly attachment?: Attachment +} + +/** + * Request parameters for deletestorageHaloRunV1alpha1Attachment operation in StorageHaloRunV1alpha1AttachmentApi. + * @export + * @interface StorageHaloRunV1alpha1AttachmentApiDeletestorageHaloRunV1alpha1AttachmentRequest + */ +export interface StorageHaloRunV1alpha1AttachmentApiDeletestorageHaloRunV1alpha1AttachmentRequest { + /** + * Name of attachment + * @type {string} + * @memberof StorageHaloRunV1alpha1AttachmentApiDeletestorageHaloRunV1alpha1Attachment + */ + readonly name: string +} + +/** + * Request parameters for getstorageHaloRunV1alpha1Attachment operation in StorageHaloRunV1alpha1AttachmentApi. + * @export + * @interface StorageHaloRunV1alpha1AttachmentApiGetstorageHaloRunV1alpha1AttachmentRequest + */ +export interface StorageHaloRunV1alpha1AttachmentApiGetstorageHaloRunV1alpha1AttachmentRequest { + /** + * Name of attachment + * @type {string} + * @memberof StorageHaloRunV1alpha1AttachmentApiGetstorageHaloRunV1alpha1Attachment + */ + readonly name: string +} + +/** + * Request parameters for liststorageHaloRunV1alpha1Attachment operation in StorageHaloRunV1alpha1AttachmentApi. + * @export + * @interface StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1AttachmentRequest + */ +export interface StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1AttachmentRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1Attachment + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1Attachment + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1Attachment + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1Attachment + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatestorageHaloRunV1alpha1Attachment operation in StorageHaloRunV1alpha1AttachmentApi. + * @export + * @interface StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1AttachmentRequest + */ +export interface StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1AttachmentRequest { + /** + * Name of attachment + * @type {string} + * @memberof StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1Attachment + */ + readonly name: string + + /** + * Updated attachment + * @type {Attachment} + * @memberof StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1Attachment + */ + readonly attachment?: Attachment +} + +/** + * StorageHaloRunV1alpha1AttachmentApi - object-oriented interface + * @export + * @class StorageHaloRunV1alpha1AttachmentApi + * @extends {BaseAPI} + */ +export class StorageHaloRunV1alpha1AttachmentApi extends BaseAPI { + /** + * Create storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiCreatestorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1AttachmentApi + */ + public createstorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiCreatestorageHaloRunV1alpha1AttachmentRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1AttachmentApiFp(this.configuration) + .createstorageHaloRunV1alpha1Attachment(requestParameters.attachment, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiDeletestorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1AttachmentApi + */ + public deletestorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiDeletestorageHaloRunV1alpha1AttachmentRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1AttachmentApiFp(this.configuration) + .deletestorageHaloRunV1alpha1Attachment(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiGetstorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1AttachmentApi + */ + public getstorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiGetstorageHaloRunV1alpha1AttachmentRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1AttachmentApiFp(this.configuration) + .getstorageHaloRunV1alpha1Attachment(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1AttachmentApi + */ + public liststorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiListstorageHaloRunV1alpha1AttachmentRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1AttachmentApiFp(this.configuration) + .liststorageHaloRunV1alpha1Attachment( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update storage.halo.run/v1alpha1/Attachment + * @param {StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1AttachmentRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1AttachmentApi + */ + public updatestorageHaloRunV1alpha1Attachment( + requestParameters: StorageHaloRunV1alpha1AttachmentApiUpdatestorageHaloRunV1alpha1AttachmentRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1AttachmentApiFp(this.configuration) + .updatestorageHaloRunV1alpha1Attachment(requestParameters.name, requestParameters.attachment, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/storage-halo-run-v1alpha1-group-api.ts b/packages/api-client/src/api/storage-halo-run-v1alpha1-group-api.ts new file mode 100644 index 000000000..4c79f0120 --- /dev/null +++ b/packages/api-client/src/api/storage-halo-run-v1alpha1-group-api.ts @@ -0,0 +1,650 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Group } from '../models' +// @ts-ignore +import { GroupList } from '../models' +/** + * StorageHaloRunV1alpha1GroupApi - axios parameter creator + * @export + */ +export const StorageHaloRunV1alpha1GroupApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create storage.halo.run/v1alpha1/Group + * @param {Group} [group] Fresh group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1Group: async ( + group?: Group, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/groups` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(group, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete storage.halo.run/v1alpha1/Group + * @param {string} name Name of group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1Group: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletestorageHaloRunV1alpha1Group', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/groups/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get storage.halo.run/v1alpha1/Group + * @param {string} name Name of group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1Group: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getstorageHaloRunV1alpha1Group', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/groups/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List storage.halo.run/v1alpha1/Group + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1Group: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/groups` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update storage.halo.run/v1alpha1/Group + * @param {string} name Name of group + * @param {Group} [group] Updated group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1Group: async ( + name: string, + group?: Group, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatestorageHaloRunV1alpha1Group', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/groups/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(group, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * StorageHaloRunV1alpha1GroupApi - functional programming interface + * @export + */ +export const StorageHaloRunV1alpha1GroupApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = StorageHaloRunV1alpha1GroupApiAxiosParamCreator(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/Group + * @param {Group} [group] Fresh group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createstorageHaloRunV1alpha1Group( + group?: Group, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createstorageHaloRunV1alpha1Group(group, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete storage.halo.run/v1alpha1/Group + * @param {string} name Name of group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletestorageHaloRunV1alpha1Group( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletestorageHaloRunV1alpha1Group(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get storage.halo.run/v1alpha1/Group + * @param {string} name Name of group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getstorageHaloRunV1alpha1Group( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getstorageHaloRunV1alpha1Group(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List storage.halo.run/v1alpha1/Group + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async liststorageHaloRunV1alpha1Group( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.liststorageHaloRunV1alpha1Group( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update storage.halo.run/v1alpha1/Group + * @param {string} name Name of group + * @param {Group} [group] Updated group + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatestorageHaloRunV1alpha1Group( + name: string, + group?: Group, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatestorageHaloRunV1alpha1Group(name, group, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * StorageHaloRunV1alpha1GroupApi - factory interface + * @export + */ +export const StorageHaloRunV1alpha1GroupApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = StorageHaloRunV1alpha1GroupApiFp(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiCreatestorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiCreatestorageHaloRunV1alpha1GroupRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createstorageHaloRunV1alpha1Group(requestParameters.group, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiDeletestorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiDeletestorageHaloRunV1alpha1GroupRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletestorageHaloRunV1alpha1Group(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiGetstorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiGetstorageHaloRunV1alpha1GroupRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getstorageHaloRunV1alpha1Group(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1GroupRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .liststorageHaloRunV1alpha1Group( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1GroupRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatestorageHaloRunV1alpha1Group(requestParameters.name, requestParameters.group, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createstorageHaloRunV1alpha1Group operation in StorageHaloRunV1alpha1GroupApi. + * @export + * @interface StorageHaloRunV1alpha1GroupApiCreatestorageHaloRunV1alpha1GroupRequest + */ +export interface StorageHaloRunV1alpha1GroupApiCreatestorageHaloRunV1alpha1GroupRequest { + /** + * Fresh group + * @type {Group} + * @memberof StorageHaloRunV1alpha1GroupApiCreatestorageHaloRunV1alpha1Group + */ + readonly group?: Group +} + +/** + * Request parameters for deletestorageHaloRunV1alpha1Group operation in StorageHaloRunV1alpha1GroupApi. + * @export + * @interface StorageHaloRunV1alpha1GroupApiDeletestorageHaloRunV1alpha1GroupRequest + */ +export interface StorageHaloRunV1alpha1GroupApiDeletestorageHaloRunV1alpha1GroupRequest { + /** + * Name of group + * @type {string} + * @memberof StorageHaloRunV1alpha1GroupApiDeletestorageHaloRunV1alpha1Group + */ + readonly name: string +} + +/** + * Request parameters for getstorageHaloRunV1alpha1Group operation in StorageHaloRunV1alpha1GroupApi. + * @export + * @interface StorageHaloRunV1alpha1GroupApiGetstorageHaloRunV1alpha1GroupRequest + */ +export interface StorageHaloRunV1alpha1GroupApiGetstorageHaloRunV1alpha1GroupRequest { + /** + * Name of group + * @type {string} + * @memberof StorageHaloRunV1alpha1GroupApiGetstorageHaloRunV1alpha1Group + */ + readonly name: string +} + +/** + * Request parameters for liststorageHaloRunV1alpha1Group operation in StorageHaloRunV1alpha1GroupApi. + * @export + * @interface StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1GroupRequest + */ +export interface StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1GroupRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1Group + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1Group + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1Group + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1Group + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatestorageHaloRunV1alpha1Group operation in StorageHaloRunV1alpha1GroupApi. + * @export + * @interface StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1GroupRequest + */ +export interface StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1GroupRequest { + /** + * Name of group + * @type {string} + * @memberof StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1Group + */ + readonly name: string + + /** + * Updated group + * @type {Group} + * @memberof StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1Group + */ + readonly group?: Group +} + +/** + * StorageHaloRunV1alpha1GroupApi - object-oriented interface + * @export + * @class StorageHaloRunV1alpha1GroupApi + * @extends {BaseAPI} + */ +export class StorageHaloRunV1alpha1GroupApi extends BaseAPI { + /** + * Create storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiCreatestorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1GroupApi + */ + public createstorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiCreatestorageHaloRunV1alpha1GroupRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1GroupApiFp(this.configuration) + .createstorageHaloRunV1alpha1Group(requestParameters.group, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiDeletestorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1GroupApi + */ + public deletestorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiDeletestorageHaloRunV1alpha1GroupRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1GroupApiFp(this.configuration) + .deletestorageHaloRunV1alpha1Group(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiGetstorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1GroupApi + */ + public getstorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiGetstorageHaloRunV1alpha1GroupRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1GroupApiFp(this.configuration) + .getstorageHaloRunV1alpha1Group(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1GroupApi + */ + public liststorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiListstorageHaloRunV1alpha1GroupRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1GroupApiFp(this.configuration) + .liststorageHaloRunV1alpha1Group( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update storage.halo.run/v1alpha1/Group + * @param {StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1GroupRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1GroupApi + */ + public updatestorageHaloRunV1alpha1Group( + requestParameters: StorageHaloRunV1alpha1GroupApiUpdatestorageHaloRunV1alpha1GroupRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1GroupApiFp(this.configuration) + .updatestorageHaloRunV1alpha1Group(requestParameters.name, requestParameters.group, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/storage-halo-run-v1alpha1-policy-api.ts b/packages/api-client/src/api/storage-halo-run-v1alpha1-policy-api.ts new file mode 100644 index 000000000..79e1b99bd --- /dev/null +++ b/packages/api-client/src/api/storage-halo-run-v1alpha1-policy-api.ts @@ -0,0 +1,657 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Policy } from '../models' +// @ts-ignore +import { PolicyList } from '../models' +/** + * StorageHaloRunV1alpha1PolicyApi - axios parameter creator + * @export + */ +export const StorageHaloRunV1alpha1PolicyApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create storage.halo.run/v1alpha1/Policy + * @param {Policy} [policy] Fresh policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1Policy: async ( + policy?: Policy, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/policies` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(policy, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete storage.halo.run/v1alpha1/Policy + * @param {string} name Name of policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1Policy: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletestorageHaloRunV1alpha1Policy', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/policies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get storage.halo.run/v1alpha1/Policy + * @param {string} name Name of policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1Policy: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getstorageHaloRunV1alpha1Policy', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/policies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List storage.halo.run/v1alpha1/Policy + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1Policy: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/policies` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update storage.halo.run/v1alpha1/Policy + * @param {string} name Name of policy + * @param {Policy} [policy] Updated policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1Policy: async ( + name: string, + policy?: Policy, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatestorageHaloRunV1alpha1Policy', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/policies/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(policy, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * StorageHaloRunV1alpha1PolicyApi - functional programming interface + * @export + */ +export const StorageHaloRunV1alpha1PolicyApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = StorageHaloRunV1alpha1PolicyApiAxiosParamCreator(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/Policy + * @param {Policy} [policy] Fresh policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createstorageHaloRunV1alpha1Policy( + policy?: Policy, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createstorageHaloRunV1alpha1Policy(policy, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete storage.halo.run/v1alpha1/Policy + * @param {string} name Name of policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletestorageHaloRunV1alpha1Policy( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletestorageHaloRunV1alpha1Policy(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get storage.halo.run/v1alpha1/Policy + * @param {string} name Name of policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getstorageHaloRunV1alpha1Policy( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getstorageHaloRunV1alpha1Policy(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List storage.halo.run/v1alpha1/Policy + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async liststorageHaloRunV1alpha1Policy( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.liststorageHaloRunV1alpha1Policy( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update storage.halo.run/v1alpha1/Policy + * @param {string} name Name of policy + * @param {Policy} [policy] Updated policy + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatestorageHaloRunV1alpha1Policy( + name: string, + policy?: Policy, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatestorageHaloRunV1alpha1Policy( + name, + policy, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * StorageHaloRunV1alpha1PolicyApi - factory interface + * @export + */ +export const StorageHaloRunV1alpha1PolicyApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = StorageHaloRunV1alpha1PolicyApiFp(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiCreatestorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiCreatestorageHaloRunV1alpha1PolicyRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createstorageHaloRunV1alpha1Policy(requestParameters.policy, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiDeletestorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiDeletestorageHaloRunV1alpha1PolicyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletestorageHaloRunV1alpha1Policy(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiGetstorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiGetstorageHaloRunV1alpha1PolicyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getstorageHaloRunV1alpha1Policy(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1PolicyRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .liststorageHaloRunV1alpha1Policy( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1PolicyRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatestorageHaloRunV1alpha1Policy(requestParameters.name, requestParameters.policy, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createstorageHaloRunV1alpha1Policy operation in StorageHaloRunV1alpha1PolicyApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyApiCreatestorageHaloRunV1alpha1PolicyRequest + */ +export interface StorageHaloRunV1alpha1PolicyApiCreatestorageHaloRunV1alpha1PolicyRequest { + /** + * Fresh policy + * @type {Policy} + * @memberof StorageHaloRunV1alpha1PolicyApiCreatestorageHaloRunV1alpha1Policy + */ + readonly policy?: Policy +} + +/** + * Request parameters for deletestorageHaloRunV1alpha1Policy operation in StorageHaloRunV1alpha1PolicyApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyApiDeletestorageHaloRunV1alpha1PolicyRequest + */ +export interface StorageHaloRunV1alpha1PolicyApiDeletestorageHaloRunV1alpha1PolicyRequest { + /** + * Name of policy + * @type {string} + * @memberof StorageHaloRunV1alpha1PolicyApiDeletestorageHaloRunV1alpha1Policy + */ + readonly name: string +} + +/** + * Request parameters for getstorageHaloRunV1alpha1Policy operation in StorageHaloRunV1alpha1PolicyApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyApiGetstorageHaloRunV1alpha1PolicyRequest + */ +export interface StorageHaloRunV1alpha1PolicyApiGetstorageHaloRunV1alpha1PolicyRequest { + /** + * Name of policy + * @type {string} + * @memberof StorageHaloRunV1alpha1PolicyApiGetstorageHaloRunV1alpha1Policy + */ + readonly name: string +} + +/** + * Request parameters for liststorageHaloRunV1alpha1Policy operation in StorageHaloRunV1alpha1PolicyApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1PolicyRequest + */ +export interface StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1PolicyRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1Policy + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1Policy + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1Policy + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1Policy + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatestorageHaloRunV1alpha1Policy operation in StorageHaloRunV1alpha1PolicyApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1PolicyRequest + */ +export interface StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1PolicyRequest { + /** + * Name of policy + * @type {string} + * @memberof StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1Policy + */ + readonly name: string + + /** + * Updated policy + * @type {Policy} + * @memberof StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1Policy + */ + readonly policy?: Policy +} + +/** + * StorageHaloRunV1alpha1PolicyApi - object-oriented interface + * @export + * @class StorageHaloRunV1alpha1PolicyApi + * @extends {BaseAPI} + */ +export class StorageHaloRunV1alpha1PolicyApi extends BaseAPI { + /** + * Create storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiCreatestorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyApi + */ + public createstorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiCreatestorageHaloRunV1alpha1PolicyRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyApiFp(this.configuration) + .createstorageHaloRunV1alpha1Policy(requestParameters.policy, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiDeletestorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyApi + */ + public deletestorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiDeletestorageHaloRunV1alpha1PolicyRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyApiFp(this.configuration) + .deletestorageHaloRunV1alpha1Policy(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiGetstorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyApi + */ + public getstorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiGetstorageHaloRunV1alpha1PolicyRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyApiFp(this.configuration) + .getstorageHaloRunV1alpha1Policy(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyApi + */ + public liststorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiListstorageHaloRunV1alpha1PolicyRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyApiFp(this.configuration) + .liststorageHaloRunV1alpha1Policy( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update storage.halo.run/v1alpha1/Policy + * @param {StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1PolicyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyApi + */ + public updatestorageHaloRunV1alpha1Policy( + requestParameters: StorageHaloRunV1alpha1PolicyApiUpdatestorageHaloRunV1alpha1PolicyRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyApiFp(this.configuration) + .updatestorageHaloRunV1alpha1Policy(requestParameters.name, requestParameters.policy, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/storage-halo-run-v1alpha1-policy-template-api.ts b/packages/api-client/src/api/storage-halo-run-v1alpha1-policy-template-api.ts new file mode 100644 index 000000000..d1677c4c6 --- /dev/null +++ b/packages/api-client/src/api/storage-halo-run-v1alpha1-policy-template-api.ts @@ -0,0 +1,666 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { PolicyTemplate } from '../models' +// @ts-ignore +import { PolicyTemplateList } from '../models' +/** + * StorageHaloRunV1alpha1PolicyTemplateApi - axios parameter creator + * @export + */ +export const StorageHaloRunV1alpha1PolicyTemplateApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create storage.halo.run/v1alpha1/PolicyTemplate + * @param {PolicyTemplate} [policyTemplate] Fresh policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1PolicyTemplate: async ( + policyTemplate?: PolicyTemplate, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/policytemplates` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(policyTemplate, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete storage.halo.run/v1alpha1/PolicyTemplate + * @param {string} name Name of policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1PolicyTemplate: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletestorageHaloRunV1alpha1PolicyTemplate', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/policytemplates/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get storage.halo.run/v1alpha1/PolicyTemplate + * @param {string} name Name of policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1PolicyTemplate: async ( + name: string, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getstorageHaloRunV1alpha1PolicyTemplate', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/policytemplates/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List storage.halo.run/v1alpha1/PolicyTemplate + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1PolicyTemplate: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/storage.halo.run/v1alpha1/policytemplates` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update storage.halo.run/v1alpha1/PolicyTemplate + * @param {string} name Name of policytemplate + * @param {PolicyTemplate} [policyTemplate] Updated policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1PolicyTemplate: async ( + name: string, + policyTemplate?: PolicyTemplate, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatestorageHaloRunV1alpha1PolicyTemplate', 'name', name) + const localVarPath = `/apis/storage.halo.run/v1alpha1/policytemplates/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(policyTemplate, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * StorageHaloRunV1alpha1PolicyTemplateApi - functional programming interface + * @export + */ +export const StorageHaloRunV1alpha1PolicyTemplateApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = StorageHaloRunV1alpha1PolicyTemplateApiAxiosParamCreator(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/PolicyTemplate + * @param {PolicyTemplate} [policyTemplate] Fresh policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createstorageHaloRunV1alpha1PolicyTemplate( + policyTemplate?: PolicyTemplate, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createstorageHaloRunV1alpha1PolicyTemplate( + policyTemplate, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete storage.halo.run/v1alpha1/PolicyTemplate + * @param {string} name Name of policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletestorageHaloRunV1alpha1PolicyTemplate( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletestorageHaloRunV1alpha1PolicyTemplate( + name, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get storage.halo.run/v1alpha1/PolicyTemplate + * @param {string} name Name of policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getstorageHaloRunV1alpha1PolicyTemplate( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getstorageHaloRunV1alpha1PolicyTemplate(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List storage.halo.run/v1alpha1/PolicyTemplate + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async liststorageHaloRunV1alpha1PolicyTemplate( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.liststorageHaloRunV1alpha1PolicyTemplate( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update storage.halo.run/v1alpha1/PolicyTemplate + * @param {string} name Name of policytemplate + * @param {PolicyTemplate} [policyTemplate] Updated policytemplate + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatestorageHaloRunV1alpha1PolicyTemplate( + name: string, + policyTemplate?: PolicyTemplate, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatestorageHaloRunV1alpha1PolicyTemplate( + name, + policyTemplate, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * StorageHaloRunV1alpha1PolicyTemplateApi - factory interface + * @export + */ +export const StorageHaloRunV1alpha1PolicyTemplateApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = StorageHaloRunV1alpha1PolicyTemplateApiFp(configuration) + return { + /** + * Create storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiCreatestorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createstorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiCreatestorageHaloRunV1alpha1PolicyTemplateRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createstorageHaloRunV1alpha1PolicyTemplate(requestParameters.policyTemplate, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiDeletestorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletestorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiDeletestorageHaloRunV1alpha1PolicyTemplateRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletestorageHaloRunV1alpha1PolicyTemplate(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiGetstorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getstorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiGetstorageHaloRunV1alpha1PolicyTemplateRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getstorageHaloRunV1alpha1PolicyTemplate(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + liststorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplateRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .liststorageHaloRunV1alpha1PolicyTemplate( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatestorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplateRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatestorageHaloRunV1alpha1PolicyTemplate(requestParameters.name, requestParameters.policyTemplate, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createstorageHaloRunV1alpha1PolicyTemplate operation in StorageHaloRunV1alpha1PolicyTemplateApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyTemplateApiCreatestorageHaloRunV1alpha1PolicyTemplateRequest + */ +export interface StorageHaloRunV1alpha1PolicyTemplateApiCreatestorageHaloRunV1alpha1PolicyTemplateRequest { + /** + * Fresh policytemplate + * @type {PolicyTemplate} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiCreatestorageHaloRunV1alpha1PolicyTemplate + */ + readonly policyTemplate?: PolicyTemplate +} + +/** + * Request parameters for deletestorageHaloRunV1alpha1PolicyTemplate operation in StorageHaloRunV1alpha1PolicyTemplateApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyTemplateApiDeletestorageHaloRunV1alpha1PolicyTemplateRequest + */ +export interface StorageHaloRunV1alpha1PolicyTemplateApiDeletestorageHaloRunV1alpha1PolicyTemplateRequest { + /** + * Name of policytemplate + * @type {string} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiDeletestorageHaloRunV1alpha1PolicyTemplate + */ + readonly name: string +} + +/** + * Request parameters for getstorageHaloRunV1alpha1PolicyTemplate operation in StorageHaloRunV1alpha1PolicyTemplateApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyTemplateApiGetstorageHaloRunV1alpha1PolicyTemplateRequest + */ +export interface StorageHaloRunV1alpha1PolicyTemplateApiGetstorageHaloRunV1alpha1PolicyTemplateRequest { + /** + * Name of policytemplate + * @type {string} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiGetstorageHaloRunV1alpha1PolicyTemplate + */ + readonly name: string +} + +/** + * Request parameters for liststorageHaloRunV1alpha1PolicyTemplate operation in StorageHaloRunV1alpha1PolicyTemplateApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplateRequest + */ +export interface StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplateRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplate + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplate + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplate + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplate + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatestorageHaloRunV1alpha1PolicyTemplate operation in StorageHaloRunV1alpha1PolicyTemplateApi. + * @export + * @interface StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplateRequest + */ +export interface StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplateRequest { + /** + * Name of policytemplate + * @type {string} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplate + */ + readonly name: string + + /** + * Updated policytemplate + * @type {PolicyTemplate} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplate + */ + readonly policyTemplate?: PolicyTemplate +} + +/** + * StorageHaloRunV1alpha1PolicyTemplateApi - object-oriented interface + * @export + * @class StorageHaloRunV1alpha1PolicyTemplateApi + * @extends {BaseAPI} + */ +export class StorageHaloRunV1alpha1PolicyTemplateApi extends BaseAPI { + /** + * Create storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiCreatestorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApi + */ + public createstorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiCreatestorageHaloRunV1alpha1PolicyTemplateRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyTemplateApiFp(this.configuration) + .createstorageHaloRunV1alpha1PolicyTemplate(requestParameters.policyTemplate, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiDeletestorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApi + */ + public deletestorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiDeletestorageHaloRunV1alpha1PolicyTemplateRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyTemplateApiFp(this.configuration) + .deletestorageHaloRunV1alpha1PolicyTemplate(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiGetstorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApi + */ + public getstorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiGetstorageHaloRunV1alpha1PolicyTemplateRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyTemplateApiFp(this.configuration) + .getstorageHaloRunV1alpha1PolicyTemplate(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApi + */ + public liststorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiListstorageHaloRunV1alpha1PolicyTemplateRequest = {}, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyTemplateApiFp(this.configuration) + .liststorageHaloRunV1alpha1PolicyTemplate( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update storage.halo.run/v1alpha1/PolicyTemplate + * @param {StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StorageHaloRunV1alpha1PolicyTemplateApi + */ + public updatestorageHaloRunV1alpha1PolicyTemplate( + requestParameters: StorageHaloRunV1alpha1PolicyTemplateApiUpdatestorageHaloRunV1alpha1PolicyTemplateRequest, + options?: AxiosRequestConfig, + ) { + return StorageHaloRunV1alpha1PolicyTemplateApiFp(this.configuration) + .updatestorageHaloRunV1alpha1PolicyTemplate(requestParameters.name, requestParameters.policyTemplate, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/theme-halo-run-v1alpha1-theme-api.ts b/packages/api-client/src/api/theme-halo-run-v1alpha1-theme-api.ts new file mode 100644 index 000000000..dcd92106b --- /dev/null +++ b/packages/api-client/src/api/theme-halo-run-v1alpha1-theme-api.ts @@ -0,0 +1,647 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Theme } from '../models' +// @ts-ignore +import { ThemeList } from '../models' +/** + * ThemeHaloRunV1alpha1ThemeApi - axios parameter creator + * @export + */ +export const ThemeHaloRunV1alpha1ThemeApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create theme.halo.run/v1alpha1/Theme + * @param {Theme} [theme] Fresh theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createthemeHaloRunV1alpha1Theme: async (theme?: Theme, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/apis/theme.halo.run/v1alpha1/themes` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(theme, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete theme.halo.run/v1alpha1/Theme + * @param {string} name Name of theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletethemeHaloRunV1alpha1Theme: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletethemeHaloRunV1alpha1Theme', 'name', name) + const localVarPath = `/apis/theme.halo.run/v1alpha1/themes/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get theme.halo.run/v1alpha1/Theme + * @param {string} name Name of theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getthemeHaloRunV1alpha1Theme: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getthemeHaloRunV1alpha1Theme', 'name', name) + const localVarPath = `/apis/theme.halo.run/v1alpha1/themes/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List theme.halo.run/v1alpha1/Theme + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listthemeHaloRunV1alpha1Theme: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apis/theme.halo.run/v1alpha1/themes` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update theme.halo.run/v1alpha1/Theme + * @param {string} name Name of theme + * @param {Theme} [theme] Updated theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatethemeHaloRunV1alpha1Theme: async ( + name: string, + theme?: Theme, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatethemeHaloRunV1alpha1Theme', 'name', name) + const localVarPath = `/apis/theme.halo.run/v1alpha1/themes/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(theme, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ThemeHaloRunV1alpha1ThemeApi - functional programming interface + * @export + */ +export const ThemeHaloRunV1alpha1ThemeApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ThemeHaloRunV1alpha1ThemeApiAxiosParamCreator(configuration) + return { + /** + * Create theme.halo.run/v1alpha1/Theme + * @param {Theme} [theme] Fresh theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createthemeHaloRunV1alpha1Theme( + theme?: Theme, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createthemeHaloRunV1alpha1Theme(theme, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete theme.halo.run/v1alpha1/Theme + * @param {string} name Name of theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletethemeHaloRunV1alpha1Theme( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletethemeHaloRunV1alpha1Theme(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get theme.halo.run/v1alpha1/Theme + * @param {string} name Name of theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getthemeHaloRunV1alpha1Theme( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getthemeHaloRunV1alpha1Theme(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List theme.halo.run/v1alpha1/Theme + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listthemeHaloRunV1alpha1Theme( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listthemeHaloRunV1alpha1Theme( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update theme.halo.run/v1alpha1/Theme + * @param {string} name Name of theme + * @param {Theme} [theme] Updated theme + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatethemeHaloRunV1alpha1Theme( + name: string, + theme?: Theme, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatethemeHaloRunV1alpha1Theme(name, theme, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * ThemeHaloRunV1alpha1ThemeApi - factory interface + * @export + */ +export const ThemeHaloRunV1alpha1ThemeApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ThemeHaloRunV1alpha1ThemeApiFp(configuration) + return { + /** + * Create theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiCreatethemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createthemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiCreatethemeHaloRunV1alpha1ThemeRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createthemeHaloRunV1alpha1Theme(requestParameters.theme, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiDeletethemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletethemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiDeletethemeHaloRunV1alpha1ThemeRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletethemeHaloRunV1alpha1Theme(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiGetthemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getthemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiGetthemeHaloRunV1alpha1ThemeRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getthemeHaloRunV1alpha1Theme(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listthemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1ThemeRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listthemeHaloRunV1alpha1Theme( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatethemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1ThemeRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatethemeHaloRunV1alpha1Theme(requestParameters.name, requestParameters.theme, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createthemeHaloRunV1alpha1Theme operation in ThemeHaloRunV1alpha1ThemeApi. + * @export + * @interface ThemeHaloRunV1alpha1ThemeApiCreatethemeHaloRunV1alpha1ThemeRequest + */ +export interface ThemeHaloRunV1alpha1ThemeApiCreatethemeHaloRunV1alpha1ThemeRequest { + /** + * Fresh theme + * @type {Theme} + * @memberof ThemeHaloRunV1alpha1ThemeApiCreatethemeHaloRunV1alpha1Theme + */ + readonly theme?: Theme +} + +/** + * Request parameters for deletethemeHaloRunV1alpha1Theme operation in ThemeHaloRunV1alpha1ThemeApi. + * @export + * @interface ThemeHaloRunV1alpha1ThemeApiDeletethemeHaloRunV1alpha1ThemeRequest + */ +export interface ThemeHaloRunV1alpha1ThemeApiDeletethemeHaloRunV1alpha1ThemeRequest { + /** + * Name of theme + * @type {string} + * @memberof ThemeHaloRunV1alpha1ThemeApiDeletethemeHaloRunV1alpha1Theme + */ + readonly name: string +} + +/** + * Request parameters for getthemeHaloRunV1alpha1Theme operation in ThemeHaloRunV1alpha1ThemeApi. + * @export + * @interface ThemeHaloRunV1alpha1ThemeApiGetthemeHaloRunV1alpha1ThemeRequest + */ +export interface ThemeHaloRunV1alpha1ThemeApiGetthemeHaloRunV1alpha1ThemeRequest { + /** + * Name of theme + * @type {string} + * @memberof ThemeHaloRunV1alpha1ThemeApiGetthemeHaloRunV1alpha1Theme + */ + readonly name: string +} + +/** + * Request parameters for listthemeHaloRunV1alpha1Theme operation in ThemeHaloRunV1alpha1ThemeApi. + * @export + * @interface ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1ThemeRequest + */ +export interface ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1ThemeRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1Theme + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1Theme + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1Theme + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1Theme + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatethemeHaloRunV1alpha1Theme operation in ThemeHaloRunV1alpha1ThemeApi. + * @export + * @interface ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1ThemeRequest + */ +export interface ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1ThemeRequest { + /** + * Name of theme + * @type {string} + * @memberof ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1Theme + */ + readonly name: string + + /** + * Updated theme + * @type {Theme} + * @memberof ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1Theme + */ + readonly theme?: Theme +} + +/** + * ThemeHaloRunV1alpha1ThemeApi - object-oriented interface + * @export + * @class ThemeHaloRunV1alpha1ThemeApi + * @extends {BaseAPI} + */ +export class ThemeHaloRunV1alpha1ThemeApi extends BaseAPI { + /** + * Create theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiCreatethemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ThemeHaloRunV1alpha1ThemeApi + */ + public createthemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiCreatethemeHaloRunV1alpha1ThemeRequest = {}, + options?: AxiosRequestConfig, + ) { + return ThemeHaloRunV1alpha1ThemeApiFp(this.configuration) + .createthemeHaloRunV1alpha1Theme(requestParameters.theme, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiDeletethemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ThemeHaloRunV1alpha1ThemeApi + */ + public deletethemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiDeletethemeHaloRunV1alpha1ThemeRequest, + options?: AxiosRequestConfig, + ) { + return ThemeHaloRunV1alpha1ThemeApiFp(this.configuration) + .deletethemeHaloRunV1alpha1Theme(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiGetthemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ThemeHaloRunV1alpha1ThemeApi + */ + public getthemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiGetthemeHaloRunV1alpha1ThemeRequest, + options?: AxiosRequestConfig, + ) { + return ThemeHaloRunV1alpha1ThemeApiFp(this.configuration) + .getthemeHaloRunV1alpha1Theme(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ThemeHaloRunV1alpha1ThemeApi + */ + public listthemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiListthemeHaloRunV1alpha1ThemeRequest = {}, + options?: AxiosRequestConfig, + ) { + return ThemeHaloRunV1alpha1ThemeApiFp(this.configuration) + .listthemeHaloRunV1alpha1Theme( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update theme.halo.run/v1alpha1/Theme + * @param {ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1ThemeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ThemeHaloRunV1alpha1ThemeApi + */ + public updatethemeHaloRunV1alpha1Theme( + requestParameters: ThemeHaloRunV1alpha1ThemeApiUpdatethemeHaloRunV1alpha1ThemeRequest, + options?: AxiosRequestConfig, + ) { + return ThemeHaloRunV1alpha1ThemeApiFp(this.configuration) + .updatethemeHaloRunV1alpha1Theme(requestParameters.name, requestParameters.theme, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-annotation-setting-api.ts b/packages/api-client/src/api/v1alpha1-annotation-setting-api.ts new file mode 100644 index 000000000..c521bd106 --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-annotation-setting-api.ts @@ -0,0 +1,657 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { AnnotationSetting } from '../models' +// @ts-ignore +import { AnnotationSettingList } from '../models' +/** + * V1alpha1AnnotationSettingApi - axios parameter creator + * @export + */ +export const V1alpha1AnnotationSettingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/AnnotationSetting + * @param {AnnotationSetting} [annotationSetting] Fresh annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1AnnotationSetting: async ( + annotationSetting?: AnnotationSetting, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/annotationsettings` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(annotationSetting, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/AnnotationSetting + * @param {string} name Name of annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1AnnotationSetting: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1AnnotationSetting', 'name', name) + const localVarPath = `/api/v1alpha1/annotationsettings/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/AnnotationSetting + * @param {string} name Name of annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1AnnotationSetting: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1AnnotationSetting', 'name', name) + const localVarPath = `/api/v1alpha1/annotationsettings/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/AnnotationSetting + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1AnnotationSetting: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/annotationsettings` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/AnnotationSetting + * @param {string} name Name of annotationsetting + * @param {AnnotationSetting} [annotationSetting] Updated annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1AnnotationSetting: async ( + name: string, + annotationSetting?: AnnotationSetting, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1AnnotationSetting', 'name', name) + const localVarPath = `/api/v1alpha1/annotationsettings/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(annotationSetting, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1AnnotationSettingApi - functional programming interface + * @export + */ +export const V1alpha1AnnotationSettingApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1AnnotationSettingApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/AnnotationSetting + * @param {AnnotationSetting} [annotationSetting] Fresh annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1AnnotationSetting( + annotationSetting?: AnnotationSetting, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1AnnotationSetting( + annotationSetting, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/AnnotationSetting + * @param {string} name Name of annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1AnnotationSetting( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1AnnotationSetting(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/AnnotationSetting + * @param {string} name Name of annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1AnnotationSetting( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1AnnotationSetting(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/AnnotationSetting + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1AnnotationSetting( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1AnnotationSetting( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/AnnotationSetting + * @param {string} name Name of annotationsetting + * @param {AnnotationSetting} [annotationSetting] Updated annotationsetting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1AnnotationSetting( + name: string, + annotationSetting?: AnnotationSetting, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1AnnotationSetting( + name, + annotationSetting, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1AnnotationSettingApi - factory interface + * @export + */ +export const V1alpha1AnnotationSettingApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1AnnotationSettingApiFp(configuration) + return { + /** + * Create v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiCreatev1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiCreatev1alpha1AnnotationSettingRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createv1alpha1AnnotationSetting(requestParameters.annotationSetting, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiDeletev1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiDeletev1alpha1AnnotationSettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletev1alpha1AnnotationSetting(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiGetv1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiGetv1alpha1AnnotationSettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getv1alpha1AnnotationSetting(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiListv1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiListv1alpha1AnnotationSettingRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1AnnotationSetting( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1AnnotationSetting(requestParameters.name, requestParameters.annotationSetting, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1AnnotationSetting operation in V1alpha1AnnotationSettingApi. + * @export + * @interface V1alpha1AnnotationSettingApiCreatev1alpha1AnnotationSettingRequest + */ +export interface V1alpha1AnnotationSettingApiCreatev1alpha1AnnotationSettingRequest { + /** + * Fresh annotationsetting + * @type {AnnotationSetting} + * @memberof V1alpha1AnnotationSettingApiCreatev1alpha1AnnotationSetting + */ + readonly annotationSetting?: AnnotationSetting +} + +/** + * Request parameters for deletev1alpha1AnnotationSetting operation in V1alpha1AnnotationSettingApi. + * @export + * @interface V1alpha1AnnotationSettingApiDeletev1alpha1AnnotationSettingRequest + */ +export interface V1alpha1AnnotationSettingApiDeletev1alpha1AnnotationSettingRequest { + /** + * Name of annotationsetting + * @type {string} + * @memberof V1alpha1AnnotationSettingApiDeletev1alpha1AnnotationSetting + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1AnnotationSetting operation in V1alpha1AnnotationSettingApi. + * @export + * @interface V1alpha1AnnotationSettingApiGetv1alpha1AnnotationSettingRequest + */ +export interface V1alpha1AnnotationSettingApiGetv1alpha1AnnotationSettingRequest { + /** + * Name of annotationsetting + * @type {string} + * @memberof V1alpha1AnnotationSettingApiGetv1alpha1AnnotationSetting + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1AnnotationSetting operation in V1alpha1AnnotationSettingApi. + * @export + * @interface V1alpha1AnnotationSettingApiListv1alpha1AnnotationSettingRequest + */ +export interface V1alpha1AnnotationSettingApiListv1alpha1AnnotationSettingRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1AnnotationSettingApiListv1alpha1AnnotationSetting + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1AnnotationSettingApiListv1alpha1AnnotationSetting + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1AnnotationSettingApiListv1alpha1AnnotationSetting + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1AnnotationSettingApiListv1alpha1AnnotationSetting + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1AnnotationSetting operation in V1alpha1AnnotationSettingApi. + * @export + * @interface V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSettingRequest + */ +export interface V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSettingRequest { + /** + * Name of annotationsetting + * @type {string} + * @memberof V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSetting + */ + readonly name: string + + /** + * Updated annotationsetting + * @type {AnnotationSetting} + * @memberof V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSetting + */ + readonly annotationSetting?: AnnotationSetting +} + +/** + * V1alpha1AnnotationSettingApi - object-oriented interface + * @export + * @class V1alpha1AnnotationSettingApi + * @extends {BaseAPI} + */ +export class V1alpha1AnnotationSettingApi extends BaseAPI { + /** + * Create v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiCreatev1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1AnnotationSettingApi + */ + public createv1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiCreatev1alpha1AnnotationSettingRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1AnnotationSettingApiFp(this.configuration) + .createv1alpha1AnnotationSetting(requestParameters.annotationSetting, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiDeletev1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1AnnotationSettingApi + */ + public deletev1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiDeletev1alpha1AnnotationSettingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1AnnotationSettingApiFp(this.configuration) + .deletev1alpha1AnnotationSetting(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiGetv1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1AnnotationSettingApi + */ + public getv1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiGetv1alpha1AnnotationSettingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1AnnotationSettingApiFp(this.configuration) + .getv1alpha1AnnotationSetting(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiListv1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1AnnotationSettingApi + */ + public listv1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiListv1alpha1AnnotationSettingRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1AnnotationSettingApiFp(this.configuration) + .listv1alpha1AnnotationSetting( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/AnnotationSetting + * @param {V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1AnnotationSettingApi + */ + public updatev1alpha1AnnotationSetting( + requestParameters: V1alpha1AnnotationSettingApiUpdatev1alpha1AnnotationSettingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1AnnotationSettingApiFp(this.configuration) + .updatev1alpha1AnnotationSetting(requestParameters.name, requestParameters.annotationSetting, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-config-map-api.ts b/packages/api-client/src/api/v1alpha1-config-map-api.ts new file mode 100644 index 000000000..f931d2239 --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-config-map-api.ts @@ -0,0 +1,638 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { ConfigMap } from '../models' +// @ts-ignore +import { ConfigMapList } from '../models' +/** + * V1alpha1ConfigMapApi - axios parameter creator + * @export + */ +export const V1alpha1ConfigMapApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/ConfigMap + * @param {ConfigMap} [configMap] Fresh configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1ConfigMap: async (configMap?: ConfigMap, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1alpha1/configmaps` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(configMap, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/ConfigMap + * @param {string} name Name of configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1ConfigMap: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1ConfigMap', 'name', name) + const localVarPath = `/api/v1alpha1/configmaps/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/ConfigMap + * @param {string} name Name of configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1ConfigMap: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1ConfigMap', 'name', name) + const localVarPath = `/api/v1alpha1/configmaps/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/ConfigMap + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1ConfigMap: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/configmaps` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/ConfigMap + * @param {string} name Name of configmap + * @param {ConfigMap} [configMap] Updated configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1ConfigMap: async ( + name: string, + configMap?: ConfigMap, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1ConfigMap', 'name', name) + const localVarPath = `/api/v1alpha1/configmaps/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(configMap, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1ConfigMapApi - functional programming interface + * @export + */ +export const V1alpha1ConfigMapApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1ConfigMapApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/ConfigMap + * @param {ConfigMap} [configMap] Fresh configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1ConfigMap( + configMap?: ConfigMap, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1ConfigMap(configMap, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/ConfigMap + * @param {string} name Name of configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1ConfigMap( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1ConfigMap(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/ConfigMap + * @param {string} name Name of configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1ConfigMap( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1ConfigMap(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/ConfigMap + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1ConfigMap( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1ConfigMap( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/ConfigMap + * @param {string} name Name of configmap + * @param {ConfigMap} [configMap] Updated configmap + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1ConfigMap( + name: string, + configMap?: ConfigMap, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1ConfigMap(name, configMap, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1ConfigMapApi - factory interface + * @export + */ +export const V1alpha1ConfigMapApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1ConfigMapApiFp(configuration) + return { + /** + * Create v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiCreatev1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiCreatev1alpha1ConfigMapRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createv1alpha1ConfigMap(requestParameters.configMap, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiDeletev1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiDeletev1alpha1ConfigMapRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletev1alpha1ConfigMap(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiGetv1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiGetv1alpha1ConfigMapRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getv1alpha1ConfigMap(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiListv1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiListv1alpha1ConfigMapRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1ConfigMap( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiUpdatev1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiUpdatev1alpha1ConfigMapRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1ConfigMap(requestParameters.name, requestParameters.configMap, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1ConfigMap operation in V1alpha1ConfigMapApi. + * @export + * @interface V1alpha1ConfigMapApiCreatev1alpha1ConfigMapRequest + */ +export interface V1alpha1ConfigMapApiCreatev1alpha1ConfigMapRequest { + /** + * Fresh configmap + * @type {ConfigMap} + * @memberof V1alpha1ConfigMapApiCreatev1alpha1ConfigMap + */ + readonly configMap?: ConfigMap +} + +/** + * Request parameters for deletev1alpha1ConfigMap operation in V1alpha1ConfigMapApi. + * @export + * @interface V1alpha1ConfigMapApiDeletev1alpha1ConfigMapRequest + */ +export interface V1alpha1ConfigMapApiDeletev1alpha1ConfigMapRequest { + /** + * Name of configmap + * @type {string} + * @memberof V1alpha1ConfigMapApiDeletev1alpha1ConfigMap + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1ConfigMap operation in V1alpha1ConfigMapApi. + * @export + * @interface V1alpha1ConfigMapApiGetv1alpha1ConfigMapRequest + */ +export interface V1alpha1ConfigMapApiGetv1alpha1ConfigMapRequest { + /** + * Name of configmap + * @type {string} + * @memberof V1alpha1ConfigMapApiGetv1alpha1ConfigMap + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1ConfigMap operation in V1alpha1ConfigMapApi. + * @export + * @interface V1alpha1ConfigMapApiListv1alpha1ConfigMapRequest + */ +export interface V1alpha1ConfigMapApiListv1alpha1ConfigMapRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1ConfigMapApiListv1alpha1ConfigMap + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1ConfigMapApiListv1alpha1ConfigMap + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1ConfigMapApiListv1alpha1ConfigMap + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1ConfigMapApiListv1alpha1ConfigMap + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1ConfigMap operation in V1alpha1ConfigMapApi. + * @export + * @interface V1alpha1ConfigMapApiUpdatev1alpha1ConfigMapRequest + */ +export interface V1alpha1ConfigMapApiUpdatev1alpha1ConfigMapRequest { + /** + * Name of configmap + * @type {string} + * @memberof V1alpha1ConfigMapApiUpdatev1alpha1ConfigMap + */ + readonly name: string + + /** + * Updated configmap + * @type {ConfigMap} + * @memberof V1alpha1ConfigMapApiUpdatev1alpha1ConfigMap + */ + readonly configMap?: ConfigMap +} + +/** + * V1alpha1ConfigMapApi - object-oriented interface + * @export + * @class V1alpha1ConfigMapApi + * @extends {BaseAPI} + */ +export class V1alpha1ConfigMapApi extends BaseAPI { + /** + * Create v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiCreatev1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1ConfigMapApi + */ + public createv1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiCreatev1alpha1ConfigMapRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1ConfigMapApiFp(this.configuration) + .createv1alpha1ConfigMap(requestParameters.configMap, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiDeletev1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1ConfigMapApi + */ + public deletev1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiDeletev1alpha1ConfigMapRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1ConfigMapApiFp(this.configuration) + .deletev1alpha1ConfigMap(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiGetv1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1ConfigMapApi + */ + public getv1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiGetv1alpha1ConfigMapRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1ConfigMapApiFp(this.configuration) + .getv1alpha1ConfigMap(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiListv1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1ConfigMapApi + */ + public listv1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiListv1alpha1ConfigMapRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1ConfigMapApiFp(this.configuration) + .listv1alpha1ConfigMap( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/ConfigMap + * @param {V1alpha1ConfigMapApiUpdatev1alpha1ConfigMapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1ConfigMapApi + */ + public updatev1alpha1ConfigMap( + requestParameters: V1alpha1ConfigMapApiUpdatev1alpha1ConfigMapRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1ConfigMapApiFp(this.configuration) + .updatev1alpha1ConfigMap(requestParameters.name, requestParameters.configMap, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-menu-api.ts b/packages/api-client/src/api/v1alpha1-menu-api.ts new file mode 100644 index 000000000..a4a08d102 --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-menu-api.ts @@ -0,0 +1,619 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Menu } from '../models' +// @ts-ignore +import { MenuList } from '../models' +/** + * V1alpha1MenuApi - axios parameter creator + * @export + */ +export const V1alpha1MenuApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/Menu + * @param {Menu} [menu] Fresh menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1Menu: async (menu?: Menu, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1alpha1/menus` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(menu, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/Menu + * @param {string} name Name of menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1Menu: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1Menu', 'name', name) + const localVarPath = `/api/v1alpha1/menus/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/Menu + * @param {string} name Name of menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1Menu: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1Menu', 'name', name) + const localVarPath = `/api/v1alpha1/menus/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/Menu + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1Menu: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/menus` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/Menu + * @param {string} name Name of menu + * @param {Menu} [menu] Updated menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1Menu: async (name: string, menu?: Menu, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1Menu', 'name', name) + const localVarPath = `/api/v1alpha1/menus/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(menu, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1MenuApi - functional programming interface + * @export + */ +export const V1alpha1MenuApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1MenuApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/Menu + * @param {Menu} [menu] Fresh menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1Menu( + menu?: Menu, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1Menu(menu, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/Menu + * @param {string} name Name of menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1Menu( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1Menu(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/Menu + * @param {string} name Name of menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1Menu( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1Menu(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/Menu + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1Menu( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1Menu( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/Menu + * @param {string} name Name of menu + * @param {Menu} [menu] Updated menu + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1Menu( + name: string, + menu?: Menu, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1Menu(name, menu, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1MenuApi - factory interface + * @export + */ +export const V1alpha1MenuApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1MenuApiFp(configuration) + return { + /** + * Create v1alpha1/Menu + * @param {V1alpha1MenuApiCreatev1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1Menu( + requestParameters: V1alpha1MenuApiCreatev1alpha1MenuRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.createv1alpha1Menu(requestParameters.menu, options).then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/Menu + * @param {V1alpha1MenuApiDeletev1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1Menu( + requestParameters: V1alpha1MenuApiDeletev1alpha1MenuRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.deletev1alpha1Menu(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/Menu + * @param {V1alpha1MenuApiGetv1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1Menu( + requestParameters: V1alpha1MenuApiGetv1alpha1MenuRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.getv1alpha1Menu(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/Menu + * @param {V1alpha1MenuApiListv1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1Menu( + requestParameters: V1alpha1MenuApiListv1alpha1MenuRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1Menu( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/Menu + * @param {V1alpha1MenuApiUpdatev1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1Menu( + requestParameters: V1alpha1MenuApiUpdatev1alpha1MenuRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1Menu(requestParameters.name, requestParameters.menu, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1Menu operation in V1alpha1MenuApi. + * @export + * @interface V1alpha1MenuApiCreatev1alpha1MenuRequest + */ +export interface V1alpha1MenuApiCreatev1alpha1MenuRequest { + /** + * Fresh menu + * @type {Menu} + * @memberof V1alpha1MenuApiCreatev1alpha1Menu + */ + readonly menu?: Menu +} + +/** + * Request parameters for deletev1alpha1Menu operation in V1alpha1MenuApi. + * @export + * @interface V1alpha1MenuApiDeletev1alpha1MenuRequest + */ +export interface V1alpha1MenuApiDeletev1alpha1MenuRequest { + /** + * Name of menu + * @type {string} + * @memberof V1alpha1MenuApiDeletev1alpha1Menu + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1Menu operation in V1alpha1MenuApi. + * @export + * @interface V1alpha1MenuApiGetv1alpha1MenuRequest + */ +export interface V1alpha1MenuApiGetv1alpha1MenuRequest { + /** + * Name of menu + * @type {string} + * @memberof V1alpha1MenuApiGetv1alpha1Menu + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1Menu operation in V1alpha1MenuApi. + * @export + * @interface V1alpha1MenuApiListv1alpha1MenuRequest + */ +export interface V1alpha1MenuApiListv1alpha1MenuRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1MenuApiListv1alpha1Menu + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1MenuApiListv1alpha1Menu + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1MenuApiListv1alpha1Menu + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1MenuApiListv1alpha1Menu + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1Menu operation in V1alpha1MenuApi. + * @export + * @interface V1alpha1MenuApiUpdatev1alpha1MenuRequest + */ +export interface V1alpha1MenuApiUpdatev1alpha1MenuRequest { + /** + * Name of menu + * @type {string} + * @memberof V1alpha1MenuApiUpdatev1alpha1Menu + */ + readonly name: string + + /** + * Updated menu + * @type {Menu} + * @memberof V1alpha1MenuApiUpdatev1alpha1Menu + */ + readonly menu?: Menu +} + +/** + * V1alpha1MenuApi - object-oriented interface + * @export + * @class V1alpha1MenuApi + * @extends {BaseAPI} + */ +export class V1alpha1MenuApi extends BaseAPI { + /** + * Create v1alpha1/Menu + * @param {V1alpha1MenuApiCreatev1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuApi + */ + public createv1alpha1Menu( + requestParameters: V1alpha1MenuApiCreatev1alpha1MenuRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1MenuApiFp(this.configuration) + .createv1alpha1Menu(requestParameters.menu, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/Menu + * @param {V1alpha1MenuApiDeletev1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuApi + */ + public deletev1alpha1Menu(requestParameters: V1alpha1MenuApiDeletev1alpha1MenuRequest, options?: AxiosRequestConfig) { + return V1alpha1MenuApiFp(this.configuration) + .deletev1alpha1Menu(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/Menu + * @param {V1alpha1MenuApiGetv1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuApi + */ + public getv1alpha1Menu(requestParameters: V1alpha1MenuApiGetv1alpha1MenuRequest, options?: AxiosRequestConfig) { + return V1alpha1MenuApiFp(this.configuration) + .getv1alpha1Menu(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/Menu + * @param {V1alpha1MenuApiListv1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuApi + */ + public listv1alpha1Menu( + requestParameters: V1alpha1MenuApiListv1alpha1MenuRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1MenuApiFp(this.configuration) + .listv1alpha1Menu( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/Menu + * @param {V1alpha1MenuApiUpdatev1alpha1MenuRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuApi + */ + public updatev1alpha1Menu(requestParameters: V1alpha1MenuApiUpdatev1alpha1MenuRequest, options?: AxiosRequestConfig) { + return V1alpha1MenuApiFp(this.configuration) + .updatev1alpha1Menu(requestParameters.name, requestParameters.menu, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-menu-item-api.ts b/packages/api-client/src/api/v1alpha1-menu-item-api.ts new file mode 100644 index 000000000..4a73e4953 --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-menu-item-api.ts @@ -0,0 +1,636 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { MenuItem } from '../models' +// @ts-ignore +import { MenuItemList } from '../models' +/** + * V1alpha1MenuItemApi - axios parameter creator + * @export + */ +export const V1alpha1MenuItemApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/MenuItem + * @param {MenuItem} [menuItem] Fresh menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1MenuItem: async (menuItem?: MenuItem, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1alpha1/menuitems` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(menuItem, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/MenuItem + * @param {string} name Name of menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1MenuItem: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1MenuItem', 'name', name) + const localVarPath = `/api/v1alpha1/menuitems/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/MenuItem + * @param {string} name Name of menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1MenuItem: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1MenuItem', 'name', name) + const localVarPath = `/api/v1alpha1/menuitems/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/MenuItem + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1MenuItem: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/menuitems` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/MenuItem + * @param {string} name Name of menuitem + * @param {MenuItem} [menuItem] Updated menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1MenuItem: async ( + name: string, + menuItem?: MenuItem, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1MenuItem', 'name', name) + const localVarPath = `/api/v1alpha1/menuitems/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(menuItem, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1MenuItemApi - functional programming interface + * @export + */ +export const V1alpha1MenuItemApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1MenuItemApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/MenuItem + * @param {MenuItem} [menuItem] Fresh menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1MenuItem( + menuItem?: MenuItem, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1MenuItem(menuItem, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/MenuItem + * @param {string} name Name of menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1MenuItem( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1MenuItem(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/MenuItem + * @param {string} name Name of menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1MenuItem( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1MenuItem(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/MenuItem + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1MenuItem( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1MenuItem( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/MenuItem + * @param {string} name Name of menuitem + * @param {MenuItem} [menuItem] Updated menuitem + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1MenuItem( + name: string, + menuItem?: MenuItem, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1MenuItem(name, menuItem, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1MenuItemApi - factory interface + * @export + */ +export const V1alpha1MenuItemApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1MenuItemApiFp(configuration) + return { + /** + * Create v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiCreatev1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiCreatev1alpha1MenuItemRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createv1alpha1MenuItem(requestParameters.menuItem, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiDeletev1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiDeletev1alpha1MenuItemRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletev1alpha1MenuItem(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiGetv1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiGetv1alpha1MenuItemRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.getv1alpha1MenuItem(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiListv1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiListv1alpha1MenuItemRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1MenuItem( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiUpdatev1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiUpdatev1alpha1MenuItemRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1MenuItem(requestParameters.name, requestParameters.menuItem, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1MenuItem operation in V1alpha1MenuItemApi. + * @export + * @interface V1alpha1MenuItemApiCreatev1alpha1MenuItemRequest + */ +export interface V1alpha1MenuItemApiCreatev1alpha1MenuItemRequest { + /** + * Fresh menuitem + * @type {MenuItem} + * @memberof V1alpha1MenuItemApiCreatev1alpha1MenuItem + */ + readonly menuItem?: MenuItem +} + +/** + * Request parameters for deletev1alpha1MenuItem operation in V1alpha1MenuItemApi. + * @export + * @interface V1alpha1MenuItemApiDeletev1alpha1MenuItemRequest + */ +export interface V1alpha1MenuItemApiDeletev1alpha1MenuItemRequest { + /** + * Name of menuitem + * @type {string} + * @memberof V1alpha1MenuItemApiDeletev1alpha1MenuItem + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1MenuItem operation in V1alpha1MenuItemApi. + * @export + * @interface V1alpha1MenuItemApiGetv1alpha1MenuItemRequest + */ +export interface V1alpha1MenuItemApiGetv1alpha1MenuItemRequest { + /** + * Name of menuitem + * @type {string} + * @memberof V1alpha1MenuItemApiGetv1alpha1MenuItem + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1MenuItem operation in V1alpha1MenuItemApi. + * @export + * @interface V1alpha1MenuItemApiListv1alpha1MenuItemRequest + */ +export interface V1alpha1MenuItemApiListv1alpha1MenuItemRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1MenuItemApiListv1alpha1MenuItem + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1MenuItemApiListv1alpha1MenuItem + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1MenuItemApiListv1alpha1MenuItem + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1MenuItemApiListv1alpha1MenuItem + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1MenuItem operation in V1alpha1MenuItemApi. + * @export + * @interface V1alpha1MenuItemApiUpdatev1alpha1MenuItemRequest + */ +export interface V1alpha1MenuItemApiUpdatev1alpha1MenuItemRequest { + /** + * Name of menuitem + * @type {string} + * @memberof V1alpha1MenuItemApiUpdatev1alpha1MenuItem + */ + readonly name: string + + /** + * Updated menuitem + * @type {MenuItem} + * @memberof V1alpha1MenuItemApiUpdatev1alpha1MenuItem + */ + readonly menuItem?: MenuItem +} + +/** + * V1alpha1MenuItemApi - object-oriented interface + * @export + * @class V1alpha1MenuItemApi + * @extends {BaseAPI} + */ +export class V1alpha1MenuItemApi extends BaseAPI { + /** + * Create v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiCreatev1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuItemApi + */ + public createv1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiCreatev1alpha1MenuItemRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1MenuItemApiFp(this.configuration) + .createv1alpha1MenuItem(requestParameters.menuItem, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiDeletev1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuItemApi + */ + public deletev1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiDeletev1alpha1MenuItemRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1MenuItemApiFp(this.configuration) + .deletev1alpha1MenuItem(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiGetv1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuItemApi + */ + public getv1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiGetv1alpha1MenuItemRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1MenuItemApiFp(this.configuration) + .getv1alpha1MenuItem(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiListv1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuItemApi + */ + public listv1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiListv1alpha1MenuItemRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1MenuItemApiFp(this.configuration) + .listv1alpha1MenuItem( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/MenuItem + * @param {V1alpha1MenuItemApiUpdatev1alpha1MenuItemRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1MenuItemApi + */ + public updatev1alpha1MenuItem( + requestParameters: V1alpha1MenuItemApiUpdatev1alpha1MenuItemRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1MenuItemApiFp(this.configuration) + .updatev1alpha1MenuItem(requestParameters.name, requestParameters.menuItem, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-personal-access-token-api.ts b/packages/api-client/src/api/v1alpha1-personal-access-token-api.ts new file mode 100644 index 000000000..2ef1e16ba --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-personal-access-token-api.ts @@ -0,0 +1,657 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { PersonalAccessToken } from '../models' +// @ts-ignore +import { PersonalAccessTokenList } from '../models' +/** + * V1alpha1PersonalAccessTokenApi - axios parameter creator + * @export + */ +export const V1alpha1PersonalAccessTokenApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/PersonalAccessToken + * @param {PersonalAccessToken} [personalAccessToken] Fresh personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1PersonalAccessToken: async ( + personalAccessToken?: PersonalAccessToken, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/personalaccesstokens` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(personalAccessToken, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/PersonalAccessToken + * @param {string} name Name of personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1PersonalAccessToken: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1PersonalAccessToken', 'name', name) + const localVarPath = `/api/v1alpha1/personalaccesstokens/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/PersonalAccessToken + * @param {string} name Name of personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1PersonalAccessToken: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1PersonalAccessToken', 'name', name) + const localVarPath = `/api/v1alpha1/personalaccesstokens/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/PersonalAccessToken + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1PersonalAccessToken: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/personalaccesstokens` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/PersonalAccessToken + * @param {string} name Name of personalaccesstoken + * @param {PersonalAccessToken} [personalAccessToken] Updated personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1PersonalAccessToken: async ( + name: string, + personalAccessToken?: PersonalAccessToken, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1PersonalAccessToken', 'name', name) + const localVarPath = `/api/v1alpha1/personalaccesstokens/{name}`.replace( + `{${'name'}}`, + encodeURIComponent(String(name)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(personalAccessToken, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1PersonalAccessTokenApi - functional programming interface + * @export + */ +export const V1alpha1PersonalAccessTokenApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1PersonalAccessTokenApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/PersonalAccessToken + * @param {PersonalAccessToken} [personalAccessToken] Fresh personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1PersonalAccessToken( + personalAccessToken?: PersonalAccessToken, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1PersonalAccessToken( + personalAccessToken, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/PersonalAccessToken + * @param {string} name Name of personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1PersonalAccessToken( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1PersonalAccessToken(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/PersonalAccessToken + * @param {string} name Name of personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1PersonalAccessToken( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1PersonalAccessToken(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/PersonalAccessToken + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1PersonalAccessToken( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1PersonalAccessToken( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/PersonalAccessToken + * @param {string} name Name of personalaccesstoken + * @param {PersonalAccessToken} [personalAccessToken] Updated personalaccesstoken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1PersonalAccessToken( + name: string, + personalAccessToken?: PersonalAccessToken, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1PersonalAccessToken( + name, + personalAccessToken, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1PersonalAccessTokenApi - factory interface + * @export + */ +export const V1alpha1PersonalAccessTokenApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1PersonalAccessTokenApiFp(configuration) + return { + /** + * Create v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiCreatev1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiCreatev1alpha1PersonalAccessTokenRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createv1alpha1PersonalAccessToken(requestParameters.personalAccessToken, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiDeletev1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiDeletev1alpha1PersonalAccessTokenRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletev1alpha1PersonalAccessToken(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiGetv1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiGetv1alpha1PersonalAccessTokenRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getv1alpha1PersonalAccessToken(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessTokenRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1PersonalAccessToken( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessTokenRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1PersonalAccessToken(requestParameters.name, requestParameters.personalAccessToken, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1PersonalAccessToken operation in V1alpha1PersonalAccessTokenApi. + * @export + * @interface V1alpha1PersonalAccessTokenApiCreatev1alpha1PersonalAccessTokenRequest + */ +export interface V1alpha1PersonalAccessTokenApiCreatev1alpha1PersonalAccessTokenRequest { + /** + * Fresh personalaccesstoken + * @type {PersonalAccessToken} + * @memberof V1alpha1PersonalAccessTokenApiCreatev1alpha1PersonalAccessToken + */ + readonly personalAccessToken?: PersonalAccessToken +} + +/** + * Request parameters for deletev1alpha1PersonalAccessToken operation in V1alpha1PersonalAccessTokenApi. + * @export + * @interface V1alpha1PersonalAccessTokenApiDeletev1alpha1PersonalAccessTokenRequest + */ +export interface V1alpha1PersonalAccessTokenApiDeletev1alpha1PersonalAccessTokenRequest { + /** + * Name of personalaccesstoken + * @type {string} + * @memberof V1alpha1PersonalAccessTokenApiDeletev1alpha1PersonalAccessToken + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1PersonalAccessToken operation in V1alpha1PersonalAccessTokenApi. + * @export + * @interface V1alpha1PersonalAccessTokenApiGetv1alpha1PersonalAccessTokenRequest + */ +export interface V1alpha1PersonalAccessTokenApiGetv1alpha1PersonalAccessTokenRequest { + /** + * Name of personalaccesstoken + * @type {string} + * @memberof V1alpha1PersonalAccessTokenApiGetv1alpha1PersonalAccessToken + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1PersonalAccessToken operation in V1alpha1PersonalAccessTokenApi. + * @export + * @interface V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessTokenRequest + */ +export interface V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessTokenRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessToken + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessToken + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessToken + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessToken + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1PersonalAccessToken operation in V1alpha1PersonalAccessTokenApi. + * @export + * @interface V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessTokenRequest + */ +export interface V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessTokenRequest { + /** + * Name of personalaccesstoken + * @type {string} + * @memberof V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessToken + */ + readonly name: string + + /** + * Updated personalaccesstoken + * @type {PersonalAccessToken} + * @memberof V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessToken + */ + readonly personalAccessToken?: PersonalAccessToken +} + +/** + * V1alpha1PersonalAccessTokenApi - object-oriented interface + * @export + * @class V1alpha1PersonalAccessTokenApi + * @extends {BaseAPI} + */ +export class V1alpha1PersonalAccessTokenApi extends BaseAPI { + /** + * Create v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiCreatev1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1PersonalAccessTokenApi + */ + public createv1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiCreatev1alpha1PersonalAccessTokenRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1PersonalAccessTokenApiFp(this.configuration) + .createv1alpha1PersonalAccessToken(requestParameters.personalAccessToken, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiDeletev1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1PersonalAccessTokenApi + */ + public deletev1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiDeletev1alpha1PersonalAccessTokenRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1PersonalAccessTokenApiFp(this.configuration) + .deletev1alpha1PersonalAccessToken(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiGetv1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1PersonalAccessTokenApi + */ + public getv1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiGetv1alpha1PersonalAccessTokenRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1PersonalAccessTokenApiFp(this.configuration) + .getv1alpha1PersonalAccessToken(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1PersonalAccessTokenApi + */ + public listv1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiListv1alpha1PersonalAccessTokenRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1PersonalAccessTokenApiFp(this.configuration) + .listv1alpha1PersonalAccessToken( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/PersonalAccessToken + * @param {V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessTokenRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1PersonalAccessTokenApi + */ + public updatev1alpha1PersonalAccessToken( + requestParameters: V1alpha1PersonalAccessTokenApiUpdatev1alpha1PersonalAccessTokenRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1PersonalAccessTokenApiFp(this.configuration) + .updatev1alpha1PersonalAccessToken(requestParameters.name, requestParameters.personalAccessToken, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-role-api.ts b/packages/api-client/src/api/v1alpha1-role-api.ts new file mode 100644 index 000000000..f24c3359f --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-role-api.ts @@ -0,0 +1,619 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Role } from '../models' +// @ts-ignore +import { RoleList } from '../models' +/** + * V1alpha1RoleApi - axios parameter creator + * @export + */ +export const V1alpha1RoleApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/Role + * @param {Role} [role] Fresh role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1Role: async (role?: Role, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1alpha1/roles` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(role, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/Role + * @param {string} name Name of role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1Role: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1Role', 'name', name) + const localVarPath = `/api/v1alpha1/roles/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/Role + * @param {string} name Name of role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1Role: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1Role', 'name', name) + const localVarPath = `/api/v1alpha1/roles/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/Role + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1Role: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/roles` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/Role + * @param {string} name Name of role + * @param {Role} [role] Updated role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1Role: async (name: string, role?: Role, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1Role', 'name', name) + const localVarPath = `/api/v1alpha1/roles/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(role, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1RoleApi - functional programming interface + * @export + */ +export const V1alpha1RoleApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1RoleApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/Role + * @param {Role} [role] Fresh role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1Role( + role?: Role, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1Role(role, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/Role + * @param {string} name Name of role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1Role( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1Role(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/Role + * @param {string} name Name of role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1Role( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1Role(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/Role + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1Role( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1Role( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/Role + * @param {string} name Name of role + * @param {Role} [role] Updated role + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1Role( + name: string, + role?: Role, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1Role(name, role, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1RoleApi - factory interface + * @export + */ +export const V1alpha1RoleApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1RoleApiFp(configuration) + return { + /** + * Create v1alpha1/Role + * @param {V1alpha1RoleApiCreatev1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1Role( + requestParameters: V1alpha1RoleApiCreatev1alpha1RoleRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.createv1alpha1Role(requestParameters.role, options).then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/Role + * @param {V1alpha1RoleApiDeletev1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1Role( + requestParameters: V1alpha1RoleApiDeletev1alpha1RoleRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.deletev1alpha1Role(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/Role + * @param {V1alpha1RoleApiGetv1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1Role( + requestParameters: V1alpha1RoleApiGetv1alpha1RoleRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.getv1alpha1Role(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/Role + * @param {V1alpha1RoleApiListv1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1Role( + requestParameters: V1alpha1RoleApiListv1alpha1RoleRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1Role( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/Role + * @param {V1alpha1RoleApiUpdatev1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1Role( + requestParameters: V1alpha1RoleApiUpdatev1alpha1RoleRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1Role(requestParameters.name, requestParameters.role, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1Role operation in V1alpha1RoleApi. + * @export + * @interface V1alpha1RoleApiCreatev1alpha1RoleRequest + */ +export interface V1alpha1RoleApiCreatev1alpha1RoleRequest { + /** + * Fresh role + * @type {Role} + * @memberof V1alpha1RoleApiCreatev1alpha1Role + */ + readonly role?: Role +} + +/** + * Request parameters for deletev1alpha1Role operation in V1alpha1RoleApi. + * @export + * @interface V1alpha1RoleApiDeletev1alpha1RoleRequest + */ +export interface V1alpha1RoleApiDeletev1alpha1RoleRequest { + /** + * Name of role + * @type {string} + * @memberof V1alpha1RoleApiDeletev1alpha1Role + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1Role operation in V1alpha1RoleApi. + * @export + * @interface V1alpha1RoleApiGetv1alpha1RoleRequest + */ +export interface V1alpha1RoleApiGetv1alpha1RoleRequest { + /** + * Name of role + * @type {string} + * @memberof V1alpha1RoleApiGetv1alpha1Role + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1Role operation in V1alpha1RoleApi. + * @export + * @interface V1alpha1RoleApiListv1alpha1RoleRequest + */ +export interface V1alpha1RoleApiListv1alpha1RoleRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1RoleApiListv1alpha1Role + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1RoleApiListv1alpha1Role + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1RoleApiListv1alpha1Role + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1RoleApiListv1alpha1Role + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1Role operation in V1alpha1RoleApi. + * @export + * @interface V1alpha1RoleApiUpdatev1alpha1RoleRequest + */ +export interface V1alpha1RoleApiUpdatev1alpha1RoleRequest { + /** + * Name of role + * @type {string} + * @memberof V1alpha1RoleApiUpdatev1alpha1Role + */ + readonly name: string + + /** + * Updated role + * @type {Role} + * @memberof V1alpha1RoleApiUpdatev1alpha1Role + */ + readonly role?: Role +} + +/** + * V1alpha1RoleApi - object-oriented interface + * @export + * @class V1alpha1RoleApi + * @extends {BaseAPI} + */ +export class V1alpha1RoleApi extends BaseAPI { + /** + * Create v1alpha1/Role + * @param {V1alpha1RoleApiCreatev1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleApi + */ + public createv1alpha1Role( + requestParameters: V1alpha1RoleApiCreatev1alpha1RoleRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1RoleApiFp(this.configuration) + .createv1alpha1Role(requestParameters.role, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/Role + * @param {V1alpha1RoleApiDeletev1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleApi + */ + public deletev1alpha1Role(requestParameters: V1alpha1RoleApiDeletev1alpha1RoleRequest, options?: AxiosRequestConfig) { + return V1alpha1RoleApiFp(this.configuration) + .deletev1alpha1Role(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/Role + * @param {V1alpha1RoleApiGetv1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleApi + */ + public getv1alpha1Role(requestParameters: V1alpha1RoleApiGetv1alpha1RoleRequest, options?: AxiosRequestConfig) { + return V1alpha1RoleApiFp(this.configuration) + .getv1alpha1Role(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/Role + * @param {V1alpha1RoleApiListv1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleApi + */ + public listv1alpha1Role( + requestParameters: V1alpha1RoleApiListv1alpha1RoleRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1RoleApiFp(this.configuration) + .listv1alpha1Role( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/Role + * @param {V1alpha1RoleApiUpdatev1alpha1RoleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleApi + */ + public updatev1alpha1Role(requestParameters: V1alpha1RoleApiUpdatev1alpha1RoleRequest, options?: AxiosRequestConfig) { + return V1alpha1RoleApiFp(this.configuration) + .updatev1alpha1Role(requestParameters.name, requestParameters.role, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-role-binding-api.ts b/packages/api-client/src/api/v1alpha1-role-binding-api.ts new file mode 100644 index 000000000..016fc51f6 --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-role-binding-api.ts @@ -0,0 +1,641 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { RoleBinding } from '../models' +// @ts-ignore +import { RoleBindingList } from '../models' +/** + * V1alpha1RoleBindingApi - axios parameter creator + * @export + */ +export const V1alpha1RoleBindingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/RoleBinding + * @param {RoleBinding} [roleBinding] Fresh rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1RoleBinding: async ( + roleBinding?: RoleBinding, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/rolebindings` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(roleBinding, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/RoleBinding + * @param {string} name Name of rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1RoleBinding: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1RoleBinding', 'name', name) + const localVarPath = `/api/v1alpha1/rolebindings/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/RoleBinding + * @param {string} name Name of rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1RoleBinding: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1RoleBinding', 'name', name) + const localVarPath = `/api/v1alpha1/rolebindings/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/RoleBinding + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1RoleBinding: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/rolebindings` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/RoleBinding + * @param {string} name Name of rolebinding + * @param {RoleBinding} [roleBinding] Updated rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1RoleBinding: async ( + name: string, + roleBinding?: RoleBinding, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1RoleBinding', 'name', name) + const localVarPath = `/api/v1alpha1/rolebindings/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(roleBinding, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1RoleBindingApi - functional programming interface + * @export + */ +export const V1alpha1RoleBindingApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1RoleBindingApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/RoleBinding + * @param {RoleBinding} [roleBinding] Fresh rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1RoleBinding( + roleBinding?: RoleBinding, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1RoleBinding(roleBinding, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/RoleBinding + * @param {string} name Name of rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1RoleBinding( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1RoleBinding(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/RoleBinding + * @param {string} name Name of rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1RoleBinding( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1RoleBinding(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/RoleBinding + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1RoleBinding( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1RoleBinding( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/RoleBinding + * @param {string} name Name of rolebinding + * @param {RoleBinding} [roleBinding] Updated rolebinding + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1RoleBinding( + name: string, + roleBinding?: RoleBinding, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1RoleBinding(name, roleBinding, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1RoleBindingApi - factory interface + * @export + */ +export const V1alpha1RoleBindingApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1RoleBindingApiFp(configuration) + return { + /** + * Create v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiCreatev1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiCreatev1alpha1RoleBindingRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createv1alpha1RoleBinding(requestParameters.roleBinding, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiDeletev1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiDeletev1alpha1RoleBindingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletev1alpha1RoleBinding(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiGetv1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiGetv1alpha1RoleBindingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getv1alpha1RoleBinding(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiListv1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiListv1alpha1RoleBindingRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1RoleBinding( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiUpdatev1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiUpdatev1alpha1RoleBindingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1RoleBinding(requestParameters.name, requestParameters.roleBinding, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1RoleBinding operation in V1alpha1RoleBindingApi. + * @export + * @interface V1alpha1RoleBindingApiCreatev1alpha1RoleBindingRequest + */ +export interface V1alpha1RoleBindingApiCreatev1alpha1RoleBindingRequest { + /** + * Fresh rolebinding + * @type {RoleBinding} + * @memberof V1alpha1RoleBindingApiCreatev1alpha1RoleBinding + */ + readonly roleBinding?: RoleBinding +} + +/** + * Request parameters for deletev1alpha1RoleBinding operation in V1alpha1RoleBindingApi. + * @export + * @interface V1alpha1RoleBindingApiDeletev1alpha1RoleBindingRequest + */ +export interface V1alpha1RoleBindingApiDeletev1alpha1RoleBindingRequest { + /** + * Name of rolebinding + * @type {string} + * @memberof V1alpha1RoleBindingApiDeletev1alpha1RoleBinding + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1RoleBinding operation in V1alpha1RoleBindingApi. + * @export + * @interface V1alpha1RoleBindingApiGetv1alpha1RoleBindingRequest + */ +export interface V1alpha1RoleBindingApiGetv1alpha1RoleBindingRequest { + /** + * Name of rolebinding + * @type {string} + * @memberof V1alpha1RoleBindingApiGetv1alpha1RoleBinding + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1RoleBinding operation in V1alpha1RoleBindingApi. + * @export + * @interface V1alpha1RoleBindingApiListv1alpha1RoleBindingRequest + */ +export interface V1alpha1RoleBindingApiListv1alpha1RoleBindingRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1RoleBindingApiListv1alpha1RoleBinding + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1RoleBindingApiListv1alpha1RoleBinding + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1RoleBindingApiListv1alpha1RoleBinding + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1RoleBindingApiListv1alpha1RoleBinding + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1RoleBinding operation in V1alpha1RoleBindingApi. + * @export + * @interface V1alpha1RoleBindingApiUpdatev1alpha1RoleBindingRequest + */ +export interface V1alpha1RoleBindingApiUpdatev1alpha1RoleBindingRequest { + /** + * Name of rolebinding + * @type {string} + * @memberof V1alpha1RoleBindingApiUpdatev1alpha1RoleBinding + */ + readonly name: string + + /** + * Updated rolebinding + * @type {RoleBinding} + * @memberof V1alpha1RoleBindingApiUpdatev1alpha1RoleBinding + */ + readonly roleBinding?: RoleBinding +} + +/** + * V1alpha1RoleBindingApi - object-oriented interface + * @export + * @class V1alpha1RoleBindingApi + * @extends {BaseAPI} + */ +export class V1alpha1RoleBindingApi extends BaseAPI { + /** + * Create v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiCreatev1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleBindingApi + */ + public createv1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiCreatev1alpha1RoleBindingRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1RoleBindingApiFp(this.configuration) + .createv1alpha1RoleBinding(requestParameters.roleBinding, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiDeletev1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleBindingApi + */ + public deletev1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiDeletev1alpha1RoleBindingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1RoleBindingApiFp(this.configuration) + .deletev1alpha1RoleBinding(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiGetv1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleBindingApi + */ + public getv1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiGetv1alpha1RoleBindingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1RoleBindingApiFp(this.configuration) + .getv1alpha1RoleBinding(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiListv1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleBindingApi + */ + public listv1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiListv1alpha1RoleBindingRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1RoleBindingApiFp(this.configuration) + .listv1alpha1RoleBinding( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/RoleBinding + * @param {V1alpha1RoleBindingApiUpdatev1alpha1RoleBindingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1RoleBindingApi + */ + public updatev1alpha1RoleBinding( + requestParameters: V1alpha1RoleBindingApiUpdatev1alpha1RoleBindingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1RoleBindingApiFp(this.configuration) + .updatev1alpha1RoleBinding(requestParameters.name, requestParameters.roleBinding, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-setting-api.ts b/packages/api-client/src/api/v1alpha1-setting-api.ts new file mode 100644 index 000000000..bb60255d1 --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-setting-api.ts @@ -0,0 +1,636 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { Setting } from '../models' +// @ts-ignore +import { SettingList } from '../models' +/** + * V1alpha1SettingApi - axios parameter creator + * @export + */ +export const V1alpha1SettingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/Setting + * @param {Setting} [setting] Fresh setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1Setting: async (setting?: Setting, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1alpha1/settings` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(setting, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/Setting + * @param {string} name Name of setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1Setting: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1Setting', 'name', name) + const localVarPath = `/api/v1alpha1/settings/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/Setting + * @param {string} name Name of setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1Setting: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1Setting', 'name', name) + const localVarPath = `/api/v1alpha1/settings/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/Setting + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1Setting: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/settings` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/Setting + * @param {string} name Name of setting + * @param {Setting} [setting] Updated setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1Setting: async ( + name: string, + setting?: Setting, + options: AxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1Setting', 'name', name) + const localVarPath = `/api/v1alpha1/settings/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(setting, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1SettingApi - functional programming interface + * @export + */ +export const V1alpha1SettingApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1SettingApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/Setting + * @param {Setting} [setting] Fresh setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1Setting( + setting?: Setting, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1Setting(setting, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/Setting + * @param {string} name Name of setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1Setting( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1Setting(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/Setting + * @param {string} name Name of setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1Setting( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1Setting(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/Setting + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1Setting( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1Setting( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/Setting + * @param {string} name Name of setting + * @param {Setting} [setting] Updated setting + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1Setting( + name: string, + setting?: Setting, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1Setting(name, setting, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1SettingApi - factory interface + * @export + */ +export const V1alpha1SettingApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1SettingApiFp(configuration) + return { + /** + * Create v1alpha1/Setting + * @param {V1alpha1SettingApiCreatev1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1Setting( + requestParameters: V1alpha1SettingApiCreatev1alpha1SettingRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createv1alpha1Setting(requestParameters.setting, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/Setting + * @param {V1alpha1SettingApiDeletev1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1Setting( + requestParameters: V1alpha1SettingApiDeletev1alpha1SettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletev1alpha1Setting(requestParameters.name, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/Setting + * @param {V1alpha1SettingApiGetv1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1Setting( + requestParameters: V1alpha1SettingApiGetv1alpha1SettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.getv1alpha1Setting(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/Setting + * @param {V1alpha1SettingApiListv1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1Setting( + requestParameters: V1alpha1SettingApiListv1alpha1SettingRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1Setting( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/Setting + * @param {V1alpha1SettingApiUpdatev1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1Setting( + requestParameters: V1alpha1SettingApiUpdatev1alpha1SettingRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1Setting(requestParameters.name, requestParameters.setting, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1Setting operation in V1alpha1SettingApi. + * @export + * @interface V1alpha1SettingApiCreatev1alpha1SettingRequest + */ +export interface V1alpha1SettingApiCreatev1alpha1SettingRequest { + /** + * Fresh setting + * @type {Setting} + * @memberof V1alpha1SettingApiCreatev1alpha1Setting + */ + readonly setting?: Setting +} + +/** + * Request parameters for deletev1alpha1Setting operation in V1alpha1SettingApi. + * @export + * @interface V1alpha1SettingApiDeletev1alpha1SettingRequest + */ +export interface V1alpha1SettingApiDeletev1alpha1SettingRequest { + /** + * Name of setting + * @type {string} + * @memberof V1alpha1SettingApiDeletev1alpha1Setting + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1Setting operation in V1alpha1SettingApi. + * @export + * @interface V1alpha1SettingApiGetv1alpha1SettingRequest + */ +export interface V1alpha1SettingApiGetv1alpha1SettingRequest { + /** + * Name of setting + * @type {string} + * @memberof V1alpha1SettingApiGetv1alpha1Setting + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1Setting operation in V1alpha1SettingApi. + * @export + * @interface V1alpha1SettingApiListv1alpha1SettingRequest + */ +export interface V1alpha1SettingApiListv1alpha1SettingRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1SettingApiListv1alpha1Setting + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1SettingApiListv1alpha1Setting + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1SettingApiListv1alpha1Setting + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1SettingApiListv1alpha1Setting + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1Setting operation in V1alpha1SettingApi. + * @export + * @interface V1alpha1SettingApiUpdatev1alpha1SettingRequest + */ +export interface V1alpha1SettingApiUpdatev1alpha1SettingRequest { + /** + * Name of setting + * @type {string} + * @memberof V1alpha1SettingApiUpdatev1alpha1Setting + */ + readonly name: string + + /** + * Updated setting + * @type {Setting} + * @memberof V1alpha1SettingApiUpdatev1alpha1Setting + */ + readonly setting?: Setting +} + +/** + * V1alpha1SettingApi - object-oriented interface + * @export + * @class V1alpha1SettingApi + * @extends {BaseAPI} + */ +export class V1alpha1SettingApi extends BaseAPI { + /** + * Create v1alpha1/Setting + * @param {V1alpha1SettingApiCreatev1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1SettingApi + */ + public createv1alpha1Setting( + requestParameters: V1alpha1SettingApiCreatev1alpha1SettingRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1SettingApiFp(this.configuration) + .createv1alpha1Setting(requestParameters.setting, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/Setting + * @param {V1alpha1SettingApiDeletev1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1SettingApi + */ + public deletev1alpha1Setting( + requestParameters: V1alpha1SettingApiDeletev1alpha1SettingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1SettingApiFp(this.configuration) + .deletev1alpha1Setting(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/Setting + * @param {V1alpha1SettingApiGetv1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1SettingApi + */ + public getv1alpha1Setting( + requestParameters: V1alpha1SettingApiGetv1alpha1SettingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1SettingApiFp(this.configuration) + .getv1alpha1Setting(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/Setting + * @param {V1alpha1SettingApiListv1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1SettingApi + */ + public listv1alpha1Setting( + requestParameters: V1alpha1SettingApiListv1alpha1SettingRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1SettingApiFp(this.configuration) + .listv1alpha1Setting( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/Setting + * @param {V1alpha1SettingApiUpdatev1alpha1SettingRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1SettingApi + */ + public updatev1alpha1Setting( + requestParameters: V1alpha1SettingApiUpdatev1alpha1SettingRequest, + options?: AxiosRequestConfig, + ) { + return V1alpha1SettingApiFp(this.configuration) + .updatev1alpha1Setting(requestParameters.name, requestParameters.setting, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/api/v1alpha1-user-api.ts b/packages/api-client/src/api/v1alpha1-user-api.ts new file mode 100644 index 000000000..89cd15bdf --- /dev/null +++ b/packages/api-client/src/api/v1alpha1-user-api.ts @@ -0,0 +1,619 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from '../configuration' +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' +// Some imports not used depending on template conditions +// @ts-ignore +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from '../common' +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base' +// @ts-ignore +import { User } from '../models' +// @ts-ignore +import { UserList } from '../models' +/** + * V1alpha1UserApi - axios parameter creator + * @export + */ +export const V1alpha1UserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create v1alpha1/User + * @param {User} [user] Fresh user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1User: async (user?: User, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1alpha1/users` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete v1alpha1/User + * @param {string} name Name of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1User: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('deletev1alpha1User', 'name', name) + const localVarPath = `/api/v1alpha1/users/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get v1alpha1/User + * @param {string} name Name of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1User: async (name: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('getv1alpha1User', 'name', name) + const localVarPath = `/api/v1alpha1/users/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List v1alpha1/User + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1User: async ( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options: AxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1alpha1/users` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size + } + + if (labelSelector) { + localVarQueryParameter['labelSelector'] = labelSelector + } + + if (fieldSelector) { + localVarQueryParameter['fieldSelector'] = fieldSelector + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update v1alpha1/User + * @param {string} name Name of user + * @param {User} [user] Updated user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1User: async (name: string, user?: User, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('updatev1alpha1User', 'name', name) + const localVarPath = `/api/v1alpha1/users/{name}`.replace(`{${'name'}}`, encodeURIComponent(String(name))) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication BasicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication BearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } + localVarRequestOptions.data = serializeDataIfNeeded(user, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * V1alpha1UserApi - functional programming interface + * @export + */ +export const V1alpha1UserApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = V1alpha1UserApiAxiosParamCreator(configuration) + return { + /** + * Create v1alpha1/User + * @param {User} [user] Fresh user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createv1alpha1User( + user?: User, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createv1alpha1User(user, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Delete v1alpha1/User + * @param {string} name Name of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletev1alpha1User( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletev1alpha1User(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Get v1alpha1/User + * @param {string} name Name of user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getv1alpha1User( + name: string, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getv1alpha1User(name, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * List v1alpha1/User + * @param {number} [page] The page number. Zero indicates no page. + * @param {number} [size] Size of one page. Zero indicates no limit. + * @param {Array} [labelSelector] Label selector for filtering. + * @param {Array} [fieldSelector] Field selector for filtering. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listv1alpha1User( + page?: number, + size?: number, + labelSelector?: Array, + fieldSelector?: Array, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listv1alpha1User( + page, + size, + labelSelector, + fieldSelector, + options, + ) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + /** + * Update v1alpha1/User + * @param {string} name Name of user + * @param {User} [user] Updated user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatev1alpha1User( + name: string, + user?: User, + options?: AxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatev1alpha1User(name, user, options) + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) + }, + } +} + +/** + * V1alpha1UserApi - factory interface + * @export + */ +export const V1alpha1UserApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = V1alpha1UserApiFp(configuration) + return { + /** + * Create v1alpha1/User + * @param {V1alpha1UserApiCreatev1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createv1alpha1User( + requestParameters: V1alpha1UserApiCreatev1alpha1UserRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.createv1alpha1User(requestParameters.user, options).then((request) => request(axios, basePath)) + }, + /** + * Delete v1alpha1/User + * @param {V1alpha1UserApiDeletev1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletev1alpha1User( + requestParameters: V1alpha1UserApiDeletev1alpha1UserRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.deletev1alpha1User(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * Get v1alpha1/User + * @param {V1alpha1UserApiGetv1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getv1alpha1User( + requestParameters: V1alpha1UserApiGetv1alpha1UserRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp.getv1alpha1User(requestParameters.name, options).then((request) => request(axios, basePath)) + }, + /** + * List v1alpha1/User + * @param {V1alpha1UserApiListv1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listv1alpha1User( + requestParameters: V1alpha1UserApiListv1alpha1UserRequest = {}, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .listv1alpha1User( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Update v1alpha1/User + * @param {V1alpha1UserApiUpdatev1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatev1alpha1User( + requestParameters: V1alpha1UserApiUpdatev1alpha1UserRequest, + options?: AxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updatev1alpha1User(requestParameters.name, requestParameters.user, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for createv1alpha1User operation in V1alpha1UserApi. + * @export + * @interface V1alpha1UserApiCreatev1alpha1UserRequest + */ +export interface V1alpha1UserApiCreatev1alpha1UserRequest { + /** + * Fresh user + * @type {User} + * @memberof V1alpha1UserApiCreatev1alpha1User + */ + readonly user?: User +} + +/** + * Request parameters for deletev1alpha1User operation in V1alpha1UserApi. + * @export + * @interface V1alpha1UserApiDeletev1alpha1UserRequest + */ +export interface V1alpha1UserApiDeletev1alpha1UserRequest { + /** + * Name of user + * @type {string} + * @memberof V1alpha1UserApiDeletev1alpha1User + */ + readonly name: string +} + +/** + * Request parameters for getv1alpha1User operation in V1alpha1UserApi. + * @export + * @interface V1alpha1UserApiGetv1alpha1UserRequest + */ +export interface V1alpha1UserApiGetv1alpha1UserRequest { + /** + * Name of user + * @type {string} + * @memberof V1alpha1UserApiGetv1alpha1User + */ + readonly name: string +} + +/** + * Request parameters for listv1alpha1User operation in V1alpha1UserApi. + * @export + * @interface V1alpha1UserApiListv1alpha1UserRequest + */ +export interface V1alpha1UserApiListv1alpha1UserRequest { + /** + * The page number. Zero indicates no page. + * @type {number} + * @memberof V1alpha1UserApiListv1alpha1User + */ + readonly page?: number + + /** + * Size of one page. Zero indicates no limit. + * @type {number} + * @memberof V1alpha1UserApiListv1alpha1User + */ + readonly size?: number + + /** + * Label selector for filtering. + * @type {Array} + * @memberof V1alpha1UserApiListv1alpha1User + */ + readonly labelSelector?: Array + + /** + * Field selector for filtering. + * @type {Array} + * @memberof V1alpha1UserApiListv1alpha1User + */ + readonly fieldSelector?: Array +} + +/** + * Request parameters for updatev1alpha1User operation in V1alpha1UserApi. + * @export + * @interface V1alpha1UserApiUpdatev1alpha1UserRequest + */ +export interface V1alpha1UserApiUpdatev1alpha1UserRequest { + /** + * Name of user + * @type {string} + * @memberof V1alpha1UserApiUpdatev1alpha1User + */ + readonly name: string + + /** + * Updated user + * @type {User} + * @memberof V1alpha1UserApiUpdatev1alpha1User + */ + readonly user?: User +} + +/** + * V1alpha1UserApi - object-oriented interface + * @export + * @class V1alpha1UserApi + * @extends {BaseAPI} + */ +export class V1alpha1UserApi extends BaseAPI { + /** + * Create v1alpha1/User + * @param {V1alpha1UserApiCreatev1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1UserApi + */ + public createv1alpha1User( + requestParameters: V1alpha1UserApiCreatev1alpha1UserRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1UserApiFp(this.configuration) + .createv1alpha1User(requestParameters.user, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete v1alpha1/User + * @param {V1alpha1UserApiDeletev1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1UserApi + */ + public deletev1alpha1User(requestParameters: V1alpha1UserApiDeletev1alpha1UserRequest, options?: AxiosRequestConfig) { + return V1alpha1UserApiFp(this.configuration) + .deletev1alpha1User(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get v1alpha1/User + * @param {V1alpha1UserApiGetv1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1UserApi + */ + public getv1alpha1User(requestParameters: V1alpha1UserApiGetv1alpha1UserRequest, options?: AxiosRequestConfig) { + return V1alpha1UserApiFp(this.configuration) + .getv1alpha1User(requestParameters.name, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List v1alpha1/User + * @param {V1alpha1UserApiListv1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1UserApi + */ + public listv1alpha1User( + requestParameters: V1alpha1UserApiListv1alpha1UserRequest = {}, + options?: AxiosRequestConfig, + ) { + return V1alpha1UserApiFp(this.configuration) + .listv1alpha1User( + requestParameters.page, + requestParameters.size, + requestParameters.labelSelector, + requestParameters.fieldSelector, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update v1alpha1/User + * @param {V1alpha1UserApiUpdatev1alpha1UserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof V1alpha1UserApi + */ + public updatev1alpha1User(requestParameters: V1alpha1UserApiUpdatev1alpha1UserRequest, options?: AxiosRequestConfig) { + return V1alpha1UserApiFp(this.configuration) + .updatev1alpha1User(requestParameters.name, requestParameters.user, options) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/packages/api-client/src/base.ts b/packages/api-client/src/base.ts new file mode 100644 index 000000000..b62944c9d --- /dev/null +++ b/packages/api-client/src/base.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from './configuration' +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios' +import globalAxios from 'axios' + +export const BASE_PATH = 'http://localhost:8090'.replace(/\/+$/, '') + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ',', + ssv: ' ', + tsv: '\t', + pipes: '|', +} + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string + options: AxiosRequestConfig +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined + + constructor( + configuration?: Configuration, + protected basePath: string = BASE_PATH, + protected axios: AxiosInstance = globalAxios, + ) { + if (configuration) { + this.configuration = configuration + this.basePath = configuration.basePath || this.basePath + } + } +} + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg) + this.name = 'RequiredError' + } +} diff --git a/packages/api-client/src/common.ts b/packages/api-client/src/common.ts new file mode 100644 index 000000000..43627a42c --- /dev/null +++ b/packages/api-client/src/common.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from './configuration' +import type { RequestArgs } from './base' +import type { AxiosInstance, AxiosResponse } from 'axios' +import { RequiredError } from './base' + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError( + paramName, + `Required parameter ${paramName} was null or undefined when calling ${functionName}.`, + ) + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = + typeof configuration.apiKey === 'function' ? await configuration.apiKey(keyParamName) : await configuration.apiKey + object[keyParamName] = localVarApiKeyValue + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object['auth'] = { username: configuration.username, password: configuration.password } + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = + typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken + object['Authorization'] = 'Bearer ' + accessToken + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function ( + object: any, + name: string, + scopes: string[], + configuration?: Configuration, +) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = + typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken + object['Authorization'] = 'Bearer ' + localVarAccessTokenValue + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ''): void { + if (parameter == null) return + if (typeof parameter === 'object') { + if (Array.isArray(parameter)) { + ;(parameter as any[]).forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key)) + } else { + Object.keys(parameter).forEach((currentKey) => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`), + ) + } + } else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter) + } else { + urlSearchParams.set(key, parameter) + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search) + setFlattenedQueryParams(searchParams, objects) + url.search = searchParams.toString() +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string' + const needsSerialization = + nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString + return needsSerialization ? JSON.stringify(value !== undefined ? value : {}) : value || '' +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function ( + axiosArgs: RequestArgs, + globalAxios: AxiosInstance, + BASE_PATH: string, + configuration?: Configuration, +) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url } + return axios.request(axiosRequestArgs) + } +} diff --git a/packages/api-client/src/configuration.ts b/packages/api-client/src/configuration.ts new file mode 100644 index 000000000..ac0e4df56 --- /dev/null +++ b/packages/api-client/src/configuration.ts @@ -0,0 +1,108 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise) + username?: string + password?: string + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + basePath?: string + baseOptions?: any + formDataCtor?: new () => any +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise) + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey + this.username = param.username + this.password = param.password + this.accessToken = param.accessToken + this.basePath = param.basePath + this.baseOptions = param.baseOptions + this.formDataCtor = param.formDataCtor + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i') + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') + } +} diff --git a/packages/api-client/src/git_push.sh b/packages/api-client/src/git_push.sh new file mode 100644 index 000000000..f53a75d4f --- /dev/null +++ b/packages/api-client/src/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/api-client/src/index.ts b/packages/api-client/src/index.ts new file mode 100644 index 000000000..836e02af1 --- /dev/null +++ b/packages/api-client/src/index.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export * from './api' +export * from './configuration' +export * from './models' diff --git a/packages/api-client/src/models/annotation-setting-list.ts b/packages/api-client/src/models/annotation-setting-list.ts new file mode 100644 index 000000000..f4e749db8 --- /dev/null +++ b/packages/api-client/src/models/annotation-setting-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { AnnotationSetting } from './annotation-setting' + +/** + * + * @export + * @interface AnnotationSettingList + */ +export interface AnnotationSettingList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof AnnotationSettingList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof AnnotationSettingList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof AnnotationSettingList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof AnnotationSettingList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof AnnotationSettingList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof AnnotationSettingList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof AnnotationSettingList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof AnnotationSettingList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof AnnotationSettingList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/annotation-setting-spec.ts b/packages/api-client/src/models/annotation-setting-spec.ts new file mode 100644 index 000000000..a3f3f9d38 --- /dev/null +++ b/packages/api-client/src/models/annotation-setting-spec.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { GroupKind } from './group-kind' + +/** + * + * @export + * @interface AnnotationSettingSpec + */ +export interface AnnotationSettingSpec { + /** + * + * @type {GroupKind} + * @memberof AnnotationSettingSpec + */ + targetRef: GroupKind + /** + * + * @type {Array} + * @memberof AnnotationSettingSpec + */ + formSchema: Array +} diff --git a/packages/api-client/src/models/annotation-setting.ts b/packages/api-client/src/models/annotation-setting.ts new file mode 100644 index 000000000..d7b2ea6fe --- /dev/null +++ b/packages/api-client/src/models/annotation-setting.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { AnnotationSettingSpec } from './annotation-setting-spec' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface AnnotationSetting + */ +export interface AnnotationSetting { + /** + * + * @type {AnnotationSettingSpec} + * @memberof AnnotationSetting + */ + spec: AnnotationSettingSpec + /** + * + * @type {string} + * @memberof AnnotationSetting + */ + apiVersion: string + /** + * + * @type {string} + * @memberof AnnotationSetting + */ + kind: string + /** + * + * @type {Metadata} + * @memberof AnnotationSetting + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/attachment-list.ts b/packages/api-client/src/models/attachment-list.ts new file mode 100644 index 000000000..1c65d2589 --- /dev/null +++ b/packages/api-client/src/models/attachment-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Attachment } from './attachment' + +/** + * + * @export + * @interface AttachmentList + */ +export interface AttachmentList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof AttachmentList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof AttachmentList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof AttachmentList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof AttachmentList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof AttachmentList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof AttachmentList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof AttachmentList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof AttachmentList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof AttachmentList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/attachment-spec.ts b/packages/api-client/src/models/attachment-spec.ts new file mode 100644 index 000000000..81d0006cb --- /dev/null +++ b/packages/api-client/src/models/attachment-spec.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface AttachmentSpec + */ +export interface AttachmentSpec { + /** + * Display name of attachment + * @type {string} + * @memberof AttachmentSpec + */ + displayName?: string + /** + * Group name + * @type {string} + * @memberof AttachmentSpec + */ + groupName?: string + /** + * Policy name + * @type {string} + * @memberof AttachmentSpec + */ + policyName?: string + /** + * Name of User who uploads the attachment + * @type {string} + * @memberof AttachmentSpec + */ + ownerName?: string + /** + * Media type of attachment + * @type {string} + * @memberof AttachmentSpec + */ + mediaType?: string + /** + * Size of attachment. Unit is Byte + * @type {number} + * @memberof AttachmentSpec + */ + size?: number + /** + * Tags of attachment + * @type {Array} + * @memberof AttachmentSpec + */ + tags?: Array +} diff --git a/packages/api-client/src/models/attachment-status.ts b/packages/api-client/src/models/attachment-status.ts new file mode 100644 index 000000000..99f38c47b --- /dev/null +++ b/packages/api-client/src/models/attachment-status.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface AttachmentStatus + */ +export interface AttachmentStatus { + /** + * Permalink of attachment + * @type {string} + * @memberof AttachmentStatus + */ + permalink?: string +} diff --git a/packages/api-client/src/models/attachment.ts b/packages/api-client/src/models/attachment.ts new file mode 100644 index 000000000..3f64db02e --- /dev/null +++ b/packages/api-client/src/models/attachment.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { AttachmentSpec } from './attachment-spec' +// May contain unused imports in some cases +// @ts-ignore +import { AttachmentStatus } from './attachment-status' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface Attachment + */ +export interface Attachment { + /** + * + * @type {AttachmentSpec} + * @memberof Attachment + */ + spec: AttachmentSpec + /** + * + * @type {AttachmentStatus} + * @memberof Attachment + */ + status?: AttachmentStatus + /** + * + * @type {string} + * @memberof Attachment + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Attachment + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Attachment + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/author.ts b/packages/api-client/src/models/author.ts new file mode 100644 index 000000000..92fc9cbc0 --- /dev/null +++ b/packages/api-client/src/models/author.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Author + */ +export interface Author { + /** + * + * @type {string} + * @memberof Author + */ + name: string + /** + * + * @type {string} + * @memberof Author + */ + website?: string +} diff --git a/packages/api-client/src/models/category-list.ts b/packages/api-client/src/models/category-list.ts new file mode 100644 index 000000000..f904881d2 --- /dev/null +++ b/packages/api-client/src/models/category-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Category } from './category' + +/** + * + * @export + * @interface CategoryList + */ +export interface CategoryList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CategoryList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CategoryList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof CategoryList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof CategoryList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof CategoryList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof CategoryList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CategoryList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CategoryList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof CategoryList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/category-spec.ts b/packages/api-client/src/models/category-spec.ts new file mode 100644 index 000000000..3c130d365 --- /dev/null +++ b/packages/api-client/src/models/category-spec.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CategorySpec + */ +export interface CategorySpec { + /** + * + * @type {string} + * @memberof CategorySpec + */ + displayName: string + /** + * + * @type {string} + * @memberof CategorySpec + */ + slug: string + /** + * + * @type {string} + * @memberof CategorySpec + */ + description?: string + /** + * + * @type {string} + * @memberof CategorySpec + */ + cover?: string + /** + * + * @type {string} + * @memberof CategorySpec + */ + template?: string + /** + * + * @type {number} + * @memberof CategorySpec + */ + priority: number + /** + * + * @type {Array} + * @memberof CategorySpec + */ + children?: Array +} diff --git a/packages/api-client/src/models/category-status.ts b/packages/api-client/src/models/category-status.ts new file mode 100644 index 000000000..5ddc54b16 --- /dev/null +++ b/packages/api-client/src/models/category-status.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CategoryStatus + */ +export interface CategoryStatus { + /** + * + * @type {string} + * @memberof CategoryStatus + */ + permalink?: string + /** + * + * @type {number} + * @memberof CategoryStatus + */ + postCount?: number + /** + * + * @type {number} + * @memberof CategoryStatus + */ + visiblePostCount?: number +} diff --git a/packages/api-client/src/models/category.ts b/packages/api-client/src/models/category.ts new file mode 100644 index 000000000..ee7a1adef --- /dev/null +++ b/packages/api-client/src/models/category.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CategorySpec } from './category-spec' +// May contain unused imports in some cases +// @ts-ignore +import { CategoryStatus } from './category-status' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface Category + */ +export interface Category { + /** + * + * @type {CategorySpec} + * @memberof Category + */ + spec: CategorySpec + /** + * + * @type {CategoryStatus} + * @memberof Category + */ + status?: CategoryStatus + /** + * + * @type {string} + * @memberof Category + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Category + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Category + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/change-password-request.ts b/packages/api-client/src/models/change-password-request.ts new file mode 100644 index 000000000..c1bf71143 --- /dev/null +++ b/packages/api-client/src/models/change-password-request.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ChangePasswordRequest + */ +export interface ChangePasswordRequest { + /** + * New password. + * @type {string} + * @memberof ChangePasswordRequest + */ + password: string +} diff --git a/packages/api-client/src/models/comment-email-owner.ts b/packages/api-client/src/models/comment-email-owner.ts new file mode 100644 index 000000000..a8e68f975 --- /dev/null +++ b/packages/api-client/src/models/comment-email-owner.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CommentEmailOwner + */ +export interface CommentEmailOwner { + /** + * + * @type {string} + * @memberof CommentEmailOwner + */ + email?: string + /** + * + * @type {string} + * @memberof CommentEmailOwner + */ + avatar?: string + /** + * + * @type {string} + * @memberof CommentEmailOwner + */ + displayName?: string + /** + * + * @type {string} + * @memberof CommentEmailOwner + */ + website?: string +} diff --git a/packages/api-client/src/models/comment-list.ts b/packages/api-client/src/models/comment-list.ts new file mode 100644 index 000000000..d339da5ff --- /dev/null +++ b/packages/api-client/src/models/comment-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Comment } from './comment' + +/** + * + * @export + * @interface CommentList + */ +export interface CommentList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CommentList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CommentList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof CommentList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof CommentList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof CommentList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof CommentList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CommentList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CommentList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof CommentList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/comment-owner.ts b/packages/api-client/src/models/comment-owner.ts new file mode 100644 index 000000000..db7680a95 --- /dev/null +++ b/packages/api-client/src/models/comment-owner.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CommentOwner + */ +export interface CommentOwner { + /** + * + * @type {string} + * @memberof CommentOwner + */ + kind: string + /** + * + * @type {string} + * @memberof CommentOwner + */ + name: string + /** + * + * @type {string} + * @memberof CommentOwner + */ + displayName?: string + /** + * + * @type {{ [key: string]: string; }} + * @memberof CommentOwner + */ + annotations?: { [key: string]: string } +} diff --git a/packages/api-client/src/models/comment-request.ts b/packages/api-client/src/models/comment-request.ts new file mode 100644 index 000000000..894b3d981 --- /dev/null +++ b/packages/api-client/src/models/comment-request.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CommentEmailOwner } from './comment-email-owner' +// May contain unused imports in some cases +// @ts-ignore +import { Ref } from './ref' + +/** + * + * @export + * @interface CommentRequest + */ +export interface CommentRequest { + /** + * + * @type {Ref} + * @memberof CommentRequest + */ + subjectRef: Ref + /** + * + * @type {CommentEmailOwner} + * @memberof CommentRequest + */ + owner?: CommentEmailOwner + /** + * + * @type {string} + * @memberof CommentRequest + */ + raw: string + /** + * + * @type {string} + * @memberof CommentRequest + */ + content: string + /** + * + * @type {boolean} + * @memberof CommentRequest + */ + allowNotification?: boolean +} diff --git a/packages/api-client/src/models/comment-spec.ts b/packages/api-client/src/models/comment-spec.ts new file mode 100644 index 000000000..be9b35727 --- /dev/null +++ b/packages/api-client/src/models/comment-spec.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CommentOwner } from './comment-owner' +// May contain unused imports in some cases +// @ts-ignore +import { Ref } from './ref' + +/** + * + * @export + * @interface CommentSpec + */ +export interface CommentSpec { + /** + * + * @type {string} + * @memberof CommentSpec + */ + raw: string + /** + * + * @type {string} + * @memberof CommentSpec + */ + content: string + /** + * + * @type {CommentOwner} + * @memberof CommentSpec + */ + owner: CommentOwner + /** + * + * @type {string} + * @memberof CommentSpec + */ + userAgent?: string + /** + * + * @type {string} + * @memberof CommentSpec + */ + ipAddress?: string + /** + * + * @type {string} + * @memberof CommentSpec + */ + approvedTime?: string + /** + * + * @type {number} + * @memberof CommentSpec + */ + priority: number + /** + * + * @type {boolean} + * @memberof CommentSpec + */ + top: boolean + /** + * + * @type {boolean} + * @memberof CommentSpec + */ + allowNotification: boolean + /** + * + * @type {boolean} + * @memberof CommentSpec + */ + approved: boolean + /** + * + * @type {boolean} + * @memberof CommentSpec + */ + hidden: boolean + /** + * + * @type {Ref} + * @memberof CommentSpec + */ + subjectRef: Ref + /** + * + * @type {string} + * @memberof CommentSpec + */ + lastReadTime?: string +} diff --git a/packages/api-client/src/models/comment-status.ts b/packages/api-client/src/models/comment-status.ts new file mode 100644 index 000000000..83614332c --- /dev/null +++ b/packages/api-client/src/models/comment-status.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CommentStatus + */ +export interface CommentStatus { + /** + * + * @type {string} + * @memberof CommentStatus + */ + lastReplyTime?: string + /** + * + * @type {number} + * @memberof CommentStatus + */ + replyCount?: number + /** + * + * @type {number} + * @memberof CommentStatus + */ + unreadReplyCount?: number + /** + * + * @type {boolean} + * @memberof CommentStatus + */ + hasNewReply?: boolean +} diff --git a/packages/api-client/src/models/comment-vo-list.ts b/packages/api-client/src/models/comment-vo-list.ts new file mode 100644 index 000000000..7154352a4 --- /dev/null +++ b/packages/api-client/src/models/comment-vo-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CommentVo } from './comment-vo' + +/** + * + * @export + * @interface CommentVoList + */ +export interface CommentVoList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CommentVoList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CommentVoList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof CommentVoList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof CommentVoList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof CommentVoList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof CommentVoList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CommentVoList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CommentVoList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof CommentVoList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/comment-vo.ts b/packages/api-client/src/models/comment-vo.ts new file mode 100644 index 000000000..5ad80321d --- /dev/null +++ b/packages/api-client/src/models/comment-vo.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CommentSpec } from './comment-spec' +// May contain unused imports in some cases +// @ts-ignore +import { CommentStatus } from './comment-status' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { OwnerInfo } from './owner-info' + +/** + * A chunk of items. + * @export + * @interface CommentVo + */ +export interface CommentVo { + /** + * + * @type {Metadata} + * @memberof CommentVo + */ + metadata: Metadata + /** + * + * @type {CommentSpec} + * @memberof CommentVo + */ + spec: CommentSpec + /** + * + * @type {CommentStatus} + * @memberof CommentVo + */ + status?: CommentStatus + /** + * + * @type {OwnerInfo} + * @memberof CommentVo + */ + owner: OwnerInfo +} diff --git a/packages/api-client/src/models/comment.ts b/packages/api-client/src/models/comment.ts new file mode 100644 index 000000000..99c0aeda5 --- /dev/null +++ b/packages/api-client/src/models/comment.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CommentSpec } from './comment-spec' +// May contain unused imports in some cases +// @ts-ignore +import { CommentStatus } from './comment-status' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface Comment + */ +export interface Comment { + /** + * + * @type {CommentSpec} + * @memberof Comment + */ + spec: CommentSpec + /** + * + * @type {CommentStatus} + * @memberof Comment + */ + status?: CommentStatus + /** + * + * @type {string} + * @memberof Comment + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Comment + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Comment + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/condition.ts b/packages/api-client/src/models/condition.ts new file mode 100644 index 000000000..704f48601 --- /dev/null +++ b/packages/api-client/src/models/condition.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Condition + */ +export interface Condition { + /** + * + * @type {string} + * @memberof Condition + */ + type: string + /** + * + * @type {string} + * @memberof Condition + */ + status: ConditionStatusEnum + /** + * + * @type {string} + * @memberof Condition + */ + lastTransitionTime: string + /** + * + * @type {string} + * @memberof Condition + */ + message: string + /** + * + * @type {string} + * @memberof Condition + */ + reason: string +} + +export const ConditionStatusEnum = { + True: 'TRUE', + False: 'FALSE', + Unknown: 'UNKNOWN', +} as const + +export type ConditionStatusEnum = typeof ConditionStatusEnum[keyof typeof ConditionStatusEnum] diff --git a/packages/api-client/src/models/config-map-list.ts b/packages/api-client/src/models/config-map-list.ts new file mode 100644 index 000000000..675f8d7e6 --- /dev/null +++ b/packages/api-client/src/models/config-map-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { ConfigMap } from './config-map' + +/** + * + * @export + * @interface ConfigMapList + */ +export interface ConfigMapList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ConfigMapList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ConfigMapList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ConfigMapList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ConfigMapList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ConfigMapList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ConfigMapList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ConfigMapList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ConfigMapList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ConfigMapList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/config-map.ts b/packages/api-client/src/models/config-map.ts new file mode 100644 index 000000000..2ad5c42ae --- /dev/null +++ b/packages/api-client/src/models/config-map.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface ConfigMap + */ +export interface ConfigMap { + /** + * + * @type {{ [key: string]: string; }} + * @memberof ConfigMap + */ + data?: { [key: string]: string } + /** + * + * @type {string} + * @memberof ConfigMap + */ + apiVersion: string + /** + * + * @type {string} + * @memberof ConfigMap + */ + kind: string + /** + * + * @type {Metadata} + * @memberof ConfigMap + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/content-wrapper.ts b/packages/api-client/src/models/content-wrapper.ts new file mode 100644 index 000000000..bde86c587 --- /dev/null +++ b/packages/api-client/src/models/content-wrapper.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface ContentWrapper + */ +export interface ContentWrapper { + /** + * + * @type {string} + * @memberof ContentWrapper + */ + snapshotName?: string + /** + * + * @type {string} + * @memberof ContentWrapper + */ + raw?: string + /** + * + * @type {string} + * @memberof ContentWrapper + */ + content?: string + /** + * + * @type {string} + * @memberof ContentWrapper + */ + rawType?: string +} diff --git a/packages/api-client/src/models/content.ts b/packages/api-client/src/models/content.ts new file mode 100644 index 000000000..1b5a49824 --- /dev/null +++ b/packages/api-client/src/models/content.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Content + */ +export interface Content { + /** + * + * @type {string} + * @memberof Content + */ + raw?: string + /** + * + * @type {string} + * @memberof Content + */ + content?: string + /** + * + * @type {string} + * @memberof Content + */ + rawType?: string +} diff --git a/packages/api-client/src/models/contributor.ts b/packages/api-client/src/models/contributor.ts new file mode 100644 index 000000000..36ee7f85b --- /dev/null +++ b/packages/api-client/src/models/contributor.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Contributor + */ +export interface Contributor { + /** + * + * @type {string} + * @memberof Contributor + */ + displayName?: string + /** + * + * @type {string} + * @memberof Contributor + */ + avatar?: string + /** + * + * @type {string} + * @memberof Contributor + */ + name?: string +} diff --git a/packages/api-client/src/models/counter-list.ts b/packages/api-client/src/models/counter-list.ts new file mode 100644 index 000000000..298d3b2aa --- /dev/null +++ b/packages/api-client/src/models/counter-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Counter } from './counter' + +/** + * + * @export + * @interface CounterList + */ +export interface CounterList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CounterList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof CounterList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof CounterList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof CounterList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof CounterList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof CounterList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CounterList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof CounterList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof CounterList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/counter-request.ts b/packages/api-client/src/models/counter-request.ts new file mode 100644 index 000000000..65d22ac98 --- /dev/null +++ b/packages/api-client/src/models/counter-request.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface CounterRequest + */ +export interface CounterRequest { + /** + * + * @type {string} + * @memberof CounterRequest + */ + group?: string + /** + * + * @type {string} + * @memberof CounterRequest + */ + plural?: string + /** + * + * @type {string} + * @memberof CounterRequest + */ + name?: string + /** + * + * @type {string} + * @memberof CounterRequest + */ + hostname?: string + /** + * + * @type {string} + * @memberof CounterRequest + */ + screen?: string + /** + * + * @type {string} + * @memberof CounterRequest + */ + language?: string + /** + * + * @type {string} + * @memberof CounterRequest + */ + referrer?: string +} diff --git a/packages/api-client/src/models/counter.ts b/packages/api-client/src/models/counter.ts new file mode 100644 index 000000000..821f596b9 --- /dev/null +++ b/packages/api-client/src/models/counter.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface Counter + */ +export interface Counter { + /** + * + * @type {number} + * @memberof Counter + */ + visit?: number + /** + * + * @type {number} + * @memberof Counter + */ + upvote?: number + /** + * + * @type {number} + * @memberof Counter + */ + downvote?: number + /** + * + * @type {number} + * @memberof Counter + */ + totalComment?: number + /** + * + * @type {number} + * @memberof Counter + */ + approvedComment?: number + /** + * + * @type {string} + * @memberof Counter + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Counter + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Counter + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/custom-templates.ts b/packages/api-client/src/models/custom-templates.ts new file mode 100644 index 000000000..7e73c12a5 --- /dev/null +++ b/packages/api-client/src/models/custom-templates.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { TemplateDescriptor } from './template-descriptor' + +/** + * + * @export + * @interface CustomTemplates + */ +export interface CustomTemplates { + /** + * + * @type {Array} + * @memberof CustomTemplates + */ + post?: Array + /** + * + * @type {Array} + * @memberof CustomTemplates + */ + category?: Array + /** + * + * @type {Array} + * @memberof CustomTemplates + */ + page?: Array +} diff --git a/packages/api-client/src/models/dashboard-stats.ts b/packages/api-client/src/models/dashboard-stats.ts new file mode 100644 index 000000000..d5716991e --- /dev/null +++ b/packages/api-client/src/models/dashboard-stats.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface DashboardStats + */ +export interface DashboardStats { + /** + * + * @type {number} + * @memberof DashboardStats + */ + visits?: number + /** + * + * @type {number} + * @memberof DashboardStats + */ + comments?: number + /** + * + * @type {number} + * @memberof DashboardStats + */ + approvedComments?: number + /** + * + * @type {number} + * @memberof DashboardStats + */ + upvotes?: number + /** + * + * @type {number} + * @memberof DashboardStats + */ + users?: number + /** + * + * @type {number} + * @memberof DashboardStats + */ + posts?: number +} diff --git a/packages/api-client/src/models/excerpt.ts b/packages/api-client/src/models/excerpt.ts new file mode 100644 index 000000000..83b319334 --- /dev/null +++ b/packages/api-client/src/models/excerpt.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Excerpt + */ +export interface Excerpt { + /** + * + * @type {boolean} + * @memberof Excerpt + */ + autoGenerate: boolean + /** + * + * @type {string} + * @memberof Excerpt + */ + raw?: string +} diff --git a/packages/api-client/src/models/extension.ts b/packages/api-client/src/models/extension.ts new file mode 100644 index 000000000..64dc9feb9 --- /dev/null +++ b/packages/api-client/src/models/extension.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface Extension + */ +export interface Extension { + /** + * + * @type {string} + * @memberof Extension + */ + kind: string + /** + * + * @type {string} + * @memberof Extension + */ + apiVersion: string + /** + * + * @type {Metadata} + * @memberof Extension + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/file-reverse-proxy-provider.ts b/packages/api-client/src/models/file-reverse-proxy-provider.ts new file mode 100644 index 000000000..95318df2d --- /dev/null +++ b/packages/api-client/src/models/file-reverse-proxy-provider.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface FileReverseProxyProvider + */ +export interface FileReverseProxyProvider { + /** + * + * @type {string} + * @memberof FileReverseProxyProvider + */ + directory?: string + /** + * + * @type {string} + * @memberof FileReverseProxyProvider + */ + filename?: string +} diff --git a/packages/api-client/src/models/grant-request.ts b/packages/api-client/src/models/grant-request.ts new file mode 100644 index 000000000..8a64a6185 --- /dev/null +++ b/packages/api-client/src/models/grant-request.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GrantRequest + */ +export interface GrantRequest { + /** + * + * @type {Array} + * @memberof GrantRequest + */ + roles?: Array +} diff --git a/packages/api-client/src/models/group-kind.ts b/packages/api-client/src/models/group-kind.ts new file mode 100644 index 000000000..a4a4dfb7d --- /dev/null +++ b/packages/api-client/src/models/group-kind.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GroupKind + */ +export interface GroupKind { + /** + * + * @type {string} + * @memberof GroupKind + */ + group?: string + /** + * + * @type {string} + * @memberof GroupKind + */ + kind?: string +} diff --git a/packages/api-client/src/models/group-list.ts b/packages/api-client/src/models/group-list.ts new file mode 100644 index 000000000..e92e1e275 --- /dev/null +++ b/packages/api-client/src/models/group-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Group } from './group' + +/** + * + * @export + * @interface GroupList + */ +export interface GroupList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof GroupList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof GroupList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof GroupList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof GroupList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof GroupList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof GroupList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof GroupList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof GroupList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof GroupList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/group-spec.ts b/packages/api-client/src/models/group-spec.ts new file mode 100644 index 000000000..cc412d5e1 --- /dev/null +++ b/packages/api-client/src/models/group-spec.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GroupSpec + */ +export interface GroupSpec { + /** + * Display name of group + * @type {string} + * @memberof GroupSpec + */ + displayName: string +} diff --git a/packages/api-client/src/models/group-status.ts b/packages/api-client/src/models/group-status.ts new file mode 100644 index 000000000..633645beb --- /dev/null +++ b/packages/api-client/src/models/group-status.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface GroupStatus + */ +export interface GroupStatus { + /** + * Update timestamp of the group + * @type {string} + * @memberof GroupStatus + */ + updateTimestamp?: string + /** + * Total of attachments under the current group + * @type {number} + * @memberof GroupStatus + */ + totalAttachments?: number +} diff --git a/packages/api-client/src/models/group.ts b/packages/api-client/src/models/group.ts new file mode 100644 index 000000000..4f8cc917f --- /dev/null +++ b/packages/api-client/src/models/group.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { GroupSpec } from './group-spec' +// May contain unused imports in some cases +// @ts-ignore +import { GroupStatus } from './group-status' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface Group + */ +export interface Group { + /** + * + * @type {GroupSpec} + * @memberof Group + */ + spec: GroupSpec + /** + * + * @type {GroupStatus} + * @memberof Group + */ + status?: GroupStatus + /** + * + * @type {string} + * @memberof Group + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Group + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Group + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/index.ts b/packages/api-client/src/models/index.ts new file mode 100644 index 000000000..771138e9f --- /dev/null +++ b/packages/api-client/src/models/index.ts @@ -0,0 +1,130 @@ +export * from './annotation-setting' +export * from './annotation-setting-list' +export * from './annotation-setting-spec' +export * from './attachment' +export * from './attachment-list' +export * from './attachment-spec' +export * from './attachment-status' +export * from './author' +export * from './category' +export * from './category-list' +export * from './category-spec' +export * from './category-status' +export * from './change-password-request' +export * from './comment' +export * from './comment-email-owner' +export * from './comment-list' +export * from './comment-owner' +export * from './comment-request' +export * from './comment-spec' +export * from './comment-status' +export * from './comment-vo' +export * from './comment-vo-list' +export * from './condition' +export * from './config-map' +export * from './config-map-list' +export * from './content' +export * from './content-wrapper' +export * from './contributor' +export * from './counter' +export * from './counter-list' +export * from './counter-request' +export * from './custom-templates' +export * from './dashboard-stats' +export * from './excerpt' +export * from './extension' +export * from './file-reverse-proxy-provider' +export * from './grant-request' +export * from './group' +export * from './group-kind' +export * from './group-list' +export * from './group-spec' +export * from './group-status' +export * from './license' +export * from './listed-comment' +export * from './listed-comment-list' +export * from './listed-post' +export * from './listed-post-list' +export * from './listed-reply' +export * from './listed-reply-list' +export * from './listed-single-page' +export * from './listed-single-page-list' +export * from './login-history' +export * from './menu' +export * from './menu-item' +export * from './menu-item-list' +export * from './menu-item-spec' +export * from './menu-item-status' +export * from './menu-list' +export * from './menu-spec' +export * from './metadata' +export * from './owner-info' +export * from './personal-access-token' +export * from './personal-access-token-list' +export * from './personal-access-token-spec' +export * from './plugin' +export * from './plugin-author' +export * from './plugin-list' +export * from './plugin-spec' +export * from './plugin-status' +export * from './policy' +export * from './policy-list' +export * from './policy-rule' +export * from './policy-spec' +export * from './policy-template' +export * from './policy-template-list' +export * from './policy-template-spec' +export * from './post' +export * from './post-hit' +export * from './post-hits' +export * from './post-list' +export * from './post-request' +export * from './post-spec' +export * from './post-status' +export * from './ref' +export * from './reply' +export * from './reply-list' +export * from './reply-request' +export * from './reply-spec' +export * from './reply-vo' +export * from './reply-vo-list' +export * from './reverse-proxy' +export * from './reverse-proxy-list' +export * from './reverse-proxy-rule' +export * from './role' +export * from './role-binding' +export * from './role-binding-list' +export * from './role-list' +export * from './role-ref' +export * from './search-engine' +export * from './search-engine-list' +export * from './search-engine-spec' +export * from './setting' +export * from './setting-form' +export * from './setting-list' +export * from './setting-spec' +export * from './single-page' +export * from './single-page-list' +export * from './single-page-request' +export * from './single-page-spec' +export * from './single-page-status' +export * from './snap-shot-spec' +export * from './snapshot' +export * from './snapshot-list' +export * from './stats' +export * from './subject' +export * from './tag' +export * from './tag-list' +export * from './tag-spec' +export * from './tag-status' +export * from './template-descriptor' +export * from './theme' +export * from './theme-list' +export * from './theme-spec' +export * from './theme-status' +export * from './user' +export * from './user-list' +export * from './user-permission' +export * from './user-spec' +export * from './user-status' +export * from './vote-request' diff --git a/packages/api-client/src/models/license.ts b/packages/api-client/src/models/license.ts new file mode 100644 index 000000000..0e45e0c66 --- /dev/null +++ b/packages/api-client/src/models/license.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface License + */ +export interface License { + /** + * + * @type {string} + * @memberof License + */ + name?: string + /** + * + * @type {string} + * @memberof License + */ + url?: string +} diff --git a/packages/api-client/src/models/listed-comment-list.ts b/packages/api-client/src/models/listed-comment-list.ts new file mode 100644 index 000000000..daec5ca52 --- /dev/null +++ b/packages/api-client/src/models/listed-comment-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { ListedComment } from './listed-comment' + +/** + * + * @export + * @interface ListedCommentList + */ +export interface ListedCommentList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedCommentList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedCommentList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ListedCommentList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ListedCommentList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ListedCommentList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ListedCommentList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedCommentList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedCommentList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ListedCommentList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/listed-comment.ts b/packages/api-client/src/models/listed-comment.ts new file mode 100644 index 000000000..80ec31a10 --- /dev/null +++ b/packages/api-client/src/models/listed-comment.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Comment } from './comment' +// May contain unused imports in some cases +// @ts-ignore +import { Extension } from './extension' +// May contain unused imports in some cases +// @ts-ignore +import { OwnerInfo } from './owner-info' + +/** + * A chunk of items. + * @export + * @interface ListedComment + */ +export interface ListedComment { + /** + * + * @type {Comment} + * @memberof ListedComment + */ + comment: Comment + /** + * + * @type {OwnerInfo} + * @memberof ListedComment + */ + owner: OwnerInfo + /** + * + * @type {Extension} + * @memberof ListedComment + */ + subject?: Extension +} diff --git a/packages/api-client/src/models/listed-post-list.ts b/packages/api-client/src/models/listed-post-list.ts new file mode 100644 index 000000000..b0c9ed68a --- /dev/null +++ b/packages/api-client/src/models/listed-post-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { ListedPost } from './listed-post' + +/** + * + * @export + * @interface ListedPostList + */ +export interface ListedPostList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedPostList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedPostList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ListedPostList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ListedPostList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ListedPostList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ListedPostList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedPostList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedPostList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ListedPostList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/listed-post.ts b/packages/api-client/src/models/listed-post.ts new file mode 100644 index 000000000..1783ec23e --- /dev/null +++ b/packages/api-client/src/models/listed-post.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Category } from './category' +// May contain unused imports in some cases +// @ts-ignore +import { Contributor } from './contributor' +// May contain unused imports in some cases +// @ts-ignore +import { Post } from './post' +// May contain unused imports in some cases +// @ts-ignore +import { Stats } from './stats' +// May contain unused imports in some cases +// @ts-ignore +import { Tag } from './tag' + +/** + * A chunk of items. + * @export + * @interface ListedPost + */ +export interface ListedPost { + /** + * + * @type {Post} + * @memberof ListedPost + */ + post: Post + /** + * + * @type {Array} + * @memberof ListedPost + */ + categories: Array + /** + * + * @type {Array} + * @memberof ListedPost + */ + tags: Array + /** + * + * @type {Array} + * @memberof ListedPost + */ + contributors: Array + /** + * + * @type {Contributor} + * @memberof ListedPost + */ + owner: Contributor + /** + * + * @type {Stats} + * @memberof ListedPost + */ + stats: Stats +} diff --git a/packages/api-client/src/models/listed-reply-list.ts b/packages/api-client/src/models/listed-reply-list.ts new file mode 100644 index 000000000..9426addf1 --- /dev/null +++ b/packages/api-client/src/models/listed-reply-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { ListedReply } from './listed-reply' + +/** + * + * @export + * @interface ListedReplyList + */ +export interface ListedReplyList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedReplyList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedReplyList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ListedReplyList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ListedReplyList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ListedReplyList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ListedReplyList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedReplyList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedReplyList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ListedReplyList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/listed-reply.ts b/packages/api-client/src/models/listed-reply.ts new file mode 100644 index 000000000..50a0eb005 --- /dev/null +++ b/packages/api-client/src/models/listed-reply.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { OwnerInfo } from './owner-info' +// May contain unused imports in some cases +// @ts-ignore +import { Reply } from './reply' + +/** + * A chunk of items. + * @export + * @interface ListedReply + */ +export interface ListedReply { + /** + * + * @type {Reply} + * @memberof ListedReply + */ + reply: Reply + /** + * + * @type {OwnerInfo} + * @memberof ListedReply + */ + owner: OwnerInfo +} diff --git a/packages/api-client/src/models/listed-single-page-list.ts b/packages/api-client/src/models/listed-single-page-list.ts new file mode 100644 index 000000000..e51fde491 --- /dev/null +++ b/packages/api-client/src/models/listed-single-page-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { ListedSinglePage } from './listed-single-page' + +/** + * + * @export + * @interface ListedSinglePageList + */ +export interface ListedSinglePageList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedSinglePageList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ListedSinglePageList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ListedSinglePageList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ListedSinglePageList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ListedSinglePageList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ListedSinglePageList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedSinglePageList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ListedSinglePageList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ListedSinglePageList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/listed-single-page.ts b/packages/api-client/src/models/listed-single-page.ts new file mode 100644 index 000000000..03733cf96 --- /dev/null +++ b/packages/api-client/src/models/listed-single-page.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Contributor } from './contributor' +// May contain unused imports in some cases +// @ts-ignore +import { SinglePage } from './single-page' +// May contain unused imports in some cases +// @ts-ignore +import { Stats } from './stats' + +/** + * A chunk of items. + * @export + * @interface ListedSinglePage + */ +export interface ListedSinglePage { + /** + * + * @type {SinglePage} + * @memberof ListedSinglePage + */ + page: SinglePage + /** + * + * @type {Array} + * @memberof ListedSinglePage + */ + contributors: Array + /** + * + * @type {Contributor} + * @memberof ListedSinglePage + */ + owner: Contributor + /** + * + * @type {Stats} + * @memberof ListedSinglePage + */ + stats: Stats +} diff --git a/packages/api-client/src/models/login-history.ts b/packages/api-client/src/models/login-history.ts new file mode 100644 index 000000000..23f4b0f19 --- /dev/null +++ b/packages/api-client/src/models/login-history.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface LoginHistory + */ +export interface LoginHistory { + /** + * + * @type {string} + * @memberof LoginHistory + */ + loginAt: string + /** + * + * @type {string} + * @memberof LoginHistory + */ + sourceIp: string + /** + * + * @type {string} + * @memberof LoginHistory + */ + userAgent: string + /** + * + * @type {boolean} + * @memberof LoginHistory + */ + successful: boolean + /** + * + * @type {string} + * @memberof LoginHistory + */ + reason?: string +} diff --git a/packages/api-client/src/models/menu-item-list.ts b/packages/api-client/src/models/menu-item-list.ts new file mode 100644 index 000000000..713b458b1 --- /dev/null +++ b/packages/api-client/src/models/menu-item-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { MenuItem } from './menu-item' + +/** + * + * @export + * @interface MenuItemList + */ +export interface MenuItemList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof MenuItemList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof MenuItemList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof MenuItemList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof MenuItemList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof MenuItemList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof MenuItemList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof MenuItemList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof MenuItemList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof MenuItemList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/menu-item-spec.ts b/packages/api-client/src/models/menu-item-spec.ts new file mode 100644 index 000000000..28abaf38a --- /dev/null +++ b/packages/api-client/src/models/menu-item-spec.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Ref } from './ref' + +/** + * The spec of menu item. + * @export + * @interface MenuItemSpec + */ +export interface MenuItemSpec { + /** + * The display name of menu item. + * @type {string} + * @memberof MenuItemSpec + */ + displayName?: string + /** + * The href of this menu item. + * @type {string} + * @memberof MenuItemSpec + */ + href?: string + /** + * The target attribute of this menu item. + * @type {string} + * @memberof MenuItemSpec + */ + target?: MenuItemSpecTargetEnum + /** + * The priority is for ordering. + * @type {number} + * @memberof MenuItemSpec + */ + priority?: number + /** + * Children of this menu item + * @type {Array} + * @memberof MenuItemSpec + */ + children?: Array + /** + * + * @type {Ref} + * @memberof MenuItemSpec + */ + targetRef?: Ref +} + +export const MenuItemSpecTargetEnum = { + Blank: '_blank', + Self: '_self', + Parent: '_parent', + Top: '_top', +} as const + +export type MenuItemSpecTargetEnum = typeof MenuItemSpecTargetEnum[keyof typeof MenuItemSpecTargetEnum] diff --git a/packages/api-client/src/models/menu-item-status.ts b/packages/api-client/src/models/menu-item-status.ts new file mode 100644 index 000000000..810099040 --- /dev/null +++ b/packages/api-client/src/models/menu-item-status.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * The status of menu item. + * @export + * @interface MenuItemStatus + */ +export interface MenuItemStatus { + /** + * Calculated Display name of menu item. + * @type {string} + * @memberof MenuItemStatus + */ + displayName?: string + /** + * Calculated href of manu item. + * @type {string} + * @memberof MenuItemStatus + */ + href?: string +} diff --git a/packages/api-client/src/models/menu-item.ts b/packages/api-client/src/models/menu-item.ts new file mode 100644 index 000000000..c469c713f --- /dev/null +++ b/packages/api-client/src/models/menu-item.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { MenuItemSpec } from './menu-item-spec' +// May contain unused imports in some cases +// @ts-ignore +import { MenuItemStatus } from './menu-item-status' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface MenuItem + */ +export interface MenuItem { + /** + * + * @type {MenuItemSpec} + * @memberof MenuItem + */ + spec: MenuItemSpec + /** + * + * @type {MenuItemStatus} + * @memberof MenuItem + */ + status?: MenuItemStatus + /** + * + * @type {string} + * @memberof MenuItem + */ + apiVersion: string + /** + * + * @type {string} + * @memberof MenuItem + */ + kind: string + /** + * + * @type {Metadata} + * @memberof MenuItem + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/menu-list.ts b/packages/api-client/src/models/menu-list.ts new file mode 100644 index 000000000..b731e123f --- /dev/null +++ b/packages/api-client/src/models/menu-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Menu } from './menu' + +/** + * + * @export + * @interface MenuList + */ +export interface MenuList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof MenuList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof MenuList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof MenuList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof MenuList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof MenuList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof MenuList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof MenuList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof MenuList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof MenuList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/menu-spec.ts b/packages/api-client/src/models/menu-spec.ts new file mode 100644 index 000000000..275314c2f --- /dev/null +++ b/packages/api-client/src/models/menu-spec.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * The spec of menu. + * @export + * @interface MenuSpec + */ +export interface MenuSpec { + /** + * The display name of the menu. + * @type {string} + * @memberof MenuSpec + */ + displayName: string + /** + * Names of menu children below this menu. + * @type {Array} + * @memberof MenuSpec + */ + menuItems?: Array +} diff --git a/packages/api-client/src/models/menu.ts b/packages/api-client/src/models/menu.ts new file mode 100644 index 000000000..1f3eee1b8 --- /dev/null +++ b/packages/api-client/src/models/menu.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { MenuSpec } from './menu-spec' +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' + +/** + * + * @export + * @interface Menu + */ +export interface Menu { + /** + * + * @type {MenuSpec} + * @memberof Menu + */ + spec: MenuSpec + /** + * + * @type {string} + * @memberof Menu + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Menu + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Menu + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/metadata.ts b/packages/api-client/src/models/metadata.ts new file mode 100644 index 000000000..3566f133f --- /dev/null +++ b/packages/api-client/src/models/metadata.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Metadata + */ +export interface Metadata { + /** + * The name field will be generated automatically according to the given generateName field + * @type {string} + * @memberof Metadata + */ + generateName?: string + /** + * + * @type {Array} + * @memberof Metadata + */ + finalizers?: Array | null + /** + * Metadata name + * @type {string} + * @memberof Metadata + */ + name: string + /** + * + * @type {{ [key: string]: string; }} + * @memberof Metadata + */ + labels?: { [key: string]: string } | null + /** + * + * @type {{ [key: string]: string; }} + * @memberof Metadata + */ + annotations?: { [key: string]: string } | null + /** + * + * @type {number} + * @memberof Metadata + */ + version?: number | null + /** + * + * @type {string} + * @memberof Metadata + */ + creationTimestamp?: string | null + /** + * + * @type {string} + * @memberof Metadata + */ + deletionTimestamp?: string | null +} diff --git a/packages/api-client/src/models/owner-info.ts b/packages/api-client/src/models/owner-info.ts new file mode 100644 index 000000000..508d8a211 --- /dev/null +++ b/packages/api-client/src/models/owner-info.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface OwnerInfo + */ +export interface OwnerInfo { + /** + * + * @type {string} + * @memberof OwnerInfo + */ + kind?: string + /** + * + * @type {string} + * @memberof OwnerInfo + */ + name?: string + /** + * + * @type {string} + * @memberof OwnerInfo + */ + displayName?: string + /** + * + * @type {string} + * @memberof OwnerInfo + */ + avatar?: string + /** + * + * @type {string} + * @memberof OwnerInfo + */ + email?: string +} diff --git a/packages/api-client/src/models/personal-access-token-list.ts b/packages/api-client/src/models/personal-access-token-list.ts new file mode 100644 index 000000000..b6e024c82 --- /dev/null +++ b/packages/api-client/src/models/personal-access-token-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { PersonalAccessToken } from './personal-access-token' + +/** + * + * @export + * @interface PersonalAccessTokenList + */ +export interface PersonalAccessTokenList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PersonalAccessTokenList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PersonalAccessTokenList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof PersonalAccessTokenList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof PersonalAccessTokenList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof PersonalAccessTokenList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof PersonalAccessTokenList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PersonalAccessTokenList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PersonalAccessTokenList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof PersonalAccessTokenList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/personal-access-token-spec.ts b/packages/api-client/src/models/personal-access-token-spec.ts new file mode 100644 index 000000000..8ec01f898 --- /dev/null +++ b/packages/api-client/src/models/personal-access-token-spec.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PersonalAccessTokenSpec + */ +export interface PersonalAccessTokenSpec { + /** + * + * @type {string} + * @memberof PersonalAccessTokenSpec + */ + userName?: string + /** + * + * @type {string} + * @memberof PersonalAccessTokenSpec + */ + displayName?: string + /** + * + * @type {boolean} + * @memberof PersonalAccessTokenSpec + */ + revoked?: boolean + /** + * + * @type {string} + * @memberof PersonalAccessTokenSpec + */ + expiresAt?: string + /** + * + * @type {string} + * @memberof PersonalAccessTokenSpec + */ + scopes?: string + /** + * + * @type {string} + * @memberof PersonalAccessTokenSpec + */ + tokenDigest?: string +} diff --git a/packages/api-client/src/models/personal-access-token.ts b/packages/api-client/src/models/personal-access-token.ts new file mode 100644 index 000000000..8b42bc9b8 --- /dev/null +++ b/packages/api-client/src/models/personal-access-token.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { PersonalAccessTokenSpec } from './personal-access-token-spec' + +/** + * + * @export + * @interface PersonalAccessToken + */ +export interface PersonalAccessToken { + /** + * + * @type {PersonalAccessTokenSpec} + * @memberof PersonalAccessToken + */ + spec?: PersonalAccessTokenSpec + /** + * + * @type {string} + * @memberof PersonalAccessToken + */ + apiVersion: string + /** + * + * @type {string} + * @memberof PersonalAccessToken + */ + kind: string + /** + * + * @type {Metadata} + * @memberof PersonalAccessToken + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/plugin-author.ts b/packages/api-client/src/models/plugin-author.ts new file mode 100644 index 000000000..8b9031ec0 --- /dev/null +++ b/packages/api-client/src/models/plugin-author.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PluginAuthor + */ +export interface PluginAuthor { + /** + * + * @type {string} + * @memberof PluginAuthor + */ + name: string + /** + * + * @type {string} + * @memberof PluginAuthor + */ + website?: string +} diff --git a/packages/api-client/src/models/plugin-list.ts b/packages/api-client/src/models/plugin-list.ts new file mode 100644 index 000000000..bc45863ef --- /dev/null +++ b/packages/api-client/src/models/plugin-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Plugin } from './plugin' + +/** + * + * @export + * @interface PluginList + */ +export interface PluginList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PluginList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PluginList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof PluginList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof PluginList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof PluginList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof PluginList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PluginList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PluginList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof PluginList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/plugin-spec.ts b/packages/api-client/src/models/plugin-spec.ts new file mode 100644 index 000000000..116567101 --- /dev/null +++ b/packages/api-client/src/models/plugin-spec.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { License } from './license' +// May contain unused imports in some cases +// @ts-ignore +import { PluginAuthor } from './plugin-author' + +/** + * + * @export + * @interface PluginSpec + */ +export interface PluginSpec { + /** + * + * @type {string} + * @memberof PluginSpec + */ + displayName?: string + /** + * + * @type {string} + * @memberof PluginSpec + */ + version: string + /** + * + * @type {PluginAuthor} + * @memberof PluginSpec + */ + author?: PluginAuthor + /** + * + * @type {string} + * @memberof PluginSpec + */ + logo?: string + /** + * + * @type {{ [key: string]: string; }} + * @memberof PluginSpec + */ + pluginDependencies?: { [key: string]: string } + /** + * + * @type {string} + * @memberof PluginSpec + */ + homepage?: string + /** + * + * @type {string} + * @memberof PluginSpec + */ + description?: string + /** + * + * @type {Array} + * @memberof PluginSpec + */ + license?: Array + /** + * + * @type {string} + * @memberof PluginSpec + */ + requires?: string + /** + * + * @type {string} + * @memberof PluginSpec + * @deprecated + */ + pluginClass?: string + /** + * + * @type {boolean} + * @memberof PluginSpec + */ + enabled?: boolean + /** + * + * @type {string} + * @memberof PluginSpec + */ + settingName?: string + /** + * + * @type {string} + * @memberof PluginSpec + */ + configMapName?: string +} diff --git a/packages/api-client/src/models/plugin-status.ts b/packages/api-client/src/models/plugin-status.ts new file mode 100644 index 000000000..dca435a50 --- /dev/null +++ b/packages/api-client/src/models/plugin-status.ts @@ -0,0 +1,80 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PluginStatus + */ +export interface PluginStatus { + /** + * + * @type {string} + * @memberof PluginStatus + */ + phase?: PluginStatusPhaseEnum + /** + * + * @type {string} + * @memberof PluginStatus + */ + reason?: string + /** + * + * @type {string} + * @memberof PluginStatus + */ + message?: string + /** + * + * @type {string} + * @memberof PluginStatus + */ + lastStartTime?: string + /** + * + * @type {string} + * @memberof PluginStatus + */ + lastTransitionTime?: string + /** + * + * @type {string} + * @memberof PluginStatus + */ + entry?: string + /** + * + * @type {string} + * @memberof PluginStatus + */ + stylesheet?: string + /** + * + * @type {string} + * @memberof PluginStatus + */ + logo?: string +} + +export const PluginStatusPhaseEnum = { + Created: 'CREATED', + Disabled: 'DISABLED', + Resolved: 'RESOLVED', + Started: 'STARTED', + Stopped: 'STOPPED', + Failed: 'FAILED', +} as const + +export type PluginStatusPhaseEnum = typeof PluginStatusPhaseEnum[keyof typeof PluginStatusPhaseEnum] diff --git a/packages/api-client/src/models/plugin.ts b/packages/api-client/src/models/plugin.ts new file mode 100644 index 000000000..97c7732e0 --- /dev/null +++ b/packages/api-client/src/models/plugin.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { PluginSpec } from './plugin-spec' +// May contain unused imports in some cases +// @ts-ignore +import { PluginStatus } from './plugin-status' + +/** + * + * @export + * @interface Plugin + */ +export interface Plugin { + /** + * + * @type {PluginSpec} + * @memberof Plugin + */ + spec: PluginSpec + /** + * + * @type {PluginStatus} + * @memberof Plugin + */ + status?: PluginStatus + /** + * + * @type {string} + * @memberof Plugin + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Plugin + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Plugin + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/policy-list.ts b/packages/api-client/src/models/policy-list.ts new file mode 100644 index 000000000..1d786885d --- /dev/null +++ b/packages/api-client/src/models/policy-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Policy } from './policy' + +/** + * + * @export + * @interface PolicyList + */ +export interface PolicyList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PolicyList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PolicyList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof PolicyList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof PolicyList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof PolicyList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof PolicyList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PolicyList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PolicyList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof PolicyList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/policy-rule.ts b/packages/api-client/src/models/policy-rule.ts new file mode 100644 index 000000000..2d52c2f25 --- /dev/null +++ b/packages/api-client/src/models/policy-rule.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PolicyRule + */ +export interface PolicyRule { + /** + * + * @type {Array} + * @memberof PolicyRule + */ + apiGroups?: Array + /** + * + * @type {Array} + * @memberof PolicyRule + */ + resources?: Array + /** + * + * @type {Array} + * @memberof PolicyRule + */ + resourceNames?: Array + /** + * + * @type {Array} + * @memberof PolicyRule + */ + nonResourceURLs?: Array + /** + * + * @type {Array} + * @memberof PolicyRule + */ + verbs?: Array +} diff --git a/packages/api-client/src/models/policy-spec.ts b/packages/api-client/src/models/policy-spec.ts new file mode 100644 index 000000000..fdcf3e7f3 --- /dev/null +++ b/packages/api-client/src/models/policy-spec.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PolicySpec + */ +export interface PolicySpec { + /** + * Display name of policy + * @type {string} + * @memberof PolicySpec + */ + displayName: string + /** + * Reference name of PolicyTemplate + * @type {string} + * @memberof PolicySpec + */ + templateName: string + /** + * Reference name of ConfigMap extension + * @type {string} + * @memberof PolicySpec + */ + configMapName?: string +} diff --git a/packages/api-client/src/models/policy-template-list.ts b/packages/api-client/src/models/policy-template-list.ts new file mode 100644 index 000000000..39898e607 --- /dev/null +++ b/packages/api-client/src/models/policy-template-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { PolicyTemplate } from './policy-template' + +/** + * + * @export + * @interface PolicyTemplateList + */ +export interface PolicyTemplateList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PolicyTemplateList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PolicyTemplateList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof PolicyTemplateList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof PolicyTemplateList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof PolicyTemplateList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof PolicyTemplateList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PolicyTemplateList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PolicyTemplateList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof PolicyTemplateList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/policy-template-spec.ts b/packages/api-client/src/models/policy-template-spec.ts new file mode 100644 index 000000000..72c48f404 --- /dev/null +++ b/packages/api-client/src/models/policy-template-spec.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PolicyTemplateSpec + */ +export interface PolicyTemplateSpec { + /** + * + * @type {string} + * @memberof PolicyTemplateSpec + */ + displayName?: string + /** + * + * @type {string} + * @memberof PolicyTemplateSpec + */ + settingName: string +} diff --git a/packages/api-client/src/models/policy-template.ts b/packages/api-client/src/models/policy-template.ts new file mode 100644 index 000000000..15a9d1826 --- /dev/null +++ b/packages/api-client/src/models/policy-template.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { PolicyTemplateSpec } from './policy-template-spec' + +/** + * + * @export + * @interface PolicyTemplate + */ +export interface PolicyTemplate { + /** + * + * @type {PolicyTemplateSpec} + * @memberof PolicyTemplate + */ + spec?: PolicyTemplateSpec + /** + * + * @type {string} + * @memberof PolicyTemplate + */ + apiVersion: string + /** + * + * @type {string} + * @memberof PolicyTemplate + */ + kind: string + /** + * + * @type {Metadata} + * @memberof PolicyTemplate + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/policy.ts b/packages/api-client/src/models/policy.ts new file mode 100644 index 000000000..f660a640b --- /dev/null +++ b/packages/api-client/src/models/policy.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { PolicySpec } from './policy-spec' + +/** + * + * @export + * @interface Policy + */ +export interface Policy { + /** + * + * @type {PolicySpec} + * @memberof Policy + */ + spec: PolicySpec + /** + * + * @type {string} + * @memberof Policy + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Policy + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Policy + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/post-hit.ts b/packages/api-client/src/models/post-hit.ts new file mode 100644 index 000000000..02e66d598 --- /dev/null +++ b/packages/api-client/src/models/post-hit.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface PostHit + */ +export interface PostHit { + /** + * + * @type {string} + * @memberof PostHit + */ + name?: string + /** + * + * @type {string} + * @memberof PostHit + */ + title?: string + /** + * + * @type {string} + * @memberof PostHit + */ + content?: string + /** + * + * @type {string} + * @memberof PostHit + */ + publishTimestamp?: string + /** + * + * @type {string} + * @memberof PostHit + */ + permalink?: string +} diff --git a/packages/api-client/src/models/post-hits.ts b/packages/api-client/src/models/post-hits.ts new file mode 100644 index 000000000..b17d24335 --- /dev/null +++ b/packages/api-client/src/models/post-hits.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { PostHit } from './post-hit' + +/** + * + * @export + * @interface PostHits + */ +export interface PostHits { + /** + * + * @type {Array} + * @memberof PostHits + */ + hits?: Array + /** + * + * @type {string} + * @memberof PostHits + */ + keyword?: string + /** + * + * @type {number} + * @memberof PostHits + */ + total?: number + /** + * + * @type {number} + * @memberof PostHits + */ + limit?: number + /** + * + * @type {number} + * @memberof PostHits + */ + processingTimeMillis?: number +} diff --git a/packages/api-client/src/models/post-list.ts b/packages/api-client/src/models/post-list.ts new file mode 100644 index 000000000..8da09f002 --- /dev/null +++ b/packages/api-client/src/models/post-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Post } from './post' + +/** + * + * @export + * @interface PostList + */ +export interface PostList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PostList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof PostList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof PostList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof PostList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof PostList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof PostList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PostList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof PostList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof PostList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/post-request.ts b/packages/api-client/src/models/post-request.ts new file mode 100644 index 000000000..f9dcbaec6 --- /dev/null +++ b/packages/api-client/src/models/post-request.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Content } from './content' +// May contain unused imports in some cases +// @ts-ignore +import { Post } from './post' + +/** + * + * @export + * @interface PostRequest + */ +export interface PostRequest { + /** + * + * @type {Post} + * @memberof PostRequest + */ + post: Post + /** + * + * @type {Content} + * @memberof PostRequest + */ + content: Content +} diff --git a/packages/api-client/src/models/post-spec.ts b/packages/api-client/src/models/post-spec.ts new file mode 100644 index 000000000..044137b77 --- /dev/null +++ b/packages/api-client/src/models/post-spec.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Excerpt } from './excerpt' + +/** + * + * @export + * @interface PostSpec + */ +export interface PostSpec { + /** + * + * @type {string} + * @memberof PostSpec + */ + title: string + /** + * + * @type {string} + * @memberof PostSpec + */ + slug: string + /** + * + * @type {string} + * @memberof PostSpec + */ + releaseSnapshot?: string + /** + * + * @type {string} + * @memberof PostSpec + */ + headSnapshot?: string + /** + * + * @type {string} + * @memberof PostSpec + */ + baseSnapshot?: string + /** + * + * @type {string} + * @memberof PostSpec + */ + owner?: string + /** + * + * @type {string} + * @memberof PostSpec + */ + template?: string + /** + * + * @type {string} + * @memberof PostSpec + */ + cover?: string + /** + * + * @type {boolean} + * @memberof PostSpec + */ + deleted: boolean + /** + * + * @type {boolean} + * @memberof PostSpec + */ + publish: boolean + /** + * + * @type {string} + * @memberof PostSpec + */ + publishTime?: string + /** + * + * @type {boolean} + * @memberof PostSpec + */ + pinned: boolean + /** + * + * @type {boolean} + * @memberof PostSpec + */ + allowComment: boolean + /** + * + * @type {string} + * @memberof PostSpec + */ + visible: PostSpecVisibleEnum + /** + * + * @type {number} + * @memberof PostSpec + */ + priority: number + /** + * + * @type {Excerpt} + * @memberof PostSpec + */ + excerpt: Excerpt + /** + * + * @type {Array} + * @memberof PostSpec + */ + categories?: Array + /** + * + * @type {Array} + * @memberof PostSpec + */ + tags?: Array + /** + * + * @type {Array<{ [key: string]: string; }>} + * @memberof PostSpec + */ + htmlMetas?: Array<{ [key: string]: string }> +} + +export const PostSpecVisibleEnum = { + Public: 'PUBLIC', + Internal: 'INTERNAL', + Private: 'PRIVATE', +} as const + +export type PostSpecVisibleEnum = typeof PostSpecVisibleEnum[keyof typeof PostSpecVisibleEnum] diff --git a/packages/api-client/src/models/post-status.ts b/packages/api-client/src/models/post-status.ts new file mode 100644 index 000000000..bd7dea05a --- /dev/null +++ b/packages/api-client/src/models/post-status.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Condition } from './condition' + +/** + * + * @export + * @interface PostStatus + */ +export interface PostStatus { + /** + * + * @type {string} + * @memberof PostStatus + */ + phase: string + /** + * + * @type {Array} + * @memberof PostStatus + */ + conditions?: Array + /** + * + * @type {string} + * @memberof PostStatus + */ + permalink?: string + /** + * + * @type {string} + * @memberof PostStatus + */ + excerpt?: string + /** + * + * @type {boolean} + * @memberof PostStatus + */ + inProgress?: boolean + /** + * + * @type {number} + * @memberof PostStatus + */ + commentsCount?: number + /** + * + * @type {Array} + * @memberof PostStatus + */ + contributors?: Array + /** + * + * @type {string} + * @memberof PostStatus + */ + lastModifyTime?: string +} diff --git a/packages/api-client/src/models/post.ts b/packages/api-client/src/models/post.ts new file mode 100644 index 000000000..dcb925422 --- /dev/null +++ b/packages/api-client/src/models/post.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { PostSpec } from './post-spec' +// May contain unused imports in some cases +// @ts-ignore +import { PostStatus } from './post-status' + +/** + * + * @export + * @interface Post + */ +export interface Post { + /** + * + * @type {PostSpec} + * @memberof Post + */ + spec: PostSpec + /** + * + * @type {PostStatus} + * @memberof Post + */ + status?: PostStatus + /** + * + * @type {string} + * @memberof Post + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Post + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Post + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/ref.ts b/packages/api-client/src/models/ref.ts new file mode 100644 index 000000000..05cc381c3 --- /dev/null +++ b/packages/api-client/src/models/ref.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Extension reference object. The name is mandatory + * @export + * @interface Ref + */ +export interface Ref { + /** + * Extension group + * @type {string} + * @memberof Ref + */ + group?: string + /** + * Extension version + * @type {string} + * @memberof Ref + */ + version?: string + /** + * Extension kind + * @type {string} + * @memberof Ref + */ + kind?: string + /** + * Extension name. This field is mandatory + * @type {string} + * @memberof Ref + */ + name: string +} diff --git a/packages/api-client/src/models/reply-list.ts b/packages/api-client/src/models/reply-list.ts new file mode 100644 index 000000000..512ec511e --- /dev/null +++ b/packages/api-client/src/models/reply-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Reply } from './reply' + +/** + * + * @export + * @interface ReplyList + */ +export interface ReplyList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ReplyList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ReplyList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ReplyList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ReplyList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ReplyList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ReplyList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ReplyList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ReplyList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ReplyList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/reply-request.ts b/packages/api-client/src/models/reply-request.ts new file mode 100644 index 000000000..fd85a1108 --- /dev/null +++ b/packages/api-client/src/models/reply-request.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CommentEmailOwner } from './comment-email-owner' + +/** + * + * @export + * @interface ReplyRequest + */ +export interface ReplyRequest { + /** + * + * @type {string} + * @memberof ReplyRequest + */ + raw: string + /** + * + * @type {string} + * @memberof ReplyRequest + */ + content: string + /** + * + * @type {boolean} + * @memberof ReplyRequest + */ + allowNotification?: boolean + /** + * + * @type {CommentEmailOwner} + * @memberof ReplyRequest + */ + owner?: CommentEmailOwner + /** + * + * @type {string} + * @memberof ReplyRequest + */ + quoteReply?: string +} diff --git a/packages/api-client/src/models/reply-spec.ts b/packages/api-client/src/models/reply-spec.ts new file mode 100644 index 000000000..4a9887b59 --- /dev/null +++ b/packages/api-client/src/models/reply-spec.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { CommentOwner } from './comment-owner' + +/** + * + * @export + * @interface ReplySpec + */ +export interface ReplySpec { + /** + * + * @type {string} + * @memberof ReplySpec + */ + raw: string + /** + * + * @type {string} + * @memberof ReplySpec + */ + content: string + /** + * + * @type {CommentOwner} + * @memberof ReplySpec + */ + owner: CommentOwner + /** + * + * @type {string} + * @memberof ReplySpec + */ + userAgent?: string + /** + * + * @type {string} + * @memberof ReplySpec + */ + ipAddress?: string + /** + * + * @type {string} + * @memberof ReplySpec + */ + approvedTime?: string + /** + * + * @type {number} + * @memberof ReplySpec + */ + priority: number + /** + * + * @type {boolean} + * @memberof ReplySpec + */ + top: boolean + /** + * + * @type {boolean} + * @memberof ReplySpec + */ + allowNotification: boolean + /** + * + * @type {boolean} + * @memberof ReplySpec + */ + approved: boolean + /** + * + * @type {boolean} + * @memberof ReplySpec + */ + hidden: boolean + /** + * + * @type {string} + * @memberof ReplySpec + */ + commentName: string + /** + * + * @type {string} + * @memberof ReplySpec + */ + quoteReply?: string +} diff --git a/packages/api-client/src/models/reply-vo-list.ts b/packages/api-client/src/models/reply-vo-list.ts new file mode 100644 index 000000000..86679c83e --- /dev/null +++ b/packages/api-client/src/models/reply-vo-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { ReplyVo } from './reply-vo' + +/** + * + * @export + * @interface ReplyVoList + */ +export interface ReplyVoList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ReplyVoList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ReplyVoList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ReplyVoList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ReplyVoList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ReplyVoList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ReplyVoList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ReplyVoList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ReplyVoList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ReplyVoList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/reply-vo.ts b/packages/api-client/src/models/reply-vo.ts new file mode 100644 index 000000000..d6d50d051 --- /dev/null +++ b/packages/api-client/src/models/reply-vo.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { OwnerInfo } from './owner-info' +// May contain unused imports in some cases +// @ts-ignore +import { ReplySpec } from './reply-spec' + +/** + * A chunk of items. + * @export + * @interface ReplyVo + */ +export interface ReplyVo { + /** + * + * @type {Metadata} + * @memberof ReplyVo + */ + metadata: Metadata + /** + * + * @type {ReplySpec} + * @memberof ReplyVo + */ + spec: ReplySpec + /** + * + * @type {OwnerInfo} + * @memberof ReplyVo + */ + owner: OwnerInfo +} diff --git a/packages/api-client/src/models/reply.ts b/packages/api-client/src/models/reply.ts new file mode 100644 index 000000000..5bf738427 --- /dev/null +++ b/packages/api-client/src/models/reply.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { ReplySpec } from './reply-spec' + +/** + * + * @export + * @interface Reply + */ +export interface Reply { + /** + * + * @type {ReplySpec} + * @memberof Reply + */ + spec: ReplySpec + /** + * + * @type {string} + * @memberof Reply + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Reply + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Reply + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/reverse-proxy-list.ts b/packages/api-client/src/models/reverse-proxy-list.ts new file mode 100644 index 000000000..08f159d67 --- /dev/null +++ b/packages/api-client/src/models/reverse-proxy-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { ReverseProxy } from './reverse-proxy' + +/** + * + * @export + * @interface ReverseProxyList + */ +export interface ReverseProxyList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ReverseProxyList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ReverseProxyList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ReverseProxyList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ReverseProxyList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ReverseProxyList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ReverseProxyList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ReverseProxyList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ReverseProxyList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ReverseProxyList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/reverse-proxy-rule.ts b/packages/api-client/src/models/reverse-proxy-rule.ts new file mode 100644 index 000000000..29188f377 --- /dev/null +++ b/packages/api-client/src/models/reverse-proxy-rule.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { FileReverseProxyProvider } from './file-reverse-proxy-provider' + +/** + * + * @export + * @interface ReverseProxyRule + */ +export interface ReverseProxyRule { + /** + * + * @type {string} + * @memberof ReverseProxyRule + */ + path?: string + /** + * + * @type {FileReverseProxyProvider} + * @memberof ReverseProxyRule + */ + file?: FileReverseProxyProvider +} diff --git a/packages/api-client/src/models/reverse-proxy.ts b/packages/api-client/src/models/reverse-proxy.ts new file mode 100644 index 000000000..b956210be --- /dev/null +++ b/packages/api-client/src/models/reverse-proxy.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { ReverseProxyRule } from './reverse-proxy-rule' + +/** + * + * @export + * @interface ReverseProxy + */ +export interface ReverseProxy { + /** + * + * @type {Array} + * @memberof ReverseProxy + */ + rules?: Array + /** + * + * @type {string} + * @memberof ReverseProxy + */ + apiVersion: string + /** + * + * @type {string} + * @memberof ReverseProxy + */ + kind: string + /** + * + * @type {Metadata} + * @memberof ReverseProxy + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/role-binding-list.ts b/packages/api-client/src/models/role-binding-list.ts new file mode 100644 index 000000000..bc98a1f61 --- /dev/null +++ b/packages/api-client/src/models/role-binding-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { RoleBinding } from './role-binding' + +/** + * + * @export + * @interface RoleBindingList + */ +export interface RoleBindingList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof RoleBindingList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof RoleBindingList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof RoleBindingList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof RoleBindingList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof RoleBindingList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof RoleBindingList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof RoleBindingList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof RoleBindingList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof RoleBindingList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/role-binding.ts b/packages/api-client/src/models/role-binding.ts new file mode 100644 index 000000000..2524d51b6 --- /dev/null +++ b/packages/api-client/src/models/role-binding.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { RoleRef } from './role-ref' +// May contain unused imports in some cases +// @ts-ignore +import { Subject } from './subject' + +/** + * + * @export + * @interface RoleBinding + */ +export interface RoleBinding { + /** + * + * @type {Array} + * @memberof RoleBinding + */ + subjects?: Array + /** + * + * @type {RoleRef} + * @memberof RoleBinding + */ + roleRef?: RoleRef + /** + * + * @type {string} + * @memberof RoleBinding + */ + apiVersion: string + /** + * + * @type {string} + * @memberof RoleBinding + */ + kind: string + /** + * + * @type {Metadata} + * @memberof RoleBinding + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/role-list.ts b/packages/api-client/src/models/role-list.ts new file mode 100644 index 000000000..e02ff72a9 --- /dev/null +++ b/packages/api-client/src/models/role-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Role } from './role' + +/** + * + * @export + * @interface RoleList + */ +export interface RoleList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof RoleList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof RoleList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof RoleList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof RoleList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof RoleList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof RoleList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof RoleList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof RoleList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof RoleList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/role-ref.ts b/packages/api-client/src/models/role-ref.ts new file mode 100644 index 000000000..c44a46364 --- /dev/null +++ b/packages/api-client/src/models/role-ref.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface RoleRef + */ +export interface RoleRef { + /** + * + * @type {string} + * @memberof RoleRef + */ + kind?: string + /** + * + * @type {string} + * @memberof RoleRef + */ + name?: string + /** + * + * @type {string} + * @memberof RoleRef + */ + apiGroup?: string +} diff --git a/packages/api-client/src/models/role.ts b/packages/api-client/src/models/role.ts new file mode 100644 index 000000000..78e8abd9a --- /dev/null +++ b/packages/api-client/src/models/role.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { PolicyRule } from './policy-rule' + +/** + * + * @export + * @interface Role + */ +export interface Role { + /** + * + * @type {Array} + * @memberof Role + */ + rules: Array + /** + * + * @type {string} + * @memberof Role + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Role + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Role + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/search-engine-list.ts b/packages/api-client/src/models/search-engine-list.ts new file mode 100644 index 000000000..131e98423 --- /dev/null +++ b/packages/api-client/src/models/search-engine-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { SearchEngine } from './search-engine' + +/** + * + * @export + * @interface SearchEngineList + */ +export interface SearchEngineList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SearchEngineList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SearchEngineList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof SearchEngineList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof SearchEngineList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof SearchEngineList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof SearchEngineList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SearchEngineList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SearchEngineList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof SearchEngineList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/search-engine-spec.ts b/packages/api-client/src/models/search-engine-spec.ts new file mode 100644 index 000000000..85ebd9b5e --- /dev/null +++ b/packages/api-client/src/models/search-engine-spec.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Ref } from './ref' + +/** + * + * @export + * @interface SearchEngineSpec + */ +export interface SearchEngineSpec { + /** + * + * @type {string} + * @memberof SearchEngineSpec + */ + logo?: string + /** + * + * @type {string} + * @memberof SearchEngineSpec + */ + website?: string + /** + * + * @type {string} + * @memberof SearchEngineSpec + */ + displayName: string + /** + * + * @type {string} + * @memberof SearchEngineSpec + */ + description?: string + /** + * + * @type {Ref} + * @memberof SearchEngineSpec + */ + settingRef?: Ref + /** + * + * @type {string} + * @memberof SearchEngineSpec + */ + postSearchImpl?: string +} diff --git a/packages/api-client/src/models/search-engine.ts b/packages/api-client/src/models/search-engine.ts new file mode 100644 index 000000000..4601d0473 --- /dev/null +++ b/packages/api-client/src/models/search-engine.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { SearchEngineSpec } from './search-engine-spec' + +/** + * + * @export + * @interface SearchEngine + */ +export interface SearchEngine { + /** + * + * @type {SearchEngineSpec} + * @memberof SearchEngine + */ + spec: SearchEngineSpec + /** + * + * @type {string} + * @memberof SearchEngine + */ + apiVersion: string + /** + * + * @type {string} + * @memberof SearchEngine + */ + kind: string + /** + * + * @type {Metadata} + * @memberof SearchEngine + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/setting-form.ts b/packages/api-client/src/models/setting-form.ts new file mode 100644 index 000000000..133249e05 --- /dev/null +++ b/packages/api-client/src/models/setting-form.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface SettingForm + */ +export interface SettingForm { + /** + * + * @type {string} + * @memberof SettingForm + */ + group: string + /** + * + * @type {string} + * @memberof SettingForm + */ + label?: string + /** + * + * @type {Array} + * @memberof SettingForm + */ + formSchema: Array +} diff --git a/packages/api-client/src/models/setting-list.ts b/packages/api-client/src/models/setting-list.ts new file mode 100644 index 000000000..4dde0beb3 --- /dev/null +++ b/packages/api-client/src/models/setting-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Setting } from './setting' + +/** + * + * @export + * @interface SettingList + */ +export interface SettingList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SettingList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SettingList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof SettingList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof SettingList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof SettingList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof SettingList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SettingList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SettingList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof SettingList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/setting-spec.ts b/packages/api-client/src/models/setting-spec.ts new file mode 100644 index 000000000..b8e7e0900 --- /dev/null +++ b/packages/api-client/src/models/setting-spec.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { SettingForm } from './setting-form' + +/** + * + * @export + * @interface SettingSpec + */ +export interface SettingSpec { + /** + * + * @type {Array} + * @memberof SettingSpec + */ + forms: Array +} diff --git a/packages/api-client/src/models/setting.ts b/packages/api-client/src/models/setting.ts new file mode 100644 index 000000000..283c38344 --- /dev/null +++ b/packages/api-client/src/models/setting.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { SettingSpec } from './setting-spec' + +/** + * + * @export + * @interface Setting + */ +export interface Setting { + /** + * + * @type {SettingSpec} + * @memberof Setting + */ + spec: SettingSpec + /** + * + * @type {string} + * @memberof Setting + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Setting + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Setting + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/single-page-list.ts b/packages/api-client/src/models/single-page-list.ts new file mode 100644 index 000000000..957294a5b --- /dev/null +++ b/packages/api-client/src/models/single-page-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { SinglePage } from './single-page' + +/** + * + * @export + * @interface SinglePageList + */ +export interface SinglePageList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SinglePageList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SinglePageList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof SinglePageList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof SinglePageList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof SinglePageList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof SinglePageList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SinglePageList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SinglePageList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof SinglePageList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/single-page-request.ts b/packages/api-client/src/models/single-page-request.ts new file mode 100644 index 000000000..06a306236 --- /dev/null +++ b/packages/api-client/src/models/single-page-request.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Content } from './content' +// May contain unused imports in some cases +// @ts-ignore +import { SinglePage } from './single-page' + +/** + * + * @export + * @interface SinglePageRequest + */ +export interface SinglePageRequest { + /** + * + * @type {SinglePage} + * @memberof SinglePageRequest + */ + page: SinglePage + /** + * + * @type {Content} + * @memberof SinglePageRequest + */ + content: Content +} diff --git a/packages/api-client/src/models/single-page-spec.ts b/packages/api-client/src/models/single-page-spec.ts new file mode 100644 index 000000000..f7889076e --- /dev/null +++ b/packages/api-client/src/models/single-page-spec.ts @@ -0,0 +1,135 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Excerpt } from './excerpt' + +/** + * + * @export + * @interface SinglePageSpec + */ +export interface SinglePageSpec { + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + title: string + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + slug: string + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + releaseSnapshot?: string + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + headSnapshot?: string + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + baseSnapshot?: string + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + owner?: string + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + template?: string + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + cover?: string + /** + * + * @type {boolean} + * @memberof SinglePageSpec + */ + deleted: boolean + /** + * + * @type {boolean} + * @memberof SinglePageSpec + */ + publish: boolean + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + publishTime?: string + /** + * + * @type {boolean} + * @memberof SinglePageSpec + */ + pinned: boolean + /** + * + * @type {boolean} + * @memberof SinglePageSpec + */ + allowComment: boolean + /** + * + * @type {string} + * @memberof SinglePageSpec + */ + visible: SinglePageSpecVisibleEnum + /** + * + * @type {number} + * @memberof SinglePageSpec + */ + priority: number + /** + * + * @type {Excerpt} + * @memberof SinglePageSpec + */ + excerpt: Excerpt + /** + * + * @type {Array<{ [key: string]: string; }>} + * @memberof SinglePageSpec + */ + htmlMetas?: Array<{ [key: string]: string }> +} + +export const SinglePageSpecVisibleEnum = { + Public: 'PUBLIC', + Internal: 'INTERNAL', + Private: 'PRIVATE', +} as const + +export type SinglePageSpecVisibleEnum = typeof SinglePageSpecVisibleEnum[keyof typeof SinglePageSpecVisibleEnum] diff --git a/packages/api-client/src/models/single-page-status.ts b/packages/api-client/src/models/single-page-status.ts new file mode 100644 index 000000000..d5df3c8b1 --- /dev/null +++ b/packages/api-client/src/models/single-page-status.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Condition } from './condition' + +/** + * + * @export + * @interface SinglePageStatus + */ +export interface SinglePageStatus { + /** + * + * @type {string} + * @memberof SinglePageStatus + */ + phase: string + /** + * + * @type {Array} + * @memberof SinglePageStatus + */ + conditions?: Array + /** + * + * @type {string} + * @memberof SinglePageStatus + */ + permalink?: string + /** + * + * @type {string} + * @memberof SinglePageStatus + */ + excerpt?: string + /** + * + * @type {boolean} + * @memberof SinglePageStatus + */ + inProgress?: boolean + /** + * + * @type {number} + * @memberof SinglePageStatus + */ + commentsCount?: number + /** + * + * @type {Array} + * @memberof SinglePageStatus + */ + contributors?: Array + /** + * + * @type {string} + * @memberof SinglePageStatus + */ + lastModifyTime?: string +} diff --git a/packages/api-client/src/models/single-page.ts b/packages/api-client/src/models/single-page.ts new file mode 100644 index 000000000..c80b4aa86 --- /dev/null +++ b/packages/api-client/src/models/single-page.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { SinglePageSpec } from './single-page-spec' +// May contain unused imports in some cases +// @ts-ignore +import { SinglePageStatus } from './single-page-status' + +/** + * + * @export + * @interface SinglePage + */ +export interface SinglePage { + /** + * + * @type {SinglePageSpec} + * @memberof SinglePage + */ + spec: SinglePageSpec + /** + * + * @type {SinglePageStatus} + * @memberof SinglePage + */ + status?: SinglePageStatus + /** + * + * @type {string} + * @memberof SinglePage + */ + apiVersion: string + /** + * + * @type {string} + * @memberof SinglePage + */ + kind: string + /** + * + * @type {Metadata} + * @memberof SinglePage + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/snap-shot-spec.ts b/packages/api-client/src/models/snap-shot-spec.ts new file mode 100644 index 000000000..2e7d71a59 --- /dev/null +++ b/packages/api-client/src/models/snap-shot-spec.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Ref } from './ref' + +/** + * + * @export + * @interface SnapShotSpec + */ +export interface SnapShotSpec { + /** + * + * @type {Ref} + * @memberof SnapShotSpec + */ + subjectRef: Ref + /** + * + * @type {string} + * @memberof SnapShotSpec + */ + rawType: string + /** + * + * @type {string} + * @memberof SnapShotSpec + */ + rawPatch?: string + /** + * + * @type {string} + * @memberof SnapShotSpec + */ + contentPatch?: string + /** + * + * @type {string} + * @memberof SnapShotSpec + */ + parentSnapshotName?: string + /** + * + * @type {string} + * @memberof SnapShotSpec + */ + lastModifyTime?: string + /** + * + * @type {string} + * @memberof SnapShotSpec + */ + owner: string + /** + * + * @type {Array} + * @memberof SnapShotSpec + */ + contributors?: Array +} diff --git a/packages/api-client/src/models/snapshot-list.ts b/packages/api-client/src/models/snapshot-list.ts new file mode 100644 index 000000000..2b0f9434d --- /dev/null +++ b/packages/api-client/src/models/snapshot-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Snapshot } from './snapshot' + +/** + * + * @export + * @interface SnapshotList + */ +export interface SnapshotList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SnapshotList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof SnapshotList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof SnapshotList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof SnapshotList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof SnapshotList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof SnapshotList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SnapshotList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof SnapshotList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof SnapshotList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/snapshot.ts b/packages/api-client/src/models/snapshot.ts new file mode 100644 index 000000000..47922f63e --- /dev/null +++ b/packages/api-client/src/models/snapshot.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { SnapShotSpec } from './snap-shot-spec' + +/** + * + * @export + * @interface Snapshot + */ +export interface Snapshot { + /** + * + * @type {SnapShotSpec} + * @memberof Snapshot + */ + spec: SnapShotSpec + /** + * + * @type {string} + * @memberof Snapshot + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Snapshot + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Snapshot + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/stats.ts b/packages/api-client/src/models/stats.ts new file mode 100644 index 000000000..1bcc3715c --- /dev/null +++ b/packages/api-client/src/models/stats.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Stats + */ +export interface Stats { + /** + * + * @type {number} + * @memberof Stats + */ + visit?: number + /** + * + * @type {number} + * @memberof Stats + */ + upvote?: number + /** + * + * @type {number} + * @memberof Stats + */ + totalComment?: number + /** + * + * @type {number} + * @memberof Stats + */ + approvedComment?: number +} diff --git a/packages/api-client/src/models/subject.ts b/packages/api-client/src/models/subject.ts new file mode 100644 index 000000000..da3722200 --- /dev/null +++ b/packages/api-client/src/models/subject.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface Subject + */ +export interface Subject { + /** + * + * @type {string} + * @memberof Subject + */ + kind?: string + /** + * + * @type {string} + * @memberof Subject + */ + name?: string + /** + * + * @type {string} + * @memberof Subject + */ + apiGroup?: string +} diff --git a/packages/api-client/src/models/tag-list.ts b/packages/api-client/src/models/tag-list.ts new file mode 100644 index 000000000..dddf8fa0e --- /dev/null +++ b/packages/api-client/src/models/tag-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Tag } from './tag' + +/** + * + * @export + * @interface TagList + */ +export interface TagList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof TagList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof TagList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof TagList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof TagList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof TagList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof TagList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof TagList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof TagList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof TagList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/tag-spec.ts b/packages/api-client/src/models/tag-spec.ts new file mode 100644 index 000000000..b179e9302 --- /dev/null +++ b/packages/api-client/src/models/tag-spec.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface TagSpec + */ +export interface TagSpec { + /** + * + * @type {string} + * @memberof TagSpec + */ + displayName: string + /** + * + * @type {string} + * @memberof TagSpec + */ + slug: string + /** + * + * @type {string} + * @memberof TagSpec + */ + color?: string + /** + * + * @type {string} + * @memberof TagSpec + */ + cover?: string +} diff --git a/packages/api-client/src/models/tag-status.ts b/packages/api-client/src/models/tag-status.ts new file mode 100644 index 000000000..0f7870d90 --- /dev/null +++ b/packages/api-client/src/models/tag-status.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface TagStatus + */ +export interface TagStatus { + /** + * + * @type {string} + * @memberof TagStatus + */ + permalink?: string + /** + * + * @type {number} + * @memberof TagStatus + */ + visiblePostCount?: number + /** + * + * @type {number} + * @memberof TagStatus + */ + postCount?: number +} diff --git a/packages/api-client/src/models/tag.ts b/packages/api-client/src/models/tag.ts new file mode 100644 index 000000000..da042825f --- /dev/null +++ b/packages/api-client/src/models/tag.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { TagSpec } from './tag-spec' +// May contain unused imports in some cases +// @ts-ignore +import { TagStatus } from './tag-status' + +/** + * + * @export + * @interface Tag + */ +export interface Tag { + /** + * + * @type {TagSpec} + * @memberof Tag + */ + spec: TagSpec + /** + * + * @type {TagStatus} + * @memberof Tag + */ + status?: TagStatus + /** + * + * @type {string} + * @memberof Tag + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Tag + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Tag + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/template-descriptor.ts b/packages/api-client/src/models/template-descriptor.ts new file mode 100644 index 000000000..a08606c10 --- /dev/null +++ b/packages/api-client/src/models/template-descriptor.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface TemplateDescriptor + */ +export interface TemplateDescriptor { + /** + * + * @type {string} + * @memberof TemplateDescriptor + */ + name: string + /** + * + * @type {string} + * @memberof TemplateDescriptor + */ + description?: string + /** + * + * @type {string} + * @memberof TemplateDescriptor + */ + screenshot?: string + /** + * + * @type {string} + * @memberof TemplateDescriptor + */ + file: string +} diff --git a/packages/api-client/src/models/theme-list.ts b/packages/api-client/src/models/theme-list.ts new file mode 100644 index 000000000..a8bba7a60 --- /dev/null +++ b/packages/api-client/src/models/theme-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Theme } from './theme' + +/** + * + * @export + * @interface ThemeList + */ +export interface ThemeList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ThemeList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof ThemeList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof ThemeList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof ThemeList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof ThemeList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof ThemeList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ThemeList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof ThemeList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof ThemeList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/theme-spec.ts b/packages/api-client/src/models/theme-spec.ts new file mode 100644 index 000000000..cabd9de62 --- /dev/null +++ b/packages/api-client/src/models/theme-spec.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Author } from './author' +// May contain unused imports in some cases +// @ts-ignore +import { CustomTemplates } from './custom-templates' + +/** + * + * @export + * @interface ThemeSpec + */ +export interface ThemeSpec { + /** + * + * @type {string} + * @memberof ThemeSpec + */ + displayName: string + /** + * + * @type {Author} + * @memberof ThemeSpec + */ + author: Author + /** + * + * @type {string} + * @memberof ThemeSpec + */ + description?: string + /** + * + * @type {string} + * @memberof ThemeSpec + */ + logo?: string + /** + * + * @type {string} + * @memberof ThemeSpec + */ + website?: string + /** + * + * @type {string} + * @memberof ThemeSpec + */ + repo?: string + /** + * + * @type {string} + * @memberof ThemeSpec + */ + version: string + /** + * Deprecated, use `requires` instead. + * @type {string} + * @memberof ThemeSpec + * @deprecated + */ + require?: string + /** + * + * @type {string} + * @memberof ThemeSpec + */ + requires?: string + /** + * + * @type {string} + * @memberof ThemeSpec + */ + settingName?: string + /** + * + * @type {string} + * @memberof ThemeSpec + */ + configMapName?: string + /** + * + * @type {CustomTemplates} + * @memberof ThemeSpec + */ + customTemplates?: CustomTemplates +} diff --git a/packages/api-client/src/models/theme-status.ts b/packages/api-client/src/models/theme-status.ts new file mode 100644 index 000000000..3a3f15f1c --- /dev/null +++ b/packages/api-client/src/models/theme-status.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Condition } from './condition' + +/** + * + * @export + * @interface ThemeStatus + */ +export interface ThemeStatus { + /** + * + * @type {string} + * @memberof ThemeStatus + */ + phase?: ThemeStatusPhaseEnum + /** + * + * @type {Array} + * @memberof ThemeStatus + */ + conditions?: Array + /** + * + * @type {string} + * @memberof ThemeStatus + */ + location?: string +} + +export const ThemeStatusPhaseEnum = { + Ready: 'READY', + Failed: 'FAILED', + Unknown: 'UNKNOWN', +} as const + +export type ThemeStatusPhaseEnum = typeof ThemeStatusPhaseEnum[keyof typeof ThemeStatusPhaseEnum] diff --git a/packages/api-client/src/models/theme.ts b/packages/api-client/src/models/theme.ts new file mode 100644 index 000000000..e930c5936 --- /dev/null +++ b/packages/api-client/src/models/theme.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { ThemeSpec } from './theme-spec' +// May contain unused imports in some cases +// @ts-ignore +import { ThemeStatus } from './theme-status' + +/** + * + * @export + * @interface Theme + */ +export interface Theme { + /** + * + * @type {ThemeSpec} + * @memberof Theme + */ + spec: ThemeSpec + /** + * + * @type {ThemeStatus} + * @memberof Theme + */ + status?: ThemeStatus + /** + * + * @type {string} + * @memberof Theme + */ + apiVersion: string + /** + * + * @type {string} + * @memberof Theme + */ + kind: string + /** + * + * @type {Metadata} + * @memberof Theme + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/user-list.ts b/packages/api-client/src/models/user-list.ts new file mode 100644 index 000000000..7f267d578 --- /dev/null +++ b/packages/api-client/src/models/user-list.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { User } from './user' + +/** + * + * @export + * @interface UserList + */ +export interface UserList { + /** + * Page number, starts from 1. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof UserList + */ + page: number + /** + * Size of each page. If not set or equal to 0, it means no pagination. + * @type {number} + * @memberof UserList + */ + size: number + /** + * Total elements. + * @type {number} + * @memberof UserList + */ + total: number + /** + * A chunk of items. + * @type {Array} + * @memberof UserList + */ + items: Array + /** + * Indicates whether current page is the first page. + * @type {boolean} + * @memberof UserList + */ + first: boolean + /** + * Indicates whether current page is the last page. + * @type {boolean} + * @memberof UserList + */ + last: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof UserList + */ + hasNext: boolean + /** + * Indicates whether current page has previous page. + * @type {boolean} + * @memberof UserList + */ + hasPrevious: boolean + /** + * Indicates total pages. + * @type {number} + * @memberof UserList + */ + totalPages: number +} diff --git a/packages/api-client/src/models/user-permission.ts b/packages/api-client/src/models/user-permission.ts new file mode 100644 index 000000000..9cf15ead9 --- /dev/null +++ b/packages/api-client/src/models/user-permission.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Role } from './role' + +/** + * + * @export + * @interface UserPermission + */ +export interface UserPermission { + /** + * + * @type {Array} + * @memberof UserPermission + */ + roles: Array + /** + * + * @type {Array} + * @memberof UserPermission + */ + uiPermissions: Array +} diff --git a/packages/api-client/src/models/user-spec.ts b/packages/api-client/src/models/user-spec.ts new file mode 100644 index 000000000..6d975b45b --- /dev/null +++ b/packages/api-client/src/models/user-spec.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface UserSpec + */ +export interface UserSpec { + /** + * + * @type {string} + * @memberof UserSpec + */ + displayName: string + /** + * + * @type {string} + * @memberof UserSpec + */ + avatar?: string + /** + * + * @type {string} + * @memberof UserSpec + */ + email: string + /** + * + * @type {string} + * @memberof UserSpec + */ + phone?: string + /** + * + * @type {string} + * @memberof UserSpec + */ + password?: string + /** + * + * @type {string} + * @memberof UserSpec + */ + bio?: string + /** + * + * @type {string} + * @memberof UserSpec + */ + registeredAt?: string + /** + * + * @type {boolean} + * @memberof UserSpec + */ + twoFactorAuthEnabled?: boolean + /** + * + * @type {boolean} + * @memberof UserSpec + */ + disabled?: boolean + /** + * + * @type {number} + * @memberof UserSpec + */ + loginHistoryLimit?: number +} diff --git a/packages/api-client/src/models/user-status.ts b/packages/api-client/src/models/user-status.ts new file mode 100644 index 000000000..7d5b60bf2 --- /dev/null +++ b/packages/api-client/src/models/user-status.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { LoginHistory } from './login-history' + +/** + * + * @export + * @interface UserStatus + */ +export interface UserStatus { + /** + * + * @type {string} + * @memberof UserStatus + */ + lastLoginAt?: string + /** + * + * @type {string} + * @memberof UserStatus + */ + permalink?: string + /** + * + * @type {Array} + * @memberof UserStatus + */ + loginHistories?: Array +} diff --git a/packages/api-client/src/models/user.ts b/packages/api-client/src/models/user.ts new file mode 100644 index 000000000..f32b811a8 --- /dev/null +++ b/packages/api-client/src/models/user.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +// May contain unused imports in some cases +// @ts-ignore +import { Metadata } from './metadata' +// May contain unused imports in some cases +// @ts-ignore +import { UserSpec } from './user-spec' +// May contain unused imports in some cases +// @ts-ignore +import { UserStatus } from './user-status' + +/** + * + * @export + * @interface User + */ +export interface User { + /** + * + * @type {UserSpec} + * @memberof User + */ + spec: UserSpec + /** + * + * @type {UserStatus} + * @memberof User + */ + status?: UserStatus + /** + * + * @type {string} + * @memberof User + */ + apiVersion: string + /** + * + * @type {string} + * @memberof User + */ + kind: string + /** + * + * @type {Metadata} + * @memberof User + */ + metadata: Metadata +} diff --git a/packages/api-client/src/models/vote-request.ts b/packages/api-client/src/models/vote-request.ts new file mode 100644 index 000000000..b84e7009f --- /dev/null +++ b/packages/api-client/src/models/vote-request.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo Next API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * + * @export + * @interface VoteRequest + */ +export interface VoteRequest { + /** + * + * @type {string} + * @memberof VoteRequest + */ + group?: string + /** + * + * @type {string} + * @memberof VoteRequest + */ + plural?: string + /** + * + * @type {string} + * @memberof VoteRequest + */ + name?: string +} diff --git a/packages/api-client/tsconfig.json b/packages/api-client/tsconfig.json new file mode 100644 index 000000000..b502b0d9e --- /dev/null +++ b/packages/api-client/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es2018", + "module": "esnext", + "lib": ["esnext", "dom"], + "moduleResolution": "node", + "esModuleInterop": true, + "strict": true, + "strictNullChecks": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "skipDefaultLibCheck": true + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 65a9e14c8..6f0bbb232 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: '@formkit/utils': ^1.0.0-beta.12 '@formkit/validation': 1.0.0-beta.12 '@formkit/vue': ^1.0.0-beta.12 - '@halo-dev/api-client': 0.0.71 + '@halo-dev/api-client': workspace:* '@halo-dev/components': workspace:* '@halo-dev/console-shared': workspace:* '@halo-dev/richtext-editor': 0.0.0-alpha.19 @@ -110,7 +110,7 @@ importers: '@formkit/utils': 1.0.0-beta.12-e579559 '@formkit/validation': 1.0.0-beta.12 '@formkit/vue': 1.0.0-beta.12-e579559_ior6jr3fpijijuwpr34w2i25va - '@halo-dev/api-client': 0.0.71 + '@halo-dev/api-client': link:packages/api-client '@halo-dev/components': link:packages/components '@halo-dev/console-shared': link:packages/shared '@halo-dev/richtext-editor': 0.0.0-alpha.19_oau5uimcdfyintci7kxkcutjea @@ -201,6 +201,36 @@ importers: vitest: 0.25.3_wqgykbafw5ps5nhnqfbxcvabhu vue-tsc: 1.0.24_typescript@4.7.4 + packages/api-client: + specifiers: + '@openapitools/openapi-generator-cli': ^2.5.2 + '@types/node': ^18.13.0 + '@typescript-eslint/eslint-plugin': ^5.52.0 + '@typescript-eslint/parser': ^5.52.0 + axios: ^0.27.2 + bumpp: ^8.2.1 + eslint: ^8.34.0 + eslint-config-prettier: ^8.6.0 + eslint-plugin-prettier: ^4.2.1 + prettier: ^2.8.4 + typescript: ^4.9.5 + unbuild: ^0.7.6 + vitest: ^0.18.1 + devDependencies: + '@openapitools/openapi-generator-cli': 2.5.2 + '@types/node': 18.13.0 + '@typescript-eslint/eslint-plugin': 5.52.0_6cfvjsbua5ptj65675bqcn6oza + '@typescript-eslint/parser': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm + axios: 0.27.2 + bumpp: 8.2.1 + eslint: 8.34.0 + eslint-config-prettier: 8.6.0_eslint@8.34.0 + eslint-plugin-prettier: 4.2.1_u5wnrdwibbfomslmnramz52buy + prettier: 2.8.4 + typescript: 4.9.5 + unbuild: 0.7.6 + vitest: 0.18.1 + packages/components: specifiers: '@codemirror/commands': ^6.1.2 @@ -1440,6 +1470,11 @@ packages: regenerator-runtime: 0.13.9 dev: true + /@babel/standalone/7.20.15: + resolution: {integrity: sha512-B3LmZ1NHlTb2eFEaw8rftZc730Wh9MlmsH8ubb6IjsNoIk9+SQ2aAA0nrm/1806+PftPRAACPClmKTu8PG7Tew==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/template/7.18.10: resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} engines: {node: '>=6.9.0'} @@ -1527,7 +1562,7 @@ packages: fs-extra: 7.0.1 lodash.startcase: 4.4.0 outdent: 0.5.0 - prettier: 2.8.0 + prettier: 2.8.4 resolve-from: 5.0.0 semver: 5.7.1 dev: true @@ -1694,7 +1729,7 @@ packages: '@changesets/types': 5.2.0 fs-extra: 7.0.1 human-id: 1.0.2 - prettier: 2.8.0 + prettier: 2.8.4 dev: true /@codemirror/autocomplete/6.3.0_cjhreg6sef6bi4tr3erat4xvva: @@ -1955,6 +1990,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64/0.14.54: + resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64/0.15.9: resolution: {integrity: sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==} engines: {node: '>=12'} @@ -2089,6 +2133,23 @@ packages: - supports-color dev: true + /@eslint/eslintrc/1.4.1: + resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.4.0 + globals: 13.20.0 + ignore: 5.2.0 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + /@floating-ui/core/0.3.1: resolution: {integrity: sha512-ensKY7Ub59u16qsVIFEo2hwTCqZ/r9oZZFh51ivcLGHfUwTn8l1Xzng8RJUe91H/UP8PeqeBronAGx0qmzwk2g==} dev: false @@ -2215,10 +2276,6 @@ packages: - windicss dev: false - /@halo-dev/api-client/0.0.71: - resolution: {integrity: sha512-KbB3Ydws0VGeYNzpCgnf8WBviMMzo9ZkCjoONPyGgRbGLu8znoi2p0Pz9Mi4jig6xA7A+XlhUT6uNpIPRcO/Ug==} - dev: false - /@halo-dev/richtext-editor/0.0.0-alpha.19_oau5uimcdfyintci7kxkcutjea: resolution: {integrity: sha512-fJpHCKKo4U0cA+VnSjLK7Ob8q+IuAF4BsMfMyRFVnKxcViAALxAV+USvn6KCQsjh4RD64P/5vNFgmJ/dA4n/8w==} peerDependencies: @@ -2359,6 +2416,17 @@ packages: - supports-color dev: true + /@humanwhocodes/config-array/0.11.8: + resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 1.2.1 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + /@humanwhocodes/module-importer/1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -2614,6 +2682,16 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true + /@jsdevtools/ez-spawn/3.0.4: + resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} + engines: {node: '>=10'} + dependencies: + call-me-maybe: 1.0.2 + cross-spawn: 7.0.3 + string-argv: 0.3.1 + type-detect: 4.0.8 + dev: true + /@lezer/common/1.0.1: resolution: {integrity: sha512-8TR5++Q/F//tpDsLd5zkrvEX5xxeemafEaek7mUp7Y+bI8cKQXdSqhzTOBaOogETcMOVr0pT3BBPXp13477ciw==} @@ -2714,6 +2792,64 @@ packages: resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} dev: true + /@nestjs/common/8.4.4_47vcjb2de6lyibr6g4enoa5lyu: + resolution: {integrity: sha512-QHi7QcgH/5Jinz+SCfIZJkFHc6Cch1YsAEGFEhi6wSp6MILb0sJMQ1CX06e9tCOAjSlBwaJj4PH0eFCVau5v9Q==} + peerDependencies: + cache-manager: '*' + class-transformer: '*' + class-validator: '*' + reflect-metadata: ^0.1.12 + rxjs: ^7.1.0 + peerDependenciesMeta: + cache-manager: + optional: true + class-transformer: + optional: true + class-validator: + optional: true + dependencies: + axios: 0.26.1 + iterare: 1.2.1 + reflect-metadata: 0.1.13 + rxjs: 7.5.5 + tslib: 2.3.1 + uuid: 8.3.2 + transitivePeerDependencies: + - debug + dev: true + + /@nestjs/core/8.4.4_ozyn6uy6pikqhtn6hfkzt5a5w4: + resolution: {integrity: sha512-Ef3yJPuzAttpNfehnGqIV5kHIL9SHptB5F4ERxoU7pT61H3xiYpZw6hSjx68cJO7cc6rm7/N+b4zeuJvFHtvBg==} + requiresBuild: true + peerDependencies: + '@nestjs/common': ^8.0.0 + '@nestjs/microservices': ^8.0.0 + '@nestjs/platform-express': ^8.0.0 + '@nestjs/websockets': ^8.0.0 + reflect-metadata: ^0.1.12 + rxjs: ^7.1.0 + peerDependenciesMeta: + '@nestjs/microservices': + optional: true + '@nestjs/platform-express': + optional: true + '@nestjs/websockets': + optional: true + dependencies: + '@nestjs/common': 8.4.4_47vcjb2de6lyibr6g4enoa5lyu + '@nuxtjs/opencollective': 0.3.2 + fast-safe-stringify: 2.1.1 + iterare: 1.2.1 + object-hash: 3.0.0 + path-to-regexp: 3.2.0 + reflect-metadata: 0.1.13 + rxjs: 7.5.5 + tslib: 2.3.1 + uuid: 8.3.2 + transitivePeerDependencies: + - encoding + dev: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2732,6 +2868,50 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 + /@nuxtjs/opencollective/0.3.2: + resolution: {integrity: sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==} + engines: {node: '>=8.0.0', npm: '>=5.0.0'} + hasBin: true + dependencies: + chalk: 4.1.2 + consola: 2.15.3 + node-fetch: 2.6.7 + transitivePeerDependencies: + - encoding + dev: true + + /@openapitools/openapi-generator-cli/2.5.2: + resolution: {integrity: sha512-FLgkjzpDiHVsH821db0VDSElDoA6TcspGyq3RD4zLBJaJhbSsRwr4u87sNoyuHKBg4OMJbZMT4iJxAhkosKrzw==} + engines: {node: '>=10.0.0'} + hasBin: true + requiresBuild: true + dependencies: + '@nestjs/common': 8.4.4_47vcjb2de6lyibr6g4enoa5lyu + '@nestjs/core': 8.4.4_ozyn6uy6pikqhtn6hfkzt5a5w4 + '@nuxtjs/opencollective': 0.3.2 + chalk: 4.1.2 + commander: 8.3.0 + compare-versions: 4.1.3 + concurrently: 6.5.1 + console.table: 0.10.0 + fs-extra: 10.0.1 + glob: 7.1.6 + inquirer: 8.2.2 + lodash: 4.17.21 + reflect-metadata: 0.1.13 + rxjs: 7.5.5 + tslib: 2.0.3 + transitivePeerDependencies: + - '@nestjs/microservices' + - '@nestjs/platform-express' + - '@nestjs/websockets' + - cache-manager + - class-transformer + - class-validator + - debug + - encoding + dev: true + /@polka/url/1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true @@ -2740,6 +2920,16 @@ packages: resolution: {integrity: sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==} dev: false + /@rollup/plugin-alias/3.1.9_rollup@2.79.1: + resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} + engines: {node: '>=8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + rollup: 2.79.1 + slash: 3.0.0 + dev: true + /@rollup/plugin-babel/5.3.1_3dsfpkpoyvuuxyfgdbpn4j4uzm: resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} @@ -2757,6 +2947,31 @@ packages: rollup: 2.79.1 dev: true + /@rollup/plugin-commonjs/22.0.2_rollup@2.79.1: + resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} + engines: {node: '>= 12.0.0'} + peerDependencies: + rollup: ^2.68.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 7.2.3 + is-reference: 1.2.1 + magic-string: 0.25.9 + resolve: 1.22.1 + rollup: 2.79.1 + dev: true + + /@rollup/plugin-json/4.1.0_rollup@2.79.1: + resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + rollup: 2.79.1 + dev: true + /@rollup/plugin-node-resolve/11.2.1_rollup@2.79.1: resolution: {integrity: sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==} engines: {node: '>= 10.0.0'} @@ -2772,6 +2987,21 @@ packages: rollup: 2.79.1 dev: true + /@rollup/plugin-node-resolve/13.3.0_rollup@2.79.1: + resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^2.42.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.1 + '@types/resolve': 1.17.1 + deepmerge: 4.2.2 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.1 + rollup: 2.79.1 + dev: true + /@rollup/plugin-replace/2.4.2_rollup@2.79.1: resolution: {integrity: sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==} peerDependencies: @@ -3343,7 +3573,7 @@ packages: /@types/concat-stream/1.6.1: resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 dev: true /@types/estree/0.0.39: @@ -3361,13 +3591,13 @@ packages: /@types/form-data/0.0.33: resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 dev: true /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 dev: true /@types/hast/2.3.4: @@ -3389,7 +3619,7 @@ packages: /@types/jsdom/20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 '@types/tough-cookie': 4.0.2 parse5: 7.1.1 dev: true @@ -3465,6 +3695,10 @@ packages: resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} dev: true + /@types/node/18.13.0: + resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==} + dev: true + /@types/node/8.10.66: resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} dev: true @@ -3484,13 +3718,17 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 dev: true /@types/semver/6.2.3: resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} dev: true + /@types/semver/7.3.13: + resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} + dev: true + /@types/sinonjs__fake-timers/8.1.1: resolution: {integrity: sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==} dev: true @@ -3519,12 +3757,40 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 dev: true optional: true - /@typescript-eslint/eslint-plugin/5.38.1_un7phxiuz5mvrt7m2xjqf6to6y: - resolution: {integrity: sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==} + /@typescript-eslint/eslint-plugin/5.52.0_6cfvjsbua5ptj65675bqcn6oza: + resolution: {integrity: sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/parser': ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/parser': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm + '@typescript-eslint/scope-manager': 5.52.0 + '@typescript-eslint/type-utils': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm + '@typescript-eslint/utils': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm + debug: 4.3.4 + eslint: 8.34.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.0 + natural-compare-lite: 1.4.0 + regexpp: 3.2.0 + semver: 7.3.7 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/eslint-plugin/5.52.0_sihug6mmb5plibkl663lvmvge4: + resolution: {integrity: sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -3534,13 +3800,15 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_tqvwk7sh3taph5wf7sr5z34mke - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/type-utils': 5.38.1_tqvwk7sh3taph5wf7sr5z34mke - '@typescript-eslint/utils': 5.38.1_tqvwk7sh3taph5wf7sr5z34mke + '@typescript-eslint/parser': 5.52.0_tqvwk7sh3taph5wf7sr5z34mke + '@typescript-eslint/scope-manager': 5.52.0 + '@typescript-eslint/type-utils': 5.52.0_tqvwk7sh3taph5wf7sr5z34mke + '@typescript-eslint/utils': 5.52.0_tqvwk7sh3taph5wf7sr5z34mke debug: 4.3.4 eslint: 8.28.0 + grapheme-splitter: 1.0.4 ignore: 5.2.0 + natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.7 tsutils: 3.21.0_typescript@4.7.4 @@ -3549,8 +3817,28 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.38.1_tqvwk7sh3taph5wf7sr5z34mke: - resolution: {integrity: sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==} + /@typescript-eslint/parser/5.52.0_7kw3g6rralp5ps6mg3uyzz6azm: + resolution: {integrity: sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.52.0 + '@typescript-eslint/types': 5.52.0 + '@typescript-eslint/typescript-estree': 5.52.0_typescript@4.9.5 + debug: 4.3.4 + eslint: 8.34.0 + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser/5.52.0_tqvwk7sh3taph5wf7sr5z34mke: + resolution: {integrity: sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -3559,9 +3847,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.7.4 + '@typescript-eslint/scope-manager': 5.52.0 + '@typescript-eslint/types': 5.52.0 + '@typescript-eslint/typescript-estree': 5.52.0_typescript@4.7.4 debug: 4.3.4 eslint: 8.28.0 typescript: 4.7.4 @@ -3569,16 +3857,36 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.38.1: - resolution: {integrity: sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==} + /@typescript-eslint/scope-manager/5.52.0: + resolution: {integrity: sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.52.0 + '@typescript-eslint/visitor-keys': 5.52.0 + dev: true + + /@typescript-eslint/type-utils/5.52.0_7kw3g6rralp5ps6mg3uyzz6azm: + resolution: {integrity: sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 + '@typescript-eslint/typescript-estree': 5.52.0_typescript@4.9.5 + '@typescript-eslint/utils': 5.52.0_7kw3g6rralp5ps6mg3uyzz6azm + debug: 4.3.4 + eslint: 8.34.0 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color dev: true - /@typescript-eslint/type-utils/5.38.1_tqvwk7sh3taph5wf7sr5z34mke: - resolution: {integrity: sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw==} + /@typescript-eslint/type-utils/5.52.0_tqvwk7sh3taph5wf7sr5z34mke: + resolution: {integrity: sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -3587,8 +3895,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.7.4 - '@typescript-eslint/utils': 5.38.1_tqvwk7sh3taph5wf7sr5z34mke + '@typescript-eslint/typescript-estree': 5.52.0_typescript@4.7.4 + '@typescript-eslint/utils': 5.52.0_tqvwk7sh3taph5wf7sr5z34mke debug: 4.3.4 eslint: 8.28.0 tsutils: 3.21.0_typescript@4.7.4 @@ -3597,13 +3905,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.38.1: - resolution: {integrity: sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==} + /@typescript-eslint/types/5.52.0: + resolution: {integrity: sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.38.1_typescript@4.7.4: - resolution: {integrity: sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==} + /@typescript-eslint/typescript-estree/5.52.0_typescript@4.7.4: + resolution: {integrity: sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -3611,8 +3919,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 + '@typescript-eslint/types': 5.52.0 + '@typescript-eslint/visitor-keys': 5.52.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -3623,29 +3931,72 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.38.1_tqvwk7sh3taph5wf7sr5z34mke: - resolution: {integrity: sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA==} + /@typescript-eslint/typescript-estree/5.52.0_typescript@4.9.5: + resolution: {integrity: sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.52.0 + '@typescript-eslint/visitor-keys': 5.52.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.7 + tsutils: 3.21.0_typescript@4.9.5 + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/5.52.0_7kw3g6rralp5ps6mg3uyzz6azm: + resolution: {integrity: sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@types/json-schema': 7.0.11 + '@types/semver': 7.3.13 + '@typescript-eslint/scope-manager': 5.52.0 + '@typescript-eslint/types': 5.52.0 + '@typescript-eslint/typescript-estree': 5.52.0_typescript@4.9.5 + eslint: 8.34.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.34.0 + semver: 7.3.7 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils/5.52.0_tqvwk7sh3taph5wf7sr5z34mke: + resolution: {integrity: sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.7.4 + '@types/semver': 7.3.13 + '@typescript-eslint/scope-manager': 5.52.0 + '@typescript-eslint/types': 5.52.0 + '@typescript-eslint/typescript-estree': 5.52.0_typescript@4.7.4 eslint: 8.28.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.28.0 + semver: 7.3.7 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.38.1: - resolution: {integrity: sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==} + /@typescript-eslint/visitor-keys/5.52.0: + resolution: {integrity: sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/types': 5.52.0 eslint-visitor-keys: 3.3.0 dev: true @@ -3964,8 +4315,8 @@ packages: prettier: '>= 2.0.0' dependencies: eslint: 8.28.0 - eslint-config-prettier: 8.5.0_eslint@8.28.0 - eslint-plugin-prettier: 4.2.1_cwlo2dingkvfydnaculr42urve + eslint-config-prettier: 8.6.0_eslint@8.28.0 + eslint-plugin-prettier: 4.2.1_7yircvrnc4bjouvzg4atxii3na prettier: 2.8.0 dev: true @@ -3980,8 +4331,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.38.1_un7phxiuz5mvrt7m2xjqf6to6y - '@typescript-eslint/parser': 5.38.1_tqvwk7sh3taph5wf7sr5z34mke + '@typescript-eslint/eslint-plugin': 5.52.0_sihug6mmb5plibkl663lvmvge4 + '@typescript-eslint/parser': 5.52.0_tqvwk7sh3taph5wf7sr5z34mke eslint: 8.28.0 eslint-plugin-vue: 9.8.0_eslint@8.28.0 typescript: 4.7.4 @@ -4335,7 +4686,15 @@ packages: /axios/0.21.4_debug@4.3.2: resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} dependencies: - follow-redirects: 1.15.2 + follow-redirects: 1.15.2_debug@4.3.2 + transitivePeerDependencies: + - debug + dev: true + + /axios/0.26.1: + resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==} + dependencies: + follow-redirects: 1.15.2_debug@4.3.2 transitivePeerDependencies: - debug dev: true @@ -4343,11 +4702,10 @@ packages: /axios/0.27.2: resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} dependencies: - follow-redirects: 1.15.2 + follow-redirects: 1.15.2_debug@4.3.2 form-data: 4.0.0 transitivePeerDependencies: - debug - dev: false /babel-plugin-dynamic-import-node/2.3.3: resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==} @@ -4424,6 +4782,14 @@ packages: resolution: {integrity: sha512-B64AGL4ug2IS2jvV/zjTYDD1L+2gOJTT7Rv+VaK7KVQtQOo/xZbCDsh7g727ipckmU+QJYRqo5RcifVr0Kgcmg==} dev: true + /bl/4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.0 + dev: true + /blob-util/2.0.2: resolution: {integrity: sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==} dev: true @@ -4492,6 +4858,19 @@ packages: engines: {node: '>=6'} dev: true + /bumpp/8.2.1: + resolution: {integrity: sha512-4tHKsWC2mqHQvdjZ4AXgVhS2xMsz8qQ4zYt87vGRXW5tqAjrYa/UJqy7s/dGYI2OIe9ghBdiFhKpyKEX9SXffg==} + engines: {node: '>=10'} + hasBin: true + dependencies: + '@jsdevtools/ez-spawn': 3.0.4 + cac: 6.7.14 + fast-glob: 3.2.12 + kleur: 4.1.5 + prompts: 2.4.2 + semver: 7.3.7 + dev: true + /c8/7.12.0: resolution: {integrity: sha512-CtgQrHOkyxr5koX1wEUmN/5cfDa2ckbHRA4Gy5LAL0zaCFtVWJS5++n+w4/sr2GWGerBxgTjpKeDclk/Qk6W/A==} engines: {node: '>=10.12.0'} @@ -4511,6 +4890,11 @@ packages: yargs-parser: 20.2.9 dev: true + /cac/6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + /cachedir/2.3.0: resolution: {integrity: sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==} engines: {node: '>=6'} @@ -4522,6 +4906,10 @@ packages: function-bind: 1.1.1 get-intrinsic: 1.1.3 + /call-me-maybe/1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + dev: true + /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -4603,6 +4991,11 @@ packages: supports-color: 7.2.0 dev: true + /chalk/5.2.0: + resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: true + /change-case/4.1.2: resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} dependencies: @@ -4674,6 +5067,11 @@ packages: restore-cursor: 3.1.0 dev: true + /cli-spinners/2.7.0: + resolution: {integrity: sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==} + engines: {node: '>=6'} + dev: true + /cli-table3/0.6.3: resolution: {integrity: sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==} engines: {node: 10.* || >= 12.*} @@ -4699,6 +5097,11 @@ packages: string-width: 5.1.2 dev: true + /cli-width/3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + dev: true + /cliui/6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} dependencies: @@ -4813,6 +5216,14 @@ packages: engines: {node: '>=4.0.0'} dev: true + /commondir/1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + dev: true + + /compare-versions/4.1.3: + resolution: {integrity: sha512-WQfnbDcrYnGr55UwbxKiQKASnTtNnaAWVi8jZyy8NTpVAXWACSne8lMD1iaIo9AiU6mnuLvSVshCzewVuWxHUg==} + dev: true + /concat-map/0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -4827,13 +5238,28 @@ packages: typedarray: 0.0.6 dev: true - /connect-history-api-fallback/1.6.0: - resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==} - engines: {node: '>=0.8'} - dev: true - - /connect/3.7.0: - resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} + /concurrently/6.5.1: + resolution: {integrity: sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==} + engines: {node: '>=10.0.0'} + hasBin: true + dependencies: + chalk: 4.1.2 + date-fns: 2.29.3 + lodash: 4.17.21 + rxjs: 6.6.7 + spawn-command: 0.0.2-1 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 16.2.0 + dev: true + + /connect-history-api-fallback/1.6.0: + resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==} + engines: {node: '>=0.8'} + dev: true + + /connect/3.7.0: + resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} engines: {node: '>= 0.10.0'} dependencies: debug: 2.6.9 @@ -4848,6 +5274,13 @@ packages: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} dev: true + /console.table/0.10.0: + resolution: {integrity: sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==} + engines: {node: '> 0.10'} + dependencies: + easy-table: 1.1.0 + dev: true + /constant-case/3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: @@ -5031,6 +5464,11 @@ packages: whatwg-url: 11.0.0 dev: true + /date-fns/2.29.3: + resolution: {integrity: sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==} + engines: {node: '>=0.11'} + dev: true + /dayjs/1.11.6: resolution: {integrity: sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==} @@ -5071,7 +5509,6 @@ packages: optional: true dependencies: ms: 2.1.2 - dev: true /debug/4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} @@ -5253,6 +5690,12 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /easy-table/1.1.0: + resolution: {integrity: sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==} + optionalDependencies: + wcwidth: 1.0.1 + dev: true + /ecc-jsbn/0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} dependencies: @@ -5364,6 +5807,10 @@ packages: resolution: {integrity: sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA==} dev: true + /es-module-lexer/0.9.3: + resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} + dev: true + /es-shim-unscopables/1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: @@ -5379,6 +5826,15 @@ packages: is-symbol: 1.0.4 dev: true + /esbuild-android-64/0.14.54: + resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /esbuild-android-64/0.15.9: resolution: {integrity: sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==} engines: {node: '>=12'} @@ -5388,6 +5844,15 @@ packages: dev: true optional: true + /esbuild-android-arm64/0.14.54: + resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /esbuild-android-arm64/0.15.9: resolution: {integrity: sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==} engines: {node: '>=12'} @@ -5397,6 +5862,15 @@ packages: dev: true optional: true + /esbuild-darwin-64/0.14.54: + resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-64/0.15.9: resolution: {integrity: sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==} engines: {node: '>=12'} @@ -5406,6 +5880,15 @@ packages: dev: true optional: true + /esbuild-darwin-arm64/0.14.54: + resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-arm64/0.15.9: resolution: {integrity: sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==} engines: {node: '>=12'} @@ -5415,6 +5898,15 @@ packages: dev: true optional: true + /esbuild-freebsd-64/0.14.54: + resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-64/0.15.9: resolution: {integrity: sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==} engines: {node: '>=12'} @@ -5424,6 +5916,15 @@ packages: dev: true optional: true + /esbuild-freebsd-arm64/0.14.54: + resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-arm64/0.15.9: resolution: {integrity: sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==} engines: {node: '>=12'} @@ -5433,6 +5934,15 @@ packages: dev: true optional: true + /esbuild-linux-32/0.14.54: + resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-32/0.15.9: resolution: {integrity: sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==} engines: {node: '>=12'} @@ -5442,6 +5952,15 @@ packages: dev: true optional: true + /esbuild-linux-64/0.14.54: + resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-64/0.15.9: resolution: {integrity: sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==} engines: {node: '>=12'} @@ -5451,6 +5970,15 @@ packages: dev: true optional: true + /esbuild-linux-arm/0.14.54: + resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm/0.15.9: resolution: {integrity: sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==} engines: {node: '>=12'} @@ -5460,6 +5988,15 @@ packages: dev: true optional: true + /esbuild-linux-arm64/0.14.54: + resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm64/0.15.9: resolution: {integrity: sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==} engines: {node: '>=12'} @@ -5469,6 +6006,15 @@ packages: dev: true optional: true + /esbuild-linux-mips64le/0.14.54: + resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-mips64le/0.15.9: resolution: {integrity: sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==} engines: {node: '>=12'} @@ -5478,6 +6024,15 @@ packages: dev: true optional: true + /esbuild-linux-ppc64le/0.14.54: + resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-ppc64le/0.15.9: resolution: {integrity: sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==} engines: {node: '>=12'} @@ -5487,6 +6042,15 @@ packages: dev: true optional: true + /esbuild-linux-riscv64/0.14.54: + resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-riscv64/0.15.9: resolution: {integrity: sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==} engines: {node: '>=12'} @@ -5496,6 +6060,15 @@ packages: dev: true optional: true + /esbuild-linux-s390x/0.14.54: + resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-s390x/0.15.9: resolution: {integrity: sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==} engines: {node: '>=12'} @@ -5505,6 +6078,15 @@ packages: dev: true optional: true + /esbuild-netbsd-64/0.14.54: + resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-netbsd-64/0.15.9: resolution: {integrity: sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==} engines: {node: '>=12'} @@ -5514,6 +6096,15 @@ packages: dev: true optional: true + /esbuild-openbsd-64/0.14.54: + resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-openbsd-64/0.15.9: resolution: {integrity: sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==} engines: {node: '>=12'} @@ -5523,6 +6114,15 @@ packages: dev: true optional: true + /esbuild-sunos-64/0.14.54: + resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /esbuild-sunos-64/0.15.9: resolution: {integrity: sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==} engines: {node: '>=12'} @@ -5532,6 +6132,15 @@ packages: dev: true optional: true + /esbuild-windows-32/0.14.54: + resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-32/0.15.9: resolution: {integrity: sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==} engines: {node: '>=12'} @@ -5541,6 +6150,15 @@ packages: dev: true optional: true + /esbuild-windows-64/0.14.54: + resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-64/0.15.9: resolution: {integrity: sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==} engines: {node: '>=12'} @@ -5550,6 +6168,15 @@ packages: dev: true optional: true + /esbuild-windows-arm64/0.14.54: + resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-arm64/0.15.9: resolution: {integrity: sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==} engines: {node: '>=12'} @@ -5559,6 +6186,35 @@ packages: dev: true optional: true + /esbuild/0.14.54: + resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/linux-loong64': 0.14.54 + esbuild-android-64: 0.14.54 + esbuild-android-arm64: 0.14.54 + esbuild-darwin-64: 0.14.54 + esbuild-darwin-arm64: 0.14.54 + esbuild-freebsd-64: 0.14.54 + esbuild-freebsd-arm64: 0.14.54 + esbuild-linux-32: 0.14.54 + esbuild-linux-64: 0.14.54 + esbuild-linux-arm: 0.14.54 + esbuild-linux-arm64: 0.14.54 + esbuild-linux-mips64le: 0.14.54 + esbuild-linux-ppc64le: 0.14.54 + esbuild-linux-riscv64: 0.14.54 + esbuild-linux-s390x: 0.14.54 + esbuild-netbsd-64: 0.14.54 + esbuild-openbsd-64: 0.14.54 + esbuild-sunos-64: 0.14.54 + esbuild-windows-32: 0.14.54 + esbuild-windows-64: 0.14.54 + esbuild-windows-arm64: 0.14.54 + dev: true + /esbuild/0.15.9: resolution: {integrity: sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==} engines: {node: '>=12'} @@ -5650,8 +6306,8 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-prettier/8.5.0_eslint@8.28.0: - resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} + /eslint-config-prettier/8.6.0_eslint@8.28.0: + resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -5659,6 +6315,15 @@ packages: eslint: 8.28.0 dev: true + /eslint-config-prettier/8.6.0_eslint@8.34.0: + resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.34.0 + dev: true + /eslint-plugin-cypress/2.12.1_eslint@8.28.0: resolution: {integrity: sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA==} peerDependencies: @@ -5668,7 +6333,7 @@ packages: globals: 11.12.0 dev: true - /eslint-plugin-prettier/4.2.1_cwlo2dingkvfydnaculr42urve: + /eslint-plugin-prettier/4.2.1_7yircvrnc4bjouvzg4atxii3na: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -5680,11 +6345,28 @@ packages: optional: true dependencies: eslint: 8.28.0 - eslint-config-prettier: 8.5.0_eslint@8.28.0 + eslint-config-prettier: 8.6.0_eslint@8.28.0 prettier: 2.8.0 prettier-linter-helpers: 1.0.0 dev: true + /eslint-plugin-prettier/4.2.1_u5wnrdwibbfomslmnramz52buy: + resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} + engines: {node: '>=12.0.0'} + peerDependencies: + eslint: '>=7.28.0' + eslint-config-prettier: '*' + prettier: '>=2.0.0' + peerDependenciesMeta: + eslint-config-prettier: + optional: true + dependencies: + eslint: 8.34.0 + eslint-config-prettier: 8.6.0_eslint@8.34.0 + prettier: 2.8.4 + prettier-linter-helpers: 1.0.0 + dev: true + /eslint-plugin-vue/9.8.0_eslint@8.28.0: resolution: {integrity: sha512-E/AXwcTzunyzM83C2QqDHxepMzvI2y6x+mmeYHbVDQlKFqmKYvRrhaVixEeeG27uI44p9oKDFiyCRw4XxgtfHA==} engines: {node: ^14.17.0 || >=16.0.0} @@ -5729,6 +6411,16 @@ packages: eslint-visitor-keys: 2.1.0 dev: true + /eslint-utils/3.0.0_eslint@8.34.0: + resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} + engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} + peerDependencies: + eslint: '>=5' + dependencies: + eslint: 8.34.0 + eslint-visitor-keys: 2.1.0 + dev: true + /eslint-visitor-keys/2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} engines: {node: '>=10'} @@ -5787,6 +6479,54 @@ packages: - supports-color dev: true + /eslint/8.34.0: + resolution: {integrity: sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint/eslintrc': 1.4.1 + '@humanwhocodes/config-array': 0.11.8 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.34.0 + eslint-visitor-keys: 3.3.0 + espree: 9.4.0 + esquery: 1.4.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.20.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.0 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-sdsl: 4.1.4 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + regexpp: 3.2.0 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + /espree/9.4.0: resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5979,6 +6719,10 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast-safe-stringify/2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + dev: true + /fastq/1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: @@ -6013,7 +6757,7 @@ packages: /filelist/1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} dependencies: - minimatch: 5.1.0 + minimatch: 5.1.2 dev: true /fill-range/7.0.1: @@ -6086,7 +6830,7 @@ packages: vue-resize: 2.0.0-alpha.1_vue@3.2.45 dev: false - /follow-redirects/1.15.2: + /follow-redirects/1.15.2_debug@4.3.2: resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} engines: {node: '>=4.0'} peerDependencies: @@ -6094,6 +6838,8 @@ packages: peerDependenciesMeta: debug: optional: true + dependencies: + debug: 4.3.2 /foreground-child/2.0.0: resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} @@ -6146,6 +6892,15 @@ packages: resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} dev: true + /fs-extra/10.0.1: + resolution: {integrity: sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + /fs-extra/10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -6289,6 +7044,17 @@ packages: dependencies: is-glob: 4.0.3 + /glob/7.1.6: + resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + /glob/7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -6319,6 +7085,13 @@ packages: type-fest: 0.20.2 dev: true + /globals/13.20.0: + resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + /globby/11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -6482,6 +7255,10 @@ packages: - terser dev: true + /hookable/5.4.2: + resolution: {integrity: sha512-6rOvaUiNKy9lET1X0ECnyZ5O5kSV0PJbtA5yZUgdEF7fGJEVwSLSislltyt7nFwVVALYHQJtfGeAR2Y0A0uJkg==} + dev: true + /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -6657,6 +7434,26 @@ packages: engines: {node: '>=10'} dev: true + /inquirer/8.2.2: + resolution: {integrity: sha512-pG7I/si6K/0X7p1qU+rfWnpTE1UIkTONN1wxtzh0d+dHXtT/JG6qBgLxoyHVsQa8cFABxAPh0pD6uUUHiAoaow==} + engines: {node: '>=12.0.0'} + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.5.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + dev: true + /internal-slot/1.0.3: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} engines: {node: '>= 0.4'} @@ -6694,6 +7491,13 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-builtin-module/3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + /is-callable/1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -6750,6 +7554,11 @@ packages: is-path-inside: 3.0.3 dev: true + /is-interactive/1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + dev: true + /is-module/1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} dev: true @@ -6789,6 +7598,12 @@ packages: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} dev: true + /is-reference/1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + dependencies: + '@types/estree': 1.0.0 + dev: true + /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -6897,6 +7712,11 @@ packages: istanbul-lib-report: 3.0.0 dev: true + /iterare/1.2.1: + resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==} + engines: {node: '>=6'} + dev: true + /jake/10.8.5: resolution: {integrity: sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==} engines: {node: '>=10'} @@ -6912,7 +7732,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -6936,6 +7756,11 @@ packages: '@sideway/pinpoint': 2.0.0 dev: true + /joycon/3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + dev: true + /js-sdsl/4.1.4: resolution: {integrity: sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==} dev: true @@ -7094,6 +7919,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /kleur/3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + dev: true + /kleur/4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -7340,6 +8170,13 @@ packages: dependencies: sourcemap-codec: 1.4.8 + /magic-string/0.26.7: + resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==} + engines: {node: '>=12'} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + /make-dir/3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -7513,6 +8350,25 @@ packages: hasBin: true dev: true + /mkdist/0.3.13_typescript@4.9.5: + resolution: {integrity: sha512-+eCPpkr8l2X630y5PIlkts2tzYEsb+aGIgXdrQv9ZGtWE2bLlD6kVIFfI6FJwFpjjw4dPPyorxQc6Uhm/oXlvg==} + hasBin: true + peerDependencies: + typescript: '>=4.7.4' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + defu: 6.1.0 + esbuild: 0.14.54 + fs-extra: 10.1.0 + globby: 11.1.0 + jiti: 1.16.0 + mri: 1.2.0 + pathe: 0.2.0 + typescript: 4.9.5 + dev: true + /mlly/0.5.16: resolution: {integrity: sha512-LaJ8yuh4v0zEmge/g3c7jjFlhoCPfQn6RCjXgm9A0Qiuochq4BcuOxVfWmdnCoLTlg2MV+hqhOek+W2OhG0Lwg==} dependencies: @@ -7538,7 +8394,6 @@ packages: /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true /ms/2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -7548,6 +8403,10 @@ packages: resolution: {integrity: sha512-Tr1knR3d2mKvvWthlk7202rywKbiOm4rVFLsfAaSIhJ6dt9o47W4S+JMtWhd/PW9Wrdew2/S2fSvhz3E2gkfEg==} dev: true + /mute-stream/0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + dev: true + /namespace-emitter/2.0.1: resolution: {integrity: sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==} dev: false @@ -7563,6 +8422,10 @@ packages: hasBin: true dev: false + /natural-compare-lite/1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: true + /natural-compare/1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -7712,6 +8575,21 @@ packages: word-wrap: 1.2.3 dev: true + /ora/5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.7.0 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + dev: true + /orderedmap/2.1.0: resolution: {integrity: sha512-/pIFexOm6S70EPdznemIz3BQZoJ4VTFrhqzu0ACBqBgeLsLxq8e6Jim63ImIfwW/zAD1AlXpRMlOv3aghmo4dA==} dev: false @@ -7860,6 +8738,10 @@ packages: /path-parse/1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + /path-to-regexp/3.2.0: + resolution: {integrity: sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==} + dev: true + /path-type/4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -8064,6 +8946,12 @@ packages: hasBin: true dev: true + /prettier/2.8.4: + resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + /pretty-bytes/5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -8083,6 +8971,14 @@ packages: asap: 2.0.6 dev: true + /prompts/2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + dev: true + /prosemirror-commands/1.5.0: resolution: {integrity: sha512-zL0Fxbj3fh71GPNHn5YdYgYGX2aU2XLecZYk2ekEF0oOD259HcXtM+96VjPVi5o3h4sGUdDfEEhGiREXW6U+4A==} dependencies: @@ -8281,6 +9177,15 @@ packages: util-deprecate: 1.0.2 dev: true + /readable-stream/3.6.0: + resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + dev: true + /readdirp/3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -8295,6 +9200,10 @@ packages: strip-indent: 3.0.0 dev: true + /reflect-metadata/0.1.13: + resolution: {integrity: sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==} + dev: true + /regenerate-unicode-properties/10.1.0: resolution: {integrity: sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==} engines: {node: '>=4'} @@ -8435,6 +9344,38 @@ packages: glob: 7.2.3 dev: true + /rollup-plugin-dts/4.2.3_zptcx3kz3uwp66hzhyyt545weq: + resolution: {integrity: sha512-jlcpItqM2efqfIiKzDB/IKOS9E9fDvbkJSGw5GtK/PqPGS9eC3R3JKyw2VvpTktZA+TNgJRMu1NTv244aTUzzQ==} + engines: {node: '>=v12.22.12'} + peerDependencies: + rollup: ^2.55 + typescript: ^4.1 + dependencies: + magic-string: 0.26.7 + rollup: 2.79.1 + typescript: 4.9.5 + optionalDependencies: + '@babel/code-frame': 7.18.6 + dev: true + + /rollup-plugin-esbuild/4.10.3_gkkadhp4kuvg7lmep2ttfihjii: + resolution: {integrity: sha512-RILwUCgnCL5vo8vyZ/ZpwcqRuE5KmLizEv6BujBQfgXFZ6ggcS0FiYvQN+gsTJfWCMaU37l0Fosh4eEufyO97Q==} + engines: {node: '>=12'} + peerDependencies: + esbuild: '>=0.10.1' + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 4.2.1 + debug: 4.3.4 + es-module-lexer: 0.9.3 + esbuild: 0.14.54 + joycon: 3.1.1 + jsonc-parser: 3.2.0 + rollup: 2.79.1 + transitivePeerDependencies: + - supports-color + dev: true + /rollup-plugin-terser/7.0.2_rollup@2.79.1: resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser @@ -8468,11 +9409,29 @@ packages: resolution: {integrity: sha512-85aZYCxweiD5J8yTEbw+E6A27zSnLPNDL0WfPdw3YYodq7WjnTKo0q4dtyQ2gz23iPT8Q9CUyJtAaUNcTxRf5Q==} dev: false + /run-async/2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + dev: true + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 + /rxjs/6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + dependencies: + tslib: 1.14.1 + dev: true + + /rxjs/7.5.5: + resolution: {integrity: sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==} + dependencies: + tslib: 2.4.0 + dev: true + /rxjs/7.5.7: resolution: {integrity: sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==} dependencies: @@ -8523,6 +9482,14 @@ packages: xmlchars: 2.2.0 dev: true + /scule/0.2.1: + resolution: {integrity: sha512-M9gnWtn3J0W+UhJOHmBxBTwv8mZCan5i1Himp60t6vvZcor0wr+IM0URKmIglsWJ7bRujNAVVN77fp+uZaWoKg==} + dev: true + + /scule/0.3.2: + resolution: {integrity: sha512-zIvPdjOH8fv8CgrPT5eqtxHQXmPNnV/vHJYffZhE43KZkvULvpCTvOt1HPlFaCZx287INL9qaqrZg34e8NgI4g==} + dev: true + /section-matter/1.0.0: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} @@ -8629,6 +9596,10 @@ packages: totalist: 3.0.0 dev: true + /sisteransi/1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + dev: true + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -8714,6 +9685,10 @@ packages: /sourcemap-codec/1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + /spawn-command/0.0.2-1: + resolution: {integrity: sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==} + dev: true + /spawndamnit/2.0.0: resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} dependencies: @@ -9050,7 +10025,7 @@ packages: hasBin: true dependencies: '@jridgewell/source-map': 0.3.2 - acorn: 8.8.0 + acorn: 8.8.1 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -9102,6 +10077,11 @@ packages: engines: {node: '>=14.0.0'} dev: true + /tinypool/0.2.4: + resolution: {integrity: sha512-Vs3rhkUH6Qq1t5bqtb816oT+HeJTXfwt2cbPH17sWHIYKTotQIFPk3tf2fgqRrVyMDVOc1EnPgzIxfIulXVzwQ==} + engines: {node: '>=14.0.0'} + dev: true + /tinypool/0.3.0: resolution: {integrity: sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ==} engines: {node: '>=14.0.0'} @@ -9190,6 +10170,11 @@ packages: yargs: 17.5.1 dev: false + /tree-kill/1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + dev: true + /trim-newlines/3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} @@ -9206,6 +10191,14 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true + /tslib/2.0.3: + resolution: {integrity: sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==} + dev: true + + /tslib/2.3.1: + resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} + dev: true + /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} dev: true @@ -9220,6 +10213,16 @@ packages: typescript: 4.7.4 dev: true + /tsutils/3.21.0_typescript@4.9.5: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 4.9.5 + dev: true + /tty-table/4.1.6: resolution: {integrity: sha512-kRj5CBzOrakV4VRRY5kUWbNYvo/FpOsz65DzI5op9P+cHov3+IqPbo1JE1ZnQGkHdZgNFDsrEjrfqqy/Ply9fw==} engines: {node: '>=8.0.0'} @@ -9308,6 +10311,12 @@ packages: hasBin: true dev: true + /typescript/4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /uc.micro/1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true @@ -9325,6 +10334,41 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /unbuild/0.7.6: + resolution: {integrity: sha512-W6pFPS6/ewlEV5uWbNgfo0i2LbVBsue5GKlOkCo6ozIrInOBEgq4s3HCUB5eZSw6Ty2iwF8dKM65pZX7QGZJ0g==} + hasBin: true + dependencies: + '@rollup/plugin-alias': 3.1.9_rollup@2.79.1 + '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@rollup/plugin-replace': 4.0.0_rollup@2.79.1 + '@rollup/pluginutils': 4.2.1 + chalk: 5.2.0 + consola: 2.15.3 + defu: 6.1.0 + esbuild: 0.14.54 + hookable: 5.4.2 + jiti: 1.16.0 + magic-string: 0.26.7 + mkdirp: 1.0.4 + mkdist: 0.3.13_typescript@4.9.5 + mlly: 0.5.16 + mri: 1.2.0 + pathe: 0.3.8 + pkg-types: 0.3.5 + pretty-bytes: 6.0.0 + rimraf: 3.0.2 + rollup: 2.79.1 + rollup-plugin-dts: 4.2.3_zptcx3kz3uwp66hzhyyt545weq + rollup-plugin-esbuild: 4.10.3_gkkadhp4kuvg7lmep2ttfihjii + scule: 0.2.1 + typescript: 4.9.5 + untyped: 0.4.7 + transitivePeerDependencies: + - supports-color + dev: true + /unicode-canonical-property-names-ecmascript/2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -9446,6 +10490,17 @@ packages: engines: {node: '>=8'} dev: true + /untyped/0.4.7: + resolution: {integrity: sha512-hBgCv7fnqIRzAagn2cUZxxVmhTE7NcMAgI8CfQelFVacG4O55VrurigpK0G504ph4sQSqVsGEo52O5EKFCnJ9g==} + dependencies: + '@babel/core': 7.20.12 + '@babel/standalone': 7.20.15 + '@babel/types': 7.20.7 + scule: 0.3.2 + transitivePeerDependencies: + - supports-color + dev: true + /upath/1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} @@ -9687,14 +10742,14 @@ packages: optional: true dependencies: esbuild: 0.15.9 - postcss: 8.4.21 + postcss: 8.4.19 resolve: 1.22.1 rollup: 2.79.1 optionalDependencies: fsevents: 2.3.2 dev: true - /vite/3.2.4_ajklay5k626t46b6fyghkbup3i: + /vite/3.2.4_2de4heejjm3b4szd4i37mkxz7u: resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -9719,7 +10774,7 @@ packages: terser: optional: true dependencies: - '@types/node': 18.11.9 + '@types/node': 18.13.0 esbuild: 0.15.9 postcss: 8.4.19 resolve: 1.22.1 @@ -9729,6 +10784,40 @@ packages: fsevents: 2.3.2 dev: true + /vite/3.2.4_@types+node@18.13.0: + resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 18.13.0 + esbuild: 0.15.9 + postcss: 8.4.21 + resolve: 1.22.1 + rollup: 2.79.1 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /vite/4.0.4: resolution: {integrity: sha512-xevPU7M8FU0i/80DMR+YhgrzR5KS2ORy1B4xcX/cXLsvnUWvfHuqMmVU6N0YiJ4JWGRJJsLCgjEzKjG9/GKoSw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -9797,6 +10886,46 @@ packages: fsevents: 2.3.2 dev: true + /vitest/0.18.1: + resolution: {integrity: sha512-4F/1K/Vn4AvJwe7i2YblR02PT5vMKcw9KN4unDq2KD0YcSxX0B/6D6Qu9PJaXwVuxXMFTQ5ovd4+CQaW3bwofA==} + engines: {node: '>=v14.16.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/ui': '*' + c8: '*' + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/ui': + optional: true + c8: + optional: true + happy-dom: + optional: true + jsdom: + optional: true + dependencies: + '@types/chai': 4.3.3 + '@types/chai-subset': 1.3.3 + '@types/node': 18.13.0 + chai: 4.3.6 + debug: 4.3.4 + local-pkg: 0.4.2 + tinypool: 0.2.4 + tinyspy: 1.0.2 + vite: 3.2.4_@types+node@18.13.0 + transitivePeerDependencies: + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /vitest/0.25.3_wqgykbafw5ps5nhnqfbxcvabhu: resolution: {integrity: sha512-/UzHfXIKsELZhL7OaM2xFlRF8HRZgAHtPctacvNK8H4vOcbJJAMEgbWNGSAK7Y9b1NBe5SeM7VTuz2RsTHFJJA==} engines: {node: '>=v14.16.0'} @@ -9821,7 +10950,7 @@ packages: dependencies: '@types/chai': 4.3.3 '@types/chai-subset': 1.3.3 - '@types/node': 18.11.9 + '@types/node': 18.13.0 '@vitest/ui': 0.25.3 acorn: 8.8.0 acorn-walk: 8.2.0 @@ -9834,7 +10963,7 @@ packages: tinybench: 2.3.1 tinypool: 0.3.0 tinyspy: 1.0.2 - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_2de4heejjm3b4szd4i37mkxz7u transitivePeerDependencies: - less - sass