@ordinlabs/wsm-types 2.2.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 (93) hide show
  1. package/LICENSE.md +674 -0
  2. package/README.md +4 -0
  3. package/dist/accessRules.d.ts +16 -0
  4. package/dist/accessRules.js +3 -0
  5. package/dist/accessRules.js.map +1 -0
  6. package/dist/apiKey.d.ts +14 -0
  7. package/dist/apiKey.js +3 -0
  8. package/dist/apiKey.js.map +1 -0
  9. package/dist/base.d.ts +20 -0
  10. package/dist/base.js +12 -0
  11. package/dist/base.js.map +1 -0
  12. package/dist/clientConfig.d.ts +13 -0
  13. package/dist/clientConfig.js +3 -0
  14. package/dist/clientConfig.js.map +1 -0
  15. package/dist/developer.d.ts +15 -0
  16. package/dist/developer.js +13 -0
  17. package/dist/developer.js.map +1 -0
  18. package/dist/group.d.ts +17 -0
  19. package/dist/group.js +21 -0
  20. package/dist/group.js.map +1 -0
  21. package/dist/index.d.ts +21 -0
  22. package/dist/index.js +38 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/k8s.d.ts +11 -0
  25. package/dist/k8s.js +3 -0
  26. package/dist/k8s.js.map +1 -0
  27. package/dist/login.d.ts +32 -0
  28. package/dist/login.js +7 -0
  29. package/dist/login.js.map +1 -0
  30. package/dist/memberships.d.ts +7 -0
  31. package/dist/memberships.js +3 -0
  32. package/dist/memberships.js.map +1 -0
  33. package/dist/navData.d.ts +15 -0
  34. package/dist/navData.js +3 -0
  35. package/dist/navData.js.map +1 -0
  36. package/dist/network.d.ts +21 -0
  37. package/dist/network.js +12 -0
  38. package/dist/network.js.map +1 -0
  39. package/dist/nginx-ingress-types.d.ts +187 -0
  40. package/dist/nginx-ingress-types.js +6 -0
  41. package/dist/nginx-ingress-types.js.map +1 -0
  42. package/dist/node.d.ts +11 -0
  43. package/dist/node.js +3 -0
  44. package/dist/node.js.map +1 -0
  45. package/dist/project.d.ts +91 -0
  46. package/dist/project.js +37 -0
  47. package/dist/project.js.map +1 -0
  48. package/dist/publicKey.d.ts +17 -0
  49. package/dist/publicKey.js +3 -0
  50. package/dist/publicKey.js.map +1 -0
  51. package/dist/rbac.d.ts +3 -0
  52. package/dist/rbac.js +3 -0
  53. package/dist/rbac.js.map +1 -0
  54. package/dist/reflection.d.ts +7 -0
  55. package/dist/reflection.js +23 -0
  56. package/dist/reflection.js.map +1 -0
  57. package/dist/reporting.d.ts +35 -0
  58. package/dist/reporting.js +16 -0
  59. package/dist/reporting.js.map +1 -0
  60. package/dist/requests.d.ts +22 -0
  61. package/dist/requests.js +3 -0
  62. package/dist/requests.js.map +1 -0
  63. package/dist/session.d.ts +12 -0
  64. package/dist/session.js +3 -0
  65. package/dist/session.js.map +1 -0
  66. package/dist/tsconfig.tsbuildinfo +1 -0
  67. package/dist/workspace.d.ts +69 -0
  68. package/dist/workspace.js +23 -0
  69. package/dist/workspace.js.map +1 -0
  70. package/package.json +39 -0
  71. package/src/accessRules.ts +18 -0
  72. package/src/apiKey.ts +16 -0
  73. package/src/base.ts +35 -0
  74. package/src/clientConfig.ts +13 -0
  75. package/src/developer.ts +29 -0
  76. package/src/group.ts +38 -0
  77. package/src/index.ts +21 -0
  78. package/src/k8s.ts +4 -0
  79. package/src/login.ts +36 -0
  80. package/src/memberships.ts +12 -0
  81. package/src/navData.ts +16 -0
  82. package/src/network.ts +35 -0
  83. package/src/nginx-ingress-types.ts +218 -0
  84. package/src/node.ts +13 -0
  85. package/src/project.ts +166 -0
  86. package/src/publicKey.ts +21 -0
  87. package/src/rbac.ts +5 -0
  88. package/src/reflection.ts +19 -0
  89. package/src/reporting.ts +60 -0
  90. package/src/requests.ts +27 -0
  91. package/src/session.ts +14 -0
  92. package/src/workspace.ts +121 -0
  93. package/tsconfig.json +10 -0
@@ -0,0 +1,16 @@
1
+ export type AllowListEntry = {
2
+ value: string;
3
+ comment?: string;
4
+ };
5
+ export type HttpAccessRule = {
6
+ id: string;
7
+ anyIp: boolean;
8
+ allowedIps?: AllowListEntry[];
9
+ anyPath: boolean;
10
+ allowedPaths?: AllowListEntry[];
11
+ enableCloudEditing?: boolean;
12
+ comment?: string;
13
+ };
14
+ export type HasHttpAccessRules = {
15
+ httpAccessRules?: HttpAccessRule[];
16
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=accessRules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessRules.js","sourceRoot":"","sources":["../src/accessRules.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export type APIKeyInfo = {
2
+ id: string;
3
+ userId: string;
4
+ note: string;
5
+ created: number;
6
+ expiresAt: number;
7
+ };
8
+ export type APIKey = APIKeyInfo & {
9
+ secret: string;
10
+ };
11
+ export type CreateAPIKeyRequest = {
12
+ note: string;
13
+ expiresAt: number;
14
+ };
package/dist/apiKey.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=apiKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiKey.js","sourceRoot":"","sources":["../src/apiKey.ts"],"names":[],"mappings":""}
package/dist/base.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ export type HasId<K = string> = {
2
+ id: K;
3
+ };
4
+ export type DatedObject = {
5
+ created: number;
6
+ lastModified: number;
7
+ };
8
+ export type HasKubeStructureVersion = {
9
+ kubeStructureVersion: number;
10
+ };
11
+ export type IdAndName<K = string> = {
12
+ id: K;
13
+ name: string;
14
+ };
15
+ export type DataObject<K = string> = HasId<K> & DatedObject;
16
+ export type NamedDataObject<K = string> = IdAndName<K> & DatedObject;
17
+ export type UnsavedDataObject<T extends DataObject> = Omit<T, 'id' | 'created' | 'lastModified'>;
18
+ export type Optional<Type, Key extends keyof Type> = Omit<Type, Key> & Partial<Pick<Type, Key>>;
19
+ export declare function isEntity(obj: any): obj is DataObject<string>;
20
+ export declare function isUnsavedEntity(obj: any): obj is UnsavedDataObject<any>;
package/dist/base.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUnsavedEntity = exports.isEntity = void 0;
4
+ function isEntity(obj) {
5
+ return typeof (obj === null || obj === void 0 ? void 0 : obj.id) === 'string' && isUnsavedEntity(obj);
6
+ }
7
+ exports.isEntity = isEntity;
8
+ function isUnsavedEntity(obj) {
9
+ return typeof obj === 'object' && typeof (obj === null || obj === void 0 ? void 0 : obj.name) === 'string';
10
+ }
11
+ exports.isUnsavedEntity = isUnsavedEntity;
12
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":";;;AA4BA,SAAgB,QAAQ,CAAC,GAAQ;IAC7B,OAAO,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,EAAE,CAAA,KAAK,QAAQ,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC;AAC/D,CAAC;AAFD,4BAEC;AAED,SAAgB,eAAe,CAAC,GAAQ;IACpC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ,CAAC;AACpE,CAAC;AAFD,0CAEC"}
@@ -0,0 +1,13 @@
1
+ export type ClientConfig = {
2
+ appVersion: string;
3
+ sshHost: string;
4
+ sshNamePrefix: string;
5
+ workspaceDomain: string;
6
+ projectTemplateDefaults: Record<string, object>;
7
+ workspaceTemplateDefaults: Record<string, object>;
8
+ serverIpRanges: string[];
9
+ defaultTimezone: string;
10
+ authProviders: string[];
11
+ approvedGoogleDomains: string[];
12
+ vpnSupportEnabled: boolean;
13
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=clientConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientConfig.js","sourceRoot":"","sources":["../src/clientConfig.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { ApplicationRole } from './rbac';
2
+ import { NamedDataObject, UnsavedDataObject } from './base';
3
+ export type DeveloperInfo = NamedDataObject & {
4
+ email: string;
5
+ appRole?: ApplicationRole;
6
+ };
7
+ export type Developer = DeveloperInfo & {
8
+ /** @deprecated use `publicKeys` instead */
9
+ publicKey?: string;
10
+ publicKeys: string[];
11
+ timezone?: string;
12
+ };
13
+ export type UnsavedDeveloper = UnsavedDataObject<Developer>;
14
+ export declare function isUnsavedDeveloper(obj: any): obj is UnsavedDeveloper;
15
+ export declare function isDeveloper(obj: any): obj is Developer;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDeveloper = exports.isUnsavedDeveloper = void 0;
4
+ const base_1 = require("./base");
5
+ function isUnsavedDeveloper(obj) {
6
+ return (0, base_1.isUnsavedEntity)(obj) && typeof obj.email === 'string';
7
+ }
8
+ exports.isUnsavedDeveloper = isUnsavedDeveloper;
9
+ function isDeveloper(obj) {
10
+ return (0, base_1.isEntity)(obj) && isUnsavedDeveloper(obj);
11
+ }
12
+ exports.isDeveloper = isDeveloper;
13
+ //# sourceMappingURL=developer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"developer.js","sourceRoot":"","sources":["../src/developer.ts"],"names":[],"mappings":";;;AACA,iCAKgB;AAgBhB,SAAgB,kBAAkB,CAAC,GAAQ;IACvC,OAAO,IAAA,sBAAe,EAAC,GAAG,CAAC,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC;AACjE,CAAC;AAFD,gDAEC;AAED,SAAgB,WAAW,CAAC,GAAQ;IAChC,OAAO,IAAA,eAAQ,EAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACpD,CAAC;AAFD,kCAEC"}
@@ -0,0 +1,17 @@
1
+ import { NamedDataObject, UnsavedDataObject } from './base';
2
+ import { GroupRole } from './rbac';
3
+ import { UserAssociation, UserAssociationId } from './memberships';
4
+ export type GroupInfo = NamedDataObject;
5
+ export type MyGroupInfo = GroupInfo & {
6
+ role?: GroupRole;
7
+ };
8
+ export type Group = GroupInfo;
9
+ export type UnsavedGroup = UnsavedDataObject<Group>;
10
+ export declare function isUnsavedGroup(obj: any): obj is UnsavedGroup;
11
+ export declare function isGroup(obj: any): obj is Group;
12
+ export type UserGroupRoleId = UserAssociationId & {
13
+ groupId: string;
14
+ };
15
+ export type UserGroupRole = UserAssociation<GroupRole, UserGroupRoleId>;
16
+ export declare function isUserGroupRoleId(obj: any): obj is UserGroupRoleId;
17
+ export declare function isUserGroupRole(obj: any): obj is UserGroupRole;
package/dist/group.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUserGroupRole = exports.isUserGroupRoleId = exports.isGroup = exports.isUnsavedGroup = void 0;
4
+ const base_1 = require("./base");
5
+ function isUnsavedGroup(obj) {
6
+ return (0, base_1.isUnsavedEntity)(obj);
7
+ }
8
+ exports.isUnsavedGroup = isUnsavedGroup;
9
+ function isGroup(obj) {
10
+ return (0, base_1.isEntity)(obj) && isUnsavedGroup(obj);
11
+ }
12
+ exports.isGroup = isGroup;
13
+ function isUserGroupRoleId(obj) {
14
+ return typeof (obj === null || obj === void 0 ? void 0 : obj.userId) === 'string' && typeof (obj === null || obj === void 0 ? void 0 : obj.groupId) === 'string';
15
+ }
16
+ exports.isUserGroupRoleId = isUserGroupRoleId;
17
+ function isUserGroupRole(obj) {
18
+ return isUserGroupRoleId(obj.id) && typeof (obj === null || obj === void 0 ? void 0 : obj.role) === 'string';
19
+ }
20
+ exports.isUserGroupRole = isUserGroupRole;
21
+ //# sourceMappingURL=group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.js","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":";;;AAAA,iCAKgB;AAWhB,SAAgB,cAAc,CAAC,GAAQ;IACnC,OAAO,IAAA,sBAAe,EAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAFD,wCAEC;AAED,SAAgB,OAAO,CAAC,GAAQ;IAC5B,OAAO,IAAA,eAAQ,EAAC,GAAG,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC;AAFD,0BAEC;AASD,SAAgB,iBAAiB,CAAC,GAAQ;IACtC,OAAO,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAA,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,CAAA,KAAK,QAAQ,CAAC;AAC/E,CAAC;AAFD,8CAEC;AAED,SAAgB,eAAe,CAAC,GAAQ;IACpC,OAAO,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ,CAAC;AACtE,CAAC;AAFD,0CAEC"}
@@ -0,0 +1,21 @@
1
+ export * from './accessRules';
2
+ export * from './apiKey';
3
+ export * from './base';
4
+ export * from './clientConfig';
5
+ export * from './developer';
6
+ export * from './group';
7
+ export * from './login';
8
+ export * from './memberships';
9
+ export * from './navData';
10
+ export * from './network';
11
+ export * from './node';
12
+ export * from './project';
13
+ export * from './publicKey';
14
+ export * from './reflection';
15
+ export * from './reporting';
16
+ export * from './requests';
17
+ export * from './session';
18
+ export * from './workspace';
19
+ export * from './k8s';
20
+ export * from './nginx-ingress-types';
21
+ export * from './rbac';
package/dist/index.js ADDED
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./accessRules"), exports);
18
+ __exportStar(require("./apiKey"), exports);
19
+ __exportStar(require("./base"), exports);
20
+ __exportStar(require("./clientConfig"), exports);
21
+ __exportStar(require("./developer"), exports);
22
+ __exportStar(require("./group"), exports);
23
+ __exportStar(require("./login"), exports);
24
+ __exportStar(require("./memberships"), exports);
25
+ __exportStar(require("./navData"), exports);
26
+ __exportStar(require("./network"), exports);
27
+ __exportStar(require("./node"), exports);
28
+ __exportStar(require("./project"), exports);
29
+ __exportStar(require("./publicKey"), exports);
30
+ __exportStar(require("./reflection"), exports);
31
+ __exportStar(require("./reporting"), exports);
32
+ __exportStar(require("./requests"), exports);
33
+ __exportStar(require("./session"), exports);
34
+ __exportStar(require("./workspace"), exports);
35
+ __exportStar(require("./k8s"), exports);
36
+ __exportStar(require("./nginx-ingress-types"), exports);
37
+ __exportStar(require("./rbac"), exports);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB;AACzB,yCAAuB;AACvB,iDAA+B;AAC/B,8CAA4B;AAC5B,0CAAwB;AACxB,0CAAwB;AACxB,gDAA8B;AAC9B,4CAA0B;AAC1B,4CAA0B;AAC1B,yCAAuB;AACvB,4CAA0B;AAC1B,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,wDAAsC;AACtC,yCAAuB"}
package/dist/k8s.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ export type HasNameAndNamespace = {
2
+ metadata: {
3
+ name: string;
4
+ namespace: string;
5
+ };
6
+ };
7
+ export type HasName = {
8
+ metadata: {
9
+ name: string;
10
+ };
11
+ };
package/dist/k8s.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=k8s.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"k8s.js","sourceRoot":"","sources":["../src/k8s.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ import { Developer } from './developer';
2
+ import { NavData } from './navData';
3
+ export type PasswordOptions = {
4
+ mustChange: boolean;
5
+ };
6
+ export type PasswordMetadata = PasswordOptions & {
7
+ failureCount: number;
8
+ lastChanged: number;
9
+ };
10
+ export declare const BAD_LOGIN_CREDENTIALS = 1;
11
+ export declare const TOO_MANY_LOGIN_FAILURES = 2;
12
+ export declare const LOGIN_BLOCKED = 3;
13
+ export type LoginErrorCode = typeof BAD_LOGIN_CREDENTIALS | typeof TOO_MANY_LOGIN_FAILURES | typeof LOGIN_BLOCKED;
14
+ export type LoginRequest = {
15
+ username: string;
16
+ password: string;
17
+ rememberMe: boolean;
18
+ };
19
+ export type LoginSuccess = {
20
+ success: true;
21
+ mustChangePassword: boolean;
22
+ developer: Developer;
23
+ };
24
+ export type LoginFailure = {
25
+ success: false;
26
+ errorCode: LoginErrorCode;
27
+ };
28
+ export type LoginResult = LoginSuccess | LoginFailure;
29
+ export type RPCLoginSuccess = LoginSuccess & {
30
+ navData: NavData;
31
+ };
32
+ export type RPCLoginResult = RPCLoginSuccess | LoginFailure;
package/dist/login.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LOGIN_BLOCKED = exports.TOO_MANY_LOGIN_FAILURES = exports.BAD_LOGIN_CREDENTIALS = void 0;
4
+ exports.BAD_LOGIN_CREDENTIALS = 1;
5
+ exports.TOO_MANY_LOGIN_FAILURES = 2;
6
+ exports.LOGIN_BLOCKED = 3;
7
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":";;;AAYa,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAC1B,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAC5B,QAAA,aAAa,GAAG,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { HasId } from './base';
2
+ export type UserAssociationId = {
3
+ userId: string;
4
+ };
5
+ export type UserAssociation<T extends string, I extends UserAssociationId> = HasId<I> & {
6
+ role: T;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=memberships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memberships.js","sourceRoot":"","sources":["../src/memberships.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { ClientConfig } from './clientConfig';
2
+ import { WorkspaceInfo } from './workspace';
3
+ import { MyProjectInfo } from './project';
4
+ import { DeveloperInfo } from './developer';
5
+ import { MyGroupInfo } from './group';
6
+ import { NodeInfo, RunningPodInfo } from './node';
7
+ export type NavData = {
8
+ config: ClientConfig;
9
+ workspaces: WorkspaceInfo[];
10
+ projects: MyProjectInfo[];
11
+ developers: DeveloperInfo[];
12
+ groups: MyGroupInfo[];
13
+ nodes: NodeInfo[];
14
+ runningPods: RunningPodInfo;
15
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=navData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navData.js","sourceRoot":"","sources":["../src/navData.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { DataObject, Optional, UnsavedDataObject } from './base';
2
+ export type PortMapTypes = 'xdebug' | 'custom';
3
+ export type PortMap = {
4
+ type: PortMapTypes;
5
+ label: string;
6
+ from: number;
7
+ to: number;
8
+ };
9
+ export type UnsavedPortMap = Optional<PortMap, 'from'>;
10
+ export type WireGuardPeer = DataObject & {
11
+ label: string;
12
+ userId: string;
13
+ publicKey: string;
14
+ privateKey: string;
15
+ preSharedKey: string;
16
+ ipAddress: string;
17
+ portMaps?: (PortMap | UnsavedPortMap)[];
18
+ };
19
+ export type UnsavedWireGuardPeer = Optional<UnsavedDataObject<WireGuardPeer>, 'publicKey' | 'privateKey' | 'preSharedKey' | 'ipAddress'>;
20
+ export declare function isUnsavedWireGuardPeer(obj: any): obj is UnsavedWireGuardPeer;
21
+ export declare function isWireGuardPeer(obj: any): obj is WireGuardPeer;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isWireGuardPeer = exports.isUnsavedWireGuardPeer = void 0;
4
+ function isUnsavedWireGuardPeer(obj) {
5
+ return typeof obj === 'object' && typeof (obj === null || obj === void 0 ? void 0 : obj.id) === 'undefined';
6
+ }
7
+ exports.isUnsavedWireGuardPeer = isUnsavedWireGuardPeer;
8
+ function isWireGuardPeer(obj) {
9
+ return typeof obj === 'object' && typeof (obj === null || obj === void 0 ? void 0 : obj.id) === 'string';
10
+ }
11
+ exports.isWireGuardPeer = isWireGuardPeer;
12
+ //# sourceMappingURL=network.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.js","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":";;;AA4BA,SAAgB,sBAAsB,CAAC,GAAQ;IAC3C,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,EAAE,CAAA,KAAK,WAAW,CAAC;AACrE,CAAC;AAFD,wDAEC;AAED,SAAgB,eAAe,CAAC,GAAQ;IACpC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,EAAE,CAAA,KAAK,QAAQ,CAAC;AAClE,CAAC;AAFD,0CAEC"}
@@ -0,0 +1,187 @@
1
+ import { KubernetesListObject, KubernetesObject } from '@kubernetes/client-node';
2
+ export type VirtualServer = KubernetesObject & {
3
+ spec: VirtualServerSpec;
4
+ status?: {
5
+ externalEndpoints?: {
6
+ ip?: string;
7
+ ports?: string;
8
+ }[];
9
+ message?: string;
10
+ reason?: string;
11
+ state?: string;
12
+ };
13
+ };
14
+ export type VirtualServerRoute = KubernetesObject & {
15
+ spec: VirtualServerRouteSpec;
16
+ };
17
+ export type VirtualServerList = KubernetesListObject<VirtualServer>;
18
+ export type VirtualServerRouteList = KubernetesListObject<VirtualServerRoute>;
19
+ export type VirtualServerSpec = {
20
+ host: string;
21
+ tls?: TLS;
22
+ policies?: Policy[];
23
+ upstreams?: Upstream[];
24
+ routes?: Route[];
25
+ ingressClassName?: string;
26
+ 'http-snippets'?: string;
27
+ 'server-snippets'?: string;
28
+ };
29
+ export type VirtualServerRouteSpec = {
30
+ host: string;
31
+ upstreams?: Upstream[];
32
+ subroutes?: Subroute[];
33
+ ingressClassName?: string;
34
+ };
35
+ export type Subroute = {
36
+ path: string;
37
+ policies?: Policy[];
38
+ action?: Action;
39
+ splits?: Split[];
40
+ matches?: Matches;
41
+ errorPages?: ErrorPage[];
42
+ 'location-snippets'?: string;
43
+ };
44
+ export type TLS = {
45
+ secret?: string;
46
+ redirect?: {
47
+ enable?: boolean;
48
+ code?: number;
49
+ basedOn?: string;
50
+ };
51
+ };
52
+ export type Policy = {
53
+ name: string;
54
+ namespace?: string;
55
+ };
56
+ type Timeouts = {
57
+ 'connect-timeout'?: string;
58
+ 'read-timeout'?: string;
59
+ 'send-timeout'?: string;
60
+ };
61
+ export type Upstream = Timeouts & {
62
+ name: string;
63
+ service: string;
64
+ subselector?: Record<string, string>;
65
+ 'use-cluster-ip'?: boolean;
66
+ port: number;
67
+ 'lb-method'?: string;
68
+ 'fail-timeout'?: string;
69
+ 'max-fails'?: number;
70
+ 'max-conns'?: number;
71
+ keepalive?: number;
72
+ 'next-upstream'?: string;
73
+ 'next-upstream-timeout'?: string;
74
+ 'next-upstream-tries'?: number;
75
+ 'client-max-body-size'?: string;
76
+ tls?: {
77
+ enable?: boolean;
78
+ };
79
+ healthCheck?: HealthCheck;
80
+ 'slow-start'?: string;
81
+ queue?: {
82
+ size: number;
83
+ timeout?: string;
84
+ };
85
+ buffering?: boolean;
86
+ buffers?: {
87
+ number: number;
88
+ size: string;
89
+ };
90
+ 'buffer-size'?: string;
91
+ };
92
+ export type HealthCheck = Timeouts & {
93
+ enable?: boolean;
94
+ path?: string;
95
+ interval?: string;
96
+ jitter?: string;
97
+ fails?: number;
98
+ passes?: number;
99
+ port?: number;
100
+ tls?: {
101
+ enable?: boolean;
102
+ };
103
+ headers: Header[];
104
+ statusMatch: string;
105
+ };
106
+ type Header = {
107
+ name: string;
108
+ value?: string;
109
+ };
110
+ export type Route = {
111
+ path: string;
112
+ policies?: Policy[];
113
+ action?: Action;
114
+ splits?: Split[];
115
+ matches?: Matches;
116
+ route?: string;
117
+ errorPages?: ErrorPage[];
118
+ 'location-snippets'?: string;
119
+ };
120
+ type PassAction = {
121
+ pass: string;
122
+ };
123
+ type RedirectAction = {
124
+ redirect: {
125
+ url: string;
126
+ code?: number;
127
+ };
128
+ };
129
+ type ReturnAction = {
130
+ return: {
131
+ code?: number;
132
+ type?: string;
133
+ body: string;
134
+ };
135
+ };
136
+ type ProxyAction = {
137
+ proxy: {
138
+ upstream: string;
139
+ requestHeaders?: ProxyRequestHeaders;
140
+ responseHeaders?: ProxyResponseHeaders;
141
+ rewritePath?: string;
142
+ };
143
+ };
144
+ type ProxyRequestHeaders = {
145
+ pass?: boolean;
146
+ set: Header[];
147
+ };
148
+ type ProxyResponseHeaders = {
149
+ hide?: boolean;
150
+ pass?: string[];
151
+ ignore?: string[];
152
+ add?: AddHeader[];
153
+ };
154
+ type AddHeader = Header & {
155
+ always?: boolean;
156
+ };
157
+ export type Action = PassAction | RedirectAction | ReturnAction | ProxyAction;
158
+ export type Split = {
159
+ weight: number;
160
+ action: Action;
161
+ };
162
+ export type Matches = {
163
+ conditions: Condition[];
164
+ action?: Action;
165
+ splits?: Split[];
166
+ };
167
+ export type Condition = {
168
+ header?: string;
169
+ cookie?: string;
170
+ argument?: string;
171
+ variable?: string;
172
+ value: string;
173
+ };
174
+ export type ErrorPage = {
175
+ codes: number[];
176
+ redirect?: {
177
+ code?: number;
178
+ url: string;
179
+ };
180
+ return?: {
181
+ code?: number;
182
+ type?: string;
183
+ body: string;
184
+ headers?: Header[];
185
+ };
186
+ };
187
+ export {};
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /*
3
+ See https://docs.nginx.com/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=nginx-ingress-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nginx-ingress-types.js","sourceRoot":"","sources":["../src/nginx-ingress-types.ts"],"names":[],"mappings":";AAAA;;EAEE"}
package/dist/node.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { IdAndName } from './base';
2
+ export type NodeInfo = IdAndName & {
3
+ launchDate: number;
4
+ labels: Record<string, string>;
5
+ annotations: Record<string, string>;
6
+ ip: string;
7
+ };
8
+ export type RunningPodInfo = {
9
+ projects: Record<string, number>;
10
+ workspaces: Record<string, number>;
11
+ };
package/dist/node.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":""}