@openpeepshq/client 0.1.36
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/LICENSE.md +21 -0
- package/dist/common/authenticated.d.ts +8 -0
- package/dist/common/authenticated.js +23 -0
- package/dist/common/base.d.ts +3 -0
- package/dist/common/base.js +5 -0
- package/dist/endpoints/accounts.d.ts +321 -0
- package/dist/endpoints/accounts.js +12 -0
- package/dist/endpoints/admin.d.ts +17353 -0
- package/dist/endpoints/admin.js +123 -0
- package/dist/endpoints/auth.d.ts +85 -0
- package/dist/endpoints/auth.js +10 -0
- package/dist/endpoints/conversations.d.ts +9818 -0
- package/dist/endpoints/conversations.js +6 -0
- package/dist/endpoints/groups.d.ts +341 -0
- package/dist/endpoints/groups.js +15 -0
- package/dist/endpoints/helpers.d.ts +16 -0
- package/dist/endpoints/helpers.js +15 -0
- package/dist/endpoints/i18n.d.ts +16 -0
- package/dist/endpoints/i18n.js +5 -0
- package/dist/endpoints/jams.d.ts +3347 -0
- package/dist/endpoints/jams.js +25 -0
- package/dist/endpoints/location.d.ts +24 -0
- package/dist/endpoints/location.js +4 -0
- package/dist/endpoints/media.d.ts +47 -0
- package/dist/endpoints/media.js +18 -0
- package/dist/endpoints/payments.d.ts +68 -0
- package/dist/endpoints/payments.js +8 -0
- package/dist/endpoints/plugins.d.ts +45 -0
- package/dist/endpoints/plugins.js +6 -0
- package/dist/endpoints/posts.d.ts +76856 -0
- package/dist/endpoints/posts.js +65 -0
- package/dist/endpoints/previewLink.d.ts +17 -0
- package/dist/endpoints/previewLink.js +2 -0
- package/dist/endpoints/profiles.d.ts +6929 -0
- package/dist/endpoints/profiles.js +26 -0
- package/dist/endpoints/reports.d.ts +59 -0
- package/dist/endpoints/reports.js +8 -0
- package/dist/endpoints/search.d.ts +9650 -0
- package/dist/endpoints/search.js +9 -0
- package/dist/endpoints/server.d.ts +152 -0
- package/dist/endpoints/server.js +13 -0
- package/dist/endpoints/sso.d.ts +40 -0
- package/dist/endpoints/sso.js +10 -0
- package/dist/endpoints/streaming.d.ts +33 -0
- package/dist/endpoints/streaming.js +13 -0
- package/dist/endpoints/types.d.ts +61 -0
- package/dist/endpoints/types.js +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +62 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +1 -0
- package/dist/webhooks/index.d.ts +4 -0
- package/dist/webhooks/index.js +27 -0
- package/package.json +40 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers.js';
|
|
2
|
+
export const jams = (rawClient, eventSource) => {
|
|
3
|
+
return {
|
|
4
|
+
list: allpeepNoPayloadEndpoint(rawClient, '/jams'),
|
|
5
|
+
state: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/state'),
|
|
6
|
+
close: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/close', 'put'),
|
|
7
|
+
token: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/token'),
|
|
8
|
+
muteParticipant: allpeepPayloadEndpoint(rawClient, '/jams/:id/mute-participant'),
|
|
9
|
+
waitingRoom: {
|
|
10
|
+
listen: eventSource('/jams/:id/waiting-room'),
|
|
11
|
+
join: eventSource('/jams/:id/waiting-room', 'post'),
|
|
12
|
+
admit: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/waiting-room/:profileId/admit', 'post'),
|
|
13
|
+
},
|
|
14
|
+
events: {
|
|
15
|
+
list: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/events'),
|
|
16
|
+
create: allpeepPayloadEndpoint(rawClient, '/jams/:id/events'),
|
|
17
|
+
attendance: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/events/attendance'),
|
|
18
|
+
},
|
|
19
|
+
recordings: {
|
|
20
|
+
start: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/recordings', 'post'),
|
|
21
|
+
stop: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/recordings/stop', 'put'),
|
|
22
|
+
observerLink: allpeepNoPayloadEndpoint(rawClient, '/jams/:id/recordings/observer-link', 'get'),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FetchClient } from '@openpeepshq/fetch-client';
|
|
2
|
+
export declare const location: (rawClient: FetchClient) => {
|
|
3
|
+
geocode: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
4
|
+
name: string;
|
|
5
|
+
bbox: {
|
|
6
|
+
lat: number;
|
|
7
|
+
lng: number;
|
|
8
|
+
alt?: number | undefined;
|
|
9
|
+
}[];
|
|
10
|
+
center: {
|
|
11
|
+
lat: number;
|
|
12
|
+
lng: number;
|
|
13
|
+
alt?: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
icon?: string | undefined;
|
|
16
|
+
properties?: Record<string, any> | undefined;
|
|
17
|
+
}[], {
|
|
18
|
+
success: boolean;
|
|
19
|
+
message?: string | undefined;
|
|
20
|
+
key?: string | undefined;
|
|
21
|
+
}, undefined, {
|
|
22
|
+
query: string;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { FetchClient, noPayloadEventSource } from '@openpeepshq/fetch-client';
|
|
2
|
+
import type { MediaAttachment, MediaProgressEvent, MediaStorageRequestInput } from '@openpeepshq/common';
|
|
3
|
+
export declare const media: (rawClient: FetchClient, eventSource: ReturnType<typeof noPayloadEventSource>) => {
|
|
4
|
+
list: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<MediaAttachment[], {
|
|
5
|
+
success: boolean;
|
|
6
|
+
message?: string | undefined;
|
|
7
|
+
key?: string | undefined;
|
|
8
|
+
}, undefined, undefined>;
|
|
9
|
+
findById: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<MediaAttachment, {
|
|
10
|
+
success: boolean;
|
|
11
|
+
message?: string | undefined;
|
|
12
|
+
key?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
id: string;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
create: import("@openpeepshq/fetch-client").TypedPayloadEndpoint<MediaAttachment, MediaStorageRequestInput, {
|
|
17
|
+
success: boolean;
|
|
18
|
+
message?: string | undefined;
|
|
19
|
+
key?: string | undefined;
|
|
20
|
+
}, undefined, undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* Same as `create` but routes through XHR so callers can pass
|
|
23
|
+
* `onUploadProgress` to receive byte-level upload events. Returns either a
|
|
24
|
+
* fully-processed `MediaAttachment` (small files, sync path) or a partial
|
|
25
|
+
* one with `status: 'processing'` (large files, async path) — pair with
|
|
26
|
+
* `progress.listen` to track the background processing phase.
|
|
27
|
+
*/
|
|
28
|
+
createWithProgress: import("@openpeepshq/fetch-client").TypedPayloadProgressObserverEndpoint<MediaAttachment, MediaStorageRequestInput, {
|
|
29
|
+
success: boolean;
|
|
30
|
+
message?: string | undefined;
|
|
31
|
+
key?: string | undefined;
|
|
32
|
+
}, undefined, undefined>;
|
|
33
|
+
delete: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
34
|
+
success: true;
|
|
35
|
+
}, {
|
|
36
|
+
success: boolean;
|
|
37
|
+
message?: string | undefined;
|
|
38
|
+
key?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
id: string;
|
|
41
|
+
}, undefined>;
|
|
42
|
+
progress: {
|
|
43
|
+
listen: import("@openpeepshq/fetch-client").TypedNoPayloadEventSource<MediaProgressEvent, {
|
|
44
|
+
id: string;
|
|
45
|
+
}, undefined>;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint, allpeepPayloadProgressObserverEndpoint, } from './helpers.js';
|
|
2
|
+
export const media = (rawClient, eventSource) => ({
|
|
3
|
+
list: allpeepNoPayloadEndpoint(rawClient, '/media'),
|
|
4
|
+
findById: allpeepNoPayloadEndpoint(rawClient, '/media/:id'),
|
|
5
|
+
create: allpeepPayloadEndpoint(rawClient, '/media', 'post', true),
|
|
6
|
+
/**
|
|
7
|
+
* Same as `create` but routes through XHR so callers can pass
|
|
8
|
+
* `onUploadProgress` to receive byte-level upload events. Returns either a
|
|
9
|
+
* fully-processed `MediaAttachment` (small files, sync path) or a partial
|
|
10
|
+
* one with `status: 'processing'` (large files, async path) — pair with
|
|
11
|
+
* `progress.listen` to track the background processing phase.
|
|
12
|
+
*/
|
|
13
|
+
createWithProgress: allpeepPayloadProgressObserverEndpoint(rawClient, '/media', 'post', true),
|
|
14
|
+
delete: allpeepNoPayloadEndpoint(rawClient, '/media/:id', 'delete'),
|
|
15
|
+
progress: {
|
|
16
|
+
listen: eventSource('/media/:id/progress'),
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { FetchClient } from '@openpeepshq/fetch-client';
|
|
2
|
+
export declare const payments: (rawClient: FetchClient) => {
|
|
3
|
+
createCheckout: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
url: string | null;
|
|
6
|
+
message?: string | undefined;
|
|
7
|
+
key?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
success: boolean;
|
|
10
|
+
message?: string | undefined;
|
|
11
|
+
key?: string | undefined;
|
|
12
|
+
}, undefined, undefined>;
|
|
13
|
+
createPortal: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
14
|
+
success: boolean;
|
|
15
|
+
message?: string | undefined;
|
|
16
|
+
key?: string | undefined;
|
|
17
|
+
url?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
success: boolean;
|
|
20
|
+
message?: string | undefined;
|
|
21
|
+
key?: string | undefined;
|
|
22
|
+
}, undefined, undefined>;
|
|
23
|
+
success: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
24
|
+
success: boolean;
|
|
25
|
+
message?: string | undefined;
|
|
26
|
+
key?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
success: boolean;
|
|
29
|
+
message?: string | undefined;
|
|
30
|
+
key?: string | undefined;
|
|
31
|
+
}, undefined, undefined>;
|
|
32
|
+
status: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
33
|
+
subscriptionId: string | null;
|
|
34
|
+
status: "active" | "incomplete" | "incomplete_expired" | "trialing" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
35
|
+
priceId: string | null;
|
|
36
|
+
currentPeriodStart: number | null;
|
|
37
|
+
currentPeriodEnd: number | null;
|
|
38
|
+
cancelAtPeriodEnd: boolean;
|
|
39
|
+
paymentMethod: {
|
|
40
|
+
brand: string | null;
|
|
41
|
+
last4: string | null;
|
|
42
|
+
} | null;
|
|
43
|
+
} | {
|
|
44
|
+
status: "none";
|
|
45
|
+
}, {
|
|
46
|
+
success: boolean;
|
|
47
|
+
message?: string | undefined;
|
|
48
|
+
key?: string | undefined;
|
|
49
|
+
}, undefined, undefined>;
|
|
50
|
+
test: import("@openpeepshq/fetch-client").TypedPayloadEndpoint<{
|
|
51
|
+
success: boolean;
|
|
52
|
+
message?: string | undefined;
|
|
53
|
+
key?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
paidMembership?: {
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
productId?: string | undefined;
|
|
58
|
+
trialPeriodDays?: number | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
publishableKey?: string | undefined;
|
|
61
|
+
secretKey?: string | undefined;
|
|
62
|
+
webhookSecret?: string | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
success: boolean;
|
|
65
|
+
message?: string | undefined;
|
|
66
|
+
key?: string | undefined;
|
|
67
|
+
}, undefined, undefined>;
|
|
68
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers.js';
|
|
2
|
+
export const payments = (rawClient) => ({
|
|
3
|
+
createCheckout: allpeepNoPayloadEndpoint(rawClient, '/payments/create-checkout', 'post'),
|
|
4
|
+
createPortal: allpeepNoPayloadEndpoint(rawClient, '/payments/create-portal', 'post'),
|
|
5
|
+
success: allpeepNoPayloadEndpoint(rawClient, '/payments/success'),
|
|
6
|
+
status: allpeepNoPayloadEndpoint(rawClient, '/payments/status'),
|
|
7
|
+
test: allpeepPayloadEndpoint(rawClient, '/payments/test'),
|
|
8
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FetchClient } from '@openpeepshq/fetch-client';
|
|
2
|
+
import type { PluginManifest } from '@openpeepshq/common';
|
|
3
|
+
type PluginManifestEntry = PluginManifest & {
|
|
4
|
+
key: string;
|
|
5
|
+
namespace: string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const plugins: (rawClient: FetchClient) => {
|
|
9
|
+
list: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
10
|
+
key: string;
|
|
11
|
+
namespace: string;
|
|
12
|
+
name: string;
|
|
13
|
+
version?: string | undefined;
|
|
14
|
+
displayName?: string | undefined;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
status?: "failed" | "loaded" | undefined;
|
|
17
|
+
manifest?: {
|
|
18
|
+
components: {
|
|
19
|
+
slot: string;
|
|
20
|
+
asset: string;
|
|
21
|
+
componentKey: string;
|
|
22
|
+
}[];
|
|
23
|
+
} | undefined;
|
|
24
|
+
}[], {
|
|
25
|
+
success: boolean;
|
|
26
|
+
message?: string | undefined;
|
|
27
|
+
key?: string | undefined;
|
|
28
|
+
}, undefined, undefined>;
|
|
29
|
+
config: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<Record<string, Record<string, {
|
|
30
|
+
namespace: string;
|
|
31
|
+
name: string;
|
|
32
|
+
config: Record<string, unknown>;
|
|
33
|
+
defaults: Record<string, unknown>;
|
|
34
|
+
}>>, {
|
|
35
|
+
success: boolean;
|
|
36
|
+
message?: string | undefined;
|
|
37
|
+
key?: string | undefined;
|
|
38
|
+
}, undefined, undefined>;
|
|
39
|
+
manifest: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<PluginManifestEntry[], {
|
|
40
|
+
success: boolean;
|
|
41
|
+
message?: string | undefined;
|
|
42
|
+
key?: string | undefined;
|
|
43
|
+
}, undefined, undefined>;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { allpeepNoPayloadEndpoint } from './helpers.js';
|
|
2
|
+
export const plugins = (rawClient) => ({
|
|
3
|
+
list: allpeepNoPayloadEndpoint(rawClient, '/plugins'),
|
|
4
|
+
config: allpeepNoPayloadEndpoint(rawClient, '/plugins/config'),
|
|
5
|
+
manifest: allpeepNoPayloadEndpoint(rawClient, '/plugins/manifest'),
|
|
6
|
+
});
|