@mindstone/mcp-server-google-workspace 0.1.0
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/LICENSE +97 -0
- package/README.md +71 -0
- package/SECURITY.md +38 -0
- package/dist/__fixtures__/accounts.d.ts +47 -0
- package/dist/__fixtures__/accounts.d.ts.map +1 -0
- package/dist/__fixtures__/accounts.js +56 -0
- package/dist/__fixtures__/accounts.js.map +1 -0
- package/dist/api/handler.d.ts +16 -0
- package/dist/api/handler.d.ts.map +1 -0
- package/dist/api/handler.js +68 -0
- package/dist/api/handler.js.map +1 -0
- package/dist/api/request.d.ts +13 -0
- package/dist/api/request.d.ts.map +1 -0
- package/dist/api/request.js +111 -0
- package/dist/api/request.js.map +1 -0
- package/dist/api/validators/endpoint.d.ts +8 -0
- package/dist/api/validators/endpoint.d.ts.map +1 -0
- package/dist/api/validators/endpoint.js +115 -0
- package/dist/api/validators/endpoint.js.map +1 -0
- package/dist/api/validators/parameter.d.ts +12 -0
- package/dist/api/validators/parameter.d.ts.map +1 -0
- package/dist/api/validators/parameter.js +155 -0
- package/dist/api/validators/parameter.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/accounts/index.d.ts +12 -0
- package/dist/modules/accounts/index.d.ts.map +1 -0
- package/dist/modules/accounts/index.js +41 -0
- package/dist/modules/accounts/index.js.map +1 -0
- package/dist/modules/accounts/manager.d.ts +40 -0
- package/dist/modules/accounts/manager.d.ts.map +1 -0
- package/dist/modules/accounts/manager.js +359 -0
- package/dist/modules/accounts/manager.js.map +1 -0
- package/dist/modules/accounts/oauth.d.ts +36 -0
- package/dist/modules/accounts/oauth.d.ts.map +1 -0
- package/dist/modules/accounts/oauth.js +112 -0
- package/dist/modules/accounts/oauth.js.map +1 -0
- package/dist/modules/accounts/token.d.ts +32 -0
- package/dist/modules/accounts/token.d.ts.map +1 -0
- package/dist/modules/accounts/token.js +305 -0
- package/dist/modules/accounts/token.js.map +1 -0
- package/dist/modules/accounts/types.d.ts +47 -0
- package/dist/modules/accounts/types.d.ts.map +1 -0
- package/dist/modules/accounts/types.js +16 -0
- package/dist/modules/accounts/types.js.map +1 -0
- package/dist/modules/accounts/unauthorized.d.ts +3 -0
- package/dist/modules/accounts/unauthorized.d.ts.map +1 -0
- package/dist/modules/accounts/unauthorized.js +44 -0
- package/dist/modules/accounts/unauthorized.js.map +1 -0
- package/dist/modules/attachments/cleanup-service.d.ts +44 -0
- package/dist/modules/attachments/cleanup-service.d.ts.map +1 -0
- package/dist/modules/attachments/cleanup-service.js +118 -0
- package/dist/modules/attachments/cleanup-service.js.map +1 -0
- package/dist/modules/attachments/index-service.d.ts +57 -0
- package/dist/modules/attachments/index-service.d.ts.map +1 -0
- package/dist/modules/attachments/index-service.js +110 -0
- package/dist/modules/attachments/index-service.js.map +1 -0
- package/dist/modules/attachments/response-transformer.d.ts +28 -0
- package/dist/modules/attachments/response-transformer.d.ts.map +1 -0
- package/dist/modules/attachments/response-transformer.js +64 -0
- package/dist/modules/attachments/response-transformer.js.map +1 -0
- package/dist/modules/attachments/service.d.ts +47 -0
- package/dist/modules/attachments/service.d.ts.map +1 -0
- package/dist/modules/attachments/service.js +362 -0
- package/dist/modules/attachments/service.js.map +1 -0
- package/dist/modules/attachments/transformer.d.ts +28 -0
- package/dist/modules/attachments/transformer.d.ts.map +1 -0
- package/dist/modules/attachments/transformer.js +31 -0
- package/dist/modules/attachments/transformer.js.map +1 -0
- package/dist/modules/attachments/types.d.ts +33 -0
- package/dist/modules/attachments/types.d.ts.map +1 -0
- package/dist/modules/attachments/types.js +9 -0
- package/dist/modules/attachments/types.js.map +1 -0
- package/dist/modules/calendar/index.d.ts +48 -0
- package/dist/modules/calendar/index.d.ts.map +1 -0
- package/dist/modules/calendar/index.js +61 -0
- package/dist/modules/calendar/index.js.map +1 -0
- package/dist/modules/calendar/scopes.d.ts +17 -0
- package/dist/modules/calendar/scopes.d.ts.map +1 -0
- package/dist/modules/calendar/scopes.js +39 -0
- package/dist/modules/calendar/scopes.js.map +1 -0
- package/dist/modules/calendar/service.d.ts +75 -0
- package/dist/modules/calendar/service.d.ts.map +1 -0
- package/dist/modules/calendar/service.js +705 -0
- package/dist/modules/calendar/service.js.map +1 -0
- package/dist/modules/calendar/types.d.ts +154 -0
- package/dist/modules/calendar/types.d.ts.map +1 -0
- package/dist/modules/calendar/types.js +11 -0
- package/dist/modules/calendar/types.js.map +1 -0
- package/dist/modules/comments/index.d.ts +12 -0
- package/dist/modules/comments/index.d.ts.map +1 -0
- package/dist/modules/comments/index.js +23 -0
- package/dist/modules/comments/index.js.map +1 -0
- package/dist/modules/comments/service.d.ts +39 -0
- package/dist/modules/comments/service.d.ts.map +1 -0
- package/dist/modules/comments/service.js +227 -0
- package/dist/modules/comments/service.js.map +1 -0
- package/dist/modules/comments/types.d.ts +67 -0
- package/dist/modules/comments/types.d.ts.map +1 -0
- package/dist/modules/comments/types.js +2 -0
- package/dist/modules/comments/types.js.map +1 -0
- package/dist/modules/contacts/index.d.ts +12 -0
- package/dist/modules/contacts/index.d.ts.map +1 -0
- package/dist/modules/contacts/index.js +18 -0
- package/dist/modules/contacts/index.js.map +1 -0
- package/dist/modules/contacts/scopes.d.ts +4 -0
- package/dist/modules/contacts/scopes.d.ts.map +1 -0
- package/dist/modules/contacts/scopes.js +11 -0
- package/dist/modules/contacts/scopes.js.map +1 -0
- package/dist/modules/contacts/types.d.ts +55 -0
- package/dist/modules/contacts/types.d.ts.map +1 -0
- package/dist/modules/contacts/types.js +14 -0
- package/dist/modules/contacts/types.js.map +1 -0
- package/dist/modules/docs/formatters.d.ts +30 -0
- package/dist/modules/docs/formatters.d.ts.map +1 -0
- package/dist/modules/docs/formatters.js +76 -0
- package/dist/modules/docs/formatters.js.map +1 -0
- package/dist/modules/docs/index.d.ts +9 -0
- package/dist/modules/docs/index.d.ts.map +1 -0
- package/dist/modules/docs/index.js +23 -0
- package/dist/modules/docs/index.js.map +1 -0
- package/dist/modules/docs/scopes.d.ts +17 -0
- package/dist/modules/docs/scopes.d.ts.map +1 -0
- package/dist/modules/docs/scopes.js +39 -0
- package/dist/modules/docs/scopes.js.map +1 -0
- package/dist/modules/docs/service.d.ts +58 -0
- package/dist/modules/docs/service.d.ts.map +1 -0
- package/dist/modules/docs/service.js +421 -0
- package/dist/modules/docs/service.js.map +1 -0
- package/dist/modules/docs/types.d.ts +75 -0
- package/dist/modules/docs/types.d.ts.map +1 -0
- package/dist/modules/docs/types.js +2 -0
- package/dist/modules/docs/types.js.map +1 -0
- package/dist/modules/drive/index.d.ts +9 -0
- package/dist/modules/drive/index.d.ts.map +1 -0
- package/dist/modules/drive/index.js +28 -0
- package/dist/modules/drive/index.js.map +1 -0
- package/dist/modules/drive/scopes.d.ts +19 -0
- package/dist/modules/drive/scopes.d.ts.map +1 -0
- package/dist/modules/drive/scopes.js +44 -0
- package/dist/modules/drive/scopes.js.map +1 -0
- package/dist/modules/drive/service.d.ts +33 -0
- package/dist/modules/drive/service.d.ts.map +1 -0
- package/dist/modules/drive/service.js +467 -0
- package/dist/modules/drive/service.js.map +1 -0
- package/dist/modules/drive/types.d.ts +55 -0
- package/dist/modules/drive/types.d.ts.map +1 -0
- package/dist/modules/drive/types.js +2 -0
- package/dist/modules/drive/types.js.map +1 -0
- package/dist/modules/forms/index.d.ts +13 -0
- package/dist/modules/forms/index.d.ts.map +1 -0
- package/dist/modules/forms/index.js +24 -0
- package/dist/modules/forms/index.js.map +1 -0
- package/dist/modules/forms/scopes.d.ts +21 -0
- package/dist/modules/forms/scopes.d.ts.map +1 -0
- package/dist/modules/forms/scopes.js +36 -0
- package/dist/modules/forms/scopes.js.map +1 -0
- package/dist/modules/forms/service.d.ts +52 -0
- package/dist/modules/forms/service.d.ts.map +1 -0
- package/dist/modules/forms/service.js +284 -0
- package/dist/modules/forms/service.js.map +1 -0
- package/dist/modules/forms/types.d.ts +399 -0
- package/dist/modules/forms/types.d.ts.map +1 -0
- package/dist/modules/forms/types.js +6 -0
- package/dist/modules/forms/types.js.map +1 -0
- package/dist/modules/gmail/constants.d.ts +69 -0
- package/dist/modules/gmail/constants.d.ts.map +1 -0
- package/dist/modules/gmail/constants.js +100 -0
- package/dist/modules/gmail/constants.js.map +1 -0
- package/dist/modules/gmail/index.d.ts +7 -0
- package/dist/modules/gmail/index.d.ts.map +1 -0
- package/dist/modules/gmail/index.js +16 -0
- package/dist/modules/gmail/index.js.map +1 -0
- package/dist/modules/gmail/scopes.d.ts +17 -0
- package/dist/modules/gmail/scopes.d.ts.map +1 -0
- package/dist/modules/gmail/scopes.js +39 -0
- package/dist/modules/gmail/scopes.js.map +1 -0
- package/dist/modules/gmail/service.d.ts +2 -0
- package/dist/modules/gmail/service.d.ts.map +1 -0
- package/dist/modules/gmail/service.js +2 -0
- package/dist/modules/gmail/service.js.map +1 -0
- package/dist/modules/gmail/services/attachment.d.ts +41 -0
- package/dist/modules/gmail/services/attachment.d.ts.map +1 -0
- package/dist/modules/gmail/services/attachment.js +143 -0
- package/dist/modules/gmail/services/attachment.js.map +1 -0
- package/dist/modules/gmail/services/base.d.ts +79 -0
- package/dist/modules/gmail/services/base.d.ts.map +1 -0
- package/dist/modules/gmail/services/base.js +124 -0
- package/dist/modules/gmail/services/base.js.map +1 -0
- package/dist/modules/gmail/services/draft.d.ts +104 -0
- package/dist/modules/gmail/services/draft.d.ts.map +1 -0
- package/dist/modules/gmail/services/draft.js +239 -0
- package/dist/modules/gmail/services/draft.js.map +1 -0
- package/dist/modules/gmail/services/email.d.ts +82 -0
- package/dist/modules/gmail/services/email.d.ts.map +1 -0
- package/dist/modules/gmail/services/email.js +462 -0
- package/dist/modules/gmail/services/email.js.map +1 -0
- package/dist/modules/gmail/services/label.d.ts +62 -0
- package/dist/modules/gmail/services/label.d.ts.map +1 -0
- package/dist/modules/gmail/services/label.js +501 -0
- package/dist/modules/gmail/services/label.js.map +1 -0
- package/dist/modules/gmail/services/mime-builder.d.ts +26 -0
- package/dist/modules/gmail/services/mime-builder.d.ts.map +1 -0
- package/dist/modules/gmail/services/mime-builder.js +83 -0
- package/dist/modules/gmail/services/mime-builder.js.map +1 -0
- package/dist/modules/gmail/services/search.d.ts +8 -0
- package/dist/modules/gmail/services/search.d.ts.map +1 -0
- package/dist/modules/gmail/services/search.js +76 -0
- package/dist/modules/gmail/services/search.js.map +1 -0
- package/dist/modules/gmail/services/settings.d.ts +14 -0
- package/dist/modules/gmail/services/settings.d.ts.map +1 -0
- package/dist/modules/gmail/services/settings.js +104 -0
- package/dist/modules/gmail/services/settings.js.map +1 -0
- package/dist/modules/gmail/types.d.ts +279 -0
- package/dist/modules/gmail/types.d.ts.map +1 -0
- package/dist/modules/gmail/types.js +11 -0
- package/dist/modules/gmail/types.js.map +1 -0
- package/dist/modules/sheets/a1Utils.d.ts +20 -0
- package/dist/modules/sheets/a1Utils.d.ts.map +1 -0
- package/dist/modules/sheets/a1Utils.js +252 -0
- package/dist/modules/sheets/a1Utils.js.map +1 -0
- package/dist/modules/sheets/cellShape.d.ts +48 -0
- package/dist/modules/sheets/cellShape.d.ts.map +1 -0
- package/dist/modules/sheets/cellShape.js +418 -0
- package/dist/modules/sheets/cellShape.js.map +1 -0
- package/dist/modules/sheets/errorRewriter.d.ts +6 -0
- package/dist/modules/sheets/errorRewriter.d.ts.map +1 -0
- package/dist/modules/sheets/errorRewriter.js +120 -0
- package/dist/modules/sheets/errorRewriter.js.map +1 -0
- package/dist/modules/sheets/formatters.d.ts +54 -0
- package/dist/modules/sheets/formatters.d.ts.map +1 -0
- package/dist/modules/sheets/formatters.js +270 -0
- package/dist/modules/sheets/formatters.js.map +1 -0
- package/dist/modules/sheets/index.d.ts +9 -0
- package/dist/modules/sheets/index.d.ts.map +1 -0
- package/dist/modules/sheets/index.js +23 -0
- package/dist/modules/sheets/index.js.map +1 -0
- package/dist/modules/sheets/scopes.d.ts +17 -0
- package/dist/modules/sheets/scopes.d.ts.map +1 -0
- package/dist/modules/sheets/scopes.js +39 -0
- package/dist/modules/sheets/scopes.js.map +1 -0
- package/dist/modules/sheets/service.d.ts +102 -0
- package/dist/modules/sheets/service.d.ts.map +1 -0
- package/dist/modules/sheets/service.js +1650 -0
- package/dist/modules/sheets/service.js.map +1 -0
- package/dist/modules/sheets/types.d.ts +271 -0
- package/dist/modules/sheets/types.d.ts.map +1 -0
- package/dist/modules/sheets/types.js +2 -0
- package/dist/modules/sheets/types.js.map +1 -0
- package/dist/modules/sheets/writeGuards.d.ts +31 -0
- package/dist/modules/sheets/writeGuards.d.ts.map +1 -0
- package/dist/modules/sheets/writeGuards.js +254 -0
- package/dist/modules/sheets/writeGuards.js.map +1 -0
- package/dist/modules/slides/formatters.d.ts +35 -0
- package/dist/modules/slides/formatters.d.ts.map +1 -0
- package/dist/modules/slides/formatters.js +96 -0
- package/dist/modules/slides/formatters.js.map +1 -0
- package/dist/modules/slides/index.d.ts +9 -0
- package/dist/modules/slides/index.d.ts.map +1 -0
- package/dist/modules/slides/index.js +23 -0
- package/dist/modules/slides/index.js.map +1 -0
- package/dist/modules/slides/scopes.d.ts +17 -0
- package/dist/modules/slides/scopes.d.ts.map +1 -0
- package/dist/modules/slides/scopes.js +39 -0
- package/dist/modules/slides/scopes.js.map +1 -0
- package/dist/modules/slides/service.d.ts +67 -0
- package/dist/modules/slides/service.d.ts.map +1 -0
- package/dist/modules/slides/service.js +394 -0
- package/dist/modules/slides/service.js.map +1 -0
- package/dist/modules/slides/types.d.ts +63 -0
- package/dist/modules/slides/types.d.ts.map +1 -0
- package/dist/modules/slides/types.js +2 -0
- package/dist/modules/slides/types.js.map +1 -0
- package/dist/modules/tasks/index.d.ts +13 -0
- package/dist/modules/tasks/index.d.ts.map +1 -0
- package/dist/modules/tasks/index.js +24 -0
- package/dist/modules/tasks/index.js.map +1 -0
- package/dist/modules/tasks/scopes.d.ts +18 -0
- package/dist/modules/tasks/scopes.d.ts.map +1 -0
- package/dist/modules/tasks/scopes.js +28 -0
- package/dist/modules/tasks/scopes.js.map +1 -0
- package/dist/modules/tasks/service.d.ts +72 -0
- package/dist/modules/tasks/service.d.ts.map +1 -0
- package/dist/modules/tasks/service.js +319 -0
- package/dist/modules/tasks/service.js.map +1 -0
- package/dist/modules/tasks/types.d.ts +118 -0
- package/dist/modules/tasks/types.d.ts.map +1 -0
- package/dist/modules/tasks/types.js +6 -0
- package/dist/modules/tasks/types.js.map +1 -0
- package/dist/modules/tools/registry.d.ts +28 -0
- package/dist/modules/tools/registry.d.ts.map +1 -0
- package/dist/modules/tools/registry.js +229 -0
- package/dist/modules/tools/registry.js.map +1 -0
- package/dist/modules/tools/scope-registry.d.ts +31 -0
- package/dist/modules/tools/scope-registry.d.ts.map +1 -0
- package/dist/modules/tools/scope-registry.js +52 -0
- package/dist/modules/tools/scope-registry.js.map +1 -0
- package/dist/oauth/client.d.ts +15 -0
- package/dist/oauth/client.d.ts.map +1 -0
- package/dist/oauth/client.js +136 -0
- package/dist/oauth/client.js.map +1 -0
- package/dist/resources/compose-email-template.d.ts +2 -0
- package/dist/resources/compose-email-template.d.ts.map +1 -0
- package/dist/resources/compose-email-template.js +711 -0
- package/dist/resources/compose-email-template.js.map +1 -0
- package/dist/scripts/health-check.d.ts +3 -0
- package/dist/scripts/health-check.d.ts.map +1 -0
- package/dist/scripts/health-check.js +22 -0
- package/dist/scripts/health-check.js.map +1 -0
- package/dist/scripts/setup-environment.d.ts +3 -0
- package/dist/scripts/setup-environment.d.ts.map +1 -0
- package/dist/scripts/setup-environment.js +91 -0
- package/dist/scripts/setup-environment.js.map +1 -0
- package/dist/scripts/setup-google-env.d.ts +3 -0
- package/dist/scripts/setup-google-env.d.ts.map +1 -0
- package/dist/scripts/setup-google-env.js +78 -0
- package/dist/scripts/setup-google-env.js.map +1 -0
- package/dist/services/base/BaseGoogleService.d.ts +52 -0
- package/dist/services/base/BaseGoogleService.d.ts.map +1 -0
- package/dist/services/base/BaseGoogleService.js +155 -0
- package/dist/services/base/BaseGoogleService.js.map +1 -0
- package/dist/services/calendar/index.d.ts +27 -0
- package/dist/services/calendar/index.d.ts.map +1 -0
- package/dist/services/calendar/index.js +146 -0
- package/dist/services/calendar/index.js.map +1 -0
- package/dist/services/contacts/index.d.ts +40 -0
- package/dist/services/contacts/index.d.ts.map +1 -0
- package/dist/services/contacts/index.js +137 -0
- package/dist/services/contacts/index.js.map +1 -0
- package/dist/services/docs/index.d.ts +4 -0
- package/dist/services/docs/index.d.ts.map +1 -0
- package/dist/services/docs/index.js +6 -0
- package/dist/services/docs/index.js.map +1 -0
- package/dist/services/drive/index.d.ts +4 -0
- package/dist/services/drive/index.d.ts.map +1 -0
- package/dist/services/drive/index.js +6 -0
- package/dist/services/drive/index.js.map +1 -0
- package/dist/services/gmail/index.d.ts +39 -0
- package/dist/services/gmail/index.d.ts.map +1 -0
- package/dist/services/gmail/index.js +337 -0
- package/dist/services/gmail/index.js.map +1 -0
- package/dist/services/sheets/index.d.ts +4 -0
- package/dist/services/sheets/index.d.ts.map +1 -0
- package/dist/services/sheets/index.js +6 -0
- package/dist/services/sheets/index.js.map +1 -0
- package/dist/services/slides/index.d.ts +4 -0
- package/dist/services/slides/index.d.ts.map +1 -0
- package/dist/services/slides/index.js +6 -0
- package/dist/services/slides/index.js.map +1 -0
- package/dist/tools/account-handlers.d.ts +28 -0
- package/dist/tools/account-handlers.d.ts.map +1 -0
- package/dist/tools/account-handlers.js +105 -0
- package/dist/tools/account-handlers.js.map +1 -0
- package/dist/tools/arg-aliases.d.ts +6 -0
- package/dist/tools/arg-aliases.d.ts.map +1 -0
- package/dist/tools/arg-aliases.js +22 -0
- package/dist/tools/arg-aliases.js.map +1 -0
- package/dist/tools/calendar-handlers.d.ts +83 -0
- package/dist/tools/calendar-handlers.d.ts.map +1 -0
- package/dist/tools/calendar-handlers.js +658 -0
- package/dist/tools/calendar-handlers.js.map +1 -0
- package/dist/tools/comments-handlers.d.ts +59 -0
- package/dist/tools/comments-handlers.d.ts.map +1 -0
- package/dist/tools/comments-handlers.js +138 -0
- package/dist/tools/comments-handlers.js.map +1 -0
- package/dist/tools/contacts-handlers.d.ts +36 -0
- package/dist/tools/contacts-handlers.d.ts.map +1 -0
- package/dist/tools/contacts-handlers.js +128 -0
- package/dist/tools/contacts-handlers.js.map +1 -0
- package/dist/tools/definitions/account.d.ts +3 -0
- package/dist/tools/definitions/account.d.ts.map +1 -0
- package/dist/tools/definitions/account.js +77 -0
- package/dist/tools/definitions/account.js.map +1 -0
- package/dist/tools/definitions/calendar.d.ts +3 -0
- package/dist/tools/definitions/calendar.d.ts.map +1 -0
- package/dist/tools/definitions/calendar.js +565 -0
- package/dist/tools/definitions/calendar.js.map +1 -0
- package/dist/tools/definitions/comments.d.ts +3 -0
- package/dist/tools/definitions/comments.d.ts.map +1 -0
- package/dist/tools/definitions/comments.js +207 -0
- package/dist/tools/definitions/comments.js.map +1 -0
- package/dist/tools/definitions/contacts.d.ts +3 -0
- package/dist/tools/definitions/contacts.d.ts.map +1 -0
- package/dist/tools/definitions/contacts.js +93 -0
- package/dist/tools/definitions/contacts.js.map +1 -0
- package/dist/tools/definitions/destructive-overrides.json +106 -0
- package/dist/tools/definitions/docs.d.ts +3 -0
- package/dist/tools/definitions/docs.d.ts.map +1 -0
- package/dist/tools/definitions/docs.js +416 -0
- package/dist/tools/definitions/docs.js.map +1 -0
- package/dist/tools/definitions/drive.d.ts +3 -0
- package/dist/tools/definitions/drive.d.ts.map +1 -0
- package/dist/tools/definitions/drive.js +587 -0
- package/dist/tools/definitions/drive.js.map +1 -0
- package/dist/tools/definitions/forms.d.ts +14 -0
- package/dist/tools/definitions/forms.d.ts.map +1 -0
- package/dist/tools/definitions/forms.js +189 -0
- package/dist/tools/definitions/forms.js.map +1 -0
- package/dist/tools/definitions/gmail.d.ts +3 -0
- package/dist/tools/definitions/gmail.d.ts.map +1 -0
- package/dist/tools/definitions/gmail.js +962 -0
- package/dist/tools/definitions/gmail.js.map +1 -0
- package/dist/tools/definitions/index.d.ts +33 -0
- package/dist/tools/definitions/index.d.ts.map +1 -0
- package/dist/tools/definitions/index.js +77 -0
- package/dist/tools/definitions/index.js.map +1 -0
- package/dist/tools/definitions/labels.d.ts +3 -0
- package/dist/tools/definitions/labels.d.ts.map +1 -0
- package/dist/tools/definitions/labels.js +662 -0
- package/dist/tools/definitions/labels.js.map +1 -0
- package/dist/tools/definitions/open-world-overrides.json +106 -0
- package/dist/tools/definitions/sheets.d.ts +3 -0
- package/dist/tools/definitions/sheets.d.ts.map +1 -0
- package/dist/tools/definitions/sheets.js +833 -0
- package/dist/tools/definitions/sheets.js.map +1 -0
- package/dist/tools/definitions/slides.d.ts +3 -0
- package/dist/tools/definitions/slides.d.ts.map +1 -0
- package/dist/tools/definitions/slides.js +383 -0
- package/dist/tools/definitions/slides.js.map +1 -0
- package/dist/tools/definitions/tasks.d.ts +11 -0
- package/dist/tools/definitions/tasks.d.ts.map +1 -0
- package/dist/tools/definitions/tasks.js +259 -0
- package/dist/tools/definitions/tasks.js.map +1 -0
- package/dist/tools/definitions.d.ts +8 -0
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/definitions.js +9 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/docs-handlers.d.ts +96 -0
- package/dist/tools/docs-handlers.d.ts.map +1 -0
- package/dist/tools/docs-handlers.js +250 -0
- package/dist/tools/docs-handlers.js.map +1 -0
- package/dist/tools/drive-handlers.d.ts +95 -0
- package/dist/tools/drive-handlers.d.ts.map +1 -0
- package/dist/tools/drive-handlers.js +506 -0
- package/dist/tools/drive-handlers.js.map +1 -0
- package/dist/tools/forms-handlers.d.ts +72 -0
- package/dist/tools/forms-handlers.d.ts.map +1 -0
- package/dist/tools/forms-handlers.js +435 -0
- package/dist/tools/forms-handlers.js.map +1 -0
- package/dist/tools/gmail-handlers.d.ts +320 -0
- package/dist/tools/gmail-handlers.d.ts.map +1 -0
- package/dist/tools/gmail-handlers.js +1040 -0
- package/dist/tools/gmail-handlers.js.map +1 -0
- package/dist/tools/param-normalizer.d.ts +2 -0
- package/dist/tools/param-normalizer.d.ts.map +1 -0
- package/dist/tools/param-normalizer.js +96 -0
- package/dist/tools/param-normalizer.js.map +1 -0
- package/dist/tools/server.d.ts +14 -0
- package/dist/tools/server.d.ts.map +1 -0
- package/dist/tools/server.js +733 -0
- package/dist/tools/server.js.map +1 -0
- package/dist/tools/sheets-handlers.d.ts +230 -0
- package/dist/tools/sheets-handlers.d.ts.map +1 -0
- package/dist/tools/sheets-handlers.js +589 -0
- package/dist/tools/sheets-handlers.js.map +1 -0
- package/dist/tools/slides-handlers.d.ts +90 -0
- package/dist/tools/slides-handlers.d.ts.map +1 -0
- package/dist/tools/slides-handlers.js +281 -0
- package/dist/tools/slides-handlers.js.map +1 -0
- package/dist/tools/tasks-handlers.d.ts +85 -0
- package/dist/tools/tasks-handlers.d.ts.map +1 -0
- package/dist/tools/tasks-handlers.js +265 -0
- package/dist/tools/tasks-handlers.js.map +1 -0
- package/dist/tools/type-guards.d.ts +491 -0
- package/dist/tools/type-guards.d.ts.map +1 -0
- package/dist/tools/type-guards.js +1325 -0
- package/dist/tools/type-guards.js.map +1 -0
- package/dist/tools/types.d.ts +298 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types.d.ts +70 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +12 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/atomicCredentialWrite.d.ts +5 -0
- package/dist/utils/atomicCredentialWrite.d.ts.map +1 -0
- package/dist/utils/atomicCredentialWrite.js +120 -0
- package/dist/utils/atomicCredentialWrite.js.map +1 -0
- package/dist/utils/emfileRetry.d.ts +3 -0
- package/dist/utils/emfileRetry.d.ts.map +1 -0
- package/dist/utils/emfileRetry.js +24 -0
- package/dist/utils/emfileRetry.js.map +1 -0
- package/dist/utils/logger.d.ts +8 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +67 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/request-timeout.d.ts +5 -0
- package/dist/utils/request-timeout.d.ts.map +1 -0
- package/dist/utils/request-timeout.js +27 -0
- package/dist/utils/request-timeout.js.map +1 -0
- package/dist/utils/safe-filename.d.ts +2 -0
- package/dist/utils/safe-filename.d.ts.map +1 -0
- package/dist/utils/safe-filename.js +24 -0
- package/dist/utils/safe-filename.js.map +1 -0
- package/dist/utils/scope-hierarchy.d.ts +35 -0
- package/dist/utils/scope-hierarchy.d.ts.map +1 -0
- package/dist/utils/scope-hierarchy.js +123 -0
- package/dist/utils/scope-hierarchy.js.map +1 -0
- package/dist/utils/service-initializer.d.ts +12 -0
- package/dist/utils/service-initializer.d.ts.map +1 -0
- package/dist/utils/service-initializer.js +87 -0
- package/dist/utils/service-initializer.js.map +1 -0
- package/dist/utils/untrusted-content.d.ts +3 -0
- package/dist/utils/untrusted-content.d.ts.map +1 -0
- package/dist/utils/untrusted-content.js +20 -0
- package/dist/utils/untrusted-content.js.map +1 -0
- package/dist/utils/workspace.d.ts +43 -0
- package/dist/utils/workspace.d.ts.map +1 -0
- package/dist/utils/workspace.js +98 -0
- package/dist/utils/workspace.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript interfaces for Google Forms API
|
|
3
|
+
* Reference: https://developers.google.com/forms/api/reference/rest
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A Google Form.
|
|
7
|
+
*/
|
|
8
|
+
export interface Form {
|
|
9
|
+
/** The form ID */
|
|
10
|
+
formId: string;
|
|
11
|
+
/** Basic form info (title, description) */
|
|
12
|
+
info: FormInfo;
|
|
13
|
+
/** Settings for the form */
|
|
14
|
+
settings?: FormSettings;
|
|
15
|
+
/** The items (questions) in the form */
|
|
16
|
+
items?: FormItem[];
|
|
17
|
+
/** The revision ID of the form (used for write operations) */
|
|
18
|
+
revisionId?: string;
|
|
19
|
+
/** URL that respondents use to view the form */
|
|
20
|
+
responderUri?: string;
|
|
21
|
+
/** Link for the form owner to manage the linked spreadsheet */
|
|
22
|
+
linkedSheetId?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Basic form info.
|
|
26
|
+
*/
|
|
27
|
+
export interface FormInfo {
|
|
28
|
+
/** The title of the form */
|
|
29
|
+
title: string;
|
|
30
|
+
/** The description of the form */
|
|
31
|
+
description?: string;
|
|
32
|
+
/** The document title (shown in Drive) */
|
|
33
|
+
documentTitle?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Form settings.
|
|
37
|
+
*/
|
|
38
|
+
export interface FormSettings {
|
|
39
|
+
/** Quiz settings */
|
|
40
|
+
quizSettings?: {
|
|
41
|
+
isQuiz?: boolean;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* An item in a form (question, page break, text, etc.)
|
|
46
|
+
*/
|
|
47
|
+
export interface FormItem {
|
|
48
|
+
/** The item ID */
|
|
49
|
+
itemId: string;
|
|
50
|
+
/** The title of the item */
|
|
51
|
+
title?: string;
|
|
52
|
+
/** The description of the item */
|
|
53
|
+
description?: string;
|
|
54
|
+
/** Question item (if this is a question) */
|
|
55
|
+
questionItem?: QuestionItem;
|
|
56
|
+
/** Question group item (for question grids) */
|
|
57
|
+
questionGroupItem?: QuestionGroupItem;
|
|
58
|
+
/** Page break item */
|
|
59
|
+
pageBreakItem?: PageBreakItem;
|
|
60
|
+
/** Text item (informational) */
|
|
61
|
+
textItem?: TextItem;
|
|
62
|
+
/** Image item */
|
|
63
|
+
imageItem?: ImageItem;
|
|
64
|
+
/** Video item */
|
|
65
|
+
videoItem?: VideoItem;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A question item.
|
|
69
|
+
*/
|
|
70
|
+
export interface QuestionItem {
|
|
71
|
+
/** The question */
|
|
72
|
+
question: Question;
|
|
73
|
+
/** Image associated with the question */
|
|
74
|
+
image?: Image;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* A question.
|
|
78
|
+
*/
|
|
79
|
+
export interface Question {
|
|
80
|
+
/** The question ID */
|
|
81
|
+
questionId: string;
|
|
82
|
+
/** Whether the question is required */
|
|
83
|
+
required?: boolean;
|
|
84
|
+
/** Grading settings (for quizzes) */
|
|
85
|
+
grading?: Grading;
|
|
86
|
+
/** Choice question (multiple choice, dropdown, checkbox) */
|
|
87
|
+
choiceQuestion?: ChoiceQuestion;
|
|
88
|
+
/** Text question (short answer, paragraph) */
|
|
89
|
+
textQuestion?: TextQuestion;
|
|
90
|
+
/** Scale question */
|
|
91
|
+
scaleQuestion?: ScaleQuestion;
|
|
92
|
+
/** Date question */
|
|
93
|
+
dateQuestion?: DateQuestion;
|
|
94
|
+
/** Time question */
|
|
95
|
+
timeQuestion?: TimeQuestion;
|
|
96
|
+
/** File upload question */
|
|
97
|
+
fileUploadQuestion?: FileUploadQuestion;
|
|
98
|
+
/** Row question (for grids) */
|
|
99
|
+
rowQuestion?: RowQuestion;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A choice question (multiple choice, dropdown, checkbox).
|
|
103
|
+
*/
|
|
104
|
+
export interface ChoiceQuestion {
|
|
105
|
+
/** The type of choice question */
|
|
106
|
+
type: 'RADIO' | 'CHECKBOX' | 'DROP_DOWN';
|
|
107
|
+
/** The options for the question */
|
|
108
|
+
options: Option[];
|
|
109
|
+
/** Whether "Other" is an option */
|
|
110
|
+
shuffle?: boolean;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* An option for a choice question.
|
|
114
|
+
*/
|
|
115
|
+
export interface Option {
|
|
116
|
+
/** The value/text of the option */
|
|
117
|
+
value: string;
|
|
118
|
+
/** Image associated with the option */
|
|
119
|
+
image?: Image;
|
|
120
|
+
/** Whether this is the "Other" option */
|
|
121
|
+
isOther?: boolean;
|
|
122
|
+
/** Navigation destination when selected */
|
|
123
|
+
goToAction?: 'NEXT_SECTION' | 'RESTART_FORM' | 'SUBMIT_FORM';
|
|
124
|
+
/** Section ID to go to when selected */
|
|
125
|
+
goToSectionId?: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A text question (short answer, paragraph).
|
|
129
|
+
*/
|
|
130
|
+
export interface TextQuestion {
|
|
131
|
+
/** Whether this is a paragraph question (long text) */
|
|
132
|
+
paragraph?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* A scale question.
|
|
136
|
+
*/
|
|
137
|
+
export interface ScaleQuestion {
|
|
138
|
+
/** The low value of the scale */
|
|
139
|
+
low: number;
|
|
140
|
+
/** The high value of the scale */
|
|
141
|
+
high: number;
|
|
142
|
+
/** Label for the low value */
|
|
143
|
+
lowLabel?: string;
|
|
144
|
+
/** Label for the high value */
|
|
145
|
+
highLabel?: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* A date question.
|
|
149
|
+
*/
|
|
150
|
+
export interface DateQuestion {
|
|
151
|
+
/** Whether to include the year */
|
|
152
|
+
includeYear?: boolean;
|
|
153
|
+
/** Whether to include the time */
|
|
154
|
+
includeTime?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* A time question.
|
|
158
|
+
*/
|
|
159
|
+
export interface TimeQuestion {
|
|
160
|
+
/** Whether this is a duration question */
|
|
161
|
+
duration?: boolean;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* A file upload question.
|
|
165
|
+
*/
|
|
166
|
+
export interface FileUploadQuestion {
|
|
167
|
+
/** The folder ID for uploaded files */
|
|
168
|
+
folderId?: string;
|
|
169
|
+
/** Allowed MIME types */
|
|
170
|
+
types?: string[];
|
|
171
|
+
/** Maximum number of files */
|
|
172
|
+
maxFiles?: number;
|
|
173
|
+
/** Maximum file size in bytes */
|
|
174
|
+
maxFileSize?: number;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* A row question (for grids).
|
|
178
|
+
*/
|
|
179
|
+
export interface RowQuestion {
|
|
180
|
+
/** The title of the row */
|
|
181
|
+
title: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A question group (for question grids).
|
|
185
|
+
*/
|
|
186
|
+
export interface QuestionGroupItem {
|
|
187
|
+
/** The questions in the group */
|
|
188
|
+
questions: Question[];
|
|
189
|
+
/** Image associated with the group */
|
|
190
|
+
image?: Image;
|
|
191
|
+
/** Grid settings */
|
|
192
|
+
grid?: Grid;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Grid settings for question groups.
|
|
196
|
+
*/
|
|
197
|
+
export interface Grid {
|
|
198
|
+
/** The columns in the grid */
|
|
199
|
+
columns: {
|
|
200
|
+
type: 'RADIO' | 'CHECKBOX';
|
|
201
|
+
options: Option[];
|
|
202
|
+
};
|
|
203
|
+
/** Whether to shuffle rows */
|
|
204
|
+
shuffleQuestions?: boolean;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Grading settings for a question.
|
|
208
|
+
*/
|
|
209
|
+
export interface Grading {
|
|
210
|
+
/** The point value */
|
|
211
|
+
pointValue: number;
|
|
212
|
+
/** Correct answers */
|
|
213
|
+
correctAnswers?: CorrectAnswers;
|
|
214
|
+
/** Feedback when answer is correct */
|
|
215
|
+
whenRight?: Feedback;
|
|
216
|
+
/** Feedback when answer is wrong */
|
|
217
|
+
whenWrong?: Feedback;
|
|
218
|
+
/** General feedback */
|
|
219
|
+
generalFeedback?: Feedback;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Correct answers for grading.
|
|
223
|
+
*/
|
|
224
|
+
export interface CorrectAnswers {
|
|
225
|
+
/** List of correct answers */
|
|
226
|
+
answers: CorrectAnswer[];
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* A correct answer.
|
|
230
|
+
*/
|
|
231
|
+
export interface CorrectAnswer {
|
|
232
|
+
/** The correct value */
|
|
233
|
+
value: string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Feedback for grading.
|
|
237
|
+
*/
|
|
238
|
+
export interface Feedback {
|
|
239
|
+
/** Text feedback */
|
|
240
|
+
text?: string;
|
|
241
|
+
/** Material (links, etc.) */
|
|
242
|
+
material?: ExtraMaterial[];
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Extra material for feedback.
|
|
246
|
+
*/
|
|
247
|
+
export interface ExtraMaterial {
|
|
248
|
+
/** Link */
|
|
249
|
+
link?: {
|
|
250
|
+
uri: string;
|
|
251
|
+
displayText?: string;
|
|
252
|
+
};
|
|
253
|
+
/** Video */
|
|
254
|
+
video?: {
|
|
255
|
+
displayText?: string;
|
|
256
|
+
youtubeUri?: string;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* An image.
|
|
261
|
+
*/
|
|
262
|
+
export interface Image {
|
|
263
|
+
/** The image content URI */
|
|
264
|
+
contentUri?: string;
|
|
265
|
+
/** Alt text */
|
|
266
|
+
altText?: string;
|
|
267
|
+
/** Properties */
|
|
268
|
+
properties?: {
|
|
269
|
+
alignment?: 'LEFT' | 'RIGHT' | 'CENTER';
|
|
270
|
+
width?: number;
|
|
271
|
+
};
|
|
272
|
+
/** Source URI */
|
|
273
|
+
sourceUri?: string;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* A page break item.
|
|
277
|
+
*/
|
|
278
|
+
export interface PageBreakItem {
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* A text item (informational).
|
|
282
|
+
*/
|
|
283
|
+
export interface TextItem {
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* An image item.
|
|
287
|
+
*/
|
|
288
|
+
export interface ImageItem {
|
|
289
|
+
/** The image */
|
|
290
|
+
image: Image;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* A video item.
|
|
294
|
+
*/
|
|
295
|
+
export interface VideoItem {
|
|
296
|
+
/** The video */
|
|
297
|
+
video: {
|
|
298
|
+
youtubeUri: string;
|
|
299
|
+
properties?: {
|
|
300
|
+
alignment?: 'LEFT' | 'RIGHT' | 'CENTER';
|
|
301
|
+
width?: number;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
/** Caption */
|
|
305
|
+
caption?: string;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* A response to a form.
|
|
309
|
+
*/
|
|
310
|
+
export interface FormResponse {
|
|
311
|
+
/** The response ID */
|
|
312
|
+
responseId: string;
|
|
313
|
+
/** When the response was created */
|
|
314
|
+
createTime: string;
|
|
315
|
+
/** When the response was last submitted */
|
|
316
|
+
lastSubmittedTime: string;
|
|
317
|
+
/** The respondent's email (if collected) */
|
|
318
|
+
respondentEmail?: string;
|
|
319
|
+
/** Answers keyed by question ID */
|
|
320
|
+
answers?: Record<string, Answer>;
|
|
321
|
+
/** Total score (for quizzes) */
|
|
322
|
+
totalScore?: number;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* An answer to a question.
|
|
326
|
+
*/
|
|
327
|
+
export interface Answer {
|
|
328
|
+
/** The question ID */
|
|
329
|
+
questionId: string;
|
|
330
|
+
/** Text answers */
|
|
331
|
+
textAnswers?: TextAnswers;
|
|
332
|
+
/** File upload answers */
|
|
333
|
+
fileUploadAnswers?: FileUploadAnswers;
|
|
334
|
+
/** Grade for this answer */
|
|
335
|
+
grade?: Grade;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Text answers.
|
|
339
|
+
*/
|
|
340
|
+
export interface TextAnswers {
|
|
341
|
+
/** The text answer values */
|
|
342
|
+
answers: TextAnswer[];
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* A single text answer.
|
|
346
|
+
*/
|
|
347
|
+
export interface TextAnswer {
|
|
348
|
+
/** The answer value */
|
|
349
|
+
value: string;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* File upload answers.
|
|
353
|
+
*/
|
|
354
|
+
export interface FileUploadAnswers {
|
|
355
|
+
/** The uploaded files */
|
|
356
|
+
answers: FileUploadAnswer[];
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* A single file upload answer.
|
|
360
|
+
*/
|
|
361
|
+
export interface FileUploadAnswer {
|
|
362
|
+
/** The file ID */
|
|
363
|
+
fileId: string;
|
|
364
|
+
/** The file name */
|
|
365
|
+
fileName: string;
|
|
366
|
+
/** The MIME type */
|
|
367
|
+
mimeType: string;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Grade for an answer.
|
|
371
|
+
*/
|
|
372
|
+
export interface Grade {
|
|
373
|
+
/** Points awarded */
|
|
374
|
+
score: number;
|
|
375
|
+
/** Whether the answer was correct */
|
|
376
|
+
correct: boolean;
|
|
377
|
+
/** Feedback given */
|
|
378
|
+
feedback?: Feedback;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Options for listing form responses.
|
|
382
|
+
*/
|
|
383
|
+
export interface ListResponsesOptions {
|
|
384
|
+
/** Maximum number of responses to return (default: 20, max: 5000) */
|
|
385
|
+
maxResults?: number;
|
|
386
|
+
/** Pagination token from previous response */
|
|
387
|
+
pageToken?: string;
|
|
388
|
+
/** Filter responses updated after this timestamp (RFC 3339) */
|
|
389
|
+
filter?: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Result of a Forms operation.
|
|
393
|
+
*/
|
|
394
|
+
export interface FormsOperationResult<T = unknown> {
|
|
395
|
+
success: boolean;
|
|
396
|
+
data?: T;
|
|
397
|
+
error?: string;
|
|
398
|
+
}
|
|
399
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/forms/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,2C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AM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,OAAO;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/forms/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gmail's allowed label colors
|
|
3
|
+
* These are the only colors that Gmail's API accepts for label customization
|
|
4
|
+
*/
|
|
5
|
+
export declare const GMAIL_LABEL_COLORS: {
|
|
6
|
+
readonly default: {
|
|
7
|
+
readonly textColor: "#000000";
|
|
8
|
+
readonly backgroundColor: "#ffffff";
|
|
9
|
+
};
|
|
10
|
+
readonly red: {
|
|
11
|
+
readonly textColor: "#ffffff";
|
|
12
|
+
readonly backgroundColor: "#dc3545";
|
|
13
|
+
};
|
|
14
|
+
readonly orange: {
|
|
15
|
+
readonly textColor: "#000000";
|
|
16
|
+
readonly backgroundColor: "#ffc107";
|
|
17
|
+
};
|
|
18
|
+
readonly yellow: {
|
|
19
|
+
readonly textColor: "#000000";
|
|
20
|
+
readonly backgroundColor: "#ffeb3b";
|
|
21
|
+
};
|
|
22
|
+
readonly green: {
|
|
23
|
+
readonly textColor: "#ffffff";
|
|
24
|
+
readonly backgroundColor: "#28a745";
|
|
25
|
+
};
|
|
26
|
+
readonly teal: {
|
|
27
|
+
readonly textColor: "#ffffff";
|
|
28
|
+
readonly backgroundColor: "#20c997";
|
|
29
|
+
};
|
|
30
|
+
readonly blue: {
|
|
31
|
+
readonly textColor: "#ffffff";
|
|
32
|
+
readonly backgroundColor: "#007bff";
|
|
33
|
+
};
|
|
34
|
+
readonly purple: {
|
|
35
|
+
readonly textColor: "#ffffff";
|
|
36
|
+
readonly backgroundColor: "#6f42c1";
|
|
37
|
+
};
|
|
38
|
+
readonly pink: {
|
|
39
|
+
readonly textColor: "#ffffff";
|
|
40
|
+
readonly backgroundColor: "#e83e8c";
|
|
41
|
+
};
|
|
42
|
+
readonly gray: {
|
|
43
|
+
readonly textColor: "#ffffff";
|
|
44
|
+
readonly backgroundColor: "#6c757d";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type GmailLabelColor = keyof typeof GMAIL_LABEL_COLORS;
|
|
48
|
+
/**
|
|
49
|
+
* Validates if a color combination is allowed by Gmail
|
|
50
|
+
* @param textColor - Hex color code for text
|
|
51
|
+
* @param backgroundColor - Hex color code for background
|
|
52
|
+
* @returns true if the color combination is valid, false otherwise
|
|
53
|
+
*/
|
|
54
|
+
export declare function isValidGmailLabelColor(textColor: string, backgroundColor: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Gets the closest valid Gmail label color based on a hex code
|
|
57
|
+
* @param backgroundColor - Hex color code to match
|
|
58
|
+
* @returns The closest matching valid Gmail label color combination
|
|
59
|
+
*/
|
|
60
|
+
export declare function getNearestGmailLabelColor(backgroundColor: string): typeof GMAIL_LABEL_COLORS[GmailLabelColor];
|
|
61
|
+
/**
|
|
62
|
+
* Error messages for label operations
|
|
63
|
+
*/
|
|
64
|
+
export declare const LABEL_ERROR_MESSAGES: {
|
|
65
|
+
readonly INVALID_COLOR: "Invalid label color. Please use one of the predefined Gmail label colors.";
|
|
66
|
+
readonly INVALID_COLOR_COMBINATION: "Invalid text and background color combination.";
|
|
67
|
+
readonly COLOR_SUGGESTION: (original: string, suggested: (typeof GMAIL_LABEL_COLORS)[GmailLabelColor]) => string;
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/gmail/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAK1F;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,kBAAkB,CAAC,eAAe,CAAC,CAqC7G;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;0CAGF,MAAM,aAAa,CAAA,OAAO,kBAAkB,EAAC,eAAe,CAAC;CAElF,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gmail's allowed label colors
|
|
3
|
+
* These are the only colors that Gmail's API accepts for label customization
|
|
4
|
+
*/
|
|
5
|
+
export const GMAIL_LABEL_COLORS = {
|
|
6
|
+
default: {
|
|
7
|
+
textColor: '#000000',
|
|
8
|
+
backgroundColor: '#ffffff'
|
|
9
|
+
},
|
|
10
|
+
red: {
|
|
11
|
+
textColor: '#ffffff',
|
|
12
|
+
backgroundColor: '#dc3545'
|
|
13
|
+
},
|
|
14
|
+
orange: {
|
|
15
|
+
textColor: '#000000',
|
|
16
|
+
backgroundColor: '#ffc107'
|
|
17
|
+
},
|
|
18
|
+
yellow: {
|
|
19
|
+
textColor: '#000000',
|
|
20
|
+
backgroundColor: '#ffeb3b'
|
|
21
|
+
},
|
|
22
|
+
green: {
|
|
23
|
+
textColor: '#ffffff',
|
|
24
|
+
backgroundColor: '#28a745'
|
|
25
|
+
},
|
|
26
|
+
teal: {
|
|
27
|
+
textColor: '#ffffff',
|
|
28
|
+
backgroundColor: '#20c997'
|
|
29
|
+
},
|
|
30
|
+
blue: {
|
|
31
|
+
textColor: '#ffffff',
|
|
32
|
+
backgroundColor: '#007bff'
|
|
33
|
+
},
|
|
34
|
+
purple: {
|
|
35
|
+
textColor: '#ffffff',
|
|
36
|
+
backgroundColor: '#6f42c1'
|
|
37
|
+
},
|
|
38
|
+
pink: {
|
|
39
|
+
textColor: '#ffffff',
|
|
40
|
+
backgroundColor: '#e83e8c'
|
|
41
|
+
},
|
|
42
|
+
gray: {
|
|
43
|
+
textColor: '#ffffff',
|
|
44
|
+
backgroundColor: '#6c757d'
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Validates if a color combination is allowed by Gmail
|
|
49
|
+
* @param textColor - Hex color code for text
|
|
50
|
+
* @param backgroundColor - Hex color code for background
|
|
51
|
+
* @returns true if the color combination is valid, false otherwise
|
|
52
|
+
*/
|
|
53
|
+
export function isValidGmailLabelColor(textColor, backgroundColor) {
|
|
54
|
+
return Object.values(GMAIL_LABEL_COLORS).some(color => color.textColor.toLowerCase() === textColor.toLowerCase() &&
|
|
55
|
+
color.backgroundColor.toLowerCase() === backgroundColor.toLowerCase());
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gets the closest valid Gmail label color based on a hex code
|
|
59
|
+
* @param backgroundColor - Hex color code to match
|
|
60
|
+
* @returns The closest matching valid Gmail label color combination
|
|
61
|
+
*/
|
|
62
|
+
export function getNearestGmailLabelColor(backgroundColor) {
|
|
63
|
+
// Remove # if present and convert to lowercase
|
|
64
|
+
const targetColor = backgroundColor.replace('#', '').toLowerCase();
|
|
65
|
+
// Convert hex to RGB
|
|
66
|
+
const targetRGB = {
|
|
67
|
+
r: parseInt(targetColor.substr(0, 2), 16),
|
|
68
|
+
g: parseInt(targetColor.substr(2, 2), 16),
|
|
69
|
+
b: parseInt(targetColor.substr(4, 2), 16)
|
|
70
|
+
};
|
|
71
|
+
// Calculate distance to each valid color
|
|
72
|
+
let closestColor = 'default';
|
|
73
|
+
let minDistance = Number.MAX_VALUE;
|
|
74
|
+
Object.entries(GMAIL_LABEL_COLORS).forEach(([name, color]) => {
|
|
75
|
+
const validColor = color.backgroundColor.replace('#', '').toLowerCase();
|
|
76
|
+
const validRGB = {
|
|
77
|
+
r: parseInt(validColor.substr(0, 2), 16),
|
|
78
|
+
g: parseInt(validColor.substr(2, 2), 16),
|
|
79
|
+
b: parseInt(validColor.substr(4, 2), 16)
|
|
80
|
+
};
|
|
81
|
+
// Calculate Euclidean distance in RGB space
|
|
82
|
+
const distance = Math.sqrt(Math.pow(validRGB.r - targetRGB.r, 2) +
|
|
83
|
+
Math.pow(validRGB.g - targetRGB.g, 2) +
|
|
84
|
+
Math.pow(validRGB.b - targetRGB.b, 2));
|
|
85
|
+
if (distance < minDistance) {
|
|
86
|
+
minDistance = distance;
|
|
87
|
+
closestColor = name;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return GMAIL_LABEL_COLORS[closestColor];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Error messages for label operations
|
|
94
|
+
*/
|
|
95
|
+
export const LABEL_ERROR_MESSAGES = {
|
|
96
|
+
INVALID_COLOR: 'Invalid label color. Please use one of the predefined Gmail label colors.',
|
|
97
|
+
INVALID_COLOR_COMBINATION: 'Invalid text and background color combination.',
|
|
98
|
+
COLOR_SUGGESTION: (original, suggested) => `The color "${original}" is not supported. Consider using the suggested color: Background: ${suggested.backgroundColor}, Text: ${suggested.textColor}`
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/modules/gmail/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE;QACP,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,GAAG,EAAE;QACH,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,MAAM,EAAE;QACN,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,MAAM,EAAE;QACN,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,KAAK,EAAE;QACL,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,MAAM,EAAE;QACN,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,SAAS;KAC3B;CACO,CAAC;AAIX;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAAiB,EAAE,eAAuB;IAC/E,OAAO,MAAM,CAAC,MAAM,CAA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,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;YACxC,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;SACzC,CAAC;QAEF,4CAA4C;QAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CACxB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CACtC,CAAC;QAEF,IAAI,QAAQ,GAAG,WAAW,EAAE,CAAC;YAC3B,WAAW,GAAG,QAAQ,CAAC;YACvB,YAAY,GAAG,IAAuB,CAAC;QACzC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,aAAa,EAAE,2EAA2E;IAC1F,yBAAyB,EAAE,gDAAgD;IAC3E,gBAAgB,EAAE,CAAC,QAAgB,EAAE,SAAqD,EAAE,EAAE,CAC5F,cAAc,QAAQ,uEAAuE,SAAS,CAAC,eAAe,WAAW,SAAS,CAAC,SAAS,EAAE;CAChJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GmailService } from './services/base.js';
|
|
2
|
+
import { GmailError } from './types.js';
|
|
3
|
+
import { DraftService } from './services/draft.js';
|
|
4
|
+
export { GmailService, GmailError, DraftService };
|
|
5
|
+
export declare function initializeGmailModule(): Promise<void>;
|
|
6
|
+
export declare function getGmailService(): GmailService;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/gmail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAIlD,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG3D;AAED,wBAAgB,eAAe,IAAI,YAAY,CAS9C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GmailService } from './services/base.js';
|
|
2
|
+
import { GmailError } from './types.js';
|
|
3
|
+
import { DraftService } from './services/draft.js';
|
|
4
|
+
export { GmailService, GmailError, DraftService };
|
|
5
|
+
let gmailService = null;
|
|
6
|
+
export async function initializeGmailModule() {
|
|
7
|
+
gmailService = new GmailService();
|
|
8
|
+
await gmailService.initialize();
|
|
9
|
+
}
|
|
10
|
+
export function getGmailService() {
|
|
11
|
+
if (!gmailService) {
|
|
12
|
+
throw new GmailError('Gmail module not initialized', 'MODULE_NOT_INITIALIZED', 'Call initializeGmailModule before using the Gmail service');
|
|
13
|
+
}
|
|
14
|
+
return gmailService;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/gmail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAElD,IAAI,YAAY,GAAwB,IAAI,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;IAClC,MAAM,YAAY,CAAC,UAAU,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,UAAU,CAClB,8BAA8B,EAC9B,wBAAwB,EACxB,2DAA2D,CAC5D,CAAC;IACJ,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const GMAIL_SCOPES: {
|
|
2
|
+
READONLY: string;
|
|
3
|
+
SEND: string;
|
|
4
|
+
MODIFY: string;
|
|
5
|
+
LABELS: string;
|
|
6
|
+
SETTINGS_BASIC: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Register Gmail OAuth scopes at startup.
|
|
10
|
+
* Auth issues will be handled via 401 responses rather than pre-validation.
|
|
11
|
+
*
|
|
12
|
+
* IMPORTANT: The order of scope registration matters for auth URL generation.
|
|
13
|
+
* Core functionality scopes (readonly, send, modify) should be registered first,
|
|
14
|
+
* followed by feature-specific scopes (labels, settings).
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerGmailScopes(): void;
|
|
17
|
+
//# sourceMappingURL=scopes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/modules/gmail/scopes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;;;;CAWxB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,SAoBlC"}
|