Skip to content

Commit a37c81c

Browse files
committed
Typo fix
1 parent 80007d7 commit a37c81c

File tree

10 files changed

+107
-11
lines changed

10 files changed

+107
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chkp/harmony-endpoint-management-sdk",
3-
"version": "1.1.40",
3+
"version": "1.1.43",
44
"description": "The official Harmony Endpoint management SDK for JavaScript ecosystem",
55
"main": "dist/index.js",
66
"files": [

resources/typescript-axios/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import { Guid } from 'guid-typescript';
1212
import { Configuration } from "./configuration";
1313
1414
{{! TEMPLATE EDIT: import session object type }}
15-
import { HarmonyError, HarmonyErrorScope, SDKConnectionState, InfinityPortalAuth, HarmonyRequestOptions, HarmonyResponse, HarmonyEndpointOptions, HarmonyEndpointSDKInfo } from "../../../inerfaces/infta";
15+
import { HarmonyError, HarmonyErrorScope, SDKConnectionState, InfinityPortalAuth, HarmonyRequestOptions, HarmonyResponse, HarmonyEndpointOptions, HarmonyEndpointSDKInfo } from "../../../interfaces/infra";
1616
import { SessionManager } from "../../../core/session.manager";
1717
import { JobManager } from "../../../core/jobs.management";
1818
import { logger, errorLogger, networkLogger } from "../../../core/debug.logger";
1919
import { RUNNING_ENV } from "../../../core/sdk.platform";
2020
import { parseFetchError } from "../../../core/common";
21-
import { HarmonyRequestSession } from "../../../inerfaces/core";
21+
import { HarmonyRequestSession } from "../../../interfaces/core";
2222
2323
const swagger = require('../swagger.json');
2424
const packageJson = require('../../../../package.json');

src/core/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Duration } from 'unitsnet-js';
2-
import { HarmonyError, HarmonyErrorScope } from '../inerfaces/infta';
2+
import { HarmonyError, HarmonyErrorScope } from '../interfaces/infra';
33
import { networkLogger, errorLogger } from './debug.logger';
4-
import { HarmonyRequestSession } from '../inerfaces/core';
4+
import { HarmonyRequestSession } from '../interfaces/core';
55

66
export async function sleep(duration: Duration) {
77
return new Promise<void>((resolve) => {

src/core/harmony.endpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { HarmonyEndpointBase as HarmonyEndpointCloudBase } from '../generated/cl
33
// TODO: Open when on-premise will be release to public
44
// import { HarmonyEndpointBase as HarmonyEndpointPremiseBase } from '../generated/premise/swagger/api';
55
import { HarmonyEndpointBase as HarmonyEndpointSaasBase } from '../generated/saas/swagger/api';
6-
import { HarmonyEndpointSaaSOptions, InfinityPortalAuth } from '../inerfaces/infta';
6+
import { HarmonyEndpointSaaSOptions, InfinityPortalAuth } from '../interfaces/infra';
77

88
export class HarmonyEndpoint extends HarmonyEndpointCloudBase {
99
constructor() {

src/core/jobs.management.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Duration, DurationUnits } from 'unitsnet-js';
22
// eslint-disable-next-line import/no-cycle
33
import { JobStatus } from '../generated/cloud/swagger/api'; // DO NOT IMPORT LOGICAL VARS!!! - This is a cycle import, and it works only due to importing TS interface only, that has no affect on runtime.
4-
import { HarmonyError, HarmonyErrorScope, HarmonyResponse } from '../inerfaces/infta';
4+
import { HarmonyError, HarmonyErrorScope, HarmonyResponse } from '../interfaces/infra';
55
import { sleep } from './common';
66
import { JOBS_PULLING_INTERVAL, MAX_FAILED_PULLING_ATTEMPTS } from './sdk.platform';
77
import { errorLogger, logger } from './debug.logger';

src/core/sdk.platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Duration } from 'unitsnet-js';
2-
import { InfinityPortalRegion } from '../inerfaces/infta';
2+
import { InfinityPortalRegion } from '../interfaces/infra';
33

44
type ENV = 'STG' | 'PROD';
55

src/core/session.manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import {
1313
HarmonyErrorScope,
1414
OnPremisePortalAuth,
1515
HarmonyEndpointSaaSOptions,
16-
} from '../inerfaces/infta';
16+
} from '../interfaces/infra';
1717
import { errorLogger, logger } from './debug.logger';
1818
import { parseFetchError } from './common';
19-
import { ISessionManager } from '../inerfaces/core';
19+
import { ISessionManager } from '../interfaces/core';
2020

2121
const CI_APPLICATION_PATH = '/app/endpoint-web-mgmt';
2222
const EXTERNAL_API_BASE_PATH = '/harmony/endpoint/api';

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export { HarmonyEndpoint, HarmonyEndpointSaaS } from './core/harmony.endpoint';
2-
export * from './inerfaces/infta';
2+
export * from './interfaces/infra';
33
export * as EndpointInterfaces from './generated/cloud/swagger/api';
44
// TODO: Open when on-premise will be release to public
55
// export * as EndpointPremiseInterfaces from './generated/premise/swagger/api';

src/interfaces/core.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Agent } from 'https';
2+
import { HarmonySession } from './infra';
3+
4+
export interface ISessionManager {
5+
baseURL: string;
6+
httpAgent: Agent | undefined;
7+
getHarmonySession: () => HarmonySession | undefined;
8+
}
9+
10+
export interface HarmonyRequestSession {
11+
requestId: string;
12+
sessionManager: ISessionManager;
13+
}

src/interfaces/infra.ts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import { Duration } from 'unitsnet-js';
2+
3+
export interface HarmonyEndpointSDKInfo {
4+
sdkVersion: string;
5+
sdkBuild: string;
6+
releasedOn: string;
7+
spec: string;
8+
specVersion: string;
9+
}
10+
11+
export enum InfinityPortalRegion {
12+
EU_IRELAND = 'eu-west-1',
13+
US_NORTH_VIRGINIA = 'us-east-1',
14+
AP_AUSTRALIA = 'ap-southeast-2',
15+
}
16+
17+
export interface HarmonySession {
18+
infinityToken?: string;
19+
sessionId: string;
20+
harmonyToken?: string;
21+
}
22+
23+
export enum HarmonyErrorScope {
24+
NETWORKING = 'NETWORKING',
25+
SERVICE = 'SERVICE',
26+
SESSION = 'SESSION',
27+
INVALID_PARAMS = 'INVALID_PARAMS',
28+
}
29+
30+
export interface HarmonyError {
31+
errorScope: HarmonyErrorScope;
32+
requestId: string;
33+
message?: string;
34+
url?: string;
35+
statusCode?: number;
36+
statusText?: string;
37+
payloadError?: any;
38+
networkError?: any;
39+
}
40+
41+
export enum SDKConnectionState {
42+
CONNECTED = 'CONNECTED',
43+
DISCONNECTED = 'DISCONNECTED',
44+
CONNECTION_ISSUE = 'CONNECTION_ISSUE',
45+
}
46+
47+
export class HarmonyResponse<T> {
48+
payload!: T;
49+
50+
httpResponse: Response;
51+
52+
isJob: boolean;
53+
54+
duration?: Duration;
55+
56+
requestId: string;
57+
58+
jobId?: string;
59+
}
60+
61+
export interface HarmonyEndpointSaaSOptions {
62+
activateMssPSession: boolean;
63+
}
64+
65+
export interface InfinityPortalAuth {
66+
clientId: string;
67+
accessKey: string;
68+
region?: InfinityPortalRegion;
69+
gateway?: string;
70+
}
71+
72+
export interface OnPremisePortalAuth {
73+
username: string;
74+
password: string;
75+
url: string;
76+
disableTLSChainValidation?: boolean;
77+
}
78+
79+
export interface HarmonyRequestOptions {
80+
doNotAwaitForJobs?: boolean;
81+
}
82+
83+
export interface HarmonyEndpointOptions extends HarmonyRequestOptions {}

0 commit comments

Comments
 (0)