@omerlo/omerlo-webkit 0.0.30 → 0.0.31
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/omerlo/index.d.ts +1 -0
- package/dist/omerlo/reader/endpoints/integration.d.ts +11 -0
- package/dist/omerlo/reader/endpoints/integration.js +19 -0
- package/dist/omerlo/reader/fetchers.d.ts +1 -0
- package/dist/omerlo/reader/fetchers.js +2 -0
- package/dist/omerlo/reader/utils/api.d.ts +2 -0
- package/package.json +1 -1
package/dist/omerlo/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare const useReader: (f: typeof fetch) => {
|
|
|
11
11
|
searchContents: (issueId: string, q: string) => Promise<import("./reader/utils/api").ApiResponse<import("./reader").SectionContent[]>>;
|
|
12
12
|
getSectionContents: (sectionId: string) => Promise<import("./reader/utils/api").ApiResponse<import("./reader").ContentSummary[]>>;
|
|
13
13
|
};
|
|
14
|
+
getReference: (key: string) => Promise<import("./reader/utils/api").ApiResponse<import("./reader/endpoints/integration").Reference>>;
|
|
14
15
|
listProjects: (params?: Partial<import("./reader/utils/api").PagingParams>) => Promise<import("./reader/utils/api").ApiResponse<import("./reader").ProjectSummary[]>>;
|
|
15
16
|
getProject: (id: string) => Promise<import("./reader/utils/api").ApiResponse<import("./reader").Project>>;
|
|
16
17
|
listPeople: (params?: Partial<import("./reader/utils/api").PagingParams>) => Promise<import("./reader/utils/api").ApiResponse<import("./reader").PersonSummary[]>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ApiAssocs, ApiData } from '../utils/api';
|
|
2
|
+
export declare const integrationFetchers: (f: typeof fetch) => {
|
|
3
|
+
getReference: (key: string) => Promise<import("../utils/api").ApiResponse<Reference>>;
|
|
4
|
+
};
|
|
5
|
+
export declare function getReference(f: typeof fetch): (key: string) => Promise<import("../utils/api").ApiResponse<Reference>>;
|
|
6
|
+
export interface Reference {
|
|
7
|
+
id: string;
|
|
8
|
+
provider: string;
|
|
9
|
+
urn: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseReference(data: ApiData, _assocs: ApiAssocs): Reference;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { requestPublisher } from '../utils/request';
|
|
2
|
+
export const integrationFetchers = (f) => {
|
|
3
|
+
return {
|
|
4
|
+
getReference: getReference(f)
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export function getReference(f) {
|
|
8
|
+
return async (key) => {
|
|
9
|
+
const opts = { parser: parseReference };
|
|
10
|
+
return requestPublisher(f, `/references/${key}`, opts);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function parseReference(data, _assocs) {
|
|
14
|
+
return {
|
|
15
|
+
id: data.id,
|
|
16
|
+
provider: data.provider,
|
|
17
|
+
urn: data.urn
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -11,6 +11,7 @@ export declare const fetchers: (f: typeof fetch) => {
|
|
|
11
11
|
searchContents: (issueId: string, q: string) => Promise<import("./utils/api").ApiResponse<import("./endpoints/magazines").SectionContent[]>>;
|
|
12
12
|
getSectionContents: (sectionId: string) => Promise<import("./utils/api").ApiResponse<import("./endpoints/contents").ContentSummary[]>>;
|
|
13
13
|
};
|
|
14
|
+
getReference: (key: string) => Promise<import("./utils/api").ApiResponse<import("./endpoints/integration").Reference>>;
|
|
14
15
|
listProjects: (params?: Partial<import("./utils/api").PagingParams>) => Promise<import("./utils/api").ApiResponse<import("./endpoints/projects").ProjectSummary[]>>;
|
|
15
16
|
getProject: (id: string) => Promise<import("./utils/api").ApiResponse<import("./endpoints/projects").Project>>;
|
|
16
17
|
listPeople: (params?: Partial<import("./utils/api").PagingParams>) => Promise<import("./utils/api").ApiResponse<import("./endpoints/person").PersonSummary[]>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { accountsFetchers } from './endpoints/accounts';
|
|
2
2
|
import { categoriesFetchers } from './endpoints/categories';
|
|
3
3
|
import { deviceFetchers } from './endpoints/device';
|
|
4
|
+
import { integrationFetchers } from './endpoints/integration';
|
|
4
5
|
import { notificationFetchers } from './endpoints/notification';
|
|
5
6
|
import { oauthFetchers } from './endpoints/oauth';
|
|
6
7
|
import { contentsFetchers } from './endpoints/contents';
|
|
@@ -27,6 +28,7 @@ export const fetchers = (f) => {
|
|
|
27
28
|
...eventFetchers(f),
|
|
28
29
|
...personFetchers(f),
|
|
29
30
|
...projectFetchers(f),
|
|
31
|
+
...integrationFetchers(f),
|
|
30
32
|
notifications: notificationFetchers(f),
|
|
31
33
|
magazines: {
|
|
32
34
|
...magazineFetchers(f),
|