@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.
- package/CHANGELOG.md +25 -0
- package/LICENSE +1 -1
- package/README.md +7 -2
- package/client.d.mts +7 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -4
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +2 -2
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +2 -2
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/auth/auth.d.mts +146 -70
- package/resources/agents/auth/auth.d.mts.map +1 -1
- package/resources/agents/auth/auth.d.ts +146 -70
- package/resources/agents/auth/auth.d.ts.map +1 -1
- package/resources/agents/auth/auth.js +21 -2
- package/resources/agents/auth/auth.js.map +1 -1
- package/resources/agents/auth/auth.mjs +21 -2
- package/resources/agents/auth/auth.mjs.map +1 -1
- package/resources/agents/auth/index.d.mts +2 -2
- package/resources/agents/auth/index.d.mts.map +1 -1
- package/resources/agents/auth/index.d.ts +2 -2
- package/resources/agents/auth/index.d.ts.map +1 -1
- package/resources/agents/auth/index.js.map +1 -1
- package/resources/agents/auth/index.mjs.map +1 -1
- package/resources/agents/auth/invocations.d.mts +26 -31
- package/resources/agents/auth/invocations.d.mts.map +1 -1
- package/resources/agents/auth/invocations.d.ts +26 -31
- package/resources/agents/auth/invocations.d.ts.map +1 -1
- package/resources/agents/auth/invocations.js +5 -20
- package/resources/agents/auth/invocations.js.map +1 -1
- package/resources/agents/auth/invocations.mjs +5 -20
- package/resources/agents/auth/invocations.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/browser-pools.d.mts +63 -98
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +63 -98
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/credentials.d.mts +254 -0
- package/resources/credentials.d.mts.map +1 -0
- package/resources/credentials.d.ts +254 -0
- package/resources/credentials.d.ts.map +1 -0
- package/resources/credentials.js +101 -0
- package/resources/credentials.js.map +1 -0
- package/resources/credentials.mjs +97 -0
- package/resources/credentials.mjs.map +1 -0
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/proxies.d.mts +137 -1
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +137 -1
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.js +6 -0
- package/resources/proxies.js.map +1 -1
- package/resources/proxies.mjs +6 -0
- package/resources/proxies.mjs.map +1 -1
- package/src/client.ts +27 -8
- package/src/resources/agents/agents.ts +0 -2
- package/src/resources/agents/auth/auth.ts +170 -73
- package/src/resources/agents/auth/index.ts +0 -2
- package/src/resources/agents/auth/invocations.ts +25 -36
- package/src/resources/agents/index.ts +0 -1
- package/src/resources/browser-pools.ts +72 -115
- package/src/resources/credentials.ts +314 -0
- package/src/resources/index.ts +12 -4
- package/src/resources/proxies.ts +228 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/proxies.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "0.25.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.25.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|