@corsair-dev/googledrive 0.1.1 → 0.1.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.
@@ -6,17 +6,7 @@ export declare const PubSubMessageSchema: z.ZodObject<{
6
6
  attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7
7
  messageId: z.ZodOptional<z.ZodString>;
8
8
  publishTime: z.ZodOptional<z.ZodString>;
9
- }, "strip", z.ZodTypeAny, {
10
- data?: string | undefined;
11
- attributes?: Record<string, string> | undefined;
12
- messageId?: string | undefined;
13
- publishTime?: string | undefined;
14
- }, {
15
- data?: string | undefined;
16
- attributes?: Record<string, string> | undefined;
17
- messageId?: string | undefined;
18
- publishTime?: string | undefined;
19
- }>;
9
+ }, z.core.$strip>;
20
10
  export type PubSubMessage = z.infer<typeof PubSubMessageSchema>;
21
11
  export declare const PubSubNotificationSchema: z.ZodObject<{
22
12
  message: z.ZodOptional<z.ZodObject<{
@@ -24,38 +14,10 @@ export declare const PubSubNotificationSchema: z.ZodObject<{
24
14
  attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
25
15
  messageId: z.ZodOptional<z.ZodString>;
26
16
  publishTime: z.ZodOptional<z.ZodString>;
27
- }, "strip", z.ZodTypeAny, {
28
- data?: string | undefined;
29
- attributes?: Record<string, string> | undefined;
30
- messageId?: string | undefined;
31
- publishTime?: string | undefined;
32
- }, {
33
- data?: string | undefined;
34
- attributes?: Record<string, string> | undefined;
35
- messageId?: string | undefined;
36
- publishTime?: string | undefined;
37
- }>>;
17
+ }, z.core.$strip>>;
38
18
  subscription: z.ZodOptional<z.ZodString>;
39
19
  event: z.ZodOptional<z.ZodUnknown>;
40
- }, "strip", z.ZodTypeAny, {
41
- message?: {
42
- data?: string | undefined;
43
- attributes?: Record<string, string> | undefined;
44
- messageId?: string | undefined;
45
- publishTime?: string | undefined;
46
- } | undefined;
47
- subscription?: string | undefined;
48
- event?: unknown;
49
- }, {
50
- message?: {
51
- data?: string | undefined;
52
- attributes?: Record<string, string> | undefined;
53
- messageId?: string | undefined;
54
- publishTime?: string | undefined;
55
- } | undefined;
56
- subscription?: string | undefined;
57
- event?: unknown;
58
- }>;
20
+ }, z.core.$strip>;
59
21
  export type PubSubNotification<TEvent = unknown> = Omit<z.infer<typeof PubSubNotificationSchema>, 'event'> & {
60
22
  event?: TEvent;
61
23
  };
@@ -67,118 +29,61 @@ export declare const GoogleDrivePushNotificationSchema: z.ZodObject<{
67
29
  resourceState: z.ZodOptional<z.ZodString>;
68
30
  changed: z.ZodOptional<z.ZodString>;
69
31
  expiration: z.ZodOptional<z.ZodString>;
70
- }, "strip", z.ZodTypeAny, {
71
- id?: string | undefined;
72
- kind?: string | undefined;
73
- resourceId?: string | undefined;
74
- resourceUri?: string | undefined;
75
- resourceState?: string | undefined;
76
- changed?: string | undefined;
77
- expiration?: string | undefined;
78
- }, {
79
- id?: string | undefined;
80
- kind?: string | undefined;
81
- resourceId?: string | undefined;
82
- resourceUri?: string | undefined;
83
- resourceState?: string | undefined;
84
- changed?: string | undefined;
85
- expiration?: string | undefined;
86
- }>;
32
+ }, z.core.$strip>;
87
33
  export type GoogleDrivePushNotification = z.infer<typeof GoogleDrivePushNotificationSchema>;
88
- declare const ChangeTypeSchema: z.ZodEnum<["created", "updated", "deleted", "trashed", "untrashed"]>;
34
+ declare const ChangeTypeSchema: z.ZodEnum<{
35
+ trashed: "trashed";
36
+ deleted: "deleted";
37
+ created: "created";
38
+ updated: "updated";
39
+ untrashed: "untrashed";
40
+ }>;
89
41
  export type ChangeType = z.infer<typeof ChangeTypeSchema>;
90
42
  export declare const DriveChangedEventSchema: z.ZodObject<{
91
- type: z.ZodEnum<["fileChanged", "folderChanged"]>;
43
+ type: z.ZodEnum<{
44
+ fileChanged: "fileChanged";
45
+ folderChanged: "folderChanged";
46
+ }>;
92
47
  fileId: z.ZodOptional<z.ZodString>;
93
48
  folderId: z.ZodOptional<z.ZodString>;
94
- changeType: z.ZodEnum<["created", "updated", "deleted", "trashed", "untrashed"]>;
95
- file: z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>;
96
- folder: z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>;
49
+ changeType: z.ZodEnum<{
50
+ trashed: "trashed";
51
+ deleted: "deleted";
52
+ created: "created";
53
+ updated: "updated";
54
+ untrashed: "untrashed";
55
+ }>;
56
+ file: z.ZodOptional<z.ZodCustom<File, File>>;
57
+ folder: z.ZodOptional<z.ZodCustom<File, File>>;
97
58
  filePath: z.ZodOptional<z.ZodString>;
98
- change: z.ZodOptional<z.ZodType<Change, z.ZodTypeDef, Change>>;
59
+ change: z.ZodOptional<z.ZodCustom<Change, Change>>;
99
60
  binaryData: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
61
  allFiles: z.ZodArray<z.ZodObject<{
101
- file: z.ZodType<File, z.ZodTypeDef, File>;
62
+ file: z.ZodCustom<File, File>;
102
63
  filePath: z.ZodString;
103
- change: z.ZodType<Change, z.ZodTypeDef, Change>;
104
- changeType: z.ZodEnum<["created", "updated", "deleted", "trashed", "untrashed"]>;
64
+ change: z.ZodCustom<Change, Change>;
65
+ changeType: z.ZodEnum<{
66
+ trashed: "trashed";
67
+ deleted: "deleted";
68
+ created: "created";
69
+ updated: "updated";
70
+ untrashed: "untrashed";
71
+ }>;
105
72
  binaryData: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
- }, "strip", z.ZodTypeAny, {
107
- file: File;
108
- filePath: string;
109
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
110
- change: Change;
111
- binaryData?: string | null | undefined;
112
- }, {
113
- file: File;
114
- filePath: string;
115
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
116
- change: Change;
117
- binaryData?: string | null | undefined;
118
- }>, "many">;
73
+ }, z.core.$strip>>;
119
74
  allFolders: z.ZodArray<z.ZodObject<{
120
- folder: z.ZodType<File, z.ZodTypeDef, File>;
75
+ folder: z.ZodCustom<File, File>;
121
76
  filePath: z.ZodString;
122
- change: z.ZodType<Change, z.ZodTypeDef, Change>;
123
- changeType: z.ZodEnum<["created", "updated", "deleted", "trashed", "untrashed"]>;
124
- }, "strip", z.ZodTypeAny, {
125
- filePath: string;
126
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
127
- folder: File;
128
- change: Change;
129
- }, {
130
- filePath: string;
131
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
132
- folder: File;
133
- change: Change;
134
- }>, "many">;
135
- }, "strip", z.ZodTypeAny, {
136
- type: "fileChanged" | "folderChanged";
137
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
138
- allFiles: {
139
- file: File;
140
- filePath: string;
141
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
142
- change: Change;
143
- binaryData?: string | null | undefined;
144
- }[];
145
- allFolders: {
146
- filePath: string;
147
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
148
- folder: File;
149
- change: Change;
150
- }[];
151
- file?: File | undefined;
152
- fileId?: string | undefined;
153
- folderId?: string | undefined;
154
- filePath?: string | undefined;
155
- folder?: File | undefined;
156
- change?: Change | undefined;
157
- binaryData?: string | null | undefined;
158
- }, {
159
- type: "fileChanged" | "folderChanged";
160
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
161
- allFiles: {
162
- file: File;
163
- filePath: string;
164
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
165
- change: Change;
166
- binaryData?: string | null | undefined;
167
- }[];
168
- allFolders: {
169
- filePath: string;
170
- changeType: "trashed" | "deleted" | "created" | "updated" | "untrashed";
171
- folder: File;
172
- change: Change;
173
- }[];
174
- file?: File | undefined;
175
- fileId?: string | undefined;
176
- folderId?: string | undefined;
177
- filePath?: string | undefined;
178
- folder?: File | undefined;
179
- change?: Change | undefined;
180
- binaryData?: string | null | undefined;
181
- }>;
77
+ change: z.ZodCustom<Change, Change>;
78
+ changeType: z.ZodEnum<{
79
+ trashed: "trashed";
80
+ deleted: "deleted";
81
+ created: "created";
82
+ updated: "updated";
83
+ untrashed: "untrashed";
84
+ }>;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>;
182
87
  export type DriveChangedEvent = z.infer<typeof DriveChangedEventSchema>;
183
88
  export type GoogleDriveWebhookEvent = DriveChangedEvent;
184
89
  export type GoogleDriveEventName = 'driveChanged';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAM7C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,CAAC,MAAM,GAAG,OAAO,IAAI,IAAI,CACtD,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,EACxC,OAAO,CACP,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvB,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;EAQ5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,iCAAiC,CACxC,CAAC;AAMF,QAAA,MAAM,gBAAgB,sEAMpB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAE,CAAC;AAEvB,eAAO,MAAM,iCAAiC;;;;;;;;iBAQ5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,iCAAiC,CACxC,CAAC;AAMF,QAAA,MAAM,gBAAgB;;;;;;EAMpB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAElD,MAAM,WAAW,mBAAmB;IACnC,YAAY,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,MAAM,yBAAyB,CAAC,MAAM,GAAG,OAAO,IACrD,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAE5B,MAAM,MAAM,yBAAyB,GAAG;IACvC,YAAY,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAMF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,CAG7E;AAED,wBAAgB,+BAA+B,CAC9C,SAAS,EAAE,oBAAoB,GAC7B,qBAAqB,CAkBvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corsair-dev/googledrive",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Google drive plugin for Corsair",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,15 +19,15 @@
19
19
  },
20
20
  "peerDependencies": {
21
21
  "corsair": ">=0.1.0",
22
- "zod": "^3.0.0"
22
+ "zod": "^4.1.13"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/jest": "^29.5.14",
26
26
  "ts-jest": "^29.4.9",
27
27
  "tsup": "^8.0.1",
28
28
  "typescript": "^5.9.3",
29
- "zod": "^3.25.76",
30
- "corsair": "0.1.67"
29
+ "zod": "^4.1.13",
30
+ "corsair": "0.1.69"
31
31
  },
32
32
  "keywords": [
33
33
  "corsair",