-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from velocitycareerlabs/VL-8115-nodejs-sample…
…-app-15 cont
- Loading branch information
Showing
16 changed files
with
287 additions
and
34 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
packages/sample-app/src/repositories/CheckForOffersRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Created by Michael Avoyan on 10/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const checkOffers = async ( | ||
generateOffersDescriptor: Dictionary<any>, | ||
sessionToken: Dictionary<any>, | ||
): Promise<Dictionary<any>> => { | ||
const config = { | ||
url: Urls.checkOffers, | ||
method: 'POST', | ||
data: { generateOffersDescriptor, sessionToken } | ||
}; | ||
return await fetcher(config); | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/sample-app/src/repositories/FinalizeOffersRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Created by Michael Avoyan on 10/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const finalizeOffers = async ( | ||
finalizeOffersDescriptor: Dictionary<any>, | ||
sessionToken: Dictionary<any>, | ||
): Promise<Dictionary<any>> => { | ||
const config = { | ||
url: Urls.finalizeOffers, | ||
method: 'POST', | ||
data: { finalizeOffersDescriptor, sessionToken }, | ||
}; | ||
return await fetcher(config); | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/sample-app/src/repositories/GenerateDidJwkRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Created by Michael Avoyan on 10/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import Urls from "../network/Urls"; | ||
import { Dictionary } from "../Types"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const generateDidJwk = async (generateDidJwkDescriptor: Dictionary<any>): Promise<Dictionary<any>> => { | ||
const config = { | ||
url: Urls.generateDidJwk, | ||
method: 'POST', | ||
data: generateDidJwkDescriptor, | ||
}; | ||
return await fetcher(config); | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/sample-app/src/repositories/GenerateOffersRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Created by Michael Avoyan on 09/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const generateOffers = async ( | ||
generateOffersDescriptor: Dictionary<any> | ||
): Promise<Dictionary<any>> => { | ||
const config = { | ||
url: Urls.generateOffers, | ||
method: 'POST', | ||
data: { generateOffersDescriptor }, | ||
}; | ||
return await fetcher(config); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/sample-app/src/repositories/GetCredentialManifestByServiceRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Created by Michael Avoyan on 10/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const getCredentialManifestByService = async ( | ||
credentialManifestDescriptorByService: Dictionary<any> | ||
): Promise<Dictionary<any>> => { | ||
const config = { | ||
url: Urls.getCredentialManifest, | ||
method: 'POST', | ||
data: credentialManifestDescriptorByService, | ||
}; | ||
return await fetcher(config); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/sample-app/src/repositories/SearchForOrganizationsRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Created by Michael Avoyan on 09/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const searchForOrganizations = async ( | ||
organizationDescriptor: Dictionary<any> | ||
): Promise<any> => { | ||
const config = { | ||
url: Urls.searchForOrganizations, | ||
method: 'POST', | ||
data: organizationDescriptor, | ||
}; | ||
return await fetcher(config); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.