@indiciaosint/sdk 1.1.0 → 1.2.1
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/FUNCTIONS.md +1 -1
- package/README.md +53 -13
- package/esm/funcs/activity-delete-activity.js +3 -3
- package/esm/funcs/activity-delete-activity.js.map +1 -1
- package/esm/funcs/activity-get-activity.js +3 -3
- package/esm/funcs/activity-get-activity.js.map +1 -1
- package/esm/funcs/activity-list-activities.js +3 -3
- package/esm/funcs/activity-list-activities.js.map +1 -1
- package/esm/funcs/infrastructure-scan-ports.d.ts +2 -127
- package/esm/funcs/infrastructure-scan-ports.d.ts.map +1 -1
- package/esm/funcs/infrastructure-scan-ports.js +12 -131
- package/esm/funcs/infrastructure-scan-ports.js.map +1 -1
- package/esm/funcs/infrastructure-search-certificates.js +3 -3
- package/esm/funcs/infrastructure-search-certificates.js.map +1 -1
- package/esm/funcs/infrastructure-search-dns.js +3 -3
- package/esm/funcs/infrastructure-search-dns.js.map +1 -1
- package/esm/funcs/infrastructure-search-ip-info.js +3 -3
- package/esm/funcs/infrastructure-search-ip-info.js.map +1 -1
- package/esm/funcs/infrastructure-search-shodan.js +3 -3
- package/esm/funcs/infrastructure-search-shodan.js.map +1 -1
- package/esm/funcs/infrastructure-search-whois.js +3 -3
- package/esm/funcs/infrastructure-search-whois.js.map +1 -1
- package/esm/funcs/intelligence-geolocate-media.d.ts +2 -13
- package/esm/funcs/intelligence-geolocate-media.d.ts.map +1 -1
- package/esm/funcs/intelligence-geolocate-media.js +12 -17
- package/esm/funcs/intelligence-geolocate-media.js.map +1 -1
- package/esm/funcs/intelligence-search-address.js +3 -3
- package/esm/funcs/intelligence-search-address.js.map +1 -1
- package/esm/funcs/intelligence-search-email.js +3 -3
- package/esm/funcs/intelligence-search-email.js.map +1 -1
- package/esm/funcs/intelligence-search-face.d.ts +2 -1
- package/esm/funcs/intelligence-search-face.d.ts.map +1 -1
- package/esm/funcs/intelligence-search-face.js +12 -5
- package/esm/funcs/intelligence-search-face.js.map +1 -1
- package/esm/funcs/intelligence-search-gmail.js +3 -3
- package/esm/funcs/intelligence-search-gmail.js.map +1 -1
- package/esm/funcs/intelligence-search-hudson-rock.js +3 -3
- package/esm/funcs/intelligence-search-hudson-rock.js.map +1 -1
- package/esm/funcs/intelligence-search-person.js +3 -3
- package/esm/funcs/intelligence-search-person.js.map +1 -1
- package/esm/funcs/intelligence-search-phone.js +3 -3
- package/esm/funcs/intelligence-search-phone.js.map +1 -1
- package/esm/funcs/intelligence-search-seon.js +3 -3
- package/esm/funcs/intelligence-search-seon.js.map +1 -1
- package/esm/funcs/intelligence-search-web-databases.js +3 -3
- package/esm/funcs/intelligence-search-web-databases.js.map +1 -1
- package/esm/funcs/organizations-get-organization-audit-log.js +3 -3
- package/esm/funcs/organizations-get-organization-audit-log.js.map +1 -1
- package/esm/funcs/organizations-get-organization.js +3 -3
- package/esm/funcs/organizations-get-organization.js.map +1 -1
- package/esm/funcs/organizations-list-organization-cases.js +3 -3
- package/esm/funcs/organizations-list-organization-cases.js.map +1 -1
- package/esm/funcs/organizations-list-organization-members.js +3 -3
- package/esm/funcs/organizations-list-organization-members.js.map +1 -1
- package/esm/funcs/organizations-list-organizations.js +3 -3
- package/esm/funcs/organizations-list-organizations.js.map +1 -1
- package/esm/funcs/organizations-send-organization-credits.js +3 -3
- package/esm/funcs/organizations-send-organization-credits.js.map +1 -1
- package/esm/funcs/pricing-get-pricing.js +3 -3
- package/esm/funcs/pricing-get-pricing.js.map +1 -1
- package/esm/funcs/socials-search-discord.js +3 -3
- package/esm/funcs/socials-search-discord.js.map +1 -1
- package/esm/funcs/socials-search-github.d.ts +3 -2
- package/esm/funcs/socials-search-github.d.ts.map +1 -1
- package/esm/funcs/socials-search-github.js +14 -6
- package/esm/funcs/socials-search-github.js.map +1 -1
- package/esm/funcs/socials-search-roblox.js +3 -3
- package/esm/funcs/socials-search-roblox.js.map +1 -1
- package/esm/funcs/socials-search-tiktok.js +3 -3
- package/esm/funcs/socials-search-tiktok.js.map +1 -1
- package/esm/funcs/socials-search-username.d.ts +3 -2
- package/esm/funcs/socials-search-username.d.ts.map +1 -1
- package/esm/funcs/socials-search-username.js +14 -6
- package/esm/funcs/socials-search-username.js.map +1 -1
- package/esm/funcs/tools-bypass-double-counter.js +3 -3
- package/esm/funcs/tools-bypass-double-counter.js.map +1 -1
- package/esm/funcs/tools-download-intelx-file.js +3 -3
- package/esm/funcs/tools-download-intelx-file.js.map +1 -1
- package/esm/funcs/tools-lookup-discord-alt.js +3 -3
- package/esm/funcs/tools-lookup-discord-alt.js.map +1 -1
- package/esm/funcs/users-get-info.js +3 -3
- package/esm/funcs/users-get-info.js.map +1 -1
- package/esm/hooks/hooks.d.ts.map +1 -1
- package/esm/hooks/hooks.js +2 -0
- package/esm/hooks/hooks.js.map +1 -1
- package/esm/hooks/registration.d.ts +3 -0
- package/esm/hooks/registration.d.ts.map +1 -0
- package/esm/hooks/registration.js +12 -0
- package/esm/hooks/registration.js.map +1 -0
- package/esm/lib/config.d.ts +4 -4
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/env.d.ts +1 -1
- package/esm/lib/env.d.ts.map +1 -1
- package/esm/lib/env.js +1 -1
- package/esm/lib/env.js.map +1 -1
- package/esm/lib/event-streams.d.ts +23 -0
- package/esm/lib/event-streams.d.ts.map +1 -0
- package/esm/lib/event-streams.js +163 -0
- package/esm/lib/event-streams.js.map +1 -0
- package/esm/lib/security.js +1 -1
- package/esm/lib/security.js.map +1 -1
- package/esm/models/operations/geolocate-media.d.ts +91 -0
- package/esm/models/operations/geolocate-media.d.ts.map +1 -1
- package/esm/models/operations/geolocate-media.js +74 -0
- package/esm/models/operations/geolocate-media.js.map +1 -1
- package/esm/models/operations/scan-ports.d.ts +355 -0
- package/esm/models/operations/scan-ports.d.ts.map +1 -1
- package/esm/models/operations/scan-ports.js +473 -0
- package/esm/models/operations/scan-ports.js.map +1 -1
- package/esm/models/operations/search-face.d.ts +95 -0
- package/esm/models/operations/search-face.d.ts.map +1 -1
- package/esm/models/operations/search-face.js +97 -0
- package/esm/models/operations/search-face.js.map +1 -1
- package/esm/models/operations/search-github.d.ts +69 -7
- package/esm/models/operations/search-github.d.ts.map +1 -1
- package/esm/models/operations/search-github.js +83 -9
- package/esm/models/operations/search-github.js.map +1 -1
- package/esm/models/operations/search-username.d.ts +435 -19
- package/esm/models/operations/search-username.d.ts.map +1 -1
- package/esm/models/operations/search-username.js +738 -20
- package/esm/models/operations/search-username.js.map +1 -1
- package/esm/models/operations/search-web-databases.d.ts +4 -5
- package/esm/models/operations/search-web-databases.d.ts.map +1 -1
- package/esm/models/operations/search-web-databases.js +3 -4
- package/esm/models/operations/search-web-databases.js.map +1 -1
- package/esm/models/security.d.ts +2 -2
- package/esm/models/security.d.ts.map +1 -1
- package/esm/models/security.js +2 -2
- package/esm/models/security.js.map +1 -1
- package/esm/sdk/infrastructure.d.ts +2 -127
- package/esm/sdk/infrastructure.d.ts.map +1 -1
- package/esm/sdk/infrastructure.js +0 -126
- package/esm/sdk/infrastructure.js.map +1 -1
- package/esm/sdk/intelligence.d.ts +3 -14
- package/esm/sdk/intelligence.d.ts.map +1 -1
- package/esm/sdk/intelligence.js +0 -12
- package/esm/sdk/intelligence.js.map +1 -1
- package/esm/sdk/socials.d.ts +5 -4
- package/esm/sdk/socials.d.ts.map +1 -1
- package/esm/sdk/socials.js +2 -2
- package/esm/sdk/socials.js.map +1 -1
- package/esm/types/discriminated-union.d.ts +25 -0
- package/esm/types/discriminated-union.d.ts.map +1 -0
- package/esm/types/discriminated-union.js +61 -0
- package/esm/types/discriminated-union.js.map +1 -0
- package/esm/types/smart-union.d.ts.map +1 -1
- package/esm/types/smart-union.js +2 -1
- package/esm/types/smart-union.js.map +1 -1
- package/examples/usersGetInfo.example.ts +1 -1
- package/jsr.json +2 -1
- package/package.json +1 -1
- package/src/funcs/activity-delete-activity.ts +3 -3
- package/src/funcs/activity-get-activity.ts +3 -3
- package/src/funcs/activity-list-activities.ts +3 -3
- package/src/funcs/infrastructure-scan-ports.ts +21 -134
- package/src/funcs/infrastructure-search-certificates.ts +3 -3
- package/src/funcs/infrastructure-search-dns.ts +3 -3
- package/src/funcs/infrastructure-search-ip-info.ts +3 -3
- package/src/funcs/infrastructure-search-shodan.ts +3 -3
- package/src/funcs/infrastructure-search-whois.ts +3 -3
- package/src/funcs/intelligence-geolocate-media.ts +21 -20
- package/src/funcs/intelligence-search-address.ts +3 -3
- package/src/funcs/intelligence-search-email.ts +3 -3
- package/src/funcs/intelligence-search-face.ts +21 -8
- package/src/funcs/intelligence-search-gmail.ts +3 -3
- package/src/funcs/intelligence-search-hudson-rock.ts +3 -3
- package/src/funcs/intelligence-search-person.ts +3 -3
- package/src/funcs/intelligence-search-phone.ts +3 -3
- package/src/funcs/intelligence-search-seon.ts +3 -3
- package/src/funcs/intelligence-search-web-databases.ts +3 -3
- package/src/funcs/organizations-get-organization-audit-log.ts +3 -3
- package/src/funcs/organizations-get-organization.ts +3 -3
- package/src/funcs/organizations-list-organization-cases.ts +3 -3
- package/src/funcs/organizations-list-organization-members.ts +3 -3
- package/src/funcs/organizations-list-organizations.ts +3 -3
- package/src/funcs/organizations-send-organization-credits.ts +3 -3
- package/src/funcs/pricing-get-pricing.ts +3 -3
- package/src/funcs/socials-search-discord.ts +3 -3
- package/src/funcs/socials-search-github.ts +24 -9
- package/src/funcs/socials-search-roblox.ts +3 -3
- package/src/funcs/socials-search-tiktok.ts +3 -3
- package/src/funcs/socials-search-username.ts +26 -9
- package/src/funcs/tools-bypass-double-counter.ts +3 -3
- package/src/funcs/tools-download-intelx-file.ts +3 -3
- package/src/funcs/tools-lookup-discord-alt.ts +3 -3
- package/src/funcs/users-get-info.ts +3 -3
- package/src/hooks/hooks.ts +3 -0
- package/src/hooks/registration.ts +14 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/env.ts +2 -2
- package/src/lib/event-streams.ts +191 -0
- package/src/lib/security.ts +1 -1
- package/src/models/operations/geolocate-media.ts +231 -0
- package/src/models/operations/scan-ports.ts +1223 -0
- package/src/models/operations/search-face.ts +261 -0
- package/src/models/operations/search-github.ts +225 -41
- package/src/models/operations/search-username.ts +1690 -92
- package/src/models/operations/search-web-databases.ts +9 -8
- package/src/models/security.ts +4 -4
- package/src/sdk/infrastructure.ts +2 -127
- package/src/sdk/intelligence.ts +3 -14
- package/src/sdk/socials.ts +5 -4
- package/src/types/discriminated-union.ts +101 -0
- package/src/types/smart-union.ts +2 -1
|
@@ -97,8 +97,8 @@ async function $do(
|
|
|
97
97
|
Accept: "application/json",
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
100
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
101
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
102
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
103
|
|
|
104
104
|
const context = {
|
|
@@ -109,7 +109,7 @@ async function $do(
|
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
111
111
|
|
|
112
|
-
securitySource: client._options.
|
|
112
|
+
securitySource: client._options.apiKey,
|
|
113
113
|
retryConfig: options?.retries
|
|
114
114
|
|| client._options.retryConfig
|
|
115
115
|
|| { strategy: "none" },
|
|
@@ -98,8 +98,8 @@ async function $do(
|
|
|
98
98
|
Accept: "application/json",
|
|
99
99
|
}));
|
|
100
100
|
|
|
101
|
-
const secConfig = await extractSecurity(client._options.
|
|
102
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
104
|
|
|
105
105
|
const context = {
|
|
@@ -110,7 +110,7 @@ async function $do(
|
|
|
110
110
|
|
|
111
111
|
resolvedSecurity: requestSecurity,
|
|
112
112
|
|
|
113
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
114
|
retryConfig: options?.retries
|
|
115
115
|
|| client._options.retryConfig
|
|
116
116
|
|| { strategy: "none" },
|
|
@@ -102,8 +102,8 @@ async function $do(
|
|
|
102
102
|
Accept: "application/json",
|
|
103
103
|
}));
|
|
104
104
|
|
|
105
|
-
const secConfig = await extractSecurity(client._options.
|
|
106
|
-
const securityInput = secConfig == null ? {} : {
|
|
105
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
106
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
107
107
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
108
108
|
|
|
109
109
|
const context = {
|
|
@@ -114,7 +114,7 @@ async function $do(
|
|
|
114
114
|
|
|
115
115
|
resolvedSecurity: requestSecurity,
|
|
116
116
|
|
|
117
|
-
securitySource: client._options.
|
|
117
|
+
securitySource: client._options.apiKey,
|
|
118
118
|
retryConfig: options?.retries
|
|
119
119
|
|| client._options.retryConfig
|
|
120
120
|
|| { strategy: "none" },
|
|
@@ -96,8 +96,8 @@ async function $do(
|
|
|
96
96
|
Accept: "application/json",
|
|
97
97
|
}));
|
|
98
98
|
|
|
99
|
-
const secConfig = await extractSecurity(client._options.
|
|
100
|
-
const securityInput = secConfig == null ? {} : {
|
|
99
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
100
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
101
101
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
102
|
|
|
103
103
|
const context = {
|
|
@@ -108,7 +108,7 @@ async function $do(
|
|
|
108
108
|
|
|
109
109
|
resolvedSecurity: requestSecurity,
|
|
110
110
|
|
|
111
|
-
securitySource: client._options.
|
|
111
|
+
securitySource: client._options.apiKey,
|
|
112
112
|
retryConfig: options?.retries
|
|
113
113
|
|| client._options.retryConfig
|
|
114
114
|
|| { strategy: "none" },
|
|
@@ -97,8 +97,8 @@ async function $do(
|
|
|
97
97
|
Accept: "application/json",
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
100
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
101
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
102
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
103
|
|
|
104
104
|
const context = {
|
|
@@ -109,7 +109,7 @@ async function $do(
|
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
111
111
|
|
|
112
|
-
securitySource: client._options.
|
|
112
|
+
securitySource: client._options.apiKey,
|
|
113
113
|
retryConfig: options?.retries
|
|
114
114
|
|| client._options.retryConfig
|
|
115
115
|
|| { strategy: "none" },
|
|
@@ -97,8 +97,8 @@ async function $do(
|
|
|
97
97
|
Accept: "application/json",
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
100
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
101
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
102
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
103
|
|
|
104
104
|
const context = {
|
|
@@ -109,7 +109,7 @@ async function $do(
|
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
111
111
|
|
|
112
|
-
securitySource: client._options.
|
|
112
|
+
securitySource: client._options.apiKey,
|
|
113
113
|
retryConfig: options?.retries
|
|
114
114
|
|| client._options.retryConfig
|
|
115
115
|
|| { strategy: "none" },
|
|
@@ -73,8 +73,8 @@ async function $do(
|
|
|
73
73
|
Accept: "application/json",
|
|
74
74
|
}));
|
|
75
75
|
|
|
76
|
-
const secConfig = await extractSecurity(client._options.
|
|
77
|
-
const securityInput = secConfig == null ? {} : {
|
|
76
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
77
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
78
78
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
79
79
|
|
|
80
80
|
const context = {
|
|
@@ -85,7 +85,7 @@ async function $do(
|
|
|
85
85
|
|
|
86
86
|
resolvedSecurity: requestSecurity,
|
|
87
87
|
|
|
88
|
-
securitySource: client._options.
|
|
88
|
+
securitySource: client._options.apiKey,
|
|
89
89
|
retryConfig: options?.retries
|
|
90
90
|
|| client._options.retryConfig
|
|
91
91
|
|| { strategy: "none" },
|
|
@@ -98,8 +98,8 @@ async function $do(
|
|
|
98
98
|
Accept: "application/json",
|
|
99
99
|
}));
|
|
100
100
|
|
|
101
|
-
const secConfig = await extractSecurity(client._options.
|
|
102
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
104
|
|
|
105
105
|
const context = {
|
|
@@ -110,7 +110,7 @@ async function $do(
|
|
|
110
110
|
|
|
111
111
|
resolvedSecurity: requestSecurity,
|
|
112
112
|
|
|
113
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
114
|
retryConfig: options?.retries
|
|
115
115
|
|| client._options.retryConfig
|
|
116
116
|
|| { strategy: "none" },
|
|
@@ -73,8 +73,8 @@ async function $do(
|
|
|
73
73
|
Accept: "application/json",
|
|
74
74
|
}));
|
|
75
75
|
|
|
76
|
-
const secConfig = await extractSecurity(client._options.
|
|
77
|
-
const securityInput = secConfig == null ? {} : {
|
|
76
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
77
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
78
78
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
79
79
|
|
|
80
80
|
const context = {
|
|
@@ -85,7 +85,7 @@ async function $do(
|
|
|
85
85
|
|
|
86
86
|
resolvedSecurity: requestSecurity,
|
|
87
87
|
|
|
88
|
-
securitySource: client._options.
|
|
88
|
+
securitySource: client._options.apiKey,
|
|
89
89
|
retryConfig: options?.retries
|
|
90
90
|
|| client._options.retryConfig
|
|
91
91
|
|| { strategy: "none" },
|
|
@@ -97,8 +97,8 @@ async function $do(
|
|
|
97
97
|
Accept: "application/json",
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
100
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
101
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
102
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
103
|
|
|
104
104
|
const context = {
|
|
@@ -109,7 +109,7 @@ async function $do(
|
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
111
111
|
|
|
112
|
-
securitySource: client._options.
|
|
112
|
+
securitySource: client._options.apiKey,
|
|
113
113
|
retryConfig: options?.retries
|
|
114
114
|
|| client._options.retryConfig
|
|
115
115
|
|| { strategy: "none" },
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { IndiciaCore } from "../core.js";
|
|
7
7
|
import { encodeJSON } from "../lib/encodings.js";
|
|
8
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
8
9
|
import { matchStatusCode } from "../lib/http.js";
|
|
9
10
|
import * as M from "../lib/matchers.js";
|
|
10
11
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -31,7 +32,7 @@ import { Result } from "../types/fp.js";
|
|
|
31
32
|
* GitHub Search
|
|
32
33
|
*
|
|
33
34
|
* @remarks
|
|
34
|
-
* Search GitHub profiles, info, and commit emails
|
|
35
|
+
* Search GitHub profiles, info, and commit emails. Streams progress updates via Server-Sent Events.
|
|
35
36
|
*/
|
|
36
37
|
export function socialsSearchGithub(
|
|
37
38
|
client: IndiciaCore,
|
|
@@ -39,7 +40,7 @@ export function socialsSearchGithub(
|
|
|
39
40
|
options?: RequestOptions,
|
|
40
41
|
): APIPromise<
|
|
41
42
|
Result<
|
|
42
|
-
operations.
|
|
43
|
+
EventStream<operations.GithubSearchEvent>,
|
|
43
44
|
| errors.FailedResponseError
|
|
44
45
|
| IndiciaError
|
|
45
46
|
| ResponseValidationError
|
|
@@ -65,7 +66,7 @@ async function $do(
|
|
|
65
66
|
): Promise<
|
|
66
67
|
[
|
|
67
68
|
Result<
|
|
68
|
-
operations.
|
|
69
|
+
EventStream<operations.GithubSearchEvent>,
|
|
69
70
|
| errors.FailedResponseError
|
|
70
71
|
| IndiciaError
|
|
71
72
|
| ResponseValidationError
|
|
@@ -94,11 +95,11 @@ async function $do(
|
|
|
94
95
|
|
|
95
96
|
const headers = new Headers(compactMap({
|
|
96
97
|
"Content-Type": "application/json",
|
|
97
|
-
Accept: "
|
|
98
|
+
Accept: "text/event-stream",
|
|
98
99
|
}));
|
|
99
100
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
104
|
|
|
104
105
|
const context = {
|
|
@@ -109,7 +110,7 @@ async function $do(
|
|
|
109
110
|
|
|
110
111
|
resolvedSecurity: requestSecurity,
|
|
111
112
|
|
|
112
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
113
114
|
retryConfig: options?.retries
|
|
114
115
|
|| client._options.retryConfig
|
|
115
116
|
|| { strategy: "none" },
|
|
@@ -148,7 +149,7 @@ async function $do(
|
|
|
148
149
|
};
|
|
149
150
|
|
|
150
151
|
const [result] = await M.match<
|
|
151
|
-
operations.
|
|
152
|
+
EventStream<operations.GithubSearchEvent>,
|
|
152
153
|
| errors.FailedResponseError
|
|
153
154
|
| IndiciaError
|
|
154
155
|
| ResponseValidationError
|
|
@@ -159,7 +160,21 @@ async function $do(
|
|
|
159
160
|
| UnexpectedClientError
|
|
160
161
|
| SDKValidationError
|
|
161
162
|
>(
|
|
162
|
-
M.
|
|
163
|
+
M.sse(
|
|
164
|
+
200,
|
|
165
|
+
z.pipe(
|
|
166
|
+
z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
|
|
167
|
+
z.transform(stream => {
|
|
168
|
+
return new EventStream(stream, rawEvent => {
|
|
169
|
+
return {
|
|
170
|
+
done: false,
|
|
171
|
+
value: operations.GithubSearchEvent$inboundSchema.parse(rawEvent),
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
}),
|
|
175
|
+
),
|
|
176
|
+
),
|
|
177
|
+
M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
|
|
163
178
|
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
164
179
|
M.fail("4XX"),
|
|
165
180
|
M.fail("5XX"),
|
|
@@ -97,8 +97,8 @@ async function $do(
|
|
|
97
97
|
Accept: "application/json",
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
100
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
101
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
102
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
103
|
|
|
104
104
|
const context = {
|
|
@@ -109,7 +109,7 @@ async function $do(
|
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
111
111
|
|
|
112
|
-
securitySource: client._options.
|
|
112
|
+
securitySource: client._options.apiKey,
|
|
113
113
|
retryConfig: options?.retries
|
|
114
114
|
|| client._options.retryConfig
|
|
115
115
|
|| { strategy: "none" },
|
|
@@ -97,8 +97,8 @@ async function $do(
|
|
|
97
97
|
Accept: "application/json",
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
100
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
101
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
102
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
103
|
|
|
104
104
|
const context = {
|
|
@@ -109,7 +109,7 @@ async function $do(
|
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
111
111
|
|
|
112
|
-
securitySource: client._options.
|
|
112
|
+
securitySource: client._options.apiKey,
|
|
113
113
|
retryConfig: options?.retries
|
|
114
114
|
|| client._options.retryConfig
|
|
115
115
|
|| { strategy: "none" },
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { IndiciaCore } from "../core.js";
|
|
7
7
|
import { encodeJSON } from "../lib/encodings.js";
|
|
8
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
8
9
|
import { matchStatusCode } from "../lib/http.js";
|
|
9
10
|
import * as M from "../lib/matchers.js";
|
|
10
11
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -31,7 +32,7 @@ import { Result } from "../types/fp.js";
|
|
|
31
32
|
* Username Search V2
|
|
32
33
|
*
|
|
33
34
|
* @remarks
|
|
34
|
-
* Search various sites for a specific username
|
|
35
|
+
* Search various sites for a specific username. Streams progress updates via Server-Sent Events.
|
|
35
36
|
*/
|
|
36
37
|
export function socialsSearchUsername(
|
|
37
38
|
client: IndiciaCore,
|
|
@@ -39,7 +40,7 @@ export function socialsSearchUsername(
|
|
|
39
40
|
options?: RequestOptions,
|
|
40
41
|
): APIPromise<
|
|
41
42
|
Result<
|
|
42
|
-
operations.
|
|
43
|
+
EventStream<operations.UsernameSearchEvent>,
|
|
43
44
|
| errors.FailedResponseError
|
|
44
45
|
| IndiciaError
|
|
45
46
|
| ResponseValidationError
|
|
@@ -65,7 +66,7 @@ async function $do(
|
|
|
65
66
|
): Promise<
|
|
66
67
|
[
|
|
67
68
|
Result<
|
|
68
|
-
operations.
|
|
69
|
+
EventStream<operations.UsernameSearchEvent>,
|
|
69
70
|
| errors.FailedResponseError
|
|
70
71
|
| IndiciaError
|
|
71
72
|
| ResponseValidationError
|
|
@@ -94,11 +95,11 @@ async function $do(
|
|
|
94
95
|
|
|
95
96
|
const headers = new Headers(compactMap({
|
|
96
97
|
"Content-Type": "application/json",
|
|
97
|
-
Accept: "
|
|
98
|
+
Accept: "text/event-stream",
|
|
98
99
|
}));
|
|
99
100
|
|
|
100
|
-
const secConfig = await extractSecurity(client._options.
|
|
101
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
102
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
103
104
|
|
|
104
105
|
const context = {
|
|
@@ -109,7 +110,7 @@ async function $do(
|
|
|
109
110
|
|
|
110
111
|
resolvedSecurity: requestSecurity,
|
|
111
112
|
|
|
112
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
113
114
|
retryConfig: options?.retries
|
|
114
115
|
|| client._options.retryConfig
|
|
115
116
|
|| { strategy: "none" },
|
|
@@ -148,7 +149,7 @@ async function $do(
|
|
|
148
149
|
};
|
|
149
150
|
|
|
150
151
|
const [result] = await M.match<
|
|
151
|
-
operations.
|
|
152
|
+
EventStream<operations.UsernameSearchEvent>,
|
|
152
153
|
| errors.FailedResponseError
|
|
153
154
|
| IndiciaError
|
|
154
155
|
| ResponseValidationError
|
|
@@ -159,7 +160,23 @@ async function $do(
|
|
|
159
160
|
| UnexpectedClientError
|
|
160
161
|
| SDKValidationError
|
|
161
162
|
>(
|
|
162
|
-
M.
|
|
163
|
+
M.sse(
|
|
164
|
+
200,
|
|
165
|
+
z.pipe(
|
|
166
|
+
z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
|
|
167
|
+
z.transform(stream => {
|
|
168
|
+
return new EventStream(stream, rawEvent => {
|
|
169
|
+
return {
|
|
170
|
+
done: false,
|
|
171
|
+
value: operations.UsernameSearchEvent$inboundSchema.parse(
|
|
172
|
+
rawEvent,
|
|
173
|
+
),
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
}),
|
|
177
|
+
),
|
|
178
|
+
),
|
|
179
|
+
M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
|
|
163
180
|
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
164
181
|
M.fail("4XX"),
|
|
165
182
|
M.fail("5XX"),
|
|
@@ -98,8 +98,8 @@ async function $do(
|
|
|
98
98
|
Accept: "application/json",
|
|
99
99
|
}));
|
|
100
100
|
|
|
101
|
-
const secConfig = await extractSecurity(client._options.
|
|
102
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
104
|
|
|
105
105
|
const context = {
|
|
@@ -110,7 +110,7 @@ async function $do(
|
|
|
110
110
|
|
|
111
111
|
resolvedSecurity: requestSecurity,
|
|
112
112
|
|
|
113
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
114
|
retryConfig: options?.retries
|
|
115
115
|
|| client._options.retryConfig
|
|
116
116
|
|| { strategy: "none" },
|
|
@@ -98,8 +98,8 @@ async function $do(
|
|
|
98
98
|
Accept: "application/json",
|
|
99
99
|
}));
|
|
100
100
|
|
|
101
|
-
const secConfig = await extractSecurity(client._options.
|
|
102
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
104
|
|
|
105
105
|
const context = {
|
|
@@ -110,7 +110,7 @@ async function $do(
|
|
|
110
110
|
|
|
111
111
|
resolvedSecurity: requestSecurity,
|
|
112
112
|
|
|
113
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
114
|
retryConfig: options?.retries
|
|
115
115
|
|| client._options.retryConfig
|
|
116
116
|
|| { strategy: "none" },
|
|
@@ -98,8 +98,8 @@ async function $do(
|
|
|
98
98
|
Accept: "application/json",
|
|
99
99
|
}));
|
|
100
100
|
|
|
101
|
-
const secConfig = await extractSecurity(client._options.
|
|
102
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
104
|
|
|
105
105
|
const context = {
|
|
@@ -110,7 +110,7 @@ async function $do(
|
|
|
110
110
|
|
|
111
111
|
resolvedSecurity: requestSecurity,
|
|
112
112
|
|
|
113
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
114
|
retryConfig: options?.retries
|
|
115
115
|
|| client._options.retryConfig
|
|
116
116
|
|| { strategy: "none" },
|
|
@@ -73,8 +73,8 @@ async function $do(
|
|
|
73
73
|
Accept: "application/json",
|
|
74
74
|
}));
|
|
75
75
|
|
|
76
|
-
const secConfig = await extractSecurity(client._options.
|
|
77
|
-
const securityInput = secConfig == null ? {} : {
|
|
76
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
77
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
78
78
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
79
79
|
|
|
80
80
|
const context = {
|
|
@@ -85,7 +85,7 @@ async function $do(
|
|
|
85
85
|
|
|
86
86
|
resolvedSecurity: requestSecurity,
|
|
87
87
|
|
|
88
|
-
securitySource: client._options.
|
|
88
|
+
securitySource: client._options.apiKey,
|
|
89
89
|
retryConfig: options?.retries
|
|
90
90
|
|| client._options.retryConfig
|
|
91
91
|
|| { strategy: "none" },
|
package/src/hooks/hooks.ts
CHANGED
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
SDKInitHook,
|
|
19
19
|
} from "./types.js";
|
|
20
20
|
|
|
21
|
+
import { initHooks } from "./registration.js";
|
|
22
|
+
|
|
21
23
|
export class SDKHooks implements Hooks {
|
|
22
24
|
sdkInitHooks: SDKInitHook[] = [];
|
|
23
25
|
beforeCreateRequestHooks: BeforeCreateRequestHook[] = [];
|
|
@@ -45,6 +47,7 @@ export class SDKHooks implements Hooks {
|
|
|
45
47
|
this.registerAfterErrorHook(hook);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
50
|
+
initHooks(this);
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
registerSDKInitHook(hook: SDKInitHook) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Hooks } from "./types.js";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This file is only ever generated once on the first generation and then is free to be modified.
|
|
5
|
+
* Any hooks you wish to add should be registered in the initHooks function. Feel free to define them
|
|
6
|
+
* in this file or in separate files in the hooks folder.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// @ts-expect-error remove this line when you add your first hook and hooks is used
|
|
10
|
+
export function initHooks(hooks: Hooks) {
|
|
11
|
+
// Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook
|
|
12
|
+
// with an instance of a hook that implements that specific Hook interface
|
|
13
|
+
// Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
|
|
14
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -15,7 +15,7 @@ export const ServerList = [
|
|
|
15
15
|
] as const;
|
|
16
16
|
|
|
17
17
|
export type SDKOptions = {
|
|
18
|
-
|
|
18
|
+
apiKey?: string | (() => Promise<string>) | undefined;
|
|
19
19
|
|
|
20
20
|
httpClient?: HTTPClient;
|
|
21
21
|
/**
|
|
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "1.0.0",
|
|
61
|
-
sdkVersion: "1.1
|
|
62
|
-
genVersion: "2.
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 1.1
|
|
61
|
+
sdkVersion: "1.2.1",
|
|
62
|
+
genVersion: "2.912.1",
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 1.2.1 2.912.1 1.0.0 @indiciaosint/sdk",
|
|
64
64
|
} as const;
|
package/src/lib/env.ts
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
|
|
7
7
|
export interface Env {
|
|
8
|
-
|
|
8
|
+
INDICIA_API_KEY?: string | undefined;
|
|
9
9
|
|
|
10
10
|
INDICIA_DEBUG?: boolean | undefined;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export const envSchema: z.ZodMiniType<Env, unknown> = z.object({
|
|
14
|
-
|
|
14
|
+
INDICIA_API_KEY: z.optional(z.string()),
|
|
15
15
|
|
|
16
16
|
INDICIA_DEBUG: z.optional(z.coerce.boolean()),
|
|
17
17
|
});
|