@nosana/api 0.1.7 → 0.1.11

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 (55) hide show
  1. package/README.md +73 -0
  2. package/dist/client/deployment-manager-schema.d.ts +2100 -0
  3. package/dist/client/deployment-manager-schema.js +6 -0
  4. package/dist/client/deployment-manager-schema.js.map +1 -0
  5. package/dist/client/index.js +4 -1
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/client/schema.d.ts +406 -804
  8. package/dist/routes/credits/index.js +1 -1
  9. package/dist/routes/credits/index.js.map +1 -1
  10. package/dist/routes/deployments/deployment/actions/deploymentArchive.js +3 -2
  11. package/dist/routes/deployments/deployment/actions/deploymentArchive.js.map +1 -1
  12. package/dist/routes/deployments/deployment/actions/deploymentCreateNewRevision.js +0 -1
  13. package/dist/routes/deployments/deployment/actions/deploymentCreateNewRevision.js.map +1 -1
  14. package/dist/routes/deployments/deployment/actions/deploymentDelete.d.ts +13 -0
  15. package/dist/routes/deployments/deployment/actions/deploymentDelete.js +26 -0
  16. package/dist/routes/deployments/deployment/actions/deploymentDelete.js.map +1 -0
  17. package/dist/routes/deployments/deployment/actions/deploymentGetEvents.d.ts +13 -0
  18. package/dist/routes/deployments/deployment/actions/deploymentGetEvents.js +19 -0
  19. package/dist/routes/deployments/deployment/actions/deploymentGetEvents.js.map +1 -0
  20. package/dist/routes/deployments/deployment/actions/deploymentGetJob.js +1 -1
  21. package/dist/routes/deployments/deployment/actions/deploymentGetJob.js.map +1 -1
  22. package/dist/routes/deployments/deployment/actions/deploymentGetJobs.d.ts +13 -0
  23. package/dist/routes/deployments/deployment/actions/deploymentGetJobs.js +19 -0
  24. package/dist/routes/deployments/deployment/actions/deploymentGetJobs.js.map +1 -0
  25. package/dist/routes/deployments/deployment/actions/deploymentGetRevisions.d.ts +13 -0
  26. package/dist/routes/deployments/deployment/actions/deploymentGetRevisions.js +19 -0
  27. package/dist/routes/deployments/deployment/actions/deploymentGetRevisions.js.map +1 -0
  28. package/dist/routes/deployments/deployment/actions/deploymentStart.js +3 -2
  29. package/dist/routes/deployments/deployment/actions/deploymentStart.js.map +1 -1
  30. package/dist/routes/deployments/deployment/actions/deploymentStop.js +3 -2
  31. package/dist/routes/deployments/deployment/actions/deploymentStop.js.map +1 -1
  32. package/dist/routes/deployments/deployment/actions/deploymentUpdateActiveRevision.js +1 -1
  33. package/dist/routes/deployments/deployment/actions/deploymentUpdateActiveRevision.js.map +1 -1
  34. package/dist/routes/deployments/deployment/actions/deploymentUpdateReplicaCount.js +3 -2
  35. package/dist/routes/deployments/deployment/actions/deploymentUpdateReplicaCount.js.map +1 -1
  36. package/dist/routes/deployments/deployment/actions/deploymentUpdateSchedule.js +2 -1
  37. package/dist/routes/deployments/deployment/actions/deploymentUpdateSchedule.js.map +1 -1
  38. package/dist/routes/deployments/deployment/actions/deploymentUpdateTimeout.js +3 -2
  39. package/dist/routes/deployments/deployment/actions/deploymentUpdateTimeout.js.map +1 -1
  40. package/dist/routes/deployments/deployment/actions/index.d.ts +4 -0
  41. package/dist/routes/deployments/deployment/actions/index.js +4 -0
  42. package/dist/routes/deployments/deployment/actions/index.js.map +1 -1
  43. package/dist/routes/deployments/deployment/actions/vaultWithdraw.js +1 -1
  44. package/dist/routes/deployments/deployment/actions/vaultWithdraw.js.map +1 -1
  45. package/dist/routes/deployments/deployment/createDeployment.d.ts +3 -1
  46. package/dist/routes/deployments/deployment/createDeployment.js +60 -3
  47. package/dist/routes/deployments/deployment/createDeployment.js.map +1 -1
  48. package/dist/routes/deployments/index.js +0 -3
  49. package/dist/routes/deployments/index.js.map +1 -1
  50. package/dist/routes/deployments/types.d.ts +9 -2
  51. package/dist/routes/jobs/index.js +4 -4
  52. package/dist/routes/jobs/index.js.map +1 -1
  53. package/dist/routes/markets/index.js +3 -3
  54. package/dist/routes/markets/index.js.map +1 -1
  55. package/package.json +2 -2
@@ -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,190 +937,7 @@ export interface paths {
661
937
  revision: number;
662
938
  deployment: string;
663
939
  ipfs_definition_hash: string;
664
- job_definition: {
665
- version: string;
666
- /** @enum {string} */
667
- type: "container";
668
- logistics?: {
669
- send?: {
670
- /**
671
- * @description api-listen - we have an api listenening for the job poster to send the job description
672
- * api - we recieve an api endpoint to query and it will return the job description
673
- * @enum {string}
674
- */
675
- type: "api" | "api-listen";
676
- args: {
677
- endpoint?: string;
678
- };
679
- };
680
- receive?: {
681
- /**
682
- * @description api-listen - we have an api that listen for request from the job poster, so we can return the result to them
683
- * api - we get an api to post the result to
684
- * @enum {string}
685
- */
686
- type: "api" | "api-listen";
687
- args: {
688
- endpoint?: string;
689
- };
690
- };
691
- };
692
- deployment_id?: string;
693
- meta?: {
694
- trigger?: string;
695
- system_resources?: {
696
- [key: string]: string | number;
697
- };
698
- } & {
699
- [key: string]: unknown;
700
- };
701
- global?: {
702
- image?: string;
703
- gpu?: boolean;
704
- entrypoint?: string | string[];
705
- env?: {
706
- [key: string]: string;
707
- };
708
- work_dir?: string;
709
- variables?: {
710
- [key: string]: string;
711
- };
712
- };
713
- /**
714
- * @description **********************
715
- * Job Definition Types *
716
- * **********************
717
- */
718
- ops: {
719
- /** @enum {string} */
720
- type: "container/run" | "container/create-volume";
721
- id: string;
722
- args: {
723
- image: string;
724
- aliases?: string | string[];
725
- cmd?: string | string[];
726
- volumes?: {
727
- name: string;
728
- dest: string;
729
- }[];
730
- expose?: number | string | {
731
- __spread__: string;
732
- } | (number | string | {
733
- port: number | string;
734
- /** @enum {string} */
735
- type?: "web" | "api" | "websocket" | "webapi" | "none";
736
- health_checks?: ({
737
- /** @enum {string} */
738
- type: "http";
739
- path: string;
740
- /** @enum {string} */
741
- method: "GET" | "POST" | "PUT" | "DELETE";
742
- expected_status: number;
743
- /** @description Construct a type with a set of properties K of type T */
744
- headers?: {
745
- [key: string]: string;
746
- };
747
- body?: unknown;
748
- continuous: boolean;
749
- } | {
750
- /** @enum {string} */
751
- type: "websocket";
752
- expected_response: string;
753
- continuous: boolean;
754
- })[];
755
- } | {
756
- __spread__: string;
757
- })[];
758
- private?: boolean;
759
- gpu?: boolean;
760
- work_dir?: string;
761
- output?: string;
762
- entrypoint?: string | string[];
763
- env?: {
764
- [key: string]: string;
765
- };
766
- required_vram?: number;
767
- resources?: (({
768
- /** @enum {string} */
769
- type: "S3";
770
- target: string;
771
- url?: string;
772
- allowWrite?: boolean;
773
- files?: string[];
774
- IAM?: {
775
- REGION: string;
776
- ACCESS_KEY_ID: string;
777
- SECRET_ACCESS_KEY: string;
778
- };
779
- } & Record<string, never>) | ({
780
- /** @enum {string} */
781
- type: "S3";
782
- target: string;
783
- bucket: string;
784
- url?: string;
785
- allowWrite?: boolean;
786
- IAM?: {
787
- REGION: string;
788
- ACCESS_KEY_ID: string;
789
- SECRET_ACCESS_KEY: string;
790
- };
791
- } & Record<string, never>) | ({
792
- /** @enum {string} */
793
- type: "S3";
794
- target: string;
795
- buckets: {
796
- url: string;
797
- files?: string[];
798
- }[];
799
- url?: string;
800
- allowWrite?: boolean;
801
- IAM?: {
802
- REGION: string;
803
- ACCESS_KEY_ID: string;
804
- SECRET_ACCESS_KEY: string;
805
- };
806
- } & Record<string, never>) | {
807
- /** @enum {string} */
808
- type: "HF";
809
- target: string;
810
- repo: string;
811
- revision?: string;
812
- files?: string[];
813
- accessToken?: string;
814
- } | {
815
- /** @enum {string} */
816
- type: "Ollama";
817
- model: string;
818
- target?: string;
819
- } | {
820
- __spread__: string;
821
- } | "__remove-if-empty__")[];
822
- authentication?: {
823
- docker?: {
824
- username?: string;
825
- password?: string;
826
- email?: string;
827
- server?: string;
828
- };
829
- };
830
- } | {
831
- name: string;
832
- };
833
- results?: {
834
- [key: string]: string | {
835
- regex: string;
836
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
837
- };
838
- };
839
- execution?: {
840
- group?: string;
841
- depends_on: string[];
842
- stop_if_dependent_stops?: boolean;
843
- } | {
844
- group?: string;
845
- };
846
- }[];
847
- };
940
+ job_definition: components["schemas"]["JobDefinition"];
848
941
  /** Format: date-time */
849
942
  created_at: string;
850
943
  }[];
@@ -1827,217 +1920,8 @@ export interface components {
1827
1920
  market: string;
1828
1921
  owner: string;
1829
1922
  status: "DRAFT" | "ERROR" | "STARTING" | "RUNNING" | "STOPPING" | "STOPPED" | "INSUFFICIENT_FUNDS" | "ARCHIVED";
1830
- revisions: {
1831
- revision: number;
1832
- deployment: string;
1833
- ipfs_definition_hash: string;
1834
- job_definition: {
1835
- version: string;
1836
- /** @enum {string} */
1837
- type: "container";
1838
- logistics?: {
1839
- send?: {
1840
- /**
1841
- * @description api-listen - we have an api listenening for the job poster to send the job description
1842
- * api - we recieve an api endpoint to query and it will return the job description
1843
- * @enum {string}
1844
- */
1845
- type: "api" | "api-listen";
1846
- args: {
1847
- endpoint?: string;
1848
- };
1849
- };
1850
- receive?: {
1851
- /**
1852
- * @description api-listen - we have an api that listen for request from the job poster, so we can return the result to them
1853
- * api - we get an api to post the result to
1854
- * @enum {string}
1855
- */
1856
- type: "api" | "api-listen";
1857
- args: {
1858
- endpoint?: string;
1859
- };
1860
- };
1861
- };
1862
- deployment_id?: string;
1863
- meta?: {
1864
- trigger?: string;
1865
- system_resources?: {
1866
- [key: string]: string | number;
1867
- };
1868
- } & {
1869
- [key: string]: unknown;
1870
- };
1871
- global?: {
1872
- image?: string;
1873
- gpu?: boolean;
1874
- entrypoint?: string | string[];
1875
- env?: {
1876
- [key: string]: string;
1877
- };
1878
- work_dir?: string;
1879
- variables?: {
1880
- [key: string]: string;
1881
- };
1882
- };
1883
- /**
1884
- * @description **********************
1885
- * Job Definition Types *
1886
- * **********************
1887
- */
1888
- ops: {
1889
- /** @enum {string} */
1890
- type: "container/run" | "container/create-volume";
1891
- id: string;
1892
- args: {
1893
- image: string;
1894
- aliases?: string | string[];
1895
- cmd?: string | string[];
1896
- volumes?: {
1897
- name: string;
1898
- dest: string;
1899
- }[];
1900
- expose?: number | string | {
1901
- __spread__: string;
1902
- } | (number | string | {
1903
- port: number | string;
1904
- /** @enum {string} */
1905
- type?: "web" | "api" | "websocket" | "webapi" | "none";
1906
- health_checks?: ({
1907
- /** @enum {string} */
1908
- type: "http";
1909
- path: string;
1910
- /** @enum {string} */
1911
- method: "GET" | "POST" | "PUT" | "DELETE";
1912
- expected_status: number;
1913
- /** @description Construct a type with a set of properties K of type T */
1914
- headers?: {
1915
- [key: string]: string;
1916
- };
1917
- body?: unknown;
1918
- continuous: boolean;
1919
- } | {
1920
- /** @enum {string} */
1921
- type: "websocket";
1922
- expected_response: string;
1923
- continuous: boolean;
1924
- })[];
1925
- } | {
1926
- __spread__: string;
1927
- })[];
1928
- private?: boolean;
1929
- gpu?: boolean;
1930
- work_dir?: string;
1931
- output?: string;
1932
- entrypoint?: string | string[];
1933
- env?: {
1934
- [key: string]: string;
1935
- };
1936
- required_vram?: number;
1937
- resources?: (({
1938
- /** @enum {string} */
1939
- type: "S3";
1940
- target: string;
1941
- url?: string;
1942
- allowWrite?: boolean;
1943
- files?: string[];
1944
- IAM?: {
1945
- REGION: string;
1946
- ACCESS_KEY_ID: string;
1947
- SECRET_ACCESS_KEY: string;
1948
- };
1949
- } & Record<string, never>) | ({
1950
- /** @enum {string} */
1951
- type: "S3";
1952
- target: string;
1953
- bucket: string;
1954
- url?: string;
1955
- allowWrite?: boolean;
1956
- IAM?: {
1957
- REGION: string;
1958
- ACCESS_KEY_ID: string;
1959
- SECRET_ACCESS_KEY: string;
1960
- };
1961
- } & Record<string, never>) | ({
1962
- /** @enum {string} */
1963
- type: "S3";
1964
- target: string;
1965
- buckets: {
1966
- url: string;
1967
- files?: string[];
1968
- }[];
1969
- url?: string;
1970
- allowWrite?: boolean;
1971
- IAM?: {
1972
- REGION: string;
1973
- ACCESS_KEY_ID: string;
1974
- SECRET_ACCESS_KEY: string;
1975
- };
1976
- } & Record<string, never>) | {
1977
- /** @enum {string} */
1978
- type: "HF";
1979
- target: string;
1980
- repo: string;
1981
- revision?: string;
1982
- files?: string[];
1983
- accessToken?: string;
1984
- } | {
1985
- /** @enum {string} */
1986
- type: "Ollama";
1987
- model: string;
1988
- target?: string;
1989
- } | {
1990
- __spread__: string;
1991
- } | "__remove-if-empty__")[];
1992
- authentication?: {
1993
- docker?: {
1994
- username?: string;
1995
- password?: string;
1996
- email?: string;
1997
- server?: string;
1998
- };
1999
- };
2000
- } | {
2001
- name: string;
2002
- };
2003
- results?: {
2004
- [key: string]: string | {
2005
- regex: string;
2006
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
2007
- };
2008
- };
2009
- execution?: {
2010
- group?: string;
2011
- depends_on: string[];
2012
- stop_if_dependent_stops?: boolean;
2013
- } | {
2014
- group?: string;
2015
- };
2016
- }[];
2017
- };
2018
- /** Format: date-time */
2019
- created_at: string;
2020
- }[];
2021
1923
  replicas: number;
2022
1924
  timeout: number;
2023
- jobs: {
2024
- tx: string;
2025
- job: string;
2026
- deployment: string;
2027
- revision: number;
2028
- status: "PENDING" | "CONFIRMED" | "COMPLETED";
2029
- /** Format: date-time */
2030
- created_at: string;
2031
- }[];
2032
- events: {
2033
- category: "Deployment" | "Event";
2034
- deploymentId: string;
2035
- type: string;
2036
- message: string;
2037
- tx?: string;
2038
- /** Format: date-time */
2039
- created_at: string;
2040
- }[];
2041
1925
  endpoints: {
2042
1926
  opId: string;
2043
1927
  port: number | string;
@@ -2045,17 +1929,23 @@ export interface components {
2045
1929
  }[];
2046
1930
  confidential: boolean;
2047
1931
  active_revision: number;
1932
+ active_jobs: number;
2048
1933
  /** Format: date-time */
2049
1934
  created_at: string;
2050
1935
  /** Format: date-time */
2051
1936
  updated_at: string;
2052
1937
  } & ({
2053
- strategy: "SIMPLE" | "SIMPLE-EXTEND" | "INFINITE";
1938
+ strategy: "SIMPLE" | "SIMPLE-EXTEND";
2054
1939
  } | {
2055
1940
  /** @enum {string} */
2056
1941
  strategy: "SCHEDULED";
2057
1942
  /** @description Cron expression for scheduled deployments */
2058
1943
  schedule: string;
1944
+ } | {
1945
+ timeout: number;
1946
+ /** @enum {string} */
1947
+ strategy: "INFINITE";
1948
+ rotation_time: number;
2059
1949
  });
2060
1950
  /** Deployments */
2061
1951
  Deployments: components["schemas"]["Deployment"][];
@@ -2068,200 +1958,25 @@ export interface components {
2068
1958
  name: string;
2069
1959
  market: string;
2070
1960
  replicas: number;
1961
+ /** @description Timeout in minutes, must be at least 1 minute. */
2071
1962
  timeout: number;
2072
1963
  vault?: string;
2073
1964
  confidential?: boolean;
2074
- job_definition: {
2075
- version: string;
2076
- /** @enum {string} */
2077
- type: "container";
2078
- logistics?: {
2079
- send?: {
2080
- /**
2081
- * @description api-listen - we have an api listenening for the job poster to send the job description
2082
- * api - we recieve an api endpoint to query and it will return the job description
2083
- * @enum {string}
2084
- */
2085
- type: "api" | "api-listen";
2086
- args: {
2087
- endpoint?: string;
2088
- };
2089
- };
2090
- receive?: {
2091
- /**
2092
- * @description api-listen - we have an api that listen for request from the job poster, so we can return the result to them
2093
- * api - we get an api to post the result to
2094
- * @enum {string}
2095
- */
2096
- type: "api" | "api-listen";
2097
- args: {
2098
- endpoint?: string;
2099
- };
2100
- };
2101
- };
2102
- deployment_id?: string;
2103
- meta?: {
2104
- trigger?: string;
2105
- system_resources?: {
2106
- [key: string]: string | number;
2107
- };
2108
- } & {
2109
- [key: string]: unknown;
2110
- };
2111
- global?: {
2112
- image?: string;
2113
- gpu?: boolean;
2114
- entrypoint?: string | string[];
2115
- env?: {
2116
- [key: string]: string;
2117
- };
2118
- work_dir?: string;
2119
- variables?: {
2120
- [key: string]: string;
2121
- };
2122
- };
2123
- /**
2124
- * @description **********************
2125
- * Job Definition Types *
2126
- * **********************
2127
- */
2128
- ops: {
2129
- /** @enum {string} */
2130
- type: "container/run" | "container/create-volume";
2131
- id: string;
2132
- args: {
2133
- image: string;
2134
- aliases?: string | string[];
2135
- cmd?: string | string[];
2136
- volumes?: {
2137
- name: string;
2138
- dest: string;
2139
- }[];
2140
- expose?: number | string | {
2141
- __spread__: string;
2142
- } | (number | string | {
2143
- port: number | string;
2144
- /** @enum {string} */
2145
- type?: "web" | "api" | "websocket" | "webapi" | "none";
2146
- health_checks?: ({
2147
- /** @enum {string} */
2148
- type: "http";
2149
- path: string;
2150
- /** @enum {string} */
2151
- method: "GET" | "POST" | "PUT" | "DELETE";
2152
- expected_status: number;
2153
- /** @description Construct a type with a set of properties K of type T */
2154
- headers?: {
2155
- [key: string]: string;
2156
- };
2157
- body?: unknown;
2158
- continuous: boolean;
2159
- } | {
2160
- /** @enum {string} */
2161
- type: "websocket";
2162
- expected_response: string;
2163
- continuous: boolean;
2164
- })[];
2165
- } | {
2166
- __spread__: string;
2167
- })[];
2168
- private?: boolean;
2169
- gpu?: boolean;
2170
- work_dir?: string;
2171
- output?: string;
2172
- entrypoint?: string | string[];
2173
- env?: {
2174
- [key: string]: string;
2175
- };
2176
- required_vram?: number;
2177
- resources?: (({
2178
- /** @enum {string} */
2179
- type: "S3";
2180
- target: string;
2181
- url?: string;
2182
- allowWrite?: boolean;
2183
- files?: string[];
2184
- IAM?: {
2185
- REGION: string;
2186
- ACCESS_KEY_ID: string;
2187
- SECRET_ACCESS_KEY: string;
2188
- };
2189
- } & Record<string, never>) | ({
2190
- /** @enum {string} */
2191
- type: "S3";
2192
- target: string;
2193
- bucket: string;
2194
- url?: string;
2195
- allowWrite?: boolean;
2196
- IAM?: {
2197
- REGION: string;
2198
- ACCESS_KEY_ID: string;
2199
- SECRET_ACCESS_KEY: string;
2200
- };
2201
- } & Record<string, never>) | ({
2202
- /** @enum {string} */
2203
- type: "S3";
2204
- target: string;
2205
- buckets: {
2206
- url: string;
2207
- files?: string[];
2208
- }[];
2209
- url?: string;
2210
- allowWrite?: boolean;
2211
- IAM?: {
2212
- REGION: string;
2213
- ACCESS_KEY_ID: string;
2214
- SECRET_ACCESS_KEY: string;
2215
- };
2216
- } & Record<string, never>) | {
2217
- /** @enum {string} */
2218
- type: "HF";
2219
- target: string;
2220
- repo: string;
2221
- revision?: string;
2222
- files?: string[];
2223
- accessToken?: string;
2224
- } | {
2225
- /** @enum {string} */
2226
- type: "Ollama";
2227
- model: string;
2228
- target?: string;
2229
- } | {
2230
- __spread__: string;
2231
- } | "__remove-if-empty__")[];
2232
- authentication?: {
2233
- docker?: {
2234
- username?: string;
2235
- password?: string;
2236
- email?: string;
2237
- server?: string;
2238
- };
2239
- };
2240
- } | {
2241
- name: string;
2242
- };
2243
- results?: {
2244
- [key: string]: string | {
2245
- regex: string;
2246
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
2247
- };
2248
- };
2249
- execution?: {
2250
- group?: string;
2251
- depends_on: string[];
2252
- stop_if_dependent_stops?: boolean;
2253
- } | {
2254
- group?: string;
2255
- };
2256
- }[];
2257
- };
1965
+ job_definition: components["schemas"]["JobDefinition"];
2258
1966
  } & ({
2259
- strategy: "SIMPLE" | "SIMPLE-EXTEND" | "INFINITE";
1967
+ strategy: "SIMPLE" | "SIMPLE-EXTEND";
2260
1968
  } | {
2261
1969
  /** @enum {string} */
2262
1970
  strategy: "SCHEDULED";
2263
1971
  /** @description Cron expression for scheduled deployments */
2264
1972
  schedule: string;
1973
+ } | {
1974
+ /** @description Timeout in minutes, must be at least 60 minute. */
1975
+ timeout: number;
1976
+ /** @enum {string} */
1977
+ strategy: "INFINITE";
1978
+ /** @description Rotation time in seconds. Must be at least 10 minutes less than timeout to allow for proper rotation. */
1979
+ rotation_time?: number;
2265
1980
  });
2266
1981
  /** Endpoint */
2267
1982
  Endpoint: {
@@ -2273,8 +1988,8 @@ export interface components {
2273
1988
  Error: {
2274
1989
  error: string;
2275
1990
  };
2276
- /** Events */
2277
- Events: {
1991
+ /** Event */
1992
+ Event: {
2278
1993
  category: "Deployment" | "Event";
2279
1994
  deploymentId: string;
2280
1995
  type: string;
@@ -2283,15 +1998,19 @@ export interface components {
2283
1998
  /** Format: date-time */
2284
1999
  created_at: string;
2285
2000
  };
2286
- /** Jobs */
2287
- Jobs: {
2001
+ /** Job */
2002
+ Job: {
2288
2003
  tx: string;
2289
2004
  job: string;
2290
2005
  deployment: string;
2006
+ market: string;
2291
2007
  revision: number;
2292
- status: "PENDING" | "CONFIRMED" | "COMPLETED";
2008
+ state: "QUEUED" | "RUNNING" | "COMPLETED" | "STOPPED";
2009
+ time_start: number;
2293
2010
  /** Format: date-time */
2294
2011
  created_at: string;
2012
+ /** Format: date-time */
2013
+ updated_at: string;
2295
2014
  };
2296
2015
  /** PublicKey */
2297
2016
  PublicKey: string;
@@ -2300,6 +2019,9 @@ export interface components {
2300
2019
  task: "LIST" | "EXTEND" | "STOP";
2301
2020
  deploymentId: string;
2302
2021
  tx?: string;
2022
+ job?: string;
2023
+ limit?: number;
2024
+ active_revision?: number;
2303
2025
  /** Format: date-time */
2304
2026
  due_at: string;
2305
2027
  /** Format: date-time */
@@ -2324,217 +2046,37 @@ export interface components {
2324
2046
  revision: number;
2325
2047
  deployment: string;
2326
2048
  ipfs_definition_hash: string;
2327
- job_definition: {
2328
- version: string;
2329
- /** @enum {string} */
2330
- type: "container";
2331
- logistics?: {
2332
- send?: {
2333
- /**
2334
- * @description api-listen - we have an api listenening for the job poster to send the job description
2335
- * api - we recieve an api endpoint to query and it will return the job description
2336
- * @enum {string}
2337
- */
2338
- type: "api" | "api-listen";
2339
- args: {
2340
- endpoint?: string;
2341
- };
2342
- };
2343
- receive?: {
2344
- /**
2345
- * @description api-listen - we have an api that listen for request from the job poster, so we can return the result to them
2346
- * api - we get an api to post the result to
2347
- * @enum {string}
2348
- */
2349
- type: "api" | "api-listen";
2350
- args: {
2351
- endpoint?: string;
2352
- };
2353
- };
2354
- };
2355
- deployment_id?: string;
2356
- meta?: {
2357
- trigger?: string;
2358
- system_resources?: {
2359
- [key: string]: string | number;
2360
- };
2361
- } & {
2362
- [key: string]: unknown;
2363
- };
2364
- global?: {
2365
- image?: string;
2366
- gpu?: boolean;
2367
- entrypoint?: string | string[];
2368
- env?: {
2369
- [key: string]: string;
2370
- };
2371
- work_dir?: string;
2372
- variables?: {
2373
- [key: string]: string;
2374
- };
2375
- };
2376
- /**
2377
- * @description **********************
2378
- * Job Definition Types *
2379
- * **********************
2380
- */
2381
- ops: {
2382
- /** @enum {string} */
2383
- type: "container/run" | "container/create-volume";
2384
- id: string;
2385
- args: {
2386
- image: string;
2387
- aliases?: string | string[];
2388
- cmd?: string | string[];
2389
- volumes?: {
2390
- name: string;
2391
- dest: string;
2392
- }[];
2393
- expose?: number | string | {
2394
- __spread__: string;
2395
- } | (number | string | {
2396
- port: number | string;
2397
- /** @enum {string} */
2398
- type?: "web" | "api" | "websocket" | "webapi" | "none";
2399
- health_checks?: ({
2400
- /** @enum {string} */
2401
- type: "http";
2402
- path: string;
2403
- /** @enum {string} */
2404
- method: "GET" | "POST" | "PUT" | "DELETE";
2405
- expected_status: number;
2406
- /** @description Construct a type with a set of properties K of type T */
2407
- headers?: {
2408
- [key: string]: string;
2409
- };
2410
- body?: unknown;
2411
- continuous: boolean;
2412
- } | {
2413
- /** @enum {string} */
2414
- type: "websocket";
2415
- expected_response: string;
2416
- continuous: boolean;
2417
- })[];
2418
- } | {
2419
- __spread__: string;
2420
- })[];
2421
- private?: boolean;
2422
- gpu?: boolean;
2423
- work_dir?: string;
2424
- output?: string;
2425
- entrypoint?: string | string[];
2426
- env?: {
2427
- [key: string]: string;
2428
- };
2429
- required_vram?: number;
2430
- resources?: (({
2431
- /** @enum {string} */
2432
- type: "S3";
2433
- target: string;
2434
- url?: string;
2435
- allowWrite?: boolean;
2436
- files?: string[];
2437
- IAM?: {
2438
- REGION: string;
2439
- ACCESS_KEY_ID: string;
2440
- SECRET_ACCESS_KEY: string;
2441
- };
2442
- } & Record<string, never>) | ({
2443
- /** @enum {string} */
2444
- type: "S3";
2445
- target: string;
2446
- bucket: string;
2447
- url?: string;
2448
- allowWrite?: boolean;
2449
- IAM?: {
2450
- REGION: string;
2451
- ACCESS_KEY_ID: string;
2452
- SECRET_ACCESS_KEY: string;
2453
- };
2454
- } & Record<string, never>) | ({
2455
- /** @enum {string} */
2456
- type: "S3";
2457
- target: string;
2458
- buckets: {
2459
- url: string;
2460
- files?: string[];
2461
- }[];
2462
- url?: string;
2463
- allowWrite?: boolean;
2464
- IAM?: {
2465
- REGION: string;
2466
- ACCESS_KEY_ID: string;
2467
- SECRET_ACCESS_KEY: string;
2468
- };
2469
- } & Record<string, never>) | {
2470
- /** @enum {string} */
2471
- type: "HF";
2472
- target: string;
2473
- repo: string;
2474
- revision?: string;
2475
- files?: string[];
2476
- accessToken?: string;
2477
- } | {
2478
- /** @enum {string} */
2479
- type: "Ollama";
2480
- model: string;
2481
- target?: string;
2482
- } | {
2483
- __spread__: string;
2484
- } | "__remove-if-empty__")[];
2485
- authentication?: {
2486
- docker?: {
2487
- username?: string;
2488
- password?: string;
2489
- email?: string;
2490
- server?: string;
2491
- };
2492
- };
2493
- } | {
2494
- name: string;
2495
- };
2496
- results?: {
2497
- [key: string]: string | {
2498
- regex: string;
2499
- logType: ("stdin" | "stdout" | "stderr" | "nodeerr")[];
2500
- };
2501
- };
2502
- execution?: {
2503
- group?: string;
2504
- depends_on: string[];
2505
- stop_if_dependent_stops?: boolean;
2506
- } | {
2507
- group?: string;
2508
- };
2509
- }[];
2510
- };
2049
+ job_definition: components["schemas"]["JobDefinition"];
2511
2050
  /** Format: date-time */
2512
2051
  created_at: string;
2513
2052
  };
2514
2053
  /** JobDefinition */
2515
2054
  JobDefinition: {
2516
- version: string;
2055
+ /** @enum {string} */
2056
+ version: "0.1";
2517
2057
  /** @enum {string} */
2518
2058
  type: "container";
2519
2059
  logistics?: {
2520
- send?: {
2060
+ send: {
2521
2061
  /**
2522
- * @description api-listen - we have an api listenening for the job poster to send the job description
2523
- * api - we recieve an api endpoint to query and it will return the job description
2062
+ * @description api - we receive and send via an endpoint endpoint
2063
+ * api-listen - we create an endpoint to listen for incoming requests
2524
2064
  * @enum {string}
2525
2065
  */
2526
2066
  type: "api" | "api-listen";
2067
+ /** @description Make all properties in T optional */
2527
2068
  args: {
2528
2069
  endpoint?: string;
2529
2070
  };
2530
2071
  };
2531
- receive?: {
2072
+ receive: {
2532
2073
  /**
2533
- * @description api-listen - we have an api that listen for request from the job poster, so we can return the result to them
2534
- * api - we get an api to post the result to
2074
+ * @description api - we receive and send via an endpoint endpoint
2075
+ * api-listen - we create an endpoint to listen for incoming requests
2535
2076
  * @enum {string}
2536
2077
  */
2537
2078
  type: "api" | "api-listen";
2079
+ /** @description Make all properties in T optional */
2538
2080
  args: {
2539
2081
  endpoint?: string;
2540
2082
  };
@@ -2543,11 +2085,14 @@ export interface components {
2543
2085
  deployment_id?: string;
2544
2086
  meta?: {
2545
2087
  trigger?: string;
2088
+ /** @description Construct a type with a set of properties K of type T */
2546
2089
  system_resources?: {
2547
2090
  [key: string]: string | number;
2548
2091
  };
2549
2092
  } & {
2550
- [key: string]: unknown;
2093
+ [key: string]: string | number | (string | number)[] | {
2094
+ [key: string]: string | number | (string | number)[];
2095
+ };
2551
2096
  };
2552
2097
  global?: {
2553
2098
  image?: string;
@@ -2561,11 +2106,6 @@ export interface components {
2561
2106
  [key: string]: string;
2562
2107
  };
2563
2108
  };
2564
- /**
2565
- * @description **********************
2566
- * Job Definition Types *
2567
- * **********************
2568
- */
2569
2109
  ops: {
2570
2110
  /** @enum {string} */
2571
2111
  type: "container/run" | "container/create-volume";
@@ -2580,10 +2120,11 @@ export interface components {
2580
2120
  }[];
2581
2121
  expose?: number | string | {
2582
2122
  __spread__: string;
2583
- } | (number | string | {
2584
- port: number | string;
2123
+ chunked?: boolean;
2124
+ } | {
2125
+ port: number;
2585
2126
  /** @enum {string} */
2586
- type?: "web" | "api" | "websocket" | "webapi" | "none";
2127
+ type?: "api" | "web" | "websocket" | "webapi" | "none";
2587
2128
  health_checks?: ({
2588
2129
  /** @enum {string} */
2589
2130
  type: "http";
@@ -2603,19 +2144,49 @@ export interface components {
2603
2144
  expected_response: string;
2604
2145
  continuous: boolean;
2605
2146
  })[];
2606
- } | {
2147
+ } | (number | string | {
2607
2148
  __spread__: string;
2149
+ chunked?: boolean;
2150
+ } | {
2151
+ port: number;
2152
+ /** @enum {string} */
2153
+ type?: "api" | "web" | "websocket" | "webapi" | "none";
2154
+ health_checks?: ({
2155
+ /** @enum {string} */
2156
+ type: "http";
2157
+ path: string;
2158
+ /** @enum {string} */
2159
+ method: "GET" | "POST" | "PUT" | "DELETE";
2160
+ expected_status: number;
2161
+ /** @description Construct a type with a set of properties K of type T */
2162
+ headers?: {
2163
+ [key: string]: string;
2164
+ };
2165
+ body?: unknown;
2166
+ continuous: boolean;
2167
+ } | {
2168
+ /** @enum {string} */
2169
+ type: "websocket";
2170
+ expected_response: string;
2171
+ continuous: boolean;
2172
+ })[];
2608
2173
  })[];
2609
- private?: boolean;
2610
2174
  gpu?: boolean;
2611
2175
  work_dir?: string;
2612
- output?: string;
2613
2176
  entrypoint?: string | string[];
2614
2177
  env?: {
2615
2178
  [key: string]: string;
2616
2179
  };
2617
- required_vram?: number;
2618
- resources?: (({
2180
+ restart_policy?: {
2181
+ /** @enum {string} */
2182
+ policy: "on-failure";
2183
+ restart_tries?: number;
2184
+ } | ("on-failure" | "no" | "always" | "unless-stopped");
2185
+ private?: boolean;
2186
+ resources?: ({
2187
+ __spread__: string;
2188
+ chunked?: boolean;
2189
+ } | {
2619
2190
  /** @enum {string} */
2620
2191
  type: "S3";
2621
2192
  target: string;
@@ -2627,7 +2198,7 @@ export interface components {
2627
2198
  ACCESS_KEY_ID: string;
2628
2199
  SECRET_ACCESS_KEY: string;
2629
2200
  };
2630
- } & Record<string, never>) | ({
2201
+ } | {
2631
2202
  /** @enum {string} */
2632
2203
  type: "S3";
2633
2204
  target: string;
@@ -2639,7 +2210,7 @@ export interface components {
2639
2210
  ACCESS_KEY_ID: string;
2640
2211
  SECRET_ACCESS_KEY: string;
2641
2212
  };
2642
- } & Record<string, never>) | ({
2213
+ } | {
2643
2214
  /** @enum {string} */
2644
2215
  type: "S3";
2645
2216
  target: string;
@@ -2654,7 +2225,7 @@ export interface components {
2654
2225
  ACCESS_KEY_ID: string;
2655
2226
  SECRET_ACCESS_KEY: string;
2656
2227
  };
2657
- } & Record<string, never>) | {
2228
+ } | {
2658
2229
  /** @enum {string} */
2659
2230
  type: "HF";
2660
2231
  target: string;
@@ -2667,8 +2238,6 @@ export interface components {
2667
2238
  type: "Ollama";
2668
2239
  model: string;
2669
2240
  target?: string;
2670
- } | {
2671
- __spread__: string;
2672
2241
  } | "__remove-if-empty__")[];
2673
2242
  authentication?: {
2674
2243
  docker?: {
@@ -2696,12 +2265,7 @@ export interface components {
2696
2265
  };
2697
2266
  }[];
2698
2267
  };
2699
- /**
2700
- * JobResults
2701
- * @description **********************
2702
- * Job Result Types *
2703
- * **********************
2704
- */
2268
+ /** JobResults */
2705
2269
  JobResults: {
2706
2270
  status: string;
2707
2271
  startTime: number;
@@ -2719,10 +2283,48 @@ export interface components {
2719
2283
  /** @enum {string} */
2720
2284
  type: "stdin" | "stdout" | "stderr" | "nodeerr";
2721
2285
  log?: string;
2286
+ timestamp?: string;
2722
2287
  }[];
2723
2288
  results?: {
2724
2289
  [key: string]: string | string[];
2725
2290
  };
2291
+ error?: {
2292
+ event: string;
2293
+ message: string;
2294
+ code?: number;
2295
+ };
2296
+ diagnostics: {
2297
+ reason: {
2298
+ hostShutDown: boolean;
2299
+ jobStopped: boolean;
2300
+ jobExpired: boolean;
2301
+ reason?: string;
2302
+ };
2303
+ state?: {
2304
+ Status: string;
2305
+ Running: boolean;
2306
+ Paused: boolean;
2307
+ Restarting: boolean;
2308
+ OOMKilled: boolean;
2309
+ Dead: boolean;
2310
+ Pid: number;
2311
+ ExitCode: number;
2312
+ Error: string;
2313
+ StartedAt: string;
2314
+ FinishedAt: string;
2315
+ Health?: {
2316
+ Status: string;
2317
+ FailingStreak: number;
2318
+ Log: {
2319
+ Start: string;
2320
+ End: string;
2321
+ ExitCode: number;
2322
+ Output: string;
2323
+ }[] | null;
2324
+ };
2325
+ RestartCount: number;
2326
+ };
2327
+ };
2726
2328
  }[];
2727
2329
  secrets?: {
2728
2330
  /** @enum {string} */
@@ -2957,7 +2559,7 @@ export interface operations {
2957
2559
  benchmarkProcessedAt: (Record<string, never> | string) | null;
2958
2560
  timeout: number;
2959
2561
  usdRewardPerHour: number | null;
2960
- listedAt: number;
2562
+ listedAt: number | null;
2961
2563
  };
2962
2564
  "multipart/form-data": {
2963
2565
  ipfsJob: string;
@@ -2977,7 +2579,7 @@ export interface operations {
2977
2579
  benchmarkProcessedAt: (Record<string, never> | string) | null;
2978
2580
  timeout: number;
2979
2581
  usdRewardPerHour: number | null;
2980
- listedAt: number;
2582
+ listedAt: number | null;
2981
2583
  };
2982
2584
  "text/plain": {
2983
2585
  ipfsJob: string;
@@ -2997,7 +2599,7 @@ export interface operations {
2997
2599
  benchmarkProcessedAt: (Record<string, never> | string) | null;
2998
2600
  timeout: number;
2999
2601
  usdRewardPerHour: number | null;
3000
- listedAt: number;
2602
+ listedAt: number | null;
3001
2603
  };
3002
2604
  };
3003
2605
  };