@fabriktor/client 0.0.36 → 0.0.38
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type Contact, type ID, type InContact, type OperationResult, type PLContactsGenerateQR
|
|
1
|
+
import { type Contact, type ID, type InContact, type OperationResult, type PLContactsGenerateQR } from "@fabriktor/schema";
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
3
|
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, InsertOneOptionsCRUD, OperationResultOf, ReplaceOneOptionsCRUD } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
5
|
export type GenerateQROptions = PLContactsGenerateQR;
|
|
6
|
-
export type SignalOptions = Signal;
|
|
7
6
|
export type ContactsClientOptions = {
|
|
8
7
|
http: HTTPDoer;
|
|
9
8
|
base_url: string;
|
|
@@ -14,7 +13,7 @@ export interface ContactsOperator {
|
|
|
14
13
|
findOneContact(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Contact>>;
|
|
15
14
|
replaceOneContact(opts: ReplaceOneOptionsCRUD<InContact>): Promise<OperationResult>;
|
|
16
15
|
deleteOneContact(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
17
|
-
signal(
|
|
16
|
+
signal(): Promise<OperationResultOf<ID[]>>;
|
|
18
17
|
suggest(): Promise<OperationResultOf<ID[]>>;
|
|
19
18
|
generateQR(opts: GenerateQROptions): Promise<void>;
|
|
20
19
|
findContacts(): Promise<OperationResultOf<Contact[]>>;
|
|
@@ -29,7 +28,7 @@ export declare class ContactsClient implements ContactsOperator {
|
|
|
29
28
|
findOneContact(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Contact>>;
|
|
30
29
|
replaceOneContact(opts: ReplaceOneOptionsCRUD<InContact>): Promise<OperationResult>;
|
|
31
30
|
deleteOneContact(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
32
|
-
signal(
|
|
31
|
+
signal(): Promise<OperationResultOf<ID[]>>;
|
|
33
32
|
suggest(): Promise<OperationResultOf<ID[]>>;
|
|
34
33
|
generateQR(opts: GenerateQROptions): Promise<void>;
|
|
35
34
|
findContacts(): Promise<OperationResultOf<Contact[]>>;
|
|
@@ -36,14 +36,13 @@ export class ContactsClient {
|
|
|
36
36
|
async deleteOneContact(opts) {
|
|
37
37
|
return await this.contacts.deleteOne(opts);
|
|
38
38
|
}
|
|
39
|
-
async signal(
|
|
39
|
+
async signal() {
|
|
40
40
|
const token = await requiredToken(this.get_token);
|
|
41
41
|
return await this.http.do({
|
|
42
42
|
base_url: this.base_url,
|
|
43
43
|
path: signalPath(PathContactsSignal),
|
|
44
44
|
method: HTTPMethodPost,
|
|
45
45
|
token,
|
|
46
|
-
body: opts,
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
async suggest() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabriktor/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@fabriktor/client": "0.0.25",
|
|
21
|
-
"@fabriktor/schema": "0.0.
|
|
21
|
+
"@fabriktor/schema": "0.0.29"
|
|
22
22
|
}
|
|
23
23
|
}
|