@indiciaosint/sdk 1.2.3 → 1.2.5

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 (51) hide show
  1. package/README.md +5 -1
  2. package/esm/funcs/tools-analyze-crypto-address.d.ts +18 -0
  3. package/esm/funcs/tools-analyze-crypto-address.d.ts.map +1 -0
  4. package/esm/funcs/tools-analyze-crypto-address.js +84 -0
  5. package/esm/funcs/tools-analyze-crypto-address.js.map +1 -0
  6. package/esm/funcs/tools-search-app-store.d.ts +18 -0
  7. package/esm/funcs/tools-search-app-store.d.ts.map +1 -0
  8. package/esm/funcs/tools-search-app-store.js +84 -0
  9. package/esm/funcs/tools-search-app-store.js.map +1 -0
  10. package/esm/lib/config.d.ts +3 -3
  11. package/esm/lib/config.js +3 -3
  12. package/esm/models/operations/analyze-crypto-address.d.ts +79 -0
  13. package/esm/models/operations/analyze-crypto-address.d.ts.map +1 -0
  14. package/esm/models/operations/analyze-crypto-address.js +79 -0
  15. package/esm/models/operations/analyze-crypto-address.js.map +1 -0
  16. package/esm/models/operations/get-activity.d.ts +3 -0
  17. package/esm/models/operations/get-activity.d.ts.map +1 -1
  18. package/esm/models/operations/get-activity.js +3 -0
  19. package/esm/models/operations/get-activity.js.map +1 -1
  20. package/esm/models/operations/get-info.d.ts +3 -0
  21. package/esm/models/operations/get-info.d.ts.map +1 -1
  22. package/esm/models/operations/get-info.js +3 -0
  23. package/esm/models/operations/get-info.js.map +1 -1
  24. package/esm/models/operations/index.d.ts +2 -0
  25. package/esm/models/operations/index.d.ts.map +1 -1
  26. package/esm/models/operations/index.js +2 -0
  27. package/esm/models/operations/index.js.map +1 -1
  28. package/esm/models/operations/list-activities.d.ts +3 -0
  29. package/esm/models/operations/list-activities.d.ts.map +1 -1
  30. package/esm/models/operations/list-activities.js +3 -0
  31. package/esm/models/operations/list-activities.js.map +1 -1
  32. package/esm/models/operations/search-app-store.d.ts +90 -0
  33. package/esm/models/operations/search-app-store.d.ts.map +1 -0
  34. package/esm/models/operations/search-app-store.js +87 -0
  35. package/esm/models/operations/search-app-store.js.map +1 -0
  36. package/esm/sdk/tools.d.ts +14 -0
  37. package/esm/sdk/tools.d.ts.map +1 -1
  38. package/esm/sdk/tools.js +20 -0
  39. package/esm/sdk/tools.js.map +1 -1
  40. package/jsr.json +1 -1
  41. package/package.json +1 -1
  42. package/src/funcs/tools-analyze-crypto-address.ts +173 -0
  43. package/src/funcs/tools-search-app-store.ts +172 -0
  44. package/src/lib/config.ts +3 -3
  45. package/src/models/operations/analyze-crypto-address.ts +192 -0
  46. package/src/models/operations/get-activity.ts +3 -0
  47. package/src/models/operations/get-info.ts +3 -0
  48. package/src/models/operations/index.ts +2 -0
  49. package/src/models/operations/list-activities.ts +3 -0
  50. package/src/models/operations/search-app-store.ts +199 -0
  51. package/src/sdk/tools.ts +36 -0
@@ -0,0 +1,172 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { IndiciaCore } from "../core.js";
7
+ import { encodeJSON } from "../lib/encodings.js";
8
+ import { matchStatusCode } from "../lib/http.js";
9
+ import * as M from "../lib/matchers.js";
10
+ import { compactMap } from "../lib/primitives.js";
11
+ import { safeParse } from "../lib/schemas.js";
12
+ import { RequestOptions } from "../lib/sdks.js";
13
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
14
+ import { pathToFunc } from "../lib/url.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/http-client-errors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { IndiciaError } from "../models/errors/indicia-error.js";
24
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
25
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+
30
+ /**
31
+ * App Store Search
32
+ *
33
+ * @remarks
34
+ * Scrape app and developer information from the Google Play Store or Apple App Store. Pass an app/package ID (e.g. com.whatsapp) for full developer contact details, or a name to search.
35
+ */
36
+ export function toolsSearchAppStore(
37
+ client: IndiciaCore,
38
+ request: operations.SearchAppStoreRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ operations.SearchAppStoreResponse,
43
+ | errors.FailedResponseError
44
+ | IndiciaError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: IndiciaCore,
63
+ request: operations.SearchAppStoreRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ operations.SearchAppStoreResponse,
69
+ | errors.FailedResponseError
70
+ | IndiciaError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed = safeParse(
83
+ request,
84
+ (value) => z.parse(operations.SearchAppStoreRequest$outboundSchema, value),
85
+ "Input validation failed",
86
+ );
87
+ if (!parsed.ok) {
88
+ return [parsed, { status: "invalid" }];
89
+ }
90
+ const payload = parsed.value;
91
+ const body = encodeJSON("body", payload, { explode: true });
92
+
93
+ const path = pathToFunc("/v1/tools/appstore")();
94
+
95
+ const headers = new Headers(compactMap({
96
+ "Content-Type": "application/json",
97
+ Accept: "application/json",
98
+ }));
99
+
100
+ const secConfig = await extractSecurity(client._options.apiKey);
101
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
102
+ const requestSecurity = resolveGlobalSecurity(securityInput);
103
+
104
+ const context = {
105
+ options: client._options,
106
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
107
+ operationID: "searchAppStore",
108
+ oAuth2Scopes: null,
109
+
110
+ resolvedSecurity: requestSecurity,
111
+
112
+ securitySource: client._options.apiKey,
113
+ retryConfig: options?.retries
114
+ || client._options.retryConfig
115
+ || { strategy: "none" },
116
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
117
+ };
118
+
119
+ const requestRes = client._createRequest(context, {
120
+ security: requestSecurity,
121
+ method: "POST",
122
+ baseURL: options?.serverURL,
123
+ path: path,
124
+ headers: headers,
125
+ body: body,
126
+ userAgent: client._options.userAgent,
127
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
128
+ }, options);
129
+ if (!requestRes.ok) {
130
+ return [requestRes, { status: "invalid" }];
131
+ }
132
+ const req = requestRes.value;
133
+
134
+ const doResult = await client._do(req, {
135
+ context,
136
+ isErrorStatusCode: (statusCode: number) =>
137
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
138
+ retryConfig: context.retryConfig,
139
+ retryCodes: context.retryCodes,
140
+ });
141
+ if (!doResult.ok) {
142
+ return [doResult, { status: "request-error", request: req }];
143
+ }
144
+ const response = doResult.value;
145
+
146
+ const responseFields = {
147
+ HttpMeta: { Response: response, Request: req },
148
+ };
149
+
150
+ const [result] = await M.match<
151
+ operations.SearchAppStoreResponse,
152
+ | errors.FailedResponseError
153
+ | IndiciaError
154
+ | ResponseValidationError
155
+ | ConnectionError
156
+ | RequestAbortedError
157
+ | RequestTimeoutError
158
+ | InvalidRequestError
159
+ | UnexpectedClientError
160
+ | SDKValidationError
161
+ >(
162
+ M.json(200, operations.SearchAppStoreResponse$inboundSchema),
163
+ M.jsonErr(500, errors.FailedResponseError$inboundSchema),
164
+ M.fail("4XX"),
165
+ M.fail("5XX"),
166
+ )(response, req, { extraFields: responseFields });
167
+ if (!result.ok) {
168
+ return [result, { status: "complete", request: req, response }];
169
+ }
170
+
171
+ return [result, { status: "complete", request: req, response }];
172
+ }
package/src/lib/config.ts CHANGED
@@ -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.2.3",
62
- genVersion: "2.912.1",
63
- userAgent: "speakeasy-sdk/typescript 1.2.3 2.912.1 1.0.0 @indiciaosint/sdk",
61
+ sdkVersion: "1.2.5",
62
+ genVersion: "2.913.3",
63
+ userAgent: "speakeasy-sdk/typescript 1.2.5 2.913.3 1.0.0 @indiciaosint/sdk",
64
64
  } as const;
@@ -0,0 +1,192 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import * as openEnums from "../../types/enums.js";
8
+ import { OpenEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as types from "../../types/primitives.js";
11
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
12
+
13
+ export type AnalyzeCryptoAddressRequest = {
14
+ address: string;
15
+ network?: string | undefined;
16
+ };
17
+
18
+ export type Token = {
19
+ amount: string;
20
+ contract: string | null;
21
+ icon: string | null;
22
+ name: string | null;
23
+ symbol: string | null;
24
+ valueUsd: number | null;
25
+ };
26
+
27
+ export const Direction = {
28
+ In: "in",
29
+ Out: "out",
30
+ Self: "self",
31
+ } as const;
32
+ export type Direction = OpenEnum<typeof Direction>;
33
+
34
+ export type Transaction = {
35
+ amount: string | null;
36
+ coin: string;
37
+ counterparty: string | null;
38
+ direction: Direction | null;
39
+ fee: string | null;
40
+ hash: string;
41
+ status: string | null;
42
+ timestamp: string | null;
43
+ url: string | null;
44
+ };
45
+
46
+ export type AnalyzeCryptoAddressData = {
47
+ address: string;
48
+ balance: string;
49
+ balanceUsd: number | null;
50
+ coin: string;
51
+ explorerUrl: string;
52
+ label: string | null;
53
+ network: string;
54
+ priceUsd: number | null;
55
+ tokens: Array<Token>;
56
+ totalReceived: string | null;
57
+ totalSent: string | null;
58
+ transactions: Array<Transaction>;
59
+ txCount: number | null;
60
+ };
61
+
62
+ /**
63
+ * Analysis successful
64
+ */
65
+ export type AnalyzeCryptoAddressResponse = {
66
+ success: boolean;
67
+ data?: AnalyzeCryptoAddressData | undefined;
68
+ error?: string | undefined;
69
+ };
70
+
71
+ /** @internal */
72
+ export type AnalyzeCryptoAddressRequest$Outbound = {
73
+ address: string;
74
+ network?: string | undefined;
75
+ };
76
+
77
+ /** @internal */
78
+ export const AnalyzeCryptoAddressRequest$outboundSchema: z.ZodMiniType<
79
+ AnalyzeCryptoAddressRequest$Outbound,
80
+ AnalyzeCryptoAddressRequest
81
+ > = z.object({
82
+ address: z.string(),
83
+ network: z.optional(z.string()),
84
+ });
85
+
86
+ export function analyzeCryptoAddressRequestToJSON(
87
+ analyzeCryptoAddressRequest: AnalyzeCryptoAddressRequest,
88
+ ): string {
89
+ return JSON.stringify(
90
+ AnalyzeCryptoAddressRequest$outboundSchema.parse(
91
+ analyzeCryptoAddressRequest,
92
+ ),
93
+ );
94
+ }
95
+
96
+ /** @internal */
97
+ export const Token$inboundSchema: z.ZodMiniType<Token, unknown> = z.object({
98
+ amount: types.string(),
99
+ contract: types.nullable(types.string()),
100
+ icon: types.nullable(types.string()),
101
+ name: types.nullable(types.string()),
102
+ symbol: types.nullable(types.string()),
103
+ valueUsd: types.nullable(types.number()),
104
+ });
105
+
106
+ export function tokenFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<Token, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => Token$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'Token' from JSON`,
113
+ );
114
+ }
115
+
116
+ /** @internal */
117
+ export const Direction$inboundSchema: z.ZodMiniType<Direction, unknown> =
118
+ openEnums.inboundSchema(Direction);
119
+
120
+ /** @internal */
121
+ export const Transaction$inboundSchema: z.ZodMiniType<Transaction, unknown> = z
122
+ .object({
123
+ amount: types.nullable(types.string()),
124
+ coin: types.string(),
125
+ counterparty: types.nullable(types.string()),
126
+ direction: types.nullable(Direction$inboundSchema),
127
+ fee: types.nullable(types.string()),
128
+ hash: types.string(),
129
+ status: types.nullable(types.string()),
130
+ timestamp: types.nullable(types.string()),
131
+ url: types.nullable(types.string()),
132
+ });
133
+
134
+ export function transactionFromJSON(
135
+ jsonString: string,
136
+ ): SafeParseResult<Transaction, SDKValidationError> {
137
+ return safeParse(
138
+ jsonString,
139
+ (x) => Transaction$inboundSchema.parse(JSON.parse(x)),
140
+ `Failed to parse 'Transaction' from JSON`,
141
+ );
142
+ }
143
+
144
+ /** @internal */
145
+ export const AnalyzeCryptoAddressData$inboundSchema: z.ZodMiniType<
146
+ AnalyzeCryptoAddressData,
147
+ unknown
148
+ > = z.object({
149
+ address: types.string(),
150
+ balance: types.string(),
151
+ balanceUsd: types.nullable(types.number()),
152
+ coin: types.string(),
153
+ explorerUrl: types.string(),
154
+ label: types.nullable(types.string()),
155
+ network: types.string(),
156
+ priceUsd: types.nullable(types.number()),
157
+ tokens: z.array(z.lazy(() => Token$inboundSchema)),
158
+ totalReceived: types.nullable(types.string()),
159
+ totalSent: types.nullable(types.string()),
160
+ transactions: z.array(z.lazy(() => Transaction$inboundSchema)),
161
+ txCount: types.nullable(types.number()),
162
+ });
163
+
164
+ export function analyzeCryptoAddressDataFromJSON(
165
+ jsonString: string,
166
+ ): SafeParseResult<AnalyzeCryptoAddressData, SDKValidationError> {
167
+ return safeParse(
168
+ jsonString,
169
+ (x) => AnalyzeCryptoAddressData$inboundSchema.parse(JSON.parse(x)),
170
+ `Failed to parse 'AnalyzeCryptoAddressData' from JSON`,
171
+ );
172
+ }
173
+
174
+ /** @internal */
175
+ export const AnalyzeCryptoAddressResponse$inboundSchema: z.ZodMiniType<
176
+ AnalyzeCryptoAddressResponse,
177
+ unknown
178
+ > = z.object({
179
+ success: types.boolean(),
180
+ data: types.optional(z.lazy(() => AnalyzeCryptoAddressData$inboundSchema)),
181
+ error: types.optional(types.string()),
182
+ });
183
+
184
+ export function analyzeCryptoAddressResponseFromJSON(
185
+ jsonString: string,
186
+ ): SafeParseResult<AnalyzeCryptoAddressResponse, SDKValidationError> {
187
+ return safeParse(
188
+ jsonString,
189
+ (x) => AnalyzeCryptoAddressResponse$inboundSchema.parse(JSON.parse(x)),
190
+ `Failed to parse 'AnalyzeCryptoAddressResponse' from JSON`,
191
+ );
192
+ }
@@ -28,10 +28,12 @@ export type GetActivityResultUnion =
28
28
 
29
29
  export const GetActivityType = {
30
30
  Address: "address",
31
+ Appstore: "appstore",
31
32
  Breachvip: "breachvip",
32
33
  Certificates: "certificates",
33
34
  Cloudsint: "cloudsint",
34
35
  Courtrecords: "courtrecords",
36
+ Crypto: "crypto",
35
37
  Discord: "discord",
36
38
  Dnsdumpster: "dnsdumpster",
37
39
  Doogle: "doogle",
@@ -49,6 +51,7 @@ export const GetActivityType = {
49
51
  Ipinfo: "ipinfo",
50
52
  Leakcheck: "leakcheck",
51
53
  Leakosint: "leakosint",
54
+ Linkedin: "linkedin",
52
55
  Melissa: "melissa",
53
56
  Minecraft: "minecraft",
54
57
  Osintindustries: "osintindustries",
@@ -41,10 +41,12 @@ export type Key = {
41
41
 
42
42
  export const RestrictedFeatures = {
43
43
  Address: "address",
44
+ Appstore: "appstore",
44
45
  Breachvip: "breachvip",
45
46
  Certificates: "certificates",
46
47
  Cloudsint: "cloudsint",
47
48
  Courtrecords: "courtrecords",
49
+ Crypto: "crypto",
48
50
  Discord: "discord",
49
51
  Dnsdumpster: "dnsdumpster",
50
52
  Doogle: "doogle",
@@ -62,6 +64,7 @@ export const RestrictedFeatures = {
62
64
  Ipinfo: "ipinfo",
63
65
  Leakcheck: "leakcheck",
64
66
  Leakosint: "leakosint",
67
+ Linkedin: "linkedin",
65
68
  Melissa: "melissa",
66
69
  Minecraft: "minecraft",
67
70
  Osintindustries: "osintindustries",
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./analyze-crypto-address.js";
5
6
  export * from "./bypass-double-counter.js";
6
7
  export * from "./delete-activity.js";
7
8
  export * from "./download-intelx-file.js";
@@ -19,6 +20,7 @@ export * from "./list-organizations.js";
19
20
  export * from "./lookup-discord-alt.js";
20
21
  export * from "./scan-ports.js";
21
22
  export * from "./search-address.js";
23
+ export * from "./search-app-store.js";
22
24
  export * from "./search-certificates.js";
23
25
  export * from "./search-discord.js";
24
26
  export * from "./search-dns.js";
@@ -26,10 +26,12 @@ export type ListActivitiesResultUnion =
26
26
 
27
27
  export const ListActivitiesType = {
28
28
  Address: "address",
29
+ Appstore: "appstore",
29
30
  Breachvip: "breachvip",
30
31
  Certificates: "certificates",
31
32
  Cloudsint: "cloudsint",
32
33
  Courtrecords: "courtrecords",
34
+ Crypto: "crypto",
33
35
  Discord: "discord",
34
36
  Dnsdumpster: "dnsdumpster",
35
37
  Doogle: "doogle",
@@ -47,6 +49,7 @@ export const ListActivitiesType = {
47
49
  Ipinfo: "ipinfo",
48
50
  Leakcheck: "leakcheck",
49
51
  Leakosint: "leakosint",
52
+ Linkedin: "linkedin",
50
53
  Melissa: "melissa",
51
54
  Minecraft: "minecraft",
52
55
  Osintindustries: "osintindustries",
@@ -0,0 +1,199 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import * as openEnums from "../../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as types from "../../types/primitives.js";
11
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
12
+
13
+ export const StoreRequest = {
14
+ Apple: "apple",
15
+ Google: "google",
16
+ } as const;
17
+ export type StoreRequest = ClosedEnum<typeof StoreRequest>;
18
+
19
+ export type SearchAppStoreRequest = {
20
+ query: string;
21
+ store?: StoreRequest | undefined;
22
+ };
23
+
24
+ export const AppStore = {
25
+ Apple: "apple",
26
+ Google: "google",
27
+ } as const;
28
+ export type AppStore = OpenEnum<typeof AppStore>;
29
+
30
+ export type App = {
31
+ appId: string;
32
+ contentRating: string | null;
33
+ currency: string | null;
34
+ description: string | null;
35
+ developer: string | null;
36
+ developerAddress: string | null;
37
+ developerEmail: string | null;
38
+ developerId: string | null;
39
+ developerWebsite: string | null;
40
+ free: boolean | null;
41
+ genre: string | null;
42
+ headerImage: string | null;
43
+ icon: string | null;
44
+ installs: string | null;
45
+ price: number | null;
46
+ priceText: string | null;
47
+ privacyPolicy: string | null;
48
+ ratings: number | null;
49
+ released: string | null;
50
+ score: number | null;
51
+ screenshots: Array<string> | null;
52
+ store: AppStore;
53
+ summary: string | null;
54
+ title: string | null;
55
+ updated: string | null;
56
+ url: string | null;
57
+ version: string | null;
58
+ video: string | null;
59
+ };
60
+
61
+ export const StoreResponse = {
62
+ Apple: "apple",
63
+ Google: "google",
64
+ } as const;
65
+ export type StoreResponse = OpenEnum<typeof StoreResponse>;
66
+
67
+ export type SearchAppStoreData = {
68
+ apps: Array<App>;
69
+ query: string;
70
+ store: StoreResponse;
71
+ };
72
+
73
+ /**
74
+ * Search successful
75
+ */
76
+ export type SearchAppStoreResponse = {
77
+ success: boolean;
78
+ data?: SearchAppStoreData | undefined;
79
+ error?: string | undefined;
80
+ };
81
+
82
+ /** @internal */
83
+ export const StoreRequest$outboundSchema: z.ZodMiniEnum<typeof StoreRequest> = z
84
+ .enum(StoreRequest);
85
+
86
+ /** @internal */
87
+ export type SearchAppStoreRequest$Outbound = {
88
+ query: string;
89
+ store?: string | undefined;
90
+ };
91
+
92
+ /** @internal */
93
+ export const SearchAppStoreRequest$outboundSchema: z.ZodMiniType<
94
+ SearchAppStoreRequest$Outbound,
95
+ SearchAppStoreRequest
96
+ > = z.object({
97
+ query: z.string(),
98
+ store: z.optional(StoreRequest$outboundSchema),
99
+ });
100
+
101
+ export function searchAppStoreRequestToJSON(
102
+ searchAppStoreRequest: SearchAppStoreRequest,
103
+ ): string {
104
+ return JSON.stringify(
105
+ SearchAppStoreRequest$outboundSchema.parse(searchAppStoreRequest),
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const AppStore$inboundSchema: z.ZodMiniType<AppStore, unknown> =
111
+ openEnums.inboundSchema(AppStore);
112
+
113
+ /** @internal */
114
+ export const App$inboundSchema: z.ZodMiniType<App, unknown> = z.object({
115
+ appId: types.string(),
116
+ contentRating: types.nullable(types.string()),
117
+ currency: types.nullable(types.string()),
118
+ description: types.nullable(types.string()),
119
+ developer: types.nullable(types.string()),
120
+ developerAddress: types.nullable(types.string()),
121
+ developerEmail: types.nullable(types.string()),
122
+ developerId: types.nullable(types.string()),
123
+ developerWebsite: types.nullable(types.string()),
124
+ free: types.nullable(types.boolean()),
125
+ genre: types.nullable(types.string()),
126
+ headerImage: types.nullable(types.string()),
127
+ icon: types.nullable(types.string()),
128
+ installs: types.nullable(types.string()),
129
+ price: types.nullable(types.number()),
130
+ priceText: types.nullable(types.string()),
131
+ privacyPolicy: types.nullable(types.string()),
132
+ ratings: types.nullable(types.number()),
133
+ released: types.nullable(types.string()),
134
+ score: types.nullable(types.number()),
135
+ screenshots: types.nullable(z.array(types.string())),
136
+ store: AppStore$inboundSchema,
137
+ summary: types.nullable(types.string()),
138
+ title: types.nullable(types.string()),
139
+ updated: types.nullable(types.string()),
140
+ url: types.nullable(types.string()),
141
+ version: types.nullable(types.string()),
142
+ video: types.nullable(types.string()),
143
+ });
144
+
145
+ export function appFromJSON(
146
+ jsonString: string,
147
+ ): SafeParseResult<App, SDKValidationError> {
148
+ return safeParse(
149
+ jsonString,
150
+ (x) => App$inboundSchema.parse(JSON.parse(x)),
151
+ `Failed to parse 'App' from JSON`,
152
+ );
153
+ }
154
+
155
+ /** @internal */
156
+ export const StoreResponse$inboundSchema: z.ZodMiniType<
157
+ StoreResponse,
158
+ unknown
159
+ > = openEnums.inboundSchema(StoreResponse);
160
+
161
+ /** @internal */
162
+ export const SearchAppStoreData$inboundSchema: z.ZodMiniType<
163
+ SearchAppStoreData,
164
+ unknown
165
+ > = z.object({
166
+ apps: z.array(z.lazy(() => App$inboundSchema)),
167
+ query: types.string(),
168
+ store: StoreResponse$inboundSchema,
169
+ });
170
+
171
+ export function searchAppStoreDataFromJSON(
172
+ jsonString: string,
173
+ ): SafeParseResult<SearchAppStoreData, SDKValidationError> {
174
+ return safeParse(
175
+ jsonString,
176
+ (x) => SearchAppStoreData$inboundSchema.parse(JSON.parse(x)),
177
+ `Failed to parse 'SearchAppStoreData' from JSON`,
178
+ );
179
+ }
180
+
181
+ /** @internal */
182
+ export const SearchAppStoreResponse$inboundSchema: z.ZodMiniType<
183
+ SearchAppStoreResponse,
184
+ unknown
185
+ > = z.object({
186
+ success: types.boolean(),
187
+ data: types.optional(z.lazy(() => SearchAppStoreData$inboundSchema)),
188
+ error: types.optional(types.string()),
189
+ });
190
+
191
+ export function searchAppStoreResponseFromJSON(
192
+ jsonString: string,
193
+ ): SafeParseResult<SearchAppStoreResponse, SDKValidationError> {
194
+ return safeParse(
195
+ jsonString,
196
+ (x) => SearchAppStoreResponse$inboundSchema.parse(JSON.parse(x)),
197
+ `Failed to parse 'SearchAppStoreResponse' from JSON`,
198
+ );
199
+ }