Skip to content

Commit

Permalink
feat: two more interface tweaks (#1287)
Browse files Browse the repository at this point in the history
I'm getting tsc failures in `w3infra/upload-api` because access-client
hasn't been updated to incorporate `UnexpectedError` - update access
client types so we can ship a new version. While I'm here, add set
method to upload-api `Service` type as well.
  • Loading branch information
travis authored Jan 29, 2024
1 parent 42804ff commit bc3c364
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/access-client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ import type {
SubscriptionList,
SubscriptionListSuccess,
SubscriptionListFailure,
PlanSet,
PlanSetSuccess,
PlanSetFailure,
} from '@web3-storage/capabilities/types'
import type { SetRequired } from 'type-fest'
import { Driver } from './drivers/types.js'
Expand Down Expand Up @@ -132,6 +135,7 @@ export interface Service {
}
plan: {
get: ServiceMethod<PlanGet, PlanGetSuccess, PlanGetFailure>
set: ServiceMethod<PlanSet, PlanSetSuccess, PlanSetFailure>
}
}

Expand Down
4 changes: 4 additions & 0 deletions packages/upload-api/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ import {
UsageReportSuccess,
UsageReportFailure,
UsageReport,
PlanSetSuccess,
PlanSetFailure,
PlanSet,
} from '@web3-storage/capabilities/types'
import * as Capabilities from '@web3-storage/capabilities'
import { RevocationsStorage } from './types/revocations.js'
Expand Down Expand Up @@ -262,6 +265,7 @@ export interface Service extends StorefrontService {
}
plan: {
get: ServiceMethod<PlanGet, PlanGetSuccess, PlanGetFailure>
set: ServiceMethod<PlanSet, PlanSetSuccess, PlanSetFailure>
}
usage: {
report: ServiceMethod<UsageReport, UsageReportSuccess, UsageReportFailure>
Expand Down

0 comments on commit bc3c364

Please sign in to comment.