@frogbotai/piece-brave-search 0.31.0 → 0.33.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/dist/actions/customApiCall.d.ts +3 -34
- package/dist/actions/customApiCall.d.ts.map +1 -1
- package/dist/actions/customApiCall.js +11 -67
- package/dist/actions/customApiCall.js.map +1 -1
- package/dist/actions/searchWeb.d.ts +1 -0
- package/dist/actions/searchWeb.d.ts.map +1 -1
- package/dist/client.d.ts +1 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +21 -34
- package/dist/client.js.map +1 -1
- package/dist/define.d.ts +9 -1
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +1 -1
- package/dist/define.js.map +1 -1
- package/dist/index.d.ts +4 -33
- package/dist/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const customApiCall: import("frogbot/pieces").PieceActionDefinition<z.ZodObject<{
|
|
3
|
-
method: z.ZodEnum<{
|
|
4
|
-
GET: "GET";
|
|
5
|
-
POST: "POST";
|
|
6
|
-
PUT: "PUT";
|
|
7
|
-
PATCH: "PATCH";
|
|
8
|
-
DELETE: "DELETE";
|
|
9
|
-
}>;
|
|
10
|
-
path: z.ZodString;
|
|
11
|
-
headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
|
-
queryParams: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
|
|
13
|
-
bodyType: z.ZodDefault<z.ZodEnum<{
|
|
14
|
-
none: "none";
|
|
15
|
-
json: "json";
|
|
16
|
-
raw: "raw";
|
|
17
|
-
}>>;
|
|
18
|
-
body: z.ZodOptional<z.ZodUnknown>;
|
|
19
|
-
responseIsBinary: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
-
failsafe: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
followRedirects: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
-
status: z.ZodNumber;
|
|
25
|
-
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
26
|
-
body: z.ZodUnknown;
|
|
27
|
-
}, z.core.$strip>, Record<string, never>, {
|
|
1
|
+
export declare const customApiCall: import("frogbot/pieces").CustomApiCallAction<Record<string, never>, {
|
|
28
2
|
request(request: import("../client.js").BraveSearchRequest): Promise<import("../client.js").BraveSearchResponse>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
headers: Record<string, string>;
|
|
32
|
-
body: unknown;
|
|
33
|
-
}> & {
|
|
34
|
-
slug: "customApiCall";
|
|
35
|
-
};
|
|
3
|
+
authorize(headers: Headers): void;
|
|
4
|
+
}>;
|
|
36
5
|
//# sourceMappingURL=customApiCall.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customApiCall.d.ts","sourceRoot":"","sources":["../../src/actions/customApiCall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"customApiCall.d.ts","sourceRoot":"","sources":["../../src/actions/customApiCall.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;EAMxB,CAAC"}
|
|
@@ -1,70 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
]
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'PUT',
|
|
13
|
-
'PATCH',
|
|
14
|
-
'DELETE'
|
|
15
|
-
]),
|
|
16
|
-
path: z.string().startsWith('/'),
|
|
17
|
-
headers: z.record(z.string(), z.string()).default({}),
|
|
18
|
-
queryParams: z.record(z.string(), z.union([
|
|
19
|
-
scalar,
|
|
20
|
-
z.array(scalar)
|
|
21
|
-
])).default({}),
|
|
22
|
-
bodyType: z.enum([
|
|
23
|
-
'none',
|
|
24
|
-
'json',
|
|
25
|
-
'raw'
|
|
26
|
-
]).default('none'),
|
|
27
|
-
body: z.unknown().optional(),
|
|
28
|
-
responseIsBinary: z.boolean().default(false),
|
|
29
|
-
failsafe: z.boolean().default(false),
|
|
30
|
-
timeout: z.number().positive().optional(),
|
|
31
|
-
followRedirects: z.boolean().default(false)
|
|
32
|
-
});
|
|
33
|
-
const output = z.object({
|
|
34
|
-
status: z.number().int(),
|
|
35
|
-
headers: z.record(z.string(), z.string()),
|
|
36
|
-
body: z.unknown()
|
|
37
|
-
});
|
|
38
|
-
export const customApiCall = defineAction({
|
|
39
|
-
slug: 'customApiCall',
|
|
40
|
-
description: 'Make an authenticated request to the Brave Search API.',
|
|
41
|
-
input,
|
|
42
|
-
output,
|
|
43
|
-
idempotent: false,
|
|
44
|
-
async run ({ client, input: values, req }) {
|
|
45
|
-
const headers = {
|
|
46
|
-
...values.headers
|
|
47
|
-
};
|
|
48
|
-
let body;
|
|
49
|
-
if (values.bodyType === 'json') {
|
|
50
|
-
headers['Content-Type'] = headers['Content-Type'] ?? 'application/json';
|
|
51
|
-
body = JSON.stringify(values.body);
|
|
52
|
-
} else if (values.bodyType === 'raw' && values.body !== undefined) {
|
|
53
|
-
body = String(values.body);
|
|
54
|
-
}
|
|
55
|
-
return client.request({
|
|
56
|
-
method: values.method,
|
|
57
|
-
path: values.path,
|
|
58
|
-
headers,
|
|
59
|
-
query: values.queryParams,
|
|
60
|
-
body,
|
|
61
|
-
responseIsBinary: values.responseIsBinary,
|
|
62
|
-
failsafe: values.failsafe,
|
|
63
|
-
timeout: values.timeout,
|
|
64
|
-
followRedirects: values.followRedirects,
|
|
65
|
-
signal: req.signal ?? undefined
|
|
66
|
-
});
|
|
67
|
-
}
|
|
1
|
+
import { defineCustomApiCall } from '../define.js';
|
|
2
|
+
export const customApiCall = defineCustomApiCall({
|
|
3
|
+
name: 'Brave Search',
|
|
4
|
+
baseUrl: 'https://api.search.brave.com/res/v1',
|
|
5
|
+
reservedHeaders: [
|
|
6
|
+
'X-Subscription-Token'
|
|
7
|
+
],
|
|
8
|
+
headers: {
|
|
9
|
+
Accept: 'application/json'
|
|
10
|
+
},
|
|
11
|
+
authorize: ({ client, headers })=>client.authorize(headers)
|
|
68
12
|
});
|
|
69
13
|
|
|
70
14
|
//# sourceMappingURL=customApiCall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/customApiCall.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../src/actions/customApiCall.ts"],"names":["defineCustomApiCall","customApiCall","name","baseUrl","reservedHeaders","headers","Accept","authorize","client"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,eAAe;AAEnD,OAAO,MAAMC,gBAAgBD,oBAAoB;IAC/CE,MAAM;IACNC,SAAS;IACTC,iBAAiB;QAAC;KAAuB;IACzCC,SAAS;QAAEC,QAAQ;IAAmB;IACtCC,WAAW,CAAC,EAAEC,MAAM,EAAEH,OAAO,EAAE,GAAKG,OAAOD,SAAS,CAACF;AACvD,GAAG","file":"customApiCall.js"}
|
|
@@ -16,6 +16,7 @@ export declare const searchWeb: import("frogbot/pieces").PieceActionDefinition<z
|
|
|
16
16
|
}, z.core.$loose>>;
|
|
17
17
|
}, z.core.$loose>, Record<string, never>, {
|
|
18
18
|
request(request: import("../client.js").BraveSearchRequest): Promise<import("../client.js").BraveSearchResponse>;
|
|
19
|
+
authorize(headers: Headers): void;
|
|
19
20
|
}, {
|
|
20
21
|
[x: string]: unknown;
|
|
21
22
|
type?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchWeb.d.ts","sourceRoot":"","sources":["../../src/actions/searchWeb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+BxB,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"searchWeb.d.ts","sourceRoot":"","sources":["../../src/actions/searchWeb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+BxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAepB,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
type QueryValue = string | number | boolean | readonly (string | number | boolean)[];
|
|
2
2
|
export type BraveSearchRequest = {
|
|
3
|
-
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
4
3
|
path: string;
|
|
5
4
|
query?: Record<string, QueryValue | undefined>;
|
|
6
|
-
headers?: Record<string, string>;
|
|
7
|
-
body?: BodyInit;
|
|
8
|
-
timeout?: number;
|
|
9
|
-
followRedirects?: boolean;
|
|
10
|
-
responseIsBinary?: boolean;
|
|
11
|
-
failsafe?: boolean;
|
|
12
5
|
signal?: AbortSignal;
|
|
13
6
|
};
|
|
14
7
|
export type BraveSearchResponse = {
|
|
@@ -21,6 +14,7 @@ export declare function createBraveSearchClient({ auth }: {
|
|
|
21
14
|
auth: unknown;
|
|
22
15
|
}): {
|
|
23
16
|
request(request: BraveSearchRequest): Promise<BraveSearchResponse>;
|
|
17
|
+
authorize(headers: Headers): void;
|
|
24
18
|
};
|
|
25
19
|
export {};
|
|
26
20
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;AAErF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;AAErF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAErE,wBAAgB,uBAAuB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE;qBAIxC,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;uBA2CrD,OAAO;EAI7B"}
|
package/dist/client.js
CHANGED
|
@@ -19,42 +19,29 @@ export function createBraveSearchClient({ auth }) {
|
|
|
19
19
|
if (item !== undefined) url.searchParams.append(key, String(item));
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const response = await fetch(url, {
|
|
23
|
+
method: 'GET',
|
|
24
|
+
headers: {
|
|
25
|
+
Accept: 'application/json',
|
|
26
|
+
'X-Subscription-Token': apiKey
|
|
27
|
+
},
|
|
28
|
+
redirect: 'manual',
|
|
29
|
+
signal: request.signal
|
|
26
30
|
});
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
headers: (()=>{
|
|
33
|
-
const headers = new Headers(request.headers);
|
|
34
|
-
if (!headers.has('Accept')) headers.set('Accept', 'application/json');
|
|
35
|
-
headers.set('X-Subscription-Token', apiKey);
|
|
36
|
-
return headers;
|
|
37
|
-
})(),
|
|
38
|
-
body: request.body,
|
|
39
|
-
redirect: 'manual',
|
|
40
|
-
signal: controller.signal
|
|
41
|
-
});
|
|
42
|
-
const contentType = response.headers.get('content-type') ?? '';
|
|
43
|
-
const body = request.responseIsBinary ? new Uint8Array(await response.arrayBuffer()) : contentType.includes('application/json') ? await response.json() : await response.text();
|
|
44
|
-
const result = {
|
|
45
|
-
status: response.status,
|
|
46
|
-
headers: Object.fromEntries(response.headers.entries()),
|
|
47
|
-
body
|
|
48
|
-
};
|
|
49
|
-
if (!response.ok && !request.failsafe) {
|
|
50
|
-
const detail = typeof body === 'string' ? body : JSON.stringify(body);
|
|
51
|
-
throw new Error(`[frogbot] Brave Search request failed (${response.status}): ${detail}`);
|
|
52
|
-
}
|
|
53
|
-
return result;
|
|
54
|
-
} finally{
|
|
55
|
-
if (timeout) clearTimeout(timeout);
|
|
56
|
-
request.signal?.removeEventListener('abort', abort);
|
|
31
|
+
const contentType = response.headers.get('content-type') ?? '';
|
|
32
|
+
const body = contentType.includes('application/json') ? await response.json() : await response.text();
|
|
33
|
+
if (!response.ok) {
|
|
34
|
+
const detail = typeof body === 'string' ? body : JSON.stringify(body);
|
|
35
|
+
throw new Error(`[frogbot] Brave Search request failed (${response.status}): ${detail}`);
|
|
57
36
|
}
|
|
37
|
+
return {
|
|
38
|
+
status: response.status,
|
|
39
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
40
|
+
body
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
authorize (headers) {
|
|
44
|
+
headers.set('X-Subscription-Token', apiKey);
|
|
58
45
|
}
|
|
59
46
|
};
|
|
60
47
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"names":["braveSearchAuth","baseUrl","createBraveSearchClient","auth","apiKey","parse","request","path","startsWith","split","includes","Error","url","URL","origin","Object","entries","query","forEach","key","value","values","Array","isArray","item","undefined","searchParams","append","String","
|
|
1
|
+
{"version":3,"sources":["../src/client.ts"],"names":["braveSearchAuth","baseUrl","createBraveSearchClient","auth","apiKey","parse","request","path","startsWith","split","includes","Error","url","URL","origin","Object","entries","query","forEach","key","value","values","Array","isArray","item","undefined","searchParams","append","String","response","fetch","method","headers","Accept","redirect","signal","contentType","get","body","json","text","ok","detail","JSON","stringify","status","fromEntries","authorize","set"],"mappings":"AAAA,SAASA,eAAe,QAAQ,cAAc;AAE9C,MAAMC,UAAU;AAkBhB,OAAO,SAASC,wBAAwB,EAAEC,IAAI,EAAqB;IACjE,MAAM,EAAEC,MAAM,EAAE,GAAGJ,gBAAgBK,KAAK,CAACF;IAEzC,OAAO;QACL,MAAMG,SAAQA,OAA2B;YACvC,IAAI,CAACA,QAAQC,IAAI,CAACC,UAAU,CAAC,QAAQF,QAAQC,IAAI,CAACE,KAAK,CAAC,KAAKC,QAAQ,CAAC,OAAO;gBAC3E,MAAM,IAAIC,MAAM;YAClB;YAEA,MAAMC,MAAM,IAAIC,IAAI,GAAGZ,UAAUK,QAAQC,IAAI,EAAE;YAE/C,IAAIK,IAAIE,MAAM,KAAK,IAAID,IAAIZ,SAASa,MAAM,EAAE;gBAC1C,MAAM,IAAIH,MAAM;YAClB;YAEAI,OAAOC,OAAO,CAACV,QAAQW,KAAK,IAAI,CAAC,GAAGC,OAAO,CAAC,CAAC,CAACC,KAAKC,MAAM;gBACvD,MAAMC,SAASC,MAAMC,OAAO,CAACH,SAASA,QAAQ;oBAACA;iBAAM;gBAErDC,OAAOH,OAAO,CAAC,CAACM;oBACd,IAAIA,SAASC,WAAWb,IAAIc,YAAY,CAACC,MAAM,CAACR,KAAKS,OAAOJ;gBAC9D;YACF;YAEA,MAAMK,WAAW,MAAMC,MAAMlB,KAAK;gBAChCmB,QAAQ;gBACRC,SAAS;oBAAEC,QAAQ;oBAAoB,wBAAwB7B;gBAAO;gBACtE8B,UAAU;gBACVC,QAAQ7B,QAAQ6B,MAAM;YACxB;YAEA,MAAMC,cAAcP,SAASG,OAAO,CAACK,GAAG,CAAC,mBAAmB;YAC5D,MAAMC,OAAgBF,YAAY1B,QAAQ,CAAC,sBACvC,MAAMmB,SAASU,IAAI,KACnB,MAAMV,SAASW,IAAI;YAEvB,IAAI,CAACX,SAASY,EAAE,EAAE;gBAChB,MAAMC,SAAS,OAAOJ,SAAS,WAAWA,OAAOK,KAAKC,SAAS,CAACN;gBAEhE,MAAM,IAAI3B,MAAM,CAAC,uCAAuC,EAAEkB,SAASgB,MAAM,CAAC,GAAG,EAAEH,QAAQ;YACzF;YAEA,OAAO;gBACLG,QAAQhB,SAASgB,MAAM;gBACvBb,SAASjB,OAAO+B,WAAW,CAACjB,SAASG,OAAO,CAAChB,OAAO;gBACpDsB;YACF;QACF;QACAS,WAAUf,OAAgB;YACxBA,QAAQgB,GAAG,CAAC,wBAAwB5C;QACtC;IACF;AACF","file":"client.js"}
|
package/dist/define.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export declare const defineAction: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined, TResult = unknown>(action: TOutput extends unknown ? import("frogbot/pieces").PieceActionDefinition<TInput, TOutput, Record<string, never>, {
|
|
2
2
|
request(request: import("./client.js").BraveSearchRequest): Promise<import("./client.js").BraveSearchResponse>;
|
|
3
|
+
authorize(headers: Headers): void;
|
|
3
4
|
}, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
4
5
|
slug: TSlug;
|
|
5
6
|
} : never) => import("frogbot/pieces").PieceActionDefinition<TInput, TOutput, Record<string, never>, {
|
|
6
7
|
request(request: import("./client.js").BraveSearchRequest): Promise<import("./client.js").BraveSearchResponse>;
|
|
8
|
+
authorize(headers: Headers): void;
|
|
7
9
|
}, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
8
10
|
slug: TSlug;
|
|
9
|
-
}
|
|
11
|
+
}, defineCustomApiCall: (config: import("frogbot/pieces").CustomApiCallConfig<{
|
|
12
|
+
request(request: import("./client.js").BraveSearchRequest): Promise<import("./client.js").BraveSearchResponse>;
|
|
13
|
+
authorize(headers: Headers): void;
|
|
14
|
+
}>) => import("frogbot/pieces").CustomApiCallAction<Record<string, never>, {
|
|
15
|
+
request(request: import("./client.js").BraveSearchRequest): Promise<import("./client.js").BraveSearchResponse>;
|
|
16
|
+
authorize(headers: Headers): void;
|
|
17
|
+
}>;
|
|
10
18
|
//# sourceMappingURL=define.d.ts.map
|
package/dist/define.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAIA,eAAO,MAAQ,YAAY
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAIA,eAAO,MAAQ,YAAY;;;;;;;;;;GAAE,mBAAmB;;;;;;EAAsC,CAAC"}
|
package/dist/define.js
CHANGED
package/dist/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/define.ts"],"names":["createPieceHelpers","defineAction"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAIpD,OAAO,MAAM,EAAEC,YAAY,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/define.ts"],"names":["createPieceHelpers","defineAction","defineCustomApiCall"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAIpD,OAAO,MAAM,EAAEC,YAAY,EAAEC,mBAAmB,EAAE,GAAGF,qBAAkC","file":"define.js"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const createBraveSearch: import("frogbot/pieces").PieceFactory<{
|
|
|
29
29
|
}, import("zod/v4/core").$loose>>;
|
|
30
30
|
}, import("zod/v4/core").$loose>, Record<string, never>, {
|
|
31
31
|
request(request: import("./client.js").BraveSearchRequest): Promise<import("./client.js").BraveSearchResponse>;
|
|
32
|
+
authorize(headers: Headers): void;
|
|
32
33
|
}, {
|
|
33
34
|
[x: string]: unknown;
|
|
34
35
|
type?: string | undefined;
|
|
@@ -47,39 +48,9 @@ export declare const createBraveSearch: import("frogbot/pieces").PieceFactory<{
|
|
|
47
48
|
} | undefined;
|
|
48
49
|
}> & {
|
|
49
50
|
slug: "searchWeb";
|
|
50
|
-
}, import("frogbot/pieces").
|
|
51
|
-
method: import("zod").ZodEnum<{
|
|
52
|
-
GET: "GET";
|
|
53
|
-
POST: "POST";
|
|
54
|
-
PUT: "PUT";
|
|
55
|
-
PATCH: "PATCH";
|
|
56
|
-
DELETE: "DELETE";
|
|
57
|
-
}>;
|
|
58
|
-
path: import("zod").ZodString;
|
|
59
|
-
headers: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
60
|
-
queryParams: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>, import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>]>>>;
|
|
61
|
-
bodyType: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
62
|
-
none: "none";
|
|
63
|
-
json: "json";
|
|
64
|
-
raw: "raw";
|
|
65
|
-
}>>;
|
|
66
|
-
body: import("zod").ZodOptional<import("zod").ZodUnknown>;
|
|
67
|
-
responseIsBinary: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
68
|
-
failsafe: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
69
|
-
timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
70
|
-
followRedirects: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
71
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
72
|
-
status: import("zod").ZodNumber;
|
|
73
|
-
headers: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
74
|
-
body: import("zod").ZodUnknown;
|
|
75
|
-
}, import("zod/v4/core").$strip>, Record<string, never>, {
|
|
51
|
+
}, import("frogbot/pieces").CustomApiCallAction<Record<string, never>, {
|
|
76
52
|
request(request: import("./client.js").BraveSearchRequest): Promise<import("./client.js").BraveSearchResponse>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
headers: Record<string, string>;
|
|
80
|
-
body: unknown;
|
|
81
|
-
}> & {
|
|
82
|
-
slug: "customApiCall";
|
|
83
|
-
}];
|
|
53
|
+
authorize(headers: Headers): void;
|
|
54
|
+
}>];
|
|
84
55
|
}>;
|
|
85
56
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGtD,eAAO,MAAM,kBAAkB,yCAA0C,CAAC;AAC1E,eAAO,MAAM,iBAAiB,aAAc,CAAC;AAE7C,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGtD,eAAO,MAAM,kBAAkB,yCAA0C,CAAC;AAC1E,eAAO,MAAM,iBAAiB,aAAc,CAAC;AAE7C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/piece-brave-search",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "brave-search tools for FrogBot.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colby Gilbert",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"zod": "^4.3.6"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"frogbot": "0.
|
|
25
|
+
"frogbot": "0.33.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "5.6.2",
|
|
29
|
-
"frogbot": "0.
|
|
29
|
+
"frogbot": "0.33.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|