@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.
Files changed (54) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/common/authenticated.d.ts +8 -0
  3. package/dist/common/authenticated.js +23 -0
  4. package/dist/common/base.d.ts +3 -0
  5. package/dist/common/base.js +5 -0
  6. package/dist/endpoints/accounts.d.ts +321 -0
  7. package/dist/endpoints/accounts.js +12 -0
  8. package/dist/endpoints/admin.d.ts +17353 -0
  9. package/dist/endpoints/admin.js +123 -0
  10. package/dist/endpoints/auth.d.ts +85 -0
  11. package/dist/endpoints/auth.js +10 -0
  12. package/dist/endpoints/conversations.d.ts +9818 -0
  13. package/dist/endpoints/conversations.js +6 -0
  14. package/dist/endpoints/groups.d.ts +341 -0
  15. package/dist/endpoints/groups.js +15 -0
  16. package/dist/endpoints/helpers.d.ts +16 -0
  17. package/dist/endpoints/helpers.js +15 -0
  18. package/dist/endpoints/i18n.d.ts +16 -0
  19. package/dist/endpoints/i18n.js +5 -0
  20. package/dist/endpoints/jams.d.ts +3347 -0
  21. package/dist/endpoints/jams.js +25 -0
  22. package/dist/endpoints/location.d.ts +24 -0
  23. package/dist/endpoints/location.js +4 -0
  24. package/dist/endpoints/media.d.ts +47 -0
  25. package/dist/endpoints/media.js +18 -0
  26. package/dist/endpoints/payments.d.ts +68 -0
  27. package/dist/endpoints/payments.js +8 -0
  28. package/dist/endpoints/plugins.d.ts +45 -0
  29. package/dist/endpoints/plugins.js +6 -0
  30. package/dist/endpoints/posts.d.ts +76856 -0
  31. package/dist/endpoints/posts.js +65 -0
  32. package/dist/endpoints/previewLink.d.ts +17 -0
  33. package/dist/endpoints/previewLink.js +2 -0
  34. package/dist/endpoints/profiles.d.ts +6929 -0
  35. package/dist/endpoints/profiles.js +26 -0
  36. package/dist/endpoints/reports.d.ts +59 -0
  37. package/dist/endpoints/reports.js +8 -0
  38. package/dist/endpoints/search.d.ts +9650 -0
  39. package/dist/endpoints/search.js +9 -0
  40. package/dist/endpoints/server.d.ts +152 -0
  41. package/dist/endpoints/server.js +13 -0
  42. package/dist/endpoints/sso.d.ts +40 -0
  43. package/dist/endpoints/sso.js +10 -0
  44. package/dist/endpoints/streaming.d.ts +33 -0
  45. package/dist/endpoints/streaming.js +13 -0
  46. package/dist/endpoints/types.d.ts +61 -0
  47. package/dist/endpoints/types.js +1 -0
  48. package/dist/index.d.ts +8 -0
  49. package/dist/index.js +62 -0
  50. package/dist/types/index.d.ts +4 -0
  51. package/dist/types/index.js +1 -0
  52. package/dist/webhooks/index.d.ts +4 -0
  53. package/dist/webhooks/index.js +27 -0
  54. package/package.json +40 -0
@@ -0,0 +1,26 @@
1
+ import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers.js';
2
+ export const profiles = (rawClient) => ({
3
+ current: {
4
+ read: allpeepNoPayloadEndpoint(rawClient, '/profiles/current'),
5
+ update: allpeepPayloadEndpoint(rawClient, '/profiles/current', 'patch'),
6
+ notifications: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/notifications'),
7
+ notificationStats: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/notifications/stats'),
8
+ notificationTypes: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/notifications/types'),
9
+ reposts: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/reposts'),
10
+ bookmarkedIds: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/bookmarkedIds'),
11
+ markAllNotificationsAsSeen: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/notifications/mark-all-seen', 'put'),
12
+ readSettings: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/settings'),
13
+ updateSettings: allpeepPayloadEndpoint(rawClient, '/profiles/current/settings', 'put'),
14
+ accessTokens: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/access-tokens'),
15
+ createAccessToken: allpeepPayloadEndpoint(rawClient, '/profiles/current/access-tokens', 'post'),
16
+ revokeAccessToken: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/access-tokens/:accessTokenId', 'delete'),
17
+ },
18
+ list: allpeepNoPayloadEndpoint(rawClient, '/profiles'),
19
+ findById: allpeepNoPayloadEndpoint(rawClient, '/profiles/:id'),
20
+ findByHandle: allpeepNoPayloadEndpoint(rawClient, '/profiles/by-handle/:handle'),
21
+ follow: allpeepPayloadEndpoint(rawClient, '/profiles/:id/follow', 'post'),
22
+ unfollow: allpeepNoPayloadEndpoint(rawClient, '/profiles/:id/follow', 'delete'),
23
+ followers: allpeepNoPayloadEndpoint(rawClient, '/profiles/:id/followers'),
24
+ following: allpeepNoPayloadEndpoint(rawClient, '/profiles/:id/following'),
25
+ commonGroups: allpeepNoPayloadEndpoint(rawClient, '/profiles/:profileId/common-groups'),
26
+ });
@@ -0,0 +1,59 @@
1
+ import type { FetchClient } from '@openpeepshq/fetch-client';
2
+ import type { PublicReport } from '@openpeepshq/common';
3
+ export declare const reports: (rawClient: FetchClient) => {
4
+ list: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<PublicReport[], {
5
+ success: boolean;
6
+ message?: string | undefined;
7
+ key?: string | undefined;
8
+ }, undefined, undefined>;
9
+ findById: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<PublicReport, {
10
+ success: boolean;
11
+ message?: string | undefined;
12
+ key?: string | undefined;
13
+ }, {
14
+ reportId: string;
15
+ }, undefined>;
16
+ create: import("@openpeepshq/fetch-client").TypedPayloadEndpoint<PublicReport, {
17
+ report: {
18
+ comment: string;
19
+ category: "other" | "spam" | "violation";
20
+ uri?: string | undefined;
21
+ forward?: boolean | undefined;
22
+ ruleIds?: number[] | undefined;
23
+ resolution?: "remove" | "other" | "ignore" | "warn" | "ban" | undefined;
24
+ };
25
+ profileId: string;
26
+ postIds: string[];
27
+ }, {
28
+ success: boolean;
29
+ message?: string | undefined;
30
+ key?: string | undefined;
31
+ }, undefined, undefined>;
32
+ update: import("@openpeepshq/fetch-client").TypedPayloadEndpoint<PublicReport, Partial<{
33
+ report: {
34
+ comment: string;
35
+ category: "other" | "spam" | "violation";
36
+ uri?: string | undefined;
37
+ forward?: boolean | undefined;
38
+ ruleIds?: number[] | undefined;
39
+ resolution?: "remove" | "other" | "ignore" | "warn" | "ban" | undefined;
40
+ };
41
+ profileId: string;
42
+ postIds: string[];
43
+ }>, {
44
+ success: boolean;
45
+ message?: string | undefined;
46
+ key?: string | undefined;
47
+ }, {
48
+ id: string;
49
+ }, undefined>;
50
+ delete: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
51
+ success: true;
52
+ }, {
53
+ success: boolean;
54
+ message?: string | undefined;
55
+ key?: string | undefined;
56
+ }, {
57
+ id: string;
58
+ }, undefined>;
59
+ };
@@ -0,0 +1,8 @@
1
+ import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers.js';
2
+ export const reports = (rawClient) => ({
3
+ list: allpeepNoPayloadEndpoint(rawClient, '/reports'),
4
+ findById: allpeepNoPayloadEndpoint(rawClient, '/reports/:reportId'),
5
+ create: allpeepPayloadEndpoint(rawClient, '/reports'),
6
+ update: allpeepPayloadEndpoint(rawClient, '/reports/:id', 'patch'),
7
+ delete: allpeepNoPayloadEndpoint(rawClient, '/reports/:id', 'delete'),
8
+ });