@harnessio/react-har-service-client 0.0.2

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 (110) hide show
  1. package/README.md +39 -0
  2. package/dist/fetcher/index.d.ts +17 -0
  3. package/dist/fetcher/index.js +65 -0
  4. package/dist/har-service/src/index.d.ts +6 -0
  5. package/dist/har-service/src/index.js +10 -0
  6. package/dist/har-service/src/services/helpers.d.ts +14 -0
  7. package/dist/har-service/src/services/helpers.js +1 -0
  8. package/dist/har-service/src/services/hooks/useCreateRepositoryMutation.d.ts +27 -0
  9. package/dist/har-service/src/services/hooks/useCreateRepositoryMutation.js +14 -0
  10. package/dist/har-service/src/services/hooks/useCreateUpstreamProxyMutation.d.ts +27 -0
  11. package/dist/har-service/src/services/hooks/useCreateUpstreamProxyMutation.js +14 -0
  12. package/dist/har-service/src/services/hooks/useDeleteRepositoryMutation.d.ts +28 -0
  13. package/dist/har-service/src/services/hooks/useDeleteRepositoryMutation.js +14 -0
  14. package/dist/har-service/src/services/hooks/useDeleteUpstreamProxyMutation.d.ts +28 -0
  15. package/dist/har-service/src/services/hooks/useDeleteUpstreamProxyMutation.js +14 -0
  16. package/dist/har-service/src/services/hooks/useGetAllArtifactsForRepositoryQuery.d.ts +32 -0
  17. package/dist/har-service/src/services/hooks/useGetAllArtifactsForRepositoryQuery.js +14 -0
  18. package/dist/har-service/src/services/hooks/useGetAllArtifactsQuery.d.ts +29 -0
  19. package/dist/har-service/src/services/hooks/useGetAllArtifactsQuery.js +14 -0
  20. package/dist/har-service/src/services/hooks/useGetAllRepositoriesQuery.d.ts +29 -0
  21. package/dist/har-service/src/services/hooks/useGetAllRepositoriesQuery.js +14 -0
  22. package/dist/har-service/src/services/hooks/useGetAllUpstreamProxiesQuery.d.ts +29 -0
  23. package/dist/har-service/src/services/hooks/useGetAllUpstreamProxiesQuery.js +14 -0
  24. package/dist/har-service/src/services/hooks/useGetAllVersionsForArtifactQuery.d.ts +27 -0
  25. package/dist/har-service/src/services/hooks/useGetAllVersionsForArtifactQuery.js +14 -0
  26. package/dist/har-service/src/services/hooks/useGetRepositoryQuery.d.ts +28 -0
  27. package/dist/har-service/src/services/hooks/useGetRepositoryQuery.js +14 -0
  28. package/dist/har-service/src/services/hooks/useGetUpstreamProxyQuery.d.ts +28 -0
  29. package/dist/har-service/src/services/hooks/useGetUpstreamProxyQuery.js +14 -0
  30. package/dist/har-service/src/services/hooks/useModifyRepositoryMutation.d.ts +32 -0
  31. package/dist/har-service/src/services/hooks/useModifyRepositoryMutation.js +14 -0
  32. package/dist/har-service/src/services/hooks/useModifyUpstreamProxyMutation.d.ts +32 -0
  33. package/dist/har-service/src/services/hooks/useModifyUpstreamProxyMutation.js +14 -0
  34. package/dist/har-service/src/services/index.d.ts +64 -0
  35. package/dist/har-service/src/services/index.js +13 -0
  36. package/dist/har-service/src/services/requestBodies/RepositoryRequestRequestBody.d.ts +2 -0
  37. package/dist/har-service/src/services/requestBodies/RepositoryRequestRequestBody.js +1 -0
  38. package/dist/har-service/src/services/requestBodies/UpstreamProxyRequestRequestBody.d.ts +2 -0
  39. package/dist/har-service/src/services/requestBodies/UpstreamProxyRequestRequestBody.js +1 -0
  40. package/dist/har-service/src/services/responses/BadRequestResponse.d.ts +2 -0
  41. package/dist/har-service/src/services/responses/BadRequestResponse.js +1 -0
  42. package/dist/har-service/src/services/responses/InternalServerErrorResponse.d.ts +2 -0
  43. package/dist/har-service/src/services/responses/InternalServerErrorResponse.js +1 -0
  44. package/dist/har-service/src/services/responses/ListArtifactResponseResponse.d.ts +6 -0
  45. package/dist/har-service/src/services/responses/ListArtifactResponseResponse.js +1 -0
  46. package/dist/har-service/src/services/responses/ListArtifactVersionResponseResponse.d.ts +6 -0
  47. package/dist/har-service/src/services/responses/ListArtifactVersionResponseResponse.js +1 -0
  48. package/dist/har-service/src/services/responses/ListRepositoryResponseResponse.d.ts +6 -0
  49. package/dist/har-service/src/services/responses/ListRepositoryResponseResponse.js +1 -0
  50. package/dist/har-service/src/services/responses/ListUpstreamProxyResponseResponse.d.ts +6 -0
  51. package/dist/har-service/src/services/responses/ListUpstreamProxyResponseResponse.js +1 -0
  52. package/dist/har-service/src/services/responses/NotFoundResponse.d.ts +2 -0
  53. package/dist/har-service/src/services/responses/NotFoundResponse.js +1 -0
  54. package/dist/har-service/src/services/responses/RepositoryResponseResponse.d.ts +6 -0
  55. package/dist/har-service/src/services/responses/RepositoryResponseResponse.js +1 -0
  56. package/dist/har-service/src/services/responses/SuccessResponse.d.ts +4 -0
  57. package/dist/har-service/src/services/responses/SuccessResponse.js +1 -0
  58. package/dist/har-service/src/services/responses/UnauthenticatedResponse.d.ts +2 -0
  59. package/dist/har-service/src/services/responses/UnauthenticatedResponse.js +1 -0
  60. package/dist/har-service/src/services/responses/UnauthorizedResponse.d.ts +2 -0
  61. package/dist/har-service/src/services/responses/UnauthorizedResponse.js +1 -0
  62. package/dist/har-service/src/services/responses/UpstreamProxyResponseResponse.d.ts +6 -0
  63. package/dist/har-service/src/services/responses/UpstreamProxyResponseResponse.js +1 -0
  64. package/dist/har-service/src/services/schemas/Anonymous.d.ts +2 -0
  65. package/dist/har-service/src/services/schemas/Anonymous.js +4 -0
  66. package/dist/har-service/src/services/schemas/ArtifactMetadata.d.ts +11 -0
  67. package/dist/har-service/src/services/schemas/ArtifactMetadata.js +4 -0
  68. package/dist/har-service/src/services/schemas/ArtifactVersionMetadata.d.ts +14 -0
  69. package/dist/har-service/src/services/schemas/ArtifactVersionMetadata.js +4 -0
  70. package/dist/har-service/src/services/schemas/AuthType.d.ts +4 -0
  71. package/dist/har-service/src/services/schemas/AuthType.js +4 -0
  72. package/dist/har-service/src/services/schemas/Error.d.ts +17 -0
  73. package/dist/har-service/src/services/schemas/Error.js +4 -0
  74. package/dist/har-service/src/services/schemas/Label.d.ts +6 -0
  75. package/dist/har-service/src/services/schemas/Label.js +4 -0
  76. package/dist/har-service/src/services/schemas/ListArtifact.d.ts +30 -0
  77. package/dist/har-service/src/services/schemas/ListArtifact.js +1 -0
  78. package/dist/har-service/src/services/schemas/ListArtifactVersion.d.ts +30 -0
  79. package/dist/har-service/src/services/schemas/ListArtifactVersion.js +1 -0
  80. package/dist/har-service/src/services/schemas/ListRepository.d.ts +30 -0
  81. package/dist/har-service/src/services/schemas/ListRepository.js +1 -0
  82. package/dist/har-service/src/services/schemas/ListUpstreamProxy.d.ts +30 -0
  83. package/dist/har-service/src/services/schemas/ListUpstreamProxy.js +1 -0
  84. package/dist/har-service/src/services/schemas/PackageType.d.ts +4 -0
  85. package/dist/har-service/src/services/schemas/PackageType.js +4 -0
  86. package/dist/har-service/src/services/schemas/Repository.d.ts +20 -0
  87. package/dist/har-service/src/services/schemas/Repository.js +1 -0
  88. package/dist/har-service/src/services/schemas/RepositoryCleanupPolicy.d.ts +8 -0
  89. package/dist/har-service/src/services/schemas/RepositoryCleanupPolicy.js +4 -0
  90. package/dist/har-service/src/services/schemas/RepositoryConfig.d.ts +9 -0
  91. package/dist/har-service/src/services/schemas/RepositoryConfig.js +1 -0
  92. package/dist/har-service/src/services/schemas/RepositoryMetadata.d.ts +18 -0
  93. package/dist/har-service/src/services/schemas/RepositoryMetadata.js +1 -0
  94. package/dist/har-service/src/services/schemas/RepositoryRequest.d.ts +14 -0
  95. package/dist/har-service/src/services/schemas/RepositoryRequest.js +1 -0
  96. package/dist/har-service/src/services/schemas/Status.d.ts +4 -0
  97. package/dist/har-service/src/services/schemas/Status.js +4 -0
  98. package/dist/har-service/src/services/schemas/Type.d.ts +4 -0
  99. package/dist/har-service/src/services/schemas/Type.js +4 -0
  100. package/dist/har-service/src/services/schemas/UpstreamProxy.d.ts +15 -0
  101. package/dist/har-service/src/services/schemas/UpstreamProxy.js +1 -0
  102. package/dist/har-service/src/services/schemas/UpstreamProxyConfig.d.ts +10 -0
  103. package/dist/har-service/src/services/schemas/UpstreamProxyConfig.js +1 -0
  104. package/dist/har-service/src/services/schemas/UpstreamProxyMetadata.d.ts +10 -0
  105. package/dist/har-service/src/services/schemas/UpstreamProxyMetadata.js +1 -0
  106. package/dist/har-service/src/services/schemas/UpstreamProxyRequest.d.ts +10 -0
  107. package/dist/har-service/src/services/schemas/UpstreamProxyRequest.js +1 -0
  108. package/dist/har-service/src/services/schemas/UserPassword.d.ts +4 -0
  109. package/dist/har-service/src/services/schemas/UserPassword.js +4 -0
  110. package/package.json +31 -0
@@ -0,0 +1,20 @@
1
+ import type { RepositoryConfig } from '../schemas/RepositoryConfig';
2
+ import type { Label } from '../schemas/Label';
3
+ import type { PackageType } from '../schemas/PackageType';
4
+ import type { Type } from '../schemas/Type';
5
+ /**
6
+ * Harness Artifact Repository
7
+ */
8
+ export interface Repository {
9
+ config?: RepositoryConfig;
10
+ createdAt?: string;
11
+ description?: string;
12
+ excludesPattern?: string[];
13
+ includesPattern?: string[];
14
+ labels?: Label;
15
+ modifiedAt?: string;
16
+ packageType: PackageType;
17
+ repoKey: string;
18
+ type: Type;
19
+ url: string;
20
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Cleanup Policy for Harness Artifact Repositories
3
+ */
4
+ export interface RepositoryCleanupPolicy {
5
+ count?: number;
6
+ days?: number;
7
+ patterns?: string[];
8
+ }
@@ -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 {};
@@ -0,0 +1,9 @@
1
+ import type { RepositoryCleanupPolicy } from '../schemas/RepositoryCleanupPolicy';
2
+ /**
3
+ * Configuration for Harness Local Artifact Repositories
4
+ */
5
+ export interface RepositoryConfig {
6
+ cleanupEnabled?: boolean;
7
+ cleanupPolicy?: RepositoryCleanupPolicy;
8
+ upstreamProxies?: string[];
9
+ }
@@ -0,0 +1,18 @@
1
+ import type { Label } from '../schemas/Label';
2
+ import type { PackageType } from '../schemas/PackageType';
3
+ import type { Type } from '../schemas/Type';
4
+ /**
5
+ * Harness Artifact Repository Metadata
6
+ */
7
+ export interface RepositoryMetadata {
8
+ artifactsCount?: number;
9
+ downloadsCount?: number;
10
+ labels?: Label;
11
+ lastModified?: string;
12
+ packageType: PackageType;
13
+ repoKey: string;
14
+ repoSize?: string;
15
+ type: Type;
16
+ upstreamProxiesCount?: number;
17
+ url: string;
18
+ }
@@ -0,0 +1,14 @@
1
+ import type { RepositoryConfig } from '../schemas/RepositoryConfig';
2
+ import type { Label } from '../schemas/Label';
3
+ import type { PackageType } from '../schemas/PackageType';
4
+ import type { Type } from '../schemas/Type';
5
+ export interface RepositoryRequest {
6
+ config?: RepositoryConfig;
7
+ description?: string;
8
+ excludesPattern?: string[];
9
+ includesPattern?: string[];
10
+ labels?: Label;
11
+ packageType: PackageType;
12
+ repoKey: string;
13
+ type: Type;
14
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Indicates if the request was successful or not
3
+ */
4
+ export type Status = 'ERROR' | 'FAILURE' | 'SUCCESS';
@@ -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 {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * refers to type of repo i.e local, remote or virtual
3
+ */
4
+ export type Type = 'LOCAL' | 'REMOTE' | 'VIRTUAL';
@@ -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 {};
@@ -0,0 +1,15 @@
1
+ import type { UpstreamProxyConfig } from '../schemas/UpstreamProxyConfig';
2
+ import type { PackageType } from '../schemas/PackageType';
3
+ /**
4
+ * Harness Artifact UpstreamProxy
5
+ */
6
+ export interface UpstreamProxy {
7
+ config: UpstreamProxyConfig;
8
+ createdAt?: string;
9
+ excludesPattern?: string[];
10
+ includesPattern?: string[];
11
+ modifiedAt?: string;
12
+ packageType: PackageType;
13
+ repoKey: string;
14
+ url: string;
15
+ }
@@ -0,0 +1,10 @@
1
+ import type { UserPassword } from '../schemas/UserPassword';
2
+ import type { Anonymous } from '../schemas/Anonymous';
3
+ import type { AuthType } from '../schemas/AuthType';
4
+ /**
5
+ * Configuration for Harness Artifact UpstreamProxies
6
+ */
7
+ export interface UpstreamProxyConfig {
8
+ auth?: UserPassword & Anonymous;
9
+ authType: AuthType;
10
+ }
@@ -0,0 +1,10 @@
1
+ import type { PackageType } from '../schemas/PackageType';
2
+ /**
3
+ * Harness Artifact UpstreamProxy Metadata
4
+ */
5
+ export interface UpstreamProxyMetadata {
6
+ lastModified?: string;
7
+ packageType: PackageType;
8
+ repoKey: string;
9
+ url: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ import type { UpstreamProxyConfig } from '../schemas/UpstreamProxyConfig';
2
+ import type { PackageType } from '../schemas/PackageType';
3
+ export interface UpstreamProxyRequest {
4
+ config: UpstreamProxyConfig;
5
+ excludesPattern?: string[];
6
+ includesPattern?: string[];
7
+ packageType: PackageType;
8
+ repoKey: string;
9
+ url: string;
10
+ }
@@ -0,0 +1,4 @@
1
+ export interface UserPassword {
2
+ password: string;
3
+ userName: string;
4
+ }
@@ -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 {};
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@harnessio/react-har-service-client",
3
+ "version": "0.0.2",
4
+ "description": "Harness HAR Service APIs integrated with react hooks",
5
+ "author": "Harness Inc",
6
+ "license": "MIT",
7
+ "source": "src/index.ts",
8
+ "main": "./dist/har-service/src/index.js",
9
+ "exports": {
10
+ ".": "./dist/har-service/src/index.js"
11
+ },
12
+ "types": "./dist/har-service/src/index.d.ts",
13
+ "files": [
14
+ "dist/*"
15
+ ],
16
+ "homepage": "https://github.com/harness/react-api-client",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/harness/react-api-client.git"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/harness/react-api-client/issues"
23
+ },
24
+ "keywords": [],
25
+ "scripts": {
26
+ "prebuild": "rimraf dist",
27
+ "build": "yarn generate && tsc",
28
+ "generate": "oats import --config='./oats.config.ts'",
29
+ "fmt": "prettier --write ./index.ts"
30
+ }
31
+ }