@ekhein/lamda-node-sdk 1.0.3 → 2.0.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.
Files changed (159) hide show
  1. package/dist/src/constants/activity.flag.d.ts +22 -0
  2. package/dist/src/constants/activity.flag.js +22 -0
  3. package/dist/src/constants/android.intent.d.ts +56 -0
  4. package/dist/src/constants/android.intent.js +56 -0
  5. package/dist/src/constants/android.permission.d.ts +30 -0
  6. package/dist/src/constants/android.permission.js +30 -0
  7. package/dist/src/constants/index.d.ts +3 -0
  8. package/dist/src/constants/index.js +3 -0
  9. package/dist/src/decorators/inject.decorator.d.ts +2 -0
  10. package/dist/src/decorators/inject.decorator.js +15 -0
  11. package/dist/src/exceptions/remoteCall.exception.d.ts +7 -0
  12. package/dist/src/exceptions/remoteCall.exception.js +12 -0
  13. package/dist/src/exceptions/timeout.exception.d.ts +4 -0
  14. package/dist/src/exceptions/timeout.exception.js +6 -0
  15. package/dist/src/interceptor/remoteException.Interceptor.d.ts +2 -0
  16. package/dist/src/interceptor/remoteException.Interceptor.js +13 -0
  17. package/dist/{main.d.ts → src/main.d.ts} +9 -21
  18. package/dist/src/main.js +135 -0
  19. package/dist/src/rpc/application.d.ts +136 -0
  20. package/dist/src/rpc/application.js +1537 -0
  21. package/dist/src/rpc/debug.d.ts +19 -0
  22. package/dist/src/rpc/debug.js +56 -0
  23. package/dist/{rpc → src/rpc}/file.d.ts +11 -13
  24. package/dist/src/rpc/file.js +373 -0
  25. package/dist/src/rpc/google/protobuf/any.d.ts +20 -0
  26. package/dist/src/rpc/google/protobuf/any.js +98 -0
  27. package/dist/src/rpc/google/protobuf/empty.d.ts +18 -0
  28. package/dist/src/rpc/google/protobuf/empty.js +39 -0
  29. package/dist/{rpc → src/rpc}/google/protobuf/struct.d.ts +19 -21
  30. package/dist/src/rpc/google/protobuf/struct.js +438 -0
  31. package/dist/src/rpc/policy.d.ts +22 -0
  32. package/dist/src/rpc/policy.js +103 -0
  33. package/dist/src/rpc/proxy.d.ts +106 -0
  34. package/dist/src/rpc/proxy.js +774 -0
  35. package/dist/{rpc → src/rpc}/services.d.ts +421 -424
  36. package/dist/src/rpc/services.js +1493 -0
  37. package/dist/src/rpc/settings.d.ts +29 -0
  38. package/dist/src/rpc/settings.js +125 -0
  39. package/dist/src/rpc/shell.d.ts +34 -0
  40. package/dist/src/rpc/shell.js +294 -0
  41. package/dist/{rpc → src/rpc}/status.d.ts +17 -19
  42. package/dist/src/rpc/status.js +896 -0
  43. package/dist/src/rpc/storage.d.ts +22 -0
  44. package/dist/src/rpc/storage.js +128 -0
  45. package/dist/src/rpc/types.d.ts +34 -0
  46. package/dist/src/rpc/types.js +281 -0
  47. package/dist/{rpc → src/rpc}/uiautomator.d.ts +87 -89
  48. package/dist/src/rpc/uiautomator.js +5350 -0
  49. package/dist/src/rpc/util.d.ts +101 -0
  50. package/dist/src/rpc/util.js +1158 -0
  51. package/dist/{rpc → src/rpc}/wifi.d.ts +23 -25
  52. package/dist/src/rpc/wifi.js +971 -0
  53. package/package.json +4 -9
  54. package/dist/chunk-3JBDAA2H.js +0 -439
  55. package/dist/chunk-4AHM55IO.js +0 -1172
  56. package/dist/chunk-4NKGYNMS.js +0 -116
  57. package/dist/chunk-6HD35RPW.js +0 -5370
  58. package/dist/chunk-76Y3OVVH.js +0 -1602
  59. package/dist/chunk-7XF22HAW.js +0 -907
  60. package/dist/chunk-7YGA6EOV.js +0 -109
  61. package/dist/chunk-ADS4GRIL.js +0 -14
  62. package/dist/chunk-FSLE4VGI.js +0 -48
  63. package/dist/chunk-H7Z6XFBF.js +0 -134
  64. package/dist/chunk-KJKSI2WL.js +0 -62
  65. package/dist/chunk-O52JGDU7.js +0 -800
  66. package/dist/chunk-ORXTTWPB.js +0 -379
  67. package/dist/chunk-OZJH6SR7.js +0 -20
  68. package/dist/chunk-P53F45YO.js +0 -64
  69. package/dist/chunk-QXMPY6EE.js +0 -289
  70. package/dist/chunk-SBFKX3ZY.js +0 -1554
  71. package/dist/chunk-WFQEBPE6.js +0 -300
  72. package/dist/chunk-X4LTH2UN.js +0 -983
  73. package/dist/chunk-XAX5BZL3.js +0 -132
  74. package/dist/chunk-ZXF5DGTC.js +0 -45
  75. package/dist/constants/activity.flag.cjs +0 -92
  76. package/dist/constants/activity.flag.d.cts +0 -24
  77. package/dist/constants/activity.flag.d.ts +0 -24
  78. package/dist/constants/activity.flag.js +0 -49
  79. package/dist/constants/android.intent.cjs +0 -194
  80. package/dist/constants/android.intent.d.cts +0 -58
  81. package/dist/constants/android.intent.d.ts +0 -58
  82. package/dist/constants/android.intent.js +0 -117
  83. package/dist/constants/android.permission.cjs +0 -116
  84. package/dist/constants/android.permission.d.cts +0 -32
  85. package/dist/constants/android.permission.d.ts +0 -32
  86. package/dist/constants/android.permission.js +0 -65
  87. package/dist/constants/index.cjs +0 -356
  88. package/dist/constants/index.d.cts +0 -3
  89. package/dist/constants/index.d.ts +0 -3
  90. package/dist/constants/index.js +0 -225
  91. package/dist/decorators/inject.decorator.cjs +0 -43
  92. package/dist/decorators/inject.decorator.d.cts +0 -5
  93. package/dist/decorators/inject.decorator.d.ts +0 -5
  94. package/dist/decorators/inject.decorator.js +0 -7
  95. package/dist/main.cjs +0 -11969
  96. package/dist/main.d.cts +0 -37
  97. package/dist/main.js +0 -112
  98. package/dist/rpc/application.cjs +0 -2019
  99. package/dist/rpc/application.d.cts +0 -138
  100. package/dist/rpc/application.d.ts +0 -138
  101. package/dist/rpc/application.js +0 -50
  102. package/dist/rpc/debug.cjs +0 -86
  103. package/dist/rpc/debug.d.cts +0 -21
  104. package/dist/rpc/debug.d.ts +0 -21
  105. package/dist/rpc/debug.js +0 -9
  106. package/dist/rpc/file.cjs +0 -405
  107. package/dist/rpc/file.d.cts +0 -40
  108. package/dist/rpc/file.js +0 -13
  109. package/dist/rpc/google/protobuf/any.cjs +0 -126
  110. package/dist/rpc/google/protobuf/any.d.cts +0 -22
  111. package/dist/rpc/google/protobuf/any.d.ts +0 -22
  112. package/dist/rpc/google/protobuf/any.js +0 -103
  113. package/dist/rpc/google/protobuf/empty.cjs +0 -69
  114. package/dist/rpc/google/protobuf/empty.d.cts +0 -20
  115. package/dist/rpc/google/protobuf/empty.d.ts +0 -20
  116. package/dist/rpc/google/protobuf/empty.js +0 -9
  117. package/dist/rpc/google/protobuf/struct.cjs +0 -469
  118. package/dist/rpc/google/protobuf/struct.d.cts +0 -65
  119. package/dist/rpc/google/protobuf/struct.js +0 -21
  120. package/dist/rpc/policy.cjs +0 -133
  121. package/dist/rpc/policy.d.cts +0 -24
  122. package/dist/rpc/policy.d.ts +0 -24
  123. package/dist/rpc/policy.js +0 -9
  124. package/dist/rpc/proxy.cjs +0 -1109
  125. package/dist/rpc/proxy.d.cts +0 -108
  126. package/dist/rpc/proxy.d.ts +0 -108
  127. package/dist/rpc/proxy.js +0 -49
  128. package/dist/rpc/services.cjs +0 -11898
  129. package/dist/rpc/services.d.cts +0 -1920
  130. package/dist/rpc/services.js +0 -48
  131. package/dist/rpc/settings.cjs +0 -161
  132. package/dist/rpc/settings.d.cts +0 -31
  133. package/dist/rpc/settings.d.ts +0 -31
  134. package/dist/rpc/settings.js +0 -15
  135. package/dist/rpc/shell.cjs +0 -326
  136. package/dist/rpc/shell.d.cts +0 -36
  137. package/dist/rpc/shell.d.ts +0 -36
  138. package/dist/rpc/shell.js +0 -13
  139. package/dist/rpc/status.cjs +0 -936
  140. package/dist/rpc/status.d.cts +0 -76
  141. package/dist/rpc/status.js +0 -19
  142. package/dist/rpc/storage.cjs +0 -156
  143. package/dist/rpc/storage.d.cts +0 -24
  144. package/dist/rpc/storage.d.ts +0 -24
  145. package/dist/rpc/storage.js +0 -9
  146. package/dist/rpc/types.cjs +0 -317
  147. package/dist/rpc/types.d.cts +0 -36
  148. package/dist/rpc/types.d.ts +0 -36
  149. package/dist/rpc/types.js +0 -17
  150. package/dist/rpc/uiautomator.cjs +0 -5446
  151. package/dist/rpc/uiautomator.d.cts +0 -618
  152. package/dist/rpc/uiautomator.js +0 -113
  153. package/dist/rpc/util.cjs +0 -1212
  154. package/dist/rpc/util.d.cts +0 -103
  155. package/dist/rpc/util.d.ts +0 -103
  156. package/dist/rpc/util.js +0 -41
  157. package/dist/rpc/wifi.cjs +0 -1015
  158. package/dist/rpc/wifi.d.cts +0 -84
  159. package/dist/rpc/wifi.js +0 -25
@@ -1,103 +0,0 @@
1
- import "../../../chunk-ADS4GRIL.js";
2
-
3
- // src/rpc/google/protobuf/any.ts
4
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
5
- var protobufPackage = "google.protobuf";
6
- function createBaseAny() {
7
- return { typeUrl: "", value: new Uint8Array(0) };
8
- }
9
- var Any = {
10
- encode(message, writer = new BinaryWriter()) {
11
- if (message.typeUrl !== "") {
12
- writer.uint32(10).string(message.typeUrl);
13
- }
14
- if (message.value.length !== 0) {
15
- writer.uint32(18).bytes(message.value);
16
- }
17
- return writer;
18
- },
19
- decode(input, length) {
20
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
21
- let end = length === void 0 ? reader.len : reader.pos + length;
22
- const message = createBaseAny();
23
- while (reader.pos < end) {
24
- const tag = reader.uint32();
25
- switch (tag >>> 3) {
26
- case 1: {
27
- if (tag !== 10) {
28
- break;
29
- }
30
- message.typeUrl = reader.string();
31
- continue;
32
- }
33
- case 2: {
34
- if (tag !== 18) {
35
- break;
36
- }
37
- message.value = reader.bytes();
38
- continue;
39
- }
40
- }
41
- if ((tag & 7) === 4 || tag === 0) {
42
- break;
43
- }
44
- reader.skip(tag & 7);
45
- }
46
- return message;
47
- },
48
- fromJSON(object) {
49
- return {
50
- typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
51
- value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0)
52
- };
53
- },
54
- toJSON(message) {
55
- const obj = {};
56
- if (message.typeUrl !== "") {
57
- obj.typeUrl = message.typeUrl;
58
- }
59
- if (message.value.length !== 0) {
60
- obj.value = base64FromBytes(message.value);
61
- }
62
- return obj;
63
- },
64
- create(base) {
65
- return Any.fromPartial(base ?? {});
66
- },
67
- fromPartial(object) {
68
- const message = createBaseAny();
69
- message.typeUrl = object.typeUrl ?? "";
70
- message.value = object.value ?? new Uint8Array(0);
71
- return message;
72
- }
73
- };
74
- function bytesFromBase64(b64) {
75
- if (globalThis.Buffer) {
76
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
77
- } else {
78
- const bin = globalThis.atob(b64);
79
- const arr = new Uint8Array(bin.length);
80
- for (let i = 0; i < bin.length; ++i) {
81
- arr[i] = bin.charCodeAt(i);
82
- }
83
- return arr;
84
- }
85
- }
86
- function base64FromBytes(arr) {
87
- if (globalThis.Buffer) {
88
- return globalThis.Buffer.from(arr).toString("base64");
89
- } else {
90
- const bin = [];
91
- arr.forEach((byte) => {
92
- bin.push(globalThis.String.fromCharCode(byte));
93
- });
94
- return globalThis.btoa(bin.join(""));
95
- }
96
- }
97
- function isSet(value) {
98
- return value !== null && value !== void 0;
99
- }
100
- export {
101
- Any,
102
- protobufPackage
103
- };
@@ -1,69 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/rpc/google/protobuf/empty.ts
20
- var empty_exports = {};
21
- __export(empty_exports, {
22
- Empty: () => Empty,
23
- protobufPackage: () => protobufPackage
24
- });
25
- module.exports = __toCommonJS(empty_exports);
26
- var import_wire = require("@bufbuild/protobuf/wire");
27
- var protobufPackage = "google.protobuf";
28
- function createBaseEmpty() {
29
- return {};
30
- }
31
- var Empty = {
32
- encode(_, writer = new import_wire.BinaryWriter()) {
33
- return writer;
34
- },
35
- decode(input, length) {
36
- const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
37
- let end = length === void 0 ? reader.len : reader.pos + length;
38
- const message = createBaseEmpty();
39
- while (reader.pos < end) {
40
- const tag = reader.uint32();
41
- switch (tag >>> 3) {
42
- }
43
- if ((tag & 7) === 4 || tag === 0) {
44
- break;
45
- }
46
- reader.skip(tag & 7);
47
- }
48
- return message;
49
- },
50
- fromJSON(_) {
51
- return {};
52
- },
53
- toJSON(_) {
54
- const obj = {};
55
- return obj;
56
- },
57
- create(base) {
58
- return Empty.fromPartial(base ?? {});
59
- },
60
- fromPartial(_) {
61
- const message = createBaseEmpty();
62
- return message;
63
- }
64
- };
65
- // Annotate the CommonJS export names for ESM import in node:
66
- 0 && (module.exports = {
67
- Empty,
68
- protobufPackage
69
- });
@@ -1,20 +0,0 @@
1
- import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
-
3
- declare const protobufPackage = "google.protobuf";
4
- interface Empty {
5
- }
6
- declare const Empty: MessageFns<Empty>;
7
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
8
- type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
9
- [K in keyof T]?: DeepPartial<T[K]>;
10
- } : Partial<T>;
11
- interface MessageFns<T> {
12
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
13
- decode(input: BinaryReader | Uint8Array, length?: number): T;
14
- fromJSON(object: any): T;
15
- toJSON(message: T): unknown;
16
- create(base?: DeepPartial<T>): T;
17
- fromPartial(object: DeepPartial<T>): T;
18
- }
19
-
20
- export { type DeepPartial, Empty, type MessageFns, protobufPackage };
@@ -1,20 +0,0 @@
1
- import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
-
3
- declare const protobufPackage = "google.protobuf";
4
- interface Empty {
5
- }
6
- declare const Empty: MessageFns<Empty>;
7
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
8
- type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
9
- [K in keyof T]?: DeepPartial<T[K]>;
10
- } : Partial<T>;
11
- interface MessageFns<T> {
12
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
13
- decode(input: BinaryReader | Uint8Array, length?: number): T;
14
- fromJSON(object: any): T;
15
- toJSON(message: T): unknown;
16
- create(base?: DeepPartial<T>): T;
17
- fromPartial(object: DeepPartial<T>): T;
18
- }
19
-
20
- export { type DeepPartial, Empty, type MessageFns, protobufPackage };
@@ -1,9 +0,0 @@
1
- import {
2
- Empty,
3
- protobufPackage
4
- } from "../../../chunk-ZXF5DGTC.js";
5
- import "../../../chunk-ADS4GRIL.js";
6
- export {
7
- Empty,
8
- protobufPackage
9
- };
@@ -1,469 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/rpc/google/protobuf/struct.ts
20
- var struct_exports = {};
21
- __export(struct_exports, {
22
- ListValue: () => ListValue,
23
- NullValue: () => NullValue,
24
- Struct: () => Struct,
25
- Struct_FieldsEntry: () => Struct_FieldsEntry,
26
- Value: () => Value,
27
- nullValueFromJSON: () => nullValueFromJSON,
28
- nullValueToJSON: () => nullValueToJSON,
29
- protobufPackage: () => protobufPackage
30
- });
31
- module.exports = __toCommonJS(struct_exports);
32
- var import_wire = require("@bufbuild/protobuf/wire");
33
- var protobufPackage = "google.protobuf";
34
- var NullValue = /* @__PURE__ */ ((NullValue2) => {
35
- NullValue2[NullValue2["NULL_VALUE"] = 0] = "NULL_VALUE";
36
- NullValue2[NullValue2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
37
- return NullValue2;
38
- })(NullValue || {});
39
- function nullValueFromJSON(object) {
40
- switch (object) {
41
- case 0:
42
- case "NULL_VALUE":
43
- return 0 /* NULL_VALUE */;
44
- case -1:
45
- case "UNRECOGNIZED":
46
- default:
47
- return -1 /* UNRECOGNIZED */;
48
- }
49
- }
50
- function nullValueToJSON(object) {
51
- switch (object) {
52
- case 0 /* NULL_VALUE */:
53
- return "NULL_VALUE";
54
- case -1 /* UNRECOGNIZED */:
55
- default:
56
- return "UNRECOGNIZED";
57
- }
58
- }
59
- function createBaseStruct() {
60
- return { fields: {} };
61
- }
62
- var Struct = {
63
- encode(message, writer = new import_wire.BinaryWriter()) {
64
- Object.entries(message.fields).forEach(([key, value]) => {
65
- if (value !== void 0) {
66
- Struct_FieldsEntry.encode({ key, value }, writer.uint32(10).fork()).join();
67
- }
68
- });
69
- return writer;
70
- },
71
- decode(input, length) {
72
- const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
73
- let end = length === void 0 ? reader.len : reader.pos + length;
74
- const message = createBaseStruct();
75
- while (reader.pos < end) {
76
- const tag = reader.uint32();
77
- switch (tag >>> 3) {
78
- case 1: {
79
- if (tag !== 10) {
80
- break;
81
- }
82
- const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
83
- if (entry1.value !== void 0) {
84
- message.fields[entry1.key] = entry1.value;
85
- }
86
- continue;
87
- }
88
- }
89
- if ((tag & 7) === 4 || tag === 0) {
90
- break;
91
- }
92
- reader.skip(tag & 7);
93
- }
94
- return message;
95
- },
96
- fromJSON(object) {
97
- return {
98
- fields: isObject(object.fields) ? Object.entries(object.fields).reduce((acc, [key, value]) => {
99
- acc[key] = value;
100
- return acc;
101
- }, {}) : {}
102
- };
103
- },
104
- toJSON(message) {
105
- const obj = {};
106
- if (message.fields) {
107
- const entries = Object.entries(message.fields);
108
- if (entries.length > 0) {
109
- obj.fields = {};
110
- entries.forEach(([k, v]) => {
111
- obj.fields[k] = v;
112
- });
113
- }
114
- }
115
- return obj;
116
- },
117
- create(base) {
118
- return Struct.fromPartial(base ?? {});
119
- },
120
- fromPartial(object) {
121
- const message = createBaseStruct();
122
- message.fields = Object.entries(object.fields ?? {}).reduce(
123
- (acc, [key, value]) => {
124
- if (value !== void 0) {
125
- acc[key] = value;
126
- }
127
- return acc;
128
- },
129
- {}
130
- );
131
- return message;
132
- },
133
- wrap(object) {
134
- const struct = createBaseStruct();
135
- if (object !== void 0) {
136
- for (const key of Object.keys(object)) {
137
- struct.fields[key] = object[key];
138
- }
139
- }
140
- return struct;
141
- },
142
- unwrap(message) {
143
- const object = {};
144
- if (message.fields) {
145
- for (const key of Object.keys(message.fields)) {
146
- object[key] = message.fields[key];
147
- }
148
- }
149
- return object;
150
- }
151
- };
152
- function createBaseStruct_FieldsEntry() {
153
- return { key: "", value: void 0 };
154
- }
155
- var Struct_FieldsEntry = {
156
- encode(message, writer = new import_wire.BinaryWriter()) {
157
- if (message.key !== "") {
158
- writer.uint32(10).string(message.key);
159
- }
160
- if (message.value !== void 0) {
161
- Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
162
- }
163
- return writer;
164
- },
165
- decode(input, length) {
166
- const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
167
- let end = length === void 0 ? reader.len : reader.pos + length;
168
- const message = createBaseStruct_FieldsEntry();
169
- while (reader.pos < end) {
170
- const tag = reader.uint32();
171
- switch (tag >>> 3) {
172
- case 1: {
173
- if (tag !== 10) {
174
- break;
175
- }
176
- message.key = reader.string();
177
- continue;
178
- }
179
- case 2: {
180
- if (tag !== 18) {
181
- break;
182
- }
183
- message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
184
- continue;
185
- }
186
- }
187
- if ((tag & 7) === 4 || tag === 0) {
188
- break;
189
- }
190
- reader.skip(tag & 7);
191
- }
192
- return message;
193
- },
194
- fromJSON(object) {
195
- return {
196
- key: isSet(object.key) ? globalThis.String(object.key) : "",
197
- value: isSet(object?.value) ? object.value : void 0
198
- };
199
- },
200
- toJSON(message) {
201
- const obj = {};
202
- if (message.key !== "") {
203
- obj.key = message.key;
204
- }
205
- if (message.value !== void 0) {
206
- obj.value = message.value;
207
- }
208
- return obj;
209
- },
210
- create(base) {
211
- return Struct_FieldsEntry.fromPartial(base ?? {});
212
- },
213
- fromPartial(object) {
214
- const message = createBaseStruct_FieldsEntry();
215
- message.key = object.key ?? "";
216
- message.value = object.value ?? void 0;
217
- return message;
218
- }
219
- };
220
- function createBaseValue() {
221
- return {
222
- nullValue: void 0,
223
- numberValue: void 0,
224
- stringValue: void 0,
225
- boolValue: void 0,
226
- structValue: void 0,
227
- listValue: void 0
228
- };
229
- }
230
- var Value = {
231
- encode(message, writer = new import_wire.BinaryWriter()) {
232
- if (message.nullValue !== void 0) {
233
- writer.uint32(8).int32(message.nullValue);
234
- }
235
- if (message.numberValue !== void 0) {
236
- writer.uint32(17).double(message.numberValue);
237
- }
238
- if (message.stringValue !== void 0) {
239
- writer.uint32(26).string(message.stringValue);
240
- }
241
- if (message.boolValue !== void 0) {
242
- writer.uint32(32).bool(message.boolValue);
243
- }
244
- if (message.structValue !== void 0) {
245
- Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
246
- }
247
- if (message.listValue !== void 0) {
248
- ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
249
- }
250
- return writer;
251
- },
252
- decode(input, length) {
253
- const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
254
- let end = length === void 0 ? reader.len : reader.pos + length;
255
- const message = createBaseValue();
256
- while (reader.pos < end) {
257
- const tag = reader.uint32();
258
- switch (tag >>> 3) {
259
- case 1: {
260
- if (tag !== 8) {
261
- break;
262
- }
263
- message.nullValue = reader.int32();
264
- continue;
265
- }
266
- case 2: {
267
- if (tag !== 17) {
268
- break;
269
- }
270
- message.numberValue = reader.double();
271
- continue;
272
- }
273
- case 3: {
274
- if (tag !== 26) {
275
- break;
276
- }
277
- message.stringValue = reader.string();
278
- continue;
279
- }
280
- case 4: {
281
- if (tag !== 32) {
282
- break;
283
- }
284
- message.boolValue = reader.bool();
285
- continue;
286
- }
287
- case 5: {
288
- if (tag !== 42) {
289
- break;
290
- }
291
- message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
292
- continue;
293
- }
294
- case 6: {
295
- if (tag !== 50) {
296
- break;
297
- }
298
- message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
299
- continue;
300
- }
301
- }
302
- if ((tag & 7) === 4 || tag === 0) {
303
- break;
304
- }
305
- reader.skip(tag & 7);
306
- }
307
- return message;
308
- },
309
- fromJSON(object) {
310
- return {
311
- nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : void 0,
312
- numberValue: isSet(object.numberValue) ? globalThis.Number(object.numberValue) : void 0,
313
- stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : void 0,
314
- boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : void 0,
315
- structValue: isObject(object.structValue) ? object.structValue : void 0,
316
- listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : void 0
317
- };
318
- },
319
- toJSON(message) {
320
- const obj = {};
321
- if (message.nullValue !== void 0) {
322
- obj.nullValue = nullValueToJSON(message.nullValue);
323
- }
324
- if (message.numberValue !== void 0) {
325
- obj.numberValue = message.numberValue;
326
- }
327
- if (message.stringValue !== void 0) {
328
- obj.stringValue = message.stringValue;
329
- }
330
- if (message.boolValue !== void 0) {
331
- obj.boolValue = message.boolValue;
332
- }
333
- if (message.structValue !== void 0) {
334
- obj.structValue = message.structValue;
335
- }
336
- if (message.listValue !== void 0) {
337
- obj.listValue = message.listValue;
338
- }
339
- return obj;
340
- },
341
- create(base) {
342
- return Value.fromPartial(base ?? {});
343
- },
344
- fromPartial(object) {
345
- const message = createBaseValue();
346
- message.nullValue = object.nullValue ?? void 0;
347
- message.numberValue = object.numberValue ?? void 0;
348
- message.stringValue = object.stringValue ?? void 0;
349
- message.boolValue = object.boolValue ?? void 0;
350
- message.structValue = object.structValue ?? void 0;
351
- message.listValue = object.listValue ?? void 0;
352
- return message;
353
- },
354
- wrap(value) {
355
- const result = createBaseValue();
356
- if (value === null) {
357
- result.nullValue = 0 /* NULL_VALUE */;
358
- } else if (typeof value === "boolean") {
359
- result.boolValue = value;
360
- } else if (typeof value === "number") {
361
- result.numberValue = value;
362
- } else if (typeof value === "string") {
363
- result.stringValue = value;
364
- } else if (globalThis.Array.isArray(value)) {
365
- result.listValue = value;
366
- } else if (typeof value === "object") {
367
- result.structValue = value;
368
- } else if (typeof value !== "undefined") {
369
- throw new globalThis.Error("Unsupported any value type: " + typeof value);
370
- }
371
- return result;
372
- },
373
- unwrap(message) {
374
- if (message.stringValue !== void 0) {
375
- return message.stringValue;
376
- } else if (message?.numberValue !== void 0) {
377
- return message.numberValue;
378
- } else if (message?.boolValue !== void 0) {
379
- return message.boolValue;
380
- } else if (message?.structValue !== void 0) {
381
- return message.structValue;
382
- } else if (message?.listValue !== void 0) {
383
- return message.listValue;
384
- } else if (message?.nullValue !== void 0) {
385
- return null;
386
- }
387
- return void 0;
388
- }
389
- };
390
- function createBaseListValue() {
391
- return { values: [] };
392
- }
393
- var ListValue = {
394
- encode(message, writer = new import_wire.BinaryWriter()) {
395
- for (const v of message.values) {
396
- Value.encode(Value.wrap(v), writer.uint32(10).fork()).join();
397
- }
398
- return writer;
399
- },
400
- decode(input, length) {
401
- const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
402
- let end = length === void 0 ? reader.len : reader.pos + length;
403
- const message = createBaseListValue();
404
- while (reader.pos < end) {
405
- const tag = reader.uint32();
406
- switch (tag >>> 3) {
407
- case 1: {
408
- if (tag !== 10) {
409
- break;
410
- }
411
- message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
412
- continue;
413
- }
414
- }
415
- if ((tag & 7) === 4 || tag === 0) {
416
- break;
417
- }
418
- reader.skip(tag & 7);
419
- }
420
- return message;
421
- },
422
- fromJSON(object) {
423
- return { values: globalThis.Array.isArray(object?.values) ? [...object.values] : [] };
424
- },
425
- toJSON(message) {
426
- const obj = {};
427
- if (message.values?.length) {
428
- obj.values = message.values;
429
- }
430
- return obj;
431
- },
432
- create(base) {
433
- return ListValue.fromPartial(base ?? {});
434
- },
435
- fromPartial(object) {
436
- const message = createBaseListValue();
437
- message.values = object.values?.map((e) => e) || [];
438
- return message;
439
- },
440
- wrap(array) {
441
- const result = createBaseListValue();
442
- result.values = array ?? [];
443
- return result;
444
- },
445
- unwrap(message) {
446
- if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
447
- return message.values;
448
- } else {
449
- return message;
450
- }
451
- }
452
- };
453
- function isObject(value) {
454
- return typeof value === "object" && value !== null;
455
- }
456
- function isSet(value) {
457
- return value !== null && value !== void 0;
458
- }
459
- // Annotate the CommonJS export names for ESM import in node:
460
- 0 && (module.exports = {
461
- ListValue,
462
- NullValue,
463
- Struct,
464
- Struct_FieldsEntry,
465
- Value,
466
- nullValueFromJSON,
467
- nullValueToJSON,
468
- protobufPackage
469
- });