Skip to content

Commit

Permalink
Merge pull request #597 from nevermined-io/fix/ext_resources_atts
Browse files Browse the repository at this point in the history
Adding optional resource type attributes
  • Loading branch information
aaitor authored Oct 16, 2023
2 parents b592eea + c2a7007 commit f0d73b2
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/testing-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: nevermined-io/nvm-tools-actions@v0.14.0
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
opengsn: 'true'
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: nevermined-io/nvm-tools-actions@v0.14.0
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
opengsn: 'true'
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: nevermined-io/nvm-tools-actions@v0.14.0
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
opengsn: 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# TODO: remove this when Node integrated with SDKv2 is integraged
ref: develop
token: ${{ secrets.API_TOKEN_GITHUB }}
- uses: nevermined-io/nvm-tools-actions@v0.14.0
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
opengsn: 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: nevermined-io/nvm-tools-actions@v0.14.0
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
opengsn: 'true'
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,25 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- feat: subscription by credits api [`f97aa61`](https://github.com/nevermined-io/sdk-js/commit/f97aa61c4328a7bc8ea1f14f584b3664876970db)
- chore: adapting nft 1155 to duration and transfer params [`a133315`](https://github.com/nevermined-io/sdk-js/commit/a133315c8b217cec7d41e6f863277dfe94fce98a)

#### [v2.0.0-rc2](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc16...v2.0.0-rc2)
#### [v2.0.0-rc2](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc18...v2.0.0-rc2)

> 26 July 2023
#### [v2.0.0-rc18](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc17...v2.0.0-rc18)

> 16 October 2023
- fix: adding additional external resource attributes [`17d9e60`](https://github.com/nevermined-io/sdk-js/commit/17d9e60a88ea3a6f6fdb5061682970734c3a7e6b)
- chore: adding v2.0.0-rc17 Changelog updates [`ce8106b`](https://github.com/nevermined-io/sdk-js/commit/ce8106b4b9e671841a3669d36aa056e6b0e8e2ce)
- chore: bumping version [`0c66298`](https://github.com/nevermined-io/sdk-js/commit/0c66298ca58111f7fac59afa306d5320f8a56d4d)

#### [v2.0.0-rc17](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc16...v2.0.0-rc17)

> 11 October 2023
- chore: adding v2.0.0-rc16 Changelog updates [`176899a`](https://github.com/nevermined-io/sdk-js/commit/176899afa7c4fb3bf8d28eb7bfa689e9ffca67fe)
- fix: the `tokenId` attribute in the DDO is now clean (no DID prefix) [`6e77cb1`](https://github.com/nevermined-io/sdk-js/commit/6e77cb12531ae7f74cd5703cc6846605c6b3bfdb)

#### [v2.0.0-rc16](https://github.com/nevermined-io/sdk-js/compare/v2.0.0-rc15...v2.0.0-rc16)

> 9 October 2023
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nevermined-io/sdk",
"version": "2.0.0-rc17",
"version": "2.0.0-rc18",
"description": "Javascript SDK for connecting with Nevermined Data Platform ",
"main": "./dist/node/sdk.js",
"typings": "./dist/node/sdk.d.ts",
Expand Down
17 changes: 16 additions & 1 deletion src/ddo/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ export interface ServiceMetadata {
definition: ServiceDefinition
}

export enum ExternalResourceFileType {
Avatar = 'Avatar',
Private = 'Private',
CoverImage = 'CoverImage',
TermsAndConditions = 'TermsAndConditions',
SampleData = 'SampleData',
Other = 'Other',
}

export interface MetaDataExternalResource {
/**
* File name.
Expand Down Expand Up @@ -139,7 +148,13 @@ export interface MetaDataExternalResource {
contentLength?: string

/**
* Resource ID (depending on the source).
* The type of the external resource file
*/
resourceType?: ExternalResourceFileType

/**
* Resource ID (depending on the source). It is used to reference the id of the file in an external source.
* For example the `ugcId`
*/
resourceId?: string

Expand Down

0 comments on commit f0d73b2

Please sign in to comment.