mirror of https://github.com/halo-dev/halo
feat: refine notifications-related ui (#4638)
#### What type of PR is this? /area console /kind feature /milestone 2.10.x #### What this PR does / why we need it: 完善通知功能相关的 UI 功能。 配置: ![image](https://github.com/halo-dev/halo/assets/21301288/ed9695c0-ed68-4558-bf7c-35209573ed23) 仪表盘消息组件: <img width="1663" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/dbabb92e-72e4-48be-bdb0-ce379e808368"> 独立的消息页面: <img width="1920" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/bfa6698e-e489-4baa-83e9-4ad3c3e6ef66"> #### Which issue(s) this PR fixes: Fixes # #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? ```release-note None ```pull/4678/head v2.10.0-alpha.1
parent
37ddccc612
commit
3edf8632d3
|
@ -16,6 +16,7 @@ module.exports = {
|
|||
rules: {
|
||||
"vue/multi-word-component-names": 0,
|
||||
"@typescript-eslint/ban-ts-comment": 0,
|
||||
"vue/no-v-html": 0,
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@ api/api-console-halo-run-v1alpha1-attachment-api.ts
|
|||
api/api-console-halo-run-v1alpha1-auth-provider-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-notifier-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
|
||||
|
@ -24,6 +25,9 @@ api/api-halo-run-v1alpha1-post-api.ts
|
|||
api/api-halo-run-v1alpha1-stats-api.ts
|
||||
api/api-halo-run-v1alpha1-tracker-api.ts
|
||||
api/api-halo-run-v1alpha1-user-api.ts
|
||||
api/api-notification-halo-run-v1alpha1-notification-api.ts
|
||||
api/api-notification-halo-run-v1alpha1-notifier-api.ts
|
||||
api/api-notification-halo-run-v1alpha1-subscription-api.ts
|
||||
api/api-plugin-halo-run-v1alpha1-plugin-api.ts
|
||||
api/api-security-halo-run-v1alpha1-personal-access-token-api.ts
|
||||
api/auth-halo-run-v1alpha1-auth-provider-api.ts
|
||||
|
@ -38,6 +42,12 @@ api/content-halo-run-v1alpha1-tag-api.ts
|
|||
api/login-api.ts
|
||||
api/metrics-halo-run-v1alpha1-counter-api.ts
|
||||
api/migration-halo-run-v1alpha1-backup-api.ts
|
||||
api/notification-halo-run-v1alpha1-notification-api.ts
|
||||
api/notification-halo-run-v1alpha1-notification-template-api.ts
|
||||
api/notification-halo-run-v1alpha1-notifier-descriptor-api.ts
|
||||
api/notification-halo-run-v1alpha1-reason-api.ts
|
||||
api/notification-halo-run-v1alpha1-reason-type-api.ts
|
||||
api/notification-halo-run-v1alpha1-subscription-api.ts
|
||||
api/plugin-halo-run-v1alpha1-extension-definition-api.ts
|
||||
api/plugin-halo-run-v1alpha1-extension-point-definition-api.ts
|
||||
api/plugin-halo-run-v1alpha1-plugin-api.ts
|
||||
|
@ -130,6 +140,8 @@ models/group-status.ts
|
|||
models/group.ts
|
||||
models/index.ts
|
||||
models/install-from-uri-request.ts
|
||||
models/interest-reason-subject.ts
|
||||
models/interest-reason.ts
|
||||
models/license.ts
|
||||
models/listed-auth-provider.ts
|
||||
models/listed-comment-list.ts
|
||||
|
@ -146,6 +158,7 @@ models/listed-single-page-vo.ts
|
|||
models/listed-single-page.ts
|
||||
models/listed-user.ts
|
||||
models/login-history.ts
|
||||
models/mark-specified-request.ts
|
||||
models/menu-item-list.ts
|
||||
models/menu-item-spec.ts
|
||||
models/menu-item-status.ts
|
||||
|
@ -157,6 +170,16 @@ models/menu-vo.ts
|
|||
models/menu.ts
|
||||
models/metadata.ts
|
||||
models/navigation-post-vo.ts
|
||||
models/notification-list.ts
|
||||
models/notification-spec.ts
|
||||
models/notification-template-list.ts
|
||||
models/notification-template-spec.ts
|
||||
models/notification-template.ts
|
||||
models/notification.ts
|
||||
models/notifier-descriptor-list.ts
|
||||
models/notifier-descriptor-spec.ts
|
||||
models/notifier-descriptor.ts
|
||||
models/notifier-setting-ref.ts
|
||||
models/owner-info.ts
|
||||
models/pat-spec.ts
|
||||
models/personal-access-token-list.ts
|
||||
|
@ -182,6 +205,16 @@ models/post-status.ts
|
|||
models/post-vo.ts
|
||||
models/post.ts
|
||||
models/public-key-response.ts
|
||||
models/reason-list.ts
|
||||
models/reason-property.ts
|
||||
models/reason-selector.ts
|
||||
models/reason-spec-attributes.ts
|
||||
models/reason-spec.ts
|
||||
models/reason-subject.ts
|
||||
models/reason-type-list.ts
|
||||
models/reason-type-spec.ts
|
||||
models/reason-type.ts
|
||||
models/reason.ts
|
||||
models/ref.ts
|
||||
models/reply-list.ts
|
||||
models/reply-request.ts
|
||||
|
@ -221,6 +254,10 @@ models/snapshot.ts
|
|||
models/stats-vo.ts
|
||||
models/stats.ts
|
||||
models/subject.ts
|
||||
models/subscription-list.ts
|
||||
models/subscription-spec.ts
|
||||
models/subscription-subscriber.ts
|
||||
models/subscription.ts
|
||||
models/system-initialization-request.ts
|
||||
models/tag-list.ts
|
||||
models/tag-spec.ts
|
||||
|
@ -228,6 +265,7 @@ models/tag-status.ts
|
|||
models/tag-vo-list.ts
|
||||
models/tag-vo.ts
|
||||
models/tag.ts
|
||||
models/template-content.ts
|
||||
models/template-descriptor.ts
|
||||
models/theme-list.ts
|
||||
models/theme-spec.ts
|
||||
|
|
|
@ -16,6 +16,7 @@ export * from "./api/api-console-halo-run-v1alpha1-attachment-api";
|
|||
export * from "./api/api-console-halo-run-v1alpha1-auth-provider-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-notifier-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";
|
||||
|
@ -35,6 +36,9 @@ export * from "./api/api-halo-run-v1alpha1-post-api";
|
|||
export * from "./api/api-halo-run-v1alpha1-stats-api";
|
||||
export * from "./api/api-halo-run-v1alpha1-tracker-api";
|
||||
export * from "./api/api-halo-run-v1alpha1-user-api";
|
||||
export * from "./api/api-notification-halo-run-v1alpha1-notification-api";
|
||||
export * from "./api/api-notification-halo-run-v1alpha1-notifier-api";
|
||||
export * from "./api/api-notification-halo-run-v1alpha1-subscription-api";
|
||||
export * from "./api/api-plugin-halo-run-v1alpha1-plugin-api";
|
||||
export * from "./api/api-security-halo-run-v1alpha1-personal-access-token-api";
|
||||
export * from "./api/auth-halo-run-v1alpha1-auth-provider-api";
|
||||
|
@ -49,6 +53,12 @@ export * from "./api/content-halo-run-v1alpha1-tag-api";
|
|||
export * from "./api/login-api";
|
||||
export * from "./api/metrics-halo-run-v1alpha1-counter-api";
|
||||
export * from "./api/migration-halo-run-v1alpha1-backup-api";
|
||||
export * from "./api/notification-halo-run-v1alpha1-notification-api";
|
||||
export * from "./api/notification-halo-run-v1alpha1-notification-template-api";
|
||||
export * from "./api/notification-halo-run-v1alpha1-notifier-descriptor-api";
|
||||
export * from "./api/notification-halo-run-v1alpha1-reason-api";
|
||||
export * from "./api/notification-halo-run-v1alpha1-reason-type-api";
|
||||
export * from "./api/notification-halo-run-v1alpha1-subscription-api";
|
||||
export * from "./api/plugin-halo-run-v1alpha1-extension-definition-api";
|
||||
export * from "./api/plugin-halo-run-v1alpha1-extension-point-definition-api";
|
||||
export * from "./api/plugin-halo-run-v1alpha1-plugin-api";
|
||||
|
|
|
@ -0,0 +1,662 @@
|
|||
/* 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 { MarkSpecifiedRequest } from "../models";
|
||||
// @ts-ignore
|
||||
import { Notification } from "../models";
|
||||
// @ts-ignore
|
||||
import { NotificationList } from "../models";
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotificationApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const ApiConsoleHaloRunV1alpha1NotificationApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {string} username Username
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {string} [keyword]
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {string} [reason] Filter by notification reason
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp
|
||||
* @param {boolean} [unRead] true for unread, false for read, null for all
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listUserNotifications: async (
|
||||
username: string,
|
||||
fieldSelector?: Array<string>,
|
||||
keyword?: string,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
reason?: string,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
unRead?: boolean,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists("listUserNotifications", "username", username);
|
||||
const localVarPath =
|
||||
`/apis/api.console.halo.run/v1alpha1/userspaces/{username}/notifications`.replace(
|
||||
`{${"username"}}`,
|
||||
encodeURIComponent(String(username))
|
||||
);
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (keyword !== undefined) {
|
||||
localVarQueryParameter["keyword"] = keyword;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (reason !== undefined) {
|
||||
localVarQueryParameter["reason"] = reason;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
if (unRead !== undefined) {
|
||||
localVarQueryParameter["unRead"] = unRead;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {string} username Username
|
||||
* @param {string} name Notification name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationAsRead: async (
|
||||
username: string,
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists("markNotificationAsRead", "username", username);
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists("markNotificationAsRead", "name", name);
|
||||
const localVarPath =
|
||||
`/apis/api.console.halo.run/v1alpha1/userspaces/{username}/notifications/{name}/mark-as-read`
|
||||
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
||||
.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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {string} username Username
|
||||
* @param {MarkSpecifiedRequest} markSpecifiedRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationsAsRead: async (
|
||||
username: string,
|
||||
markSpecifiedRequest: MarkSpecifiedRequest,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists("markNotificationsAsRead", "username", username);
|
||||
// verify required parameter 'markSpecifiedRequest' is not null or undefined
|
||||
assertParamExists(
|
||||
"markNotificationsAsRead",
|
||||
"markSpecifiedRequest",
|
||||
markSpecifiedRequest
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/api.console.halo.run/v1alpha1/userspaces/{username}/notifications/-/mark-specified-as-read`.replace(
|
||||
`{${"username"}}`,
|
||||
encodeURIComponent(String(username))
|
||||
);
|
||||
// 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(
|
||||
markSpecifiedRequest,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotificationApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiConsoleHaloRunV1alpha1NotificationApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
ApiConsoleHaloRunV1alpha1NotificationApiAxiosParamCreator(configuration);
|
||||
return {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {string} username Username
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {string} [keyword]
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {string} [reason] Filter by notification reason
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp
|
||||
* @param {boolean} [unRead] true for unread, false for read, null for all
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listUserNotifications(
|
||||
username: string,
|
||||
fieldSelector?: Array<string>,
|
||||
keyword?: string,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
reason?: string,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
unRead?: boolean,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotificationList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listUserNotifications(
|
||||
username,
|
||||
fieldSelector,
|
||||
keyword,
|
||||
labelSelector,
|
||||
page,
|
||||
reason,
|
||||
size,
|
||||
sort,
|
||||
unRead,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {string} username Username
|
||||
* @param {string} name Notification name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async markNotificationAsRead(
|
||||
username: string,
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.markNotificationAsRead(
|
||||
username,
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {string} username Username
|
||||
* @param {MarkSpecifiedRequest} markSpecifiedRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async markNotificationsAsRead(
|
||||
username: string,
|
||||
markSpecifiedRequest: MarkSpecifiedRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.markNotificationsAsRead(
|
||||
username,
|
||||
markSpecifiedRequest,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotificationApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiConsoleHaloRunV1alpha1NotificationApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp = ApiConsoleHaloRunV1alpha1NotificationApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotificationApiListUserNotificationsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listUserNotifications(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotificationApiListUserNotificationsRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotificationList> {
|
||||
return localVarFp
|
||||
.listUserNotifications(
|
||||
requestParameters.username,
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.keyword,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.reason,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
requestParameters.unRead,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationAsRead(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Notification> {
|
||||
return localVarFp
|
||||
.markNotificationAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationsAsRead(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Array<string>> {
|
||||
return localVarFp
|
||||
.markNotificationsAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.markSpecifiedRequest,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for listUserNotifications operation in ApiConsoleHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface ApiConsoleHaloRunV1alpha1NotificationApiListUserNotificationsRequest
|
||||
*/
|
||||
export interface ApiConsoleHaloRunV1alpha1NotificationApiListUserNotificationsRequest {
|
||||
/**
|
||||
* Username
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly username: string;
|
||||
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly keyword?: string;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Filter by notification reason
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly reason?: string;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Supported fields: creationTimestamp
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
|
||||
/**
|
||||
* true for unread, false for read, null for all
|
||||
* @type {boolean}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly unRead?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for markNotificationAsRead operation in ApiConsoleHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest
|
||||
*/
|
||||
export interface ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest {
|
||||
/**
|
||||
* Username
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsRead
|
||||
*/
|
||||
readonly username: string;
|
||||
|
||||
/**
|
||||
* Notification name
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsRead
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for markNotificationsAsRead operation in ApiConsoleHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest
|
||||
*/
|
||||
export interface ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest {
|
||||
/**
|
||||
* Username
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsRead
|
||||
*/
|
||||
readonly username: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {MarkSpecifiedRequest}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsRead
|
||||
*/
|
||||
readonly markSpecifiedRequest: MarkSpecifiedRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotificationApi - object-oriented interface
|
||||
* @export
|
||||
* @class ApiConsoleHaloRunV1alpha1NotificationApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class ApiConsoleHaloRunV1alpha1NotificationApi extends BaseAPI {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotificationApiListUserNotificationsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public listUserNotifications(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotificationApiListUserNotificationsRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiConsoleHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.listUserNotifications(
|
||||
requestParameters.username,
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.keyword,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.reason,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
requestParameters.unRead,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public markNotificationAsRead(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiConsoleHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.markNotificationAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public markNotificationsAsRead(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiConsoleHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.markNotificationsAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.markSpecifiedRequest,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,346 @@
|
|||
/* 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";
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotifierApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const ApiConsoleHaloRunV1alpha1NotifierApiAxiosParamCreator = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
return {
|
||||
/**
|
||||
* Fetch sender config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fetchSenderConfig: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists("fetchSenderConfig", "name", name);
|
||||
const localVarPath =
|
||||
`/apis/api.console.halo.run/v1alpha1/notifiers/{name}/sender-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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Save sender config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {object} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
saveSenderConfig: async (
|
||||
name: string,
|
||||
body: object,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists("saveSenderConfig", "name", name);
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists("saveSenderConfig", "body", body);
|
||||
const localVarPath =
|
||||
`/apis/api.console.halo.run/v1alpha1/notifiers/{name}/sender-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: "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(
|
||||
body,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotifierApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiConsoleHaloRunV1alpha1NotifierApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
ApiConsoleHaloRunV1alpha1NotifierApiAxiosParamCreator(configuration);
|
||||
return {
|
||||
/**
|
||||
* Fetch sender config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async fetchSenderConfig(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.fetchSenderConfig(name, options);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Save sender config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {object} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async saveSenderConfig(
|
||||
name: string,
|
||||
body: object,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.saveSenderConfig(name, body, options);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotifierApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiConsoleHaloRunV1alpha1NotifierApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp = ApiConsoleHaloRunV1alpha1NotifierApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Fetch sender config of notifier
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotifierApiFetchSenderConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fetchSenderConfig(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotifierApiFetchSenderConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<object> {
|
||||
return localVarFp
|
||||
.fetchSenderConfig(requestParameters.name, options)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Save sender config of notifier
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
saveSenderConfig(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.saveSenderConfig(
|
||||
requestParameters.name,
|
||||
requestParameters.body,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for fetchSenderConfig operation in ApiConsoleHaloRunV1alpha1NotifierApi.
|
||||
* @export
|
||||
* @interface ApiConsoleHaloRunV1alpha1NotifierApiFetchSenderConfigRequest
|
||||
*/
|
||||
export interface ApiConsoleHaloRunV1alpha1NotifierApiFetchSenderConfigRequest {
|
||||
/**
|
||||
* Notifier name
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotifierApiFetchSenderConfig
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for saveSenderConfig operation in ApiConsoleHaloRunV1alpha1NotifierApi.
|
||||
* @export
|
||||
* @interface ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfigRequest
|
||||
*/
|
||||
export interface ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfigRequest {
|
||||
/**
|
||||
* Notifier name
|
||||
* @type {string}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfig
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfig
|
||||
*/
|
||||
readonly body: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* ApiConsoleHaloRunV1alpha1NotifierApi - object-oriented interface
|
||||
* @export
|
||||
* @class ApiConsoleHaloRunV1alpha1NotifierApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class ApiConsoleHaloRunV1alpha1NotifierApi extends BaseAPI {
|
||||
/**
|
||||
* Fetch sender config of notifier
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotifierApiFetchSenderConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotifierApi
|
||||
*/
|
||||
public fetchSenderConfig(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotifierApiFetchSenderConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiConsoleHaloRunV1alpha1NotifierApiFp(this.configuration)
|
||||
.fetchSenderConfig(requestParameters.name, options)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Save sender config of notifier
|
||||
* @param {ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiConsoleHaloRunV1alpha1NotifierApi
|
||||
*/
|
||||
public saveSenderConfig(
|
||||
requestParameters: ApiConsoleHaloRunV1alpha1NotifierApiSaveSenderConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiConsoleHaloRunV1alpha1NotifierApiFp(this.configuration)
|
||||
.saveSenderConfig(requestParameters.name, requestParameters.body, options)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,665 @@
|
|||
/* 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 { MarkSpecifiedRequest } from "../models";
|
||||
// @ts-ignore
|
||||
import { Notification } from "../models";
|
||||
// @ts-ignore
|
||||
import { NotificationList } from "../models";
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotificationApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1NotificationApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {string} username Username
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {string} [keyword]
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {string} [reason] Filter by notification reason
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp
|
||||
* @param {boolean} [unRead] true for unread, false for read, null for all
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listUserNotifications: async (
|
||||
username: string,
|
||||
fieldSelector?: Array<string>,
|
||||
keyword?: string,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
reason?: string,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
unRead?: boolean,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists("listUserNotifications", "username", username);
|
||||
const localVarPath =
|
||||
`/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notifications`.replace(
|
||||
`{${"username"}}`,
|
||||
encodeURIComponent(String(username))
|
||||
);
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (keyword !== undefined) {
|
||||
localVarQueryParameter["keyword"] = keyword;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (reason !== undefined) {
|
||||
localVarQueryParameter["reason"] = reason;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
if (unRead !== undefined) {
|
||||
localVarQueryParameter["unRead"] = unRead;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {string} username Username
|
||||
* @param {string} name Notification name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationAsRead: async (
|
||||
username: string,
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists("markNotificationAsRead", "username", username);
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists("markNotificationAsRead", "name", name);
|
||||
const localVarPath =
|
||||
`/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notifications/{name}/mark-as-read`
|
||||
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
||||
.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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {string} username Username
|
||||
* @param {MarkSpecifiedRequest} markSpecifiedRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationsAsRead: async (
|
||||
username: string,
|
||||
markSpecifiedRequest: MarkSpecifiedRequest,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists("markNotificationsAsRead", "username", username);
|
||||
// verify required parameter 'markSpecifiedRequest' is not null or undefined
|
||||
assertParamExists(
|
||||
"markNotificationsAsRead",
|
||||
"markSpecifiedRequest",
|
||||
markSpecifiedRequest
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notifications/-/mark-specified-as-read`.replace(
|
||||
`{${"username"}}`,
|
||||
encodeURIComponent(String(username))
|
||||
);
|
||||
// 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(
|
||||
markSpecifiedRequest,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotificationApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1NotificationApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
ApiNotificationHaloRunV1alpha1NotificationApiAxiosParamCreator(
|
||||
configuration
|
||||
);
|
||||
return {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {string} username Username
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {string} [keyword]
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {string} [reason] Filter by notification reason
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Supported fields: creationTimestamp
|
||||
* @param {boolean} [unRead] true for unread, false for read, null for all
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listUserNotifications(
|
||||
username: string,
|
||||
fieldSelector?: Array<string>,
|
||||
keyword?: string,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
reason?: string,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
unRead?: boolean,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotificationList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listUserNotifications(
|
||||
username,
|
||||
fieldSelector,
|
||||
keyword,
|
||||
labelSelector,
|
||||
page,
|
||||
reason,
|
||||
size,
|
||||
sort,
|
||||
unRead,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {string} username Username
|
||||
* @param {string} name Notification name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async markNotificationAsRead(
|
||||
username: string,
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.markNotificationAsRead(
|
||||
username,
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {string} username Username
|
||||
* @param {MarkSpecifiedRequest} markSpecifiedRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async markNotificationsAsRead(
|
||||
username: string,
|
||||
markSpecifiedRequest: MarkSpecifiedRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<string>>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.markNotificationsAsRead(
|
||||
username,
|
||||
markSpecifiedRequest,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotificationApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1NotificationApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp =
|
||||
ApiNotificationHaloRunV1alpha1NotificationApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotificationApiListUserNotificationsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listUserNotifications(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotificationApiListUserNotificationsRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotificationList> {
|
||||
return localVarFp
|
||||
.listUserNotifications(
|
||||
requestParameters.username,
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.keyword,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.reason,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
requestParameters.unRead,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationAsRead(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Notification> {
|
||||
return localVarFp
|
||||
.markNotificationAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
markNotificationsAsRead(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Array<string>> {
|
||||
return localVarFp
|
||||
.markNotificationsAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.markSpecifiedRequest,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for listUserNotifications operation in ApiNotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface ApiNotificationHaloRunV1alpha1NotificationApiListUserNotificationsRequest
|
||||
*/
|
||||
export interface ApiNotificationHaloRunV1alpha1NotificationApiListUserNotificationsRequest {
|
||||
/**
|
||||
* Username
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly username: string;
|
||||
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly keyword?: string;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Filter by notification reason
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly reason?: string;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Supported fields: creationTimestamp
|
||||
* @type {Array<string>}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
|
||||
/**
|
||||
* true for unread, false for read, null for all
|
||||
* @type {boolean}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiListUserNotifications
|
||||
*/
|
||||
readonly unRead?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for markNotificationAsRead operation in ApiNotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest
|
||||
*/
|
||||
export interface ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest {
|
||||
/**
|
||||
* Username
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsRead
|
||||
*/
|
||||
readonly username: string;
|
||||
|
||||
/**
|
||||
* Notification name
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsRead
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for markNotificationsAsRead operation in ApiNotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest
|
||||
*/
|
||||
export interface ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest {
|
||||
/**
|
||||
* Username
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsRead
|
||||
*/
|
||||
readonly username: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {MarkSpecifiedRequest}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsRead
|
||||
*/
|
||||
readonly markSpecifiedRequest: MarkSpecifiedRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotificationApi - object-oriented interface
|
||||
* @export
|
||||
* @class ApiNotificationHaloRunV1alpha1NotificationApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class ApiNotificationHaloRunV1alpha1NotificationApi extends BaseAPI {
|
||||
/**
|
||||
* List notifications for the authenticated user.
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotificationApiListUserNotificationsRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public listUserNotifications(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotificationApiListUserNotificationsRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiNotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.listUserNotifications(
|
||||
requestParameters.username,
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.keyword,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.reason,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
requestParameters.unRead,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the specified notification as read.
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public markNotificationAsRead(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiNotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.markNotificationAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the specified notifications as read.
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public markNotificationsAsRead(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotificationApiMarkNotificationsAsReadRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiNotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.markNotificationsAsRead(
|
||||
requestParameters.username,
|
||||
requestParameters.markSpecifiedRequest,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,349 @@
|
|||
/* 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";
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotifierApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1NotifierApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Fetch receiver config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fetchReceiverConfig: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists("fetchReceiverConfig", "name", name);
|
||||
const localVarPath =
|
||||
`/apis/api.notification.halo.run/v1alpha1/notifiers/{name}/receiver-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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Save receiver config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {object} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
saveReceiverConfig: async (
|
||||
name: string,
|
||||
body: object,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists("saveReceiverConfig", "name", name);
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists("saveReceiverConfig", "body", body);
|
||||
const localVarPath =
|
||||
`/apis/api.notification.halo.run/v1alpha1/notifiers/{name}/receiver-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: "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(
|
||||
body,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotifierApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1NotifierApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
ApiNotificationHaloRunV1alpha1NotifierApiAxiosParamCreator(configuration);
|
||||
return {
|
||||
/**
|
||||
* Fetch receiver config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async fetchReceiverConfig(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.fetchReceiverConfig(name, options);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Save receiver config of notifier
|
||||
* @param {string} name Notifier name
|
||||
* @param {object} body
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async saveReceiverConfig(
|
||||
name: string,
|
||||
body: object,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.saveReceiverConfig(name, body, options);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotifierApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1NotifierApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp = ApiNotificationHaloRunV1alpha1NotifierApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Fetch receiver config of notifier
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotifierApiFetchReceiverConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
fetchReceiverConfig(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotifierApiFetchReceiverConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<object> {
|
||||
return localVarFp
|
||||
.fetchReceiverConfig(requestParameters.name, options)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Save receiver config of notifier
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
saveReceiverConfig(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.saveReceiverConfig(
|
||||
requestParameters.name,
|
||||
requestParameters.body,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for fetchReceiverConfig operation in ApiNotificationHaloRunV1alpha1NotifierApi.
|
||||
* @export
|
||||
* @interface ApiNotificationHaloRunV1alpha1NotifierApiFetchReceiverConfigRequest
|
||||
*/
|
||||
export interface ApiNotificationHaloRunV1alpha1NotifierApiFetchReceiverConfigRequest {
|
||||
/**
|
||||
* Notifier name
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotifierApiFetchReceiverConfig
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for saveReceiverConfig operation in ApiNotificationHaloRunV1alpha1NotifierApi.
|
||||
* @export
|
||||
* @interface ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfigRequest
|
||||
*/
|
||||
export interface ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfigRequest {
|
||||
/**
|
||||
* Notifier name
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfig
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfig
|
||||
*/
|
||||
readonly body: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1NotifierApi - object-oriented interface
|
||||
* @export
|
||||
* @class ApiNotificationHaloRunV1alpha1NotifierApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class ApiNotificationHaloRunV1alpha1NotifierApi extends BaseAPI {
|
||||
/**
|
||||
* Fetch receiver config of notifier
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotifierApiFetchReceiverConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotifierApi
|
||||
*/
|
||||
public fetchReceiverConfig(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotifierApiFetchReceiverConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiNotificationHaloRunV1alpha1NotifierApiFp(this.configuration)
|
||||
.fetchReceiverConfig(requestParameters.name, options)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Save receiver config of notifier
|
||||
* @param {ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfigRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1NotifierApi
|
||||
*/
|
||||
public saveReceiverConfig(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1NotifierApiSaveReceiverConfigRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiNotificationHaloRunV1alpha1NotifierApiFp(this.configuration)
|
||||
.saveReceiverConfig(
|
||||
requestParameters.name,
|
||||
requestParameters.body,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
/* 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";
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1SubscriptionApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1SubscriptionApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Unsubscribe a subscription
|
||||
* @param {string} token Unsubscribe token
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
unsubscribe: async (
|
||||
token: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'token' is not null or undefined
|
||||
assertParamExists("unsubscribe", "token", token);
|
||||
const localVarPath = `/apis/api.notification.halo.run/v1alpha1/subscriptions/{name}/unsubscribe`;
|
||||
// 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 (token !== undefined) {
|
||||
localVarQueryParameter["token"] = token;
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1SubscriptionApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1SubscriptionApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
ApiNotificationHaloRunV1alpha1SubscriptionApiAxiosParamCreator(
|
||||
configuration
|
||||
);
|
||||
return {
|
||||
/**
|
||||
* Unsubscribe a subscription
|
||||
* @param {string} token Unsubscribe token
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async unsubscribe(
|
||||
token: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>
|
||||
> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.unsubscribe(
|
||||
token,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1SubscriptionApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const ApiNotificationHaloRunV1alpha1SubscriptionApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp =
|
||||
ApiNotificationHaloRunV1alpha1SubscriptionApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Unsubscribe a subscription
|
||||
* @param {ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
unsubscribe(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<string> {
|
||||
return localVarFp
|
||||
.unsubscribe(requestParameters.token, options)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for unsubscribe operation in ApiNotificationHaloRunV1alpha1SubscriptionApi.
|
||||
* @export
|
||||
* @interface ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest
|
||||
*/
|
||||
export interface ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest {
|
||||
/**
|
||||
* Unsubscribe token
|
||||
* @type {string}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribe
|
||||
*/
|
||||
readonly token: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* ApiNotificationHaloRunV1alpha1SubscriptionApi - object-oriented interface
|
||||
* @export
|
||||
* @class ApiNotificationHaloRunV1alpha1SubscriptionApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class ApiNotificationHaloRunV1alpha1SubscriptionApi extends BaseAPI {
|
||||
/**
|
||||
* Unsubscribe a subscription
|
||||
* @param {ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiNotificationHaloRunV1alpha1SubscriptionApi
|
||||
*/
|
||||
public unsubscribe(
|
||||
requestParameters: ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return ApiNotificationHaloRunV1alpha1SubscriptionApiFp(this.configuration)
|
||||
.unsubscribe(requestParameters.token, options)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,835 @@
|
|||
/* 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 { Notification } from "../models";
|
||||
// @ts-ignore
|
||||
import { NotificationList } from "../models";
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotificationApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Notification
|
||||
* @param {Notification} [notification] Fresh notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1Notification: async (
|
||||
notification?: Notification,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/notifications`;
|
||||
// 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(
|
||||
notification,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Notification
|
||||
* @param {string} name Name of notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1Notification: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"deletenotificationHaloRunV1alpha1Notification",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notifications/{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 notification.halo.run/v1alpha1/Notification
|
||||
* @param {string} name Name of notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1Notification: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"getnotificationHaloRunV1alpha1Notification",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notifications/{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 notification.halo.run/v1alpha1/Notification
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1Notification: async (
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/notifications`;
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Notification
|
||||
* @param {string} name Name of notification
|
||||
* @param {Notification} [notification] Updated notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1Notification: async (
|
||||
name: string,
|
||||
notification?: Notification,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"updatenotificationHaloRunV1alpha1Notification",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notifications/{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(
|
||||
notification,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotificationApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
NotificationHaloRunV1alpha1NotificationApiAxiosParamCreator(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Notification
|
||||
* @param {Notification} [notification] Fresh notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createnotificationHaloRunV1alpha1Notification(
|
||||
notification?: Notification,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.createnotificationHaloRunV1alpha1Notification(
|
||||
notification,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Notification
|
||||
* @param {string} name Name of notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletenotificationHaloRunV1alpha1Notification(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.deletenotificationHaloRunV1alpha1Notification(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Notification
|
||||
* @param {string} name Name of notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getnotificationHaloRunV1alpha1Notification(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.getnotificationHaloRunV1alpha1Notification(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Notification
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listnotificationHaloRunV1alpha1Notification(
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotificationList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listnotificationHaloRunV1alpha1Notification(
|
||||
fieldSelector,
|
||||
labelSelector,
|
||||
page,
|
||||
size,
|
||||
sort,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Notification
|
||||
* @param {string} name Name of notification
|
||||
* @param {Notification} [notification] Updated notification
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatenotificationHaloRunV1alpha1Notification(
|
||||
name: string,
|
||||
notification?: Notification,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.updatenotificationHaloRunV1alpha1Notification(
|
||||
name,
|
||||
notification,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotificationApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp =
|
||||
NotificationHaloRunV1alpha1NotificationApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiCreatenotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiCreatenotificationHaloRunV1alpha1NotificationRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Notification> {
|
||||
return localVarFp
|
||||
.createnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.notification,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiDeletenotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiDeletenotificationHaloRunV1alpha1NotificationRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.deletenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiGetnotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiGetnotificationHaloRunV1alpha1NotificationRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Notification> {
|
||||
return localVarFp
|
||||
.getnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1NotificationRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotificationList> {
|
||||
return localVarFp
|
||||
.listnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1NotificationRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Notification> {
|
||||
return localVarFp
|
||||
.updatenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.name,
|
||||
requestParameters.notification,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createnotificationHaloRunV1alpha1Notification operation in NotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationApiCreatenotificationHaloRunV1alpha1NotificationRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationApiCreatenotificationHaloRunV1alpha1NotificationRequest {
|
||||
/**
|
||||
* Fresh notification
|
||||
* @type {Notification}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiCreatenotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly notification?: Notification;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deletenotificationHaloRunV1alpha1Notification operation in NotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationApiDeletenotificationHaloRunV1alpha1NotificationRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationApiDeletenotificationHaloRunV1alpha1NotificationRequest {
|
||||
/**
|
||||
* Name of notification
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiDeletenotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getnotificationHaloRunV1alpha1Notification operation in NotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationApiGetnotificationHaloRunV1alpha1NotificationRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationApiGetnotificationHaloRunV1alpha1NotificationRequest {
|
||||
/**
|
||||
* Name of notification
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiGetnotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listnotificationHaloRunV1alpha1Notification operation in NotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1NotificationRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1NotificationRequest {
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updatenotificationHaloRunV1alpha1Notification operation in NotificationHaloRunV1alpha1NotificationApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1NotificationRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1NotificationRequest {
|
||||
/**
|
||||
* Name of notification
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* Updated notification
|
||||
* @type {Notification}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1Notification
|
||||
*/
|
||||
readonly notification?: Notification;
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationApi - object-oriented interface
|
||||
* @export
|
||||
* @class NotificationHaloRunV1alpha1NotificationApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class NotificationHaloRunV1alpha1NotificationApi extends BaseAPI {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiCreatenotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public createnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiCreatenotificationHaloRunV1alpha1NotificationRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.createnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.notification,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiDeletenotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public deletenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiDeletenotificationHaloRunV1alpha1NotificationRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.deletenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiGetnotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public getnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiGetnotificationHaloRunV1alpha1NotificationRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.getnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public listnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiListnotificationHaloRunV1alpha1NotificationRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.listnotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Notification
|
||||
* @param {NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1NotificationRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationApi
|
||||
*/
|
||||
public updatenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationApiUpdatenotificationHaloRunV1alpha1NotificationRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationApiFp(this.configuration)
|
||||
.updatenotificationHaloRunV1alpha1Notification(
|
||||
requestParameters.name,
|
||||
requestParameters.notification,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,857 @@
|
|||
/* 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 { NotificationTemplate } from "../models";
|
||||
// @ts-ignore
|
||||
import { NotificationTemplateList } from "../models";
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationTemplateApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotificationTemplateApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationTemplate} [notificationTemplate] Fresh notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1NotificationTemplate: async (
|
||||
notificationTemplate?: NotificationTemplate,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/notificationtemplates`;
|
||||
// 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(
|
||||
notificationTemplate,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {string} name Name of notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1NotificationTemplate: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"deletenotificationHaloRunV1alpha1NotificationTemplate",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notificationtemplates/{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 notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {string} name Name of notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1NotificationTemplate: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"getnotificationHaloRunV1alpha1NotificationTemplate",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notificationtemplates/{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 notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1NotificationTemplate: async (
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/notificationtemplates`;
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {string} name Name of notificationtemplate
|
||||
* @param {NotificationTemplate} [notificationTemplate] Updated notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1NotificationTemplate: async (
|
||||
name: string,
|
||||
notificationTemplate?: NotificationTemplate,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"updatenotificationHaloRunV1alpha1NotificationTemplate",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notificationtemplates/{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(
|
||||
notificationTemplate,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationTemplateApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotificationTemplateApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
NotificationHaloRunV1alpha1NotificationTemplateApiAxiosParamCreator(
|
||||
configuration
|
||||
);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationTemplate} [notificationTemplate] Fresh notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
notificationTemplate?: NotificationTemplate,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotificationTemplate>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.createnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
notificationTemplate,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {string} name Name of notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.deletenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {string} name Name of notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotificationTemplate>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.getnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotificationTemplateList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
fieldSelector,
|
||||
labelSelector,
|
||||
page,
|
||||
size,
|
||||
sort,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {string} name Name of notificationtemplate
|
||||
* @param {NotificationTemplate} [notificationTemplate] Updated notificationtemplate
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
name: string,
|
||||
notificationTemplate?: NotificationTemplate,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotificationTemplate>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.updatenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
name,
|
||||
notificationTemplate,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationTemplateApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotificationTemplateApiFactory =
|
||||
function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp =
|
||||
NotificationHaloRunV1alpha1NotificationTemplateApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiCreatenotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiCreatenotificationHaloRunV1alpha1NotificationTemplateRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotificationTemplate> {
|
||||
return localVarFp
|
||||
.createnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.notificationTemplate,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiDeletenotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiDeletenotificationHaloRunV1alpha1NotificationTemplateRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.deletenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiGetnotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiGetnotificationHaloRunV1alpha1NotificationTemplateRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotificationTemplate> {
|
||||
return localVarFp
|
||||
.getnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplateRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotificationTemplateList> {
|
||||
return localVarFp
|
||||
.listnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplateRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotificationTemplate> {
|
||||
return localVarFp
|
||||
.updatenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.name,
|
||||
requestParameters.notificationTemplate,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createnotificationHaloRunV1alpha1NotificationTemplate operation in NotificationHaloRunV1alpha1NotificationTemplateApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationTemplateApiCreatenotificationHaloRunV1alpha1NotificationTemplateRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationTemplateApiCreatenotificationHaloRunV1alpha1NotificationTemplateRequest {
|
||||
/**
|
||||
* Fresh notificationtemplate
|
||||
* @type {NotificationTemplate}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiCreatenotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly notificationTemplate?: NotificationTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deletenotificationHaloRunV1alpha1NotificationTemplate operation in NotificationHaloRunV1alpha1NotificationTemplateApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationTemplateApiDeletenotificationHaloRunV1alpha1NotificationTemplateRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationTemplateApiDeletenotificationHaloRunV1alpha1NotificationTemplateRequest {
|
||||
/**
|
||||
* Name of notificationtemplate
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiDeletenotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getnotificationHaloRunV1alpha1NotificationTemplate operation in NotificationHaloRunV1alpha1NotificationTemplateApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationTemplateApiGetnotificationHaloRunV1alpha1NotificationTemplateRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationTemplateApiGetnotificationHaloRunV1alpha1NotificationTemplateRequest {
|
||||
/**
|
||||
* Name of notificationtemplate
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiGetnotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listnotificationHaloRunV1alpha1NotificationTemplate operation in NotificationHaloRunV1alpha1NotificationTemplateApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplateRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplateRequest {
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updatenotificationHaloRunV1alpha1NotificationTemplate operation in NotificationHaloRunV1alpha1NotificationTemplateApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplateRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplateRequest {
|
||||
/**
|
||||
* Name of notificationtemplate
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* Updated notificationtemplate
|
||||
* @type {NotificationTemplate}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplate
|
||||
*/
|
||||
readonly notificationTemplate?: NotificationTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotificationTemplateApi - object-oriented interface
|
||||
* @export
|
||||
* @class NotificationHaloRunV1alpha1NotificationTemplateApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class NotificationHaloRunV1alpha1NotificationTemplateApi extends BaseAPI {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiCreatenotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApi
|
||||
*/
|
||||
public createnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiCreatenotificationHaloRunV1alpha1NotificationTemplateRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationTemplateApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.createnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.notificationTemplate,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiDeletenotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApi
|
||||
*/
|
||||
public deletenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiDeletenotificationHaloRunV1alpha1NotificationTemplateRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationTemplateApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.deletenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiGetnotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApi
|
||||
*/
|
||||
public getnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiGetnotificationHaloRunV1alpha1NotificationTemplateRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationTemplateApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.getnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApi
|
||||
*/
|
||||
public listnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiListnotificationHaloRunV1alpha1NotificationTemplateRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationTemplateApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.listnotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotificationTemplate
|
||||
* @param {NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplateRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotificationTemplateApi
|
||||
*/
|
||||
public updatenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotificationTemplateApiUpdatenotificationHaloRunV1alpha1NotificationTemplateRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotificationTemplateApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.updatenotificationHaloRunV1alpha1NotificationTemplate(
|
||||
requestParameters.name,
|
||||
requestParameters.notificationTemplate,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,857 @@
|
|||
/* 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 { NotifierDescriptor } from "../models";
|
||||
// @ts-ignore
|
||||
import { NotifierDescriptorList } from "../models";
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotifierDescriptorApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotifierDescriptorApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotifierDescriptor} [notifierDescriptor] Fresh notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1NotifierDescriptor: async (
|
||||
notifierDescriptor?: NotifierDescriptor,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/notifierDescriptors`;
|
||||
// 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(
|
||||
notifierDescriptor,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {string} name Name of notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1NotifierDescriptor: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"deletenotificationHaloRunV1alpha1NotifierDescriptor",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notifierDescriptors/{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 notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {string} name Name of notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1NotifierDescriptor: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"getnotificationHaloRunV1alpha1NotifierDescriptor",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notifierDescriptors/{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 notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1NotifierDescriptor: async (
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/notifierDescriptors`;
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {string} name Name of notifierDescriptor
|
||||
* @param {NotifierDescriptor} [notifierDescriptor] Updated notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1NotifierDescriptor: async (
|
||||
name: string,
|
||||
notifierDescriptor?: NotifierDescriptor,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"updatenotificationHaloRunV1alpha1NotifierDescriptor",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/notifierDescriptors/{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(
|
||||
notifierDescriptor,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotifierDescriptorApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotifierDescriptorApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
NotificationHaloRunV1alpha1NotifierDescriptorApiAxiosParamCreator(
|
||||
configuration
|
||||
);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotifierDescriptor} [notifierDescriptor] Fresh notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
notifierDescriptor?: NotifierDescriptor,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotifierDescriptor>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.createnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
notifierDescriptor,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {string} name Name of notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.deletenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {string} name Name of notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotifierDescriptor>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.getnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotifierDescriptorList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
fieldSelector,
|
||||
labelSelector,
|
||||
page,
|
||||
size,
|
||||
sort,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {string} name Name of notifierDescriptor
|
||||
* @param {NotifierDescriptor} [notifierDescriptor] Updated notifierDescriptor
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
name: string,
|
||||
notifierDescriptor?: NotifierDescriptor,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<NotifierDescriptor>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.updatenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
name,
|
||||
notifierDescriptor,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotifierDescriptorApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1NotifierDescriptorApiFactory =
|
||||
function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp =
|
||||
NotificationHaloRunV1alpha1NotifierDescriptorApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiCreatenotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiCreatenotificationHaloRunV1alpha1NotifierDescriptorRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotifierDescriptor> {
|
||||
return localVarFp
|
||||
.createnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.notifierDescriptor,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiDeletenotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiDeletenotificationHaloRunV1alpha1NotifierDescriptorRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.deletenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiGetnotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiGetnotificationHaloRunV1alpha1NotifierDescriptorRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotifierDescriptor> {
|
||||
return localVarFp
|
||||
.getnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptorRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotifierDescriptorList> {
|
||||
return localVarFp
|
||||
.listnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptorRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<NotifierDescriptor> {
|
||||
return localVarFp
|
||||
.updatenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.name,
|
||||
requestParameters.notifierDescriptor,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createnotificationHaloRunV1alpha1NotifierDescriptor operation in NotificationHaloRunV1alpha1NotifierDescriptorApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotifierDescriptorApiCreatenotificationHaloRunV1alpha1NotifierDescriptorRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotifierDescriptorApiCreatenotificationHaloRunV1alpha1NotifierDescriptorRequest {
|
||||
/**
|
||||
* Fresh notifierDescriptor
|
||||
* @type {NotifierDescriptor}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiCreatenotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly notifierDescriptor?: NotifierDescriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deletenotificationHaloRunV1alpha1NotifierDescriptor operation in NotificationHaloRunV1alpha1NotifierDescriptorApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotifierDescriptorApiDeletenotificationHaloRunV1alpha1NotifierDescriptorRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotifierDescriptorApiDeletenotificationHaloRunV1alpha1NotifierDescriptorRequest {
|
||||
/**
|
||||
* Name of notifierDescriptor
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiDeletenotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getnotificationHaloRunV1alpha1NotifierDescriptor operation in NotificationHaloRunV1alpha1NotifierDescriptorApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotifierDescriptorApiGetnotificationHaloRunV1alpha1NotifierDescriptorRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotifierDescriptorApiGetnotificationHaloRunV1alpha1NotifierDescriptorRequest {
|
||||
/**
|
||||
* Name of notifierDescriptor
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiGetnotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listnotificationHaloRunV1alpha1NotifierDescriptor operation in NotificationHaloRunV1alpha1NotifierDescriptorApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptorRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptorRequest {
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updatenotificationHaloRunV1alpha1NotifierDescriptor operation in NotificationHaloRunV1alpha1NotifierDescriptorApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptorRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptorRequest {
|
||||
/**
|
||||
* Name of notifierDescriptor
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* Updated notifierDescriptor
|
||||
* @type {NotifierDescriptor}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptor
|
||||
*/
|
||||
readonly notifierDescriptor?: NotifierDescriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1NotifierDescriptorApi - object-oriented interface
|
||||
* @export
|
||||
* @class NotificationHaloRunV1alpha1NotifierDescriptorApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class NotificationHaloRunV1alpha1NotifierDescriptorApi extends BaseAPI {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiCreatenotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApi
|
||||
*/
|
||||
public createnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiCreatenotificationHaloRunV1alpha1NotifierDescriptorRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotifierDescriptorApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.createnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.notifierDescriptor,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiDeletenotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApi
|
||||
*/
|
||||
public deletenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiDeletenotificationHaloRunV1alpha1NotifierDescriptorRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotifierDescriptorApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.deletenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiGetnotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApi
|
||||
*/
|
||||
public getnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiGetnotificationHaloRunV1alpha1NotifierDescriptorRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotifierDescriptorApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.getnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApi
|
||||
*/
|
||||
public listnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiListnotificationHaloRunV1alpha1NotifierDescriptorRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotifierDescriptorApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.listnotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/NotifierDescriptor
|
||||
* @param {NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptorRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1NotifierDescriptorApi
|
||||
*/
|
||||
public updatenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters: NotificationHaloRunV1alpha1NotifierDescriptorApiUpdatenotificationHaloRunV1alpha1NotifierDescriptorRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1NotifierDescriptorApiFp(
|
||||
this.configuration
|
||||
)
|
||||
.updatenotificationHaloRunV1alpha1NotifierDescriptor(
|
||||
requestParameters.name,
|
||||
requestParameters.notifierDescriptor,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,819 @@
|
|||
/* 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 { Reason } from "../models";
|
||||
// @ts-ignore
|
||||
import { ReasonList } from "../models";
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1ReasonApiAxiosParamCreator = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Reason
|
||||
* @param {Reason} [reason] Fresh reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1Reason: async (
|
||||
reason?: Reason,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/reasons`;
|
||||
// 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(
|
||||
reason,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Reason
|
||||
* @param {string} name Name of reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1Reason: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"deletenotificationHaloRunV1alpha1Reason",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/reasons/{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 notification.halo.run/v1alpha1/Reason
|
||||
* @param {string} name Name of reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1Reason: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists("getnotificationHaloRunV1alpha1Reason", "name", name);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/reasons/{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 notification.halo.run/v1alpha1/Reason
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1Reason: async (
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/reasons`;
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Reason
|
||||
* @param {string} name Name of reason
|
||||
* @param {Reason} [reason] Updated reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1Reason: async (
|
||||
name: string,
|
||||
reason?: Reason,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"updatenotificationHaloRunV1alpha1Reason",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/reasons/{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(
|
||||
reason,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1ReasonApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
NotificationHaloRunV1alpha1ReasonApiAxiosParamCreator(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Reason
|
||||
* @param {Reason} [reason] Fresh reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createnotificationHaloRunV1alpha1Reason(
|
||||
reason?: Reason,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Reason>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.createnotificationHaloRunV1alpha1Reason(
|
||||
reason,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Reason
|
||||
* @param {string} name Name of reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletenotificationHaloRunV1alpha1Reason(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.deletenotificationHaloRunV1alpha1Reason(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Reason
|
||||
* @param {string} name Name of reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getnotificationHaloRunV1alpha1Reason(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Reason>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.getnotificationHaloRunV1alpha1Reason(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Reason
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listnotificationHaloRunV1alpha1Reason(
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listnotificationHaloRunV1alpha1Reason(
|
||||
fieldSelector,
|
||||
labelSelector,
|
||||
page,
|
||||
size,
|
||||
sort,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Reason
|
||||
* @param {string} name Name of reason
|
||||
* @param {Reason} [reason] Updated reason
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatenotificationHaloRunV1alpha1Reason(
|
||||
name: string,
|
||||
reason?: Reason,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Reason>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.updatenotificationHaloRunV1alpha1Reason(
|
||||
name,
|
||||
reason,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1ReasonApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp = NotificationHaloRunV1alpha1ReasonApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiCreatenotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiCreatenotificationHaloRunV1alpha1ReasonRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Reason> {
|
||||
return localVarFp
|
||||
.createnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters.reason,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiDeletenotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiDeletenotificationHaloRunV1alpha1ReasonRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.deletenotificationHaloRunV1alpha1Reason(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiGetnotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiGetnotificationHaloRunV1alpha1ReasonRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Reason> {
|
||||
return localVarFp
|
||||
.getnotificationHaloRunV1alpha1Reason(requestParameters.name, options)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1ReasonRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<ReasonList> {
|
||||
return localVarFp
|
||||
.listnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1ReasonRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Reason> {
|
||||
return localVarFp
|
||||
.updatenotificationHaloRunV1alpha1Reason(
|
||||
requestParameters.name,
|
||||
requestParameters.reason,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createnotificationHaloRunV1alpha1Reason operation in NotificationHaloRunV1alpha1ReasonApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonApiCreatenotificationHaloRunV1alpha1ReasonRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonApiCreatenotificationHaloRunV1alpha1ReasonRequest {
|
||||
/**
|
||||
* Fresh reason
|
||||
* @type {Reason}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiCreatenotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly reason?: Reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deletenotificationHaloRunV1alpha1Reason operation in NotificationHaloRunV1alpha1ReasonApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonApiDeletenotificationHaloRunV1alpha1ReasonRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonApiDeletenotificationHaloRunV1alpha1ReasonRequest {
|
||||
/**
|
||||
* Name of reason
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiDeletenotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getnotificationHaloRunV1alpha1Reason operation in NotificationHaloRunV1alpha1ReasonApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonApiGetnotificationHaloRunV1alpha1ReasonRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonApiGetnotificationHaloRunV1alpha1ReasonRequest {
|
||||
/**
|
||||
* Name of reason
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiGetnotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listnotificationHaloRunV1alpha1Reason operation in NotificationHaloRunV1alpha1ReasonApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1ReasonRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1ReasonRequest {
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updatenotificationHaloRunV1alpha1Reason operation in NotificationHaloRunV1alpha1ReasonApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1ReasonRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1ReasonRequest {
|
||||
/**
|
||||
* Name of reason
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* Updated reason
|
||||
* @type {Reason}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1Reason
|
||||
*/
|
||||
readonly reason?: Reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonApi - object-oriented interface
|
||||
* @export
|
||||
* @class NotificationHaloRunV1alpha1ReasonApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class NotificationHaloRunV1alpha1ReasonApi extends BaseAPI {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiCreatenotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApi
|
||||
*/
|
||||
public createnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiCreatenotificationHaloRunV1alpha1ReasonRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonApiFp(this.configuration)
|
||||
.createnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters.reason,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiDeletenotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApi
|
||||
*/
|
||||
public deletenotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiDeletenotificationHaloRunV1alpha1ReasonRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonApiFp(this.configuration)
|
||||
.deletenotificationHaloRunV1alpha1Reason(requestParameters.name, options)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiGetnotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApi
|
||||
*/
|
||||
public getnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiGetnotificationHaloRunV1alpha1ReasonRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonApiFp(this.configuration)
|
||||
.getnotificationHaloRunV1alpha1Reason(requestParameters.name, options)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApi
|
||||
*/
|
||||
public listnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiListnotificationHaloRunV1alpha1ReasonRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonApiFp(this.configuration)
|
||||
.listnotificationHaloRunV1alpha1Reason(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Reason
|
||||
* @param {NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1ReasonRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonApi
|
||||
*/
|
||||
public updatenotificationHaloRunV1alpha1Reason(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonApiUpdatenotificationHaloRunV1alpha1ReasonRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonApiFp(this.configuration)
|
||||
.updatenotificationHaloRunV1alpha1Reason(
|
||||
requestParameters.name,
|
||||
requestParameters.reason,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,828 @@
|
|||
/* 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 { ReasonType } from "../models";
|
||||
// @ts-ignore
|
||||
import { ReasonTypeList } from "../models";
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonTypeApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1ReasonTypeApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {ReasonType} [reasonType] Fresh reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1ReasonType: async (
|
||||
reasonType?: ReasonType,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/reasontypes`;
|
||||
// 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(
|
||||
reasonType,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {string} name Name of reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1ReasonType: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"deletenotificationHaloRunV1alpha1ReasonType",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/reasontypes/{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 notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {string} name Name of reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1ReasonType: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"getnotificationHaloRunV1alpha1ReasonType",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/reasontypes/{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 notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1ReasonType: async (
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/reasontypes`;
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {string} name Name of reasontype
|
||||
* @param {ReasonType} [reasonType] Updated reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1ReasonType: async (
|
||||
name: string,
|
||||
reasonType?: ReasonType,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"updatenotificationHaloRunV1alpha1ReasonType",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/reasontypes/{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(
|
||||
reasonType,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonTypeApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1ReasonTypeApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
NotificationHaloRunV1alpha1ReasonTypeApiAxiosParamCreator(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {ReasonType} [reasonType] Fresh reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createnotificationHaloRunV1alpha1ReasonType(
|
||||
reasonType?: ReasonType,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonType>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.createnotificationHaloRunV1alpha1ReasonType(
|
||||
reasonType,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {string} name Name of reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletenotificationHaloRunV1alpha1ReasonType(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.deletenotificationHaloRunV1alpha1ReasonType(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {string} name Name of reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getnotificationHaloRunV1alpha1ReasonType(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonType>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.getnotificationHaloRunV1alpha1ReasonType(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listnotificationHaloRunV1alpha1ReasonType(
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonTypeList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listnotificationHaloRunV1alpha1ReasonType(
|
||||
fieldSelector,
|
||||
labelSelector,
|
||||
page,
|
||||
size,
|
||||
sort,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {string} name Name of reasontype
|
||||
* @param {ReasonType} [reasonType] Updated reasontype
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatenotificationHaloRunV1alpha1ReasonType(
|
||||
name: string,
|
||||
reasonType?: ReasonType,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonType>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.updatenotificationHaloRunV1alpha1ReasonType(
|
||||
name,
|
||||
reasonType,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonTypeApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1ReasonTypeApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp = NotificationHaloRunV1alpha1ReasonTypeApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<ReasonType> {
|
||||
return localVarFp
|
||||
.createnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.reasonType,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.deletenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<ReasonType> {
|
||||
return localVarFp
|
||||
.getnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<ReasonTypeList> {
|
||||
return localVarFp
|
||||
.listnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<ReasonType> {
|
||||
return localVarFp
|
||||
.updatenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.name,
|
||||
requestParameters.reasonType,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createnotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest {
|
||||
/**
|
||||
* Fresh reasontype
|
||||
* @type {ReasonType}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly reasonType?: ReasonType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deletenotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest {
|
||||
/**
|
||||
* Name of reasontype
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getnotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest {
|
||||
/**
|
||||
* Name of reasontype
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listnotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest {
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updatenotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest {
|
||||
/**
|
||||
* Name of reasontype
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* Updated reasontype
|
||||
* @type {ReasonType}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonType
|
||||
*/
|
||||
readonly reasonType?: ReasonType;
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1ReasonTypeApi - object-oriented interface
|
||||
* @export
|
||||
* @class NotificationHaloRunV1alpha1ReasonTypeApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class NotificationHaloRunV1alpha1ReasonTypeApi extends BaseAPI {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApi
|
||||
*/
|
||||
public createnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
|
||||
.createnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.reasonType,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApi
|
||||
*/
|
||||
public deletenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
|
||||
.deletenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApi
|
||||
*/
|
||||
public getnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
|
||||
.getnotificationHaloRunV1alpha1ReasonType(requestParameters.name, options)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApi
|
||||
*/
|
||||
public listnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
|
||||
.listnotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/ReasonType
|
||||
* @param {NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1ReasonTypeApi
|
||||
*/
|
||||
public updatenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
|
||||
.updatenotificationHaloRunV1alpha1ReasonType(
|
||||
requestParameters.name,
|
||||
requestParameters.reasonType,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,835 @@
|
|||
/* 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 { Subscription } from "../models";
|
||||
// @ts-ignore
|
||||
import { SubscriptionList } from "../models";
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1SubscriptionApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1SubscriptionApiAxiosParamCreator =
|
||||
function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Subscription
|
||||
* @param {Subscription} [subscription] Fresh subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1Subscription: async (
|
||||
subscription?: Subscription,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/subscriptions`;
|
||||
// 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(
|
||||
subscription,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Subscription
|
||||
* @param {string} name Name of subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1Subscription: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"deletenotificationHaloRunV1alpha1Subscription",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/subscriptions/{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 notification.halo.run/v1alpha1/Subscription
|
||||
* @param {string} name Name of subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1Subscription: async (
|
||||
name: string,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"getnotificationHaloRunV1alpha1Subscription",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/subscriptions/{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 notification.halo.run/v1alpha1/Subscription
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1Subscription: async (
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
const localVarPath = `/apis/notification.halo.run/v1alpha1/subscriptions`;
|
||||
// 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 (fieldSelector) {
|
||||
localVarQueryParameter["fieldSelector"] = fieldSelector;
|
||||
}
|
||||
|
||||
if (labelSelector) {
|
||||
localVarQueryParameter["labelSelector"] = labelSelector;
|
||||
}
|
||||
|
||||
if (page !== undefined) {
|
||||
localVarQueryParameter["page"] = page;
|
||||
}
|
||||
|
||||
if (size !== undefined) {
|
||||
localVarQueryParameter["size"] = size;
|
||||
}
|
||||
|
||||
if (sort) {
|
||||
localVarQueryParameter["sort"] = Array.from(sort);
|
||||
}
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions =
|
||||
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {
|
||||
...localVarHeaderParameter,
|
||||
...headersFromBaseOptions,
|
||||
...options.headers,
|
||||
};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Subscription
|
||||
* @param {string} name Name of subscription
|
||||
* @param {Subscription} [subscription] Updated subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1Subscription: async (
|
||||
name: string,
|
||||
subscription?: Subscription,
|
||||
options: AxiosRequestConfig = {}
|
||||
): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists(
|
||||
"updatenotificationHaloRunV1alpha1Subscription",
|
||||
"name",
|
||||
name
|
||||
);
|
||||
const localVarPath =
|
||||
`/apis/notification.halo.run/v1alpha1/subscriptions/{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(
|
||||
subscription,
|
||||
localVarRequestOptions,
|
||||
configuration
|
||||
);
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1SubscriptionApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1SubscriptionApiFp = function (
|
||||
configuration?: Configuration
|
||||
) {
|
||||
const localVarAxiosParamCreator =
|
||||
NotificationHaloRunV1alpha1SubscriptionApiAxiosParamCreator(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Subscription
|
||||
* @param {Subscription} [subscription] Fresh subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createnotificationHaloRunV1alpha1Subscription(
|
||||
subscription?: Subscription,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Subscription>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.createnotificationHaloRunV1alpha1Subscription(
|
||||
subscription,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Subscription
|
||||
* @param {string} name Name of subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletenotificationHaloRunV1alpha1Subscription(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.deletenotificationHaloRunV1alpha1Subscription(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Subscription
|
||||
* @param {string} name Name of subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getnotificationHaloRunV1alpha1Subscription(
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Subscription>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.getnotificationHaloRunV1alpha1Subscription(
|
||||
name,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Subscription
|
||||
* @param {Array<string>} [fieldSelector] Field selector for filtering.
|
||||
* @param {Array<string>} [labelSelector] Label selector for filtering.
|
||||
* @param {number} [page] The page number. Zero indicates no page.
|
||||
* @param {number} [size] Size of one page. Zero indicates no limit.
|
||||
* @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listnotificationHaloRunV1alpha1Subscription(
|
||||
fieldSelector?: Array<string>,
|
||||
labelSelector?: Array<string>,
|
||||
page?: number,
|
||||
size?: number,
|
||||
sort?: Array<string>,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(
|
||||
axios?: AxiosInstance,
|
||||
basePath?: string
|
||||
) => AxiosPromise<SubscriptionList>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.listnotificationHaloRunV1alpha1Subscription(
|
||||
fieldSelector,
|
||||
labelSelector,
|
||||
page,
|
||||
size,
|
||||
sort,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Subscription
|
||||
* @param {string} name Name of subscription
|
||||
* @param {Subscription} [subscription] Updated subscription
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatenotificationHaloRunV1alpha1Subscription(
|
||||
name: string,
|
||||
subscription?: Subscription,
|
||||
options?: AxiosRequestConfig
|
||||
): Promise<
|
||||
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Subscription>
|
||||
> {
|
||||
const localVarAxiosArgs =
|
||||
await localVarAxiosParamCreator.updatenotificationHaloRunV1alpha1Subscription(
|
||||
name,
|
||||
subscription,
|
||||
options
|
||||
);
|
||||
return createRequestFunction(
|
||||
localVarAxiosArgs,
|
||||
globalAxios,
|
||||
BASE_PATH,
|
||||
configuration
|
||||
);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1SubscriptionApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const NotificationHaloRunV1alpha1SubscriptionApiFactory = function (
|
||||
configuration?: Configuration,
|
||||
basePath?: string,
|
||||
axios?: AxiosInstance
|
||||
) {
|
||||
const localVarFp =
|
||||
NotificationHaloRunV1alpha1SubscriptionApiFp(configuration);
|
||||
return {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiCreatenotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiCreatenotificationHaloRunV1alpha1SubscriptionRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Subscription> {
|
||||
return localVarFp
|
||||
.createnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.subscription,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiDeletenotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiDeletenotificationHaloRunV1alpha1SubscriptionRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<void> {
|
||||
return localVarFp
|
||||
.deletenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiGetnotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiGetnotificationHaloRunV1alpha1SubscriptionRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Subscription> {
|
||||
return localVarFp
|
||||
.getnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1SubscriptionRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<SubscriptionList> {
|
||||
return localVarFp
|
||||
.listnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1SubscriptionRequest,
|
||||
options?: AxiosRequestConfig
|
||||
): AxiosPromise<Subscription> {
|
||||
return localVarFp
|
||||
.updatenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.name,
|
||||
requestParameters.subscription,
|
||||
options
|
||||
)
|
||||
.then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for createnotificationHaloRunV1alpha1Subscription operation in NotificationHaloRunV1alpha1SubscriptionApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1SubscriptionApiCreatenotificationHaloRunV1alpha1SubscriptionRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1SubscriptionApiCreatenotificationHaloRunV1alpha1SubscriptionRequest {
|
||||
/**
|
||||
* Fresh subscription
|
||||
* @type {Subscription}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiCreatenotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly subscription?: Subscription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for deletenotificationHaloRunV1alpha1Subscription operation in NotificationHaloRunV1alpha1SubscriptionApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1SubscriptionApiDeletenotificationHaloRunV1alpha1SubscriptionRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1SubscriptionApiDeletenotificationHaloRunV1alpha1SubscriptionRequest {
|
||||
/**
|
||||
* Name of subscription
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiDeletenotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getnotificationHaloRunV1alpha1Subscription operation in NotificationHaloRunV1alpha1SubscriptionApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1SubscriptionApiGetnotificationHaloRunV1alpha1SubscriptionRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1SubscriptionApiGetnotificationHaloRunV1alpha1SubscriptionRequest {
|
||||
/**
|
||||
* Name of subscription
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiGetnotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for listnotificationHaloRunV1alpha1Subscription operation in NotificationHaloRunV1alpha1SubscriptionApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1SubscriptionRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1SubscriptionRequest {
|
||||
/**
|
||||
* Field selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly fieldSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* Label selector for filtering.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly labelSelector?: Array<string>;
|
||||
|
||||
/**
|
||||
* The page number. Zero indicates no page.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly page?: number;
|
||||
|
||||
/**
|
||||
* Size of one page. Zero indicates no limit.
|
||||
* @type {number}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly size?: number;
|
||||
|
||||
/**
|
||||
* Sort property and direction of the list result. Support sorting based on attribute name path.
|
||||
* @type {Array<string>}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly sort?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updatenotificationHaloRunV1alpha1Subscription operation in NotificationHaloRunV1alpha1SubscriptionApi.
|
||||
* @export
|
||||
* @interface NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1SubscriptionRequest
|
||||
*/
|
||||
export interface NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1SubscriptionRequest {
|
||||
/**
|
||||
* Name of subscription
|
||||
* @type {string}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* Updated subscription
|
||||
* @type {Subscription}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1Subscription
|
||||
*/
|
||||
readonly subscription?: Subscription;
|
||||
}
|
||||
|
||||
/**
|
||||
* NotificationHaloRunV1alpha1SubscriptionApi - object-oriented interface
|
||||
* @export
|
||||
* @class NotificationHaloRunV1alpha1SubscriptionApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class NotificationHaloRunV1alpha1SubscriptionApi extends BaseAPI {
|
||||
/**
|
||||
* Create notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiCreatenotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApi
|
||||
*/
|
||||
public createnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiCreatenotificationHaloRunV1alpha1SubscriptionRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1SubscriptionApiFp(this.configuration)
|
||||
.createnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.subscription,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiDeletenotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApi
|
||||
*/
|
||||
public deletenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiDeletenotificationHaloRunV1alpha1SubscriptionRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1SubscriptionApiFp(this.configuration)
|
||||
.deletenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiGetnotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApi
|
||||
*/
|
||||
public getnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiGetnotificationHaloRunV1alpha1SubscriptionRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1SubscriptionApiFp(this.configuration)
|
||||
.getnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.name,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* List notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApi
|
||||
*/
|
||||
public listnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiListnotificationHaloRunV1alpha1SubscriptionRequest = {},
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1SubscriptionApiFp(this.configuration)
|
||||
.listnotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.fieldSelector,
|
||||
requestParameters.labelSelector,
|
||||
requestParameters.page,
|
||||
requestParameters.size,
|
||||
requestParameters.sort,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update notification.halo.run/v1alpha1/Subscription
|
||||
* @param {NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1SubscriptionRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof NotificationHaloRunV1alpha1SubscriptionApi
|
||||
*/
|
||||
public updatenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters: NotificationHaloRunV1alpha1SubscriptionApiUpdatenotificationHaloRunV1alpha1SubscriptionRequest,
|
||||
options?: AxiosRequestConfig
|
||||
) {
|
||||
return NotificationHaloRunV1alpha1SubscriptionApiFp(this.configuration)
|
||||
.updatenotificationHaloRunV1alpha1Subscription(
|
||||
requestParameters.name,
|
||||
requestParameters.subscription,
|
||||
options
|
||||
)
|
||||
.then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
|
@ -63,6 +63,8 @@ export * from "./group-list";
|
|||
export * from "./group-spec";
|
||||
export * from "./group-status";
|
||||
export * from "./install-from-uri-request";
|
||||
export * from "./interest-reason";
|
||||
export * from "./interest-reason-subject";
|
||||
export * from "./license";
|
||||
export * from "./listed-auth-provider";
|
||||
export * from "./listed-comment";
|
||||
|
@ -79,6 +81,7 @@ export * from "./listed-single-page-vo";
|
|||
export * from "./listed-single-page-vo-list";
|
||||
export * from "./listed-user";
|
||||
export * from "./login-history";
|
||||
export * from "./mark-specified-request";
|
||||
export * from "./menu";
|
||||
export * from "./menu-item";
|
||||
export * from "./menu-item-list";
|
||||
|
@ -90,6 +93,16 @@ export * from "./menu-spec";
|
|||
export * from "./menu-vo";
|
||||
export * from "./metadata";
|
||||
export * from "./navigation-post-vo";
|
||||
export * from "./notification";
|
||||
export * from "./notification-list";
|
||||
export * from "./notification-spec";
|
||||
export * from "./notification-template";
|
||||
export * from "./notification-template-list";
|
||||
export * from "./notification-template-spec";
|
||||
export * from "./notifier-descriptor";
|
||||
export * from "./notifier-descriptor-list";
|
||||
export * from "./notifier-descriptor-spec";
|
||||
export * from "./notifier-setting-ref";
|
||||
export * from "./owner-info";
|
||||
export * from "./pat-spec";
|
||||
export * from "./personal-access-token";
|
||||
|
@ -115,6 +128,16 @@ export * from "./post-spec";
|
|||
export * from "./post-status";
|
||||
export * from "./post-vo";
|
||||
export * from "./public-key-response";
|
||||
export * from "./reason";
|
||||
export * from "./reason-list";
|
||||
export * from "./reason-property";
|
||||
export * from "./reason-selector";
|
||||
export * from "./reason-spec";
|
||||
export * from "./reason-spec-attributes";
|
||||
export * from "./reason-subject";
|
||||
export * from "./reason-type";
|
||||
export * from "./reason-type-list";
|
||||
export * from "./reason-type-spec";
|
||||
export * from "./ref";
|
||||
export * from "./reply";
|
||||
export * from "./reply-list";
|
||||
|
@ -154,6 +177,10 @@ export * from "./snapshot-list";
|
|||
export * from "./stats";
|
||||
export * from "./stats-vo";
|
||||
export * from "./subject";
|
||||
export * from "./subscription";
|
||||
export * from "./subscription-list";
|
||||
export * from "./subscription-spec";
|
||||
export * from "./subscription-subscriber";
|
||||
export * from "./system-initialization-request";
|
||||
export * from "./tag";
|
||||
export * from "./tag-list";
|
||||
|
@ -161,6 +188,7 @@ export * from "./tag-spec";
|
|||
export * from "./tag-status";
|
||||
export * from "./tag-vo";
|
||||
export * from "./tag-vo-list";
|
||||
export * from "./template-content";
|
||||
export * from "./template-descriptor";
|
||||
export * from "./theme";
|
||||
export * from "./theme-list";
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The subject name of reason type to be interested in
|
||||
* @export
|
||||
* @interface InterestReasonSubject
|
||||
*/
|
||||
export interface InterestReasonSubject {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InterestReasonSubject
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InterestReasonSubject
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
* if name is not specified, it presents all subjects of the specified reason type and custom resources
|
||||
* @type {string}
|
||||
* @memberof InterestReasonSubject
|
||||
*/
|
||||
name?: string;
|
||||
}
|
|
@ -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 { InterestReasonSubject } from "./interest-reason-subject";
|
||||
|
||||
/**
|
||||
* The reason to be interested in
|
||||
* @export
|
||||
* @interface InterestReason
|
||||
*/
|
||||
export interface InterestReason {
|
||||
/**
|
||||
* The name of the reason definition to be interested in
|
||||
* @type {string}
|
||||
* @memberof InterestReason
|
||||
*/
|
||||
reasonType: string;
|
||||
/**
|
||||
*
|
||||
* @type {InterestReasonSubject}
|
||||
* @memberof InterestReason
|
||||
*/
|
||||
subject: InterestReasonSubject;
|
||||
}
|
|
@ -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 MarkSpecifiedRequest
|
||||
*/
|
||||
export interface MarkSpecifiedRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof MarkSpecifiedRequest
|
||||
*/
|
||||
names?: Array<string>;
|
||||
}
|
|
@ -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 { Notification } from "./notification";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NotificationList
|
||||
*/
|
||||
export interface NotificationList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
first: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
hasNext: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
hasPrevious: boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<Notification>}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
items: Array<Notification>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
last: boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
total: number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof NotificationList
|
||||
*/
|
||||
totalPages: number;
|
||||
}
|
|
@ -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 NotificationSpec
|
||||
*/
|
||||
export interface NotificationSpec {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotificationSpec
|
||||
*/
|
||||
htmlContent: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotificationSpec
|
||||
*/
|
||||
lastReadAt?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotificationSpec
|
||||
*/
|
||||
rawContent: string;
|
||||
/**
|
||||
* The name of reason
|
||||
* @type {string}
|
||||
* @memberof NotificationSpec
|
||||
*/
|
||||
reason: string;
|
||||
/**
|
||||
* The name of user
|
||||
* @type {string}
|
||||
* @memberof NotificationSpec
|
||||
*/
|
||||
recipient: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotificationSpec
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof NotificationSpec
|
||||
*/
|
||||
unread?: boolean;
|
||||
}
|
|
@ -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 { NotificationTemplate } from "./notification-template";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NotificationTemplateList
|
||||
*/
|
||||
export interface NotificationTemplateList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
first: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
hasNext: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
hasPrevious: boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<NotificationTemplate>}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
items: Array<NotificationTemplate>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
last: boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
total: number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof NotificationTemplateList
|
||||
*/
|
||||
totalPages: number;
|
||||
}
|
|
@ -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 { ReasonSelector } from "./reason-selector";
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { TemplateContent } from "./template-content";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NotificationTemplateSpec
|
||||
*/
|
||||
export interface NotificationTemplateSpec {
|
||||
/**
|
||||
*
|
||||
* @type {ReasonSelector}
|
||||
* @memberof NotificationTemplateSpec
|
||||
*/
|
||||
reasonSelector?: ReasonSelector;
|
||||
/**
|
||||
*
|
||||
* @type {TemplateContent}
|
||||
* @memberof NotificationTemplateSpec
|
||||
*/
|
||||
template?: TemplateContent;
|
||||
}
|
|
@ -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 { NotificationTemplateSpec } from "./notification-template-spec";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NotificationTemplate
|
||||
*/
|
||||
export interface NotificationTemplate {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotificationTemplate
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotificationTemplate
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof NotificationTemplate
|
||||
*/
|
||||
metadata: Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {NotificationTemplateSpec}
|
||||
* @memberof NotificationTemplate
|
||||
*/
|
||||
spec?: NotificationTemplateSpec;
|
||||
}
|
|
@ -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 { NotificationSpec } from "./notification-spec";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Notification
|
||||
*/
|
||||
export interface Notification {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Notification
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Notification
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof Notification
|
||||
*/
|
||||
metadata: Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {NotificationSpec}
|
||||
* @memberof Notification
|
||||
*/
|
||||
spec?: NotificationSpec;
|
||||
}
|
|
@ -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 { NotifierDescriptor } from "./notifier-descriptor";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NotifierDescriptorList
|
||||
*/
|
||||
export interface NotifierDescriptorList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
first: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
hasNext: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
hasPrevious: boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<NotifierDescriptor>}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
items: Array<NotifierDescriptor>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
last: boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
total: number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof NotifierDescriptorList
|
||||
*/
|
||||
totalPages: number;
|
||||
}
|
|
@ -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 { NotifierSettingRef } from "./notifier-setting-ref";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NotifierDescriptorSpec
|
||||
*/
|
||||
export interface NotifierDescriptorSpec {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotifierDescriptorSpec
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotifierDescriptorSpec
|
||||
*/
|
||||
displayName: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotifierDescriptorSpec
|
||||
*/
|
||||
notifierExtName: string;
|
||||
/**
|
||||
*
|
||||
* @type {NotifierSettingRef}
|
||||
* @memberof NotifierDescriptorSpec
|
||||
*/
|
||||
receiverSettingRef?: NotifierSettingRef;
|
||||
/**
|
||||
*
|
||||
* @type {NotifierSettingRef}
|
||||
* @memberof NotifierDescriptorSpec
|
||||
*/
|
||||
senderSettingRef?: NotifierSettingRef;
|
||||
}
|
|
@ -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 { NotifierDescriptorSpec } from "./notifier-descriptor-spec";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface NotifierDescriptor
|
||||
*/
|
||||
export interface NotifierDescriptor {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotifierDescriptor
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotifierDescriptor
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof NotifierDescriptor
|
||||
*/
|
||||
metadata: Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {NotifierDescriptorSpec}
|
||||
* @memberof NotifierDescriptor
|
||||
*/
|
||||
spec?: NotifierDescriptorSpec;
|
||||
}
|
|
@ -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 NotifierSettingRef
|
||||
*/
|
||||
export interface NotifierSettingRef {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotifierSettingRef
|
||||
*/
|
||||
group: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof NotifierSettingRef
|
||||
*/
|
||||
name: string;
|
||||
}
|
|
@ -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 { Reason } from "./reason";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ReasonList
|
||||
*/
|
||||
export interface ReasonList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
first: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
hasNext: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
hasPrevious: boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<Reason>}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
items: Array<Reason>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
last: boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
total: number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof ReasonList
|
||||
*/
|
||||
totalPages: number;
|
||||
}
|
|
@ -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 ReasonProperty
|
||||
*/
|
||||
export interface ReasonProperty {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonProperty
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonProperty
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ReasonProperty
|
||||
*/
|
||||
optional?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonProperty
|
||||
*/
|
||||
type: string;
|
||||
}
|
|
@ -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 ReasonSelector
|
||||
*/
|
||||
export interface ReasonSelector {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSelector
|
||||
*/
|
||||
language: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSelector
|
||||
*/
|
||||
reasonType: string;
|
||||
}
|
|
@ -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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Attributes used to transfer data
|
||||
* @export
|
||||
* @interface ReasonSpecAttributes
|
||||
*/
|
||||
export interface ReasonSpecAttributes {
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ReasonSpecAttributes
|
||||
*/
|
||||
empty?: boolean;
|
||||
}
|
|
@ -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 { ReasonSpecAttributes } from "./reason-spec-attributes";
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { ReasonSubject } from "./reason-subject";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ReasonSpec
|
||||
*/
|
||||
export interface ReasonSpec {
|
||||
/**
|
||||
*
|
||||
* @type {ReasonSpecAttributes}
|
||||
* @memberof ReasonSpec
|
||||
*/
|
||||
attributes?: ReasonSpecAttributes;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSpec
|
||||
*/
|
||||
author: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSpec
|
||||
*/
|
||||
reasonType: string;
|
||||
/**
|
||||
*
|
||||
* @type {ReasonSubject}
|
||||
* @memberof ReasonSpec
|
||||
*/
|
||||
subject: ReasonSubject;
|
||||
}
|
|
@ -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 ReasonSubject
|
||||
*/
|
||||
export interface ReasonSubject {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSubject
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSubject
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSubject
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSubject
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonSubject
|
||||
*/
|
||||
url?: string;
|
||||
}
|
|
@ -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 { ReasonType } from "./reason-type";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ReasonTypeList
|
||||
*/
|
||||
export interface ReasonTypeList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
first: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
hasNext: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
hasPrevious: boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<ReasonType>}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
items: Array<ReasonType>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
last: boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
total: number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof ReasonTypeList
|
||||
*/
|
||||
totalPages: number;
|
||||
}
|
|
@ -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 { ReasonProperty } from "./reason-property";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ReasonTypeSpec
|
||||
*/
|
||||
export interface ReasonTypeSpec {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonTypeSpec
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonTypeSpec
|
||||
*/
|
||||
displayName: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ReasonProperty>}
|
||||
* @memberof ReasonTypeSpec
|
||||
*/
|
||||
properties?: Array<ReasonProperty>;
|
||||
}
|
|
@ -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 { ReasonTypeSpec } from "./reason-type-spec";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ReasonType
|
||||
*/
|
||||
export interface ReasonType {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonType
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ReasonType
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof ReasonType
|
||||
*/
|
||||
metadata: Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {ReasonTypeSpec}
|
||||
* @memberof ReasonType
|
||||
*/
|
||||
spec?: ReasonTypeSpec;
|
||||
}
|
|
@ -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 { ReasonSpec } from "./reason-spec";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Reason
|
||||
*/
|
||||
export interface Reason {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Reason
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Reason
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof Reason
|
||||
*/
|
||||
metadata: Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {ReasonSpec}
|
||||
* @memberof Reason
|
||||
*/
|
||||
spec?: ReasonSpec;
|
||||
}
|
|
@ -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 { Subscription } from "./subscription";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface SubscriptionList
|
||||
*/
|
||||
export interface SubscriptionList {
|
||||
/**
|
||||
* Indicates whether current page is the first page.
|
||||
* @type {boolean}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
first: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
hasNext: boolean;
|
||||
/**
|
||||
* Indicates whether current page has previous page.
|
||||
* @type {boolean}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
hasPrevious: boolean;
|
||||
/**
|
||||
* A chunk of items.
|
||||
* @type {Array<Subscription>}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
items: Array<Subscription>;
|
||||
/**
|
||||
* Indicates whether current page is the last page.
|
||||
* @type {boolean}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
last: boolean;
|
||||
/**
|
||||
* Page number, starts from 1. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
page: number;
|
||||
/**
|
||||
* Size of each page. If not set or equal to 0, it means no pagination.
|
||||
* @type {number}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
size: number;
|
||||
/**
|
||||
* Total elements.
|
||||
* @type {number}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
total: number;
|
||||
/**
|
||||
* Indicates total pages.
|
||||
* @type {number}
|
||||
* @memberof SubscriptionList
|
||||
*/
|
||||
totalPages: number;
|
||||
}
|
|
@ -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 { InterestReason } from "./interest-reason";
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import { SubscriptionSubscriber } from "./subscription-subscriber";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface SubscriptionSpec
|
||||
*/
|
||||
export interface SubscriptionSpec {
|
||||
/**
|
||||
* Perhaps users need to unsubscribe and interact without receiving notifications again
|
||||
* @type {boolean}
|
||||
* @memberof SubscriptionSpec
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {InterestReason}
|
||||
* @memberof SubscriptionSpec
|
||||
*/
|
||||
reason: InterestReason;
|
||||
/**
|
||||
*
|
||||
* @type {SubscriptionSubscriber}
|
||||
* @memberof SubscriptionSpec
|
||||
*/
|
||||
subscriber: SubscriptionSubscriber;
|
||||
/**
|
||||
* The token to unsubscribe
|
||||
* @type {string}
|
||||
* @memberof SubscriptionSpec
|
||||
*/
|
||||
unsubscribeToken: string;
|
||||
}
|
|
@ -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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The subscriber to be notified
|
||||
* @export
|
||||
* @interface SubscriptionSubscriber
|
||||
*/
|
||||
export interface SubscriptionSubscriber {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SubscriptionSubscriber
|
||||
*/
|
||||
name?: string;
|
||||
}
|
|
@ -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 { SubscriptionSpec } from "./subscription-spec";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Subscription
|
||||
*/
|
||||
export interface Subscription {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Subscription
|
||||
*/
|
||||
apiVersion: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Subscription
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
*
|
||||
* @type {Metadata}
|
||||
* @memberof Subscription
|
||||
*/
|
||||
metadata: Metadata;
|
||||
/**
|
||||
*
|
||||
* @type {SubscriptionSpec}
|
||||
* @memberof Subscription
|
||||
*/
|
||||
spec?: SubscriptionSpec;
|
||||
}
|
|
@ -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 TemplateContent
|
||||
*/
|
||||
export interface TemplateContent {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TemplateContent
|
||||
*/
|
||||
htmlBody?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TemplateContent
|
||||
*/
|
||||
rawBody?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TemplateContent
|
||||
*/
|
||||
title: string;
|
||||
}
|
|
@ -66,6 +66,7 @@ import IconZoomOutLine from "~icons/ri/zoom-out-line";
|
|||
import IconArrowLeftRightLine from "~icons/ri/arrow-left-right-line";
|
||||
import IconArrowUpDownLine from "~icons/ri/arrow-up-down-line";
|
||||
import IconRiUpload2Fill from "~icons/ri/upload-2-fill";
|
||||
import IconNotificationBadgeLine from "~icons/ri/notification-badge-line";
|
||||
|
||||
export {
|
||||
IconDashboard,
|
||||
|
@ -136,4 +137,5 @@ export {
|
|||
IconArrowLeftRightLine,
|
||||
IconArrowUpDownLine,
|
||||
IconRiUpload2Fill,
|
||||
IconNotificationBadgeLine,
|
||||
};
|
||||
|
|
|
@ -302,6 +302,15 @@ onMounted(() => {
|
|||
>
|
||||
{{ $t("core.sidebar.operations.profile.button") }}
|
||||
</VDropdownItem>
|
||||
<VDropdownItem
|
||||
@click="
|
||||
$router.push({
|
||||
name: 'UserNotifications',
|
||||
})
|
||||
"
|
||||
>
|
||||
{{ $t("core.sidebar.operations.notifications.button") }}
|
||||
</VDropdownItem>
|
||||
<VDropdownItem @click="handleLogout">
|
||||
{{ $t("core.sidebar.operations.logout.button") }}
|
||||
</VDropdownItem>
|
||||
|
|
|
@ -79,6 +79,8 @@ core:
|
|||
button: Profile
|
||||
visit_homepage:
|
||||
title: Visit homepage
|
||||
notifications:
|
||||
button: Notifications
|
||||
dashboard:
|
||||
title: Dashboard
|
||||
actions:
|
||||
|
@ -987,6 +989,18 @@ core:
|
|||
website: Website
|
||||
help_page: Help page
|
||||
authentication_url: Login URL
|
||||
notification:
|
||||
title: Notifications
|
||||
tabs:
|
||||
unread: Unread
|
||||
read: Read
|
||||
empty:
|
||||
titles:
|
||||
unread: No unread notifications
|
||||
read: No read notifications
|
||||
operations:
|
||||
mark_as_read:
|
||||
button: Mark as read
|
||||
setting:
|
||||
title: Settings
|
||||
actuator:
|
||||
|
@ -1258,6 +1272,7 @@ core:
|
|||
submit: Submit
|
||||
detail: Detail
|
||||
select: Select
|
||||
view_all: View all
|
||||
radio:
|
||||
"yes": Yes
|
||||
"no": No
|
||||
|
|
|
@ -79,6 +79,8 @@ core:
|
|||
button: 个人资料
|
||||
visit_homepage:
|
||||
title: 访问首页
|
||||
notifications:
|
||||
button: 我的消息
|
||||
dashboard:
|
||||
title: 仪表板
|
||||
actions:
|
||||
|
@ -987,6 +989,18 @@ core:
|
|||
website: 网站
|
||||
help_page: 帮助页面
|
||||
authentication_url: 登录入口
|
||||
notification:
|
||||
title: 消息
|
||||
tabs:
|
||||
unread: 未读
|
||||
read: 已读
|
||||
empty:
|
||||
titles:
|
||||
unread: 当前没有未读的消息
|
||||
read: 当前没有已读的消息
|
||||
operations:
|
||||
mark_as_read:
|
||||
button: 标记为已读
|
||||
setting:
|
||||
title: 设置
|
||||
actuator:
|
||||
|
@ -1258,6 +1272,7 @@ core:
|
|||
submit: 提交
|
||||
detail: 详情
|
||||
select: 选择
|
||||
view_all: 查看全部
|
||||
radio:
|
||||
"yes": 是
|
||||
"no": 否
|
||||
|
|
|
@ -79,6 +79,8 @@ core:
|
|||
button: 個人資料
|
||||
visit_homepage:
|
||||
title: 訪問首頁
|
||||
notifications:
|
||||
button: 我的訊息
|
||||
dashboard:
|
||||
title: 儀表板
|
||||
actions:
|
||||
|
@ -987,6 +989,18 @@ core:
|
|||
website: 網站
|
||||
help_page: 幫助頁面
|
||||
authentication_url: 登入入口
|
||||
notification:
|
||||
title: 訊息
|
||||
tabs:
|
||||
unread: 未讀
|
||||
read: 已讀
|
||||
empty:
|
||||
titles:
|
||||
unread: 目前沒有未讀的訊息
|
||||
read: 目前沒有已讀的訊息
|
||||
operations:
|
||||
mark_as_read:
|
||||
button: 標記為已讀
|
||||
setting:
|
||||
title: 設置
|
||||
actuator:
|
||||
|
@ -1258,6 +1272,7 @@ core:
|
|||
submit: 提交
|
||||
detail: 詳情
|
||||
select: 選擇
|
||||
view_all: 查看全部
|
||||
radio:
|
||||
"yes": 是
|
||||
"no": 否
|
||||
|
|
|
@ -187,6 +187,7 @@ const widgetsGroup = [
|
|||
widgets: [
|
||||
{ x: 0, y: 0, w: 3, h: 3, i: 0, widget: "ViewsStatsWidget" },
|
||||
{ x: 0, y: 0, w: 6, h: 10, i: 1, widget: "QuickLinkWidget" },
|
||||
{ x: 0, y: 0, w: 6, h: 10, i: 2, widget: "NotificationWidget" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
@ -242,8 +243,8 @@ const layout = useStorage("widgets", [
|
|||
w: 6,
|
||||
h: 12,
|
||||
i: 5,
|
||||
widget: "RecentPublishedWidget",
|
||||
permissions: ["system:posts:view"],
|
||||
widget: "NotificationWidget",
|
||||
permissions: [],
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// fixme: add supports for auto import
|
||||
import dashboardModule from "./dashboard/module";
|
||||
import postModule from "./contents/posts/module";
|
||||
import pageModule from "./contents/pages/module";
|
||||
|
|
|
@ -18,6 +18,7 @@ import type { Component } from "vue";
|
|||
import { markRaw } from "vue";
|
||||
import SettingTab from "./tabs/Setting.vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import NotificationsTab from "./tabs/Notifications.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
@ -60,6 +61,13 @@ const { data: setting } = useQuery({
|
|||
if (!activeTab.value) {
|
||||
activeTab.value = tabs.value[0].id;
|
||||
}
|
||||
|
||||
// TODO: use integrations center to refactor this
|
||||
tabs.value.push({
|
||||
id: "notification",
|
||||
label: "通知设置",
|
||||
component: markRaw(NotificationsTab),
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
<script lang="ts" setup>
|
||||
import { Toast, VButton } from "@halo-dev/components";
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
import type { NotifierDescriptor, Setting } from "@halo-dev/api-client";
|
||||
import type { Ref } from "vue";
|
||||
import { inject } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import { computed } from "vue";
|
||||
import { toRaw } from "vue";
|
||||
import type { FormKitSchemaCondition, FormKitSchemaNode } from "@formkit/core";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
const { t } = useI18n();
|
||||
|
||||
const notifierDescriptor = inject<Ref<NotifierDescriptor | undefined>>(
|
||||
"notifierDescriptor",
|
||||
ref()
|
||||
);
|
||||
|
||||
const name = computed(
|
||||
(): string => notifierDescriptor.value?.metadata.name as string
|
||||
);
|
||||
|
||||
const { data: setting } = useQuery<Setting | undefined>({
|
||||
queryKey: ["notifier-setting", notifierDescriptor],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiClient.extension.setting.getv1alpha1Setting({
|
||||
name: notifierDescriptor.value?.spec?.senderSettingRef?.name as string,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
enabled: computed(() => !!notifierDescriptor.value),
|
||||
});
|
||||
|
||||
const configMapData = ref<Record<string, unknown>>({});
|
||||
|
||||
useQuery<Record<string, unknown>>({
|
||||
queryKey: ["notifier-configMap", notifierDescriptor],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiClient.notifier.fetchSenderConfig({
|
||||
name: name.value,
|
||||
});
|
||||
return data as Record<string, unknown>;
|
||||
},
|
||||
onSuccess(data) {
|
||||
configMapData.value = data;
|
||||
},
|
||||
enabled: computed(() => !!notifierDescriptor.value),
|
||||
});
|
||||
|
||||
const formSchema = computed(() => {
|
||||
return setting.value?.spec.forms.find(
|
||||
(form) =>
|
||||
form.group === notifierDescriptor.value?.spec?.senderSettingRef?.group
|
||||
)?.formSchema as (FormKitSchemaCondition | FormKitSchemaNode)[];
|
||||
});
|
||||
|
||||
const { isLoading: isMutating, mutate } = useMutation({
|
||||
mutationKey: ["save-notifier-configMap", notifierDescriptor],
|
||||
mutationFn: async () => {
|
||||
const { data } = await apiClient.notifier.saveSenderConfig({
|
||||
name: name.value,
|
||||
body: configMapData.value,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
onSuccess() {
|
||||
queryClient.invalidateQueries({ queryKey: ["notifier-configMap"] });
|
||||
Toast.success(t("core.common.toast.save_success"));
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Transition v-if="formSchema" mode="out-in" appear name="fade">
|
||||
<div>
|
||||
<FormKit
|
||||
:id="name"
|
||||
v-model="configMapData"
|
||||
:name="name"
|
||||
:preserve="true"
|
||||
type="form"
|
||||
@submit="mutate()"
|
||||
>
|
||||
<FormKitSchema :schema="toRaw(formSchema)" :data="configMapData" />
|
||||
</FormKit>
|
||||
<div class="pt-5">
|
||||
<div class="flex justify-start">
|
||||
<VButton
|
||||
:loading="isMutating"
|
||||
type="secondary"
|
||||
@click="$formkit.submit(name)"
|
||||
>
|
||||
{{ $t("core.common.buttons.save") }}
|
||||
</VButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</template>
|
|
@ -0,0 +1,74 @@
|
|||
<script lang="ts" setup>
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import NotificationSetting from "./NotificationSetting.vue";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import { markRaw, ref } from "vue";
|
||||
import type { Raw } from "vue";
|
||||
import type { Component } from "vue";
|
||||
import { provide } from "vue";
|
||||
import { VTabbar } from "@halo-dev/components";
|
||||
import { computed } from "vue";
|
||||
import type { ComputedRef } from "vue";
|
||||
import type { NotifierDescriptor } from "packages/api-client/dist";
|
||||
|
||||
interface Tab {
|
||||
id: string;
|
||||
label: string;
|
||||
component: Raw<Component>;
|
||||
}
|
||||
|
||||
const tabs = ref<Tab[]>();
|
||||
|
||||
const activeTab = ref();
|
||||
|
||||
const { data: notifierDescriptors } = useQuery({
|
||||
queryKey: ["notifier-descriptors"],
|
||||
queryFn: async () => {
|
||||
const { data } =
|
||||
await apiClient.extension.notifierDescriptors.listnotificationHaloRunV1alpha1NotifierDescriptor();
|
||||
return data.items;
|
||||
},
|
||||
onSuccess(data) {
|
||||
if (data) {
|
||||
tabs.value = data.map((descriptor) => {
|
||||
return {
|
||||
id: descriptor.metadata.name,
|
||||
label: descriptor.spec?.displayName,
|
||||
component: markRaw(NotificationSetting),
|
||||
};
|
||||
}) as Tab[];
|
||||
|
||||
if (!activeTab.value) {
|
||||
activeTab.value = tabs.value[0].id;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const notifierDescriptor = computed(() => {
|
||||
return notifierDescriptors.value?.find(
|
||||
(item) => item.metadata.name === activeTab.value
|
||||
);
|
||||
});
|
||||
|
||||
provide<ComputedRef<NotifierDescriptor | undefined>>(
|
||||
"notifierDescriptor",
|
||||
notifierDescriptor
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="p-4">
|
||||
<VTabbar
|
||||
v-model:active-id="activeTab"
|
||||
:items="tabs?.map((item) => ({ id: item.id, label: item.label }))"
|
||||
class="w-full"
|
||||
type="pills"
|
||||
></VTabbar>
|
||||
<div class="mt-4">
|
||||
<template v-for="tab in tabs" :key="tab.id">
|
||||
<component :is="tab.component" v-if="activeTab === tab.id" />
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
|
@ -0,0 +1,129 @@
|
|||
<script lang="ts" setup>
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import {
|
||||
IconNotificationBadgeLine,
|
||||
VButton,
|
||||
VCard,
|
||||
VEmpty,
|
||||
VLoading,
|
||||
VPageHeader,
|
||||
VTabbar,
|
||||
} from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { computed } from "vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import NotificationListItem from "./components/NotificationListItem.vue";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import NotificationContent from "./components/NotificationContent.vue";
|
||||
|
||||
const { currentUser } = useUserStore();
|
||||
|
||||
const activeTab = useRouteQuery("tab", "unread");
|
||||
|
||||
const {
|
||||
data: notifications,
|
||||
isLoading,
|
||||
refetch,
|
||||
isFetching,
|
||||
} = useQuery({
|
||||
queryKey: ["user-notifications", activeTab],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiClient.notification.listUserNotifications({
|
||||
username: currentUser?.metadata.name as string,
|
||||
unRead: activeTab.value === "unread",
|
||||
});
|
||||
|
||||
return data;
|
||||
},
|
||||
cacheTime: 0,
|
||||
});
|
||||
|
||||
const selectedNotificationName = useRouteQuery<string | undefined>("name");
|
||||
|
||||
const selectedNotification = computed(() => {
|
||||
return notifications.value?.items.find(
|
||||
(item) => item.metadata.name === selectedNotificationName.value
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VPageHeader :title="$t('core.notification.title')">
|
||||
<template #icon>
|
||||
<IconNotificationBadgeLine class="mr-2 self-center" />
|
||||
</template>
|
||||
</VPageHeader>
|
||||
<div class="m-0 md:m-4">
|
||||
<VCard
|
||||
style="height: calc(100vh - 5.5rem)"
|
||||
:body-class="['h-full', '!p-0']"
|
||||
>
|
||||
<div class="grid h-full grid-cols-12 divide-y sm:divide-x sm:divide-y-0">
|
||||
<div
|
||||
class="relative col-span-12 h-full overflow-auto sm:col-span-6 lg:col-span-5 xl:col-span-3"
|
||||
>
|
||||
<OverlayScrollbarsComponent
|
||||
element="div"
|
||||
:options="{ scrollbars: { autoHide: 'scroll' } }"
|
||||
class="h-full w-full"
|
||||
defer
|
||||
>
|
||||
<VTabbar
|
||||
v-model:active-id="activeTab"
|
||||
class="sticky top-0 z-10 !rounded-none"
|
||||
:items="[
|
||||
{ id: 'unread', label: $t('core.notification.tabs.unread') },
|
||||
{ id: 'read', label: $t('core.notification.tabs.read') },
|
||||
]"
|
||||
type="outline"
|
||||
@change="selectedNotificationName = undefined"
|
||||
></VTabbar>
|
||||
<VLoading v-if="isLoading" />
|
||||
<Transition
|
||||
v-else-if="!notifications?.items.length"
|
||||
appear
|
||||
name="fade"
|
||||
>
|
||||
<VEmpty
|
||||
:title="`${
|
||||
activeTab === 'unread'
|
||||
? $t('core.notification.empty.titles.unread')
|
||||
: $t('core.notification.empty.titles.read')
|
||||
}`"
|
||||
>
|
||||
<template #actions>
|
||||
<VButton :loading="isFetching && !isLoading" @click="refetch">
|
||||
{{ $t("core.common.buttons.refresh") }}
|
||||
</VButton>
|
||||
</template>
|
||||
</VEmpty>
|
||||
</Transition>
|
||||
<Transition v-else appear name="fade">
|
||||
<ul
|
||||
class="box-border h-full w-full divide-y divide-gray-100"
|
||||
role="list"
|
||||
>
|
||||
<li
|
||||
v-for="notification in notifications?.items"
|
||||
:key="notification.metadata.name"
|
||||
@click="selectedNotificationName = notification.metadata.name"
|
||||
>
|
||||
<NotificationListItem
|
||||
:notification="notification"
|
||||
:is-selected="
|
||||
selectedNotificationName === notification.metadata.name
|
||||
"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</Transition>
|
||||
</OverlayScrollbarsComponent>
|
||||
</div>
|
||||
<div class="col-span-12 sm:col-span-6 lg:col-span-7 xl:col-span-9">
|
||||
<NotificationContent :notification="selectedNotification" />
|
||||
</div>
|
||||
</div>
|
||||
</VCard>
|
||||
</div>
|
||||
</template>
|
|
@ -0,0 +1,43 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Notification } from "@halo-dev/api-client";
|
||||
import { computed } from "vue";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
notification?: Notification;
|
||||
}>(),
|
||||
{ notification: undefined }
|
||||
);
|
||||
|
||||
const htmlContent = computed(() => {
|
||||
const styles = `
|
||||
<style>
|
||||
html {
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
</style>
|
||||
`;
|
||||
|
||||
if (!props.notification?.spec?.htmlContent) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return styles + props.notification?.spec?.htmlContent;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full w-full overflow-auto">
|
||||
<OverlayScrollbarsComponent
|
||||
element="div"
|
||||
:options="{ scrollbars: { autoHide: 'scroll' } }"
|
||||
class="h-full w-full"
|
||||
defer
|
||||
>
|
||||
<iframe class="h-full w-full p-2" :srcdoc="htmlContent"></iframe>
|
||||
</OverlayScrollbarsComponent>
|
||||
</div>
|
||||
</template>
|
|
@ -0,0 +1,91 @@
|
|||
<script lang="ts" setup>
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import { relativeTimeTo } from "@/utils/date";
|
||||
import type { Notification } from "@halo-dev/api-client";
|
||||
import { useMutation, useQueryClient } from "@tanstack/vue-query";
|
||||
import { watch } from "vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
notification: Notification;
|
||||
isSelected: boolean;
|
||||
}>(),
|
||||
{}
|
||||
);
|
||||
|
||||
const { currentUser } = useUserStore();
|
||||
|
||||
const isRead = ref();
|
||||
|
||||
const { mutate: handleMarkAsRead } = useMutation({
|
||||
mutationKey: ["notification-mark-as-read"],
|
||||
mutationFn: async ({ refetch }: { refetch: boolean }) => {
|
||||
const { data } = await apiClient.notification.markNotificationAsRead({
|
||||
name: props.notification.metadata.name,
|
||||
username: currentUser?.metadata.name as string,
|
||||
});
|
||||
|
||||
if (refetch) {
|
||||
await queryClient.invalidateQueries({ queryKey: ["user-notifications"] });
|
||||
}
|
||||
|
||||
return data;
|
||||
},
|
||||
onSuccess() {
|
||||
isRead.value = true;
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.isSelected,
|
||||
(value) => {
|
||||
if (value && props.notification.spec?.unread) {
|
||||
handleMarkAsRead({ refetch: false });
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div
|
||||
class="group relative flex cursor-pointer flex-col gap-2 p-4"
|
||||
:class="{ 'bg-gray-50': isSelected }"
|
||||
>
|
||||
<div
|
||||
v-if="isSelected"
|
||||
class="absolute inset-y-0 left-0 w-0.5 bg-primary"
|
||||
></div>
|
||||
<div
|
||||
class="truncate text-sm"
|
||||
:class="{ 'font-semibold': notification.spec?.unread && !isRead }"
|
||||
>
|
||||
{{ notification.spec?.title }}
|
||||
</div>
|
||||
<div
|
||||
v-if="notification.spec?.rawContent"
|
||||
class="truncate text-xs text-gray-600"
|
||||
>
|
||||
{{ notification.spec.rawContent }}
|
||||
</div>
|
||||
<div class="flex h-6 items-end justify-between">
|
||||
<div class="text-xs text-gray-600">
|
||||
{{ relativeTimeTo(notification.metadata.creationTimestamp) }}
|
||||
</div>
|
||||
<div class="hidden group-hover:block">
|
||||
<span
|
||||
v-if="notification.spec?.unread && !isRead"
|
||||
class="text-sm text-gray-600 hover:text-gray-900"
|
||||
@click.stop="handleMarkAsRead({ refetch: true })"
|
||||
>
|
||||
{{ $t("core.notification.operations.mark_as_read.button") }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
|
@ -8,10 +8,13 @@ import Login from "./Login.vue";
|
|||
import { IconUserSettings } from "@halo-dev/components";
|
||||
import { markRaw } from "vue";
|
||||
import Binding from "./Binding.vue";
|
||||
import Notifications from "./Notifications.vue";
|
||||
import NotificationWidget from "./widgets/NotificationWidget.vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {
|
||||
UserStatsWidget,
|
||||
NotificationWidget,
|
||||
},
|
||||
routes: [
|
||||
{
|
||||
|
@ -72,6 +75,20 @@ export default definePlugin({
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "-/notifications",
|
||||
component: BasicLayout,
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "UserNotifications",
|
||||
component: Notifications,
|
||||
meta: {
|
||||
title: "core.notification.title",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
<script lang="ts" setup>
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import { relativeTimeTo } from "@/utils/date";
|
||||
import {
|
||||
VButton,
|
||||
VCard,
|
||||
VEmpty,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VLoading,
|
||||
} from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
|
||||
const { currentUser } = useUserStore();
|
||||
|
||||
const {
|
||||
data: notifications,
|
||||
isLoading,
|
||||
refetch,
|
||||
isFetching,
|
||||
} = useQuery({
|
||||
queryKey: ["user-notifications"],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiClient.notification.listUserNotifications({
|
||||
username: currentUser?.metadata.name as string,
|
||||
page: 1,
|
||||
size: 20,
|
||||
unRead: true,
|
||||
});
|
||||
|
||||
return data.items;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VCard
|
||||
:body-class="['h-full', '@container', '!p-0', '!overflow-auto']"
|
||||
class="h-full"
|
||||
:title="$t('core.notification.title')"
|
||||
>
|
||||
<template #actions>
|
||||
<div style="padding: 12px 16px">
|
||||
<RouterLink
|
||||
class="text-sm text-gray-600 hover:text-gray-900"
|
||||
:to="{ name: 'UserNotifications' }"
|
||||
>
|
||||
{{ $t("core.common.buttons.view_all") }}
|
||||
</RouterLink>
|
||||
</div>
|
||||
</template>
|
||||
<VLoading v-if="isLoading" />
|
||||
<VEmpty
|
||||
v-else-if="!notifications?.length"
|
||||
:title="$t('core.notification.empty.titles.unread')"
|
||||
>
|
||||
<template #actions>
|
||||
<VButton :loading="isFetching" @click="refetch">
|
||||
{{ $t("core.common.buttons.refresh") }}
|
||||
</VButton>
|
||||
</template>
|
||||
</VEmpty>
|
||||
<OverlayScrollbarsComponent
|
||||
v-else
|
||||
element="div"
|
||||
:options="{ scrollbars: { autoHide: 'scroll' } }"
|
||||
class="h-full w-full"
|
||||
defer
|
||||
>
|
||||
<ul class="box-border h-full w-full divide-y divide-gray-100" role="list">
|
||||
<li
|
||||
v-for="notification in notifications"
|
||||
:key="notification.metadata.name"
|
||||
>
|
||||
<VEntity>
|
||||
<template #start>
|
||||
<VEntityField
|
||||
:title="notification.spec?.title"
|
||||
:route="{
|
||||
name: 'UserNotifications',
|
||||
query: { name: notification.metadata.name },
|
||||
}"
|
||||
:description="notification.spec?.rawContent"
|
||||
/>
|
||||
</template>
|
||||
<template #end>
|
||||
<VEntityField>
|
||||
<template #description>
|
||||
<span class="truncate text-xs tabular-nums text-gray-500">
|
||||
{{
|
||||
relativeTimeTo(notification.metadata.creationTimestamp)
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</VEntityField>
|
||||
</template>
|
||||
</VEntity>
|
||||
</li>
|
||||
</ul>
|
||||
</OverlayScrollbarsComponent>
|
||||
</VCard>
|
||||
</template>
|
|
@ -11,6 +11,8 @@ import {
|
|||
ApiConsoleHaloRunV1alpha1IndicesApi,
|
||||
ApiConsoleHaloRunV1alpha1AuthProviderApi,
|
||||
ApiConsoleHaloRunV1alpha1SystemApi,
|
||||
ApiConsoleHaloRunV1alpha1NotifierApi,
|
||||
ApiNotificationHaloRunV1alpha1NotificationApi,
|
||||
ContentHaloRunV1alpha1CategoryApi,
|
||||
ContentHaloRunV1alpha1CommentApi,
|
||||
ContentHaloRunV1alpha1PostApi,
|
||||
|
@ -40,6 +42,7 @@ import {
|
|||
ApiHaloRunV1alpha1UserApi,
|
||||
MigrationHaloRunV1alpha1BackupApi,
|
||||
ApiConsoleMigrationHaloRunV1alpha1MigrationApi,
|
||||
NotificationHaloRunV1alpha1NotifierDescriptorApi,
|
||||
ApiSecurityHaloRunV1alpha1PersonalAccessTokenApi,
|
||||
SecurityHaloRunV1alpha1PersonalAccessTokenApi,
|
||||
} from "@halo-dev/api-client";
|
||||
|
@ -180,6 +183,11 @@ function setupApiClient(axios: AxiosInstance) {
|
|||
axios
|
||||
),
|
||||
backup: new MigrationHaloRunV1alpha1BackupApi(undefined, baseURL, axios),
|
||||
notifierDescriptors: new NotificationHaloRunV1alpha1NotifierDescriptorApi(
|
||||
undefined,
|
||||
baseURL,
|
||||
axios
|
||||
),
|
||||
pat: new SecurityHaloRunV1alpha1PersonalAccessTokenApi(
|
||||
undefined,
|
||||
baseURL,
|
||||
|
@ -221,6 +229,16 @@ function setupApiClient(axios: AxiosInstance) {
|
|||
axios
|
||||
),
|
||||
system: new ApiConsoleHaloRunV1alpha1SystemApi(undefined, baseURL, axios),
|
||||
notifier: new ApiConsoleHaloRunV1alpha1NotifierApi(
|
||||
undefined,
|
||||
baseURL,
|
||||
axios
|
||||
),
|
||||
notification: new ApiNotificationHaloRunV1alpha1NotificationApi(
|
||||
undefined,
|
||||
baseURL,
|
||||
axios
|
||||
),
|
||||
pat: new ApiSecurityHaloRunV1alpha1PersonalAccessTokenApi(
|
||||
undefined,
|
||||
baseURL,
|
||||
|
|
Loading…
Reference in New Issue