@crvouga/mockingbird-service-google-calendar 0.2.0 → 1.0.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/CHANGELOG.md +11 -1
- package/dist/{chunk-UAEYK3SE.js → chunk-W4HXGXSP.js} +3 -3
- package/dist/{chunk-UAEYK3SE.js.map → chunk-W4HXGXSP.js.map} +2 -2
- package/dist/{chunk-S2OLMZ66.js → chunk-WFCSWBYT.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/server.js +2 -2
- package/package.json +6 -2
- /package/dist/{chunk-S2OLMZ66.js.map → chunk-WFCSWBYT.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-google-calendar
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 1.0.0 (2026-09-24)
|
|
4
|
+
|
|
5
|
+
### ⚠️ Breaking changes
|
|
6
|
+
|
|
7
|
+
- vendor branding for every service; purge internal mocks and consumer names ([f689534](https://github.com/crvouga/mockingbird/commit/f6895343543550dafcb7d76b426cae7635e03226))
|
|
8
|
+
|
|
9
|
+
### Dependencies
|
|
10
|
+
|
|
11
|
+
- `@crvouga/mockingbird-service-sqlite`
|
|
12
|
+
|
|
13
|
+
## 0.2.0 (2026-09-23)
|
|
4
14
|
|
|
5
15
|
### Features
|
|
6
16
|
|
|
@@ -1508,7 +1508,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
|
|
|
1508
1508
|
};
|
|
1509
1509
|
|
|
1510
1510
|
// ../core/dist/version.js
|
|
1511
|
-
var PACKAGE_VERSION = true ? "0.
|
|
1511
|
+
var PACKAGE_VERSION = true ? "1.0.0" : UNRELEASED_VERSION;
|
|
1512
1512
|
|
|
1513
1513
|
// ../core/dist/signing.js
|
|
1514
1514
|
var encoder = new TextEncoder();
|
|
@@ -2508,7 +2508,7 @@ var bodyIssues = (context, contentType = "application/json") => {
|
|
|
2508
2508
|
};
|
|
2509
2509
|
|
|
2510
2510
|
// src/generated/openapi.ts
|
|
2511
|
-
var document = JSON.parse(`{"openapi":"3.1.0","info":{"title":"Google Calendar v3 + Google OAuth (Mockingbird subset)","description":"Stateful mock subset of the Google Calendar API v3 (calendarList.list, calendars.insert, events list/get/insert/update/delete/watch, channels.stop) and Google OAuth 2.0 (token, revoke, OpenID userinfo), as \`googleapis\` / \`@googleapis/calendar\` and google-auth-library call them. Trimmed from Google's discovery document to what our EMR calls.\\n","version":"v3","x-mockingbird-upstream":{"note":"Shapes from https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest and https://developers.google.com/identity/protocols/oauth2; consumer: apps/geviti-emr-backend/src/services/google-calendar-service.ts, business/authorize/authorize.business.ts, routers/v1/webhooks/controller.ts."}},"servers":[{"url":"https://www.googleapis.com"}],"security":[{"bearerAuth":[]}],"paths":{"/token":{"post":{"operationId":"OAuthToken","description":"OAuth 2.0 token endpoint (oauth2.googleapis.com/token): authorization_code and refresh_token grants, form-encoded as google-auth-library sends them.","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"invalid_grant / invalid_request / unsupported_grant_type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"invalid_client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/revoke":{"post":{"operationId":"OAuthRevoke","description":"Revoke an access or refresh token (oauth2.googleapis.com/revoke?token=).","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","examples":["1//mock.cGFyaXR5QGV4YW1wbGUuY29t.0.x"]}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/oauth2/v3/userinfo":{"get":{"operationId":"UserInfo","description":"OpenID userinfo for the token's user (www.googleapis.com/oauth2/v3/userinfo).","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"401":{"description":"Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/calendar/v3/users/me/calendarList":{"get":{"operationId":"CalendarListList","description":"The user's calendar list.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Calendar list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}}},"400":{"description":"Invalid value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"parameters":[{"name":"maxResults","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250}},{"name":"pageToken","in":"query","required":false,"schema":{"type":"string","enum":["bogus"]}}]}},"/calendar/v3/calendars":{"post":{"operationId":"CalendarsInsert","description":"Create a secondary calendar.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"400":{"description":"Missing summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarInput"}}}}}},"/calendar/v3/calendars/{calendarId}/events":{"parameters":[{"name":"calendarId","in":"path","required":true,"schema":{"type":"string","enum":["primary"]},"description":"\`primary\` or a calendar id from calendars.insert / calendarList (parity vocabulary: primary)."}],"get":{"operationId":"EventsList","description":"Events in a calendar: full lists with timeMin/timeMax/q/orderBy, pagination via pageToken, incremental sync via syncToken (410 fullSyncRequired when it is no longer valid).","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Events"}}}},"400":{"description":"Invalid parameter combination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"410":{"description":"Sync token no longer valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"parameters":[{"name":"timeMin","in":"query","required":false,"schema":{"type":"string","enum":["2026-01-01T00:00:00Z","2026-10-01T00:00:00Z"]}},{"name":"timeMax","in":"query","required":false,"schema":{"type":"string","enum":["2026-12-31T00:00:00Z","2026-10-02T00:00:00Z"]}},{"name":"maxResults","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":2500}},{"name":"singleEvents","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"orderBy","in":"query","required":false,"schema":{"type":"string","enum":["startTime","updated"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","enum":["EMR-local-","Standup","nothing"]}},{"name":"showDeleted","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"syncToken","in":"query","required":false,"schema":{"type":"string","enum":["CAESmockinvalid"]}},{"name":"pageToken","in":"query","required":false,"schema":{"type":"string","enum":["bogus"]}}]},"post":{"operationId":"EventsInsert","description":"Create an event.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Missing or empty time range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"409":{"description":"Duplicate id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}}}},"/calendar/v3/calendars/{calendarId}/events/{eventId}":{"parameters":[{"name":"calendarId","in":"path","required":true,"schema":{"type":"string","enum":["primary"]},"description":"\`primary\` or a calendar id from calendars.insert / calendarList (parity vocabulary: primary)."},{"name":"eventId","in":"path","required":true,"schema":{"type":"string","x-mockingbird-resource-ref":{"type":"event","missing":"0000000000000000000000mock"}}}],"get":{"operationId":"EventsGet","description":"One event.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"410":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}}},"put":{"operationId":"EventsUpdate","description":"Replace an event.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Missing or empty time range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}}},"delete":{"operationId":"EventsDelete","description":"Delete an event (it stays visible as cancelled to incremental sync).","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"410":{"description":"Already deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}}}},"/calendar/v3/calendars/{calendarId}/events/watch":{"parameters":[{"name":"calendarId","in":"path","required":true,"schema":{"type":"string","enum":["primary"]},"description":"\`primary\` or a calendar id from calendars.insert / calendarList (parity vocabulary: primary)."}],"post":{"operationId":"EventsWatch","description":"Open a push-notification channel on a calendar's events. A \`sync\` notification follows immediately, then \`exists\` on every change.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"400":{"description":"Bad channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchRequest"}}}}}},"/calendar/v3/channels/stop":{"post":{"operationId":"ChannelsStop","description":"Stop a push-notification channel.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"204":{"description":"Stopped"},"400":{"description":"Invalid value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopRequest"}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"TokenRequest":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"code":{"type":"string","examples":["4/mock-parity","4/mock-alice","4/unknown-code"]},"refresh_token":{"type":"string","examples":["1//mock.bogus"]},"client_id":{"type":"string","examples":["client-1.apps.googleusercontent.com"]},"client_secret":{"type":"string","examples":["secret"]},"redirect_uri":{"type":"string","examples":["postmessage"]},"code_verifier":{"type":"string"}}},"TokenResponse":{"type":"object","required":["access_token","expires_in","token_type","scope"],"properties":{"access_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"scope":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"id_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}}}},"OAuthError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"UserInfo":{"type":"object","required":["sub","email"],"properties":{"sub":{"type":"string"},"name":{"type":"string"},"given_name":{"type":"string"},"family_name":{"type":"string"},"picture":{"type":"string"},"email":{"type":"string"},"email_verified":{"type":"boolean"}}},"GoogleError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"status":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["domain","reason","message"],"properties":{"domain":{"type":"string"},"reason":{"type":"string"},"message":{"type":"string"},"locationType":{"type":"string"},"location":{"type":"string"}}}}}}}},"CalendarInput":{"type":"object","required":["summary"],"properties":{"summary":{"type":"string","minLength":1,"maxLength":100,"examples":["EMR Appointments (Local)"]},"description":{"type":"string","maxLength":500},"timeZone":{"type":"string","examples":["America/New_York","UTC"]}}},"Calendar":{"type":"object","required":["kind","etag","id","summary"],"properties":{"kind":{"type":"string","enum":["calendar#calendar"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"id":{"type":"string","x-mockingbird-resource":{"type":"calendar","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"summary":{"type":"string"},"description":{"type":"string"},"timeZone":{"type":"string"}}},"CalendarListEntry":{"type":"object","required":["kind","id","summary","accessRole"],"properties":{"kind":{"type":"string","enum":["calendar#calendarListEntry"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"id":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"summary":{"type":"string"},"description":{"type":"string"},"timeZone":{"type":"string"},"primary":{"type":"boolean"},"accessRole":{"type":"string"}}},"CalendarList":{"type":"object","required":["kind","items"],"properties":{"kind":{"type":"string","enum":["calendar#calendarList"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"nextSyncToken":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/CalendarListEntry"}}}},"EventInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-v0-9]{5,40}$","examples":["emrappt00001"]},"summary":{"type":"string","maxLength":200,"examples":["EMR-local-Follow-up","Standup"]},"description":{"type":"string","maxLength":1000},"location":{"type":"string","maxLength":200},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"start":{"type":"object","properties":{"dateTime":{"type":"string","examples":["2026-10-01T15:00:00Z","2026-10-01T16:00:00Z"]},"timeZone":{"type":"string","examples":["UTC"]}}},"end":{"type":"object","properties":{"dateTime":{"type":"string","examples":["2026-10-01T16:00:00Z","2026-10-01T15:30:00Z"]},"timeZone":{"type":"string","examples":["UTC"]}}},"extendedProperties":{"type":"object","properties":{"private":{"type":"object","additionalProperties":{"type":"string","maxLength":100}}}}}},"Event":{"type":"object","required":["kind","etag","id","status"],"properties":{"kind":{"type":"string","enum":["calendar#event"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"id":{"type":"string","x-mockingbird-resource":{"type":"event","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"status":{"type":"string"},"htmlLink":{"type":"string","x-mockingbird-volatile":{"kind":"url"}},"created":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"updated":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"summary":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"creator":{"type":"object"},"organizer":{"type":"object"},"start":{"type":"object","properties":{"dateTime":{"type":"string"},"date":{"type":"string"},"timeZone":{"type":"string"}}},"end":{"type":"object","properties":{"dateTime":{"type":"string"},"date":{"type":"string"},"timeZone":{"type":"string"}}},"iCalUID":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"sequence":{"type":"integer"},"extendedProperties":{"type":"object"},"reminders":{"type":"object"},"eventType":{"type":"string"}}},"Events":{"type":"object","required":["kind","items"],"properties":{"kind":{"type":"string","enum":["calendar#events"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"summary":{"type":"string"},"updated":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"timeZone":{"type":"string"},"accessRole":{"type":"string"},"defaultReminders":{"type":"array"},"nextPageToken":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"nextSyncToken":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}},"WatchRequest":{"type":"object","required":["id","type","address"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9/_+=-]+$"},"type":{"type":"string","enum":["web_hook","webhook"]},"address":{"type":"string","format":"uri","examples":["https://emr.example.com/v1/webhooks/google-calendar/primary","https://emr.example.com/v1/webhooks/google-calendar/emr"]},"token":{"type":"string","maxLength":256},"expiration":{"type":"string","pattern":"^[0-9]{10,14}$"}}},"Channel":{"type":"object","required":["kind","id","resourceId","resourceUri"],"properties":{"kind":{"type":"string","enum":["api#channel"]},"id":{"type":"string","x-mockingbird-resource":{"type":"channel","identity":true}},"resourceId":{"type":"string","x-mockingbird-resource":{"type":"channel_resource","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"resourceUri":{"type":"string","x-mockingbird-volatile":{"kind":"url"}},"token":{"type":"string"},"expiration":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}}}},"StopRequest":{"type":"object","required":["id","resourceId"],"properties":{"id":{"type":"string","x-mockingbird-resource-ref":{"type":"channel","missing":"missing-channel"}},"resourceId":{"type":"string","x-mockingbird-resource-ref":{"type":"channel_resource","missing":"missing-resource"}}}}}}}`);
|
|
2511
|
+
var document = JSON.parse(`{"openapi":"3.1.0","info":{"title":"Google Calendar v3 + Google OAuth (Mockingbird subset)","description":"Stateful mock subset of the Google Calendar API v3 (calendarList.list, calendars.insert, events list/get/insert/update/delete/watch, channels.stop) and Google OAuth 2.0 (token, revoke, OpenID userinfo), as \`googleapis\` / \`@googleapis/calendar\` and google-auth-library call them. Trimmed from Google's discovery document to what our EMR calls.\\n","version":"v3","x-mockingbird-upstream":{"note":"Shapes from https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest and https://developers.google.com/identity/protocols/oauth2; consumer (the EMR backend): services/google-calendar-service.ts, business/authorize/authorize.business.ts, routers/v1/webhooks/controller.ts."}},"servers":[{"url":"https://www.googleapis.com"}],"security":[{"bearerAuth":[]}],"paths":{"/token":{"post":{"operationId":"OAuthToken","description":"OAuth 2.0 token endpoint (oauth2.googleapis.com/token): authorization_code and refresh_token grants, form-encoded as google-auth-library sends them.","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"invalid_grant / invalid_request / unsupported_grant_type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"invalid_client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/revoke":{"post":{"operationId":"OAuthRevoke","description":"Revoke an access or refresh token (oauth2.googleapis.com/revoke?token=).","security":[],"x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","examples":["1//mock.cGFyaXR5QGV4YW1wbGUuY29t.0.x"]}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"invalid_token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/oauth2/v3/userinfo":{"get":{"operationId":"UserInfo","description":"OpenID userinfo for the token's user (www.googleapis.com/oauth2/v3/userinfo).","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"401":{"description":"Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/calendar/v3/users/me/calendarList":{"get":{"operationId":"CalendarListList","description":"The user's calendar list.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Calendar list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}}},"400":{"description":"Invalid value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"parameters":[{"name":"maxResults","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250}},{"name":"pageToken","in":"query","required":false,"schema":{"type":"string","enum":["bogus"]}}]}},"/calendar/v3/calendars":{"post":{"operationId":"CalendarsInsert","description":"Create a secondary calendar.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"400":{"description":"Missing summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarInput"}}}}}},"/calendar/v3/calendars/{calendarId}/events":{"parameters":[{"name":"calendarId","in":"path","required":true,"schema":{"type":"string","enum":["primary"]},"description":"\`primary\` or a calendar id from calendars.insert / calendarList (parity vocabulary: primary)."}],"get":{"operationId":"EventsList","description":"Events in a calendar: full lists with timeMin/timeMax/q/orderBy, pagination via pageToken, incremental sync via syncToken (410 fullSyncRequired when it is no longer valid).","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Events"}}}},"400":{"description":"Invalid parameter combination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"410":{"description":"Sync token no longer valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"parameters":[{"name":"timeMin","in":"query","required":false,"schema":{"type":"string","enum":["2026-01-01T00:00:00Z","2026-10-01T00:00:00Z"]}},{"name":"timeMax","in":"query","required":false,"schema":{"type":"string","enum":["2026-12-31T00:00:00Z","2026-10-02T00:00:00Z"]}},{"name":"maxResults","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":2500}},{"name":"singleEvents","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"orderBy","in":"query","required":false,"schema":{"type":"string","enum":["startTime","updated"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","enum":["EMR-local-","Standup","nothing"]}},{"name":"showDeleted","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"syncToken","in":"query","required":false,"schema":{"type":"string","enum":["CAESmockinvalid"]}},{"name":"pageToken","in":"query","required":false,"schema":{"type":"string","enum":["bogus"]}}]},"post":{"operationId":"EventsInsert","description":"Create an event.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Missing or empty time range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"409":{"description":"Duplicate id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}}}},"/calendar/v3/calendars/{calendarId}/events/{eventId}":{"parameters":[{"name":"calendarId","in":"path","required":true,"schema":{"type":"string","enum":["primary"]},"description":"\`primary\` or a calendar id from calendars.insert / calendarList (parity vocabulary: primary)."},{"name":"eventId","in":"path","required":true,"schema":{"type":"string","x-mockingbird-resource-ref":{"type":"event","missing":"0000000000000000000000mock"}}}],"get":{"operationId":"EventsGet","description":"One event.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":true}},"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"410":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}}},"put":{"operationId":"EventsUpdate","description":"Replace an event.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Missing or empty time range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}}},"delete":{"operationId":"EventsDelete","description":"Delete an event (it stays visible as cancelled to incremental sync).","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"410":{"description":"Already deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}}}},"/calendar/v3/calendars/{calendarId}/events/watch":{"parameters":[{"name":"calendarId","in":"path","required":true,"schema":{"type":"string","enum":["primary"]},"description":"\`primary\` or a calendar id from calendars.insert / calendarList (parity vocabulary: primary)."}],"post":{"operationId":"EventsWatch","description":"Open a push-notification channel on a calendar's events. A \`sync\` notification follows immediately, then \`exists\` on every change.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"200":{"description":"Channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"400":{"description":"Bad channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchRequest"}}}}}},"/calendar/v3/channels/stop":{"post":{"operationId":"ChannelsStop","description":"Stop a push-notification channel.","x-mockingbird":{"supported":true,"parity":{"enabled":true,"safe":false}},"responses":{"204":{"description":"Stopped"},"400":{"description":"Invalid value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"401":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"403":{"description":"Rate limit, disabled API or insufficient scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"404":{"description":"Unknown channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopRequest"}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"TokenRequest":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"code":{"type":"string","examples":["4/mock-parity","4/mock-alice","4/unknown-code"]},"refresh_token":{"type":"string","examples":["1//mock.bogus"]},"client_id":{"type":"string","examples":["client-1.apps.googleusercontent.com"]},"client_secret":{"type":"string","examples":["secret"]},"redirect_uri":{"type":"string","examples":["postmessage"]},"code_verifier":{"type":"string"}}},"TokenResponse":{"type":"object","required":["access_token","expires_in","token_type","scope"],"properties":{"access_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"scope":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"id_token":{"type":"string","x-mockingbird-volatile":{"kind":"token"}}}},"OAuthError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"UserInfo":{"type":"object","required":["sub","email"],"properties":{"sub":{"type":"string"},"name":{"type":"string"},"given_name":{"type":"string"},"family_name":{"type":"string"},"picture":{"type":"string"},"email":{"type":"string"},"email_verified":{"type":"boolean"}}},"GoogleError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"status":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["domain","reason","message"],"properties":{"domain":{"type":"string"},"reason":{"type":"string"},"message":{"type":"string"},"locationType":{"type":"string"},"location":{"type":"string"}}}}}}}},"CalendarInput":{"type":"object","required":["summary"],"properties":{"summary":{"type":"string","minLength":1,"maxLength":100,"examples":["EMR Appointments (Local)"]},"description":{"type":"string","maxLength":500},"timeZone":{"type":"string","examples":["America/New_York","UTC"]}}},"Calendar":{"type":"object","required":["kind","etag","id","summary"],"properties":{"kind":{"type":"string","enum":["calendar#calendar"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"id":{"type":"string","x-mockingbird-resource":{"type":"calendar","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"summary":{"type":"string"},"description":{"type":"string"},"timeZone":{"type":"string"}}},"CalendarListEntry":{"type":"object","required":["kind","id","summary","accessRole"],"properties":{"kind":{"type":"string","enum":["calendar#calendarListEntry"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"id":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"summary":{"type":"string"},"description":{"type":"string"},"timeZone":{"type":"string"},"primary":{"type":"boolean"},"accessRole":{"type":"string"}}},"CalendarList":{"type":"object","required":["kind","items"],"properties":{"kind":{"type":"string","enum":["calendar#calendarList"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"nextSyncToken":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/CalendarListEntry"}}}},"EventInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-v0-9]{5,40}$","examples":["emrappt00001"]},"summary":{"type":"string","maxLength":200,"examples":["EMR-local-Follow-up","Standup"]},"description":{"type":"string","maxLength":1000},"location":{"type":"string","maxLength":200},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"start":{"type":"object","properties":{"dateTime":{"type":"string","examples":["2026-10-01T15:00:00Z","2026-10-01T16:00:00Z"]},"timeZone":{"type":"string","examples":["UTC"]}}},"end":{"type":"object","properties":{"dateTime":{"type":"string","examples":["2026-10-01T16:00:00Z","2026-10-01T15:30:00Z"]},"timeZone":{"type":"string","examples":["UTC"]}}},"extendedProperties":{"type":"object","properties":{"private":{"type":"object","additionalProperties":{"type":"string","maxLength":100}}}}}},"Event":{"type":"object","required":["kind","etag","id","status"],"properties":{"kind":{"type":"string","enum":["calendar#event"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"id":{"type":"string","x-mockingbird-resource":{"type":"event","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"status":{"type":"string"},"htmlLink":{"type":"string","x-mockingbird-volatile":{"kind":"url"}},"created":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"updated":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"summary":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"creator":{"type":"object"},"organizer":{"type":"object"},"start":{"type":"object","properties":{"dateTime":{"type":"string"},"date":{"type":"string"},"timeZone":{"type":"string"}}},"end":{"type":"object","properties":{"dateTime":{"type":"string"},"date":{"type":"string"},"timeZone":{"type":"string"}}},"iCalUID":{"type":"string","x-mockingbird-volatile":{"kind":"id"}},"sequence":{"type":"integer"},"extendedProperties":{"type":"object"},"reminders":{"type":"object"},"eventType":{"type":"string"}}},"Events":{"type":"object","required":["kind","items"],"properties":{"kind":{"type":"string","enum":["calendar#events"]},"etag":{"type":"string","x-mockingbird-volatile":{"kind":"opaque"}},"summary":{"type":"string"},"updated":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}},"timeZone":{"type":"string"},"accessRole":{"type":"string"},"defaultReminders":{"type":"array"},"nextPageToken":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"nextSyncToken":{"type":"string","x-mockingbird-volatile":{"kind":"token"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}},"WatchRequest":{"type":"object","required":["id","type","address"],"properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9/_+=-]+$"},"type":{"type":"string","enum":["web_hook","webhook"]},"address":{"type":"string","format":"uri","examples":["https://emr.example.com/v1/webhooks/google-calendar/primary","https://emr.example.com/v1/webhooks/google-calendar/emr"]},"token":{"type":"string","maxLength":256},"expiration":{"type":"string","pattern":"^[0-9]{10,14}$"}}},"Channel":{"type":"object","required":["kind","id","resourceId","resourceUri"],"properties":{"kind":{"type":"string","enum":["api#channel"]},"id":{"type":"string","x-mockingbird-resource":{"type":"channel","identity":true}},"resourceId":{"type":"string","x-mockingbird-resource":{"type":"channel_resource","identity":true},"x-mockingbird-volatile":{"kind":"id"}},"resourceUri":{"type":"string","x-mockingbird-volatile":{"kind":"url"}},"token":{"type":"string"},"expiration":{"type":"string","x-mockingbird-volatile":{"kind":"timestamp"}}}},"StopRequest":{"type":"object","required":["id","resourceId"],"properties":{"id":{"type":"string","x-mockingbird-resource-ref":{"type":"channel","missing":"missing-channel"}},"resourceId":{"type":"string","x-mockingbird-resource-ref":{"type":"channel_resource","missing":"missing-resource"}}}}}}}`);
|
|
2512
2512
|
var operationIds = ["OAuthToken", "OAuthRevoke", "UserInfo", "CalendarListList", "CalendarsInsert", "EventsList", "EventsInsert", "EventsGet", "EventsUpdate", "EventsDelete", "EventsWatch", "ChannelsStop"];
|
|
2513
2513
|
var supportedOperationIds = ["OAuthToken", "OAuthRevoke", "UserInfo", "CalendarListList", "CalendarsInsert", "EventsList", "EventsInsert", "EventsGet", "EventsUpdate", "EventsDelete", "EventsWatch", "ChannelsStop"];
|
|
2514
2514
|
|
|
@@ -3564,4 +3564,4 @@ export {
|
|
|
3564
3564
|
emailFromCode,
|
|
3565
3565
|
GoogleCalendarAPI
|
|
3566
3566
|
};
|
|
3567
|
-
//# sourceMappingURL=chunk-
|
|
3567
|
+
//# sourceMappingURL=chunk-W4HXGXSP.js.map
|