@harnessio/react-idp-service-client 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/services/hooks/useGetPluginsInfoPluginIdQuery.d.ts +1 -1
  2. package/dist/services/hooks/useInsertPluginAppConfigMutation.d.ts +19 -0
  3. package/dist/services/hooks/useInsertPluginAppConfigMutation.js +14 -0
  4. package/dist/services/hooks/useTogglePluginForAccountMutation.d.ts +2 -2
  5. package/dist/services/hooks/useTogglePluginForAccountMutation.js +1 -1
  6. package/dist/services/index.d.ts +5 -0
  7. package/dist/services/index.js +1 -0
  8. package/dist/services/requestBodies/AppConfigRequestRequestBody.d.ts +2 -0
  9. package/dist/services/requestBodies/AppConfigRequestRequestBody.js +1 -0
  10. package/dist/services/schemas/AppConfig.d.ts +6 -6
  11. package/dist/services/schemas/AppConfigRequest.d.ts +4 -0
  12. package/dist/services/schemas/AppConfigRequest.js +1 -0
  13. package/dist/services/schemas/AppConfigResponse.d.ts +1 -1
  14. package/dist/services/schemas/CatalogConnectorInfo.d.ts +2 -2
  15. package/dist/services/schemas/EntitiesForImport.d.ts +1 -1
  16. package/dist/services/schemas/Exports.d.ts +5 -0
  17. package/dist/services/schemas/Exports.js +4 -0
  18. package/dist/services/schemas/HarnessBackstageEntities.d.ts +1 -1
  19. package/dist/services/schemas/HarnessEntitiesResponse.d.ts +4 -4
  20. package/dist/services/schemas/ImportHarnessEntitiesRequest.d.ts +2 -2
  21. package/dist/services/schemas/LayoutRequest.d.ts +2 -2
  22. package/dist/services/schemas/PluginDetailedInfo.d.ts +4 -8
  23. package/dist/services/schemas/PluginDetailedInfoResponse.d.ts +1 -1
  24. package/dist/services/schemas/PluginInfo.d.ts +10 -5
  25. package/dist/services/schemas/PluginInfoResponse.d.ts +1 -1
  26. package/dist/services/schemas/StatusInfo.d.ts +2 -2
  27. package/package.json +1 -1
@@ -3,7 +3,7 @@ import type { PluginDetailedInfoResponseResponse } from '../responses/PluginDeta
3
3
  import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from './../../fetcher';
5
5
  export interface GetPluginsInfoPluginIdQueryPathParams {
6
- 'plugin-id': 'harness-ci-cd' | 'pager-duty' | 'snyk-security';
6
+ 'plugin-id': 'github-pull-requests-board' | 'harness-ci-cd' | 'pager-duty' | 'snyk-security';
7
7
  }
8
8
  export interface GetPluginsInfoPluginIdQueryHeaderParams {
9
9
  'Harness-Account'?: string;
@@ -0,0 +1,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { AppConfigResponseResponse } from '../responses/AppConfigResponseResponse';
3
+ import type { AppConfigRequestRequestBody } from '../requestBodies/AppConfigRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from './../../fetcher';
6
+ export interface InsertPluginAppConfigMutationHeaderParams {
7
+ 'Harness-Account'?: string;
8
+ }
9
+ export type InsertPluginAppConfigRequestBody = AppConfigRequestRequestBody;
10
+ export type InsertPluginAppConfigOkResponse = ResponseWithPagination<AppConfigResponseResponse>;
11
+ export type InsertPluginAppConfigErrorResponse = unknown;
12
+ export interface InsertPluginAppConfigProps extends Omit<FetcherOptions<unknown, InsertPluginAppConfigRequestBody, InsertPluginAppConfigMutationHeaderParams>, 'url'> {
13
+ body: InsertPluginAppConfigRequestBody;
14
+ }
15
+ export declare function insertPluginAppConfig(props: InsertPluginAppConfigProps): Promise<InsertPluginAppConfigOkResponse>;
16
+ /**
17
+ * Insert Plugin Config
18
+ */
19
+ export declare function useInsertPluginAppConfigMutation(options?: Omit<UseMutationOptions<InsertPluginAppConfigOkResponse, InsertPluginAppConfigErrorResponse, InsertPluginAppConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<InsertPluginAppConfigOkResponse, unknown, InsertPluginAppConfigProps, unknown>;
@@ -0,0 +1,14 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ import { useMutation } from '@tanstack/react-query';
5
+ import { fetcher } from './../../fetcher';
6
+ export function insertPluginAppConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/app-config`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Insert Plugin Config
11
+ */
12
+ export function useInsertPluginAppConfigMutation(options) {
13
+ return useMutation((mutateProps) => insertPluginAppConfig(mutateProps), options);
14
+ }
@@ -6,7 +6,7 @@ export interface TogglePluginForAccountMutationPathParams {
6
6
  'plugin-id': string;
7
7
  }
8
8
  export interface TogglePluginForAccountMutationQueryParams {
9
- enabled?: boolean;
9
+ enabled: boolean;
10
10
  }
11
11
  export interface TogglePluginForAccountMutationHeaderParams {
12
12
  'Harness-Account'?: string;
@@ -18,6 +18,6 @@ export interface TogglePluginForAccountProps extends TogglePluginForAccountMutat
18
18
  }
19
19
  export declare function togglePluginForAccount(props: TogglePluginForAccountProps): Promise<TogglePluginForAccountOkResponse>;
20
20
  /**
21
- *
21
+ * Toggle Backstage Plugin
22
22
  */
23
23
  export declare function useTogglePluginForAccountMutation(options?: Omit<UseMutationOptions<TogglePluginForAccountOkResponse, TogglePluginForAccountErrorResponse, TogglePluginForAccountProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<TogglePluginForAccountOkResponse, unknown, TogglePluginForAccountProps, unknown>;
@@ -7,7 +7,7 @@ export function togglePluginForAccount(props) {
7
7
  return fetcher(Object.assign({ url: `/v1/plugin-toggle/${props['plugin-id']}`, method: 'POST' }, props));
8
8
  }
9
9
  /**
10
- *
10
+ * Toggle Backstage Plugin
11
11
  */
12
12
  export function useTogglePluginForAccountMutation(options) {
13
13
  return useMutation((mutateProps) => togglePluginForAccount(mutateProps), options);
@@ -19,10 +19,13 @@ export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, G
19
19
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
20
20
  export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
21
21
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
22
+ export type { InsertPluginAppConfigErrorResponse, InsertPluginAppConfigOkResponse, InsertPluginAppConfigProps, InsertPluginAppConfigRequestBody, } from './hooks/useInsertPluginAppConfigMutation';
23
+ export { insertPluginAppConfig, useInsertPluginAppConfigMutation, } from './hooks/useInsertPluginAppConfigMutation';
22
24
  export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
23
25
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
24
26
  export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
25
27
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
28
+ export type { AppConfigRequestRequestBody } from './requestBodies/AppConfigRequestRequestBody';
26
29
  export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
27
30
  export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
28
31
  export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
@@ -34,6 +37,7 @@ export type { PluginDetailedInfoResponseResponse } from './responses/PluginDetai
34
37
  export type { PluginInfoResponseListResponse } from './responses/PluginInfoResponseListResponse';
35
38
  export type { StatusInfoResponseResponse } from './responses/StatusInfoResponseResponse';
36
39
  export type { AppConfig } from './schemas/AppConfig';
40
+ export type { AppConfigRequest } from './schemas/AppConfigRequest';
37
41
  export type { AppConfigResponse } from './schemas/AppConfigResponse';
38
42
  export type { BackstagePermissions } from './schemas/BackstagePermissions';
39
43
  export type { BackstagePermissionsRequest } from './schemas/BackstagePermissionsRequest';
@@ -41,6 +45,7 @@ export type { BackstagePermissionsResponse } from './schemas/BackstagePermission
41
45
  export type { CatalogConnectorInfo } from './schemas/CatalogConnectorInfo';
42
46
  export type { ConnectorDetails } from './schemas/ConnectorDetails';
43
47
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
48
+ export type { Exports } from './schemas/Exports';
44
49
  export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
45
50
  export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
46
51
  export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
@@ -8,5 +8,6 @@ export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks
8
8
  export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
9
9
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
10
10
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
11
+ export { insertPluginAppConfig, useInsertPluginAppConfigMutation, } from './hooks/useInsertPluginAppConfigMutation';
11
12
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
12
13
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
@@ -0,0 +1,2 @@
1
+ import type { AppConfigRequest } from '../schemas/AppConfigRequest';
2
+ export type AppConfigRequestRequestBody = AppConfigRequest;
@@ -1,17 +1,17 @@
1
1
  export interface AppConfig {
2
- configId?: string;
3
- configs?: string;
2
+ config_id: string;
3
+ configs: string;
4
4
  /**
5
5
  * @format int64
6
6
  */
7
- createdAt?: number;
8
- enabled?: boolean;
7
+ created?: number;
8
+ enabled: boolean;
9
9
  /**
10
10
  * @format int64
11
11
  */
12
- enabledDisabledAt?: number;
12
+ enabled_disabled_at?: number;
13
13
  /**
14
14
  * @format int64
15
15
  */
16
- lastModifiedAt?: number;
16
+ updated?: number;
17
17
  }
@@ -0,0 +1,4 @@
1
+ import type { AppConfig } from '../schemas/AppConfig';
2
+ export interface AppConfigRequest {
3
+ app_config: AppConfig;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
1
  import type { AppConfig } from '../schemas/AppConfig';
2
2
  export interface AppConfigResponse {
3
- appConfig?: AppConfig;
3
+ app_config: AppConfig;
4
4
  }
@@ -4,8 +4,8 @@ import type { ConnectorDetails } from '../schemas/ConnectorDetails';
4
4
  */
5
5
  export interface CatalogConnectorInfo {
6
6
  branch: string;
7
- infraConnector: ConnectorDetails;
7
+ infra_connector: ConnectorDetails;
8
8
  path: string;
9
9
  repo: string;
10
- sourceConnector: ConnectorDetails;
10
+ source_connector: ConnectorDetails;
11
11
  }
@@ -2,6 +2,6 @@
2
2
  * Details of Harness Entities to import
3
3
  */
4
4
  export interface EntitiesForImport {
5
- entityType: string;
5
+ entity_type: string;
6
6
  identifier: string;
7
7
  }
@@ -0,0 +1,5 @@
1
+ export interface Exports {
2
+ cards: number;
3
+ pages: number;
4
+ tab_contents: number;
5
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -2,7 +2,7 @@
2
2
  * Harness entities mapping with backstage entities
3
3
  */
4
4
  export interface HarnessBackstageEntities {
5
- entityType: string;
5
+ entity_type: string;
6
6
  identifier: string;
7
7
  name: string;
8
8
  owner: string;
@@ -3,8 +3,8 @@ import type { HarnessBackstageEntities } from '../schemas/HarnessBackstageEntiti
3
3
  * Response for harness entities mapping with backstage entities
4
4
  */
5
5
  export interface HarnessEntitiesResponse {
6
- harnessBackstageEntities: HarnessBackstageEntities[];
7
- orgCount: number;
8
- projectCount: number;
9
- serviceCount: number;
6
+ harness_backstage_entities: HarnessBackstageEntities[];
7
+ org_count: number;
8
+ project_count: number;
9
+ service_count: number;
10
10
  }
@@ -4,7 +4,7 @@ import type { EntitiesForImport } from '../schemas/EntitiesForImport';
4
4
  * Details of Harness Entities and Catalog Location info
5
5
  */
6
6
  export interface ImportHarnessEntitiesRequest {
7
- allImport?: boolean;
8
- catalogConnectorInfo: CatalogConnectorInfo;
7
+ all_import?: boolean;
8
+ catalog_connector_info: CatalogConnectorInfo;
9
9
  entities: EntitiesForImport[];
10
10
  }
@@ -2,8 +2,8 @@
2
2
  * LayoutRequest
3
3
  */
4
4
  export interface LayoutRequest {
5
- defaultYaml?: string;
6
- displayName?: string;
5
+ default_yaml?: string;
6
+ display_name?: string;
7
7
  id?: string;
8
8
  name?: string;
9
9
  type?: string;
@@ -1,11 +1,7 @@
1
+ import type { Exports } from '../schemas/Exports';
1
2
  import type { PluginInfo } from '../schemas/PluginInfo';
2
3
  export interface PluginDetailedInfo {
3
- category?: 'CI/CD' | 'Monitoring' | 'Security';
4
- config?: string;
5
- description?: string;
6
- layout?: {
7
- [key: string]: any;
8
- };
9
- pluginDetails?: PluginInfo;
10
- source?: string;
4
+ config: string;
5
+ exports: Exports;
6
+ plugin_details: PluginInfo;
11
7
  }
@@ -1,4 +1,4 @@
1
1
  import type { PluginDetailedInfo } from '../schemas/PluginDetailedInfo';
2
2
  export interface PluginDetailedInfoResponse {
3
- plugin?: PluginDetailedInfo;
3
+ plugin: PluginDetailedInfo;
4
4
  }
@@ -1,7 +1,12 @@
1
1
  export interface PluginInfo {
2
- createdBy?: string;
3
- enabled?: boolean;
4
- iconUrl?: string;
5
- id?: string;
6
- name?: string;
2
+ category: 'CI/CD' | 'Monitoring' | 'Security' | 'Source Control Mgmt';
3
+ core: boolean;
4
+ created_by: string;
5
+ description: string;
6
+ enabled: boolean;
7
+ icon_url: string;
8
+ id: string;
9
+ image_url: string;
10
+ name: string;
11
+ source: string;
7
12
  }
@@ -1,4 +1,4 @@
1
1
  import type { PluginInfo } from '../schemas/PluginInfo';
2
2
  export interface PluginInfoResponse {
3
- plugin?: PluginInfo;
3
+ plugin: PluginInfo;
4
4
  }
@@ -1,8 +1,8 @@
1
1
  export interface StatusInfo {
2
- currentStatus?: 'COMPLETED' | 'FAILED' | 'NOT_FOUND' | 'PENDING' | 'RUNNING';
2
+ current_status?: 'COMPLETED' | 'FAILED' | 'NOT_FOUND' | 'PENDING' | 'RUNNING';
3
3
  reason?: string;
4
4
  /**
5
5
  * @format int64
6
6
  */
7
- updatedAt?: number;
7
+ updated_at?: number;
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",