@indiciaosint/sdk 1.1.0 → 1.2.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/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.js +3 -3
- 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.js +3 -3
- 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 +98 -0
- package/esm/models/operations/search-face.js.map +1 -1
- package/esm/models/operations/search-username.d.ts +6 -6
- package/esm/models/operations/search-username.d.ts.map +1 -1
- package/esm/models/operations/search-username.js +13 -7
- 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/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 +3 -3
- 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 +3 -3
- 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 +259 -0
- package/src/models/operations/search-username.ts +23 -15
- 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/types/discriminated-union.ts +101 -0
- package/src/types/smart-union.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-union.js","sourceRoot":"","sources":["../../src/types/smart-union.ts"],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AI,KAAK,QAAQ,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AAAA,CACnB"}
|
package/jsr.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
{
|
|
4
4
|
"name": "@indiciaosint/sdk",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.2.0",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.ts",
|
|
8
8
|
"./models/errors": "./src/models/errors/index.ts",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"./lib/http": "./src/lib/http.ts",
|
|
13
13
|
"./lib/retries": "./src/lib/retries.ts",
|
|
14
14
|
"./lib/sdks": "./src/lib/sdks.ts",
|
|
15
|
+
"./lib/event-streams": "./src/lib/event-streams.ts",
|
|
15
16
|
"./types": "./src/types/index.ts"
|
|
16
17
|
},
|
|
17
18
|
"publish": {
|
package/package.json
CHANGED
|
@@ -96,8 +96,8 @@ async function $do(
|
|
|
96
96
|
Accept: "*/*",
|
|
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" },
|
|
@@ -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" },
|
|
@@ -99,8 +99,8 @@ async function $do(
|
|
|
99
99
|
Accept: "application/json",
|
|
100
100
|
}));
|
|
101
101
|
|
|
102
|
-
const secConfig = await extractSecurity(client._options.
|
|
103
|
-
const securityInput = secConfig == null ? {} : {
|
|
102
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
103
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
104
104
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
105
105
|
|
|
106
106
|
const context = {
|
|
@@ -111,7 +111,7 @@ async function $do(
|
|
|
111
111
|
|
|
112
112
|
resolvedSecurity: requestSecurity,
|
|
113
113
|
|
|
114
|
-
securitySource: client._options.
|
|
114
|
+
securitySource: client._options.apiKey,
|
|
115
115
|
retryConfig: options?.retries
|
|
116
116
|
|| client._options.retryConfig
|
|
117
117
|
|| { 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";
|
|
@@ -26,139 +27,12 @@ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
|
26
27
|
import * as operations from "../models/operations/index.js";
|
|
27
28
|
import { APICall, APIPromise } from "../types/async.js";
|
|
28
29
|
import { Result } from "../types/fp.js";
|
|
29
|
-
import * as types$ from "../types/primitives.js";
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Port Scan
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
35
|
* Perform a port scan on a given IP address or domain.
|
|
36
|
-
*
|
|
37
|
-
* Response type:
|
|
38
|
-
* ```ts
|
|
39
|
-
* interface NmapScanResult {
|
|
40
|
-
* $: {
|
|
41
|
-
* scanner: string;
|
|
42
|
-
* args: string;
|
|
43
|
-
* start: string;
|
|
44
|
-
* startstr: string;
|
|
45
|
-
* version: string;
|
|
46
|
-
* xmloutputversion: string;
|
|
47
|
-
* };
|
|
48
|
-
* scaninfo: Array<{
|
|
49
|
-
* $: {
|
|
50
|
-
* type: string;
|
|
51
|
-
* protocol: string;
|
|
52
|
-
* numservices: string;
|
|
53
|
-
* services: string;
|
|
54
|
-
* };
|
|
55
|
-
* }>;
|
|
56
|
-
* verbose: Array<{ $: { level: string } }>;
|
|
57
|
-
* debugging: Array<{ $: { level: string } }>;
|
|
58
|
-
* taskprogress?: Array<{
|
|
59
|
-
* $: {
|
|
60
|
-
* task: string;
|
|
61
|
-
* time: string;
|
|
62
|
-
* percent: string;
|
|
63
|
-
* remaining: string;
|
|
64
|
-
* etc: string;
|
|
65
|
-
* };
|
|
66
|
-
* }>;
|
|
67
|
-
* host?: Array<{
|
|
68
|
-
* $: {
|
|
69
|
-
* starttime: string;
|
|
70
|
-
* endtime: string;
|
|
71
|
-
* };
|
|
72
|
-
* status: Array<{
|
|
73
|
-
* $: {
|
|
74
|
-
* state: string;
|
|
75
|
-
* reason: string;
|
|
76
|
-
* reason_ttl: string;
|
|
77
|
-
* };
|
|
78
|
-
* }>;
|
|
79
|
-
* address: Array<{
|
|
80
|
-
* $: {
|
|
81
|
-
* addr: string;
|
|
82
|
-
* addrtype: string;
|
|
83
|
-
* };
|
|
84
|
-
* }>;
|
|
85
|
-
* hostnames?: Array<{
|
|
86
|
-
* hostname: Array<{
|
|
87
|
-
* $: {
|
|
88
|
-
* name: string;
|
|
89
|
-
* type: string;
|
|
90
|
-
* };
|
|
91
|
-
* }>;
|
|
92
|
-
* }>;
|
|
93
|
-
* ports?: Array<{
|
|
94
|
-
* extraports?: Array<{
|
|
95
|
-
* $: {
|
|
96
|
-
* state: string;
|
|
97
|
-
* count: string;
|
|
98
|
-
* };
|
|
99
|
-
* extrareasons: Array<{
|
|
100
|
-
* $: {
|
|
101
|
-
* reason: string;
|
|
102
|
-
* count: string;
|
|
103
|
-
* proto: string;
|
|
104
|
-
* ports: string;
|
|
105
|
-
* };
|
|
106
|
-
* }>;
|
|
107
|
-
* }>;
|
|
108
|
-
* port?: Array<{
|
|
109
|
-
* $: {
|
|
110
|
-
* protocol: string;
|
|
111
|
-
* portid: string;
|
|
112
|
-
* };
|
|
113
|
-
* state: Array<{
|
|
114
|
-
* $: {
|
|
115
|
-
* state: string;
|
|
116
|
-
* reason: string;
|
|
117
|
-
* reason_ttl: string;
|
|
118
|
-
* };
|
|
119
|
-
* }>;
|
|
120
|
-
* service?: Array<{
|
|
121
|
-
* $: {
|
|
122
|
-
* name: string;
|
|
123
|
-
* product?: string;
|
|
124
|
-
* version?: string;
|
|
125
|
-
* extrainfo?: string;
|
|
126
|
-
* ostype?: string;
|
|
127
|
-
* method: string;
|
|
128
|
-
* conf: string;
|
|
129
|
-
* };
|
|
130
|
-
* cpe?: string[];
|
|
131
|
-
* }>;
|
|
132
|
-
* }>;
|
|
133
|
-
* }>;
|
|
134
|
-
* times?: Array<{
|
|
135
|
-
* $: {
|
|
136
|
-
* srtt: string;
|
|
137
|
-
* rttvar: string;
|
|
138
|
-
* to: string;
|
|
139
|
-
* };
|
|
140
|
-
* }>;
|
|
141
|
-
* }>;
|
|
142
|
-
* runstats: Array<{
|
|
143
|
-
* finished: Array<{
|
|
144
|
-
* $: {
|
|
145
|
-
* time: string;
|
|
146
|
-
* timestr: string;
|
|
147
|
-
* summary: string;
|
|
148
|
-
* elapsed: string;
|
|
149
|
-
* exit: string;
|
|
150
|
-
* };
|
|
151
|
-
* }>;
|
|
152
|
-
* hosts: Array<{
|
|
153
|
-
* $: {
|
|
154
|
-
* up: string;
|
|
155
|
-
* down: string;
|
|
156
|
-
* total: string;
|
|
157
|
-
* };
|
|
158
|
-
* }>;
|
|
159
|
-
* }>;
|
|
160
|
-
* }
|
|
161
|
-
* ```
|
|
162
36
|
*/
|
|
163
37
|
export function infrastructureScanPorts(
|
|
164
38
|
client: IndiciaCore,
|
|
@@ -166,7 +40,7 @@ export function infrastructureScanPorts(
|
|
|
166
40
|
options?: RequestOptions,
|
|
167
41
|
): APIPromise<
|
|
168
42
|
Result<
|
|
169
|
-
|
|
43
|
+
EventStream<operations.PortscanEvent>,
|
|
170
44
|
| errors.FailedResponseError
|
|
171
45
|
| IndiciaError
|
|
172
46
|
| ResponseValidationError
|
|
@@ -192,7 +66,7 @@ async function $do(
|
|
|
192
66
|
): Promise<
|
|
193
67
|
[
|
|
194
68
|
Result<
|
|
195
|
-
|
|
69
|
+
EventStream<operations.PortscanEvent>,
|
|
196
70
|
| errors.FailedResponseError
|
|
197
71
|
| IndiciaError
|
|
198
72
|
| ResponseValidationError
|
|
@@ -224,8 +98,8 @@ async function $do(
|
|
|
224
98
|
Accept: "text/event-stream",
|
|
225
99
|
}));
|
|
226
100
|
|
|
227
|
-
const secConfig = await extractSecurity(client._options.
|
|
228
|
-
const securityInput = secConfig == null ? {} : {
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
229
103
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
230
104
|
|
|
231
105
|
const context = {
|
|
@@ -236,7 +110,7 @@ async function $do(
|
|
|
236
110
|
|
|
237
111
|
resolvedSecurity: requestSecurity,
|
|
238
112
|
|
|
239
|
-
securitySource: client._options.
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
240
114
|
retryConfig: options?.retries
|
|
241
115
|
|| client._options.retryConfig
|
|
242
116
|
|| { strategy: "none" },
|
|
@@ -275,7 +149,7 @@ async function $do(
|
|
|
275
149
|
};
|
|
276
150
|
|
|
277
151
|
const [result] = await M.match<
|
|
278
|
-
|
|
152
|
+
EventStream<operations.PortscanEvent>,
|
|
279
153
|
| errors.FailedResponseError
|
|
280
154
|
| IndiciaError
|
|
281
155
|
| ResponseValidationError
|
|
@@ -286,7 +160,20 @@ async function $do(
|
|
|
286
160
|
| UnexpectedClientError
|
|
287
161
|
| SDKValidationError
|
|
288
162
|
>(
|
|
289
|
-
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.PortscanEvent$inboundSchema.parse(rawEvent),
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
}),
|
|
175
|
+
),
|
|
176
|
+
),
|
|
290
177
|
M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
|
|
291
178
|
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
292
179
|
M.fail("4XX"),
|
|
@@ -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" },
|
|
@@ -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" },
|
|
@@ -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 { appendForm, normalizeBlob } from "../lib/encodings.js";
|
|
8
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
8
9
|
import {
|
|
9
10
|
bytesToBlob,
|
|
10
11
|
getContentTypeFromFileName,
|
|
@@ -32,7 +33,6 @@ import * as operations from "../models/operations/index.js";
|
|
|
32
33
|
import { APICall, APIPromise } from "../types/async.js";
|
|
33
34
|
import { isBlobLike } from "../types/blobs.js";
|
|
34
35
|
import { Result } from "../types/fp.js";
|
|
35
|
-
import * as types$ from "../types/primitives.js";
|
|
36
36
|
import { isReadableStream } from "../types/streams.js";
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -40,18 +40,6 @@ import { isReadableStream } from "../types/streams.js";
|
|
|
40
40
|
*
|
|
41
41
|
* @remarks
|
|
42
42
|
* Geolocate an image using AI-powered analysis. Streams progress updates via Server-Sent Events.
|
|
43
|
-
*
|
|
44
|
-
* Response type:
|
|
45
|
-
*
|
|
46
|
-
* ```ts
|
|
47
|
-
* interface GeolocationResponse {
|
|
48
|
-
* location: string | null;
|
|
49
|
-
* coordinates: string | null;
|
|
50
|
-
* certainty: string;
|
|
51
|
-
* reasoning: string;
|
|
52
|
-
* mapsUrl?: `https://www.google.com/maps/search/?api=1&query=${string}`;
|
|
53
|
-
* }
|
|
54
|
-
* ```
|
|
55
43
|
*/
|
|
56
44
|
export function intelligenceGeolocateMedia(
|
|
57
45
|
client: IndiciaCore,
|
|
@@ -59,7 +47,7 @@ export function intelligenceGeolocateMedia(
|
|
|
59
47
|
options?: RequestOptions,
|
|
60
48
|
): APIPromise<
|
|
61
49
|
Result<
|
|
62
|
-
|
|
50
|
+
EventStream<operations.GeolocationEvent>,
|
|
63
51
|
| errors.FailedResponseError
|
|
64
52
|
| IndiciaError
|
|
65
53
|
| ResponseValidationError
|
|
@@ -85,7 +73,7 @@ async function $do(
|
|
|
85
73
|
): Promise<
|
|
86
74
|
[
|
|
87
75
|
Result<
|
|
88
|
-
|
|
76
|
+
EventStream<operations.GeolocationEvent>,
|
|
89
77
|
| errors.FailedResponseError
|
|
90
78
|
| IndiciaError
|
|
91
79
|
| ResponseValidationError
|
|
@@ -148,8 +136,8 @@ async function $do(
|
|
|
148
136
|
Accept: "text/event-stream",
|
|
149
137
|
}));
|
|
150
138
|
|
|
151
|
-
const secConfig = await extractSecurity(client._options.
|
|
152
|
-
const securityInput = secConfig == null ? {} : {
|
|
139
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
140
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
153
141
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
154
142
|
|
|
155
143
|
const context = {
|
|
@@ -160,7 +148,7 @@ async function $do(
|
|
|
160
148
|
|
|
161
149
|
resolvedSecurity: requestSecurity,
|
|
162
150
|
|
|
163
|
-
securitySource: client._options.
|
|
151
|
+
securitySource: client._options.apiKey,
|
|
164
152
|
retryConfig: options?.retries
|
|
165
153
|
|| client._options.retryConfig
|
|
166
154
|
|| { strategy: "none" },
|
|
@@ -199,7 +187,7 @@ async function $do(
|
|
|
199
187
|
};
|
|
200
188
|
|
|
201
189
|
const [result] = await M.match<
|
|
202
|
-
|
|
190
|
+
EventStream<operations.GeolocationEvent>,
|
|
203
191
|
| errors.FailedResponseError
|
|
204
192
|
| IndiciaError
|
|
205
193
|
| ResponseValidationError
|
|
@@ -210,7 +198,20 @@ async function $do(
|
|
|
210
198
|
| UnexpectedClientError
|
|
211
199
|
| SDKValidationError
|
|
212
200
|
>(
|
|
213
|
-
M.
|
|
201
|
+
M.sse(
|
|
202
|
+
200,
|
|
203
|
+
z.pipe(
|
|
204
|
+
z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
|
|
205
|
+
z.transform(stream => {
|
|
206
|
+
return new EventStream(stream, rawEvent => {
|
|
207
|
+
return {
|
|
208
|
+
done: false,
|
|
209
|
+
value: operations.GeolocationEvent$inboundSchema.parse(rawEvent),
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
}),
|
|
213
|
+
),
|
|
214
|
+
),
|
|
214
215
|
M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
|
|
215
216
|
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
216
217
|
M.fail("4XX"),
|
|
@@ -94,8 +94,8 @@ async function $do(
|
|
|
94
94
|
Accept: "application/json",
|
|
95
95
|
}));
|
|
96
96
|
|
|
97
|
-
const secConfig = await extractSecurity(client._options.
|
|
98
|
-
const securityInput = secConfig == null ? {} : {
|
|
97
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
98
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
99
99
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
100
100
|
|
|
101
101
|
const context = {
|
|
@@ -106,7 +106,7 @@ async function $do(
|
|
|
106
106
|
|
|
107
107
|
resolvedSecurity: requestSecurity,
|
|
108
108
|
|
|
109
|
-
securitySource: client._options.
|
|
109
|
+
securitySource: client._options.apiKey,
|
|
110
110
|
retryConfig: options?.retries
|
|
111
111
|
|| client._options.retryConfig
|
|
112
112
|
|| { 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 { appendForm, normalizeBlob } from "../lib/encodings.js";
|
|
8
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
8
9
|
import {
|
|
9
10
|
bytesToBlob,
|
|
10
11
|
getContentTypeFromFileName,
|
|
@@ -32,7 +33,6 @@ import * as operations from "../models/operations/index.js";
|
|
|
32
33
|
import { APICall, APIPromise } from "../types/async.js";
|
|
33
34
|
import { isBlobLike } from "../types/blobs.js";
|
|
34
35
|
import { Result } from "../types/fp.js";
|
|
35
|
-
import * as types$ from "../types/primitives.js";
|
|
36
36
|
import { isReadableStream } from "../types/streams.js";
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -47,7 +47,7 @@ export function intelligenceSearchFace(
|
|
|
47
47
|
options?: RequestOptions,
|
|
48
48
|
): APIPromise<
|
|
49
49
|
Result<
|
|
50
|
-
|
|
50
|
+
EventStream<operations.FacialSearchEvent>,
|
|
51
51
|
| errors.FailedResponseError
|
|
52
52
|
| IndiciaError
|
|
53
53
|
| ResponseValidationError
|
|
@@ -73,7 +73,7 @@ async function $do(
|
|
|
73
73
|
): Promise<
|
|
74
74
|
[
|
|
75
75
|
Result<
|
|
76
|
-
|
|
76
|
+
EventStream<operations.FacialSearchEvent>,
|
|
77
77
|
| errors.FailedResponseError
|
|
78
78
|
| IndiciaError
|
|
79
79
|
| ResponseValidationError
|
|
@@ -130,8 +130,8 @@ async function $do(
|
|
|
130
130
|
Accept: "text/event-stream",
|
|
131
131
|
}));
|
|
132
132
|
|
|
133
|
-
const secConfig = await extractSecurity(client._options.
|
|
134
|
-
const securityInput = secConfig == null ? {} : {
|
|
133
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
134
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
135
135
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
136
136
|
|
|
137
137
|
const context = {
|
|
@@ -142,7 +142,7 @@ async function $do(
|
|
|
142
142
|
|
|
143
143
|
resolvedSecurity: requestSecurity,
|
|
144
144
|
|
|
145
|
-
securitySource: client._options.
|
|
145
|
+
securitySource: client._options.apiKey,
|
|
146
146
|
retryConfig: options?.retries
|
|
147
147
|
|| client._options.retryConfig
|
|
148
148
|
|| { strategy: "none" },
|
|
@@ -181,7 +181,7 @@ async function $do(
|
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
const [result] = await M.match<
|
|
184
|
-
|
|
184
|
+
EventStream<operations.FacialSearchEvent>,
|
|
185
185
|
| errors.FailedResponseError
|
|
186
186
|
| IndiciaError
|
|
187
187
|
| ResponseValidationError
|
|
@@ -192,7 +192,20 @@ async function $do(
|
|
|
192
192
|
| UnexpectedClientError
|
|
193
193
|
| SDKValidationError
|
|
194
194
|
>(
|
|
195
|
-
M.
|
|
195
|
+
M.sse(
|
|
196
|
+
200,
|
|
197
|
+
z.pipe(
|
|
198
|
+
z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
|
|
199
|
+
z.transform(stream => {
|
|
200
|
+
return new EventStream(stream, rawEvent => {
|
|
201
|
+
return {
|
|
202
|
+
done: false,
|
|
203
|
+
value: operations.FacialSearchEvent$inboundSchema.parse(rawEvent),
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
}),
|
|
207
|
+
),
|
|
208
|
+
),
|
|
196
209
|
M.jsonErr([400, 402], errors.FailedResponseError$inboundSchema),
|
|
197
210
|
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
198
211
|
M.fail("4XX"),
|