@tsukilabs/nil-bindings 0.6.11 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.6.11";
2
+ var version = "0.7.0";
3
3
  //#endregion
4
4
  //#region src/env_Var.ts
5
5
  var env_Var = /* @__PURE__ */ function(env_Var) {
@@ -15,9 +15,19 @@ var env_Var = /* @__PURE__ */ function(env_Var) {
15
15
  return env_Var;
16
16
  }({});
17
17
  //#endregion
18
+ //#region src/ffi_Status.ts
19
+ var ffi_Status = /* @__PURE__ */ function(ffi_Status) {
20
+ ffi_Status[ffi_Status["OK"] = 0] = "OK";
21
+ ffi_Status[ffi_Status["ERR_NULL_POINTER"] = 1] = "ERR_NULL_POINTER";
22
+ ffi_Status[ffi_Status["ERR_NOTHING_TO_POLL"] = 2] = "ERR_NOTHING_TO_POLL";
23
+ ffi_Status[ffi_Status["ERR_SERIALIZATION"] = 3] = "ERR_SERIALIZATION";
24
+ ffi_Status[ffi_Status["ERR_UNKNOWN"] = 2147483647] = "ERR_UNKNOWN";
25
+ return ffi_Status;
26
+ }({});
27
+ //#endregion
18
28
  //#region src/index.ts
19
29
  //! Copyright (C) Call of Nil contributors
20
30
  //! SPDX-License-Identifier: AGPL-3.0-only
21
31
  var VERSION = version;
22
32
  //#endregion
23
- export { VERSION, env_Var };
33
+ export { VERSION, env_Var, ffi_Status };
@@ -0,0 +1,8 @@
1
+ //! Copyright (C) Call of Nil contributors
2
+ //! SPDX-License-Identifier: AGPL-3.0-only
3
+
4
+ import { ffi_QueueEntryKind } from './ffi_QueueEntryKind';
5
+ export type ffi_QueueEntry = {
6
+ kind: ffi_QueueEntryKind;
7
+ json_str: string;
8
+ };
@@ -0,0 +1,4 @@
1
+ //! Copyright (C) Call of Nil contributors
2
+ //! SPDX-License-Identifier: AGPL-3.0-only
3
+
4
+ export type ffi_QueueEntryKind = "response";
@@ -0,0 +1,4 @@
1
+ //! Copyright (C) Call of Nil contributors
2
+ //! SPDX-License-Identifier: AGPL-3.0-only
3
+
4
+ export type ffi_RequestId = number;
@@ -0,0 +1,16 @@
1
+ //! Copyright (C) Call of Nil contributors
2
+ //! SPDX-License-Identifier: AGPL-3.0-only
3
+
4
+ import { ffi_RequestId } from './ffi_RequestId';
5
+ import { ffi_Status } from './ffi_Status';
6
+ import { JsonValue } from './serde_json/JsonValue';
7
+ export type ffi_Response = {
8
+ id: ffi_RequestId;
9
+ } & ({
10
+ "kind": "ok";
11
+ data: JsonValue;
12
+ } | {
13
+ "kind": "err";
14
+ status: ffi_Status;
15
+ error: string;
16
+ });
@@ -0,0 +1,13 @@
1
+ //! Copyright (C) Call of Nil contributors
2
+ //! SPDX-License-Identifier: AGPL-3.0-only
3
+
4
+ import { ffi_Status } from './ffi_Status';
5
+ import { JsonValue } from './serde_json/JsonValue';
6
+ export type ffi_Result = {
7
+ "kind": "ok";
8
+ data: JsonValue;
9
+ } | {
10
+ "kind": "err";
11
+ status: ffi_Status;
12
+ error: string;
13
+ };
@@ -0,0 +1,10 @@
1
+ //! Copyright (C) Call of Nil contributors
2
+ //! SPDX-License-Identifier: AGPL-3.0-only
3
+
4
+ export declare enum ffi_Status {
5
+ "OK" = 0,
6
+ "ERR_NULL_POINTER" = 1,
7
+ "ERR_NOTHING_TO_POLL" = 2,
8
+ "ERR_SERIALIZATION" = 3,
9
+ "ERR_UNKNOWN" = 2147483647
10
+ }
@@ -136,6 +136,12 @@ export type { Ethics } from './Ethics';
136
136
  export type { EthicTruthAxis } from './EthicTruthAxis';
137
137
  export type { Event } from './Event';
138
138
  export type { Farm } from './Farm';
139
+ export type { ffi_QueueEntry } from './ffi_QueueEntry';
140
+ export type { ffi_QueueEntryKind } from './ffi_QueueEntryKind';
141
+ export type { ffi_RequestId } from './ffi_RequestId';
142
+ export type { ffi_Response } from './ffi_Response';
143
+ export type { ffi_Result } from './ffi_Result';
144
+ export { ffi_Status } from './ffi_Status';
139
145
  export type { Food } from './Food';
140
146
  export type { ForwardReportRequest } from './ForwardReportRequest';
141
147
  export type { GetAcademyRecruitCatalogRequest } from './GetAcademyRecruitCatalogRequest';
@@ -0,0 +1,6 @@
1
+ //! Copyright (C) Call of Nil contributors
2
+ //! SPDX-License-Identifier: AGPL-3.0-only
3
+
4
+ export type JsonValue = number | string | boolean | Array<JsonValue> | {
5
+ [key in string]: JsonValue;
6
+ } | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsukilabs/nil-bindings",
3
- "version": "0.6.11",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.17.0",
6
6
  "license": "AGPL-3.0-only",