@mcp-z/mcp-drive 1.0.1 → 1.0.2
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/cjs/schemas/drive-query-schema.d.cts +1 -2
- package/dist/cjs/schemas/drive-query-schema.d.ts +1 -2
- package/dist/cjs/schemas/drive-query-schema.js +12 -7
- package/dist/cjs/schemas/drive-query-schema.js.map +1 -1
- package/dist/cjs/setup/index.d.cts +1 -0
- package/dist/cjs/setup/index.d.ts +1 -0
- package/dist/cjs/setup/index.js.map +1 -1
- package/dist/esm/schemas/drive-query-schema.d.ts +1 -2
- package/dist/esm/schemas/drive-query-schema.js +1 -1
- package/dist/esm/schemas/drive-query-schema.js.map +1 -1
- package/dist/esm/setup/index.d.ts +1 -0
- package/dist/esm/setup/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
* Field operator schema for Drive query fields that support multiple values
|
|
4
4
|
* Supports OR ($any), AND ($all), and NOT ($none) operations
|
|
5
5
|
*/
|
|
6
|
-
declare const FieldOperatorSchema: z.ZodObject<{
|
|
6
|
+
export declare const FieldOperatorSchema: z.ZodObject<{
|
|
7
7
|
$any: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
8
|
$all: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
9
|
$none: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -37,4 +37,3 @@ export type DriveQueryObject = {
|
|
|
37
37
|
*/
|
|
38
38
|
export declare const DriveQuerySchema: z.ZodUnion<readonly [z.ZodString, z.ZodType<DriveQueryObject, unknown, z.core.$ZodTypeInternals<DriveQueryObject, unknown>>]>;
|
|
39
39
|
export type DriveQuery = string | DriveQueryObject;
|
|
40
|
-
export {};
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
* Field operator schema for Drive query fields that support multiple values
|
|
4
4
|
* Supports OR ($any), AND ($all), and NOT ($none) operations
|
|
5
5
|
*/
|
|
6
|
-
declare const FieldOperatorSchema: z.ZodObject<{
|
|
6
|
+
export declare const FieldOperatorSchema: z.ZodObject<{
|
|
7
7
|
$any: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
8
|
$all: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
9
|
$none: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -37,4 +37,3 @@ export type DriveQueryObject = {
|
|
|
37
37
|
*/
|
|
38
38
|
export declare const DriveQuerySchema: z.ZodUnion<readonly [z.ZodString, z.ZodType<DriveQueryObject, unknown, z.core.$ZodTypeInternals<DriveQueryObject, unknown>>]>;
|
|
39
39
|
export type DriveQuery = string | DriveQueryObject;
|
|
40
|
-
export {};
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get DriveQuerySchema () {
|
|
8
13
|
return DriveQuerySchema;
|
|
14
|
+
},
|
|
15
|
+
get FieldOperatorSchema () {
|
|
16
|
+
return FieldOperatorSchema;
|
|
9
17
|
}
|
|
10
18
|
});
|
|
11
19
|
var _zod = require("zod");
|
|
12
|
-
|
|
13
|
-
* Field operator schema for Drive query fields that support multiple values
|
|
14
|
-
* Supports OR ($any), AND ($all), and NOT ($none) operations
|
|
15
|
-
*/ var FieldOperatorSchema = _zod.z.object({
|
|
20
|
+
var FieldOperatorSchema = _zod.z.object({
|
|
16
21
|
$any: _zod.z.array(_zod.z.string()).optional().describe('OR within field - matches if ANY value matches'),
|
|
17
22
|
$all: _zod.z.array(_zod.z.string()).optional().describe('AND within field - matches if ALL values match'),
|
|
18
23
|
$none: _zod.z.array(_zod.z.string()).optional().describe('NOT within field - matches if NONE match')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/schemas/drive-query-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Field operator schema for Drive query fields that support multiple values\n * Supports OR ($any), AND ($all), and NOT ($none) operations\n */\
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/schemas/drive-query-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Field operator schema for Drive query fields that support multiple values\n * Supports OR ($any), AND ($all), and NOT ($none) operations\n */\nexport const FieldOperatorSchema = z\n .object({\n $any: z.array(z.string()).optional().describe('OR within field - matches if ANY value matches'),\n $all: z.array(z.string()).optional().describe('AND within field - matches if ALL values match'),\n $none: z.array(z.string()).optional().describe('NOT within field - matches if NONE match'),\n })\n .strict();\n\nexport type FieldOperator = z.infer<typeof FieldOperatorSchema>;\n\n/**\n * Drive query object schema with recursive operators and Drive features.\n *\n * Includes Drive-specific features:\n * - name: Search by file/folder name (supports string or field operators)\n * - mimeType: Filter by MIME type (e.g., \"application/pdf\", \"application/vnd.google-apps.folder\")\n * - fullText: Search file content and metadata\n * - parentId: Search within specific folder (supports string or field operators)\n * - starred: Filter by starred status\n * - shared: Filter by shared status\n * - modifiedTime: Date range filtering with $gte and $lt\n * - owner: Filter by owner email (supports string or field operators)\n * - rawDriveQuery: Escape hatch for advanced Drive query syntax\n *\n * Logical operators:\n * - $and: Array of conditions that must ALL match (recursive)\n * - $or: Array of conditions where ANY must match (recursive)\n * - $not: Nested condition that must NOT match (recursive)\n *\n * Note: Cast through unknown to work around Zod's lazy schema type inference issue\n * with exactOptionalPropertyTypes. The runtime schema is correct; this cast ensures\n * TypeScript sees the strict DriveQueryObject type everywhere the schema is used.\n */\nconst DriveQueryObjectSchema = z.lazy(() =>\n z\n .object({\n // Logical operators for combining conditions (recursive)\n $and: z.array(DriveQueryObjectSchema).optional().describe('Array of conditions that must ALL match'),\n $or: z.array(DriveQueryObjectSchema).optional().describe('Array of conditions where ANY must match'),\n $not: DriveQueryObjectSchema.optional().describe('Nested condition that must NOT match'),\n\n // File/folder name search\n name: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Search by file or folder name (partial match, case-insensitive)'),\n\n // MIME type filtering\n mimeType: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Filter by MIME type (e.g., \"application/pdf\", \"application/vnd.google-apps.folder\", \"image/jpeg\")'),\n\n // Full-text search across content and metadata\n fullText: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Search file content and metadata (full-text search)'),\n\n // Parent folder filtering\n parentId: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Search within specific folder by folder ID (use \"root\" for My Drive root)'),\n\n // Boolean flags\n starred: z.boolean().optional().describe('Filter by starred status (true = starred, false = not starred)'),\n sharedWithMe: z.boolean().optional().describe('Filter by \"shared with me\" collection (true = in shared collection, false = not shared)'),\n trashed: z.boolean().optional().describe('Filter by trash status (true = in trash, false = not in trash). Note: Drive tools automatically filter out trashed files unless explicitly requested.'),\n\n // Date range filtering\n modifiedTime: z\n .object({\n $gte: z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z)?$/)\n .optional()\n .describe('Files modified on or after this date (ISO 8601: YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ)'),\n $lt: z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z)?$/)\n .optional()\n .describe('Files modified before this date (ISO 8601: YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ)'),\n })\n .optional()\n .describe('Filter by modification date range'),\n\n // Owner filtering\n owner: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Filter by owner email address (partial match)'),\n\n // Raw Drive query string - escape hatch for advanced syntax\n rawDriveQuery: z.string().min(1).optional().describe(\"Raw Google Drive query syntax for advanced use cases. Bypasses schema validation - use sparingly. Example: \\\"name contains 'budget' and mimeType = 'application/pdf'\\\"\"),\n })\n .strict()\n) as unknown as z.ZodType<DriveQueryObject>;\n\nexport type DriveQueryObject = {\n $and?: DriveQueryObject[];\n $or?: DriveQueryObject[];\n $not?: DriveQueryObject;\n name?: string | FieldOperator;\n mimeType?: string | FieldOperator;\n fullText?: string | FieldOperator;\n parentId?: string | FieldOperator;\n starred?: boolean;\n sharedWithMe?: boolean;\n trashed?: boolean;\n modifiedTime?: {\n $gte?: string;\n $lt?: string;\n };\n owner?: string | FieldOperator;\n rawDriveQuery?: string;\n};\n\n/**\n * Drive query schema that accepts either:\n * - A structured DriveQueryObject with typed fields\n * - A raw Drive query string for advanced use cases\n *\n * This provides type safety for common queries while allowing\n * direct Google Drive query syntax when needed.\n */\nexport const DriveQuerySchema = z.union([z.string().min(1), DriveQueryObjectSchema]);\n\nexport type DriveQuery = string | DriveQueryObject;\n"],"names":["DriveQuerySchema","FieldOperatorSchema","z","object","$any","array","string","optional","describe","$all","$none","strict","DriveQueryObjectSchema","lazy","$and","$or","$not","name","union","min","mimeType","fullText","parentId","starred","boolean","sharedWithMe","trashed","modifiedTime","$gte","regex","$lt","owner","rawDriveQuery"],"mappings":";;;;;;;;;;;QAoIaA;eAAAA;;QA9HAC;eAAAA;;;mBANK;AAMX,IAAMA,sBAAsBC,MAAC,CACjCC,MAAM,CAAC;IACNC,MAAMF,MAAC,CAACG,KAAK,CAACH,MAAC,CAACI,MAAM,IAAIC,QAAQ,GAAGC,QAAQ,CAAC;IAC9CC,MAAMP,MAAC,CAACG,KAAK,CAACH,MAAC,CAACI,MAAM,IAAIC,QAAQ,GAAGC,QAAQ,CAAC;IAC9CE,OAAOR,MAAC,CAACG,KAAK,CAACH,MAAC,CAACI,MAAM,IAAIC,QAAQ,GAAGC,QAAQ,CAAC;AACjD,GACCG,MAAM;AAIT;;;;;;;;;;;;;;;;;;;;;;CAsBC,GACD,IAAMC,yBAAyBV,MAAC,CAACW,IAAI,CAAC;WACpCX,MAAC,CACEC,MAAM,CAAC;QACN,yDAAyD;QACzDW,MAAMZ,MAAC,CAACG,KAAK,CAACO,wBAAwBL,QAAQ,GAAGC,QAAQ,CAAC;QAC1DO,KAAKb,MAAC,CAACG,KAAK,CAACO,wBAAwBL,QAAQ,GAAGC,QAAQ,CAAC;QACzDQ,MAAMJ,uBAAuBL,QAAQ,GAAGC,QAAQ,CAAC;QAEjD,0BAA0B;QAC1BS,MAAMf,MAAC,CACJgB,KAAK,CAAC;YAAChB,MAAC,CAACI,MAAM,GAAGa,GAAG,CAAC;YAAIlB;SAAoB,EAC9CM,QAAQ,GACRC,QAAQ,CAAC;QAEZ,sBAAsB;QACtBY,UAAUlB,MAAC,CACRgB,KAAK,CAAC;YAAChB,MAAC,CAACI,MAAM,GAAGa,GAAG,CAAC;YAAIlB;SAAoB,EAC9CM,QAAQ,GACRC,QAAQ,CAAC;QAEZ,+CAA+C;QAC/Ca,UAAUnB,MAAC,CACRgB,KAAK,CAAC;YAAChB,MAAC,CAACI,MAAM,GAAGa,GAAG,CAAC;YAAIlB;SAAoB,EAC9CM,QAAQ,GACRC,QAAQ,CAAC;QAEZ,0BAA0B;QAC1Bc,UAAUpB,MAAC,CACRgB,KAAK,CAAC;YAAChB,MAAC,CAACI,MAAM,GAAGa,GAAG,CAAC;YAAIlB;SAAoB,EAC9CM,QAAQ,GACRC,QAAQ,CAAC;QAEZ,gBAAgB;QAChBe,SAASrB,MAAC,CAACsB,OAAO,GAAGjB,QAAQ,GAAGC,QAAQ,CAAC;QACzCiB,cAAcvB,MAAC,CAACsB,OAAO,GAAGjB,QAAQ,GAAGC,QAAQ,CAAC;QAC9CkB,SAASxB,MAAC,CAACsB,OAAO,GAAGjB,QAAQ,GAAGC,QAAQ,CAAC;QAEzC,uBAAuB;QACvBmB,cAAczB,MAAC,CACZC,MAAM,CAAC;YACNyB,MAAM1B,MAAC,CACJI,MAAM,GACNuB,KAAK,CAAC,uDACNtB,QAAQ,GACRC,QAAQ,CAAC;YACZsB,KAAK5B,MAAC,CACHI,MAAM,GACNuB,KAAK,CAAC,uDACNtB,QAAQ,GACRC,QAAQ,CAAC;QACd,GACCD,QAAQ,GACRC,QAAQ,CAAC;QAEZ,kBAAkB;QAClBuB,OAAO7B,MAAC,CACLgB,KAAK,CAAC;YAAChB,MAAC,CAACI,MAAM,GAAGa,GAAG,CAAC;YAAIlB;SAAoB,EAC9CM,QAAQ,GACRC,QAAQ,CAAC;QAEZ,4DAA4D;QAC5DwB,eAAe9B,MAAC,CAACI,MAAM,GAAGa,GAAG,CAAC,GAAGZ,QAAQ,GAAGC,QAAQ,CAAC;IACvD,GACCG,MAAM;;AA8BJ,IAAMX,mBAAmBE,MAAC,CAACgB,KAAK,CAAC;IAAChB,MAAC,CAACI,MAAM,GAAGa,GAAG,CAAC;IAAIP;CAAuB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createConfig, parseConfig } from './config.js';
|
|
2
2
|
export { createHTTPServer } from './http.js';
|
|
3
|
+
export type { AuthMiddleware, OAuthAdapters, OAuthRuntimeDeps } from './oauth-google.js';
|
|
3
4
|
export { createOAuthAdapters } from './oauth-google.js';
|
|
4
5
|
export * from './runtime.js';
|
|
5
6
|
export { createStdioServer } from './stdio.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createConfig, parseConfig } from './config.js';
|
|
2
2
|
export { createHTTPServer } from './http.js';
|
|
3
|
+
export type { AuthMiddleware, OAuthAdapters, OAuthRuntimeDeps } from './oauth-google.js';
|
|
3
4
|
export { createOAuthAdapters } from './oauth-google.js';
|
|
4
5
|
export * from './runtime.js';
|
|
5
6
|
export { createStdioServer } from './stdio.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/setup/index.ts"],"sourcesContent":["export { createConfig, parseConfig } from './config.ts';\nexport { createHTTPServer } from './http.ts';\nexport { createOAuthAdapters } from './oauth-google.ts';\nexport * from './runtime.ts';\nexport { createStdioServer } from './stdio.ts';\n"],"names":["createConfig","createHTTPServer","createOAuthAdapters","createStdioServer","parseConfig"],"mappings":";;;;;;;;;;;QAASA;eAAAA,sBAAY;;QACZC;eAAAA,wBAAgB;;
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/setup/index.ts"],"sourcesContent":["export { createConfig, parseConfig } from './config.ts';\nexport { createHTTPServer } from './http.ts';\nexport type { AuthMiddleware, OAuthAdapters, OAuthRuntimeDeps } from './oauth-google.ts';\nexport { createOAuthAdapters } from './oauth-google.ts';\nexport * from './runtime.ts';\nexport { createStdioServer } from './stdio.ts';\n"],"names":["createConfig","createHTTPServer","createOAuthAdapters","createStdioServer","parseConfig"],"mappings":";;;;;;;;;;;QAASA;eAAAA,sBAAY;;QACZC;eAAAA,wBAAgB;;QAEhBC;eAAAA,kCAAmB;;QAEnBC;eAAAA,0BAAiB;;QALHC;eAAAA,qBAAW;;;wBAAQ;sBACT;6BAEG;qBACtB;uBACoB"}
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
* Field operator schema for Drive query fields that support multiple values
|
|
4
4
|
* Supports OR ($any), AND ($all), and NOT ($none) operations
|
|
5
5
|
*/
|
|
6
|
-
declare const FieldOperatorSchema: z.ZodObject<{
|
|
6
|
+
export declare const FieldOperatorSchema: z.ZodObject<{
|
|
7
7
|
$any: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
8
|
$all: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
9
|
$none: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -37,4 +37,3 @@ export type DriveQueryObject = {
|
|
|
37
37
|
*/
|
|
38
38
|
export declare const DriveQuerySchema: z.ZodUnion<readonly [z.ZodString, z.ZodType<DriveQueryObject, unknown, z.core.$ZodTypeInternals<DriveQueryObject, unknown>>]>;
|
|
39
39
|
export type DriveQuery = string | DriveQueryObject;
|
|
40
|
-
export {};
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Field operator schema for Drive query fields that support multiple values
|
|
4
4
|
* Supports OR ($any), AND ($all), and NOT ($none) operations
|
|
5
|
-
*/ const FieldOperatorSchema = z.object({
|
|
5
|
+
*/ export const FieldOperatorSchema = z.object({
|
|
6
6
|
$any: z.array(z.string()).optional().describe('OR within field - matches if ANY value matches'),
|
|
7
7
|
$all: z.array(z.string()).optional().describe('AND within field - matches if ALL values match'),
|
|
8
8
|
$none: z.array(z.string()).optional().describe('NOT within field - matches if NONE match')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/schemas/drive-query-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Field operator schema for Drive query fields that support multiple values\n * Supports OR ($any), AND ($all), and NOT ($none) operations\n */\
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/schemas/drive-query-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Field operator schema for Drive query fields that support multiple values\n * Supports OR ($any), AND ($all), and NOT ($none) operations\n */\nexport const FieldOperatorSchema = z\n .object({\n $any: z.array(z.string()).optional().describe('OR within field - matches if ANY value matches'),\n $all: z.array(z.string()).optional().describe('AND within field - matches if ALL values match'),\n $none: z.array(z.string()).optional().describe('NOT within field - matches if NONE match'),\n })\n .strict();\n\nexport type FieldOperator = z.infer<typeof FieldOperatorSchema>;\n\n/**\n * Drive query object schema with recursive operators and Drive features.\n *\n * Includes Drive-specific features:\n * - name: Search by file/folder name (supports string or field operators)\n * - mimeType: Filter by MIME type (e.g., \"application/pdf\", \"application/vnd.google-apps.folder\")\n * - fullText: Search file content and metadata\n * - parentId: Search within specific folder (supports string or field operators)\n * - starred: Filter by starred status\n * - shared: Filter by shared status\n * - modifiedTime: Date range filtering with $gte and $lt\n * - owner: Filter by owner email (supports string or field operators)\n * - rawDriveQuery: Escape hatch for advanced Drive query syntax\n *\n * Logical operators:\n * - $and: Array of conditions that must ALL match (recursive)\n * - $or: Array of conditions where ANY must match (recursive)\n * - $not: Nested condition that must NOT match (recursive)\n *\n * Note: Cast through unknown to work around Zod's lazy schema type inference issue\n * with exactOptionalPropertyTypes. The runtime schema is correct; this cast ensures\n * TypeScript sees the strict DriveQueryObject type everywhere the schema is used.\n */\nconst DriveQueryObjectSchema = z.lazy(() =>\n z\n .object({\n // Logical operators for combining conditions (recursive)\n $and: z.array(DriveQueryObjectSchema).optional().describe('Array of conditions that must ALL match'),\n $or: z.array(DriveQueryObjectSchema).optional().describe('Array of conditions where ANY must match'),\n $not: DriveQueryObjectSchema.optional().describe('Nested condition that must NOT match'),\n\n // File/folder name search\n name: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Search by file or folder name (partial match, case-insensitive)'),\n\n // MIME type filtering\n mimeType: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Filter by MIME type (e.g., \"application/pdf\", \"application/vnd.google-apps.folder\", \"image/jpeg\")'),\n\n // Full-text search across content and metadata\n fullText: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Search file content and metadata (full-text search)'),\n\n // Parent folder filtering\n parentId: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Search within specific folder by folder ID (use \"root\" for My Drive root)'),\n\n // Boolean flags\n starred: z.boolean().optional().describe('Filter by starred status (true = starred, false = not starred)'),\n sharedWithMe: z.boolean().optional().describe('Filter by \"shared with me\" collection (true = in shared collection, false = not shared)'),\n trashed: z.boolean().optional().describe('Filter by trash status (true = in trash, false = not in trash). Note: Drive tools automatically filter out trashed files unless explicitly requested.'),\n\n // Date range filtering\n modifiedTime: z\n .object({\n $gte: z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z)?$/)\n .optional()\n .describe('Files modified on or after this date (ISO 8601: YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ)'),\n $lt: z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z)?$/)\n .optional()\n .describe('Files modified before this date (ISO 8601: YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ)'),\n })\n .optional()\n .describe('Filter by modification date range'),\n\n // Owner filtering\n owner: z\n .union([z.string().min(1), FieldOperatorSchema])\n .optional()\n .describe('Filter by owner email address (partial match)'),\n\n // Raw Drive query string - escape hatch for advanced syntax\n rawDriveQuery: z.string().min(1).optional().describe(\"Raw Google Drive query syntax for advanced use cases. Bypasses schema validation - use sparingly. Example: \\\"name contains 'budget' and mimeType = 'application/pdf'\\\"\"),\n })\n .strict()\n) as unknown as z.ZodType<DriveQueryObject>;\n\nexport type DriveQueryObject = {\n $and?: DriveQueryObject[];\n $or?: DriveQueryObject[];\n $not?: DriveQueryObject;\n name?: string | FieldOperator;\n mimeType?: string | FieldOperator;\n fullText?: string | FieldOperator;\n parentId?: string | FieldOperator;\n starred?: boolean;\n sharedWithMe?: boolean;\n trashed?: boolean;\n modifiedTime?: {\n $gte?: string;\n $lt?: string;\n };\n owner?: string | FieldOperator;\n rawDriveQuery?: string;\n};\n\n/**\n * Drive query schema that accepts either:\n * - A structured DriveQueryObject with typed fields\n * - A raw Drive query string for advanced use cases\n *\n * This provides type safety for common queries while allowing\n * direct Google Drive query syntax when needed.\n */\nexport const DriveQuerySchema = z.union([z.string().min(1), DriveQueryObjectSchema]);\n\nexport type DriveQuery = string | DriveQueryObject;\n"],"names":["z","FieldOperatorSchema","object","$any","array","string","optional","describe","$all","$none","strict","DriveQueryObjectSchema","lazy","$and","$or","$not","name","union","min","mimeType","fullText","parentId","starred","boolean","sharedWithMe","trashed","modifiedTime","$gte","regex","$lt","owner","rawDriveQuery","DriveQuerySchema"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAM;AAExB;;;CAGC,GACD,OAAO,MAAMC,sBAAsBD,EAChCE,MAAM,CAAC;IACNC,MAAMH,EAAEI,KAAK,CAACJ,EAAEK,MAAM,IAAIC,QAAQ,GAAGC,QAAQ,CAAC;IAC9CC,MAAMR,EAAEI,KAAK,CAACJ,EAAEK,MAAM,IAAIC,QAAQ,GAAGC,QAAQ,CAAC;IAC9CE,OAAOT,EAAEI,KAAK,CAACJ,EAAEK,MAAM,IAAIC,QAAQ,GAAGC,QAAQ,CAAC;AACjD,GACCG,MAAM,GAAG;AAIZ;;;;;;;;;;;;;;;;;;;;;;CAsBC,GACD,MAAMC,yBAAyBX,EAAEY,IAAI,CAAC,IACpCZ,EACGE,MAAM,CAAC;QACN,yDAAyD;QACzDW,MAAMb,EAAEI,KAAK,CAACO,wBAAwBL,QAAQ,GAAGC,QAAQ,CAAC;QAC1DO,KAAKd,EAAEI,KAAK,CAACO,wBAAwBL,QAAQ,GAAGC,QAAQ,CAAC;QACzDQ,MAAMJ,uBAAuBL,QAAQ,GAAGC,QAAQ,CAAC;QAEjD,0BAA0B;QAC1BS,MAAMhB,EACHiB,KAAK,CAAC;YAACjB,EAAEK,MAAM,GAAGa,GAAG,CAAC;YAAIjB;SAAoB,EAC9CK,QAAQ,GACRC,QAAQ,CAAC;QAEZ,sBAAsB;QACtBY,UAAUnB,EACPiB,KAAK,CAAC;YAACjB,EAAEK,MAAM,GAAGa,GAAG,CAAC;YAAIjB;SAAoB,EAC9CK,QAAQ,GACRC,QAAQ,CAAC;QAEZ,+CAA+C;QAC/Ca,UAAUpB,EACPiB,KAAK,CAAC;YAACjB,EAAEK,MAAM,GAAGa,GAAG,CAAC;YAAIjB;SAAoB,EAC9CK,QAAQ,GACRC,QAAQ,CAAC;QAEZ,0BAA0B;QAC1Bc,UAAUrB,EACPiB,KAAK,CAAC;YAACjB,EAAEK,MAAM,GAAGa,GAAG,CAAC;YAAIjB;SAAoB,EAC9CK,QAAQ,GACRC,QAAQ,CAAC;QAEZ,gBAAgB;QAChBe,SAAStB,EAAEuB,OAAO,GAAGjB,QAAQ,GAAGC,QAAQ,CAAC;QACzCiB,cAAcxB,EAAEuB,OAAO,GAAGjB,QAAQ,GAAGC,QAAQ,CAAC;QAC9CkB,SAASzB,EAAEuB,OAAO,GAAGjB,QAAQ,GAAGC,QAAQ,CAAC;QAEzC,uBAAuB;QACvBmB,cAAc1B,EACXE,MAAM,CAAC;YACNyB,MAAM3B,EACHK,MAAM,GACNuB,KAAK,CAAC,uDACNtB,QAAQ,GACRC,QAAQ,CAAC;YACZsB,KAAK7B,EACFK,MAAM,GACNuB,KAAK,CAAC,uDACNtB,QAAQ,GACRC,QAAQ,CAAC;QACd,GACCD,QAAQ,GACRC,QAAQ,CAAC;QAEZ,kBAAkB;QAClBuB,OAAO9B,EACJiB,KAAK,CAAC;YAACjB,EAAEK,MAAM,GAAGa,GAAG,CAAC;YAAIjB;SAAoB,EAC9CK,QAAQ,GACRC,QAAQ,CAAC;QAEZ,4DAA4D;QAC5DwB,eAAe/B,EAAEK,MAAM,GAAGa,GAAG,CAAC,GAAGZ,QAAQ,GAAGC,QAAQ,CAAC;IACvD,GACCG,MAAM;AAsBX;;;;;;;CAOC,GACD,OAAO,MAAMsB,mBAAmBhC,EAAEiB,KAAK,CAAC;IAACjB,EAAEK,MAAM,GAAGa,GAAG,CAAC;IAAIP;CAAuB,EAAE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createConfig, parseConfig } from './config.js';
|
|
2
2
|
export { createHTTPServer } from './http.js';
|
|
3
|
+
export type { AuthMiddleware, OAuthAdapters, OAuthRuntimeDeps } from './oauth-google.js';
|
|
3
4
|
export { createOAuthAdapters } from './oauth-google.js';
|
|
4
5
|
export * from './runtime.js';
|
|
5
6
|
export { createStdioServer } from './stdio.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/setup/index.ts"],"sourcesContent":["export { createConfig, parseConfig } from './config.ts';\nexport { createHTTPServer } from './http.ts';\nexport { createOAuthAdapters } from './oauth-google.ts';\nexport * from './runtime.ts';\nexport { createStdioServer } from './stdio.ts';\n"],"names":["createConfig","parseConfig","createHTTPServer","createOAuthAdapters","createStdioServer"],"mappings":"AAAA,SAASA,YAAY,EAAEC,WAAW,QAAQ,cAAc;AACxD,SAASC,gBAAgB,QAAQ,YAAY;
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/Projects/mcp-z/mcp-drive/src/setup/index.ts"],"sourcesContent":["export { createConfig, parseConfig } from './config.ts';\nexport { createHTTPServer } from './http.ts';\nexport type { AuthMiddleware, OAuthAdapters, OAuthRuntimeDeps } from './oauth-google.ts';\nexport { createOAuthAdapters } from './oauth-google.ts';\nexport * from './runtime.ts';\nexport { createStdioServer } from './stdio.ts';\n"],"names":["createConfig","parseConfig","createHTTPServer","createOAuthAdapters","createStdioServer"],"mappings":"AAAA,SAASA,YAAY,EAAEC,WAAW,QAAQ,cAAc;AACxD,SAASC,gBAAgB,QAAQ,YAAY;AAE7C,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,cAAc,eAAe;AAC7B,SAASC,iBAAiB,QAAQ,aAAa"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-z/mcp-drive",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for Google Drive integration with file operations, folder navigation, search capabilities, and sharing management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"drive",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"cors": "^2.0.0",
|
|
80
80
|
"express": "^5.0.0",
|
|
81
81
|
"googleapis": "^169.0.0",
|
|
82
|
-
"keyv-registry": "^0.
|
|
82
|
+
"keyv-registry": "^0.4.0",
|
|
83
83
|
"module-root-sync": "^2.0.0",
|
|
84
84
|
"pino": "^10.0.0",
|
|
85
85
|
"zod": "^4.0.0"
|