@openpeepshq/client 0.1.37 → 0.2.0
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/common/authenticated.js +2 -2
- package/dist/endpoints/accounts.d.ts +69 -0
- package/dist/endpoints/accounts.js +1 -0
- package/dist/endpoints/admin.d.ts +115 -17328
- package/dist/endpoints/admin.js +11 -2
- package/dist/endpoints/auth.d.ts +2 -1
- package/dist/endpoints/conversations.d.ts +35481 -5352
- package/dist/endpoints/conversations.js +2 -0
- package/dist/endpoints/groups.d.ts +15 -3
- package/dist/endpoints/jams.d.ts +7500 -716
- package/dist/endpoints/jams.js +12 -0
- package/dist/endpoints/plugins.d.ts +1 -1
- package/dist/endpoints/posts.d.ts +72 -76801
- package/dist/endpoints/posts.js +12 -2
- package/dist/endpoints/profiles.d.ts +27308 -3781
- package/dist/endpoints/profiles.js +8 -0
- package/dist/endpoints/search.d.ts +24551 -4361
- package/dist/endpoints/server.d.ts +19 -1
- package/dist/index.js +8 -11
- package/package.json +30 -9
- package/src/common/authenticated.ts +28 -0
- package/src/common/base.ts +11 -0
- package/src/endpoints/accounts.ts +52 -0
- package/src/endpoints/admin.ts +616 -0
- package/src/endpoints/analytics.ts +13 -0
- package/src/endpoints/auth.ts +43 -0
- package/src/endpoints/conversations.ts +28 -0
- package/src/endpoints/groups.ts +69 -0
- package/src/endpoints/helpers.ts +91 -0
- package/src/endpoints/i18n.ts +14 -0
- package/src/endpoints/jams.ts +126 -0
- package/src/endpoints/location.ts +10 -0
- package/src/endpoints/media.ts +56 -0
- package/src/endpoints/payments.ts +34 -0
- package/src/endpoints/plugins.ts +25 -0
- package/src/endpoints/posts.ts +377 -0
- package/src/endpoints/previewLink.ts +10 -0
- package/src/endpoints/profiles.ts +167 -0
- package/src/endpoints/reports.ts +32 -0
- package/src/endpoints/search.ts +34 -0
- package/src/endpoints/server.ts +38 -0
- package/src/endpoints/sso.ts +35 -0
- package/src/endpoints/streaming.ts +29 -0
- package/src/endpoints/types.ts +66 -0
- package/src/index.ts +88 -0
- package/src/types/index.ts +20 -0
- package/src/webhooks/index.ts +50 -0
package/dist/endpoints/admin.js
CHANGED
|
@@ -49,7 +49,7 @@ export const admin = (rawClient) => ({
|
|
|
49
49
|
const path = `/admin/db/tables/${encodeURIComponent(table)}/export${qs ? `?${qs}` : ''}`;
|
|
50
50
|
const response = await rawClient.get(path);
|
|
51
51
|
if (!response.ok) {
|
|
52
|
-
throw
|
|
52
|
+
throw { ...(await response.json()), status: response.status };
|
|
53
53
|
}
|
|
54
54
|
return response.text();
|
|
55
55
|
},
|
|
@@ -77,7 +77,7 @@ export const admin = (rawClient) => ({
|
|
|
77
77
|
exportCsv: async () => {
|
|
78
78
|
const response = await rawClient.get('/admin/profiles/export');
|
|
79
79
|
if (!response.ok) {
|
|
80
|
-
throw
|
|
80
|
+
throw { ...(await response.json()), status: response.status };
|
|
81
81
|
}
|
|
82
82
|
return response.text();
|
|
83
83
|
},
|
|
@@ -85,9 +85,11 @@ export const admin = (rawClient) => ({
|
|
|
85
85
|
delete: allpeepNoPayloadEndpoint(rawClient, '/admin/profiles/:id', 'delete'),
|
|
86
86
|
listRoles: allpeepNoPayloadEndpoint(rawClient, '/admin/profiles/:id/roles'),
|
|
87
87
|
updateRoles: allpeepPayloadEndpoint(rawClient, '/admin/profiles/:id/roles', 'put'),
|
|
88
|
+
activitySummary: allpeepNoPayloadEndpoint(rawClient, '/admin/profiles/:id/activity-summary'),
|
|
88
89
|
},
|
|
89
90
|
roles: {
|
|
90
91
|
list: allpeepNoPayloadEndpoint(rawClient, '/admin/roles'),
|
|
92
|
+
create: allpeepPayloadEndpoint(rawClient, '/admin/roles', 'post'),
|
|
91
93
|
update: allpeepPayloadEndpoint(rawClient, '/admin/roles/:roleId', 'put'),
|
|
92
94
|
},
|
|
93
95
|
stats: {
|
|
@@ -121,4 +123,11 @@ export const admin = (rawClient) => ({
|
|
|
121
123
|
create: allpeepPayloadEndpoint(rawClient, '/admin/service-access-tokens', 'post'),
|
|
122
124
|
revoke: allpeepNoPayloadEndpoint(rawClient, '/admin/service-access-tokens/:accessTokenId', 'delete'),
|
|
123
125
|
},
|
|
126
|
+
plugins: {
|
|
127
|
+
list: allpeepNoPayloadEndpoint(rawClient, '/admin/plugins'),
|
|
128
|
+
install: allpeepPayloadEndpoint(rawClient, '/admin/plugins/install', 'post'),
|
|
129
|
+
uninstall: allpeepNoPayloadEndpoint(rawClient, '/admin/plugins/:namespace/:name', 'delete'),
|
|
130
|
+
update: allpeepPayloadEndpoint(rawClient, '/admin/plugins/:namespace/:name', 'patch'),
|
|
131
|
+
reload: allpeepNoPayloadEndpoint(rawClient, '/admin/plugins/reload', 'post'),
|
|
132
|
+
},
|
|
124
133
|
});
|
package/dist/endpoints/auth.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const auth: (rawClient: FetchClient) => {
|
|
|
24
24
|
displayName?: string | undefined;
|
|
25
25
|
confirmPassword?: string | undefined;
|
|
26
26
|
inviteCode?: string | undefined;
|
|
27
|
+
bot?: boolean | undefined;
|
|
27
28
|
}, {
|
|
28
29
|
success: boolean;
|
|
29
30
|
message?: string | undefined;
|
|
@@ -56,7 +57,7 @@ export declare const auth: (rawClient: FetchClient) => {
|
|
|
56
57
|
displayName: string;
|
|
57
58
|
email: string;
|
|
58
59
|
resource: {
|
|
59
|
-
type: "self" | "jams" | "profiles" | "
|
|
60
|
+
type: "self" | "jams" | "profiles" | "notifications" | "posts" | "groups" | "reports" | "webhooks" | "db" | "analytics" | "render" | "*";
|
|
60
61
|
id?: string | undefined;
|
|
61
62
|
};
|
|
62
63
|
}, {
|