@nosana/types 0.1.18 → 0.1.23

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.
@@ -3,7 +3,11 @@ export type DeploymentId = string;
3
3
  export type Deployment = components["schemas"]["Deployment"];
4
4
  export type Revision = components["schemas"]["Revision"];
5
5
  export type Task = components["schemas"]["Task"];
6
- export type Events = components["schemas"]["Events"];
6
+ export type Event = (components["schemas"] & {
7
+ Event?: unknown;
8
+ Events?: unknown;
9
+ })["Event" | "Events"];
10
+ export type Events = Event;
7
11
  export type Vault = components["schemas"]["Vault"];
8
12
  export declare const DeploymentStatus: {
9
13
  [key in components['schemas']['DeploymentStatus']]: components['schemas']['DeploymentStatus'];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Deployments/index.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,gBAAgB,GAEzB;IACF,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,kBAAkB,EAAE,oBAAoB;IACxC,QAAQ,EAAE,UAAU;CACZ,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAE3B;IACF,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,eAAe;IAChC,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACZ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Deployments/index.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,gBAAgB,GAEzB;IACF,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,kBAAkB,EAAE,oBAAoB;IACxC,QAAQ,EAAE,UAAU;CACZ,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAE3B;IACF,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,eAAe;IAChC,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACZ,CAAC"}
@@ -18,7 +18,7 @@ export type DiagnosticsState = {
18
18
  End: string;
19
19
  ExitCode: number;
20
20
  Output: string;
21
- }[];
21
+ }[] | null;
22
22
  } | undefined;
23
23
  RestartCount: number;
24
24
  };
@@ -120,7 +120,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
120
120
  }
121
121
  }
122
122
  return true;
123
- })() && input.expose.every((elem, _index8) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem)) || "object" === typeof elem && null !== elem && _iu1(elem, true && _exceptionable)))) || "object" === typeof input.expose && null !== input.expose && _iu1(input.expose, true && _exceptionable)))) && (undefined === input.gpu || "boolean" === typeof input.gpu) && (undefined === input.work_dir || "string" === typeof input.work_dir) && (null !== input.entrypoint && (undefined === input.entrypoint || "string" === typeof input.entrypoint || Array.isArray(input.entrypoint) && input.entrypoint.every((elem, _index9) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io8(input.env, true && _exceptionable)) && (null !== input.restart_policy && (undefined === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || "on-failure" === input.restart_policy || "object" === typeof input.restart_policy && null !== input.restart_policy && _io18(input.restart_policy, true && _exceptionable))) && (undefined === input["private"] || "boolean" === typeof input["private"]) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every((elem, _index10) => null !== elem && undefined !== elem && ("__remove-if-empty__" === elem || "object" === typeof elem && null !== elem && _iu2(elem, true && _exceptionable)))) && (undefined === input.authentication || "object" === typeof input.authentication && null !== input.authentication && false === Array.isArray(input.authentication) && _io26(input.authentication, true && _exceptionable)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
123
+ })() && input.expose.every((elem, _index8) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem)) || "object" === typeof elem && null !== elem && _iu1(elem, true && _exceptionable)))) || "object" === typeof input.expose && null !== input.expose && _iu1(input.expose, true && _exceptionable)))) && (undefined === input.gpu || "boolean" === typeof input.gpu) && (undefined === input.work_dir || "string" === typeof input.work_dir) && (null !== input.entrypoint && (undefined === input.entrypoint || "string" === typeof input.entrypoint || Array.isArray(input.entrypoint) && input.entrypoint.every((elem, _index9) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io8(input.env, true && _exceptionable)) && (null !== input.restart_policy && (undefined === input.restart_policy || "on-failure" === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || "object" === typeof input.restart_policy && null !== input.restart_policy && _io18(input.restart_policy, true && _exceptionable))) && (undefined === input["private"] || "boolean" === typeof input["private"]) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every((elem, _index10) => null !== elem && undefined !== elem && ("__remove-if-empty__" === elem || "object" === typeof elem && null !== elem && _iu2(elem, true && _exceptionable)))) && (undefined === input.authentication || "object" === typeof input.authentication && null !== input.authentication && false === Array.isArray(input.authentication) && _io26(input.authentication, true && _exceptionable)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
124
124
  if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "restart_policy", "private", "resources", "authentication"].some(prop => key === prop))
125
125
  return true;
126
126
  const value = input[key];
@@ -841,7 +841,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
841
841
  path: _path + ".restart_policy",
842
842
  expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
843
843
  value: input.restart_policy
844
- })) && (undefined === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || "on-failure" === input.restart_policy || ("object" === typeof input.restart_policy && null !== input.restart_policy || _report(_exceptionable, {
844
+ })) && (undefined === input.restart_policy || "on-failure" === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || ("object" === typeof input.restart_policy && null !== input.restart_policy || _report(_exceptionable, {
845
845
  path: _path + ".restart_policy",
846
846
  expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
847
847
  value: input.restart_policy
@@ -700,8 +700,8 @@ export interface paths {
700
700
  [key: string]: string | number;
701
701
  };
702
702
  } & {
703
- [key: string]: string | number | {
704
- [key: string]: string | number;
703
+ [key: string]: string | number | (string | number)[] | {
704
+ [key: string]: string | number | (string | number)[];
705
705
  };
706
706
  };
707
707
  global?: {
@@ -787,6 +787,11 @@ export interface paths {
787
787
  env?: {
788
788
  [key: string]: string;
789
789
  };
790
+ restart_policy?: {
791
+ /** @enum {string} */
792
+ policy: "on-failure";
793
+ restart_tries?: number;
794
+ } | ("no" | "always" | "unless-stopped" | "on-failure");
790
795
  private?: boolean;
791
796
  resources?: ({
792
797
  __spread__: string;
@@ -1895,8 +1900,8 @@ export interface components {
1895
1900
  [key: string]: string | number;
1896
1901
  };
1897
1902
  } & {
1898
- [key: string]: string | number | {
1899
- [key: string]: string | number;
1903
+ [key: string]: string | number | (string | number)[] | {
1904
+ [key: string]: string | number | (string | number)[];
1900
1905
  };
1901
1906
  };
1902
1907
  global?: {
@@ -1982,6 +1987,11 @@ export interface components {
1982
1987
  env?: {
1983
1988
  [key: string]: string;
1984
1989
  };
1990
+ restart_policy?: {
1991
+ /** @enum {string} */
1992
+ policy: "on-failure";
1993
+ restart_tries?: number;
1994
+ } | ("no" | "always" | "unless-stopped" | "on-failure");
1985
1995
  private?: boolean;
1986
1996
  resources?: ({
1987
1997
  __spread__: string;
@@ -2170,8 +2180,8 @@ export interface components {
2170
2180
  [key: string]: string | number;
2171
2181
  };
2172
2182
  } & {
2173
- [key: string]: string | number | {
2174
- [key: string]: string | number;
2183
+ [key: string]: string | number | (string | number)[] | {
2184
+ [key: string]: string | number | (string | number)[];
2175
2185
  };
2176
2186
  };
2177
2187
  global?: {
@@ -2257,6 +2267,11 @@ export interface components {
2257
2267
  env?: {
2258
2268
  [key: string]: string;
2259
2269
  };
2270
+ restart_policy?: {
2271
+ /** @enum {string} */
2272
+ policy: "on-failure";
2273
+ restart_tries?: number;
2274
+ } | ("no" | "always" | "unless-stopped" | "on-failure");
2260
2275
  private?: boolean;
2261
2276
  resources?: ({
2262
2277
  __spread__: string;
@@ -2462,8 +2477,8 @@ export interface components {
2462
2477
  [key: string]: string | number;
2463
2478
  };
2464
2479
  } & {
2465
- [key: string]: string | number | {
2466
- [key: string]: string | number;
2480
+ [key: string]: string | number | (string | number)[] | {
2481
+ [key: string]: string | number | (string | number)[];
2467
2482
  };
2468
2483
  };
2469
2484
  global?: {
@@ -2549,6 +2564,11 @@ export interface components {
2549
2564
  env?: {
2550
2565
  [key: string]: string;
2551
2566
  };
2567
+ restart_policy?: {
2568
+ /** @enum {string} */
2569
+ policy: "on-failure";
2570
+ restart_tries?: number;
2571
+ } | ("no" | "always" | "unless-stopped" | "on-failure");
2552
2572
  private?: boolean;
2553
2573
  resources?: ({
2554
2574
  __spread__: string;
@@ -2675,8 +2695,8 @@ export interface components {
2675
2695
  [key: string]: string | number;
2676
2696
  };
2677
2697
  } & {
2678
- [key: string]: string | number | {
2679
- [key: string]: string | number;
2698
+ [key: string]: string | number | (string | number)[] | {
2699
+ [key: string]: string | number | (string | number)[];
2680
2700
  };
2681
2701
  };
2682
2702
  global?: {
@@ -2762,6 +2782,11 @@ export interface components {
2762
2782
  env?: {
2763
2783
  [key: string]: string;
2764
2784
  };
2785
+ restart_policy?: {
2786
+ /** @enum {string} */
2787
+ policy: "on-failure";
2788
+ restart_tries?: number;
2789
+ } | ("no" | "always" | "unless-stopped" | "on-failure");
2765
2790
  private?: boolean;
2766
2791
  resources?: ({
2767
2792
  __spread__: string;
@@ -2863,10 +2888,48 @@ export interface components {
2863
2888
  /** @enum {string} */
2864
2889
  type: "stdin" | "stdout" | "stderr" | "nodeerr";
2865
2890
  log?: string;
2891
+ timestamp?: string;
2866
2892
  }[];
2867
2893
  results?: {
2868
2894
  [key: string]: string | string[];
2869
2895
  };
2896
+ error?: {
2897
+ event: string;
2898
+ message: string;
2899
+ code?: number;
2900
+ };
2901
+ diagnostics: {
2902
+ reason: {
2903
+ hostShutDown: boolean;
2904
+ jobStopped: boolean;
2905
+ jobExpired: boolean;
2906
+ reason?: string;
2907
+ };
2908
+ state?: {
2909
+ Status: string;
2910
+ Running: boolean;
2911
+ Paused: boolean;
2912
+ Restarting: boolean;
2913
+ OOMKilled: boolean;
2914
+ Dead: boolean;
2915
+ Pid: number;
2916
+ ExitCode: number;
2917
+ Error: string;
2918
+ StartedAt: string;
2919
+ FinishedAt: string;
2920
+ Health?: {
2921
+ Status: string;
2922
+ FailingStreak: number;
2923
+ Log: {
2924
+ Start: string;
2925
+ End: string;
2926
+ ExitCode: number;
2927
+ Output: string;
2928
+ }[];
2929
+ };
2930
+ RestartCount: number;
2931
+ };
2932
+ };
2870
2933
  }[];
2871
2934
  secrets?: {
2872
2935
  /** @enum {string} */
@@ -3101,7 +3164,7 @@ export interface operations {
3101
3164
  benchmarkProcessedAt: (Record<string, never> | string) | null;
3102
3165
  timeout: number;
3103
3166
  usdRewardPerHour: number | null;
3104
- listedAt: number;
3167
+ listedAt: number | null;
3105
3168
  };
3106
3169
  "multipart/form-data": {
3107
3170
  ipfsJob: string;
@@ -3121,7 +3184,7 @@ export interface operations {
3121
3184
  benchmarkProcessedAt: (Record<string, never> | string) | null;
3122
3185
  timeout: number;
3123
3186
  usdRewardPerHour: number | null;
3124
- listedAt: number;
3187
+ listedAt: number | null;
3125
3188
  };
3126
3189
  "text/plain": {
3127
3190
  ipfsJob: string;
@@ -3141,7 +3204,7 @@ export interface operations {
3141
3204
  benchmarkProcessedAt: (Record<string, never> | string) | null;
3142
3205
  timeout: number;
3143
3206
  usdRewardPerHour: number | null;
3144
- listedAt: number;
3207
+ listedAt: number | null;
3145
3208
  };
3146
3209
  };
3147
3210
  };
@@ -379,10 +379,10 @@ export const jobSchemas = {
379
379
  {
380
380
  type: "string",
381
381
  "enum": [
382
+ "on-failure",
382
383
  "no",
383
384
  "always",
384
- "unless-stopped",
385
- "on-failure"
385
+ "unless-stopped"
386
386
  ]
387
387
  }
388
388
  ]
@@ -1149,7 +1149,8 @@ export const jobSchemas = {
1149
1149
  "ExitCode",
1150
1150
  "Output"
1151
1151
  ]
1152
- }
1152
+ },
1153
+ nullable: true
1153
1154
  }
1154
1155
  },
1155
1156
  required: [
@@ -1 +1 @@
1
- {"version":3,"file":"job.js","sourceRoot":"","sources":["../../src/Schemas/job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0D,CAAC"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.18",
2
+ "version": "0.1.23",
3
3
  "name": "@nosana/types",
4
4
  "author": "Nosana",
5
5
  "description": "Nosana Types Module",
@@ -17,7 +17,7 @@
17
17
  "rebuild": "npm run clean && npm run build",
18
18
  "generate": "openapi-typescript https://dashboard.k8s.prd.nos.ci/api/swagger/json -o ./src/Schemas/api.ts",
19
19
  "generate:dev": "openapi-typescript https://dashboard.k8s.dev.nos.ci/api/swagger/json -o ./src/Schemas/api.ts",
20
- "generate:local": "openapi-typescript http://localhost:3001/documentation/json -o ./src/Schemas/api.ts",
20
+ "generate:local": "openapi-typescript http://localhost:3000/api/swagger/json -o ./src/Schemas/api.ts",
21
21
  "test": "vitest run",
22
22
  "test:watch": "vitest",
23
23
  "test:coverage": "vitest run --coverage",