Skip to content

Commit

Permalink
Merge pull request #148 from awell-health:cache-service
Browse files Browse the repository at this point in the history
Add cache service
  • Loading branch information
ebomcke-awell authored May 29, 2023
2 parents 35948e9 + b6b7a0c commit dd1dfe3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
3 changes: 3 additions & 0 deletions extensions/elation/cache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { cache } from '@awell-health/extensions-core'

export const elationCacheService = new cache.InMemoryCache()
2 changes: 2 additions & 0 deletions extensions/elation/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
type SubscriptionRequest,
} from './types/subscription'
import { settingsSchema } from './validation/settings.zod'
import { elationCacheService } from './cache'

export class ElationDataWrapper extends DataWrapper {
public async getAppointment(id: number): Promise<AppointmentResponse> {
Expand Down Expand Up @@ -126,6 +127,7 @@ export class ElationAPIClient extends APIClient<ElationDataWrapper> {
auth: new OAuthPassword({
auth_url: authUrl,
request_config: requestConfig,
cacheService: elationCacheService,
}),
})
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"typescript": "4.9.5"
},
"dependencies": {
"@awell-health/extensions-core": "0.1.5",
"@awell-health/extensions-core": "0.1.6",
"@dropbox/sign": "^1.1.3",
"@mailchimp/mailchimp_transactional": "^1.0.50",
"@metriport/api": "^3.1.5",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@awell-health/awell-extensions@workspace:."
dependencies:
"@awell-health/extensions-core": 0.1.5
"@awell-health/extensions-core": 0.1.6
"@dropbox/sign": ^1.1.3
"@graphql-codegen/cli": ^3.2.2
"@graphql-codegen/typescript": ^3.0.2
Expand Down Expand Up @@ -108,15 +108,15 @@ __metadata:
languageName: unknown
linkType: soft

"@awell-health/extensions-core@npm:0.1.5":
version: 0.1.5
resolution: "@awell-health/extensions-core@npm:0.1.5"
"@awell-health/extensions-core@npm:0.1.6":
version: 0.1.6
resolution: "@awell-health/extensions-core@npm:0.1.6"
dependencies:
axios: ^1.4.0
date-fns: ^2.30.0
libphonenumber-js: ^1.10.30
zod: ^3.21.4
checksum: fef79ce2d39874ed3b7e68b2a143a0a75729b0667048c1664b31c52f2736605fde525b3f29ac3f6cafcc7b8d35efff8b1f6bd64322e1a63699a7f37fc2d5c3b8
checksum: 6c89e9ffe85a9b4048218f9c28935a9aa1cf4e97a5030cc68fb4c4464751d024e2c43fdb4e776b8d3949e532d92f361eb09474c5c0e60e35302d9fc5a9f20c6e
languageName: node
linkType: hard

Expand Down

0 comments on commit dd1dfe3

Please sign in to comment.