@calcom/atoms 1.0.35 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/{AddressInput-xdpADZ6a.js → AddressInput-T_CrBmRf.js} +4 -4
  2. package/dist/{AlbyPriceComponent-Or92Wq38.js → AlbyPriceComponent-EO_dsJvE.js} +24 -24
  3. package/dist/{Card-YXRwzLYs.js → Card-soWSbQyc.js} +1 -1
  4. package/dist/{DatePicker-kEtLX40X.js → DatePicker-lcmLJngR.js} +6 -6
  5. package/dist/{PhoneInput-z6tWOjjy.js → PhoneInput-4L3NBgx-.js} +61 -61
  6. package/dist/{PoweredBy-nFGX9x4g.js → PoweredBy-CbuMIwI6.js} +2 -2
  7. package/dist/{UnpublishedEntity-AeOec7kC.js → UnpublishedEntity-6AN6CU-I.js} +3 -3
  8. package/dist/cal-atoms.js +4 -4
  9. package/dist/cal-atoms.umd.cjs +126 -126
  10. package/dist/{framer-features-FRV_NUF8.js → framer-features-XhnOIXwJ.js} +7 -7
  11. package/dist/{index-CVilpVrZ.js → index-JcDhjvCF.js} +2 -2
  12. package/dist/index-KAnRs-wx.js +76 -0
  13. package/dist/{index-YVMeafN8.js → index-My3dnUlx.js} +13203 -13181
  14. package/dist/index-psDs_9O0.js +4 -0
  15. package/dist/{index-0P289PZn.js → index-sA_u6z9V.js} +1 -1
  16. package/dist/{index-dVp-Ebnc.js → index-zWVUe7ha.js} +2 -2
  17. package/dist/{isSupportedCountry-0hC9cf87.js → isSupportedCountry-HO7hQD0z.js} +1 -1
  18. package/dist/packages/app-store/_utils/getParsedAppKeysFromSlug.d.ts +2 -1
  19. package/dist/packages/app-store/_utils/getParsedAppKeysFromSlug.d.ts.map +1 -1
  20. package/dist/packages/app-store/_utils/invalidateCredential.d.ts +3 -0
  21. package/dist/packages/app-store/_utils/invalidateCredential.d.ts.map +1 -0
  22. package/dist/packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.d.ts +13 -0
  23. package/dist/packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.d.ts.map +1 -0
  24. package/dist/packages/app-store/_utils/oauth/OAuthManager.d.ts +168 -0
  25. package/dist/packages/app-store/_utils/oauth/OAuthManager.d.ts.map +1 -0
  26. package/dist/packages/app-store/_utils/oauth/OAuthManager.test.d.ts +1 -0
  27. package/dist/packages/app-store/_utils/oauth/OAuthManager.test.d.ts.map +1 -0
  28. package/dist/packages/app-store/_utils/oauth/getTokenObjectFromCredential.d.ts +10 -0
  29. package/dist/packages/app-store/_utils/oauth/getTokenObjectFromCredential.d.ts.map +1 -0
  30. package/dist/packages/app-store/_utils/oauth/markTokenAsExpired.d.ts +3 -0
  31. package/dist/packages/app-store/_utils/oauth/markTokenAsExpired.d.ts.map +1 -0
  32. package/dist/packages/app-store/_utils/oauth/oAuthManagerHelper.d.ts +41 -0
  33. package/dist/packages/app-store/_utils/oauth/oAuthManagerHelper.d.ts.map +1 -0
  34. package/dist/packages/app-store/_utils/oauth/universalSchema.d.ts +110 -0
  35. package/dist/packages/app-store/_utils/oauth/universalSchema.d.ts.map +1 -0
  36. package/dist/packages/app-store/_utils/oauth/updateTokenObject.d.ts +7 -0
  37. package/dist/packages/app-store/_utils/oauth/updateTokenObject.d.ts.map +1 -0
  38. package/dist/packages/app-store/_utils/testUtils.d.ts +19 -0
  39. package/dist/packages/app-store/_utils/testUtils.d.ts.map +1 -0
  40. package/dist/packages/app-store/apps.metadata.generated.d.ts +16 -0
  41. package/dist/packages/app-store/apps.metadata.generated.d.ts.map +1 -1
  42. package/dist/packages/app-store/apps.server.generated.d.ts +1 -0
  43. package/dist/packages/app-store/apps.server.generated.d.ts.map +1 -1
  44. package/dist/packages/app-store/clic/api/add.d.ts +4 -0
  45. package/dist/packages/app-store/clic/api/add.d.ts.map +1 -0
  46. package/dist/packages/app-store/clic/api/index.d.ts +2 -0
  47. package/dist/packages/app-store/clic/api/index.d.ts.map +1 -0
  48. package/dist/packages/app-store/clic/config.json.d.ts +19 -0
  49. package/dist/packages/app-store/clic/index.d.ts +2 -0
  50. package/dist/packages/app-store/clic/index.d.ts.map +1 -0
  51. package/dist/packages/app-store/googlecalendar/lib/CalendarService.d.ts +4 -1
  52. package/dist/packages/app-store/googlecalendar/lib/CalendarService.d.ts.map +1 -1
  53. package/dist/packages/app-store/googlecalendar/lib/getGoogleAppKeys.d.ts +5 -1
  54. package/dist/packages/app-store/googlecalendar/lib/getGoogleAppKeys.d.ts.map +1 -1
  55. package/dist/packages/app-store/office365calendar/lib/CalendarService.d.ts +1 -5
  56. package/dist/packages/app-store/office365calendar/lib/CalendarService.d.ts.map +1 -1
  57. package/dist/packages/app-store/office365calendar/lib/getOfficeAppKeys.d.ts +4 -1
  58. package/dist/packages/app-store/office365calendar/lib/getOfficeAppKeys.d.ts.map +1 -1
  59. package/dist/packages/app-store/office365video/lib/VideoApiAdapter.d.ts.map +1 -1
  60. package/dist/packages/app-store/office365video/lib/VideoApiAdapter.test.d.ts +2 -0
  61. package/dist/packages/app-store/office365video/lib/VideoApiAdapter.test.d.ts.map +1 -0
  62. package/dist/packages/app-store/stripepayment/lib/getStripeAppKeys.d.ts +6 -1
  63. package/dist/packages/app-store/stripepayment/lib/getStripeAppKeys.d.ts.map +1 -1
  64. package/dist/packages/app-store/zoomvideo/api/callback.d.ts.map +1 -1
  65. package/dist/packages/app-store/zoomvideo/lib/VideoApiAdapter.d.ts.map +1 -1
  66. package/dist/packages/features/bookings/Booker/utils/event.d.ts +2 -2
  67. package/dist/packages/features/bookings/components/event-meta/Members.d.ts.map +1 -1
  68. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts +1 -0
  69. package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
  70. package/dist/packages/features/ee/support/lib/intercom/useIntercom.d.ts.map +1 -1
  71. package/dist/packages/features/ee/workflows/components/WorkflowDetailsPage.d.ts.map +1 -1
  72. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +2 -2
  73. package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
  74. package/dist/packages/features/filters/components/TeamsFilter.d.ts.map +1 -1
  75. package/dist/packages/features/insights/components/BookingKPICards.d.ts.map +1 -1
  76. package/dist/packages/features/insights/components/FeedbackTable.d.ts +12 -0
  77. package/dist/packages/features/insights/components/FeedbackTable.d.ts.map +1 -0
  78. package/dist/packages/features/insights/components/HighestNoShowHostTable.d.ts +2 -0
  79. package/dist/packages/features/insights/components/HighestNoShowHostTable.d.ts.map +1 -0
  80. package/dist/packages/features/insights/components/HighestRatedMembersTable.d.ts +2 -0
  81. package/dist/packages/features/insights/components/HighestRatedMembersTable.d.ts.map +1 -0
  82. package/dist/packages/features/insights/components/LowestRatedMembersTable.d.ts +2 -0
  83. package/dist/packages/features/insights/components/LowestRatedMembersTable.d.ts.map +1 -0
  84. package/dist/packages/features/insights/components/RecentFeedbackTable.d.ts +2 -0
  85. package/dist/packages/features/insights/components/RecentFeedbackTable.d.ts.map +1 -0
  86. package/dist/packages/features/insights/components/TotalBookingUsersTable.d.ts.map +1 -1
  87. package/dist/packages/features/insights/components/TotalUserFeedbackTable.d.ts +12 -0
  88. package/dist/packages/features/insights/components/TotalUserFeedbackTable.d.ts.map +1 -0
  89. package/dist/packages/features/insights/components/index.d.ts +4 -0
  90. package/dist/packages/features/insights/components/index.d.ts.map +1 -1
  91. package/dist/packages/features/insights/server/events.d.ts +670 -0
  92. package/dist/packages/features/insights/server/events.d.ts.map +1 -1
  93. package/dist/packages/features/insights/server/trpc-router.d.ts +106 -0
  94. package/dist/packages/features/insights/server/trpc-router.d.ts.map +1 -1
  95. package/dist/packages/lib/constants.d.ts +1 -0
  96. package/dist/packages/lib/constants.d.ts.map +1 -1
  97. package/dist/packages/lib/defaultAvatarImage.d.ts +4 -0
  98. package/dist/packages/lib/defaultAvatarImage.d.ts.map +1 -1
  99. package/dist/packages/lib/entityPermissionUtils.d.ts.map +1 -1
  100. package/dist/packages/lib/errors.d.ts.map +1 -1
  101. package/dist/packages/lib/isOutOfBounds.d.ts +1 -1
  102. package/dist/packages/lib/isOutOfBounds.d.ts.map +1 -1
  103. package/dist/packages/lib/safeStringify.d.ts +3 -0
  104. package/dist/packages/lib/safeStringify.d.ts.map +1 -1
  105. package/dist/packages/lib/server/queries/teams/index.d.ts +0 -23
  106. package/dist/packages/lib/server/queries/teams/index.d.ts.map +1 -1
  107. package/dist/packages/lib/server/repository/profile.d.ts +0 -84
  108. package/dist/packages/lib/server/repository/profile.d.ts.map +1 -1
  109. package/dist/packages/lib/server/repository/user.d.ts +0 -42
  110. package/dist/packages/lib/server/repository/user.d.ts.map +1 -1
  111. package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
  112. package/dist/packages/platform/atoms/hooks/usePublicEvent.d.ts +2 -2
  113. package/dist/packages/prisma/zod/bookingtimestatus.d.ts +9 -0
  114. package/dist/packages/prisma/zod/bookingtimestatus.d.ts.map +1 -1
  115. package/dist/packages/trpc/react/hooks/useMeQuery.d.ts +5 -42
  116. package/dist/packages/trpc/react/hooks/useMeQuery.d.ts.map +1 -1
  117. package/dist/packages/trpc/server/middlewares/sessionMiddleware.d.ts +0 -210
  118. package/dist/packages/trpc/server/middlewares/sessionMiddleware.d.ts.map +1 -1
  119. package/dist/packages/trpc/server/procedures/authedProcedure.d.ts +0 -126
  120. package/dist/packages/trpc/server/procedures/authedProcedure.d.ts.map +1 -1
  121. package/dist/packages/trpc/server/routers/_app.d.ts +354 -258
  122. package/dist/packages/trpc/server/routers/_app.d.ts.map +1 -1
  123. package/dist/packages/trpc/server/routers/loggedInViewer/_router.d.ts +5 -42
  124. package/dist/packages/trpc/server/routers/loggedInViewer/_router.d.ts.map +1 -1
  125. package/dist/packages/trpc/server/routers/loggedInViewer/me.handler.d.ts +5 -42
  126. package/dist/packages/trpc/server/routers/loggedInViewer/me.handler.d.ts.map +1 -1
  127. package/dist/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.d.ts.map +1 -1
  128. package/dist/packages/trpc/server/routers/loggedInViewer/procedures/me.d.ts +5 -42
  129. package/dist/packages/trpc/server/routers/loggedInViewer/procedures/me.d.ts.map +1 -1
  130. package/dist/packages/trpc/server/routers/publicViewer/_router.d.ts +2 -2
  131. package/dist/packages/trpc/server/routers/publicViewer/event.handler.d.ts +2 -2
  132. package/dist/packages/trpc/server/routers/publicViewer/procedures/event.d.ts +2 -2
  133. package/dist/packages/trpc/server/routers/viewer/_router.d.ts +354 -258
  134. package/dist/packages/trpc/server/routers/viewer/_router.d.ts.map +1 -1
  135. package/dist/packages/trpc/server/routers/viewer/bookings/util.d.ts +0 -42
  136. package/dist/packages/trpc/server/routers/viewer/bookings/util.d.ts.map +1 -1
  137. package/dist/packages/trpc/server/routers/viewer/eventTypes/util.d.ts +0 -42
  138. package/dist/packages/trpc/server/routers/viewer/eventTypes/util.d.ts.map +1 -1
  139. package/dist/packages/trpc/server/routers/viewer/webhook/util.d.ts +0 -42
  140. package/dist/packages/trpc/server/routers/viewer/webhook/util.d.ts.map +1 -1
  141. package/globals.min.css +1 -1
  142. package/package.json +1 -1
  143. package/dist/index-4R6rlJjY.js +0 -4
  144. package/dist/index-swucF4c_.js +0 -77
@@ -0,0 +1,4 @@
1
+ import { U as i } from "./UnpublishedEntity-6AN6CU-I.js";
2
+ export {
3
+ i as UnpublishedEntity
4
+ };
@@ -1,4 +1,4 @@
1
- import { T as m, b as n } from "./index-YVMeafN8.js";
1
+ import { T as m, b as n } from "./index-My3dnUlx.js";
2
2
  export {
3
3
  m as TimezoneSelect,
4
4
  n as TimezoneSelectComponent
@@ -1,6 +1,6 @@
1
1
  import { memo as j, useState as T } from "react";
2
- import { an as k, aH as g, aq as t, aI as U, aJ as N, aK as C, au as b, ar as n, aD as v } from "./index-YVMeafN8.js";
3
- import { C as A } from "./Card-YXRwzLYs.js";
2
+ import { am as k, aG as g, ap as t, aH as U, aI as N, aJ as C, at as b, aq as n, aC as v } from "./index-My3dnUlx.js";
3
+ import { C as A } from "./Card-soWSbQyc.js";
4
4
  const I = [{
5
5
  id: 13,
6
6
  thumbnailUrl: "https://img.youtube.com/vi/ihE8OYTdklg/0.jpg",
@@ -1,4 +1,4 @@
1
- import { aF as t, aG as r } from "./index-YVMeafN8.js";
1
+ import { aE as t, aF as r } from "./index-My3dnUlx.js";
2
2
  function o() {
3
3
  return t(r, arguments);
4
4
  }
@@ -1,4 +1,5 @@
1
1
  import type Zod from "zod";
2
- export declare function getParsedAppKeysFromSlug(slug: string, schema: Zod.Schema): Promise<any>;
2
+ import type z from "zod";
3
+ export declare function getParsedAppKeysFromSlug<T extends Zod.Schema>(slug: string, schema: T): Promise<z.infer<T>>;
3
4
  export default getParsedAppKeysFromSlug;
4
5
  //# sourceMappingURL=getParsedAppKeysFromSlug.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getParsedAppKeysFromSlug.d.ts","sourceRoot":"","sources":["../../../../../../app-store/_utils/getParsedAppKeysFromSlug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAI3B,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,gBAG9E;AAED,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"getParsedAppKeysFromSlug.d.ts","sourceRoot":"","sources":["../../../../../../app-store/_utils/getParsedAppKeysFromSlug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,wBAAsB,wBAAwB,CAAC,CAAC,SAAS,GAAG,CAAC,MAAM,EACjE,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAGrB;AAED,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialPayload } from "@calcom/types/Credential";
2
+ export declare const invalidateCredential: (credentialId: CredentialPayload["id"]) => Promise<void>;
3
+ //# sourceMappingURL=invalidateCredential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalidateCredential.d.ts","sourceRoot":"","sources":["../../../../../../app-store/_utils/invalidateCredential.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,oBAAoB,iBAAwB,iBAAiB,CAAC,IAAI,CAAC,kBAiB/E,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This class is used to convert axios like response to fetch response
3
+ */
4
+ export declare class AxiosLikeResponseToFetchResponse<T extends {
5
+ status: number;
6
+ statusText: string;
7
+ data: unknown;
8
+ }> extends Response {
9
+ body: any;
10
+ constructor(axiomResponse: T);
11
+ json(): Promise<T["data"]>;
12
+ }
13
+ //# sourceMappingURL=AxiosLikeResponseToFetchResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AxiosLikeResponseToFetchResponse.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,gCAAgC,CAC3C,CAAC,SAAS;IACR,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;CACf,CACD,SAAQ,QAAQ;IAEhB,IAAI,EAAE,GAAG,CAAC;gBACE,aAAa,EAAE,CAAC;IAMtB,IAAI;CAGX"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Manages OAuth2.0 tokens for an app and resourceOwner. It automatically refreshes the token when needed.
3
+ * It is aware of the credential sync endpoint and can sync the token from the third party source.
4
+ * It is unaware of Prisma and App logic. It is just a utility to manage OAuth2.0 tokens with life cycle methods
5
+ *
6
+ * For a recommended usage example, see Zoom VideoApiAdapter.ts
7
+ */
8
+ import type { z } from "zod";
9
+ import type { AxiosLikeResponseToFetchResponse } from "./AxiosLikeResponseToFetchResponse";
10
+ import type { OAuth2UniversalSchema } from "./universalSchema";
11
+ import { OAuth2UniversalSchemaWithCalcomBackwardCompatibility } from "./universalSchema";
12
+ export declare const enum TokenStatus {
13
+ UNUSABLE_TOKEN_OBJECT = 0,
14
+ UNUSABLE_ACCESS_TOKEN = 1,
15
+ INCONCLUSIVE = 2,
16
+ VALID = 3
17
+ }
18
+ type ResourceOwner = {
19
+ id: number | null;
20
+ type: "team";
21
+ } | {
22
+ id: number | null;
23
+ type: "user";
24
+ };
25
+ type FetchNewTokenObject = ({ refreshToken }: {
26
+ refreshToken: string | null;
27
+ }) => Promise<Response | null>;
28
+ type UpdateTokenObject = (token: z.infer<typeof OAuth2UniversalSchemaWithCalcomBackwardCompatibility>) => Promise<void>;
29
+ type isTokenObjectUnusable = (response: Response) => Promise<{
30
+ reason: string;
31
+ } | null>;
32
+ type isAccessTokenUnusable = (response: Response) => Promise<{
33
+ reason: string;
34
+ } | null>;
35
+ type IsTokenExpired = (token: z.infer<typeof OAuth2UniversalSchema>) => Promise<boolean> | boolean;
36
+ type InvalidateTokenObject = () => Promise<void>;
37
+ type ExpireAccessToken = () => Promise<void>;
38
+ type CredentialSyncVariables = {
39
+ /**
40
+ * The secret required to access the credential sync endpoint
41
+ */
42
+ CREDENTIAL_SYNC_SECRET: string | undefined;
43
+ /**
44
+ * The header name that the secret should be passed in
45
+ */
46
+ CREDENTIAL_SYNC_SECRET_HEADER_NAME: string;
47
+ /**
48
+ * The endpoint where the credential sync should happen
49
+ */
50
+ CREDENTIAL_SYNC_ENDPOINT: string | undefined;
51
+ APP_CREDENTIAL_SHARING_ENABLED: boolean;
52
+ };
53
+ /**
54
+ * Manages OAuth2.0 tokens for an app and resourceOwner
55
+ * If expiry_date or expires_in isn't provided in token then it is considered expired immediately(if credential sync is not enabled)
56
+ * If credential sync is enabled, the token is considered expired after a year. It is expected to be refreshed by the API request from the credential source(as it knows when the token is expired)
57
+ */
58
+ export declare class OAuthManager {
59
+ private currentTokenObject;
60
+ private resourceOwner;
61
+ private appSlug;
62
+ private fetchNewTokenObject;
63
+ private updateTokenObject;
64
+ private isTokenObjectUnusable;
65
+ private isAccessTokenUnusable;
66
+ private isTokenExpired;
67
+ private invalidateTokenObject;
68
+ private expireAccessToken;
69
+ private credentialSyncVariables;
70
+ private useCredentialSync;
71
+ private autoCheckTokenExpiryOnRequest;
72
+ constructor({ resourceOwner, appSlug, currentTokenObject, fetchNewTokenObject, updateTokenObject, isTokenObjectUnusable, isAccessTokenUnusable, invalidateTokenObject, expireAccessToken, credentialSyncVariables, autoCheckTokenExpiryOnRequest, isTokenExpired, }: {
73
+ /**
74
+ * The resource owner for which the token is being managed
75
+ */
76
+ resourceOwner: ResourceOwner;
77
+ /**
78
+ * Does response for any request contain information that refresh_token became invalid and thus the entire token object become unusable
79
+ * Note: Right now, the implementations of this function makes it so that the response is considered invalid(sometimes) even if just access_token is revoked or invalid. In that case, regenerating access token should work. So, we shouldn't mark the token as invalid in that case.
80
+ * We should instead mark the token as expired. We could do that by introducing isAccessTokenInvalid function
81
+ *
82
+ * @param response
83
+ * @returns
84
+ */
85
+ isTokenObjectUnusable: isTokenObjectUnusable;
86
+ /**
87
+ *
88
+ */
89
+ isAccessTokenUnusable: isAccessTokenUnusable;
90
+ /**
91
+ * The current token object.
92
+ */
93
+ currentTokenObject: z.infer<typeof OAuth2UniversalSchema>;
94
+ /**
95
+ * The unique identifier of the app that the token is for. It is required to do credential syncing in self-hosting
96
+ */
97
+ appSlug: string;
98
+ /**
99
+ *
100
+ * It could be null in case refresh_token isn't available. This is possible when credential sync happens from a third party who doesn't want to share refresh_token and credential syncing has been disabled after the sync has happened.
101
+ * If credential syncing is still enabled `fetchNewTokenObject` wouldn't be called
102
+ */
103
+ fetchNewTokenObject: FetchNewTokenObject;
104
+ /**
105
+ * update token object
106
+ */
107
+ updateTokenObject: UpdateTokenObject;
108
+ /**
109
+ * Handler to invalidate the token object. It is called when the token object is invalid and credential syncing is disabled
110
+ */
111
+ invalidateTokenObject: InvalidateTokenObject;
112
+ expireAccessToken: ExpireAccessToken;
113
+ /**
114
+ * The variables required for credential syncing
115
+ */
116
+ credentialSyncVariables: CredentialSyncVariables;
117
+ /**
118
+ * If the token should be checked for expiry before sending a request
119
+ */
120
+ autoCheckTokenExpiryOnRequest?: boolean;
121
+ /**
122
+ * If there is a different way to check if the token is expired(and not the standard way of checking expiry_date)
123
+ */
124
+ isTokenExpired?: IsTokenExpired;
125
+ });
126
+ private isResponseNotOkay;
127
+ getTokenObjectOrFetch(): Promise<{
128
+ token: z.objectOutputType<{
129
+ access_token: z.ZodString;
130
+ refresh_token: z.ZodOptional<z.ZodString>;
131
+ token_type: z.ZodOptional<z.ZodString>;
132
+ scope: z.ZodOptional<z.ZodString>;
133
+ expiry_date: z.ZodOptional<z.ZodNumber>;
134
+ expires_in: z.ZodOptional<z.ZodNumber>;
135
+ }, z.ZodTypeAny, "passthrough">;
136
+ isUpdated: boolean;
137
+ }>;
138
+ request(arg: {
139
+ url: string;
140
+ options: RequestInit;
141
+ }): Promise<{
142
+ tokenStatus: TokenStatus;
143
+ json: unknown;
144
+ }>;
145
+ request<T>(customFetch: () => Promise<AxiosLikeResponseToFetchResponse<{
146
+ status: number;
147
+ statusText: string;
148
+ data: T;
149
+ }>>): Promise<{
150
+ tokenStatus: TokenStatus;
151
+ json: T;
152
+ }>;
153
+ /**
154
+ * It doesn't automatically detect the response for tokenObject and accessToken becoming invalid
155
+ * Could be used when you expect a possible non JSON response as well.
156
+ */
157
+ requestRaw({ url, options }: {
158
+ url: string;
159
+ options: RequestInit;
160
+ }): Promise<Response>;
161
+ private onInconclusiveResponse;
162
+ private invalidate;
163
+ private normalizeNewlyReceivedToken;
164
+ private refreshOAuthToken;
165
+ private getAndValidateOAuth2Response;
166
+ }
167
+ export {};
168
+ //# sourceMappingURL=OAuthManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OAuthManager.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0 +1 @@
1
+ {"version":3,"file":"OAuthManager.test.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/_utils/oauth/OAuthManager.test.ts"],"names":[],"mappings":"AAEA,OAAO,mBAAmB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { CredentialPayload } from "@calcom/types/Credential";
2
+ export declare function getTokenObjectFromCredential(credential: CredentialPayload): import("zod").objectOutputType<{
3
+ access_token: import("zod").ZodString;
4
+ refresh_token: import("zod").ZodOptional<import("zod").ZodString>;
5
+ token_type: import("zod").ZodOptional<import("zod").ZodString>;
6
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
7
+ expiry_date: import("zod").ZodOptional<import("zod").ZodNumber>;
8
+ expires_in: import("zod").ZodOptional<import("zod").ZodNumber>;
9
+ }, import("zod").ZodTypeAny, "passthrough">;
10
+ //# sourceMappingURL=getTokenObjectFromCredential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTokenObjectFromCredential.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/_utils/oauth/getTokenObjectFromCredential.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,iBAAiB;;;;;;;4CAiBzE"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialPayload } from "@calcom/types/Credential";
2
+ export declare const markTokenAsExpired: (credential: CredentialPayload) => Promise<void>;
3
+ //# sourceMappingURL=markTokenAsExpired.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markTokenAsExpired.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/_utils/oauth/markTokenAsExpired.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,eAAO,MAAM,kBAAkB,eAAsB,iBAAiB,kBAerE,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { getTokenObjectFromCredential } from "./getTokenObjectFromCredential";
2
+ export declare const credentialSyncVariables: {
3
+ APP_CREDENTIAL_SHARING_ENABLED: boolean;
4
+ CREDENTIAL_SYNC_ENDPOINT: string | undefined;
5
+ CREDENTIAL_SYNC_SECRET: string | undefined;
6
+ CREDENTIAL_SYNC_SECRET_HEADER_NAME: string;
7
+ };
8
+ export declare const oAuthManagerHelper: {
9
+ updateTokenObject: ({ tokenObject, credentialId, }: {
10
+ tokenObject: import("zod").objectOutputType<{
11
+ access_token: import("zod").ZodString;
12
+ refresh_token: import("zod").ZodOptional<import("zod").ZodString>;
13
+ token_type: import("zod").ZodOptional<import("zod").ZodString>;
14
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
15
+ expiry_date: import("zod").ZodOptional<import("zod").ZodNumber>;
16
+ expires_in: import("zod").ZodOptional<import("zod").ZodNumber>;
17
+ }, import("zod").ZodTypeAny, "passthrough">;
18
+ credentialId: number;
19
+ }) => Promise<void>;
20
+ markTokenAsExpired: (credential: {
21
+ type: string;
22
+ user: {
23
+ email: string;
24
+ } | null;
25
+ id: number;
26
+ userId: number | null;
27
+ invalid: boolean | null;
28
+ key: import(".prisma/client").Prisma.JsonValue;
29
+ teamId: number | null;
30
+ appId: string | null;
31
+ }) => Promise<void>;
32
+ invalidateCredential: (credentialId: number) => Promise<void>;
33
+ getTokenObjectFromCredential: typeof getTokenObjectFromCredential;
34
+ credentialSyncVariables: {
35
+ APP_CREDENTIAL_SHARING_ENABLED: boolean;
36
+ CREDENTIAL_SYNC_ENDPOINT: string | undefined;
37
+ CREDENTIAL_SYNC_SECRET: string | undefined;
38
+ CREDENTIAL_SYNC_SECRET_HEADER_NAME: string;
39
+ };
40
+ };
41
+ //# sourceMappingURL=oAuthManagerHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oAuthManagerHelper.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/_utils/oauth/oAuthManagerHelper.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAI9E,eAAO,MAAM,uBAAuB;;;;;CAKnC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM9B,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * We should be able to work with just the access token.
4
+ * access_token allows us to access the resources
5
+ */
6
+ export declare const OAuth2BareMinimumUniversalSchema: z.ZodObject<{
7
+ access_token: z.ZodString;
8
+ /**
9
+ * It is usually 'Bearer'
10
+ */
11
+ token_type: z.ZodOptional<z.ZodString>;
12
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
13
+ access_token: z.ZodString;
14
+ /**
15
+ * It is usually 'Bearer'
16
+ */
17
+ token_type: z.ZodOptional<z.ZodString>;
18
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
19
+ access_token: z.ZodString;
20
+ /**
21
+ * It is usually 'Bearer'
22
+ */
23
+ token_type: z.ZodOptional<z.ZodString>;
24
+ }, z.ZodTypeAny, "passthrough">>;
25
+ export declare const OAuth2UniversalSchema: z.ZodObject<{
26
+ access_token: z.ZodString;
27
+ token_type: z.ZodOptional<z.ZodString>;
28
+ refresh_token: z.ZodOptional<z.ZodString>;
29
+ scope: z.ZodOptional<z.ZodString>;
30
+ expiry_date: z.ZodOptional<z.ZodNumber>;
31
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
32
+ access_token: z.ZodString;
33
+ token_type: z.ZodOptional<z.ZodString>;
34
+ refresh_token: z.ZodOptional<z.ZodString>;
35
+ scope: z.ZodOptional<z.ZodString>;
36
+ expiry_date: z.ZodOptional<z.ZodNumber>;
37
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
38
+ access_token: z.ZodString;
39
+ token_type: z.ZodOptional<z.ZodString>;
40
+ refresh_token: z.ZodOptional<z.ZodString>;
41
+ scope: z.ZodOptional<z.ZodString>;
42
+ expiry_date: z.ZodOptional<z.ZodNumber>;
43
+ }, z.ZodTypeAny, "passthrough">>;
44
+ export declare const OAuth2UniversalSchemaWithCalcomBackwardCompatibility: z.ZodObject<{
45
+ access_token: z.ZodString;
46
+ refresh_token: z.ZodOptional<z.ZodString>;
47
+ token_type: z.ZodOptional<z.ZodString>;
48
+ scope: z.ZodOptional<z.ZodString>;
49
+ expiry_date: z.ZodOptional<z.ZodNumber>;
50
+ expires_in: z.ZodOptional<z.ZodNumber>;
51
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
52
+ access_token: z.ZodString;
53
+ refresh_token: z.ZodOptional<z.ZodString>;
54
+ token_type: z.ZodOptional<z.ZodString>;
55
+ scope: z.ZodOptional<z.ZodString>;
56
+ expiry_date: z.ZodOptional<z.ZodNumber>;
57
+ expires_in: z.ZodOptional<z.ZodNumber>;
58
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
59
+ access_token: z.ZodString;
60
+ refresh_token: z.ZodOptional<z.ZodString>;
61
+ token_type: z.ZodOptional<z.ZodString>;
62
+ scope: z.ZodOptional<z.ZodString>;
63
+ expiry_date: z.ZodOptional<z.ZodNumber>;
64
+ expires_in: z.ZodOptional<z.ZodNumber>;
65
+ }, z.ZodTypeAny, "passthrough">>;
66
+ export declare const OAuth2TokenResponseInDbWhenExistsSchema: z.ZodObject<{
67
+ access_token: z.ZodString;
68
+ refresh_token: z.ZodOptional<z.ZodString>;
69
+ token_type: z.ZodOptional<z.ZodString>;
70
+ scope: z.ZodOptional<z.ZodString>;
71
+ expiry_date: z.ZodOptional<z.ZodNumber>;
72
+ expires_in: z.ZodOptional<z.ZodNumber>;
73
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
74
+ access_token: z.ZodString;
75
+ refresh_token: z.ZodOptional<z.ZodString>;
76
+ token_type: z.ZodOptional<z.ZodString>;
77
+ scope: z.ZodOptional<z.ZodString>;
78
+ expiry_date: z.ZodOptional<z.ZodNumber>;
79
+ expires_in: z.ZodOptional<z.ZodNumber>;
80
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
81
+ access_token: z.ZodString;
82
+ refresh_token: z.ZodOptional<z.ZodString>;
83
+ token_type: z.ZodOptional<z.ZodString>;
84
+ scope: z.ZodOptional<z.ZodString>;
85
+ expiry_date: z.ZodOptional<z.ZodNumber>;
86
+ expires_in: z.ZodOptional<z.ZodNumber>;
87
+ }, z.ZodTypeAny, "passthrough">>;
88
+ export declare const OAuth2TokenResponseInDbSchema: z.ZodNullable<z.ZodObject<{
89
+ access_token: z.ZodString;
90
+ refresh_token: z.ZodOptional<z.ZodString>;
91
+ token_type: z.ZodOptional<z.ZodString>;
92
+ scope: z.ZodOptional<z.ZodString>;
93
+ expiry_date: z.ZodOptional<z.ZodNumber>;
94
+ expires_in: z.ZodOptional<z.ZodNumber>;
95
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
96
+ access_token: z.ZodString;
97
+ refresh_token: z.ZodOptional<z.ZodString>;
98
+ token_type: z.ZodOptional<z.ZodString>;
99
+ scope: z.ZodOptional<z.ZodString>;
100
+ expiry_date: z.ZodOptional<z.ZodNumber>;
101
+ expires_in: z.ZodOptional<z.ZodNumber>;
102
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
103
+ access_token: z.ZodString;
104
+ refresh_token: z.ZodOptional<z.ZodString>;
105
+ token_type: z.ZodOptional<z.ZodString>;
106
+ scope: z.ZodOptional<z.ZodString>;
107
+ expiry_date: z.ZodOptional<z.ZodNumber>;
108
+ expires_in: z.ZodOptional<z.ZodNumber>;
109
+ }, z.ZodTypeAny, "passthrough">>>;
110
+ //# sourceMappingURL=universalSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"universalSchema.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/_utils/oauth/universalSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;IAGzC;;OAEG;;;;IAFH;;OAEG;;;;IAFH;;OAEG;;gCAIS,CAAC;AAEjB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;gCAgBhC,CAAC;AAEH,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;gCAM/D,CAAC;AAEH,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;gCAAuD,CAAC;AAC5G,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;iCAAkE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type z from "zod";
2
+ import type { OAuth2UniversalSchemaWithCalcomBackwardCompatibility } from "./universalSchema";
3
+ export declare const updateTokenObject: ({ tokenObject, credentialId, }: {
4
+ tokenObject: z.infer<typeof OAuth2UniversalSchemaWithCalcomBackwardCompatibility>;
5
+ credentialId: number;
6
+ }) => Promise<void>;
7
+ //# sourceMappingURL=updateTokenObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateTokenObject.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/_utils/oauth/updateTokenObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,OAAO,KAAK,EAAE,oDAAoD,EAAE,MAAM,mBAAmB,CAAC;AAE9F,eAAO,MAAM,iBAAiB;iBAIf,EAAE,KAAK,CAAC,2DAA2D,CAAC;kBACnE,MAAM;mBAUrB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare function generateJsonResponse({ json, status, statusText, }: {
2
+ json: unknown;
3
+ status?: number;
4
+ statusText?: string;
5
+ }): Response;
6
+ export declare function internalServerErrorResponse({ json, }: {
7
+ json: unknown;
8
+ status?: number;
9
+ statusText?: string;
10
+ }): Response;
11
+ export declare function generateTextResponse({ text, status, statusText, }: {
12
+ text: string;
13
+ status?: number;
14
+ statusText?: string;
15
+ }): Response;
16
+ export declare function successResponse({ json }: {
17
+ json: unknown;
18
+ }): Response;
19
+ //# sourceMappingURL=testUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../../../../../app-store/_utils/testUtils.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,MAAY,EACZ,UAAiB,GAClB,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,YAKA;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,IAAI,GACL,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,YAEA;AAED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,MAAY,EACZ,UAAiB,GAClB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,YAKA;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,YAE1D"}
@@ -137,6 +137,22 @@ export declare const appStoreMetadata: {
137
137
  };
138
138
  };
139
139
  };
140
+ clic: {
141
+ "/*": string;
142
+ name: string;
143
+ slug: string;
144
+ type: string;
145
+ logo: string;
146
+ url: string;
147
+ variant: string;
148
+ categories: string[];
149
+ publisher: string;
150
+ email: string;
151
+ description: string;
152
+ isTemplate: boolean;
153
+ __createdUsingCli: boolean;
154
+ __template: string;
155
+ };
140
156
  closecom: {
141
157
  "/*": string;
142
158
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"apps.metadata.generated.d.ts","sourceRoot":"","sources":["../../../../../app-store/apps.metadata.generated.ts"],"names":[],"mappings":"AAyFA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsF5B,CAAC"}
@@ -12,6 +12,7 @@ export declare const apiHandlers: {
12
12
  "cal-ai": Promise<typeof import("./cal-ai/api")>;
13
13
  caldavcalendar: Promise<typeof import("./caldavcalendar/api")>;
14
14
  campfire: Promise<typeof import("./campfire/api")>;
15
+ clic: Promise<typeof import("./clic/api")>;
15
16
  closecom: Promise<typeof import("./closecom/api")>;
16
17
  cron: Promise<typeof import("./cron/api")>;
17
18
  deel: Promise<typeof import("./deel/api")>;
@@ -1 +1 @@
1
- {"version":3,"file":"apps.server.generated.d.ts","sourceRoot":"","sources":["../../../../../app-store/apps.server.generated.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFvB,CAAC"}
1
+ {"version":3,"file":"apps.server.generated.d.ts","sourceRoot":"","sources":["../../../../../app-store/apps.server.generated.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFvB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
2
+ declare const handler: AppDeclarativeHandler;
3
+ export default handler;
4
+ //# sourceMappingURL=add.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/clic/api/add.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAItE,QAAA,MAAM,OAAO,EAAE,qBAYd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as add } from "./add";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/clic/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,19 @@
1
+ declare const _default: {
2
+ "/*": "Don't modify slug - If required, do it using cli edit command",
3
+ "name": "Clic",
4
+ "slug": "clic",
5
+ "type": "check_in_automation",
6
+ "logo": "icon.svg",
7
+ "url": "https://clicis.vercel.app",
8
+ "variant": "automation",
9
+ "categories": ["automation"],
10
+ "publisher": "Chris Pacheco",
11
+ "email": "chrispacheco430@gmail.com",
12
+ "description": "Create, List and Interact with Your Cal.com links and connections easily.\r\r",
13
+ "isTemplate": false,
14
+ "__createdUsingCli": true,
15
+ "__template": "link-as-an-app"
16
+ }
17
+ ;
18
+
19
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export * as api from "./api";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../app-store/clic/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC"}
@@ -6,8 +6,11 @@ export default class GoogleCalendarService implements Calendar {
6
6
  private auth;
7
7
  private log;
8
8
  private credential;
9
+ private myGoogleAuth;
10
+ private oAuthManagerInstance;
9
11
  constructor(credential: CredentialPayload);
10
- private googleAuth;
12
+ private getMyGoogleAuthSingleton;
13
+ private initGoogleAuth;
11
14
  authedCalendar: () => Promise<calendar_v3.Calendar>;
12
15
  private getAttendees;
13
16
  createEvent(calEventRaw: CalendarEvent, credentialId: number): Promise<NewCalendarEventType>;
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarService.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/googlecalendar/lib/CalendarService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAa9C,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AA0ClE,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,QAAQ;IAC5D,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,IAAI,CAA4C;IACxD,OAAO,CAAC,GAAG,CAAgB;IAC3B,OAAO,CAAC,UAAU,CAAoB;gBAE1B,UAAU,EAAE,iBAAiB;IAQzC,OAAO,CAAC,UAAU,CA0DhB;IAEK,cAAc,sCAOnB;IAEF,OAAO,CAAC,YAAY,CAwClB;IAEI,WAAW,CAAC,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE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,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;CA4BtD"}
@@ -1,2 +1,6 @@
1
- export declare const getGoogleAppKeys: () => Promise<any>;
1
+ export declare const getGoogleAppKeys: () => Promise<{
2
+ client_id: string;
3
+ client_secret: string;
4
+ redirect_uris: string[];
5
+ }>;
2
6
  //# sourceMappingURL=getGoogleAppKeys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getGoogleAppKeys.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/googlecalendar/lib/getGoogleAppKeys.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,oBAE5B,CAAC"}
1
+ {"version":3,"file":"getGoogleAppKeys.d.ts","sourceRoot":"","sources":["../../../../../../../app-store/googlecalendar/lib/getGoogleAppKeys.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB;;;;EAE5B,CAAC"}
@@ -4,10 +4,7 @@ export default class Office365CalendarService implements Calendar {
4
4
  private url;
5
5
  private integrationName;
6
6
  private log;
7
- private accessToken;
8
- auth: {
9
- getToken: () => Promise<string>;
10
- };
7
+ private auth;
11
8
  private apiGraphUrl;
12
9
  private credential;
13
10
  constructor(credential: CredentialPayload);
@@ -16,7 +13,6 @@ export default class Office365CalendarService implements Calendar {
16
13
  deleteEvent(uid: string): Promise<void>;
17
14
  getAvailability(dateFrom: string, dateTo: string, selectedCalendars: IntegrationCalendar[]): Promise<EventBusyDate[]>;
18
15
  listCalendars(): Promise<IntegrationCalendar[]>;
19
- private o365Auth;
20
16
  private translateEvent;
21
17
  private fetcher;
22
18
  private fetchResponsesWithNextLink;