@onkernel/sdk 0.23.0 → 0.25.0

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 (89) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +1 -1
  3. package/README.md +7 -2
  4. package/client.d.mts +7 -4
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +7 -4
  7. package/client.d.ts.map +1 -1
  8. package/client.js +3 -0
  9. package/client.js.map +1 -1
  10. package/client.mjs +3 -0
  11. package/client.mjs.map +1 -1
  12. package/package.json +1 -1
  13. package/resources/agents/agents.d.mts +2 -2
  14. package/resources/agents/agents.d.mts.map +1 -1
  15. package/resources/agents/agents.d.ts +2 -2
  16. package/resources/agents/agents.d.ts.map +1 -1
  17. package/resources/agents/agents.js.map +1 -1
  18. package/resources/agents/agents.mjs.map +1 -1
  19. package/resources/agents/auth/auth.d.mts +146 -70
  20. package/resources/agents/auth/auth.d.mts.map +1 -1
  21. package/resources/agents/auth/auth.d.ts +146 -70
  22. package/resources/agents/auth/auth.d.ts.map +1 -1
  23. package/resources/agents/auth/auth.js +21 -2
  24. package/resources/agents/auth/auth.js.map +1 -1
  25. package/resources/agents/auth/auth.mjs +21 -2
  26. package/resources/agents/auth/auth.mjs.map +1 -1
  27. package/resources/agents/auth/index.d.mts +2 -2
  28. package/resources/agents/auth/index.d.mts.map +1 -1
  29. package/resources/agents/auth/index.d.ts +2 -2
  30. package/resources/agents/auth/index.d.ts.map +1 -1
  31. package/resources/agents/auth/index.js.map +1 -1
  32. package/resources/agents/auth/index.mjs.map +1 -1
  33. package/resources/agents/auth/invocations.d.mts +26 -31
  34. package/resources/agents/auth/invocations.d.mts.map +1 -1
  35. package/resources/agents/auth/invocations.d.ts +26 -31
  36. package/resources/agents/auth/invocations.d.ts.map +1 -1
  37. package/resources/agents/auth/invocations.js +5 -20
  38. package/resources/agents/auth/invocations.js.map +1 -1
  39. package/resources/agents/auth/invocations.mjs +5 -20
  40. package/resources/agents/auth/invocations.mjs.map +1 -1
  41. package/resources/agents/index.d.mts +1 -1
  42. package/resources/agents/index.d.mts.map +1 -1
  43. package/resources/agents/index.d.ts +1 -1
  44. package/resources/agents/index.d.ts.map +1 -1
  45. package/resources/agents/index.js.map +1 -1
  46. package/resources/agents/index.mjs.map +1 -1
  47. package/resources/browser-pools.d.mts +63 -98
  48. package/resources/browser-pools.d.mts.map +1 -1
  49. package/resources/browser-pools.d.ts +63 -98
  50. package/resources/browser-pools.d.ts.map +1 -1
  51. package/resources/credentials.d.mts +254 -0
  52. package/resources/credentials.d.mts.map +1 -0
  53. package/resources/credentials.d.ts +254 -0
  54. package/resources/credentials.d.ts.map +1 -0
  55. package/resources/credentials.js +101 -0
  56. package/resources/credentials.js.map +1 -0
  57. package/resources/credentials.mjs +97 -0
  58. package/resources/credentials.mjs.map +1 -0
  59. package/resources/index.d.mts +3 -2
  60. package/resources/index.d.mts.map +1 -1
  61. package/resources/index.d.ts +3 -2
  62. package/resources/index.d.ts.map +1 -1
  63. package/resources/index.js +3 -1
  64. package/resources/index.js.map +1 -1
  65. package/resources/index.mjs +1 -0
  66. package/resources/index.mjs.map +1 -1
  67. package/resources/proxies.d.mts +137 -1
  68. package/resources/proxies.d.mts.map +1 -1
  69. package/resources/proxies.d.ts +137 -1
  70. package/resources/proxies.d.ts.map +1 -1
  71. package/resources/proxies.js +6 -0
  72. package/resources/proxies.js.map +1 -1
  73. package/resources/proxies.mjs +6 -0
  74. package/resources/proxies.mjs.map +1 -1
  75. package/src/client.ts +27 -8
  76. package/src/resources/agents/agents.ts +0 -2
  77. package/src/resources/agents/auth/auth.ts +170 -73
  78. package/src/resources/agents/auth/index.ts +0 -2
  79. package/src/resources/agents/auth/invocations.ts +25 -36
  80. package/src/resources/agents/index.ts +0 -1
  81. package/src/resources/browser-pools.ts +72 -115
  82. package/src/resources/credentials.ts +314 -0
  83. package/src/resources/index.ts +12 -4
  84. package/src/resources/proxies.ts +228 -0
  85. package/src/version.ts +1 -1
  86. package/version.d.mts +1 -1
  87. package/version.d.ts +1 -1
  88. package/version.js +1 -1
  89. package/version.mjs +1 -1
@@ -37,6 +37,13 @@ export class Proxies extends APIResource {
37
37
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
38
38
  });
39
39
  }
40
+
41
+ /**
42
+ * Run a health check on the proxy to verify it's working.
43
+ */
44
+ check(id: string, options?: RequestOptions): APIPromise<ProxyCheckResponse> {
45
+ return this._client.post(path`/proxies/${id}/check`, options);
46
+ }
40
47
  }
41
48
 
42
49
  /**
@@ -703,6 +710,226 @@ export namespace ProxyListResponse {
703
710
  }
704
711
  }
705
712
 
713
+ /**
714
+ * Configuration for routing traffic through a proxy.
715
+ */
716
+ export interface ProxyCheckResponse {
717
+ /**
718
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
719
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
720
+ */
721
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
722
+
723
+ id?: string;
724
+
725
+ /**
726
+ * Configuration specific to the selected proxy `type`.
727
+ */
728
+ config?:
729
+ | ProxyCheckResponse.DatacenterProxyConfig
730
+ | ProxyCheckResponse.IspProxyConfig
731
+ | ProxyCheckResponse.ResidentialProxyConfig
732
+ | ProxyCheckResponse.MobileProxyConfig
733
+ | ProxyCheckResponse.CustomProxyConfig;
734
+
735
+ /**
736
+ * Timestamp of the last health check performed on this proxy.
737
+ */
738
+ last_checked?: string;
739
+
740
+ /**
741
+ * Readable name of the proxy.
742
+ */
743
+ name?: string;
744
+
745
+ /**
746
+ * Protocol to use for the proxy connection.
747
+ */
748
+ protocol?: 'http' | 'https';
749
+
750
+ /**
751
+ * Current health status of the proxy.
752
+ */
753
+ status?: 'available' | 'unavailable';
754
+ }
755
+
756
+ export namespace ProxyCheckResponse {
757
+ /**
758
+ * Configuration for a datacenter proxy.
759
+ */
760
+ export interface DatacenterProxyConfig {
761
+ /**
762
+ * ISO 3166 country code. Defaults to US if not provided.
763
+ */
764
+ country?: string;
765
+ }
766
+
767
+ /**
768
+ * Configuration for an ISP proxy.
769
+ */
770
+ export interface IspProxyConfig {
771
+ /**
772
+ * ISO 3166 country code. Defaults to US if not provided.
773
+ */
774
+ country?: string;
775
+ }
776
+
777
+ /**
778
+ * Configuration for residential proxies.
779
+ */
780
+ export interface ResidentialProxyConfig {
781
+ /**
782
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
783
+ */
784
+ asn?: string;
785
+
786
+ /**
787
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
788
+ * provided.
789
+ */
790
+ city?: string;
791
+
792
+ /**
793
+ * ISO 3166 country code.
794
+ */
795
+ country?: string;
796
+
797
+ /**
798
+ * @deprecated Operating system of the residential device.
799
+ */
800
+ os?: 'windows' | 'macos' | 'android';
801
+
802
+ /**
803
+ * Two-letter state code.
804
+ */
805
+ state?: string;
806
+
807
+ /**
808
+ * US ZIP code.
809
+ */
810
+ zip?: string;
811
+ }
812
+
813
+ /**
814
+ * Configuration for mobile proxies.
815
+ */
816
+ export interface MobileProxyConfig {
817
+ /**
818
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
819
+ */
820
+ asn?: string;
821
+
822
+ /**
823
+ * Mobile carrier.
824
+ */
825
+ carrier?:
826
+ | 'a1'
827
+ | 'aircel'
828
+ | 'airtel'
829
+ | 'att'
830
+ | 'celcom'
831
+ | 'chinamobile'
832
+ | 'claro'
833
+ | 'comcast'
834
+ | 'cox'
835
+ | 'digi'
836
+ | 'dt'
837
+ | 'docomo'
838
+ | 'dtac'
839
+ | 'etisalat'
840
+ | 'idea'
841
+ | 'kyivstar'
842
+ | 'meo'
843
+ | 'megafon'
844
+ | 'mtn'
845
+ | 'mtnza'
846
+ | 'mts'
847
+ | 'optus'
848
+ | 'orange'
849
+ | 'qwest'
850
+ | 'reliance_jio'
851
+ | 'robi'
852
+ | 'sprint'
853
+ | 'telefonica'
854
+ | 'telstra'
855
+ | 'tmobile'
856
+ | 'tigo'
857
+ | 'tim'
858
+ | 'verizon'
859
+ | 'vimpelcom'
860
+ | 'vodacomza'
861
+ | 'vodafone'
862
+ | 'vivo'
863
+ | 'zain'
864
+ | 'vivabo'
865
+ | 'telenormyanmar'
866
+ | 'kcelljsc'
867
+ | 'swisscom'
868
+ | 'singtel'
869
+ | 'asiacell'
870
+ | 'windit'
871
+ | 'cellc'
872
+ | 'ooredoo'
873
+ | 'drei'
874
+ | 'umobile'
875
+ | 'cableone'
876
+ | 'proximus'
877
+ | 'tele2'
878
+ | 'mobitel'
879
+ | 'o2'
880
+ | 'bouygues'
881
+ | 'free'
882
+ | 'sfr'
883
+ | 'digicel';
884
+
885
+ /**
886
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
887
+ * provided.
888
+ */
889
+ city?: string;
890
+
891
+ /**
892
+ * ISO 3166 country code
893
+ */
894
+ country?: string;
895
+
896
+ /**
897
+ * Two-letter state code.
898
+ */
899
+ state?: string;
900
+
901
+ /**
902
+ * US ZIP code.
903
+ */
904
+ zip?: string;
905
+ }
906
+
907
+ /**
908
+ * Configuration for a custom proxy (e.g., private proxy server).
909
+ */
910
+ export interface CustomProxyConfig {
911
+ /**
912
+ * Proxy host address or IP.
913
+ */
914
+ host: string;
915
+
916
+ /**
917
+ * Proxy port.
918
+ */
919
+ port: number;
920
+
921
+ /**
922
+ * Whether the proxy has a password.
923
+ */
924
+ has_password?: boolean;
925
+
926
+ /**
927
+ * Username for proxy authentication.
928
+ */
929
+ username?: string;
930
+ }
931
+ }
932
+
706
933
  export interface ProxyCreateParams {
707
934
  /**
708
935
  * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
@@ -913,6 +1140,7 @@ export declare namespace Proxies {
913
1140
  type ProxyCreateResponse as ProxyCreateResponse,
914
1141
  type ProxyRetrieveResponse as ProxyRetrieveResponse,
915
1142
  type ProxyListResponse as ProxyListResponse,
1143
+ type ProxyCheckResponse as ProxyCheckResponse,
916
1144
  type ProxyCreateParams as ProxyCreateParams,
917
1145
  };
918
1146
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.23.0'; // x-release-please-version
1
+ export const VERSION = '0.25.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.23.0";
1
+ export declare const VERSION = "0.25.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.23.0";
1
+ export declare const VERSION = "0.25.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.23.0'; // x-release-please-version
4
+ exports.VERSION = '0.25.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.23.0'; // x-release-please-version
1
+ export const VERSION = '0.25.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map