File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
apps/api/src/provider/services Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
import * as JwtModule from "@akashnetwork/jwt" ;
2
- import type { JwtTokenOptions } from "@akashnetwork/jwt/src/types" ;
2
+ import type { JwtTokenPayload } from "@akashnetwork/jwt/src/types" ;
3
3
import type { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing" ;
4
4
import { faker } from "@faker-js/faker" ;
5
5
import type { MockProxy } from "jest-mock-extended" ;
@@ -107,7 +107,7 @@ describe("JwtTokenService", () => {
107
107
mockBillingConfig : MockProxy < BillingConfig > ;
108
108
mockWalletId : number ;
109
109
mockWallet : MockProxy < WalletModule . Wallet > ;
110
- leases : JwtTokenOptions [ "leases" ] ;
110
+ leases : JwtTokenPayload [ "leases" ] ;
111
111
} {
112
112
jest . clearAllMocks ( ) ;
113
113
const mockWalletId = faker . number . int ( { min : 1 , max : 10000 } ) ;
@@ -141,7 +141,7 @@ describe("JwtTokenService", () => {
141
141
142
142
const jwtTokenService = new JwtTokenService ( mockBillingConfig ) ;
143
143
144
- const leases : JwtTokenOptions [ "leases" ] = {
144
+ const leases : JwtTokenPayload [ "leases" ] = {
145
145
access : "granular" ,
146
146
permissions : [
147
147
{
Original file line number Diff line number Diff line change 1
1
import { createSignArbitraryAkashWallet , JwtToken } from "@akashnetwork/jwt" ;
2
- import { JwtTokenOptions , Scope } from "@akashnetwork/jwt/src/types" ;
2
+ import type { AccessScope , JwtTokenPayload } from "@akashnetwork/jwt/src/types" ;
3
3
import { minutesToSeconds } from "date-fns" ;
4
4
import { singleton } from "tsyringe" ;
5
5
import * as uuid from "uuid" ;
@@ -17,7 +17,7 @@ type JwtTokenWithAddress = {
17
17
18
18
type GenerateJwtTokenParams = {
19
19
walletId : number ;
20
- leases : JwtTokenOptions [ "leases" ] ;
20
+ leases : JwtTokenPayload [ "leases" ] ;
21
21
ttl ?: number ;
22
22
} ;
23
23
@@ -51,7 +51,7 @@ export class JwtTokenService {
51
51
return { jwtToken, address : akashWallet . address } ;
52
52
}
53
53
54
- getGranularLeases ( { provider, scope } : { provider : string ; scope : Scope [ ] } ) : JwtTokenOptions [ "leases" ] {
54
+ getGranularLeases ( { provider, scope } : { provider : string ; scope : AccessScope [ ] } ) : JwtTokenPayload [ "leases" ] {
55
55
return {
56
56
access : "granular" ,
57
57
permissions : [ { provider, access : "scoped" , scope } ]
Original file line number Diff line number Diff line change 1
1
import type { ProviderHttpService } from "@akashnetwork/http-sdk" ;
2
- import type { JwtTokenOptions } from "@akashnetwork/jwt/src/types" ;
2
+ import type { JwtTokenPayload } from "@akashnetwork/jwt/src/types" ;
3
3
import { mock } from "jest-mock-extended" ;
4
4
5
5
import type { AuditorService } from "@src/provider/services/auditors/auditors.service" ;
@@ -28,7 +28,7 @@ describe(ProviderService.name, () => {
28
28
}
29
29
} ;
30
30
31
- const leases : JwtTokenOptions [ "leases" ] = {
31
+ const leases : JwtTokenPayload [ "leases" ] = {
32
32
access : "granular" ,
33
33
permissions : [ { provider : providerAddress , access : "scoped" , scope : [ "send-manifest" ] } ]
34
34
} ;
@@ -180,7 +180,7 @@ describe(ProviderService.name, () => {
180
180
services : { }
181
181
} ;
182
182
183
- const leases : JwtTokenOptions [ "leases" ] = {
183
+ const leases : JwtTokenPayload [ "leases" ] = {
184
184
access : "granular" ,
185
185
permissions : [ { provider : providerAddress , access : "scoped" , scope : [ "status" ] } ]
186
186
} ;
You can’t perform that action at this time.
0 commit comments