@openpeepshq/client 0.1.38 → 0.2.1

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 (38) hide show
  1. package/dist/common/authenticated.js +2 -2
  2. package/dist/endpoints/admin.js +2 -2
  3. package/dist/endpoints/conversations.d.ts +13 -39942
  4. package/dist/endpoints/jams.d.ts +1064 -38
  5. package/dist/endpoints/jams.js +1 -1
  6. package/dist/endpoints/posts.js +10 -2
  7. package/dist/endpoints/profiles.d.ts +3153 -75
  8. package/dist/endpoints/search.d.ts +3155 -77
  9. package/dist/endpoints/server.d.ts +1 -0
  10. package/dist/index.js +8 -11
  11. package/package.json +30 -9
  12. package/src/common/authenticated.ts +28 -0
  13. package/src/common/base.ts +11 -0
  14. package/src/endpoints/accounts.ts +52 -0
  15. package/src/endpoints/admin.ts +616 -0
  16. package/src/endpoints/analytics.ts +13 -0
  17. package/src/endpoints/auth.ts +43 -0
  18. package/src/endpoints/conversations.ts +44 -0
  19. package/src/endpoints/groups.ts +69 -0
  20. package/src/endpoints/helpers.ts +91 -0
  21. package/src/endpoints/i18n.ts +14 -0
  22. package/src/endpoints/jams.ts +126 -0
  23. package/src/endpoints/location.ts +10 -0
  24. package/src/endpoints/media.ts +56 -0
  25. package/src/endpoints/payments.ts +34 -0
  26. package/src/endpoints/plugins.ts +25 -0
  27. package/src/endpoints/posts.ts +377 -0
  28. package/src/endpoints/previewLink.ts +10 -0
  29. package/src/endpoints/profiles.ts +167 -0
  30. package/src/endpoints/reports.ts +32 -0
  31. package/src/endpoints/search.ts +34 -0
  32. package/src/endpoints/server.ts +38 -0
  33. package/src/endpoints/sso.ts +35 -0
  34. package/src/endpoints/streaming.ts +29 -0
  35. package/src/endpoints/types.ts +66 -0
  36. package/src/index.ts +88 -0
  37. package/src/types/index.ts +20 -0
  38. package/src/webhooks/index.ts +50 -0
@@ -18,7 +18,7 @@ export const jams = (rawClient, eventSource) => {
18
18
  exportAttendance: async ({ id }) => {
19
19
  const response = await rawClient.get(`/jams/${id}/events/attendance/export`);
20
20
  if (!response.ok) {
21
- throw Object.assign(Object.assign({}, (await response.json())), { status: response.status });
21
+ throw { ...(await response.json()), status: response.status };
22
22
  }
23
23
  return response.text();
24
24
  },
@@ -47,7 +47,11 @@ const postFeeds = (rawClient) => ({
47
47
  local: allpeepNoPayloadEndpoint(rawClient, '/posts/feeds/local'),
48
48
  });
49
49
  const feeds = (rawClient) => ({
50
- feeds: Object.assign(Object.assign(Object.assign({}, postFeeds(rawClient)), eventFeeds(rawClient)), jamFeeds(rawClient)),
50
+ feeds: {
51
+ ...postFeeds(rawClient),
52
+ ...eventFeeds(rawClient),
53
+ ...jamFeeds(rawClient),
54
+ },
51
55
  });
52
56
  const mutators = (rawClient) => ({
53
57
  create: allpeepPayloadEndpoint(rawClient, '/posts'),
@@ -64,4 +68,8 @@ const mutators = (rawClient) => ({
64
68
  rsvp: allpeepPayloadEndpoint(rawClient, '/posts/:id/rsvp', 'post'),
65
69
  rsvpManage: allpeepPayloadEndpoint(rawClient, '/posts/:id/rsvp/:profileId', 'post'),
66
70
  });
67
- export const posts = (rawClient) => (Object.assign(Object.assign(Object.assign({}, finders(rawClient)), mutators(rawClient)), feeds(rawClient)));
71
+ export const posts = (rawClient) => ({
72
+ ...finders(rawClient),
73
+ ...mutators(rawClient),
74
+ ...feeds(rawClient),
75
+ });