-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GMS-1127] chore: Export api types from blockchain data package #971
Changes from 14 commits
994dd19
ec8079a
542c984
36c0548
a87e261
3fd4d9f
b4411be
1d4a544
075efb5
c67a37c
4e56b80
91c7115
a046bc1
5cbc815
dc1fecd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"supportsES6": true, | ||
"npmVersion": "6.9.0", | ||
"typescriptThreePlus": true, | ||
"withSeparateModelsAndApi": true, | ||
"modelPackage": "models", | ||
"apiPackage": "domain", | ||
"useSingleRequestParameter": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"supportsES6": true, | ||
"npmVersion": "6.9.0", | ||
"typescriptThreePlus": true, | ||
"withSeparateModelsAndApi": true, | ||
"modelPackage": "models", | ||
"apiPackage": "domain", | ||
"useSingleRequestParameter": true, | ||
"templateDir": "app/src/templates", | ||
"files": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here is where the custom generators are allowed to be configured, we are doing this for mr only at the moment, hence the seperate config files |
||
"api-types.mustache": { | ||
"templateType": "API", | ||
"destinationFilename": "-types.ts" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
export * as imx from './imx'; | ||
export * as mr from './multi-rollup'; | ||
|
||
export * as ActivitiesApi from './multi-rollup/domain/activities-api-types'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I experimented with auto-generating a combined namespace for all these types, but it proved to be a hinderance later on when trying to re-export selected api types from the public blockchain data package. For now we are exporting all the api domains, and choosing to re-export only relevant ones from blockchain data (not passport or orders api) |
||
export * as ChainsApi from './multi-rollup/domain/chains-api-types'; | ||
export * as CollectionsApi from './multi-rollup/domain/collections-api-types'; | ||
export * as MetadataApi from './multi-rollup/domain/metadata-api-types'; | ||
export * as NFTOwnersApi from './multi-rollup/domain/nft-owners-api-types'; | ||
export * as NFTsApi from './multi-rollup/domain/nfts-api-types'; | ||
export * as OrdersApi from './multi-rollup/domain/orders-api-types'; | ||
export * as PassportApi from './multi-rollup/domain/passport-api-types'; | ||
export * as TokensApi from './multi-rollup/domain/tokens-api-types'; | ||
|
||
export { ImxApiClients } from './imx-api-clients'; | ||
export { MultiRollupApiClients } from './mr-api-clients'; | ||
export { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.2.1 | ||
7.0.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was required to upgrade the generator library version in order to resolve compile issues with the generated types. I went through the consuming packages of the generated clients internal package in the SDK and checked they all still compiled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example usage