@kamilio/wire 0.1.2 → 0.1.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.
Files changed (110) hide show
  1. package/README.md +1 -1
  2. package/bin/wire-mcp.mjs +1 -1
  3. package/dist/adapters/root.d.ts +5 -2
  4. package/dist/adapters/root.d.ts.map +1 -1
  5. package/dist/adapters/root.js +58 -30
  6. package/dist/adapters/root.js.map +1 -1
  7. package/dist/auth.d.ts.map +1 -1
  8. package/dist/auth.js +9 -36
  9. package/dist/auth.js.map +1 -1
  10. package/dist/cli.js +2 -2
  11. package/dist/cli.js.map +1 -1
  12. package/dist/executable.d.ts +3 -1
  13. package/dist/executable.d.ts.map +1 -1
  14. package/dist/executable.js +38 -12
  15. package/dist/executable.js.map +1 -1
  16. package/dist/hooks.d.ts.map +1 -1
  17. package/dist/hooks.js +22 -7
  18. package/dist/hooks.js.map +1 -1
  19. package/node_modules/provider-asana/dist/asana-project.d.ts.map +1 -1
  20. package/node_modules/provider-asana/dist/asana-project.js +3 -0
  21. package/node_modules/provider-asana/dist/asana-project.js.map +1 -1
  22. package/node_modules/provider-asana/src/asana-project.ts +2 -0
  23. package/node_modules/provider-chatgpt/dist/chatgpt.d.ts.map +1 -1
  24. package/node_modules/provider-chatgpt/dist/chatgpt.js +24 -3
  25. package/node_modules/provider-chatgpt/dist/chatgpt.js.map +1 -1
  26. package/node_modules/provider-chatgpt/src/chatgpt.ts +21 -3
  27. package/node_modules/provider-gmail/dist/gmail.d.ts.map +1 -1
  28. package/node_modules/provider-gmail/dist/gmail.js +8 -2
  29. package/node_modules/provider-gmail/dist/gmail.js.map +1 -1
  30. package/node_modules/provider-gmail/src/gmail.ts +8 -2
  31. package/node_modules/provider-google-docs/dist/google-docs.d.ts.map +1 -1
  32. package/node_modules/provider-google-docs/dist/google-docs.js +373 -9
  33. package/node_modules/provider-google-docs/dist/google-docs.js.map +1 -1
  34. package/node_modules/provider-google-docs/dist/google-forms.d.ts +28 -0
  35. package/node_modules/provider-google-docs/dist/google-forms.d.ts.map +1 -0
  36. package/node_modules/provider-google-docs/dist/google-forms.js +191 -0
  37. package/node_modules/provider-google-docs/dist/google-forms.js.map +1 -0
  38. package/node_modules/provider-google-docs/dist/index.d.ts +26 -0
  39. package/node_modules/provider-google-docs/dist/index.d.ts.map +1 -1
  40. package/node_modules/provider-google-docs/dist/index.js +3 -1
  41. package/node_modules/provider-google-docs/dist/index.js.map +1 -1
  42. package/node_modules/provider-google-docs/src/google-docs.ts +342 -10
  43. package/node_modules/provider-google-docs/src/google-forms.ts +179 -0
  44. package/node_modules/provider-google-docs/src/index.ts +3 -1
  45. package/node_modules/provider-notion/dist/notion-sync.d.ts +2 -2
  46. package/node_modules/provider-notion/dist/notion-sync.d.ts.map +1 -1
  47. package/node_modules/provider-notion/dist/notion-sync.js +89 -38
  48. package/node_modules/provider-notion/dist/notion-sync.js.map +1 -1
  49. package/node_modules/provider-notion/dist/notion.js +1 -1
  50. package/node_modules/provider-notion/dist/notion.js.map +1 -1
  51. package/node_modules/provider-notion/src/notion-sync.ts +90 -35
  52. package/node_modules/provider-notion/src/notion.ts +1 -1
  53. package/node_modules/provider-slack/dist/slack.d.ts.map +1 -1
  54. package/node_modules/provider-slack/dist/slack.js +14 -7
  55. package/node_modules/provider-slack/dist/slack.js.map +1 -1
  56. package/node_modules/provider-slack/src/slack.ts +14 -5
  57. package/node_modules/provider-zoom/dist/zoom-hub.d.ts.map +1 -1
  58. package/node_modules/provider-zoom/dist/zoom-hub.js +42 -35
  59. package/node_modules/provider-zoom/dist/zoom-hub.js.map +1 -1
  60. package/node_modules/provider-zoom/src/zoom-hub.ts +40 -35
  61. package/node_modules/wire-core/dist/core/model.d.ts +1 -1
  62. package/node_modules/wire-core/dist/core/model.d.ts.map +1 -1
  63. package/node_modules/wire-core/dist/core/transform.d.ts +1 -0
  64. package/node_modules/wire-core/dist/core/transform.d.ts.map +1 -1
  65. package/node_modules/wire-core/dist/core/transform.js +4 -0
  66. package/node_modules/wire-core/dist/core/transform.js.map +1 -1
  67. package/node_modules/wire-core/dist/index.d.ts +3 -2
  68. package/node_modules/wire-core/dist/index.d.ts.map +1 -1
  69. package/node_modules/wire-core/dist/index.js +2 -2
  70. package/node_modules/wire-core/dist/index.js.map +1 -1
  71. package/node_modules/wire-core/dist/operations.d.ts +3 -0
  72. package/node_modules/wire-core/dist/operations.d.ts.map +1 -1
  73. package/node_modules/wire-core/dist/operations.js +50 -9
  74. package/node_modules/wire-core/dist/operations.js.map +1 -1
  75. package/node_modules/wire-core/dist/ports.d.ts +1 -0
  76. package/node_modules/wire-core/dist/ports.d.ts.map +1 -1
  77. package/node_modules/wire-core/dist/runtime/chrome.d.ts +1 -0
  78. package/node_modules/wire-core/dist/runtime/chrome.d.ts.map +1 -1
  79. package/node_modules/wire-core/dist/runtime/chrome.js +91 -83
  80. package/node_modules/wire-core/dist/runtime/chrome.js.map +1 -1
  81. package/node_modules/wire-core/dist/runtime/cookies.d.ts.map +1 -1
  82. package/node_modules/wire-core/dist/runtime/cookies.js +7 -2
  83. package/node_modules/wire-core/dist/runtime/cookies.js.map +1 -1
  84. package/node_modules/wire-core/dist/runtime/node.d.ts.map +1 -1
  85. package/node_modules/wire-core/dist/runtime/node.js +4 -0
  86. package/node_modules/wire-core/dist/runtime/node.js.map +1 -1
  87. package/node_modules/wire-core/dist/storage/registry.d.ts.map +1 -1
  88. package/node_modules/wire-core/dist/storage/registry.js +95 -208
  89. package/node_modules/wire-core/dist/storage/registry.js.map +1 -1
  90. package/node_modules/wire-core/dist/storage/workspace.d.ts +3 -0
  91. package/node_modules/wire-core/dist/storage/workspace.d.ts.map +1 -1
  92. package/node_modules/wire-core/dist/storage/workspace.js +10 -1
  93. package/node_modules/wire-core/dist/storage/workspace.js.map +1 -1
  94. package/node_modules/wire-core/package.json +4 -0
  95. package/node_modules/wire-core/src/core/model.ts +1 -1
  96. package/node_modules/wire-core/src/core/transform.ts +5 -1
  97. package/node_modules/wire-core/src/index.ts +3 -2
  98. package/node_modules/wire-core/src/operations.ts +56 -10
  99. package/node_modules/wire-core/src/ports.ts +1 -0
  100. package/node_modules/wire-core/src/runtime/chrome.ts +99 -80
  101. package/node_modules/wire-core/src/runtime/cookies.ts +4 -2
  102. package/node_modules/wire-core/src/runtime/node.ts +4 -0
  103. package/node_modules/wire-core/src/storage/registry.ts +48 -15
  104. package/node_modules/wire-core/src/storage/workspace.ts +10 -1
  105. package/package.json +1 -1
  106. package/src/adapters/root.ts +51 -31
  107. package/src/auth.ts +10 -29
  108. package/src/cli.ts +2 -2
  109. package/src/executable.ts +38 -12
  110. package/src/hooks.ts +21 -6
@@ -0,0 +1,28 @@
1
+ import type { JsonValue, RuntimeCapabilities, Source } from "wire-core";
2
+ export declare const googleFormsService: Readonly<{
3
+ name: string;
4
+ matches(url: URL): boolean;
5
+ parse(url: URL): Source;
6
+ fetch(input: RuntimeCapabilities, url: string, source: Readonly<{
7
+ [key: string]: JsonValue;
8
+ service: string;
9
+ identifier: string;
10
+ type: import("wire-core").ResourceType;
11
+ }>): Promise<Readonly<{
12
+ title: string;
13
+ markdown: string;
14
+ data: JsonValue;
15
+ }>>;
16
+ synchronize?(input: RuntimeCapabilities, url: string, source: Readonly<{
17
+ [key: string]: JsonValue;
18
+ service: string;
19
+ identifier: string;
20
+ type: import("wire-core").ResourceType;
21
+ }>, base: JsonValue, markdown: string, markdownPath: string): Promise<Readonly<{
22
+ title: string;
23
+ markdown: string;
24
+ data: JsonValue;
25
+ }>>;
26
+ upload?(input: RuntimeCapabilities, markdown: string, markdownPath: string): Promise<import("wire-core").UploadedDocument>;
27
+ }>;
28
+ //# sourceMappingURL=google-forms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-forms.d.ts","sourceRoot":"","sources":["../src/google-forms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA+B,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAuKrG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;EAU7B,CAAC"}
@@ -0,0 +1,191 @@
1
+ import { defineService } from "wire-core";
2
+ function formId(url) {
3
+ return /^\/forms(?:\/u\/\d+)?\/d\/([^/]+)(?:\/.*)?$/.exec(url.pathname)[1];
4
+ }
5
+ function formUrl(id) {
6
+ return `https://docs.google.com/forms/d/${encodeURIComponent(id)}/edit`;
7
+ }
8
+ function formsAuthError() {
9
+ return new Error("Google Forms API authentication is missing or expired. Set GOOGLE_FORMS_TOKEN_FILE to an OAuth token with Forms scopes, then retry.");
10
+ }
11
+ function apiDisabledError(body) {
12
+ const error = body["error"];
13
+ if (error === undefined)
14
+ return null;
15
+ const details = Array.isArray(error["details"]) ? error["details"] : [];
16
+ const serviceDisabled = details.find((detail) => {
17
+ const metadata = detail["metadata"];
18
+ return metadata !== undefined && metadata["service"] === "forms.googleapis.com";
19
+ });
20
+ if (serviceDisabled === undefined)
21
+ return null;
22
+ const metadata = serviceDisabled["metadata"];
23
+ const activationUrl = typeof metadata["activationUrl"] === "string" ? metadata["activationUrl"] : typeof metadata["containerInfo"] === "string" ? `https://console.developers.google.com/apis/api/forms.googleapis.com/overview?project=${metadata["containerInfo"]}` : "https://console.developers.google.com/apis/api/forms.googleapis.com/overview";
24
+ return new Error(`Google Forms API is disabled. Enable it at ${activationUrl} then retry.`);
25
+ }
26
+ async function formsJson(runtime, url, label) {
27
+ const token = await runtime.googleFormsTokens.load();
28
+ const response = await runtime.http.request(url, { headers: { authorization: `Bearer ${token.token}` } });
29
+ const text = await response.text();
30
+ const body = text === "" ? {} : JSON.parse(text);
31
+ if (response.status === 401)
32
+ throw formsAuthError();
33
+ if (!response.ok) {
34
+ const disabled = apiDisabledError(body);
35
+ if (disabled !== null)
36
+ throw disabled;
37
+ const error = body["error"];
38
+ const message = typeof error?.["message"] === "string" ? error["message"] : text;
39
+ if (response.status === 403 && /insufficient authentication scopes/i.test(message))
40
+ throw new Error("Google Forms API token is missing required scopes. Regenerate GOOGLE_FORMS_TOKEN_FILE with forms.body and forms.responses.readonly scopes.");
41
+ throw new Error(`Google Forms API ${label} failed: HTTP ${response.status}${message === "" ? "" : ` ${message}`}`);
42
+ }
43
+ return body;
44
+ }
45
+ function optionalString(value) {
46
+ return typeof value === "string" && value !== "" ? value : null;
47
+ }
48
+ function jsonObject(value) {
49
+ return typeof value === "object" && value !== null && !Array.isArray(value);
50
+ }
51
+ function optionsMarkdown(options) {
52
+ if (!Array.isArray(options))
53
+ return null;
54
+ return options.map((option) => {
55
+ const object = option;
56
+ return object["value"];
57
+ }).join(", ");
58
+ }
59
+ function questionMarkdown(item) {
60
+ const lines = [`- ${item["title"]}`];
61
+ const questionItem = item["questionItem"];
62
+ if (questionItem === undefined)
63
+ return lines;
64
+ const question = questionItem["question"];
65
+ lines.push(` - itemId: ${item["itemId"]}`);
66
+ lines.push(` - questionId: ${question["questionId"]}`);
67
+ if (question["required"] !== undefined)
68
+ lines.push(` - required: ${String(question["required"])}`);
69
+ const textQuestion = question["textQuestion"];
70
+ if (textQuestion !== undefined)
71
+ lines.push(` - type: ${textQuestion["paragraph"] === true ? "paragraph" : "short_text"}`);
72
+ const choiceQuestion = question["choiceQuestion"];
73
+ if (choiceQuestion !== undefined) {
74
+ lines.push(` - type: ${choiceQuestion["type"]}`);
75
+ const options = optionsMarkdown(choiceQuestion["options"]);
76
+ if (options !== null)
77
+ lines.push(` - options: ${options}`);
78
+ }
79
+ const scaleQuestion = question["scaleQuestion"];
80
+ if (scaleQuestion !== undefined) {
81
+ lines.push(" - type: scale");
82
+ lines.push(` - range: ${String(scaleQuestion["low"])} to ${String(scaleQuestion["high"])}`);
83
+ const lowLabel = optionalString(scaleQuestion["lowLabel"]);
84
+ const highLabel = optionalString(scaleQuestion["highLabel"]);
85
+ if (lowLabel !== null)
86
+ lines.push(` - lowLabel: ${lowLabel}`);
87
+ if (highLabel !== null)
88
+ lines.push(` - highLabel: ${highLabel}`);
89
+ }
90
+ if (question["dateQuestion"] !== undefined)
91
+ lines.push(" - type: date");
92
+ if (question["timeQuestion"] !== undefined)
93
+ lines.push(" - type: time");
94
+ const ratingQuestion = question["ratingQuestion"];
95
+ if (ratingQuestion !== undefined) {
96
+ lines.push(" - type: rating");
97
+ lines.push(` - level: ${String(ratingQuestion["ratingScaleLevel"])}`);
98
+ lines.push(` - icon: ${String(ratingQuestion["iconType"])}`);
99
+ }
100
+ if (question["fileUploadQuestion"] !== undefined)
101
+ lines.push(" - type: file_upload");
102
+ if (question["rowQuestion"] !== undefined)
103
+ lines.push(" - type: row");
104
+ return lines;
105
+ }
106
+ function answerTexts(answer) {
107
+ const textAnswers = answer["textAnswers"];
108
+ if (textAnswers !== undefined && Array.isArray(textAnswers["answers"]))
109
+ return textAnswers["answers"].map((value) => value["value"]);
110
+ return [JSON.stringify(answer)];
111
+ }
112
+ function formAnswers(response) {
113
+ const answers = response["answers"];
114
+ if (answers === undefined)
115
+ return [];
116
+ return Object.entries(answers).flatMap(([questionId, answer]) => answerTexts(answer).map((text) => ({ questionId, text })));
117
+ }
118
+ function formMarkdown(form, responses) {
119
+ const info = form["info"];
120
+ const title = info["title"];
121
+ const id = form["formId"];
122
+ const lines = [`# ${title}`, "", `- Form ID: ${id}`, `- Edit: ${formUrl(id)}`];
123
+ const responder = optionalString(form["responderUri"]);
124
+ if (responder !== null)
125
+ lines.push(`- Responder: ${responder}`);
126
+ const publish = form["publishSettings"]?.["publishState"];
127
+ if (publish !== undefined) {
128
+ lines.push(`- Published: ${String(publish["isPublished"])}`);
129
+ lines.push(`- Accepting responses: ${String(publish["isAcceptingResponses"])}`);
130
+ }
131
+ lines.push("", "## Items");
132
+ const items = form["items"];
133
+ if (items === undefined || items.length === 0)
134
+ lines.push("No items.");
135
+ else
136
+ for (const item of items)
137
+ lines.push(...questionMarkdown(item));
138
+ lines.push("", "## Responses", "", `Response count: ${responses.length}`);
139
+ for (const response of responses) {
140
+ lines.push("", `### ${response["responseId"]}`);
141
+ const createTime = optionalString(response["createTime"]);
142
+ const submitted = optionalString(response["lastSubmittedTime"]);
143
+ if (createTime !== null)
144
+ lines.push(`- Created: ${createTime}`);
145
+ if (submitted !== null)
146
+ lines.push(`- Submitted: ${submitted}`);
147
+ for (const answer of formAnswers(response))
148
+ lines.push(`- ${answer.questionId}: ${answer.text}`);
149
+ }
150
+ return `${lines.join("\n")}\n`;
151
+ }
152
+ async function allResponses(runtime, id) {
153
+ const responses = [];
154
+ let pageToken;
155
+ for (;;) {
156
+ const url = new URL(`https://forms.googleapis.com/v1/forms/${encodeURIComponent(id)}/responses`);
157
+ if (pageToken !== undefined)
158
+ url.searchParams.set("pageToken", pageToken);
159
+ const body = await formsJson(runtime, url.toString(), "responses.list");
160
+ if (Array.isArray(body["responses"]))
161
+ responses.push(...body["responses"]);
162
+ if (typeof body["nextPageToken"] !== "string")
163
+ break;
164
+ pageToken = body["nextPageToken"];
165
+ }
166
+ return responses;
167
+ }
168
+ async function fetchGoogleForm(runtime, source) {
169
+ const form = await formsJson(runtime, `https://forms.googleapis.com/v1/forms/${encodeURIComponent(source.identifier)}`, "forms.get");
170
+ const responses = await allResponses(runtime, source.identifier);
171
+ const info = form["info"];
172
+ const markdown = formMarkdown(form, responses);
173
+ return Object.freeze({
174
+ title: info["title"],
175
+ markdown,
176
+ data: { form, responses, markdown },
177
+ });
178
+ }
179
+ export const googleFormsService = defineService({
180
+ name: "google-forms",
181
+ matches: (url) => url.hostname === "docs.google.com" && /^\/forms(?:\/u\/\d+)?\/d\/[^/]+(?:\/.*)?$/.test(url.pathname),
182
+ parse: (url) => Object.freeze({ service: "google-forms", identifier: formId(url), type: "form" }),
183
+ fetch: (runtime, _url, source) => fetchGoogleForm(runtime, source),
184
+ synchronize: async (runtime, _url, source, base, markdown) => {
185
+ const baseMarkdown = jsonObject(base) && typeof base["markdown"] === "string" ? base["markdown"] : null;
186
+ if (baseMarkdown !== null && markdown !== baseMarkdown)
187
+ throw new Error("Google Forms sync is download-only. Revert local edits or use `wire download <url>` for a fresh copy.");
188
+ return fetchGoogleForm(runtime, source);
189
+ },
190
+ });
191
+ //# sourceMappingURL=google-forms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-forms.js","sourceRoot":"","sources":["../src/google-forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAK1C,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,6CAA6C,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,CAAC,CAAE,CAAC;AAC/E,CAAC;AAED,SAAS,OAAO,CAAC,EAAU;IACzB,OAAO,mCAAmC,kBAAkB,CAAC,EAAE,CAAC,OAAO,CAAC;AAC1E,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,IAAI,KAAK,CAAC,qIAAqI,CAAC,CAAC;AAC1J,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAgB;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAA2B,CAAC;IACtD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAA0B,CAAC,CAAC,CAAC,EAAE,CAAC;IACjG,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QAC9C,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAA2B,CAAC;QAC9D,OAAO,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,SAAS,CAAC,KAAK,sBAAsB,CAAC;IAClF,CAAC,CAAC,CAAC;IACH,IAAI,eAAe,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAe,CAAC;IAC3D,MAAM,aAAa,GAAG,OAAO,QAAQ,CAAC,eAAe,CAAC,KAAK,QA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AAC;CACF,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { googleDocsService } from "./google-docs.js";
2
+ export { googleFormsService } from "./google-forms.js";
2
3
  export declare const googleDocsProvider: Readonly<{
3
4
  services: readonly [Readonly<{
4
5
  name: string;
@@ -25,6 +26,31 @@ export declare const googleDocsProvider: Readonly<{
25
26
  data: import("wire-core").JsonValue;
26
27
  }>>;
27
28
  upload?(input: import("wire-core").RuntimeCapabilities, markdown: string, markdownPath: string): Promise<import("wire-core").UploadedDocument>;
29
+ }>, Readonly<{
30
+ name: string;
31
+ matches(url: URL): boolean;
32
+ parse(url: URL): import("wire-core").Source;
33
+ fetch(input: import("wire-core").RuntimeCapabilities, url: string, source: Readonly<{
34
+ [key: string]: import("wire-core").JsonValue;
35
+ service: string;
36
+ identifier: string;
37
+ type: import("wire-core").ResourceType;
38
+ }>): Promise<Readonly<{
39
+ title: string;
40
+ markdown: string;
41
+ data: import("wire-core").JsonValue;
42
+ }>>;
43
+ synchronize?(input: import("wire-core").RuntimeCapabilities, url: string, source: Readonly<{
44
+ [key: string]: import("wire-core").JsonValue;
45
+ service: string;
46
+ identifier: string;
47
+ type: import("wire-core").ResourceType;
48
+ }>, base: import("wire-core").JsonValue, markdown: string, markdownPath: string): Promise<Readonly<{
49
+ title: string;
50
+ markdown: string;
51
+ data: import("wire-core").JsonValue;
52
+ }>>;
53
+ upload?(input: import("wire-core").RuntimeCapabilities, markdown: string, markdownPath: string): Promise<import("wire-core").UploadedDocument>;
28
54
  }>];
29
55
  }>;
30
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE7B,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import { googleDocsService } from "./google-docs.js";
2
+ import { googleFormsService } from "./google-forms.js";
2
3
  export { googleDocsService } from "./google-docs.js";
4
+ export { googleFormsService } from "./google-forms.js";
3
5
  export const googleDocsProvider = Object.freeze({
4
- services: [googleDocsService],
6
+ services: [googleFormsService, googleDocsService],
5
7
  });
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,CAAC,iBAAiB,CAAU;CACvC,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAU;CAC3D,CAAC,CAAC"}