@lazycatcloud/sdk 0.1.448 → 0.1.450
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/README.md +57 -0
- package/dist/common/apk_shell.d.ts +126 -0
- package/dist/common/apk_shell.d.ts.map +1 -0
- package/dist/common/apk_shell.js +347 -0
- package/dist/common/apk_shell.js.map +1 -0
- package/dist/common/box.d.ts +1137 -0
- package/dist/common/box.d.ts.map +1 -0
- package/dist/common/box.js +1720 -0
- package/dist/common/box.js.map +1 -0
- package/dist/common/browseronly.d.ts +159 -0
- package/dist/common/browseronly.d.ts.map +1 -0
- package/dist/common/browseronly.js +477 -0
- package/dist/common/browseronly.js.map +1 -0
- package/dist/common/end_device.d.ts +358 -0
- package/dist/common/end_device.d.ts.map +1 -0
- package/dist/common/end_device.js +550 -0
- package/dist/common/end_device.js.map +1 -0
- package/dist/common/file_handler.d.ts +1050 -0
- package/dist/common/file_handler.d.ts.map +1 -0
- package/dist/common/file_handler.js +2460 -0
- package/dist/common/file_handler.js.map +1 -0
- package/dist/common/filetrans.d.ts +2409 -0
- package/dist/common/filetrans.d.ts.map +1 -0
- package/dist/common/filetrans.js +2561 -0
- package/dist/common/filetrans.js.map +1 -0
- package/dist/common/gateway.d.ts +249 -0
- package/dist/common/gateway.d.ts.map +1 -0
- package/dist/common/gateway.js +635 -0
- package/dist/common/gateway.js.map +1 -0
- package/dist/common/media_meta.d.ts +196 -0
- package/dist/common/media_meta.d.ts.map +1 -0
- package/dist/common/media_meta.js +527 -0
- package/dist/common/media_meta.js.map +1 -0
- package/dist/common/message.d.ts +413 -0
- package/dist/common/message.d.ts.map +1 -0
- package/dist/common/message.js +1031 -0
- package/dist/common/message.js.map +1 -0
- package/dist/common/peripheral_device.d.ts +682 -0
- package/dist/common/peripheral_device.d.ts.map +1 -0
- package/dist/common/peripheral_device.js +1256 -0
- package/dist/common/peripheral_device.js.map +1 -0
- package/dist/common/security_context.d.ts +241 -0
- package/dist/common/security_context.d.ts.map +1 -0
- package/dist/common/security_context.js +684 -0
- package/dist/common/security_context.js.map +1 -0
- package/dist/common/users.d.ts +367 -0
- package/dist/common/users.d.ts.map +1 -0
- package/dist/common/users.js +1107 -0
- package/dist/common/users.js.map +1 -0
- package/dist/dlna/dlna.d.ts +344 -0
- package/dist/dlna/dlna.d.ts.map +1 -0
- package/dist/dlna/dlna.js +893 -0
- package/dist/dlna/dlna.js.map +1 -0
- package/dist/extentions/app_common.d.ts +121 -0
- package/dist/extentions/app_common.d.ts.map +1 -0
- package/dist/extentions/app_common.js +620 -0
- package/dist/extentions/app_common.js.map +1 -0
- package/dist/extentions/base.d.ts +137 -0
- package/dist/extentions/base.d.ts.map +1 -0
- package/dist/extentions/base.js +358 -0
- package/dist/extentions/base.js.map +1 -0
- package/dist/extentions/client_authorization.d.ts +19 -0
- package/dist/extentions/client_authorization.d.ts.map +1 -0
- package/dist/extentions/client_authorization.js +29 -0
- package/dist/extentions/client_authorization.js.map +1 -0
- package/dist/extentions/index.d.ts +24 -0
- package/dist/extentions/index.d.ts.map +1 -0
- package/dist/extentions/index.js +20 -0
- package/dist/extentions/index.js.map +1 -0
- package/dist/extentions/mediasession/definitions.d.ts +55 -0
- package/dist/extentions/mediasession/definitions.d.ts.map +1 -0
- package/dist/extentions/mediasession/definitions.js +3 -0
- package/dist/extentions/mediasession/definitions.js.map +1 -0
- package/dist/extentions/mediasession/index.d.ts +8 -0
- package/dist/extentions/mediasession/index.d.ts.map +1 -0
- package/dist/extentions/mediasession/index.js +26 -0
- package/dist/extentions/mediasession/index.js.map +1 -0
- package/dist/extentions/mediasession/web.d.ts +8 -0
- package/dist/extentions/mediasession/web.d.ts.map +1 -0
- package/dist/extentions/mediasession/web.js +89 -0
- package/dist/extentions/mediasession/web.js.map +1 -0
- package/dist/extentions/safe_app.d.ts +36 -0
- package/dist/extentions/safe_app.d.ts.map +1 -0
- package/dist/extentions/safe_app.js +132 -0
- package/dist/extentions/safe_app.js.map +1 -0
- package/dist/extentions/unsafe_app.d.ts +5 -0
- package/dist/extentions/unsafe_app.d.ts.map +1 -0
- package/dist/extentions/unsafe_app.js +178 -0
- package/dist/extentions/unsafe_app.js.map +1 -0
- package/dist/extentions/vibrate_type.d.ts +11 -0
- package/dist/extentions/vibrate_type.d.ts.map +1 -0
- package/dist/extentions/vibrate_type.js +15 -0
- package/dist/extentions/vibrate_type.js.map +1 -0
- package/dist/extentions/webview-bridge.d.ts +2 -0
- package/dist/extentions/webview-bridge.d.ts.map +1 -0
- package/dist/extentions/webview-bridge.js +49 -0
- package/dist/extentions/webview-bridge.js.map +1 -0
- package/dist/google/protobuf/descriptor.d.ts +112550 -0
- package/dist/google/protobuf/descriptor.d.ts.map +1 -0
- package/dist/google/protobuf/descriptor.js +3964 -0
- package/dist/google/protobuf/descriptor.js.map +1 -0
- package/dist/google/protobuf/empty.d.ts +21 -0
- package/dist/google/protobuf/empty.d.ts.map +1 -0
- package/dist/google/protobuf/empty.js +46 -0
- package/dist/google/protobuf/empty.js.map +1 -0
- package/dist/google/protobuf/timestamp.d.ts +128 -0
- package/dist/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/google/protobuf/timestamp.js +105 -0
- package/dist/google/protobuf/timestamp.js.map +1 -0
- package/dist/grpcweb.d.ts +28 -0
- package/dist/grpcweb.d.ts.map +1 -0
- package/dist/grpcweb.js +116 -0
- package/dist/grpcweb.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +204 -0
- package/dist/index.js.map +1 -0
- package/dist/localdevice/client.d.ts +72 -0
- package/dist/localdevice/client.d.ts.map +1 -0
- package/dist/localdevice/client.js +178 -0
- package/dist/localdevice/client.js.map +1 -0
- package/dist/localdevice/cloud-driver.d.ts +152 -0
- package/dist/localdevice/cloud-driver.d.ts.map +1 -0
- package/dist/localdevice/cloud-driver.js +439 -0
- package/dist/localdevice/cloud-driver.js.map +1 -0
- package/dist/localdevice/config.d.ts +150 -0
- package/dist/localdevice/config.d.ts.map +1 -0
- package/dist/localdevice/config.js +414 -0
- package/dist/localdevice/config.js.map +1 -0
- package/dist/localdevice/contacts.d.ts +381 -0
- package/dist/localdevice/contacts.d.ts.map +1 -0
- package/dist/localdevice/contacts.js +790 -0
- package/dist/localdevice/contacts.js.map +1 -0
- package/dist/localdevice/device.d.ts +86 -0
- package/dist/localdevice/device.d.ts.map +1 -0
- package/dist/localdevice/device.js +209 -0
- package/dist/localdevice/device.js.map +1 -0
- package/dist/localdevice/dialog.d.ts +239 -0
- package/dist/localdevice/dialog.d.ts.map +1 -0
- package/dist/localdevice/dialog.js +668 -0
- package/dist/localdevice/dialog.js.map +1 -0
- package/dist/localdevice/local-launch.d.ts +303 -0
- package/dist/localdevice/local-launch.d.ts.map +1 -0
- package/dist/localdevice/local-launch.js +892 -0
- package/dist/localdevice/local-launch.js.map +1 -0
- package/dist/localdevice/network.d.ts +84 -0
- package/dist/localdevice/network.d.ts.map +1 -0
- package/dist/localdevice/network.js +242 -0
- package/dist/localdevice/network.js.map +1 -0
- package/dist/localdevice/oneway-sync.d.ts +274 -0
- package/dist/localdevice/oneway-sync.d.ts.map +1 -0
- package/dist/localdevice/oneway-sync.js +488 -0
- package/dist/localdevice/oneway-sync.js.map +1 -0
- package/dist/localdevice/permission.d.ts +233 -0
- package/dist/localdevice/permission.d.ts.map +1 -0
- package/dist/localdevice/permission.js +692 -0
- package/dist/localdevice/permission.js.map +1 -0
- package/dist/localdevice/photo.d.ts +759 -0
- package/dist/localdevice/photo.d.ts.map +1 -0
- package/dist/localdevice/photo.js +2051 -0
- package/dist/localdevice/photo.js.map +1 -0
- package/dist/localdevice/remote-control.d.ts +1917 -0
- package/dist/localdevice/remote-control.d.ts.map +1 -0
- package/dist/localdevice/remote-control.js +4202 -0
- package/dist/localdevice/remote-control.js.map +1 -0
- package/dist/localdevice/remote-input-method.d.ts +128 -0
- package/dist/localdevice/remote-input-method.d.ts.map +1 -0
- package/dist/localdevice/remote-input-method.js +411 -0
- package/dist/localdevice/remote-input-method.js.map +1 -0
- package/dist/package.json +36 -0
- package/dist/sys/btled.d.ts +197 -0
- package/dist/sys/btled.d.ts.map +1 -0
- package/dist/sys/btled.js +416 -0
- package/dist/sys/btled.js.map +1 -0
- package/dist/sys/btrfs.d.ts +204 -0
- package/dist/sys/btrfs.d.ts.map +1 -0
- package/dist/sys/btrfs.js +575 -0
- package/dist/sys/btrfs.js.map +1 -0
- package/dist/sys/devopt.d.ts +101 -0
- package/dist/sys/devopt.d.ts.map +1 -0
- package/dist/sys/devopt.js +255 -0
- package/dist/sys/devopt.js.map +1 -0
- package/dist/sys/dirmon.d.ts +136 -0
- package/dist/sys/dirmon.d.ts.map +1 -0
- package/dist/sys/dirmon.js +393 -0
- package/dist/sys/dirmon.js.map +1 -0
- package/dist/sys/event.d.ts +143 -0
- package/dist/sys/event.d.ts.map +1 -0
- package/dist/sys/event.js +409 -0
- package/dist/sys/event.js.map +1 -0
- package/dist/sys/hal.d.ts +225 -0
- package/dist/sys/hal.d.ts.map +1 -0
- package/dist/sys/hal.js +577 -0
- package/dist/sys/hal.js.map +1 -0
- package/dist/sys/ingress.d.ts +201 -0
- package/dist/sys/ingress.d.ts.map +1 -0
- package/dist/sys/ingress.js +545 -0
- package/dist/sys/ingress.js.map +1 -0
- package/dist/sys/network_manager.d.ts +741 -0
- package/dist/sys/network_manager.d.ts.map +1 -0
- package/dist/sys/network_manager.js +1657 -0
- package/dist/sys/network_manager.js.map +1 -0
- package/dist/sys/package_manager.d.ts +1274 -0
- package/dist/sys/package_manager.d.ts.map +1 -0
- package/dist/sys/package_manager.js +2827 -0
- package/dist/sys/package_manager.js.map +1 -0
- package/dist/sys/tvos.d.ts +490 -0
- package/dist/sys/tvos.d.ts.map +1 -0
- package/dist/sys/tvos.js +946 -0
- package/dist/sys/tvos.js.map +1 -0
- package/dist/sys/version.d.ts +65 -0
- package/dist/sys/version.d.ts.map +1 -0
- package/dist/sys/version.js +151 -0
- package/dist/sys/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +34 -34
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GrpcWebError = exports.GrpcWebImpl = exports.ContactsManagerGetContactsCountDesc = exports.ContactsManagerUpdateContactsDesc = exports.ContactsManagerDeleteContactsDesc = exports.ContactsManagerAddContactsDesc = exports.ContactsManagerListContactsDesc = exports.ContactsManagerDesc = exports.ContactsManagerClientImpl = exports.GetContactsCountReply = exports.GetContactsCountRequest = exports.UpdateContactsReply = exports.UpdateContactsRequest = exports.DeleteContactsReply = exports.DeleteContactsRequest = exports.AddContactsReply = exports.AddContactsRequest = exports.ListContactsReply = exports.NewContact = exports.Contact = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
9
|
+
const browser_headers_1 = require("browser-headers");
|
|
10
|
+
const long_1 = __importDefault(require("long"));
|
|
11
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
12
|
+
const empty_1 = require("../google/protobuf/empty");
|
|
13
|
+
function createBaseContact() {
|
|
14
|
+
return { id: "", name: "", phones: [] };
|
|
15
|
+
}
|
|
16
|
+
exports.Contact = {
|
|
17
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
18
|
+
if (message.id !== "") {
|
|
19
|
+
writer.uint32(10).string(message.id);
|
|
20
|
+
}
|
|
21
|
+
if (message.name !== "") {
|
|
22
|
+
writer.uint32(18).string(message.name);
|
|
23
|
+
}
|
|
24
|
+
for (const v of message.phones) {
|
|
25
|
+
writer.uint32(26).string(v);
|
|
26
|
+
}
|
|
27
|
+
return writer;
|
|
28
|
+
},
|
|
29
|
+
decode(input, length) {
|
|
30
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
31
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
32
|
+
const message = createBaseContact();
|
|
33
|
+
while (reader.pos < end) {
|
|
34
|
+
const tag = reader.uint32();
|
|
35
|
+
switch (tag >>> 3) {
|
|
36
|
+
case 1:
|
|
37
|
+
if (tag !== 10) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.id = reader.string();
|
|
41
|
+
continue;
|
|
42
|
+
case 2:
|
|
43
|
+
if (tag !== 18) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.name = reader.string();
|
|
47
|
+
continue;
|
|
48
|
+
case 3:
|
|
49
|
+
if (tag !== 26) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.phones.push(reader.string());
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
reader.skipType(tag & 7);
|
|
59
|
+
}
|
|
60
|
+
return message;
|
|
61
|
+
},
|
|
62
|
+
fromJSON(object) {
|
|
63
|
+
return {
|
|
64
|
+
id: isSet(object.id) ? String(object.id) : "",
|
|
65
|
+
name: isSet(object.name) ? String(object.name) : "",
|
|
66
|
+
phones: Array.isArray(object === null || object === void 0 ? void 0 : object.phones) ? object.phones.map((e) => String(e)) : [],
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
toJSON(message) {
|
|
70
|
+
var _a;
|
|
71
|
+
const obj = {};
|
|
72
|
+
if (message.id !== "") {
|
|
73
|
+
obj.id = message.id;
|
|
74
|
+
}
|
|
75
|
+
if (message.name !== "") {
|
|
76
|
+
obj.name = message.name;
|
|
77
|
+
}
|
|
78
|
+
if ((_a = message.phones) === null || _a === void 0 ? void 0 : _a.length) {
|
|
79
|
+
obj.phones = message.phones;
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
},
|
|
83
|
+
create(base) {
|
|
84
|
+
return exports.Contact.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
85
|
+
},
|
|
86
|
+
fromPartial(object) {
|
|
87
|
+
var _a, _b, _c;
|
|
88
|
+
const message = createBaseContact();
|
|
89
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
90
|
+
message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
|
|
91
|
+
message.phones = ((_c = object.phones) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
92
|
+
return message;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
function createBaseNewContact() {
|
|
96
|
+
return { name: "", phones: [] };
|
|
97
|
+
}
|
|
98
|
+
exports.NewContact = {
|
|
99
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
100
|
+
if (message.name !== "") {
|
|
101
|
+
writer.uint32(10).string(message.name);
|
|
102
|
+
}
|
|
103
|
+
for (const v of message.phones) {
|
|
104
|
+
writer.uint32(18).string(v);
|
|
105
|
+
}
|
|
106
|
+
return writer;
|
|
107
|
+
},
|
|
108
|
+
decode(input, length) {
|
|
109
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
110
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
111
|
+
const message = createBaseNewContact();
|
|
112
|
+
while (reader.pos < end) {
|
|
113
|
+
const tag = reader.uint32();
|
|
114
|
+
switch (tag >>> 3) {
|
|
115
|
+
case 1:
|
|
116
|
+
if (tag !== 10) {
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
message.name = reader.string();
|
|
120
|
+
continue;
|
|
121
|
+
case 2:
|
|
122
|
+
if (tag !== 18) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
message.phones.push(reader.string());
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
reader.skipType(tag & 7);
|
|
132
|
+
}
|
|
133
|
+
return message;
|
|
134
|
+
},
|
|
135
|
+
fromJSON(object) {
|
|
136
|
+
return {
|
|
137
|
+
name: isSet(object.name) ? String(object.name) : "",
|
|
138
|
+
phones: Array.isArray(object === null || object === void 0 ? void 0 : object.phones) ? object.phones.map((e) => String(e)) : [],
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
toJSON(message) {
|
|
142
|
+
var _a;
|
|
143
|
+
const obj = {};
|
|
144
|
+
if (message.name !== "") {
|
|
145
|
+
obj.name = message.name;
|
|
146
|
+
}
|
|
147
|
+
if ((_a = message.phones) === null || _a === void 0 ? void 0 : _a.length) {
|
|
148
|
+
obj.phones = message.phones;
|
|
149
|
+
}
|
|
150
|
+
return obj;
|
|
151
|
+
},
|
|
152
|
+
create(base) {
|
|
153
|
+
return exports.NewContact.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
154
|
+
},
|
|
155
|
+
fromPartial(object) {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
const message = createBaseNewContact();
|
|
158
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
159
|
+
message.phones = ((_b = object.phones) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
160
|
+
return message;
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
function createBaseListContactsReply() {
|
|
164
|
+
return { contacts: [] };
|
|
165
|
+
}
|
|
166
|
+
exports.ListContactsReply = {
|
|
167
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
168
|
+
for (const v of message.contacts) {
|
|
169
|
+
exports.Contact.encode(v, writer.uint32(10).fork()).ldelim();
|
|
170
|
+
}
|
|
171
|
+
return writer;
|
|
172
|
+
},
|
|
173
|
+
decode(input, length) {
|
|
174
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
175
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
176
|
+
const message = createBaseListContactsReply();
|
|
177
|
+
while (reader.pos < end) {
|
|
178
|
+
const tag = reader.uint32();
|
|
179
|
+
switch (tag >>> 3) {
|
|
180
|
+
case 1:
|
|
181
|
+
if (tag !== 10) {
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
message.contacts.push(exports.Contact.decode(reader, reader.uint32()));
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
reader.skipType(tag & 7);
|
|
191
|
+
}
|
|
192
|
+
return message;
|
|
193
|
+
},
|
|
194
|
+
fromJSON(object) {
|
|
195
|
+
return { contacts: Array.isArray(object === null || object === void 0 ? void 0 : object.contacts) ? object.contacts.map((e) => exports.Contact.fromJSON(e)) : [] };
|
|
196
|
+
},
|
|
197
|
+
toJSON(message) {
|
|
198
|
+
var _a;
|
|
199
|
+
const obj = {};
|
|
200
|
+
if ((_a = message.contacts) === null || _a === void 0 ? void 0 : _a.length) {
|
|
201
|
+
obj.contacts = message.contacts.map((e) => exports.Contact.toJSON(e));
|
|
202
|
+
}
|
|
203
|
+
return obj;
|
|
204
|
+
},
|
|
205
|
+
create(base) {
|
|
206
|
+
return exports.ListContactsReply.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
207
|
+
},
|
|
208
|
+
fromPartial(object) {
|
|
209
|
+
var _a;
|
|
210
|
+
const message = createBaseListContactsReply();
|
|
211
|
+
message.contacts = ((_a = object.contacts) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Contact.fromPartial(e))) || [];
|
|
212
|
+
return message;
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
function createBaseAddContactsRequest() {
|
|
216
|
+
return { contacts: [] };
|
|
217
|
+
}
|
|
218
|
+
exports.AddContactsRequest = {
|
|
219
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
220
|
+
for (const v of message.contacts) {
|
|
221
|
+
exports.NewContact.encode(v, writer.uint32(10).fork()).ldelim();
|
|
222
|
+
}
|
|
223
|
+
return writer;
|
|
224
|
+
},
|
|
225
|
+
decode(input, length) {
|
|
226
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
227
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
228
|
+
const message = createBaseAddContactsRequest();
|
|
229
|
+
while (reader.pos < end) {
|
|
230
|
+
const tag = reader.uint32();
|
|
231
|
+
switch (tag >>> 3) {
|
|
232
|
+
case 1:
|
|
233
|
+
if (tag !== 10) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
message.contacts.push(exports.NewContact.decode(reader, reader.uint32()));
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
reader.skipType(tag & 7);
|
|
243
|
+
}
|
|
244
|
+
return message;
|
|
245
|
+
},
|
|
246
|
+
fromJSON(object) {
|
|
247
|
+
return { contacts: Array.isArray(object === null || object === void 0 ? void 0 : object.contacts) ? object.contacts.map((e) => exports.NewContact.fromJSON(e)) : [] };
|
|
248
|
+
},
|
|
249
|
+
toJSON(message) {
|
|
250
|
+
var _a;
|
|
251
|
+
const obj = {};
|
|
252
|
+
if ((_a = message.contacts) === null || _a === void 0 ? void 0 : _a.length) {
|
|
253
|
+
obj.contacts = message.contacts.map((e) => exports.NewContact.toJSON(e));
|
|
254
|
+
}
|
|
255
|
+
return obj;
|
|
256
|
+
},
|
|
257
|
+
create(base) {
|
|
258
|
+
return exports.AddContactsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
259
|
+
},
|
|
260
|
+
fromPartial(object) {
|
|
261
|
+
var _a;
|
|
262
|
+
const message = createBaseAddContactsRequest();
|
|
263
|
+
message.contacts = ((_a = object.contacts) === null || _a === void 0 ? void 0 : _a.map((e) => exports.NewContact.fromPartial(e))) || [];
|
|
264
|
+
return message;
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
function createBaseAddContactsReply() {
|
|
268
|
+
return {};
|
|
269
|
+
}
|
|
270
|
+
exports.AddContactsReply = {
|
|
271
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
272
|
+
return writer;
|
|
273
|
+
},
|
|
274
|
+
decode(input, length) {
|
|
275
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
276
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
277
|
+
const message = createBaseAddContactsReply();
|
|
278
|
+
while (reader.pos < end) {
|
|
279
|
+
const tag = reader.uint32();
|
|
280
|
+
switch (tag >>> 3) {
|
|
281
|
+
}
|
|
282
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
reader.skipType(tag & 7);
|
|
286
|
+
}
|
|
287
|
+
return message;
|
|
288
|
+
},
|
|
289
|
+
fromJSON(_) {
|
|
290
|
+
return {};
|
|
291
|
+
},
|
|
292
|
+
toJSON(_) {
|
|
293
|
+
const obj = {};
|
|
294
|
+
return obj;
|
|
295
|
+
},
|
|
296
|
+
create(base) {
|
|
297
|
+
return exports.AddContactsReply.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
298
|
+
},
|
|
299
|
+
fromPartial(_) {
|
|
300
|
+
const message = createBaseAddContactsReply();
|
|
301
|
+
return message;
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
function createBaseDeleteContactsRequest() {
|
|
305
|
+
return { ids: [] };
|
|
306
|
+
}
|
|
307
|
+
exports.DeleteContactsRequest = {
|
|
308
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
309
|
+
for (const v of message.ids) {
|
|
310
|
+
writer.uint32(10).string(v);
|
|
311
|
+
}
|
|
312
|
+
return writer;
|
|
313
|
+
},
|
|
314
|
+
decode(input, length) {
|
|
315
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
316
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
317
|
+
const message = createBaseDeleteContactsRequest();
|
|
318
|
+
while (reader.pos < end) {
|
|
319
|
+
const tag = reader.uint32();
|
|
320
|
+
switch (tag >>> 3) {
|
|
321
|
+
case 1:
|
|
322
|
+
if (tag !== 10) {
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
message.ids.push(reader.string());
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
reader.skipType(tag & 7);
|
|
332
|
+
}
|
|
333
|
+
return message;
|
|
334
|
+
},
|
|
335
|
+
fromJSON(object) {
|
|
336
|
+
return { ids: Array.isArray(object === null || object === void 0 ? void 0 : object.ids) ? object.ids.map((e) => String(e)) : [] };
|
|
337
|
+
},
|
|
338
|
+
toJSON(message) {
|
|
339
|
+
var _a;
|
|
340
|
+
const obj = {};
|
|
341
|
+
if ((_a = message.ids) === null || _a === void 0 ? void 0 : _a.length) {
|
|
342
|
+
obj.ids = message.ids;
|
|
343
|
+
}
|
|
344
|
+
return obj;
|
|
345
|
+
},
|
|
346
|
+
create(base) {
|
|
347
|
+
return exports.DeleteContactsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
348
|
+
},
|
|
349
|
+
fromPartial(object) {
|
|
350
|
+
var _a;
|
|
351
|
+
const message = createBaseDeleteContactsRequest();
|
|
352
|
+
message.ids = ((_a = object.ids) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
353
|
+
return message;
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
function createBaseDeleteContactsReply() {
|
|
357
|
+
return { failedIds: [] };
|
|
358
|
+
}
|
|
359
|
+
exports.DeleteContactsReply = {
|
|
360
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
361
|
+
for (const v of message.failedIds) {
|
|
362
|
+
writer.uint32(10).string(v);
|
|
363
|
+
}
|
|
364
|
+
return writer;
|
|
365
|
+
},
|
|
366
|
+
decode(input, length) {
|
|
367
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
368
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
369
|
+
const message = createBaseDeleteContactsReply();
|
|
370
|
+
while (reader.pos < end) {
|
|
371
|
+
const tag = reader.uint32();
|
|
372
|
+
switch (tag >>> 3) {
|
|
373
|
+
case 1:
|
|
374
|
+
if (tag !== 10) {
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
message.failedIds.push(reader.string());
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
reader.skipType(tag & 7);
|
|
384
|
+
}
|
|
385
|
+
return message;
|
|
386
|
+
},
|
|
387
|
+
fromJSON(object) {
|
|
388
|
+
return { failedIds: Array.isArray(object === null || object === void 0 ? void 0 : object.failedIds) ? object.failedIds.map((e) => String(e)) : [] };
|
|
389
|
+
},
|
|
390
|
+
toJSON(message) {
|
|
391
|
+
var _a;
|
|
392
|
+
const obj = {};
|
|
393
|
+
if ((_a = message.failedIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
394
|
+
obj.failedIds = message.failedIds;
|
|
395
|
+
}
|
|
396
|
+
return obj;
|
|
397
|
+
},
|
|
398
|
+
create(base) {
|
|
399
|
+
return exports.DeleteContactsReply.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
400
|
+
},
|
|
401
|
+
fromPartial(object) {
|
|
402
|
+
var _a;
|
|
403
|
+
const message = createBaseDeleteContactsReply();
|
|
404
|
+
message.failedIds = ((_a = object.failedIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
405
|
+
return message;
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
function createBaseUpdateContactsRequest() {
|
|
409
|
+
return { contacts: [] };
|
|
410
|
+
}
|
|
411
|
+
exports.UpdateContactsRequest = {
|
|
412
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
413
|
+
for (const v of message.contacts) {
|
|
414
|
+
exports.Contact.encode(v, writer.uint32(10).fork()).ldelim();
|
|
415
|
+
}
|
|
416
|
+
return writer;
|
|
417
|
+
},
|
|
418
|
+
decode(input, length) {
|
|
419
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
420
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
421
|
+
const message = createBaseUpdateContactsRequest();
|
|
422
|
+
while (reader.pos < end) {
|
|
423
|
+
const tag = reader.uint32();
|
|
424
|
+
switch (tag >>> 3) {
|
|
425
|
+
case 1:
|
|
426
|
+
if (tag !== 10) {
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
message.contacts.push(exports.Contact.decode(reader, reader.uint32()));
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
reader.skipType(tag & 7);
|
|
436
|
+
}
|
|
437
|
+
return message;
|
|
438
|
+
},
|
|
439
|
+
fromJSON(object) {
|
|
440
|
+
return { contacts: Array.isArray(object === null || object === void 0 ? void 0 : object.contacts) ? object.contacts.map((e) => exports.Contact.fromJSON(e)) : [] };
|
|
441
|
+
},
|
|
442
|
+
toJSON(message) {
|
|
443
|
+
var _a;
|
|
444
|
+
const obj = {};
|
|
445
|
+
if ((_a = message.contacts) === null || _a === void 0 ? void 0 : _a.length) {
|
|
446
|
+
obj.contacts = message.contacts.map((e) => exports.Contact.toJSON(e));
|
|
447
|
+
}
|
|
448
|
+
return obj;
|
|
449
|
+
},
|
|
450
|
+
create(base) {
|
|
451
|
+
return exports.UpdateContactsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
452
|
+
},
|
|
453
|
+
fromPartial(object) {
|
|
454
|
+
var _a;
|
|
455
|
+
const message = createBaseUpdateContactsRequest();
|
|
456
|
+
message.contacts = ((_a = object.contacts) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Contact.fromPartial(e))) || [];
|
|
457
|
+
return message;
|
|
458
|
+
},
|
|
459
|
+
};
|
|
460
|
+
function createBaseUpdateContactsReply() {
|
|
461
|
+
return { failedIds: [] };
|
|
462
|
+
}
|
|
463
|
+
exports.UpdateContactsReply = {
|
|
464
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
465
|
+
for (const v of message.failedIds) {
|
|
466
|
+
writer.uint32(10).string(v);
|
|
467
|
+
}
|
|
468
|
+
return writer;
|
|
469
|
+
},
|
|
470
|
+
decode(input, length) {
|
|
471
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
472
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
473
|
+
const message = createBaseUpdateContactsReply();
|
|
474
|
+
while (reader.pos < end) {
|
|
475
|
+
const tag = reader.uint32();
|
|
476
|
+
switch (tag >>> 3) {
|
|
477
|
+
case 1:
|
|
478
|
+
if (tag !== 10) {
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
message.failedIds.push(reader.string());
|
|
482
|
+
continue;
|
|
483
|
+
}
|
|
484
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
reader.skipType(tag & 7);
|
|
488
|
+
}
|
|
489
|
+
return message;
|
|
490
|
+
},
|
|
491
|
+
fromJSON(object) {
|
|
492
|
+
return { failedIds: Array.isArray(object === null || object === void 0 ? void 0 : object.failedIds) ? object.failedIds.map((e) => String(e)) : [] };
|
|
493
|
+
},
|
|
494
|
+
toJSON(message) {
|
|
495
|
+
var _a;
|
|
496
|
+
const obj = {};
|
|
497
|
+
if ((_a = message.failedIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
498
|
+
obj.failedIds = message.failedIds;
|
|
499
|
+
}
|
|
500
|
+
return obj;
|
|
501
|
+
},
|
|
502
|
+
create(base) {
|
|
503
|
+
return exports.UpdateContactsReply.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
504
|
+
},
|
|
505
|
+
fromPartial(object) {
|
|
506
|
+
var _a;
|
|
507
|
+
const message = createBaseUpdateContactsReply();
|
|
508
|
+
message.failedIds = ((_a = object.failedIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
509
|
+
return message;
|
|
510
|
+
},
|
|
511
|
+
};
|
|
512
|
+
function createBaseGetContactsCountRequest() {
|
|
513
|
+
return {};
|
|
514
|
+
}
|
|
515
|
+
exports.GetContactsCountRequest = {
|
|
516
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
517
|
+
return writer;
|
|
518
|
+
},
|
|
519
|
+
decode(input, length) {
|
|
520
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
521
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
522
|
+
const message = createBaseGetContactsCountRequest();
|
|
523
|
+
while (reader.pos < end) {
|
|
524
|
+
const tag = reader.uint32();
|
|
525
|
+
switch (tag >>> 3) {
|
|
526
|
+
}
|
|
527
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
reader.skipType(tag & 7);
|
|
531
|
+
}
|
|
532
|
+
return message;
|
|
533
|
+
},
|
|
534
|
+
fromJSON(_) {
|
|
535
|
+
return {};
|
|
536
|
+
},
|
|
537
|
+
toJSON(_) {
|
|
538
|
+
const obj = {};
|
|
539
|
+
return obj;
|
|
540
|
+
},
|
|
541
|
+
create(base) {
|
|
542
|
+
return exports.GetContactsCountRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
543
|
+
},
|
|
544
|
+
fromPartial(_) {
|
|
545
|
+
const message = createBaseGetContactsCountRequest();
|
|
546
|
+
return message;
|
|
547
|
+
},
|
|
548
|
+
};
|
|
549
|
+
function createBaseGetContactsCountReply() {
|
|
550
|
+
return { count: 0 };
|
|
551
|
+
}
|
|
552
|
+
exports.GetContactsCountReply = {
|
|
553
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
554
|
+
if (message.count !== 0) {
|
|
555
|
+
writer.uint32(8).int64(message.count);
|
|
556
|
+
}
|
|
557
|
+
return writer;
|
|
558
|
+
},
|
|
559
|
+
decode(input, length) {
|
|
560
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
561
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
562
|
+
const message = createBaseGetContactsCountReply();
|
|
563
|
+
while (reader.pos < end) {
|
|
564
|
+
const tag = reader.uint32();
|
|
565
|
+
switch (tag >>> 3) {
|
|
566
|
+
case 1:
|
|
567
|
+
if (tag !== 8) {
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
message.count = longToNumber(reader.int64());
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
reader.skipType(tag & 7);
|
|
577
|
+
}
|
|
578
|
+
return message;
|
|
579
|
+
},
|
|
580
|
+
fromJSON(object) {
|
|
581
|
+
return { count: isSet(object.count) ? Number(object.count) : 0 };
|
|
582
|
+
},
|
|
583
|
+
toJSON(message) {
|
|
584
|
+
const obj = {};
|
|
585
|
+
if (message.count !== 0) {
|
|
586
|
+
obj.count = Math.round(message.count);
|
|
587
|
+
}
|
|
588
|
+
return obj;
|
|
589
|
+
},
|
|
590
|
+
create(base) {
|
|
591
|
+
return exports.GetContactsCountReply.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
592
|
+
},
|
|
593
|
+
fromPartial(object) {
|
|
594
|
+
var _a;
|
|
595
|
+
const message = createBaseGetContactsCountReply();
|
|
596
|
+
message.count = (_a = object.count) !== null && _a !== void 0 ? _a : 0;
|
|
597
|
+
return message;
|
|
598
|
+
},
|
|
599
|
+
};
|
|
600
|
+
class ContactsManagerClientImpl {
|
|
601
|
+
constructor(rpc) {
|
|
602
|
+
this.rpc = rpc;
|
|
603
|
+
this.ListContacts = this.ListContacts.bind(this);
|
|
604
|
+
this.AddContacts = this.AddContacts.bind(this);
|
|
605
|
+
this.DeleteContacts = this.DeleteContacts.bind(this);
|
|
606
|
+
this.UpdateContacts = this.UpdateContacts.bind(this);
|
|
607
|
+
this.GetContactsCount = this.GetContactsCount.bind(this);
|
|
608
|
+
}
|
|
609
|
+
ListContacts(request, metadata, abortSignal) {
|
|
610
|
+
return this.rpc.unary(exports.ContactsManagerListContactsDesc, empty_1.Empty.fromPartial(request), metadata, abortSignal);
|
|
611
|
+
}
|
|
612
|
+
AddContacts(request, metadata, abortSignal) {
|
|
613
|
+
return this.rpc.unary(exports.ContactsManagerAddContactsDesc, exports.AddContactsRequest.fromPartial(request), metadata, abortSignal);
|
|
614
|
+
}
|
|
615
|
+
DeleteContacts(request, metadata, abortSignal) {
|
|
616
|
+
return this.rpc.unary(exports.ContactsManagerDeleteContactsDesc, exports.DeleteContactsRequest.fromPartial(request), metadata, abortSignal);
|
|
617
|
+
}
|
|
618
|
+
UpdateContacts(request, metadata, abortSignal) {
|
|
619
|
+
return this.rpc.unary(exports.ContactsManagerUpdateContactsDesc, exports.UpdateContactsRequest.fromPartial(request), metadata, abortSignal);
|
|
620
|
+
}
|
|
621
|
+
GetContactsCount(request, metadata, abortSignal) {
|
|
622
|
+
return this.rpc.unary(exports.ContactsManagerGetContactsCountDesc, exports.GetContactsCountRequest.fromPartial(request), metadata, abortSignal);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
exports.ContactsManagerClientImpl = ContactsManagerClientImpl;
|
|
626
|
+
exports.ContactsManagerDesc = { serviceName: "cloud.lazycat.apis.localdevice.ContactsManager" };
|
|
627
|
+
exports.ContactsManagerListContactsDesc = {
|
|
628
|
+
methodName: "ListContacts",
|
|
629
|
+
service: exports.ContactsManagerDesc,
|
|
630
|
+
requestStream: false,
|
|
631
|
+
responseStream: false,
|
|
632
|
+
requestType: {
|
|
633
|
+
serializeBinary() {
|
|
634
|
+
return empty_1.Empty.encode(this).finish();
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
responseType: {
|
|
638
|
+
deserializeBinary(data) {
|
|
639
|
+
const value = exports.ListContactsReply.decode(data);
|
|
640
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
641
|
+
return value;
|
|
642
|
+
} });
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
};
|
|
646
|
+
exports.ContactsManagerAddContactsDesc = {
|
|
647
|
+
methodName: "AddContacts",
|
|
648
|
+
service: exports.ContactsManagerDesc,
|
|
649
|
+
requestStream: false,
|
|
650
|
+
responseStream: false,
|
|
651
|
+
requestType: {
|
|
652
|
+
serializeBinary() {
|
|
653
|
+
return exports.AddContactsRequest.encode(this).finish();
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
responseType: {
|
|
657
|
+
deserializeBinary(data) {
|
|
658
|
+
const value = exports.AddContactsReply.decode(data);
|
|
659
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
660
|
+
return value;
|
|
661
|
+
} });
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
};
|
|
665
|
+
exports.ContactsManagerDeleteContactsDesc = {
|
|
666
|
+
methodName: "DeleteContacts",
|
|
667
|
+
service: exports.ContactsManagerDesc,
|
|
668
|
+
requestStream: false,
|
|
669
|
+
responseStream: false,
|
|
670
|
+
requestType: {
|
|
671
|
+
serializeBinary() {
|
|
672
|
+
return exports.DeleteContactsRequest.encode(this).finish();
|
|
673
|
+
},
|
|
674
|
+
},
|
|
675
|
+
responseType: {
|
|
676
|
+
deserializeBinary(data) {
|
|
677
|
+
const value = exports.DeleteContactsReply.decode(data);
|
|
678
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
679
|
+
return value;
|
|
680
|
+
} });
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
};
|
|
684
|
+
exports.ContactsManagerUpdateContactsDesc = {
|
|
685
|
+
methodName: "UpdateContacts",
|
|
686
|
+
service: exports.ContactsManagerDesc,
|
|
687
|
+
requestStream: false,
|
|
688
|
+
responseStream: false,
|
|
689
|
+
requestType: {
|
|
690
|
+
serializeBinary() {
|
|
691
|
+
return exports.UpdateContactsRequest.encode(this).finish();
|
|
692
|
+
},
|
|
693
|
+
},
|
|
694
|
+
responseType: {
|
|
695
|
+
deserializeBinary(data) {
|
|
696
|
+
const value = exports.UpdateContactsReply.decode(data);
|
|
697
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
698
|
+
return value;
|
|
699
|
+
} });
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
};
|
|
703
|
+
exports.ContactsManagerGetContactsCountDesc = {
|
|
704
|
+
methodName: "GetContactsCount",
|
|
705
|
+
service: exports.ContactsManagerDesc,
|
|
706
|
+
requestStream: false,
|
|
707
|
+
responseStream: false,
|
|
708
|
+
requestType: {
|
|
709
|
+
serializeBinary() {
|
|
710
|
+
return exports.GetContactsCountRequest.encode(this).finish();
|
|
711
|
+
},
|
|
712
|
+
},
|
|
713
|
+
responseType: {
|
|
714
|
+
deserializeBinary(data) {
|
|
715
|
+
const value = exports.GetContactsCountReply.decode(data);
|
|
716
|
+
return Object.assign(Object.assign({}, value), { toObject() {
|
|
717
|
+
return value;
|
|
718
|
+
} });
|
|
719
|
+
},
|
|
720
|
+
},
|
|
721
|
+
};
|
|
722
|
+
class GrpcWebImpl {
|
|
723
|
+
constructor(host, options) {
|
|
724
|
+
this.host = host;
|
|
725
|
+
this.options = options;
|
|
726
|
+
}
|
|
727
|
+
unary(methodDesc, _request, metadata, abortSignal) {
|
|
728
|
+
var _a;
|
|
729
|
+
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
730
|
+
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
731
|
+
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
|
|
732
|
+
: metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
|
|
733
|
+
return new Promise((resolve, reject) => {
|
|
734
|
+
var _a;
|
|
735
|
+
const client = grpc_web_1.grpc.unary(methodDesc, Object.assign(Object.assign({ request, host: this.host, metadata: maybeCombinedMetadata !== null && maybeCombinedMetadata !== void 0 ? maybeCombinedMetadata : {} }, (this.options.transport !== undefined ? { transport: this.options.transport } : {})), { debug: (_a = this.options.debug) !== null && _a !== void 0 ? _a : false, onEnd: function (response) {
|
|
736
|
+
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
737
|
+
resolve(response.message.toObject());
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
741
|
+
reject(err);
|
|
742
|
+
}
|
|
743
|
+
} }));
|
|
744
|
+
if (abortSignal) {
|
|
745
|
+
abortSignal.addEventListener("abort", () => {
|
|
746
|
+
client.close();
|
|
747
|
+
reject(abortSignal.reason);
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
exports.GrpcWebImpl = GrpcWebImpl;
|
|
754
|
+
const tsProtoGlobalThis = (() => {
|
|
755
|
+
if (typeof globalThis !== "undefined") {
|
|
756
|
+
return globalThis;
|
|
757
|
+
}
|
|
758
|
+
if (typeof self !== "undefined") {
|
|
759
|
+
return self;
|
|
760
|
+
}
|
|
761
|
+
if (typeof window !== "undefined") {
|
|
762
|
+
return window;
|
|
763
|
+
}
|
|
764
|
+
if (typeof global !== "undefined") {
|
|
765
|
+
return global;
|
|
766
|
+
}
|
|
767
|
+
throw "Unable to locate global object";
|
|
768
|
+
})();
|
|
769
|
+
function longToNumber(long) {
|
|
770
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
771
|
+
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
772
|
+
}
|
|
773
|
+
return long.toNumber();
|
|
774
|
+
}
|
|
775
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
776
|
+
minimal_1.default.util.Long = long_1.default;
|
|
777
|
+
minimal_1.default.configure();
|
|
778
|
+
}
|
|
779
|
+
function isSet(value) {
|
|
780
|
+
return value !== null && value !== undefined;
|
|
781
|
+
}
|
|
782
|
+
class GrpcWebError extends tsProtoGlobalThis.Error {
|
|
783
|
+
constructor(message, code, metadata) {
|
|
784
|
+
super(message);
|
|
785
|
+
this.code = code;
|
|
786
|
+
this.metadata = metadata;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
exports.GrpcWebError = GrpcWebError;
|
|
790
|
+
//# sourceMappingURL=contacts.js.map
|