@corsair-dev/gmail 0.1.1 → 0.1.3

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
- messageId?: string | undefined;
12
- attributes?: Record<string, string> | undefined;
13
- publishTime?: string | undefined;
14
- }, {
15
- data?: string | undefined;
16
- messageId?: string | undefined;
17
- attributes?: Record<string, 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,161 +14,59 @@ 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
- messageId?: string | undefined;
30
- attributes?: Record<string, string> | undefined;
31
- publishTime?: string | undefined;
32
- }, {
33
- data?: string | undefined;
34
- messageId?: string | undefined;
35
- attributes?: Record<string, 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
- messageId?: string | undefined;
44
- attributes?: Record<string, string> | undefined;
45
- publishTime?: string | undefined;
46
- } | undefined;
47
- subscription?: string | undefined;
48
- event?: unknown;
49
- }, {
50
- message?: {
51
- data?: string | undefined;
52
- messageId?: string | undefined;
53
- attributes?: Record<string, 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
  };
62
24
  export declare const GmailPushNotificationSchema: z.ZodObject<{
63
25
  emailAddress: z.ZodOptional<z.ZodString>;
64
26
  historyId: z.ZodOptional<z.ZodString>;
65
- }, "strip", z.ZodTypeAny, {
66
- historyId?: string | undefined;
67
- emailAddress?: string | undefined;
68
- }, {
69
- historyId?: string | undefined;
70
- emailAddress?: string | undefined;
71
- }>;
27
+ }, z.core.$strip>;
72
28
  export type GmailPushNotification = z.infer<typeof GmailPushNotificationSchema>;
73
29
  export declare const MessageReceivedEventSchema: z.ZodObject<{
74
30
  type: z.ZodLiteral<"messageReceived">;
75
31
  emailAddress: z.ZodString;
76
32
  historyId: z.ZodString;
77
- message: z.ZodType<Message, z.ZodTypeDef, Message>;
78
- }, "strip", z.ZodTypeAny, {
79
- message: Message;
80
- type: "messageReceived";
81
- historyId: string;
82
- emailAddress: string;
83
- }, {
84
- message: Message;
85
- type: "messageReceived";
86
- historyId: string;
87
- emailAddress: string;
88
- }>;
33
+ message: z.ZodCustom<Message, Message>;
34
+ }, z.core.$strip>;
89
35
  export type MessageReceivedEvent = z.infer<typeof MessageReceivedEventSchema>;
90
36
  export declare const MessageDeletedEventSchema: z.ZodObject<{
91
37
  type: z.ZodLiteral<"messageDeleted">;
92
38
  emailAddress: z.ZodString;
93
39
  historyId: z.ZodString;
94
- message: z.ZodType<Message, z.ZodTypeDef, Message>;
95
- }, "strip", z.ZodTypeAny, {
96
- message: Message;
97
- type: "messageDeleted";
98
- historyId: string;
99
- emailAddress: string;
100
- }, {
101
- message: Message;
102
- type: "messageDeleted";
103
- historyId: string;
104
- emailAddress: string;
105
- }>;
40
+ message: z.ZodCustom<Message, Message>;
41
+ }, z.core.$strip>;
106
42
  export type MessageDeletedEvent = z.infer<typeof MessageDeletedEventSchema>;
107
43
  export declare const MessageLabelChangedEventSchema: z.ZodObject<{
108
44
  type: z.ZodLiteral<"messageLabelChanged">;
109
45
  emailAddress: z.ZodString;
110
46
  historyId: z.ZodString;
111
- message: z.ZodType<Message, z.ZodTypeDef, Message>;
112
- labelsAdded: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
113
- labelsRemoved: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
114
- }, "strip", z.ZodTypeAny, {
115
- message: Message;
116
- type: "messageLabelChanged";
117
- historyId: string;
118
- emailAddress: string;
119
- labelsAdded?: string[] | undefined;
120
- labelsRemoved?: string[] | undefined;
121
- }, {
122
- message: Message;
123
- type: "messageLabelChanged";
124
- historyId: string;
125
- emailAddress: string;
126
- labelsAdded?: string[] | undefined;
127
- labelsRemoved?: string[] | undefined;
128
- }>;
47
+ message: z.ZodCustom<Message, Message>;
48
+ labelsAdded: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ labelsRemoved: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ }, z.core.$strip>;
129
51
  export type MessageLabelChangedEvent = z.infer<typeof MessageLabelChangedEventSchema>;
130
- export declare const GmailWebhookEventSchema: z.ZodUnion<[z.ZodObject<{
52
+ export declare const GmailWebhookEventSchema: z.ZodUnion<readonly [z.ZodObject<{
131
53
  type: z.ZodLiteral<"messageReceived">;
132
54
  emailAddress: z.ZodString;
133
55
  historyId: z.ZodString;
134
- message: z.ZodType<Message, z.ZodTypeDef, Message>;
135
- }, "strip", z.ZodTypeAny, {
136
- message: Message;
137
- type: "messageReceived";
138
- historyId: string;
139
- emailAddress: string;
140
- }, {
141
- message: Message;
142
- type: "messageReceived";
143
- historyId: string;
144
- emailAddress: string;
145
- }>, z.ZodObject<{
56
+ message: z.ZodCustom<Message, Message>;
57
+ }, z.core.$strip>, z.ZodObject<{
146
58
  type: z.ZodLiteral<"messageDeleted">;
147
59
  emailAddress: z.ZodString;
148
60
  historyId: z.ZodString;
149
- message: z.ZodType<Message, z.ZodTypeDef, Message>;
150
- }, "strip", z.ZodTypeAny, {
151
- message: Message;
152
- type: "messageDeleted";
153
- historyId: string;
154
- emailAddress: string;
155
- }, {
156
- message: Message;
157
- type: "messageDeleted";
158
- historyId: string;
159
- emailAddress: string;
160
- }>, z.ZodObject<{
61
+ message: z.ZodCustom<Message, Message>;
62
+ }, z.core.$strip>, z.ZodObject<{
161
63
  type: z.ZodLiteral<"messageLabelChanged">;
162
64
  emailAddress: z.ZodString;
163
65
  historyId: z.ZodString;
164
- message: z.ZodType<Message, z.ZodTypeDef, Message>;
165
- labelsAdded: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
166
- labelsRemoved: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
167
- }, "strip", z.ZodTypeAny, {
168
- message: Message;
169
- type: "messageLabelChanged";
170
- historyId: string;
171
- emailAddress: string;
172
- labelsAdded?: string[] | undefined;
173
- labelsRemoved?: string[] | undefined;
174
- }, {
175
- message: Message;
176
- type: "messageLabelChanged";
177
- historyId: string;
178
- emailAddress: string;
179
- labelsAdded?: string[] | undefined;
180
- labelsRemoved?: string[] | undefined;
181
- }>]>;
66
+ message: z.ZodCustom<Message, Message>;
67
+ labelsAdded: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ labelsRemoved: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ }, z.core.$strip>]>;
182
70
  export type GmailWebhookEvent = z.infer<typeof GmailWebhookEventSchema>;
183
71
  export type GmailEventName = 'messageChanged';
184
72
  export type GmailWebhookPayload<TEvent = unknown> = PubSubNotification<TEvent>;
@@ -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;A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C,CAAC;AAE9E,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,8BAA8B;;;;;;;iBAOzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,8BAA8B,CACrC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;mBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE9C,MAAM,MAAM,mBAAmB,CAAC,MAAM,GAAG,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAE/E,MAAM,MAAM,mBAAmB,GAAG;IACjC,cAAc,EACX,oBAAoB,GACpB,mBAAmB,GACnB,wBAAwB,CAAC;CAC5B,CAAC;AAMF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAGvE;AAED,wBAAgB,yBAAyB,CACxC,SAAS,EAAE,cAAc,GACvB,qBAAqB,CAcvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corsair-dev/gmail",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Gmail 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.70"
31
31
  },
32
32
  "keywords": [
33
33
  "corsair",