@onkernel/sdk 0.24.0 → 0.26.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 (105) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/LICENSE +1 -1
  3. package/README.md +9 -4
  4. package/client.d.mts +6 -6
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +6 -6
  7. package/client.d.ts.map +1 -1
  8. package/client.js.map +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +2 -2
  11. package/resources/agents/agents.d.mts +2 -2
  12. package/resources/agents/agents.d.mts.map +1 -1
  13. package/resources/agents/agents.d.ts +2 -2
  14. package/resources/agents/agents.d.ts.map +1 -1
  15. package/resources/agents/agents.js.map +1 -1
  16. package/resources/agents/agents.mjs.map +1 -1
  17. package/resources/agents/auth/auth.d.mts +135 -126
  18. package/resources/agents/auth/auth.d.mts.map +1 -1
  19. package/resources/agents/auth/auth.d.ts +135 -126
  20. package/resources/agents/auth/auth.d.ts.map +1 -1
  21. package/resources/agents/auth/auth.js +2 -18
  22. package/resources/agents/auth/auth.js.map +1 -1
  23. package/resources/agents/auth/auth.mjs +2 -18
  24. package/resources/agents/auth/auth.mjs.map +1 -1
  25. package/resources/agents/auth/index.d.mts +2 -2
  26. package/resources/agents/auth/index.d.mts.map +1 -1
  27. package/resources/agents/auth/index.d.ts +2 -2
  28. package/resources/agents/auth/index.d.ts.map +1 -1
  29. package/resources/agents/auth/index.js.map +1 -1
  30. package/resources/agents/auth/index.mjs.map +1 -1
  31. package/resources/agents/auth/invocations.d.mts +28 -33
  32. package/resources/agents/auth/invocations.d.mts.map +1 -1
  33. package/resources/agents/auth/invocations.d.ts +28 -33
  34. package/resources/agents/auth/invocations.d.ts.map +1 -1
  35. package/resources/agents/auth/invocations.js +5 -20
  36. package/resources/agents/auth/invocations.js.map +1 -1
  37. package/resources/agents/auth/invocations.mjs +5 -20
  38. package/resources/agents/auth/invocations.mjs.map +1 -1
  39. package/resources/agents/index.d.mts +1 -1
  40. package/resources/agents/index.d.mts.map +1 -1
  41. package/resources/agents/index.d.ts +1 -1
  42. package/resources/agents/index.d.ts.map +1 -1
  43. package/resources/agents/index.js.map +1 -1
  44. package/resources/agents/index.mjs.map +1 -1
  45. package/resources/browsers/browsers.d.mts +84 -3
  46. package/resources/browsers/browsers.d.mts.map +1 -1
  47. package/resources/browsers/browsers.d.ts +84 -3
  48. package/resources/browsers/browsers.d.ts.map +1 -1
  49. package/resources/browsers/browsers.js +13 -0
  50. package/resources/browsers/browsers.js.map +1 -1
  51. package/resources/browsers/browsers.mjs +13 -0
  52. package/resources/browsers/browsers.mjs.map +1 -1
  53. package/resources/browsers/index.d.mts +2 -2
  54. package/resources/browsers/index.d.mts.map +1 -1
  55. package/resources/browsers/index.d.ts +2 -2
  56. package/resources/browsers/index.d.ts.map +1 -1
  57. package/resources/browsers/index.js.map +1 -1
  58. package/resources/browsers/index.mjs.map +1 -1
  59. package/resources/browsers/process.d.mts +52 -1
  60. package/resources/browsers/process.d.mts.map +1 -1
  61. package/resources/browsers/process.d.ts +52 -1
  62. package/resources/browsers/process.d.ts.map +1 -1
  63. package/resources/browsers/process.js +19 -0
  64. package/resources/browsers/process.js.map +1 -1
  65. package/resources/browsers/process.mjs +19 -0
  66. package/resources/browsers/process.mjs.map +1 -1
  67. package/resources/credentials.d.mts +107 -16
  68. package/resources/credentials.d.mts.map +1 -1
  69. package/resources/credentials.d.ts +107 -16
  70. package/resources/credentials.d.ts.map +1 -1
  71. package/resources/credentials.js +33 -14
  72. package/resources/credentials.js.map +1 -1
  73. package/resources/credentials.mjs +33 -14
  74. package/resources/credentials.mjs.map +1 -1
  75. package/resources/index.d.mts +3 -3
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +3 -3
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js.map +1 -1
  80. package/resources/index.mjs.map +1 -1
  81. package/resources/proxies.d.mts +153 -1
  82. package/resources/proxies.d.mts.map +1 -1
  83. package/resources/proxies.d.ts +153 -1
  84. package/resources/proxies.d.ts.map +1 -1
  85. package/resources/proxies.js +6 -0
  86. package/resources/proxies.js.map +1 -1
  87. package/resources/proxies.mjs +6 -0
  88. package/resources/proxies.mjs.map +1 -1
  89. package/src/client.ts +8 -0
  90. package/src/resources/agents/agents.ts +0 -4
  91. package/src/resources/agents/auth/auth.ts +146 -136
  92. package/src/resources/agents/auth/index.ts +0 -3
  93. package/src/resources/agents/auth/invocations.ts +31 -39
  94. package/src/resources/agents/index.ts +0 -2
  95. package/src/resources/browsers/browsers.ts +104 -0
  96. package/src/resources/browsers/index.ts +4 -0
  97. package/src/resources/browsers/process.ts +68 -0
  98. package/src/resources/credentials.ts +127 -18
  99. package/src/resources/index.ts +4 -0
  100. package/src/resources/proxies.ts +248 -0
  101. package/src/version.ts +1 -1
  102. package/version.d.mts +1 -1
  103. package/version.d.ts +1 -1
  104. package/version.js +1 -1
  105. 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
  /**
@@ -61,6 +68,11 @@ export interface ProxyCreateResponse {
61
68
  | ProxyCreateResponse.MobileProxyConfig
62
69
  | ProxyCreateResponse.CustomProxyConfig;
63
70
 
71
+ /**
72
+ * IP address that the proxy uses when making requests.
73
+ */
74
+ ip_address?: string;
75
+
64
76
  /**
65
77
  * Timestamp of the last health check performed on this proxy.
66
78
  */
@@ -281,6 +293,11 @@ export interface ProxyRetrieveResponse {
281
293
  | ProxyRetrieveResponse.MobileProxyConfig
282
294
  | ProxyRetrieveResponse.CustomProxyConfig;
283
295
 
296
+ /**
297
+ * IP address that the proxy uses when making requests.
298
+ */
299
+ ip_address?: string;
300
+
284
301
  /**
285
302
  * Timestamp of the last health check performed on this proxy.
286
303
  */
@@ -504,6 +521,11 @@ export namespace ProxyListResponse {
504
521
  | ProxyListResponseItem.MobileProxyConfig
505
522
  | ProxyListResponseItem.CustomProxyConfig;
506
523
 
524
+ /**
525
+ * IP address that the proxy uses when making requests.
526
+ */
527
+ ip_address?: string;
528
+
507
529
  /**
508
530
  * Timestamp of the last health check performed on this proxy.
509
531
  */
@@ -703,6 +725,231 @@ export namespace ProxyListResponse {
703
725
  }
704
726
  }
705
727
 
728
+ /**
729
+ * Configuration for routing traffic through a proxy.
730
+ */
731
+ export interface ProxyCheckResponse {
732
+ /**
733
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
734
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
735
+ */
736
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
737
+
738
+ id?: string;
739
+
740
+ /**
741
+ * Configuration specific to the selected proxy `type`.
742
+ */
743
+ config?:
744
+ | ProxyCheckResponse.DatacenterProxyConfig
745
+ | ProxyCheckResponse.IspProxyConfig
746
+ | ProxyCheckResponse.ResidentialProxyConfig
747
+ | ProxyCheckResponse.MobileProxyConfig
748
+ | ProxyCheckResponse.CustomProxyConfig;
749
+
750
+ /**
751
+ * IP address that the proxy uses when making requests.
752
+ */
753
+ ip_address?: string;
754
+
755
+ /**
756
+ * Timestamp of the last health check performed on this proxy.
757
+ */
758
+ last_checked?: string;
759
+
760
+ /**
761
+ * Readable name of the proxy.
762
+ */
763
+ name?: string;
764
+
765
+ /**
766
+ * Protocol to use for the proxy connection.
767
+ */
768
+ protocol?: 'http' | 'https';
769
+
770
+ /**
771
+ * Current health status of the proxy.
772
+ */
773
+ status?: 'available' | 'unavailable';
774
+ }
775
+
776
+ export namespace ProxyCheckResponse {
777
+ /**
778
+ * Configuration for a datacenter proxy.
779
+ */
780
+ export interface DatacenterProxyConfig {
781
+ /**
782
+ * ISO 3166 country code. Defaults to US if not provided.
783
+ */
784
+ country?: string;
785
+ }
786
+
787
+ /**
788
+ * Configuration for an ISP proxy.
789
+ */
790
+ export interface IspProxyConfig {
791
+ /**
792
+ * ISO 3166 country code. Defaults to US if not provided.
793
+ */
794
+ country?: string;
795
+ }
796
+
797
+ /**
798
+ * Configuration for residential proxies.
799
+ */
800
+ export interface ResidentialProxyConfig {
801
+ /**
802
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
803
+ */
804
+ asn?: string;
805
+
806
+ /**
807
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
808
+ * provided.
809
+ */
810
+ city?: string;
811
+
812
+ /**
813
+ * ISO 3166 country code.
814
+ */
815
+ country?: string;
816
+
817
+ /**
818
+ * @deprecated Operating system of the residential device.
819
+ */
820
+ os?: 'windows' | 'macos' | 'android';
821
+
822
+ /**
823
+ * Two-letter state code.
824
+ */
825
+ state?: string;
826
+
827
+ /**
828
+ * US ZIP code.
829
+ */
830
+ zip?: string;
831
+ }
832
+
833
+ /**
834
+ * Configuration for mobile proxies.
835
+ */
836
+ export interface MobileProxyConfig {
837
+ /**
838
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
839
+ */
840
+ asn?: string;
841
+
842
+ /**
843
+ * Mobile carrier.
844
+ */
845
+ carrier?:
846
+ | 'a1'
847
+ | 'aircel'
848
+ | 'airtel'
849
+ | 'att'
850
+ | 'celcom'
851
+ | 'chinamobile'
852
+ | 'claro'
853
+ | 'comcast'
854
+ | 'cox'
855
+ | 'digi'
856
+ | 'dt'
857
+ | 'docomo'
858
+ | 'dtac'
859
+ | 'etisalat'
860
+ | 'idea'
861
+ | 'kyivstar'
862
+ | 'meo'
863
+ | 'megafon'
864
+ | 'mtn'
865
+ | 'mtnza'
866
+ | 'mts'
867
+ | 'optus'
868
+ | 'orange'
869
+ | 'qwest'
870
+ | 'reliance_jio'
871
+ | 'robi'
872
+ | 'sprint'
873
+ | 'telefonica'
874
+ | 'telstra'
875
+ | 'tmobile'
876
+ | 'tigo'
877
+ | 'tim'
878
+ | 'verizon'
879
+ | 'vimpelcom'
880
+ | 'vodacomza'
881
+ | 'vodafone'
882
+ | 'vivo'
883
+ | 'zain'
884
+ | 'vivabo'
885
+ | 'telenormyanmar'
886
+ | 'kcelljsc'
887
+ | 'swisscom'
888
+ | 'singtel'
889
+ | 'asiacell'
890
+ | 'windit'
891
+ | 'cellc'
892
+ | 'ooredoo'
893
+ | 'drei'
894
+ | 'umobile'
895
+ | 'cableone'
896
+ | 'proximus'
897
+ | 'tele2'
898
+ | 'mobitel'
899
+ | 'o2'
900
+ | 'bouygues'
901
+ | 'free'
902
+ | 'sfr'
903
+ | 'digicel';
904
+
905
+ /**
906
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
907
+ * provided.
908
+ */
909
+ city?: string;
910
+
911
+ /**
912
+ * ISO 3166 country code
913
+ */
914
+ country?: string;
915
+
916
+ /**
917
+ * Two-letter state code.
918
+ */
919
+ state?: string;
920
+
921
+ /**
922
+ * US ZIP code.
923
+ */
924
+ zip?: string;
925
+ }
926
+
927
+ /**
928
+ * Configuration for a custom proxy (e.g., private proxy server).
929
+ */
930
+ export interface CustomProxyConfig {
931
+ /**
932
+ * Proxy host address or IP.
933
+ */
934
+ host: string;
935
+
936
+ /**
937
+ * Proxy port.
938
+ */
939
+ port: number;
940
+
941
+ /**
942
+ * Whether the proxy has a password.
943
+ */
944
+ has_password?: boolean;
945
+
946
+ /**
947
+ * Username for proxy authentication.
948
+ */
949
+ username?: string;
950
+ }
951
+ }
952
+
706
953
  export interface ProxyCreateParams {
707
954
  /**
708
955
  * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
@@ -913,6 +1160,7 @@ export declare namespace Proxies {
913
1160
  type ProxyCreateResponse as ProxyCreateResponse,
914
1161
  type ProxyRetrieveResponse as ProxyRetrieveResponse,
915
1162
  type ProxyListResponse as ProxyListResponse,
1163
+ type ProxyCheckResponse as ProxyCheckResponse,
916
1164
  type ProxyCreateParams as ProxyCreateParams,
917
1165
  };
918
1166
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.24.0'; // x-release-please-version
1
+ export const VERSION = '0.26.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.24.0";
1
+ export declare const VERSION = "0.26.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.24.0";
1
+ export declare const VERSION = "0.26.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.24.0'; // x-release-please-version
4
+ exports.VERSION = '0.26.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.24.0'; // x-release-please-version
1
+ export const VERSION = '0.26.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map