@superdurable/connector-google-gmail 0.1.0 → 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.
- package/README.md +5 -1
- package/dex-connector.json +2 -2
- package/dist/{chunk-C6LCJ6ZY.js → chunk-IAO6TPJ3.js} +210 -134
- package/dist/connection-NE_da2Az.d.cts +181 -0
- package/dist/connection-NE_da2Az.d.ts +181 -0
- package/dist/index.cjs +257 -184
- package/dist/index.d.cts +34 -34
- package/dist/index.d.ts +34 -34
- package/dist/index.js +3 -3
- package/dist/mock/index.cjs +294 -202
- package/dist/mock/index.d.cts +31 -30
- package/dist/mock/index.d.ts +31 -30
- package/dist/mock/index.js +152 -113
- package/package.json +5 -4
- package/dist/connection-ce8JHjE8.d.cts +0 -99
- package/dist/connection-ce8JHjE8.d.ts +0 -99
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Message, R as ReplyToMessageInput, S as SendMessageInput, C as Config, a as CredentialSource, b as Credentials, c as SendMessageOutput, G as GetMessageInput, d as GmailOperations, e as GmailConnection } from './connection-
|
|
2
|
-
export { f as ConnectorID, g as GetMessageInputSchema, h as GoogleOAuthAuthMethodID, i as MessageSchema, P as ProviderID, j as ReplyToMessageInputSchema, k as SendMessageInputSchema, l as SendMessageOutputSchema, W as WorkspaceDomainDelegationAuthMethodID } from './connection-
|
|
1
|
+
import { M as Message, R as ReplyToMessageInput, S as SendMessageInput, C as Config, a as CredentialSource, b as Credentials, c as SendMessageOutput, G as GetMessageInput, d as GmailOperations, e as GmailConnection } from './connection-NE_da2Az.cjs';
|
|
2
|
+
export { f as ConnectorID, g as GetMessageInputSchema, h as GoogleOAuthAuthMethodID, i as MessageSchema, P as ProviderID, j as ReplyToMessageInputSchema, k as SendMessageInputSchema, l as SendMessageOutputSchema, W as WorkspaceDomainDelegationAuthMethodID } from './connection-NE_da2Az.cjs';
|
|
3
3
|
import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
|
|
4
4
|
import { QueryDefinition, MutationDefinition, CredentialRefreshDriver, Call, FailureKind, CredentialRefreshState, CredentialRefreshResult, Mutation, MutationAttempt, Query, QueryAttempt, Failure, ReceiptDraft, QueryStepConfig, QueryResult, MutationStepConfig, MutationResult, QueryStep, MutationStep } from '@superdurable/connectors-sdk';
|
|
5
5
|
import { z } from 'zod';
|
|
@@ -7,7 +7,7 @@ import { ProviderRequest, ProviderResponse, AddressPolicy } from '@superdurable/
|
|
|
7
7
|
import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
|
|
8
8
|
import { StepTarget } from '@superdurable/dex';
|
|
9
9
|
|
|
10
|
-
/**
|
|
10
|
+
/** Branch IDs for getMessage. */
|
|
11
11
|
declare const GetMessageBranch: {
|
|
12
12
|
readonly Read: "read";
|
|
13
13
|
readonly NotFound: "notFound";
|
|
@@ -15,24 +15,24 @@ declare const GetMessageBranch: {
|
|
|
15
15
|
readonly InvalidResponse: "invalidResponse";
|
|
16
16
|
readonly Defect: "defect";
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
18
|
+
/** Manifest definition for getMessage. */
|
|
19
|
+
declare const GetMessageDefinition: QueryDefinition;
|
|
20
|
+
/** Branch IDs for sendMessage. */
|
|
19
21
|
declare const SendMessageBranch: {
|
|
20
22
|
readonly Sent: "sent";
|
|
21
23
|
readonly ProviderRejected: "providerRejected";
|
|
22
24
|
readonly Defect: "defect";
|
|
23
25
|
};
|
|
24
|
-
/**
|
|
26
|
+
/** Manifest definition for sendMessage. */
|
|
27
|
+
declare const SendMessageDefinition: MutationDefinition;
|
|
28
|
+
/** Branch IDs for replyToMessage. */
|
|
25
29
|
declare const ReplyToMessageBranch: {
|
|
26
30
|
readonly Sent: "sent";
|
|
27
31
|
readonly ProviderRejected: "providerRejected";
|
|
28
32
|
readonly InvalidResponse: "invalidResponse";
|
|
29
33
|
readonly Defect: "defect";
|
|
30
34
|
};
|
|
31
|
-
/** Manifest
|
|
32
|
-
declare const GetMessageDefinition: QueryDefinition;
|
|
33
|
-
/** Manifest-derived sendMessage definition. */
|
|
34
|
-
declare const SendMessageDefinition: MutationDefinition;
|
|
35
|
-
/** Manifest-derived replyToMessage definition. */
|
|
35
|
+
/** Manifest definition for replyToMessage. */
|
|
36
36
|
declare const ReplyToMessageDefinition: MutationDefinition;
|
|
37
37
|
|
|
38
38
|
/** Provider message part with nested MIME children. */
|
|
@@ -238,38 +238,38 @@ declare function newProjectConnection(project: LoadedProject, connectionName: st
|
|
|
238
238
|
/** Bind startup-pinned settings to credentials refreshed in private project storage. */
|
|
239
239
|
declare function newProjectGmailClient(project: LoadedProject, connectionName: string, options?: GmailClientOptions): GmailClient;
|
|
240
240
|
|
|
241
|
-
/**
|
|
241
|
+
/** Configuration for the public getMessage Step. */
|
|
242
242
|
interface GetMessageStepConfig<StepInput> extends Omit<QueryStepConfig<StepInput, GetMessageInput, Message>, 'operation' | 'connection' | 'branches'> {
|
|
243
|
-
/**
|
|
244
|
-
/**
|
|
245
|
-
/**
|
|
246
|
-
/**
|
|
247
|
-
/**
|
|
248
|
-
/**
|
|
249
|
-
/**
|
|
243
|
+
/** Named Gmail connection. */ connection: GmailConnection;
|
|
244
|
+
/** Name matching the Gmail connection. */ connectionName: string;
|
|
245
|
+
/** Successful read destination. */ read: StepTarget<QueryResult<Message>>;
|
|
246
|
+
/** Missing message destination. */ notFound?: StepTarget<QueryResult<Message>>;
|
|
247
|
+
/** Provider rejection destination. */ providerRejected?: StepTarget<QueryResult<Message>>;
|
|
248
|
+
/** Invalid response destination. */ invalidResponse?: StepTarget<QueryResult<Message>>;
|
|
249
|
+
/** Local defect destination. */ defect?: StepTarget<QueryResult<Message>>;
|
|
250
250
|
}
|
|
251
|
-
/**
|
|
251
|
+
/** Configuration for the public sendMessage Step. */
|
|
252
252
|
interface SendMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, SendMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
|
|
253
|
-
/**
|
|
254
|
-
/**
|
|
255
|
-
/**
|
|
256
|
-
/**
|
|
257
|
-
/**
|
|
253
|
+
/** Named Gmail connection. */ connection: GmailConnection;
|
|
254
|
+
/** Name matching the Gmail connection. */ connectionName: string;
|
|
255
|
+
/** Successful send destination. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
|
|
256
|
+
/** Provider rejection destination. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
257
|
+
/** Local defect destination. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
258
258
|
}
|
|
259
|
-
/**
|
|
259
|
+
/** Configuration for the public replyToMessage Step. */
|
|
260
260
|
interface ReplyToMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, ReplyToMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
|
|
261
|
-
/**
|
|
262
|
-
/**
|
|
263
|
-
/**
|
|
264
|
-
/**
|
|
265
|
-
/**
|
|
266
|
-
/**
|
|
261
|
+
/** Named Gmail connection. */ connection: GmailConnection;
|
|
262
|
+
/** Name matching the Gmail connection. */ connectionName: string;
|
|
263
|
+
/** Successful reply destination. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
|
|
264
|
+
/** Provider rejection destination. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
265
|
+
/** Invalid response destination. */ invalidResponse?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
266
|
+
/** Local defect destination. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
267
267
|
}
|
|
268
|
-
/**
|
|
268
|
+
/** Build a Gmail read Step with its typed connection. */
|
|
269
269
|
declare function newGetMessageStep<StepInput>(configuration: GetMessageStepConfig<StepInput>): QueryStep<StepInput, GetMessageInput, Message>;
|
|
270
|
-
/**
|
|
270
|
+
/** Build a Gmail send Step with its typed connection. */
|
|
271
271
|
declare function newSendMessageStep<StepInput>(configuration: SendMessageStepConfig<StepInput>): MutationStep<StepInput, SendMessageInput, SendMessageOutput>;
|
|
272
|
-
/**
|
|
272
|
+
/** Build a Gmail reply Step with its typed connection. */
|
|
273
273
|
declare function newReplyToMessageStep<StepInput>(configuration: ReplyToMessageStepConfig<StepInput>): MutationStep<StepInput, ReplyToMessageInput, SendMessageOutput>;
|
|
274
274
|
|
|
275
275
|
export { Config, CredentialSource, Credentials, GetMessageBranch, GetMessageDefinition, GetMessageInput, GetMessageOperation, type GetMessageStepConfig, GmailClient, type GmailClientOptions, type GmailClientSettings, GmailConnection, GmailCredentialError, GmailCredentialRefreshDriver, GmailHTTPClient, type GmailMessagePart, type GmailMessageResource, GmailMessageResourceSchema, GmailOperations, GmailProvider, type GmailReadResult, type GmailTransport, Message, ReplyToMessageBranch, ReplyToMessageDefinition, ReplyToMessageInput, ReplyToMessageOperation, type ReplyToMessageStepConfig, SendMessageBranch, SendMessageDefinition, SendMessageInput, SendMessageOperation, SendMessageOutput, type SendMessageStepConfig, type SentMessageIdentity, buildMIMEMessage, buildReplyMIMEMessage, decodeGmailMessage, emptyMessage, gmailClientSettings, gmailFailure, gmailRequestID, gmailRetryAfterMs, newGetMessageStep, newProjectConnection, newProjectGmailClient, newReplyToMessageStep, newSendMessageStep, parseMailbox, parseSentResponse, receiptFor, replyRecipient, rfcMessageIDAddress, statusFailureKind, validateSendInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Message, R as ReplyToMessageInput, S as SendMessageInput, C as Config, a as CredentialSource, b as Credentials, c as SendMessageOutput, G as GetMessageInput, d as GmailOperations, e as GmailConnection } from './connection-
|
|
2
|
-
export { f as ConnectorID, g as GetMessageInputSchema, h as GoogleOAuthAuthMethodID, i as MessageSchema, P as ProviderID, j as ReplyToMessageInputSchema, k as SendMessageInputSchema, l as SendMessageOutputSchema, W as WorkspaceDomainDelegationAuthMethodID } from './connection-
|
|
1
|
+
import { M as Message, R as ReplyToMessageInput, S as SendMessageInput, C as Config, a as CredentialSource, b as Credentials, c as SendMessageOutput, G as GetMessageInput, d as GmailOperations, e as GmailConnection } from './connection-NE_da2Az.js';
|
|
2
|
+
export { f as ConnectorID, g as GetMessageInputSchema, h as GoogleOAuthAuthMethodID, i as MessageSchema, P as ProviderID, j as ReplyToMessageInputSchema, k as SendMessageInputSchema, l as SendMessageOutputSchema, W as WorkspaceDomainDelegationAuthMethodID } from './connection-NE_da2Az.js';
|
|
3
3
|
import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
|
|
4
4
|
import { QueryDefinition, MutationDefinition, CredentialRefreshDriver, Call, FailureKind, CredentialRefreshState, CredentialRefreshResult, Mutation, MutationAttempt, Query, QueryAttempt, Failure, ReceiptDraft, QueryStepConfig, QueryResult, MutationStepConfig, MutationResult, QueryStep, MutationStep } from '@superdurable/connectors-sdk';
|
|
5
5
|
import { z } from 'zod';
|
|
@@ -7,7 +7,7 @@ import { ProviderRequest, ProviderResponse, AddressPolicy } from '@superdurable/
|
|
|
7
7
|
import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
|
|
8
8
|
import { StepTarget } from '@superdurable/dex';
|
|
9
9
|
|
|
10
|
-
/**
|
|
10
|
+
/** Branch IDs for getMessage. */
|
|
11
11
|
declare const GetMessageBranch: {
|
|
12
12
|
readonly Read: "read";
|
|
13
13
|
readonly NotFound: "notFound";
|
|
@@ -15,24 +15,24 @@ declare const GetMessageBranch: {
|
|
|
15
15
|
readonly InvalidResponse: "invalidResponse";
|
|
16
16
|
readonly Defect: "defect";
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
18
|
+
/** Manifest definition for getMessage. */
|
|
19
|
+
declare const GetMessageDefinition: QueryDefinition;
|
|
20
|
+
/** Branch IDs for sendMessage. */
|
|
19
21
|
declare const SendMessageBranch: {
|
|
20
22
|
readonly Sent: "sent";
|
|
21
23
|
readonly ProviderRejected: "providerRejected";
|
|
22
24
|
readonly Defect: "defect";
|
|
23
25
|
};
|
|
24
|
-
/**
|
|
26
|
+
/** Manifest definition for sendMessage. */
|
|
27
|
+
declare const SendMessageDefinition: MutationDefinition;
|
|
28
|
+
/** Branch IDs for replyToMessage. */
|
|
25
29
|
declare const ReplyToMessageBranch: {
|
|
26
30
|
readonly Sent: "sent";
|
|
27
31
|
readonly ProviderRejected: "providerRejected";
|
|
28
32
|
readonly InvalidResponse: "invalidResponse";
|
|
29
33
|
readonly Defect: "defect";
|
|
30
34
|
};
|
|
31
|
-
/** Manifest
|
|
32
|
-
declare const GetMessageDefinition: QueryDefinition;
|
|
33
|
-
/** Manifest-derived sendMessage definition. */
|
|
34
|
-
declare const SendMessageDefinition: MutationDefinition;
|
|
35
|
-
/** Manifest-derived replyToMessage definition. */
|
|
35
|
+
/** Manifest definition for replyToMessage. */
|
|
36
36
|
declare const ReplyToMessageDefinition: MutationDefinition;
|
|
37
37
|
|
|
38
38
|
/** Provider message part with nested MIME children. */
|
|
@@ -238,38 +238,38 @@ declare function newProjectConnection(project: LoadedProject, connectionName: st
|
|
|
238
238
|
/** Bind startup-pinned settings to credentials refreshed in private project storage. */
|
|
239
239
|
declare function newProjectGmailClient(project: LoadedProject, connectionName: string, options?: GmailClientOptions): GmailClient;
|
|
240
240
|
|
|
241
|
-
/**
|
|
241
|
+
/** Configuration for the public getMessage Step. */
|
|
242
242
|
interface GetMessageStepConfig<StepInput> extends Omit<QueryStepConfig<StepInput, GetMessageInput, Message>, 'operation' | 'connection' | 'branches'> {
|
|
243
|
-
/**
|
|
244
|
-
/**
|
|
245
|
-
/**
|
|
246
|
-
/**
|
|
247
|
-
/**
|
|
248
|
-
/**
|
|
249
|
-
/**
|
|
243
|
+
/** Named Gmail connection. */ connection: GmailConnection;
|
|
244
|
+
/** Name matching the Gmail connection. */ connectionName: string;
|
|
245
|
+
/** Successful read destination. */ read: StepTarget<QueryResult<Message>>;
|
|
246
|
+
/** Missing message destination. */ notFound?: StepTarget<QueryResult<Message>>;
|
|
247
|
+
/** Provider rejection destination. */ providerRejected?: StepTarget<QueryResult<Message>>;
|
|
248
|
+
/** Invalid response destination. */ invalidResponse?: StepTarget<QueryResult<Message>>;
|
|
249
|
+
/** Local defect destination. */ defect?: StepTarget<QueryResult<Message>>;
|
|
250
250
|
}
|
|
251
|
-
/**
|
|
251
|
+
/** Configuration for the public sendMessage Step. */
|
|
252
252
|
interface SendMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, SendMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
|
|
253
|
-
/**
|
|
254
|
-
/**
|
|
255
|
-
/**
|
|
256
|
-
/**
|
|
257
|
-
/**
|
|
253
|
+
/** Named Gmail connection. */ connection: GmailConnection;
|
|
254
|
+
/** Name matching the Gmail connection. */ connectionName: string;
|
|
255
|
+
/** Successful send destination. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
|
|
256
|
+
/** Provider rejection destination. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
257
|
+
/** Local defect destination. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
258
258
|
}
|
|
259
|
-
/**
|
|
259
|
+
/** Configuration for the public replyToMessage Step. */
|
|
260
260
|
interface ReplyToMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, ReplyToMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
|
|
261
|
-
/**
|
|
262
|
-
/**
|
|
263
|
-
/**
|
|
264
|
-
/**
|
|
265
|
-
/**
|
|
266
|
-
/**
|
|
261
|
+
/** Named Gmail connection. */ connection: GmailConnection;
|
|
262
|
+
/** Name matching the Gmail connection. */ connectionName: string;
|
|
263
|
+
/** Successful reply destination. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
|
|
264
|
+
/** Provider rejection destination. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
265
|
+
/** Invalid response destination. */ invalidResponse?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
266
|
+
/** Local defect destination. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
|
|
267
267
|
}
|
|
268
|
-
/**
|
|
268
|
+
/** Build a Gmail read Step with its typed connection. */
|
|
269
269
|
declare function newGetMessageStep<StepInput>(configuration: GetMessageStepConfig<StepInput>): QueryStep<StepInput, GetMessageInput, Message>;
|
|
270
|
-
/**
|
|
270
|
+
/** Build a Gmail send Step with its typed connection. */
|
|
271
271
|
declare function newSendMessageStep<StepInput>(configuration: SendMessageStepConfig<StepInput>): MutationStep<StepInput, SendMessageInput, SendMessageOutput>;
|
|
272
|
-
/**
|
|
272
|
+
/** Build a Gmail reply Step with its typed connection. */
|
|
273
273
|
declare function newReplyToMessageStep<StepInput>(configuration: ReplyToMessageStepConfig<StepInput>): MutationStep<StepInput, ReplyToMessageInput, SendMessageOutput>;
|
|
274
274
|
|
|
275
275
|
export { Config, CredentialSource, Credentials, GetMessageBranch, GetMessageDefinition, GetMessageInput, GetMessageOperation, type GetMessageStepConfig, GmailClient, type GmailClientOptions, type GmailClientSettings, GmailConnection, GmailCredentialError, GmailCredentialRefreshDriver, GmailHTTPClient, type GmailMessagePart, type GmailMessageResource, GmailMessageResourceSchema, GmailOperations, GmailProvider, type GmailReadResult, type GmailTransport, Message, ReplyToMessageBranch, ReplyToMessageDefinition, ReplyToMessageInput, ReplyToMessageOperation, type ReplyToMessageStepConfig, SendMessageBranch, SendMessageDefinition, SendMessageInput, SendMessageOperation, SendMessageOutput, type SendMessageStepConfig, type SentMessageIdentity, buildMIMEMessage, buildReplyMIMEMessage, decodeGmailMessage, emptyMessage, gmailClientSettings, gmailFailure, gmailRequestID, gmailRetryAfterMs, newGetMessageStep, newProjectConnection, newProjectGmailClient, newReplyToMessageStep, newSendMessageStep, parseMailbox, parseSentResponse, receiptFor, replyRecipient, rfcMessageIDAddress, statusFailureKind, validateSendInput };
|
package/dist/index.js
CHANGED
|
@@ -20,9 +20,9 @@ import {
|
|
|
20
20
|
ReplyToMessageOperation,
|
|
21
21
|
SendMessageBranch,
|
|
22
22
|
SendMessageDefinition,
|
|
23
|
-
SendMessageInputSchema,
|
|
23
|
+
SendMessageInputSchema2 as SendMessageInputSchema,
|
|
24
24
|
SendMessageOperation,
|
|
25
|
-
SendMessageOutputSchema,
|
|
25
|
+
SendMessageOutputSchema2 as SendMessageOutputSchema,
|
|
26
26
|
WorkspaceDomainDelegationAuthMethodID,
|
|
27
27
|
buildMIMEMessage,
|
|
28
28
|
buildReplyMIMEMessage,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
rfcMessageIDAddress,
|
|
45
45
|
statusFailureKind,
|
|
46
46
|
validateSendInput
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-IAO6TPJ3.js";
|
|
48
48
|
export {
|
|
49
49
|
ConnectorID,
|
|
50
50
|
GetMessageBranch,
|