@superdurable/connector-google-gmail 0.1.0 → 0.1.1

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/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-ce8JHjE8.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-ce8JHjE8.cjs';
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
- /** Stable getMessage routes. */
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
- /** Stable sendMessage routes. */
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
- /** Stable replyToMessage routes. */
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-derived getMessage definition. */
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
- /** Application wiring for one getMessage Query Step. */
241
+ /** Configuration for the public getMessage Step. */
242
242
  interface GetMessageStepConfig<StepInput> extends Omit<QueryStepConfig<StepInput, GetMessageInput, Message>, 'operation' | 'connection' | 'branches'> {
243
- /** Static name declared by the consuming application. */ connectionName: string;
244
- /** Gmail provider or scripted mock connection. */ connection: GmailConnection;
245
- /** Receiver for a successfully read message. */ read: StepTarget<QueryResult<Message>>;
246
- /** Optional receiver for a missing message. */ notFound?: StepTarget<QueryResult<Message>>;
247
- /** Optional receiver for a conclusive provider refusal. */ providerRejected?: StepTarget<QueryResult<Message>>;
248
- /** Optional receiver for an invalid provider response. */ invalidResponse?: StepTarget<QueryResult<Message>>;
249
- /** Optional receiver for a local defect. */ defect?: StepTarget<QueryResult<Message>>;
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
- /** Application wiring for one sendMessage Mutation Step. */
251
+ /** Configuration for the public sendMessage Step. */
252
252
  interface SendMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, SendMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
253
- /** Static name declared by the consuming application. */ connectionName: string;
254
- /** Gmail provider or scripted mock connection. */ connection: GmailConnection;
255
- /** Receiver after Gmail accepts the message. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
256
- /** Optional receiver for a conclusive provider refusal. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
257
- /** Optional receiver for a local defect. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
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
- /** Application wiring for one replyToMessage Mutation Step. */
259
+ /** Configuration for the public replyToMessage Step. */
260
260
  interface ReplyToMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, ReplyToMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
261
- /** Static name declared by the consuming application. */ connectionName: string;
262
- /** Gmail provider or scripted mock connection. */ connection: GmailConnection;
263
- /** Receiver after Gmail accepts the reply. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
264
- /** Optional receiver for a conclusive provider refusal. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
265
- /** Optional receiver for an invalid source response. */ invalidResponse?: StepTarget<MutationResult<SendMessageOutput>>;
266
- /** Optional receiver for a local defect. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
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
- /** Construct the operation-specific Gmail message read Step. */
268
+ /** Build a Gmail read Step with its typed connection. */
269
269
  declare function newGetMessageStep<StepInput>(configuration: GetMessageStepConfig<StepInput>): QueryStep<StepInput, GetMessageInput, Message>;
270
- /** Construct the operation-specific Gmail send Step. */
270
+ /** Build a Gmail send Step with its typed connection. */
271
271
  declare function newSendMessageStep<StepInput>(configuration: SendMessageStepConfig<StepInput>): MutationStep<StepInput, SendMessageInput, SendMessageOutput>;
272
- /** Construct the operation-specific Gmail reply Step. */
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-ce8JHjE8.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-ce8JHjE8.js';
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
- /** Stable getMessage routes. */
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
- /** Stable sendMessage routes. */
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
- /** Stable replyToMessage routes. */
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-derived getMessage definition. */
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
- /** Application wiring for one getMessage Query Step. */
241
+ /** Configuration for the public getMessage Step. */
242
242
  interface GetMessageStepConfig<StepInput> extends Omit<QueryStepConfig<StepInput, GetMessageInput, Message>, 'operation' | 'connection' | 'branches'> {
243
- /** Static name declared by the consuming application. */ connectionName: string;
244
- /** Gmail provider or scripted mock connection. */ connection: GmailConnection;
245
- /** Receiver for a successfully read message. */ read: StepTarget<QueryResult<Message>>;
246
- /** Optional receiver for a missing message. */ notFound?: StepTarget<QueryResult<Message>>;
247
- /** Optional receiver for a conclusive provider refusal. */ providerRejected?: StepTarget<QueryResult<Message>>;
248
- /** Optional receiver for an invalid provider response. */ invalidResponse?: StepTarget<QueryResult<Message>>;
249
- /** Optional receiver for a local defect. */ defect?: StepTarget<QueryResult<Message>>;
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
- /** Application wiring for one sendMessage Mutation Step. */
251
+ /** Configuration for the public sendMessage Step. */
252
252
  interface SendMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, SendMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
253
- /** Static name declared by the consuming application. */ connectionName: string;
254
- /** Gmail provider or scripted mock connection. */ connection: GmailConnection;
255
- /** Receiver after Gmail accepts the message. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
256
- /** Optional receiver for a conclusive provider refusal. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
257
- /** Optional receiver for a local defect. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
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
- /** Application wiring for one replyToMessage Mutation Step. */
259
+ /** Configuration for the public replyToMessage Step. */
260
260
  interface ReplyToMessageStepConfig<StepInput> extends Omit<MutationStepConfig<StepInput, ReplyToMessageInput, SendMessageOutput>, 'operation' | 'connection' | 'branches'> {
261
- /** Static name declared by the consuming application. */ connectionName: string;
262
- /** Gmail provider or scripted mock connection. */ connection: GmailConnection;
263
- /** Receiver after Gmail accepts the reply. */ sent: StepTarget<MutationResult<SendMessageOutput>>;
264
- /** Optional receiver for a conclusive provider refusal. */ providerRejected?: StepTarget<MutationResult<SendMessageOutput>>;
265
- /** Optional receiver for an invalid source response. */ invalidResponse?: StepTarget<MutationResult<SendMessageOutput>>;
266
- /** Optional receiver for a local defect. */ defect?: StepTarget<MutationResult<SendMessageOutput>>;
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
- /** Construct the operation-specific Gmail message read Step. */
268
+ /** Build a Gmail read Step with its typed connection. */
269
269
  declare function newGetMessageStep<StepInput>(configuration: GetMessageStepConfig<StepInput>): QueryStep<StepInput, GetMessageInput, Message>;
270
- /** Construct the operation-specific Gmail send Step. */
270
+ /** Build a Gmail send Step with its typed connection. */
271
271
  declare function newSendMessageStep<StepInput>(configuration: SendMessageStepConfig<StepInput>): MutationStep<StepInput, SendMessageInput, SendMessageOutput>;
272
- /** Construct the operation-specific Gmail reply Step. */
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-C6LCJ6ZY.js";
47
+ } from "./chunk-TWBWDIC7.js";
48
48
  export {
49
49
  ConnectorID,
50
50
  GetMessageBranch,