@marktoflow/integrations 2.0.4-alpha.1 → 2.0.4
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 +2 -2
- package/dist/adapters/claude-code.d.ts +34 -0
- package/dist/adapters/claude-code.d.ts.map +1 -0
- package/dist/adapters/claude-code.js +89 -0
- package/dist/adapters/claude-code.js.map +1 -0
- package/dist/adapters/github-copilot-types.d.ts +2 -2
- package/dist/adapters/github-copilot-workflow.d.ts +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/reliability/index.d.ts +1 -3
- package/dist/reliability/index.d.ts.map +1 -1
- package/dist/reliability/index.js +1 -3
- package/dist/reliability/index.js.map +1 -1
- package/dist/reliability/wrapper.d.ts +0 -9
- package/dist/reliability/wrapper.d.ts.map +1 -1
- package/dist/reliability/wrapper.js +12 -62
- package/dist/reliability/wrapper.js.map +1 -1
- package/dist/services/base-client.d.ts.map +1 -1
- package/dist/services/base-client.js +3 -25
- package/dist/services/base-client.js.map +1 -1
- package/dist/services/discord.d.ts.map +1 -1
- package/dist/services/discord.js +0 -6
- package/dist/services/discord.js.map +1 -1
- package/dist/services/gmail.d.ts.map +1 -1
- package/dist/services/gmail.js +47 -65
- package/dist/services/gmail.js.map +1 -1
- package/dist/services/google-calendar.js +5 -9
- package/dist/services/google-calendar.js.map +1 -1
- package/dist/services/google-docs.js +5 -9
- package/dist/services/google-docs.js.map +1 -1
- package/dist/services/google-drive.js +5 -9
- package/dist/services/google-drive.js.map +1 -1
- package/dist/services/google-sheets.js +5 -9
- package/dist/services/google-sheets.js.map +1 -1
- package/dist/services/http.d.ts.map +1 -1
- package/dist/services/http.js +1 -15
- package/dist/services/http.js.map +1 -1
- package/dist/services/mailchimp.d.ts.map +1 -1
- package/dist/services/mailchimp.js +0 -3
- package/dist/services/mailchimp.js.map +1 -1
- package/dist/services/outlook.d.ts.map +1 -1
- package/dist/services/outlook.js +11 -14
- package/dist/services/outlook.js.map +1 -1
- package/dist/services/shopify.d.ts.map +1 -1
- package/dist/services/shopify.js +0 -3
- package/dist/services/shopify.js.map +1 -1
- package/dist/services/trello.d.ts.map +1 -1
- package/dist/services/trello.js +1 -7
- package/dist/services/trello.js.map +1 -1
- package/package.json +3 -6
- package/dist/adapters/claude-agent-hooks.d.ts +0 -176
- package/dist/reliability/circuit-breaker.d.ts +0 -67
- package/dist/reliability/circuit-breaker.d.ts.map +0 -1
- package/dist/reliability/circuit-breaker.js +0 -164
- package/dist/reliability/circuit-breaker.js.map +0 -1
- package/dist/reliability/rate-limiter.d.ts +0 -62
- package/dist/reliability/rate-limiter.d.ts.map +0 -1
- package/dist/reliability/rate-limiter.js +0 -194
- package/dist/reliability/rate-limiter.js.map +0 -1
- package/dist/services/github.d.ts +0 -3
- package/dist/services/gmail-trigger.d.ts +0 -92
- package/dist/services/gmail.d.ts +0 -116
- package/dist/services/google-calendar.d.ts +0 -220
- package/dist/services/google-docs.d.ts +0 -197
- package/dist/services/google-drive.d.ts +0 -149
- package/dist/services/google-sheets.d.ts +0 -165
- package/dist/services/http.d.ts +0 -120
- package/dist/services/jira.d.ts +0 -3
- package/dist/services/linear.d.ts +0 -163
- package/dist/services/mysql.d.ts +0 -91
- package/dist/services/outlook-trigger.d.ts +0 -121
- package/dist/services/outlook.d.ts +0 -237
- package/dist/services/postgres.d.ts +0 -83
- package/dist/services/rss.d.ts +0 -57
- package/dist/services/rss.d.ts.map +0 -1
- package/dist/services/rss.js +0 -190
- package/dist/services/rss.js.map +0 -1
- package/dist/services/slack-socket.d.ts +0 -18
- package/dist/services/slack.d.ts +0 -3
- package/dist/services/whatsapp.d.ts +0 -311
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rate-limiter.js","sourceRoot":"","sources":["../../src/reliability/rate-limiter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,uB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,CAAC,CAAC;QAClE,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;YAC7B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACpB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAExB,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC9B,aAAa,CAAC,KAAK,CAAC,CAAC;gBACrB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC,EAAE,UAAU,CAAC,CAAC;QAEf,IAAI,KAAK,CAAC,KAAK;YAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;CACF;AAED,mCAAmC;AACnC,IAAI,cAA+C,CAAC;AAEpD,MAAM,UAAU,sBAAsB,CAAC,SAA2C;IAChF,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,cAAc,GAAG,IAAI,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,cAAc,GAAG,SAAS,CAAC;AAC7B,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { gmail_v1 } from 'googleapis';
|
|
2
|
-
import { TriggerType } from '@marktoflow/core';
|
|
3
|
-
export interface GmailTriggerConfig {
|
|
4
|
-
clientId: string;
|
|
5
|
-
clientSecret: string;
|
|
6
|
-
redirectUri: string;
|
|
7
|
-
refreshToken?: string;
|
|
8
|
-
accessToken?: string;
|
|
9
|
-
topicName: string;
|
|
10
|
-
labelIds?: string[];
|
|
11
|
-
triggers: Array<{
|
|
12
|
-
id: string;
|
|
13
|
-
event: 'email_received';
|
|
14
|
-
handler: (payload: GmailTriggerPayload) => Promise<void>;
|
|
15
|
-
}>;
|
|
16
|
-
}
|
|
17
|
-
export interface GmailTriggerPayload {
|
|
18
|
-
type: TriggerType;
|
|
19
|
-
event: 'email_received';
|
|
20
|
-
historyId: string;
|
|
21
|
-
emailAddress: string;
|
|
22
|
-
messages?: gmail_v1.Schema$Message[];
|
|
23
|
-
}
|
|
24
|
-
export interface GmailPubSubMessage {
|
|
25
|
-
message: {
|
|
26
|
-
data: string;
|
|
27
|
-
messageId: string;
|
|
28
|
-
publishTime: string;
|
|
29
|
-
};
|
|
30
|
-
subscription: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Gmail trigger handler for Pub/Sub push notifications.
|
|
34
|
-
*
|
|
35
|
-
* Setup requirements:
|
|
36
|
-
* 1. Create a Google Cloud Pub/Sub topic
|
|
37
|
-
* 2. Create a push subscription pointing to your webhook URL
|
|
38
|
-
* 3. Grant Gmail API watch permissions on your account
|
|
39
|
-
* 4. Call watch() to start receiving notifications
|
|
40
|
-
*/
|
|
41
|
-
export declare class GmailTrigger {
|
|
42
|
-
private config;
|
|
43
|
-
private gmail?;
|
|
44
|
-
private watchExpiration?;
|
|
45
|
-
private lastHistoryId?;
|
|
46
|
-
constructor(config: GmailTriggerConfig);
|
|
47
|
-
/**
|
|
48
|
-
* Initialize the Gmail client
|
|
49
|
-
*/
|
|
50
|
-
private getClient;
|
|
51
|
-
/**
|
|
52
|
-
* Start watching for email notifications via Pub/Sub.
|
|
53
|
-
* This needs to be called initially and periodically (watch expires after ~7 days).
|
|
54
|
-
*/
|
|
55
|
-
watch(): Promise<{
|
|
56
|
-
historyId: string;
|
|
57
|
-
expiration: number;
|
|
58
|
-
}>;
|
|
59
|
-
/**
|
|
60
|
-
* Stop watching for email notifications.
|
|
61
|
-
*/
|
|
62
|
-
stop(): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Check if the watch is still active.
|
|
65
|
-
*/
|
|
66
|
-
isWatchActive(): boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Handle an incoming Pub/Sub push notification.
|
|
69
|
-
* Call this from your webhook endpoint.
|
|
70
|
-
*/
|
|
71
|
-
handlePubSubNotification(notification: GmailPubSubMessage): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Fetch new messages since a given history ID.
|
|
74
|
-
*/
|
|
75
|
-
private fetchNewMessages;
|
|
76
|
-
/**
|
|
77
|
-
* Validate a Pub/Sub push request (basic validation).
|
|
78
|
-
* For production, you should verify the token in the subscription.
|
|
79
|
-
*/
|
|
80
|
-
static validatePubSubRequest(body: unknown): body is GmailPubSubMessage;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Express/Fastify-compatible middleware for handling Gmail Pub/Sub webhooks.
|
|
84
|
-
*/
|
|
85
|
-
export declare function createGmailWebhookHandler(trigger: GmailTrigger): (req: {
|
|
86
|
-
body: unknown;
|
|
87
|
-
}, res: {
|
|
88
|
-
status: (code: number) => {
|
|
89
|
-
send: (body?: string) => void;
|
|
90
|
-
};
|
|
91
|
-
}) => Promise<void>;
|
|
92
|
-
//# sourceMappingURL=gmail-trigger.d.ts.map
|
package/dist/services/gmail.d.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { gmail_v1 } from 'googleapis';
|
|
2
|
-
import { SDKInitializer } from '@marktoflow/core';
|
|
3
|
-
export interface GmailEmail {
|
|
4
|
-
id: string;
|
|
5
|
-
threadId: string;
|
|
6
|
-
subject: string;
|
|
7
|
-
from: string;
|
|
8
|
-
to: string[];
|
|
9
|
-
cc?: string[];
|
|
10
|
-
bcc?: string[];
|
|
11
|
-
date: string;
|
|
12
|
-
snippet: string;
|
|
13
|
-
body?: string;
|
|
14
|
-
bodyHtml?: string;
|
|
15
|
-
labels: string[];
|
|
16
|
-
isUnread: boolean;
|
|
17
|
-
hasAttachments: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface GetEmailsOptions {
|
|
20
|
-
query?: string;
|
|
21
|
-
maxResults?: number;
|
|
22
|
-
labelIds?: string[];
|
|
23
|
-
includeSpamTrash?: boolean;
|
|
24
|
-
pageToken?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface SendEmailOptions {
|
|
27
|
-
to: string | string[];
|
|
28
|
-
subject: string;
|
|
29
|
-
body: string;
|
|
30
|
-
bodyHtml?: string;
|
|
31
|
-
cc?: string | string[];
|
|
32
|
-
bcc?: string | string[];
|
|
33
|
-
replyTo?: string;
|
|
34
|
-
inReplyTo?: string;
|
|
35
|
-
references?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface CreateDraftOptions {
|
|
38
|
-
to: string | string[];
|
|
39
|
-
subject: string;
|
|
40
|
-
body: string;
|
|
41
|
-
bodyHtml?: string;
|
|
42
|
-
cc?: string | string[];
|
|
43
|
-
bcc?: string | string[];
|
|
44
|
-
replyTo?: string;
|
|
45
|
-
threadId?: string;
|
|
46
|
-
}
|
|
47
|
-
export interface GmailDraft {
|
|
48
|
-
id: string;
|
|
49
|
-
messageId: string;
|
|
50
|
-
threadId?: string;
|
|
51
|
-
}
|
|
52
|
-
export interface GetEmailsResult {
|
|
53
|
-
emails: GmailEmail[];
|
|
54
|
-
nextPageToken?: string;
|
|
55
|
-
resultSizeEstimate: number;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Gmail actions for workflow integration
|
|
59
|
-
*/
|
|
60
|
-
export declare class GmailActions {
|
|
61
|
-
private gmail;
|
|
62
|
-
constructor(gmail: gmail_v1.Gmail);
|
|
63
|
-
/**
|
|
64
|
-
* Get emails from Gmail with optional filtering
|
|
65
|
-
*/
|
|
66
|
-
getEmails(options?: GetEmailsOptions): Promise<GetEmailsResult>;
|
|
67
|
-
/**
|
|
68
|
-
* Send an email via Gmail
|
|
69
|
-
*/
|
|
70
|
-
sendEmail(options: SendEmailOptions): Promise<{
|
|
71
|
-
id: string;
|
|
72
|
-
threadId: string;
|
|
73
|
-
}>;
|
|
74
|
-
/**
|
|
75
|
-
* Create a draft email in Gmail
|
|
76
|
-
*/
|
|
77
|
-
createDraft(options: CreateDraftOptions): Promise<GmailDraft>;
|
|
78
|
-
/**
|
|
79
|
-
* Get a specific email by ID
|
|
80
|
-
*/
|
|
81
|
-
getEmail(id: string): Promise<GmailEmail>;
|
|
82
|
-
/**
|
|
83
|
-
* Mark an email as read
|
|
84
|
-
*/
|
|
85
|
-
markAsRead(id: string): Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* Mark an email as unread
|
|
88
|
-
*/
|
|
89
|
-
markAsUnread(id: string): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Add labels to an email
|
|
92
|
-
*/
|
|
93
|
-
addLabels(id: string, labelIds: string[]): Promise<void>;
|
|
94
|
-
/**
|
|
95
|
-
* Remove labels from an email
|
|
96
|
-
*/
|
|
97
|
-
removeLabels(id: string, labelIds: string[]): Promise<void>;
|
|
98
|
-
/**
|
|
99
|
-
* Trash an email
|
|
100
|
-
*/
|
|
101
|
-
trash(id: string): Promise<void>;
|
|
102
|
-
/**
|
|
103
|
-
* Delete an email permanently
|
|
104
|
-
*/
|
|
105
|
-
delete(id: string): Promise<void>;
|
|
106
|
-
/**
|
|
107
|
-
* Get list of labels
|
|
108
|
-
*/
|
|
109
|
-
listLabels(): Promise<{
|
|
110
|
-
id: string;
|
|
111
|
-
name: string;
|
|
112
|
-
type: string;
|
|
113
|
-
}[]>;
|
|
114
|
-
}
|
|
115
|
-
export declare const GmailInitializer: SDKInitializer;
|
|
116
|
-
//# sourceMappingURL=gmail.d.ts.map
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Calendar Integration
|
|
3
|
-
*
|
|
4
|
-
* Calendar and event management.
|
|
5
|
-
* API Docs: https://developers.google.com/calendar/api
|
|
6
|
-
*/
|
|
7
|
-
import { calendar_v3 } from 'googleapis';
|
|
8
|
-
import { SDKInitializer } from '@marktoflow/core';
|
|
9
|
-
export interface CalendarEvent {
|
|
10
|
-
id: string;
|
|
11
|
-
summary: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
location?: string;
|
|
14
|
-
start: {
|
|
15
|
-
dateTime?: string;
|
|
16
|
-
date?: string;
|
|
17
|
-
timeZone?: string;
|
|
18
|
-
};
|
|
19
|
-
end: {
|
|
20
|
-
dateTime?: string;
|
|
21
|
-
date?: string;
|
|
22
|
-
timeZone?: string;
|
|
23
|
-
};
|
|
24
|
-
attendees?: {
|
|
25
|
-
email: string;
|
|
26
|
-
displayName?: string;
|
|
27
|
-
responseStatus?: string;
|
|
28
|
-
}[];
|
|
29
|
-
creator?: {
|
|
30
|
-
email: string;
|
|
31
|
-
displayName?: string;
|
|
32
|
-
};
|
|
33
|
-
organizer?: {
|
|
34
|
-
email: string;
|
|
35
|
-
displayName?: string;
|
|
36
|
-
};
|
|
37
|
-
status?: string;
|
|
38
|
-
htmlLink?: string;
|
|
39
|
-
recurringEventId?: string;
|
|
40
|
-
recurrence?: string[];
|
|
41
|
-
reminders?: {
|
|
42
|
-
useDefault: boolean;
|
|
43
|
-
overrides?: {
|
|
44
|
-
method: string;
|
|
45
|
-
minutes: number;
|
|
46
|
-
}[];
|
|
47
|
-
};
|
|
48
|
-
conferenceData?: {
|
|
49
|
-
conferenceId?: string;
|
|
50
|
-
conferenceSolution?: {
|
|
51
|
-
name: string;
|
|
52
|
-
iconUri?: string;
|
|
53
|
-
};
|
|
54
|
-
entryPoints?: {
|
|
55
|
-
entryPointType: string;
|
|
56
|
-
uri: string;
|
|
57
|
-
label?: string;
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
export interface CalendarInfo {
|
|
62
|
-
id: string;
|
|
63
|
-
summary: string;
|
|
64
|
-
description?: string;
|
|
65
|
-
location?: string;
|
|
66
|
-
timeZone?: string;
|
|
67
|
-
accessRole?: string;
|
|
68
|
-
primary?: boolean;
|
|
69
|
-
}
|
|
70
|
-
export interface CreateEventOptions {
|
|
71
|
-
summary: string;
|
|
72
|
-
description?: string;
|
|
73
|
-
location?: string;
|
|
74
|
-
start: {
|
|
75
|
-
dateTime?: string;
|
|
76
|
-
date?: string;
|
|
77
|
-
timeZone?: string;
|
|
78
|
-
};
|
|
79
|
-
end: {
|
|
80
|
-
dateTime?: string;
|
|
81
|
-
date?: string;
|
|
82
|
-
timeZone?: string;
|
|
83
|
-
};
|
|
84
|
-
attendees?: string[] | {
|
|
85
|
-
email: string;
|
|
86
|
-
displayName?: string;
|
|
87
|
-
}[];
|
|
88
|
-
recurrence?: string[];
|
|
89
|
-
reminders?: {
|
|
90
|
-
useDefault?: boolean;
|
|
91
|
-
overrides?: {
|
|
92
|
-
method: 'email' | 'popup';
|
|
93
|
-
minutes: number;
|
|
94
|
-
}[];
|
|
95
|
-
};
|
|
96
|
-
conferenceData?: {
|
|
97
|
-
createRequest?: {
|
|
98
|
-
requestId: string;
|
|
99
|
-
conferenceSolutionKey?: {
|
|
100
|
-
type: string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
sendUpdates?: 'all' | 'externalOnly' | 'none';
|
|
105
|
-
}
|
|
106
|
-
export interface UpdateEventOptions extends Partial<CreateEventOptions> {
|
|
107
|
-
sendUpdates?: 'all' | 'externalOnly' | 'none';
|
|
108
|
-
}
|
|
109
|
-
export interface ListEventsOptions {
|
|
110
|
-
timeMin?: string;
|
|
111
|
-
timeMax?: string;
|
|
112
|
-
maxResults?: number;
|
|
113
|
-
orderBy?: 'startTime' | 'updated';
|
|
114
|
-
q?: string;
|
|
115
|
-
singleEvents?: boolean;
|
|
116
|
-
showDeleted?: boolean;
|
|
117
|
-
pageToken?: string;
|
|
118
|
-
}
|
|
119
|
-
export interface FreeBusyQuery {
|
|
120
|
-
timeMin: string;
|
|
121
|
-
timeMax: string;
|
|
122
|
-
items: {
|
|
123
|
-
id: string;
|
|
124
|
-
}[];
|
|
125
|
-
timeZone?: string;
|
|
126
|
-
}
|
|
127
|
-
export interface FreeBusyResponse {
|
|
128
|
-
calendars: {
|
|
129
|
-
[calendarId: string]: {
|
|
130
|
-
busy: {
|
|
131
|
-
start: string;
|
|
132
|
-
end: string;
|
|
133
|
-
}[];
|
|
134
|
-
errors?: unknown[];
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Google Calendar actions for workflow integration
|
|
140
|
-
*/
|
|
141
|
-
export declare class GoogleCalendarActions {
|
|
142
|
-
private calendar;
|
|
143
|
-
constructor(calendar: calendar_v3.Calendar);
|
|
144
|
-
/**
|
|
145
|
-
* List user's calendars
|
|
146
|
-
*/
|
|
147
|
-
listCalendars(): Promise<CalendarInfo[]>;
|
|
148
|
-
/**
|
|
149
|
-
* Get a specific calendar
|
|
150
|
-
*/
|
|
151
|
-
getCalendar(calendarId?: string): Promise<CalendarInfo>;
|
|
152
|
-
/**
|
|
153
|
-
* List events from a calendar
|
|
154
|
-
*/
|
|
155
|
-
listEvents(calendarId?: string, options?: ListEventsOptions): Promise<{
|
|
156
|
-
events: CalendarEvent[];
|
|
157
|
-
nextPageToken?: string;
|
|
158
|
-
}>;
|
|
159
|
-
/**
|
|
160
|
-
* Get a specific event
|
|
161
|
-
*/
|
|
162
|
-
getEvent(calendarId: string, eventId: string): Promise<CalendarEvent>;
|
|
163
|
-
/**
|
|
164
|
-
* Create a new event
|
|
165
|
-
*/
|
|
166
|
-
createEvent(calendarId: string | undefined, options: CreateEventOptions): Promise<CalendarEvent>;
|
|
167
|
-
/**
|
|
168
|
-
* Update an existing event
|
|
169
|
-
*/
|
|
170
|
-
updateEvent(calendarId: string, eventId: string, options: UpdateEventOptions): Promise<CalendarEvent>;
|
|
171
|
-
/**
|
|
172
|
-
* Delete an event
|
|
173
|
-
*/
|
|
174
|
-
deleteEvent(calendarId: string, eventId: string, sendUpdates?: 'all' | 'externalOnly' | 'none'): Promise<void>;
|
|
175
|
-
/**
|
|
176
|
-
* Quick add event using natural language
|
|
177
|
-
*/
|
|
178
|
-
quickAddEvent(calendarId: string | undefined, text: string): Promise<CalendarEvent>;
|
|
179
|
-
/**
|
|
180
|
-
* Move event to another calendar
|
|
181
|
-
*/
|
|
182
|
-
moveEvent(sourceCalendarId: string, eventId: string, destinationCalendarId: string): Promise<CalendarEvent>;
|
|
183
|
-
/**
|
|
184
|
-
* Query free/busy information
|
|
185
|
-
*/
|
|
186
|
-
queryFreeBusy(query: FreeBusyQuery): Promise<FreeBusyResponse>;
|
|
187
|
-
/**
|
|
188
|
-
* Create a calendar
|
|
189
|
-
*/
|
|
190
|
-
createCalendar(summary: string, options?: {
|
|
191
|
-
description?: string;
|
|
192
|
-
location?: string;
|
|
193
|
-
timeZone?: string;
|
|
194
|
-
}): Promise<CalendarInfo>;
|
|
195
|
-
/**
|
|
196
|
-
* Delete a calendar
|
|
197
|
-
*/
|
|
198
|
-
deleteCalendar(calendarId: string): Promise<void>;
|
|
199
|
-
/**
|
|
200
|
-
* Watch for changes to a calendar
|
|
201
|
-
*/
|
|
202
|
-
watchEvents(calendarId: string, webhookUrl: string, options?: {
|
|
203
|
-
token?: string;
|
|
204
|
-
expiration?: number;
|
|
205
|
-
}): Promise<{
|
|
206
|
-
id: string;
|
|
207
|
-
resourceId: string;
|
|
208
|
-
expiration: string;
|
|
209
|
-
}>;
|
|
210
|
-
/**
|
|
211
|
-
* Stop watching for changes
|
|
212
|
-
*/
|
|
213
|
-
stopWatching(channelId: string, resourceId: string): Promise<void>;
|
|
214
|
-
/**
|
|
215
|
-
* Parse calendar event from API response
|
|
216
|
-
*/
|
|
217
|
-
private parseEvent;
|
|
218
|
-
}
|
|
219
|
-
export declare const GoogleCalendarInitializer: SDKInitializer;
|
|
220
|
-
//# sourceMappingURL=google-calendar.d.ts.map
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Docs Integration
|
|
3
|
-
*
|
|
4
|
-
* Document creation and editing platform.
|
|
5
|
-
* API Docs: https://developers.google.com/docs/api
|
|
6
|
-
*/
|
|
7
|
-
import { docs_v1 } from 'googleapis';
|
|
8
|
-
import { SDKInitializer } from '@marktoflow/core';
|
|
9
|
-
export interface Document {
|
|
10
|
-
documentId: string;
|
|
11
|
-
title: string;
|
|
12
|
-
body?: DocumentBody;
|
|
13
|
-
revisionId?: string;
|
|
14
|
-
suggestionsViewMode?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface DocumentBody {
|
|
17
|
-
content: StructuralElement[];
|
|
18
|
-
}
|
|
19
|
-
export interface StructuralElement {
|
|
20
|
-
startIndex?: number;
|
|
21
|
-
endIndex?: number;
|
|
22
|
-
paragraph?: Paragraph;
|
|
23
|
-
table?: Table;
|
|
24
|
-
sectionBreak?: unknown;
|
|
25
|
-
}
|
|
26
|
-
export interface Paragraph {
|
|
27
|
-
elements: ParagraphElement[];
|
|
28
|
-
paragraphStyle?: ParagraphStyle;
|
|
29
|
-
}
|
|
30
|
-
export interface ParagraphElement {
|
|
31
|
-
startIndex?: number;
|
|
32
|
-
endIndex?: number;
|
|
33
|
-
textRun?: TextRun;
|
|
34
|
-
}
|
|
35
|
-
export interface TextRun {
|
|
36
|
-
content: string;
|
|
37
|
-
textStyle?: TextStyle;
|
|
38
|
-
}
|
|
39
|
-
export interface TextStyle {
|
|
40
|
-
bold?: boolean;
|
|
41
|
-
italic?: boolean;
|
|
42
|
-
underline?: boolean;
|
|
43
|
-
strikethrough?: boolean;
|
|
44
|
-
fontSize?: {
|
|
45
|
-
magnitude: number;
|
|
46
|
-
unit: string;
|
|
47
|
-
};
|
|
48
|
-
foregroundColor?: Color;
|
|
49
|
-
backgroundColor?: Color;
|
|
50
|
-
link?: {
|
|
51
|
-
url: string;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export interface ParagraphStyle {
|
|
55
|
-
headingId?: string;
|
|
56
|
-
namedStyleType?: string;
|
|
57
|
-
alignment?: string;
|
|
58
|
-
lineSpacing?: number;
|
|
59
|
-
direction?: string;
|
|
60
|
-
spacingMode?: string;
|
|
61
|
-
spaceAbove?: {
|
|
62
|
-
magnitude: number;
|
|
63
|
-
unit: string;
|
|
64
|
-
};
|
|
65
|
-
spaceBelow?: {
|
|
66
|
-
magnitude: number;
|
|
67
|
-
unit: string;
|
|
68
|
-
};
|
|
69
|
-
indentFirstLine?: {
|
|
70
|
-
magnitude: number;
|
|
71
|
-
unit: string;
|
|
72
|
-
};
|
|
73
|
-
indentStart?: {
|
|
74
|
-
magnitude: number;
|
|
75
|
-
unit: string;
|
|
76
|
-
};
|
|
77
|
-
indentEnd?: {
|
|
78
|
-
magnitude: number;
|
|
79
|
-
unit: string;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
export interface Color {
|
|
83
|
-
rgbColor?: {
|
|
84
|
-
red: number;
|
|
85
|
-
green: number;
|
|
86
|
-
blue: number;
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
export interface Table {
|
|
90
|
-
rows: number;
|
|
91
|
-
columns: number;
|
|
92
|
-
tableRows: TableRow[];
|
|
93
|
-
}
|
|
94
|
-
export interface TableRow {
|
|
95
|
-
tableCells: TableCell[];
|
|
96
|
-
}
|
|
97
|
-
export interface TableCell {
|
|
98
|
-
content: StructuralElement[];
|
|
99
|
-
}
|
|
100
|
-
export interface CreateDocumentOptions {
|
|
101
|
-
title: string;
|
|
102
|
-
}
|
|
103
|
-
export interface InsertTextOptions {
|
|
104
|
-
text: string;
|
|
105
|
-
index?: number;
|
|
106
|
-
}
|
|
107
|
-
export interface DeleteContentOptions {
|
|
108
|
-
startIndex: number;
|
|
109
|
-
endIndex: number;
|
|
110
|
-
}
|
|
111
|
-
export interface FormatTextOptions {
|
|
112
|
-
startIndex: number;
|
|
113
|
-
endIndex: number;
|
|
114
|
-
bold?: boolean;
|
|
115
|
-
italic?: boolean;
|
|
116
|
-
underline?: boolean;
|
|
117
|
-
fontSize?: number;
|
|
118
|
-
foregroundColor?: {
|
|
119
|
-
red: number;
|
|
120
|
-
green: number;
|
|
121
|
-
blue: number;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
export interface InsertTableOptions {
|
|
125
|
-
rows: number;
|
|
126
|
-
columns: number;
|
|
127
|
-
index?: number;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Google Docs actions for workflow integration
|
|
131
|
-
*/
|
|
132
|
-
export declare class GoogleDocsActions {
|
|
133
|
-
private docs;
|
|
134
|
-
constructor(docs: docs_v1.Docs);
|
|
135
|
-
/**
|
|
136
|
-
* Get a document by ID
|
|
137
|
-
*/
|
|
138
|
-
getDocument(documentId: string): Promise<Document>;
|
|
139
|
-
/**
|
|
140
|
-
* Create a new document
|
|
141
|
-
*/
|
|
142
|
-
createDocument(options: CreateDocumentOptions): Promise<Document>;
|
|
143
|
-
/**
|
|
144
|
-
* Get document text content
|
|
145
|
-
*/
|
|
146
|
-
getDocumentText(documentId: string): Promise<string>;
|
|
147
|
-
/**
|
|
148
|
-
* Insert text into a document
|
|
149
|
-
*/
|
|
150
|
-
insertText(documentId: string, options: InsertTextOptions): Promise<void>;
|
|
151
|
-
/**
|
|
152
|
-
* Append text to the end of a document
|
|
153
|
-
*/
|
|
154
|
-
appendText(documentId: string, text: string): Promise<void>;
|
|
155
|
-
/**
|
|
156
|
-
* Delete content from a document
|
|
157
|
-
*/
|
|
158
|
-
deleteContent(documentId: string, options: DeleteContentOptions): Promise<void>;
|
|
159
|
-
/**
|
|
160
|
-
* Replace all occurrences of text
|
|
161
|
-
*/
|
|
162
|
-
replaceAllText(documentId: string, find: string, replace: string, matchCase?: boolean): Promise<number>;
|
|
163
|
-
/**
|
|
164
|
-
* Format text
|
|
165
|
-
*/
|
|
166
|
-
formatText(documentId: string, options: FormatTextOptions): Promise<void>;
|
|
167
|
-
/**
|
|
168
|
-
* Insert a table
|
|
169
|
-
*/
|
|
170
|
-
insertTable(documentId: string, options: InsertTableOptions): Promise<void>;
|
|
171
|
-
/**
|
|
172
|
-
* Insert a page break
|
|
173
|
-
*/
|
|
174
|
-
insertPageBreak(documentId: string, index?: number): Promise<void>;
|
|
175
|
-
/**
|
|
176
|
-
* Create a named range
|
|
177
|
-
*/
|
|
178
|
-
createNamedRange(documentId: string, name: string, startIndex: number, endIndex: number): Promise<string>;
|
|
179
|
-
/**
|
|
180
|
-
* Update paragraph style
|
|
181
|
-
*/
|
|
182
|
-
updateParagraphStyle(documentId: string, startIndex: number, endIndex: number, style: {
|
|
183
|
-
headingId?: string;
|
|
184
|
-
namedStyleType?: string;
|
|
185
|
-
alignment?: 'ALIGNMENT_UNSPECIFIED' | 'START' | 'CENTER' | 'END' | 'JUSTIFIED';
|
|
186
|
-
}): Promise<void>;
|
|
187
|
-
/**
|
|
188
|
-
* Insert inline image
|
|
189
|
-
*/
|
|
190
|
-
insertImage(documentId: string, imageUri: string, index?: number): Promise<void>;
|
|
191
|
-
/**
|
|
192
|
-
* Batch update operations
|
|
193
|
-
*/
|
|
194
|
-
batchUpdate(documentId: string, requests: docs_v1.Schema$Request[]): Promise<docs_v1.Schema$BatchUpdateDocumentResponse>;
|
|
195
|
-
}
|
|
196
|
-
export declare const GoogleDocsInitializer: SDKInitializer;
|
|
197
|
-
//# sourceMappingURL=google-docs.d.ts.map
|