-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added typescript definitions to js module (#757)
* Added typescript definitions to js module * Added license to the index definitions file * Updated build process, reverted package.json version * Added missing empty string after license header
- Loading branch information
1 parent
9a062e1
commit c38e800
Showing
7 changed files
with
3,442 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,9 @@ jobs: | |
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
- name: Install protoc | ||
run: | | ||
mkdir protoc | ||
|
@@ -87,6 +90,7 @@ jobs: | |
unzip protoc-22.3-linux-x86_64.zip | ||
wget https://github.com/protocolbuffers/protobuf-javascript/releases/download/v3.21.2/protobuf-javascript-3.21.2-linux-x86_64.zip | ||
unzip protobuf-javascript-3.21.2-linux-x86_64.zip | ||
npm i -g [email protected] | ||
PATH=$GITHUB_WORKSPACE/protoc/bin:$PATH protoc --version | ||
- name: Run protoc | ||
run: | | ||
|
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,23 @@ | ||
/** | ||
* Copyright 2024 Open Reaction Database Project Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import * as Dataset from './proto/dataset_pb'; | ||
import * as Reaction from './proto/reaction_pb'; | ||
|
||
export default { | ||
...Dataset, | ||
...Reaction, | ||
} |
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,96 @@ | ||
/** | ||
* Copyright 2024 Open Reaction Database Project Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// package: ord | ||
// file: ord-schema/proto/dataset.proto | ||
|
||
import * as jspb from "google-protobuf"; | ||
import * as ord_schema_proto_reaction_pb from "../../ord-schema/proto/reaction_pb"; | ||
|
||
export class Dataset extends jspb.Message { | ||
getName(): string; | ||
setName(value: string): void; | ||
|
||
getDescription(): string; | ||
setDescription(value: string): void; | ||
|
||
clearReactionsList(): void; | ||
getReactionsList(): Array<ord_schema_proto_reaction_pb.Reaction>; | ||
setReactionsList(value: Array<ord_schema_proto_reaction_pb.Reaction>): void; | ||
addReactions(value?: ord_schema_proto_reaction_pb.Reaction, index?: number): ord_schema_proto_reaction_pb.Reaction; | ||
|
||
clearReactionIdsList(): void; | ||
getReactionIdsList(): Array<string>; | ||
setReactionIdsList(value: Array<string>): void; | ||
addReactionIds(value: string, index?: number): string; | ||
|
||
getDatasetId(): string; | ||
setDatasetId(value: string): void; | ||
|
||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): Dataset.AsObject; | ||
static toObject(includeInstance: boolean, msg: Dataset): Dataset.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: Dataset, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): Dataset; | ||
static deserializeBinaryFromReader(message: Dataset, reader: jspb.BinaryReader): Dataset; | ||
} | ||
|
||
export namespace Dataset { | ||
export type AsObject = { | ||
name: string, | ||
description: string, | ||
reactionsList: Array<ord_schema_proto_reaction_pb.Reaction.AsObject>, | ||
reactionIdsList: Array<string>, | ||
datasetId: string, | ||
} | ||
} | ||
|
||
export class DatasetExample extends jspb.Message { | ||
getDatasetId(): string; | ||
setDatasetId(value: string): void; | ||
|
||
getDescription(): string; | ||
setDescription(value: string): void; | ||
|
||
getUrl(): string; | ||
setUrl(value: string): void; | ||
|
||
hasCreated(): boolean; | ||
clearCreated(): void; | ||
getCreated(): ord_schema_proto_reaction_pb.RecordEvent | undefined; | ||
setCreated(value?: ord_schema_proto_reaction_pb.RecordEvent): void; | ||
|
||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): DatasetExample.AsObject; | ||
static toObject(includeInstance: boolean, msg: DatasetExample): DatasetExample.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: DatasetExample, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): DatasetExample; | ||
static deserializeBinaryFromReader(message: DatasetExample, reader: jspb.BinaryReader): DatasetExample; | ||
} | ||
|
||
export namespace DatasetExample { | ||
export type AsObject = { | ||
datasetId: string, | ||
description: string, | ||
url: string, | ||
created?: ord_schema_proto_reaction_pb.RecordEvent.AsObject, | ||
} | ||
} | ||
|
Oops, something went wrong.