@nosana/types 0.1.23 → 0.1.24

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,12 +3,12 @@ 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 Event = (components["schemas"] & {
7
- Event?: unknown;
8
- Events?: unknown;
9
- })["Event" | "Events"];
10
- export type Events = Event;
6
+ export type Event = components["schemas"]["Event"];
7
+ export type DeploymentJob = components["schemas"]["Job"];
11
8
  export type Vault = components["schemas"]["Vault"];
9
+ export type DeploymentJobs = components["schemas"]["Job"][];
10
+ export type DeploymentEvents = components["schemas"]["Event"][];
11
+ export type DeploymentRevisions = components["schemas"]["Revision"][];
12
12
  export declare const DeploymentStatus: {
13
13
  [key in components['schemas']['DeploymentStatus']]: components['schemas']['DeploymentStatus'];
14
14
  };
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Deployments/index.ts"],"names":[],"mappings":"AAgBA,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"}
@@ -296,7 +296,64 @@ export interface paths {
296
296
  };
297
297
  put?: never;
298
298
  post?: never;
299
- delete?: never;
299
+ /** @description Delete a deployment permanently */
300
+ delete: {
301
+ parameters: {
302
+ query?: never;
303
+ header: {
304
+ /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
305
+ "x-user-id"?: string;
306
+ /**
307
+ * @description Authentication token, either an API key or a wallet-signed message.
308
+ * @example Bearer <ApiKey> or WalletSignedMessage
309
+ */
310
+ authorization: string;
311
+ };
312
+ path: {
313
+ deployment: components["schemas"]["PublicKey"];
314
+ };
315
+ cookie?: never;
316
+ };
317
+ requestBody?: never;
318
+ responses: {
319
+ /** @description Deployment deleted successfully. */
320
+ 204: {
321
+ headers: {
322
+ [name: string]: unknown;
323
+ };
324
+ content: {
325
+ "application/json": unknown;
326
+ };
327
+ };
328
+ /** @description Unauthorized. Invalid or missing authentication. */
329
+ 401: {
330
+ headers: {
331
+ [name: string]: unknown;
332
+ };
333
+ content: {
334
+ "application/json": "Unauthorized";
335
+ };
336
+ };
337
+ /** @description Deployment not found. */
338
+ 404: {
339
+ headers: {
340
+ [name: string]: unknown;
341
+ };
342
+ content: {
343
+ "application/json": components["schemas"]["Error"];
344
+ };
345
+ };
346
+ /** @description Internal Server Error. */
347
+ 500: {
348
+ headers: {
349
+ [name: string]: unknown;
350
+ };
351
+ content: {
352
+ "application/json": components["schemas"]["Error"];
353
+ };
354
+ };
355
+ };
356
+ };
300
357
  options?: never;
301
358
  head?: never;
302
359
  patch?: never;
@@ -536,6 +593,225 @@ export interface paths {
536
593
  patch?: never;
537
594
  trace?: never;
538
595
  };
596
+ "/api/deployments/{deployment}/jobs": {
597
+ parameters: {
598
+ query?: never;
599
+ header?: never;
600
+ path?: never;
601
+ cookie?: never;
602
+ };
603
+ /** @description Get jobs for a specific deployment. */
604
+ get: {
605
+ parameters: {
606
+ query?: never;
607
+ header: {
608
+ /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
609
+ "x-user-id"?: string;
610
+ /**
611
+ * @description Authentication token, either an API key or a wallet-signed message.
612
+ * @example Bearer <ApiKey> or WalletSignedMessage
613
+ */
614
+ authorization: string;
615
+ };
616
+ path: {
617
+ deployment: components["schemas"]["PublicKey"];
618
+ };
619
+ cookie?: never;
620
+ };
621
+ requestBody?: never;
622
+ responses: {
623
+ /** @description List of jobs for the deployment. */
624
+ 200: {
625
+ headers: {
626
+ [name: string]: unknown;
627
+ };
628
+ content: {
629
+ "application/json": components["schemas"]["Job"][];
630
+ };
631
+ };
632
+ /** @description Unauthorized. Invalid or missing authentication. */
633
+ 401: {
634
+ headers: {
635
+ [name: string]: unknown;
636
+ };
637
+ content: {
638
+ "application/json": "Unauthorized";
639
+ };
640
+ };
641
+ /** @description Deployment not found. */
642
+ 404: {
643
+ headers: {
644
+ [name: string]: unknown;
645
+ };
646
+ content: {
647
+ "application/json": components["schemas"]["Error"];
648
+ };
649
+ };
650
+ /** @description Internal Server Error. */
651
+ 500: {
652
+ headers: {
653
+ [name: string]: unknown;
654
+ };
655
+ content: {
656
+ "application/json": components["schemas"]["Error"];
657
+ };
658
+ };
659
+ };
660
+ };
661
+ put?: never;
662
+ post?: never;
663
+ delete?: never;
664
+ options?: never;
665
+ head?: never;
666
+ patch?: never;
667
+ trace?: never;
668
+ };
669
+ "/api/deployments/{deployment}/revisions": {
670
+ parameters: {
671
+ query?: never;
672
+ header?: never;
673
+ path?: never;
674
+ cookie?: never;
675
+ };
676
+ /** @description Get revisions for a specific deployment. */
677
+ get: {
678
+ parameters: {
679
+ query?: never;
680
+ header: {
681
+ /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
682
+ "x-user-id"?: string;
683
+ /**
684
+ * @description Authentication token, either an API key or a wallet-signed message.
685
+ * @example Bearer <ApiKey> or WalletSignedMessage
686
+ */
687
+ authorization: string;
688
+ };
689
+ path: {
690
+ deployment: components["schemas"]["PublicKey"];
691
+ };
692
+ cookie?: never;
693
+ };
694
+ requestBody?: never;
695
+ responses: {
696
+ /** @description List of revisions for the deployment. */
697
+ 200: {
698
+ headers: {
699
+ [name: string]: unknown;
700
+ };
701
+ content: {
702
+ "application/json": components["schemas"]["Revision"][];
703
+ };
704
+ };
705
+ /** @description Unauthorized. Invalid or missing authentication. */
706
+ 401: {
707
+ headers: {
708
+ [name: string]: unknown;
709
+ };
710
+ content: {
711
+ "application/json": "Unauthorized";
712
+ };
713
+ };
714
+ /** @description Deployment not found. */
715
+ 404: {
716
+ headers: {
717
+ [name: string]: unknown;
718
+ };
719
+ content: {
720
+ "application/json": components["schemas"]["Error"];
721
+ };
722
+ };
723
+ /** @description Internal Server Error. */
724
+ 500: {
725
+ headers: {
726
+ [name: string]: unknown;
727
+ };
728
+ content: {
729
+ "application/json": components["schemas"]["Error"];
730
+ };
731
+ };
732
+ };
733
+ };
734
+ put?: never;
735
+ post?: never;
736
+ delete?: never;
737
+ options?: never;
738
+ head?: never;
739
+ patch?: never;
740
+ trace?: never;
741
+ };
742
+ "/api/deployments/{deployment}/events": {
743
+ parameters: {
744
+ query?: never;
745
+ header?: never;
746
+ path?: never;
747
+ cookie?: never;
748
+ };
749
+ /** @description Get events for a specific deployment. */
750
+ get: {
751
+ parameters: {
752
+ query?: never;
753
+ header: {
754
+ /** @description Required when using Wallet Authentication. The public key used to sign authentication header. */
755
+ "x-user-id"?: string;
756
+ /**
757
+ * @description Authentication token, either an API key or a wallet-signed message.
758
+ * @example Bearer <ApiKey> or WalletSignedMessage
759
+ */
760
+ authorization: string;
761
+ };
762
+ path: {
763
+ deployment: components["schemas"]["PublicKey"];
764
+ };
765
+ cookie?: never;
766
+ };
767
+ requestBody?: never;
768
+ responses: {
769
+ /** @description List of events for the deployment. */
770
+ 200: {
771
+ headers: {
772
+ [name: string]: unknown;
773
+ };
774
+ content: {
775
+ "application/json": components["schemas"]["Event"][];
776
+ };
777
+ };
778
+ /** @description Unauthorized. Invalid or missing authentication. */
779
+ 401: {
780
+ headers: {
781
+ [name: string]: unknown;
782
+ };
783
+ content: {
784
+ "application/json": "Unauthorized";
785
+ };
786
+ };
787
+ /** @description Deployment not found. */
788
+ 404: {
789
+ headers: {
790
+ [name: string]: unknown;
791
+ };
792
+ content: {
793
+ "application/json": components["schemas"]["Error"];
794
+ };
795
+ };
796
+ /** @description Internal Server Error. */
797
+ 500: {
798
+ headers: {
799
+ [name: string]: unknown;
800
+ };
801
+ content: {
802
+ "application/json": components["schemas"]["Error"];
803
+ };
804
+ };
805
+ };
806
+ };
807
+ put?: never;
808
+ post?: never;
809
+ delete?: never;
810
+ options?: never;
811
+ head?: never;
812
+ patch?: never;
813
+ trace?: never;
814
+ };
539
815
  "/api/deployments/create": {
540
816
  parameters: {
541
817
  query?: never;
@@ -661,220 +937,7 @@ export interface paths {
661
937
  revision: number;
662
938
  deployment: string;
663
939
  ipfs_definition_hash: string;
664
- job_definition: {
665
- /** @enum {string} */
666
- version: "0.1";
667
- /** @enum {string} */
668
- type: "container";
669
- logistics?: {
670
- send: {
671
- /**
672
- * @description api - we receive and send via an endpoint endpoint
673
- * api-listen - we create an endpoint to listen for incoming requests
674
- * @enum {string}
675
- */
676
- type: "api" | "api-listen";
677
- /** @description Make all properties in T optional */
678
- args: {
679
- endpoint?: string;
680
- };
681
- };
682
- receive: {
683
- /**
684
- * @description api - we receive and send via an endpoint endpoint
685
- * api-listen - we create an endpoint to listen for incoming requests
686
- * @enum {string}
687
- */
688
- type: "api" | "api-listen";
689
- /** @description Make all properties in T optional */
690
- args: {
691
- endpoint?: string;
692
- };
693
- };
694
- };
695
- deployment_id?: string;
696
- meta?: {
697
- trigger?: string;
698
- /** @description Construct a type with a set of properties K of type T */
699
- system_resources?: {
700
- [key: string]: string | number;
701
- };
702
- } & {
703
- [key: string]: string | number | (string | number)[] | {
704
- [key: string]: string | number | (string | number)[];
705
- };
706
- };
707
- global?: {
708
- image?: string;
709
- gpu?: boolean;
710
- entrypoint?: string | string[];
711
- env?: {
712
- [key: string]: string;
713
- };
714
- work_dir?: string;
715
- variables?: {
716
- [key: string]: string;
717
- };
718
- };
719
- ops: {
720
- /** @enum {string} */
721
- type: "container/run" | "container/create-volume";
722
- id: string;
723
- args: {
724
- image: string;
725
- aliases?: string | string[];
726
- cmd?: string | string[];
727
- volumes?: {
728
- name: string;
729
- dest: string;
730
- }[];
731
- expose?: number | string | {
732
- __spread__: string;
733
- chunked?: boolean;
734
- } | {
735
- port: number;
736
- /** @enum {string} */
737
- type?: "api" | "web" | "websocket" | "webapi" | "none";
738
- health_checks?: ({
739
- /** @enum {string} */
740
- type: "http";
741
- path: string;
742
- /** @enum {string} */
743
- method: "GET" | "POST" | "PUT" | "DELETE";
744
- expected_status: number;
745
- /** @description Construct a type with a set of properties K of type T */
746
- headers?: {
747
- [key: string]: string;
748
- };
749
- body?: unknown;
750
- continuous: boolean;
751
- } | {
752
- /** @enum {string} */
753
- type: "websocket";
754
- expected_response: string;
755
- continuous: boolean;
756
- })[];
757
- } | (number | string | {
758
- __spread__: string;
759
- chunked?: boolean;
760
- } | {
761
- port: number;
762
- /** @enum {string} */
763
- type?: "api" | "web" | "websocket" | "webapi" | "none";
764
- health_checks?: ({
765
- /** @enum {string} */
766
- type: "http";
767
- path: string;
768
- /** @enum {string} */
769
- method: "GET" | "POST" | "PUT" | "DELETE";
770
- expected_status: number;
771
- /** @description Construct a type with a set of properties K of type T */
772
- headers?: {
773
- [key: string]: string;
774
- };
775
- body?: unknown;
776
- continuous: boolean;
777
- } | {
778
- /** @enum {string} */
779
- type: "websocket";
780
- expected_response: string;
781
- continuous: boolean;
782
- })[];
783
- })[];
784
- gpu?: boolean;
785
- work_dir?: string;
786
- entrypoint?: string | string[];
787
- env?: {
788
- [key: string]: string;
789
- };
790
- restart_policy?: {
791
- /** @enum {string} */
792
- policy: "on-failure";
793
- restart_tries?: number;
794
- } | ("no" | "always" | "unless-stopped" | "on-failure");
795
- private?: boolean;
796
- resources?: ({
797
- __spread__: string;
798
- chunked?: boolean;
799
- } | {
800
- /** @enum {string} */
801
- type: "S3";
802
- target: string;
803
- url?: string;
804
- allowWrite?: boolean;
805
- files?: string[];
806
- IAM?: {
807
- REGION: string;
808
- ACCESS_KEY_ID: string;
809
- SECRET_ACCESS_KEY: string;
810
- };
811
- } | {
812
- /** @enum {string} */
813
- type: "S3";
814
- target: string;
815
- bucket: string;
816
- url?: string;
817
- allowWrite?: boolean;
818
- IAM?: {
819
- REGION: string;
820
- ACCESS_KEY_ID: string;
821
- SECRET_ACCESS_KEY: string;
822
- };
823
- } | {
824
- /** @enum {string} */
825
- type: "S3";
826
- target: string;
827
- buckets: {
828
- url: string;
829
- files?: string[];
830
- }[];
831
- url?: string;
832
- allowWrite?: boolean;
833
- IAM?: {
834
- REGION: string;
835
- ACCESS_KEY_ID: string;
836
- SECRET_ACCESS_KEY: string;
837
- };
838
- } | {
839
- /** @enum {string} */
840
- type: "HF";
841
- target: string;
842
- repo: string;
843
- revision?: string;
844
- files?: string[];
845
- accessToken?: string;
846
- } | {
847
- /** @enum {string} */
848
- type: "Ollama";
849
- model: string;
850
- target?: string;
851
- } | "__remove-if-empty__")[];
852
- authentication?: {
853
- docker?: {
854
- username?: string;
855
- password?: string;
856
- email?: string;
857
- server?: string;
858
- };
859
- };
860
- } | {
861
- name: string;
862
- };
863
- results?: {
864
- [key: string]: string | {
865
- regex: string;
866
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
867
- };
868
- };
869
- execution?: {
870
- group?: string;
871
- depends_on: string[];
872
- stop_if_dependent_stops?: boolean;
873
- } | {
874
- group?: string;
875
- };
876
- }[];
877
- };
940
+ job_definition: components["schemas"]["JobDefinition"];
878
941
  /** Format: date-time */
879
942
  created_at: string;
880
943
  }[];
@@ -1857,251 +1920,8 @@ export interface components {
1857
1920
  market: string;
1858
1921
  owner: string;
1859
1922
  status: "DRAFT" | "ERROR" | "STARTING" | "RUNNING" | "STOPPING" | "STOPPED" | "INSUFFICIENT_FUNDS" | "ARCHIVED";
1860
- revisions: {
1861
- revision: number;
1862
- deployment: string;
1863
- ipfs_definition_hash: string;
1864
- job_definition: {
1865
- /** @enum {string} */
1866
- version: "0.1";
1867
- /** @enum {string} */
1868
- type: "container";
1869
- logistics?: {
1870
- send: {
1871
- /**
1872
- * @description api - we receive and send via an endpoint endpoint
1873
- * api-listen - we create an endpoint to listen for incoming requests
1874
- * @enum {string}
1875
- */
1876
- type: "api" | "api-listen";
1877
- /** @description Make all properties in T optional */
1878
- args: {
1879
- endpoint?: string;
1880
- };
1881
- };
1882
- receive: {
1883
- /**
1884
- * @description api - we receive and send via an endpoint endpoint
1885
- * api-listen - we create an endpoint to listen for incoming requests
1886
- * @enum {string}
1887
- */
1888
- type: "api" | "api-listen";
1889
- /** @description Make all properties in T optional */
1890
- args: {
1891
- endpoint?: string;
1892
- };
1893
- };
1894
- };
1895
- deployment_id?: string;
1896
- meta?: {
1897
- trigger?: string;
1898
- /** @description Construct a type with a set of properties K of type T */
1899
- system_resources?: {
1900
- [key: string]: string | number;
1901
- };
1902
- } & {
1903
- [key: string]: string | number | (string | number)[] | {
1904
- [key: string]: string | number | (string | number)[];
1905
- };
1906
- };
1907
- global?: {
1908
- image?: string;
1909
- gpu?: boolean;
1910
- entrypoint?: string | string[];
1911
- env?: {
1912
- [key: string]: string;
1913
- };
1914
- work_dir?: string;
1915
- variables?: {
1916
- [key: string]: string;
1917
- };
1918
- };
1919
- ops: {
1920
- /** @enum {string} */
1921
- type: "container/run" | "container/create-volume";
1922
- id: string;
1923
- args: {
1924
- image: string;
1925
- aliases?: string | string[];
1926
- cmd?: string | string[];
1927
- volumes?: {
1928
- name: string;
1929
- dest: string;
1930
- }[];
1931
- expose?: number | string | {
1932
- __spread__: string;
1933
- chunked?: boolean;
1934
- } | {
1935
- port: number;
1936
- /** @enum {string} */
1937
- type?: "api" | "web" | "websocket" | "webapi" | "none";
1938
- health_checks?: ({
1939
- /** @enum {string} */
1940
- type: "http";
1941
- path: string;
1942
- /** @enum {string} */
1943
- method: "GET" | "POST" | "PUT" | "DELETE";
1944
- expected_status: number;
1945
- /** @description Construct a type with a set of properties K of type T */
1946
- headers?: {
1947
- [key: string]: string;
1948
- };
1949
- body?: unknown;
1950
- continuous: boolean;
1951
- } | {
1952
- /** @enum {string} */
1953
- type: "websocket";
1954
- expected_response: string;
1955
- continuous: boolean;
1956
- })[];
1957
- } | (number | string | {
1958
- __spread__: string;
1959
- chunked?: boolean;
1960
- } | {
1961
- port: number;
1962
- /** @enum {string} */
1963
- type?: "api" | "web" | "websocket" | "webapi" | "none";
1964
- health_checks?: ({
1965
- /** @enum {string} */
1966
- type: "http";
1967
- path: string;
1968
- /** @enum {string} */
1969
- method: "GET" | "POST" | "PUT" | "DELETE";
1970
- expected_status: number;
1971
- /** @description Construct a type with a set of properties K of type T */
1972
- headers?: {
1973
- [key: string]: string;
1974
- };
1975
- body?: unknown;
1976
- continuous: boolean;
1977
- } | {
1978
- /** @enum {string} */
1979
- type: "websocket";
1980
- expected_response: string;
1981
- continuous: boolean;
1982
- })[];
1983
- })[];
1984
- gpu?: boolean;
1985
- work_dir?: string;
1986
- entrypoint?: string | string[];
1987
- env?: {
1988
- [key: string]: string;
1989
- };
1990
- restart_policy?: {
1991
- /** @enum {string} */
1992
- policy: "on-failure";
1993
- restart_tries?: number;
1994
- } | ("no" | "always" | "unless-stopped" | "on-failure");
1995
- private?: boolean;
1996
- resources?: ({
1997
- __spread__: string;
1998
- chunked?: boolean;
1999
- } | {
2000
- /** @enum {string} */
2001
- type: "S3";
2002
- target: string;
2003
- url?: string;
2004
- allowWrite?: boolean;
2005
- files?: string[];
2006
- IAM?: {
2007
- REGION: string;
2008
- ACCESS_KEY_ID: string;
2009
- SECRET_ACCESS_KEY: string;
2010
- };
2011
- } | {
2012
- /** @enum {string} */
2013
- type: "S3";
2014
- target: string;
2015
- bucket: string;
2016
- url?: string;
2017
- allowWrite?: boolean;
2018
- IAM?: {
2019
- REGION: string;
2020
- ACCESS_KEY_ID: string;
2021
- SECRET_ACCESS_KEY: string;
2022
- };
2023
- } | {
2024
- /** @enum {string} */
2025
- type: "S3";
2026
- target: string;
2027
- buckets: {
2028
- url: string;
2029
- files?: string[];
2030
- }[];
2031
- url?: string;
2032
- allowWrite?: boolean;
2033
- IAM?: {
2034
- REGION: string;
2035
- ACCESS_KEY_ID: string;
2036
- SECRET_ACCESS_KEY: string;
2037
- };
2038
- } | {
2039
- /** @enum {string} */
2040
- type: "HF";
2041
- target: string;
2042
- repo: string;
2043
- revision?: string;
2044
- files?: string[];
2045
- accessToken?: string;
2046
- } | {
2047
- /** @enum {string} */
2048
- type: "Ollama";
2049
- model: string;
2050
- target?: string;
2051
- } | "__remove-if-empty__")[];
2052
- authentication?: {
2053
- docker?: {
2054
- username?: string;
2055
- password?: string;
2056
- email?: string;
2057
- server?: string;
2058
- };
2059
- };
2060
- } | {
2061
- name: string;
2062
- };
2063
- results?: {
2064
- [key: string]: string | {
2065
- regex: string;
2066
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
2067
- };
2068
- };
2069
- execution?: {
2070
- group?: string;
2071
- depends_on: string[];
2072
- stop_if_dependent_stops?: boolean;
2073
- } | {
2074
- group?: string;
2075
- };
2076
- }[];
2077
- };
2078
- /** Format: date-time */
2079
- created_at: string;
2080
- }[];
2081
1923
  replicas: number;
2082
1924
  timeout: number;
2083
- jobs: {
2084
- tx: string;
2085
- job: string;
2086
- deployment: string;
2087
- market: string;
2088
- revision: number;
2089
- state: "QUEUED" | "RUNNING" | "COMPLETED" | "STOPPED";
2090
- time_start: number;
2091
- /** Format: date-time */
2092
- created_at: string;
2093
- /** Format: date-time */
2094
- updated_at: string;
2095
- }[];
2096
- events: {
2097
- category: "Deployment" | "Event";
2098
- deploymentId: string;
2099
- type: string;
2100
- message: string;
2101
- tx?: string;
2102
- /** Format: date-time */
2103
- created_at: string;
2104
- }[];
2105
1925
  endpoints: {
2106
1926
  opId: string;
2107
1927
  port: number | string;
@@ -2109,6 +1929,7 @@ export interface components {
2109
1929
  }[];
2110
1930
  confidential: boolean;
2111
1931
  active_revision: number;
1932
+ active_jobs: number;
2112
1933
  /** Format: date-time */
2113
1934
  created_at: string;
2114
1935
  /** Format: date-time */
@@ -2141,220 +1962,7 @@ export interface components {
2141
1962
  timeout: number;
2142
1963
  vault?: string;
2143
1964
  confidential?: boolean;
2144
- job_definition: {
2145
- /** @enum {string} */
2146
- version: "0.1";
2147
- /** @enum {string} */
2148
- type: "container";
2149
- logistics?: {
2150
- send: {
2151
- /**
2152
- * @description api - we receive and send via an endpoint endpoint
2153
- * api-listen - we create an endpoint to listen for incoming requests
2154
- * @enum {string}
2155
- */
2156
- type: "api" | "api-listen";
2157
- /** @description Make all properties in T optional */
2158
- args: {
2159
- endpoint?: string;
2160
- };
2161
- };
2162
- receive: {
2163
- /**
2164
- * @description api - we receive and send via an endpoint endpoint
2165
- * api-listen - we create an endpoint to listen for incoming requests
2166
- * @enum {string}
2167
- */
2168
- type: "api" | "api-listen";
2169
- /** @description Make all properties in T optional */
2170
- args: {
2171
- endpoint?: string;
2172
- };
2173
- };
2174
- };
2175
- deployment_id?: string;
2176
- meta?: {
2177
- trigger?: string;
2178
- /** @description Construct a type with a set of properties K of type T */
2179
- system_resources?: {
2180
- [key: string]: string | number;
2181
- };
2182
- } & {
2183
- [key: string]: string | number | (string | number)[] | {
2184
- [key: string]: string | number | (string | number)[];
2185
- };
2186
- };
2187
- global?: {
2188
- image?: string;
2189
- gpu?: boolean;
2190
- entrypoint?: string | string[];
2191
- env?: {
2192
- [key: string]: string;
2193
- };
2194
- work_dir?: string;
2195
- variables?: {
2196
- [key: string]: string;
2197
- };
2198
- };
2199
- ops: {
2200
- /** @enum {string} */
2201
- type: "container/run" | "container/create-volume";
2202
- id: string;
2203
- args: {
2204
- image: string;
2205
- aliases?: string | string[];
2206
- cmd?: string | string[];
2207
- volumes?: {
2208
- name: string;
2209
- dest: string;
2210
- }[];
2211
- expose?: number | string | {
2212
- __spread__: string;
2213
- chunked?: boolean;
2214
- } | {
2215
- port: number;
2216
- /** @enum {string} */
2217
- type?: "api" | "web" | "websocket" | "webapi" | "none";
2218
- health_checks?: ({
2219
- /** @enum {string} */
2220
- type: "http";
2221
- path: string;
2222
- /** @enum {string} */
2223
- method: "GET" | "POST" | "PUT" | "DELETE";
2224
- expected_status: number;
2225
- /** @description Construct a type with a set of properties K of type T */
2226
- headers?: {
2227
- [key: string]: string;
2228
- };
2229
- body?: unknown;
2230
- continuous: boolean;
2231
- } | {
2232
- /** @enum {string} */
2233
- type: "websocket";
2234
- expected_response: string;
2235
- continuous: boolean;
2236
- })[];
2237
- } | (number | string | {
2238
- __spread__: string;
2239
- chunked?: boolean;
2240
- } | {
2241
- port: number;
2242
- /** @enum {string} */
2243
- type?: "api" | "web" | "websocket" | "webapi" | "none";
2244
- health_checks?: ({
2245
- /** @enum {string} */
2246
- type: "http";
2247
- path: string;
2248
- /** @enum {string} */
2249
- method: "GET" | "POST" | "PUT" | "DELETE";
2250
- expected_status: number;
2251
- /** @description Construct a type with a set of properties K of type T */
2252
- headers?: {
2253
- [key: string]: string;
2254
- };
2255
- body?: unknown;
2256
- continuous: boolean;
2257
- } | {
2258
- /** @enum {string} */
2259
- type: "websocket";
2260
- expected_response: string;
2261
- continuous: boolean;
2262
- })[];
2263
- })[];
2264
- gpu?: boolean;
2265
- work_dir?: string;
2266
- entrypoint?: string | string[];
2267
- env?: {
2268
- [key: string]: string;
2269
- };
2270
- restart_policy?: {
2271
- /** @enum {string} */
2272
- policy: "on-failure";
2273
- restart_tries?: number;
2274
- } | ("no" | "always" | "unless-stopped" | "on-failure");
2275
- private?: boolean;
2276
- resources?: ({
2277
- __spread__: string;
2278
- chunked?: boolean;
2279
- } | {
2280
- /** @enum {string} */
2281
- type: "S3";
2282
- target: string;
2283
- url?: string;
2284
- allowWrite?: boolean;
2285
- files?: string[];
2286
- IAM?: {
2287
- REGION: string;
2288
- ACCESS_KEY_ID: string;
2289
- SECRET_ACCESS_KEY: string;
2290
- };
2291
- } | {
2292
- /** @enum {string} */
2293
- type: "S3";
2294
- target: string;
2295
- bucket: string;
2296
- url?: string;
2297
- allowWrite?: boolean;
2298
- IAM?: {
2299
- REGION: string;
2300
- ACCESS_KEY_ID: string;
2301
- SECRET_ACCESS_KEY: string;
2302
- };
2303
- } | {
2304
- /** @enum {string} */
2305
- type: "S3";
2306
- target: string;
2307
- buckets: {
2308
- url: string;
2309
- files?: string[];
2310
- }[];
2311
- url?: string;
2312
- allowWrite?: boolean;
2313
- IAM?: {
2314
- REGION: string;
2315
- ACCESS_KEY_ID: string;
2316
- SECRET_ACCESS_KEY: string;
2317
- };
2318
- } | {
2319
- /** @enum {string} */
2320
- type: "HF";
2321
- target: string;
2322
- repo: string;
2323
- revision?: string;
2324
- files?: string[];
2325
- accessToken?: string;
2326
- } | {
2327
- /** @enum {string} */
2328
- type: "Ollama";
2329
- model: string;
2330
- target?: string;
2331
- } | "__remove-if-empty__")[];
2332
- authentication?: {
2333
- docker?: {
2334
- username?: string;
2335
- password?: string;
2336
- email?: string;
2337
- server?: string;
2338
- };
2339
- };
2340
- } | {
2341
- name: string;
2342
- };
2343
- results?: {
2344
- [key: string]: string | {
2345
- regex: string;
2346
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
2347
- };
2348
- };
2349
- execution?: {
2350
- group?: string;
2351
- depends_on: string[];
2352
- stop_if_dependent_stops?: boolean;
2353
- } | {
2354
- group?: string;
2355
- };
2356
- }[];
2357
- };
1965
+ job_definition: components["schemas"]["JobDefinition"];
2358
1966
  } & ({
2359
1967
  strategy: "SIMPLE" | "SIMPLE-EXTEND";
2360
1968
  } | {
@@ -2380,8 +1988,8 @@ export interface components {
2380
1988
  Error: {
2381
1989
  error: string;
2382
1990
  };
2383
- /** Events */
2384
- Events: {
1991
+ /** Event */
1992
+ Event: {
2385
1993
  category: "Deployment" | "Event";
2386
1994
  deploymentId: string;
2387
1995
  type: string;
@@ -2390,8 +1998,8 @@ export interface components {
2390
1998
  /** Format: date-time */
2391
1999
  created_at: string;
2392
2000
  };
2393
- /** Jobs */
2394
- Jobs: {
2001
+ /** Job */
2002
+ Job: {
2395
2003
  tx: string;
2396
2004
  job: string;
2397
2005
  deployment: string;
@@ -2438,220 +2046,7 @@ export interface components {
2438
2046
  revision: number;
2439
2047
  deployment: string;
2440
2048
  ipfs_definition_hash: string;
2441
- job_definition: {
2442
- /** @enum {string} */
2443
- version: "0.1";
2444
- /** @enum {string} */
2445
- type: "container";
2446
- logistics?: {
2447
- send: {
2448
- /**
2449
- * @description api - we receive and send via an endpoint endpoint
2450
- * api-listen - we create an endpoint to listen for incoming requests
2451
- * @enum {string}
2452
- */
2453
- type: "api" | "api-listen";
2454
- /** @description Make all properties in T optional */
2455
- args: {
2456
- endpoint?: string;
2457
- };
2458
- };
2459
- receive: {
2460
- /**
2461
- * @description api - we receive and send via an endpoint endpoint
2462
- * api-listen - we create an endpoint to listen for incoming requests
2463
- * @enum {string}
2464
- */
2465
- type: "api" | "api-listen";
2466
- /** @description Make all properties in T optional */
2467
- args: {
2468
- endpoint?: string;
2469
- };
2470
- };
2471
- };
2472
- deployment_id?: string;
2473
- meta?: {
2474
- trigger?: string;
2475
- /** @description Construct a type with a set of properties K of type T */
2476
- system_resources?: {
2477
- [key: string]: string | number;
2478
- };
2479
- } & {
2480
- [key: string]: string | number | (string | number)[] | {
2481
- [key: string]: string | number | (string | number)[];
2482
- };
2483
- };
2484
- global?: {
2485
- image?: string;
2486
- gpu?: boolean;
2487
- entrypoint?: string | string[];
2488
- env?: {
2489
- [key: string]: string;
2490
- };
2491
- work_dir?: string;
2492
- variables?: {
2493
- [key: string]: string;
2494
- };
2495
- };
2496
- ops: {
2497
- /** @enum {string} */
2498
- type: "container/run" | "container/create-volume";
2499
- id: string;
2500
- args: {
2501
- image: string;
2502
- aliases?: string | string[];
2503
- cmd?: string | string[];
2504
- volumes?: {
2505
- name: string;
2506
- dest: string;
2507
- }[];
2508
- expose?: number | string | {
2509
- __spread__: string;
2510
- chunked?: boolean;
2511
- } | {
2512
- port: number;
2513
- /** @enum {string} */
2514
- type?: "api" | "web" | "websocket" | "webapi" | "none";
2515
- health_checks?: ({
2516
- /** @enum {string} */
2517
- type: "http";
2518
- path: string;
2519
- /** @enum {string} */
2520
- method: "GET" | "POST" | "PUT" | "DELETE";
2521
- expected_status: number;
2522
- /** @description Construct a type with a set of properties K of type T */
2523
- headers?: {
2524
- [key: string]: string;
2525
- };
2526
- body?: unknown;
2527
- continuous: boolean;
2528
- } | {
2529
- /** @enum {string} */
2530
- type: "websocket";
2531
- expected_response: string;
2532
- continuous: boolean;
2533
- })[];
2534
- } | (number | string | {
2535
- __spread__: string;
2536
- chunked?: boolean;
2537
- } | {
2538
- port: number;
2539
- /** @enum {string} */
2540
- type?: "api" | "web" | "websocket" | "webapi" | "none";
2541
- health_checks?: ({
2542
- /** @enum {string} */
2543
- type: "http";
2544
- path: string;
2545
- /** @enum {string} */
2546
- method: "GET" | "POST" | "PUT" | "DELETE";
2547
- expected_status: number;
2548
- /** @description Construct a type with a set of properties K of type T */
2549
- headers?: {
2550
- [key: string]: string;
2551
- };
2552
- body?: unknown;
2553
- continuous: boolean;
2554
- } | {
2555
- /** @enum {string} */
2556
- type: "websocket";
2557
- expected_response: string;
2558
- continuous: boolean;
2559
- })[];
2560
- })[];
2561
- gpu?: boolean;
2562
- work_dir?: string;
2563
- entrypoint?: string | string[];
2564
- env?: {
2565
- [key: string]: string;
2566
- };
2567
- restart_policy?: {
2568
- /** @enum {string} */
2569
- policy: "on-failure";
2570
- restart_tries?: number;
2571
- } | ("no" | "always" | "unless-stopped" | "on-failure");
2572
- private?: boolean;
2573
- resources?: ({
2574
- __spread__: string;
2575
- chunked?: boolean;
2576
- } | {
2577
- /** @enum {string} */
2578
- type: "S3";
2579
- target: string;
2580
- url?: string;
2581
- allowWrite?: boolean;
2582
- files?: string[];
2583
- IAM?: {
2584
- REGION: string;
2585
- ACCESS_KEY_ID: string;
2586
- SECRET_ACCESS_KEY: string;
2587
- };
2588
- } | {
2589
- /** @enum {string} */
2590
- type: "S3";
2591
- target: string;
2592
- bucket: string;
2593
- url?: string;
2594
- allowWrite?: boolean;
2595
- IAM?: {
2596
- REGION: string;
2597
- ACCESS_KEY_ID: string;
2598
- SECRET_ACCESS_KEY: string;
2599
- };
2600
- } | {
2601
- /** @enum {string} */
2602
- type: "S3";
2603
- target: string;
2604
- buckets: {
2605
- url: string;
2606
- files?: string[];
2607
- }[];
2608
- url?: string;
2609
- allowWrite?: boolean;
2610
- IAM?: {
2611
- REGION: string;
2612
- ACCESS_KEY_ID: string;
2613
- SECRET_ACCESS_KEY: string;
2614
- };
2615
- } | {
2616
- /** @enum {string} */
2617
- type: "HF";
2618
- target: string;
2619
- repo: string;
2620
- revision?: string;
2621
- files?: string[];
2622
- accessToken?: string;
2623
- } | {
2624
- /** @enum {string} */
2625
- type: "Ollama";
2626
- model: string;
2627
- target?: string;
2628
- } | "__remove-if-empty__")[];
2629
- authentication?: {
2630
- docker?: {
2631
- username?: string;
2632
- password?: string;
2633
- email?: string;
2634
- server?: string;
2635
- };
2636
- };
2637
- } | {
2638
- name: string;
2639
- };
2640
- results?: {
2641
- [key: string]: string | {
2642
- regex: string;
2643
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
2644
- };
2645
- };
2646
- execution?: {
2647
- group?: string;
2648
- depends_on: string[];
2649
- stop_if_dependent_stops?: boolean;
2650
- } | {
2651
- group?: string;
2652
- };
2653
- }[];
2654
- };
2049
+ job_definition: components["schemas"]["JobDefinition"];
2655
2050
  /** Format: date-time */
2656
2051
  created_at: string;
2657
2052
  };
@@ -2786,7 +2181,7 @@ export interface components {
2786
2181
  /** @enum {string} */
2787
2182
  policy: "on-failure";
2788
2183
  restart_tries?: number;
2789
- } | ("no" | "always" | "unless-stopped" | "on-failure");
2184
+ } | ("on-failure" | "no" | "always" | "unless-stopped");
2790
2185
  private?: boolean;
2791
2186
  resources?: ({
2792
2187
  __spread__: string;
@@ -2925,7 +2320,7 @@ export interface components {
2925
2320
  End: string;
2926
2321
  ExitCode: number;
2927
2322
  Output: string;
2928
- }[];
2323
+ }[] | null;
2929
2324
  };
2930
2325
  RestartCount: number;
2931
2326
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.23",
2
+ "version": "0.1.24",
3
3
  "name": "@nosana/types",
4
4
  "author": "Nosana",
5
5
  "description": "Nosana Types Module",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "typecheck": "tsc --noEmit",
15
- "build": "npm run generate && npm run prepare && tsc --build",
15
+ "build": "npm run prepare && tsc --build",
16
16
  "clean": "rm -rf dist",
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",