@notifi-network/notifi-react-hooks
Advanced tools
Comparing version 0.0.1-alpha.21 to 0.0.1-alpha.22
@@ -1,4 +0,7 @@ | ||
import { GetSourceGroupsResult, CreateSourceGroupPayload, DeleteSourceGroupPayload, CreateSourceGroupResult } from '@notifi-network/notifi-core'; | ||
import { GetSourceGroupsResult, CreateSourcePayload, CreateSourceGroupPayload, DeleteSourceGroupPayload, CreateSourceGroupResult } from '@notifi-network/notifi-core'; | ||
export declare type CreateBundleInput = Readonly<{ | ||
newSources: ReadonlyArray<CreateSourcePayload>; | ||
}> & CreateSourceGroupPayload; | ||
declare const useBundlesService: () => { | ||
createBundle: (payload: CreateSourceGroupPayload) => Promise<CreateSourceGroupResult>; | ||
createBundle: (payload: CreateBundleInput) => Promise<CreateSourceGroupResult>; | ||
deleteBundle: (payload: DeleteSourceGroupPayload) => Promise<void>; | ||
@@ -5,0 +8,0 @@ error: unknown; |
@@ -15,4 +15,15 @@ "use strict"; | ||
setLoading(true); | ||
const { newSources, name, sourceIds } = payload; | ||
try { | ||
const result = await notifiService.createSourceGroup(payload); | ||
const createdSources = await Promise.all(newSources.map(notifiService.createSource)); | ||
const newSourceIds = [...sourceIds]; | ||
createdSources.forEach((source) => { | ||
if (source.id !== null) { | ||
newSourceIds.push(source.id); | ||
} | ||
}); | ||
const result = await notifiService.createSourceGroup({ | ||
name, | ||
sourceIds: newSourceIds | ||
}); | ||
const newSourceGroups = []; | ||
@@ -72,2 +83,2 @@ if (sourceGroups != null) { | ||
exports.default = useBundlesService; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlQnVuZGxlc1NlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvc2VydmljZUhvb2tzL3VzZUJ1bmRsZXNTZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBTUEsaUNBQXlEO0FBQ3pELDJGQUFtRTtBQU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HLElBQUEsbUJBQVcsRUFBQyxLQUFLLElBQUksRUFBRTtRQUNyQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDakIsSUFBSTtZQUNGLE1BQU0sTUFBTSxHQUFHLE1BQU0sYUFBYSxDQUFDLGVBQWUsRUFBRSxDQUFDO1lBQ3JELGVBQWUsQ0FBQyxNQUFNLENBQUMsQ0FBQztTQUN6QjtRQUFDLE9BQU8sQ0FBVSxFQUFFO1lBQ25CLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUNiO1FBRUQsVUFBVSxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ3BCLENBQUMsRUFBRSxDQUFDLGFBQWEsRUFBRSxRQUFRLEVBQUUsVUFBVSxFQUFFLGVBQWUsQ0FBQyxDQUFDLENBQUM7SUFFM0QsZUFBZTtJQUNmLElBQUEsaUJBQVMsRUFBQyxHQUFHLEVBQUU7UUFDYixPQUFPLEVBQUUsQ0FBQztJQUNaLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQztJQUVQLE9BQU87UUFDTCxZQUFZO1FBQ1osWUFBWTtRQUNaLEtBQUs7UUFDTCxPQUFPO1FBQ1AsV0FBVyxFQUFFLFlBQVk7S0FDMUIsQ0FBQztBQUNKLENBQUMsQ0FBQztBQUVGLGtCQUFlLGlCQUFpQixDQUFDIn0= |
{ | ||
"name": "@notifi-network/notifi-react-hooks", | ||
"version": "0.0.1-alpha.21+f939f3d", | ||
"version": "0.0.1-alpha.22+d6881ed", | ||
"description": "React hooks provided as a convenience wrapper around notifi.network platform functionality", | ||
@@ -41,4 +41,4 @@ "author": "Juni Kim <73hKrn@gmail.com>", | ||
"dependencies": { | ||
"@notifi-network/notifi-axios-adapter": "^0.0.1-alpha.21+f939f3d", | ||
"@notifi-network/notifi-core": "^0.0.1-alpha.21+f939f3d", | ||
"@notifi-network/notifi-axios-adapter": "^0.0.1-alpha.22+d6881ed", | ||
"@notifi-network/notifi-core": "^0.0.1-alpha.22+d6881ed", | ||
"axios": "^0.26.0", | ||
@@ -49,3 +49,3 @@ "react": "^17.0.2", | ||
}, | ||
"gitHead": "f939f3d7571b2114be459587a65963604d230f23" | ||
"gitHead": "d6881ed7d31be1fa711d51929c10bb3b9cb1393f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
89749
861