-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* scaffold datacite action * basic deposit * fix broken deposits * fix arcadia seed * added a few tests * dry * test tweaks * format * lockfile * fix eslint * support doi suffix * fix typeerror * small fixes and some error messages * remove log * suffix test * publish doi instead drafting * add lastModifiedBy to updatePub * fix type error in test * add datacite related environment variable definitions to terraform * declare existence of temp datacite secrets * fix tf issues * use datacite test api for now * Update core/actions/datacite/action.ts Co-authored-by: Thomas F. K. Jorna <[email protected]> * pr feedback * fix bad merge * new values * fix tests --------- Co-authored-by: Eric McDaniel <[email protected]> Co-authored-by: Thomas F. K. Jorna <[email protected]>
- Loading branch information
1 parent
327147f
commit bc6c85d
Showing
40 changed files
with
2,268 additions
and
217 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,5 +58,6 @@ export const resolveWithPubfields = <T extends Record<string, any>>( | |
return { | ||
...rest, | ||
...pv, | ||
pubFields, | ||
}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import * as z from "zod"; | ||
|
||
import { Action } from "db/public"; | ||
import { Globe } from "ui/icon"; | ||
|
||
import { defineAction } from "../types"; | ||
|
||
export const action = defineAction({ | ||
name: Action.datacite, | ||
config: { | ||
schema: z.object({ | ||
doi: z.string().optional(), | ||
doiPrefix: z.string().optional(), | ||
doiSuffix: z.string().optional(), | ||
title: z.string().optional(), | ||
url: z.string(), | ||
publisher: z.string(), | ||
publicationDate: z.date(), | ||
creator: z.string(), | ||
creatorName: z.string(), | ||
}), | ||
fieldConfig: { | ||
doi: { | ||
allowedSchemas: true, | ||
}, | ||
doiSuffix: { | ||
allowedSchemas: true, | ||
}, | ||
title: { | ||
allowedSchemas: true, | ||
}, | ||
url: { | ||
allowedSchemas: true, | ||
}, | ||
publisher: { | ||
allowedSchemas: true, | ||
}, | ||
publicationDate: { | ||
allowedSchemas: true, | ||
}, | ||
creator: { | ||
allowedSchemas: true, | ||
}, | ||
creatorName: { | ||
allowedSchemas: true, | ||
}, | ||
}, | ||
}, | ||
params: { | ||
schema: z.object({ | ||
doi: z.string().optional(), | ||
doiPrefix: z.string().optional(), | ||
doiSuffix: z.string().optional(), | ||
title: z.string().optional(), | ||
url: z.string(), | ||
publisher: z.string(), | ||
publicationDate: z.date(), | ||
creator: z.string(), | ||
creatorName: z.string(), | ||
}), | ||
fieldConfig: { | ||
doi: { | ||
allowedSchemas: true, | ||
}, | ||
doiSuffix: { | ||
allowedSchemas: true, | ||
}, | ||
title: { | ||
allowedSchemas: true, | ||
}, | ||
url: { | ||
allowedSchemas: true, | ||
}, | ||
publisher: { | ||
allowedSchemas: true, | ||
}, | ||
publicationDate: { | ||
allowedSchemas: true, | ||
}, | ||
creator: { | ||
allowedSchemas: true, | ||
}, | ||
creatorName: { | ||
allowedSchemas: true, | ||
}, | ||
}, | ||
}, | ||
description: "Deposit a pub to DataCite", | ||
icon: Globe, | ||
experimental: true, | ||
superAdminOnly: true, | ||
}); |
Oops, something went wrong.