@brostark/solutions-client 1.1.9 → 1.1.10
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/client.d.ts +9 -21
- package/dist/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +7 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { generateLiveAPI } from "./api/v1/live";
|
|
2
|
+
import { generateSearchAPI } from "./api/v1/search";
|
|
3
|
+
import { generateVideoAPI } from "./api/v1/video";
|
|
1
4
|
import { ApiVersion } from "./constant";
|
|
2
5
|
/**
|
|
3
6
|
* Options for creating the client
|
|
@@ -8,31 +11,16 @@ export interface CreateClientOptions {
|
|
|
8
11
|
/** The API version (default: DEFAULT_API_VERSION) */
|
|
9
12
|
version?: ApiVersion;
|
|
10
13
|
}
|
|
14
|
+
export interface BrostarkSolutionsClient {
|
|
15
|
+
live: ReturnType<typeof generateLiveAPI>;
|
|
16
|
+
video: ReturnType<typeof generateVideoAPI>;
|
|
17
|
+
search: ReturnType<typeof generateSearchAPI>;
|
|
18
|
+
}
|
|
11
19
|
/**
|
|
12
20
|
* Creates an instance of the API client
|
|
13
21
|
* @param apiKey - The API key for authentication
|
|
14
22
|
* @param options - The configuration options for the client
|
|
15
23
|
* @returns An object containing the different APIs available
|
|
16
24
|
*/
|
|
17
|
-
export declare function createClient(apiKey: string, options?: CreateClientOptions):
|
|
18
|
-
live: {
|
|
19
|
-
createLive: () => Promise<any>;
|
|
20
|
-
getActiveLive: () => Promise<any>;
|
|
21
|
-
};
|
|
22
|
-
video: {
|
|
23
|
-
list: (options?: import("./lib/types").ListOptions) => Promise<any>;
|
|
24
|
-
upload: (file: File) => Promise<any>;
|
|
25
|
-
get: (id: string) => Promise<any>;
|
|
26
|
-
stream: (filename: string) => Promise<string>;
|
|
27
|
-
remove: (id: string) => Promise<any>;
|
|
28
|
-
};
|
|
29
|
-
search: {
|
|
30
|
-
listCollections: (options?: import("./lib/types").ListOptions) => Promise<any>;
|
|
31
|
-
createCollection: (params: import("./lib/types").BrostarkSolutions.Search.CreateCollectionParams) => Promise<any>;
|
|
32
|
-
deleteCollection: (name: string) => Promise<any>;
|
|
33
|
-
upsertDocuments: (collectionName: string, documents: Record<string, unknown>[]) => Promise<any>;
|
|
34
|
-
deleteDocument: (collectionName: string, documentId: string) => Promise<any>;
|
|
35
|
-
query: (collectionName: string, query: import("./lib/types").BrostarkSolutions.Search.SearchQuery) => Promise<import("./lib/types").BrostarkSolutions.Search.SearchResult>;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
25
|
+
export declare function createClient(apiKey: string, options?: CreateClientOptions): BrostarkSolutionsClient;
|
|
38
26
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAyC,MAAM,YAAY,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACzC,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,uBAAuB,CAavG"}
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -13,13 +13,19 @@ export interface CreateClientOptions {
|
|
|
13
13
|
version?: ApiVersion;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export interface BrostarkSolutionsClient {
|
|
17
|
+
live: ReturnType<typeof generateLiveAPI>;
|
|
18
|
+
video: ReturnType<typeof generateVideoAPI>;
|
|
19
|
+
search: ReturnType<typeof generateSearchAPI>;
|
|
20
|
+
}
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* Creates an instance of the API client
|
|
18
24
|
* @param apiKey - The API key for authentication
|
|
19
25
|
* @param options - The configuration options for the client
|
|
20
26
|
* @returns An object containing the different APIs available
|
|
21
27
|
*/
|
|
22
|
-
export function createClient(apiKey: string, options: CreateClientOptions = {}) {
|
|
28
|
+
export function createClient(apiKey: string, options: CreateClientOptions = {}): BrostarkSolutionsClient {
|
|
23
29
|
const {
|
|
24
30
|
host = DEFAULT_API_HOST,
|
|
25
31
|
version = DEFAULT_API_VERSION,
|