@mazmo/sdk 3.0.0 → 4.0.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/README.md CHANGED
@@ -52,4 +52,4 @@ Each release says, at the end of this page, which version of the API it was buil
52
52
 
53
53
  The reference of every endpoint is at [docs.mazmo.net](https://docs.mazmo.net).
54
54
 
55
- Built against version 7.7.82 of the Mazmo API.
55
+ Built against version 7.7.87 of the Mazmo API.
package/dist/index.cjs CHANGED
@@ -302,6 +302,7 @@ var routes = {
302
302
  listBlocks: { method: "GET", path: "/users/blocks" },
303
303
  listFollowLists: { method: "GET", path: "/users/followlists" },
304
304
  listMyOrgPointsLedger: { method: "GET", path: "/users/orgpoints/ledger" },
305
+ listOrganizationWebhookDeliveries: { method: "GET", path: "/users/:username/webhookdeliveries" },
305
306
  listOrgPointsHolders: { method: "GET", path: "/users/orgpoints/users" },
306
307
  listReports: { method: "GET", path: "/users/reports" },
307
308
  listSavedSearches: { method: "GET", path: "/users/saved-searches" },
@@ -323,6 +324,7 @@ var routes = {
323
324
  searchAdvancedUsers: { method: "GET", path: "/users/advanced-search" },
324
325
  searchUsers: { method: "GET", path: "/users/search/:query" },
325
326
  sortTags: { method: "PUT", path: "/users/tags/sort" },
327
+ testOrganizationWebhook: { method: "POST", path: "/users/organizationwebhooks/test" },
326
328
  transferOrgPoints: { method: "POST", path: "/users/orgpoints/transfer" },
327
329
  updateAvatar: { method: "PUT", path: "/users/avatar" },
328
330
  updateCover: { method: "PUT", path: "/users/cover" },
package/dist/index.d.cts CHANGED
@@ -64,7 +64,7 @@ interface AdminCoupon {
64
64
  createdAt: string;
65
65
  updatedAt: string;
66
66
  }
67
- type Alert = CommunityInviteCreatedAlert | ReactionReplyCreatedAlert | ReactionThreadCreatedAlert | FollowCreatedAlert | KnowCreatedAlert | KnowBannedAlert | CommentCreatedAlert | ReactionCommentCreatedAlert | ReactionPublicationCreatedAlert | RelationshipRequestedAlert | RelationshipApprovedAlert | RelationshipRejectedAlert | RelationshipRemovedAlert | SadesAssignmentAlert | SadesTransactionAlert | MessengerApprovedAlert | MessengerRequestedAlert | ChatChannelDeletedAlert | ChannelInvitationCreatedAlert | FeedPublicationReactedAlert | FeedCommentReactedAlert | FeedCommentCreatedAlert | FeedPublicationMentionAlert | FeedPublicationModeratedAlert | CommunitiesThreadMentionAlert | FeedPublicationVoteAlert | RsvpBannedAlert | RsvpCreatedAlert | BankTransactionCreatedAlert | ChatRequestsRefilledAlert | ThreadAwardedAlert | ReplyAwardedAlert | PublicationSingleUnlockedAlert | PublicationCrowdUnlockedAlert | TagExpiredAlert | EventInviteAlert | EnrollmentApprovedAlert | TagsGiftedAlert | OrgPointsTransferredAlert | VideoProcessingCompleteAlert | VideoProcessingFailedAlert | BugReportRejectedAlert | BugReportResolvedAlert | ChatterScoreStateChangedAlert | AnnouncementAlert | SubscriptionRenewalFailedAlert | OrgWebhookPausedAlert;
67
+ type Alert = CommunityInviteCreatedAlert | ReactionReplyCreatedAlert | ReactionThreadCreatedAlert | FollowCreatedAlert | KnowCreatedAlert | KnowBannedAlert | CommentCreatedAlert | ReactionCommentCreatedAlert | ReactionPublicationCreatedAlert | RelationshipRequestedAlert | RelationshipApprovedAlert | RelationshipRejectedAlert | RelationshipRemovedAlert | SadesAssignmentAlert | SadesTransactionAlert | MessengerApprovedAlert | MessengerRequestedAlert | ChatChannelDeletedAlert | ChannelInvitationCreatedAlert | FeedPublicationReactedAlert | FeedCommentReactedAlert | FeedCommentCreatedAlert | FeedPublicationMentionAlert | FeedPublicationModeratedAlert | CommunitiesThreadMentionAlert | FeedPublicationVoteAlert | RsvpBannedAlert | RsvpCreatedAlert | BankTransactionCreatedAlert | ChatRequestsRefilledAlert | ThreadAwardedAlert | ReplyAwardedAlert | PublicationSingleUnlockedAlert | PublicationCrowdUnlockedAlert | TagExpiredAlert | EventInviteAlert | EnrollmentApprovedAlert | TagsGiftedAlert | OrgPointsTransferredAlert | VideoProcessingCompleteAlert | VideoProcessingFailedAlert | BugReportRejectedAlert | BugReportResolvedAlert | ChatterScoreStateChangedAlert | AnnouncementAlert | SubscriptionRenewalFailedAlert | OrgWebhookPausedAlert | MercadopagoDisconnectedAlert;
68
68
  interface AlertComment {
69
69
  id: string;
70
70
  content?: string;
@@ -1350,6 +1350,18 @@ interface Membership {
1350
1350
  createdAt: string;
1351
1351
  updatedAt: string;
1352
1352
  }
1353
+ /**
1354
+ * The MercadoPago account linked to the account stopped working and has to be linked again to receive payments.
1355
+ */
1356
+ interface MercadopagoDisconnectedAlert {
1357
+ id: string;
1358
+ type: "MERCADOPAGO_DISCONNECTED";
1359
+ payload: Record<string, never>;
1360
+ userId: number;
1361
+ read: boolean;
1362
+ createdAt: string;
1363
+ updatedAt: string;
1364
+ }
1353
1365
  interface Messenger {
1354
1366
  id: string;
1355
1367
  participants: MessengerParticipant[];
@@ -1459,6 +1471,49 @@ interface Order {
1459
1471
  createdAt: string;
1460
1472
  updatedAt: string;
1461
1473
  }
1474
+ interface OrganizationWebhookDeliveries {
1475
+ deliveries: OrganizationWebhookDelivery[];
1476
+ }
1477
+ interface OrganizationWebhookDelivery {
1478
+ id: string;
1479
+ event: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
1480
+ /**
1481
+ * The URL the event was sent to.
1482
+ */
1483
+ url: string;
1484
+ /**
1485
+ * When the last attempt was sent.
1486
+ */
1487
+ sentAt: string;
1488
+ /**
1489
+ * How many attempts it took, the last one included.
1490
+ */
1491
+ attempts: number;
1492
+ /**
1493
+ * Whether the URL answered a 2xx status.
1494
+ */
1495
+ delivered: boolean;
1496
+ /**
1497
+ * The HTTP status the URL answered on the last attempt, or null when it answered none.
1498
+ */
1499
+ status: number | null;
1500
+ /**
1501
+ * Why the last attempt got no response: `timeout` when the URL answered nothing in time, `refused` when it refused the connection, `dns` when its host does not resolve, `not-public` when it points to an address that is not public, `connection` when it could not be reached otherwise. Null when it answered a status.
1502
+ */
1503
+ error: "timeout" | "refused" | "dns" | "not-public" | "connection" | null;
1504
+ /**
1505
+ * How long the last attempt took, in milliseconds.
1506
+ */
1507
+ durationMs: number;
1508
+ /**
1509
+ * The first 500 characters of the body the URL answered, or null when it answered none.
1510
+ */
1511
+ response: string | null;
1512
+ /**
1513
+ * Whether it was a test delivery, requested by the organization, with made-up data.
1514
+ */
1515
+ test: boolean;
1516
+ }
1462
1517
  interface OrganizationWebhookError {
1463
1518
  /**
1464
1519
  * `status` when the URL answered an error status, `timeout` when it answered nothing in time, `connection` when it could not be reached.
@@ -6470,6 +6525,26 @@ interface UsersListMyOrgPointsLedger {
6470
6525
  };
6471
6526
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
6472
6527
  }
6528
+ /**
6529
+ * GET /users/:username/webhookdeliveries
6530
+ *
6531
+ * List the webhook deliveries
6532
+ */
6533
+ interface UsersListOrganizationWebhookDeliveries {
6534
+ request: {
6535
+ params: {
6536
+ username: string;
6537
+ };
6538
+ query?: {
6539
+ /**
6540
+ * Only the deliveries of this event. Leaving it out answers those of every event.
6541
+ */
6542
+ event?: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
6543
+ };
6544
+ };
6545
+ response: OrganizationWebhookDeliveries;
6546
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ORGANIZATION">;
6547
+ }
6473
6548
  /**
6474
6549
  * GET /users/orgpoints/users
6475
6550
  *
@@ -7121,6 +7196,20 @@ interface UsersSortTags {
7121
7196
  }) | HiddenUser | ClosedUser;
7122
7197
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"INVALID_PARAMS">;
7123
7198
  }
7199
+ /**
7200
+ * POST /users/organizationwebhooks/test
7201
+ *
7202
+ * Send a test delivery to a webhook
7203
+ */
7204
+ interface UsersTestOrganizationWebhook {
7205
+ request: {
7206
+ body: {
7207
+ event: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
7208
+ };
7209
+ };
7210
+ response: OrganizationWebhookDelivery;
7211
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ORGANIZATION">;
7212
+ }
7124
7213
  /**
7125
7214
  * POST /users/orgpoints/transfer
7126
7215
  *
@@ -8384,6 +8473,7 @@ type Endpoints = {
8384
8473
  listBlocks: UsersListBlocks;
8385
8474
  listFollowLists: UsersListFollowLists;
8386
8475
  listMyOrgPointsLedger: UsersListMyOrgPointsLedger;
8476
+ listOrganizationWebhookDeliveries: UsersListOrganizationWebhookDeliveries;
8387
8477
  listOrgPointsHolders: UsersListOrgPointsHolders;
8388
8478
  listReports: UsersListReports;
8389
8479
  listSavedSearches: UsersListSavedSearches;
@@ -8405,6 +8495,7 @@ type Endpoints = {
8405
8495
  searchAdvancedUsers: UsersSearchAdvancedUsers;
8406
8496
  searchUsers: UsersSearchUsers;
8407
8497
  sortTags: UsersSortTags;
8498
+ testOrganizationWebhook: UsersTestOrganizationWebhook;
8408
8499
  transferOrgPoints: UsersTransferOrgPoints;
8409
8500
  updateAvatar: UsersUpdateAvatar;
8410
8501
  updateCover: UsersUpdateCover;
package/dist/index.d.ts CHANGED
@@ -64,7 +64,7 @@ interface AdminCoupon {
64
64
  createdAt: string;
65
65
  updatedAt: string;
66
66
  }
67
- type Alert = CommunityInviteCreatedAlert | ReactionReplyCreatedAlert | ReactionThreadCreatedAlert | FollowCreatedAlert | KnowCreatedAlert | KnowBannedAlert | CommentCreatedAlert | ReactionCommentCreatedAlert | ReactionPublicationCreatedAlert | RelationshipRequestedAlert | RelationshipApprovedAlert | RelationshipRejectedAlert | RelationshipRemovedAlert | SadesAssignmentAlert | SadesTransactionAlert | MessengerApprovedAlert | MessengerRequestedAlert | ChatChannelDeletedAlert | ChannelInvitationCreatedAlert | FeedPublicationReactedAlert | FeedCommentReactedAlert | FeedCommentCreatedAlert | FeedPublicationMentionAlert | FeedPublicationModeratedAlert | CommunitiesThreadMentionAlert | FeedPublicationVoteAlert | RsvpBannedAlert | RsvpCreatedAlert | BankTransactionCreatedAlert | ChatRequestsRefilledAlert | ThreadAwardedAlert | ReplyAwardedAlert | PublicationSingleUnlockedAlert | PublicationCrowdUnlockedAlert | TagExpiredAlert | EventInviteAlert | EnrollmentApprovedAlert | TagsGiftedAlert | OrgPointsTransferredAlert | VideoProcessingCompleteAlert | VideoProcessingFailedAlert | BugReportRejectedAlert | BugReportResolvedAlert | ChatterScoreStateChangedAlert | AnnouncementAlert | SubscriptionRenewalFailedAlert | OrgWebhookPausedAlert;
67
+ type Alert = CommunityInviteCreatedAlert | ReactionReplyCreatedAlert | ReactionThreadCreatedAlert | FollowCreatedAlert | KnowCreatedAlert | KnowBannedAlert | CommentCreatedAlert | ReactionCommentCreatedAlert | ReactionPublicationCreatedAlert | RelationshipRequestedAlert | RelationshipApprovedAlert | RelationshipRejectedAlert | RelationshipRemovedAlert | SadesAssignmentAlert | SadesTransactionAlert | MessengerApprovedAlert | MessengerRequestedAlert | ChatChannelDeletedAlert | ChannelInvitationCreatedAlert | FeedPublicationReactedAlert | FeedCommentReactedAlert | FeedCommentCreatedAlert | FeedPublicationMentionAlert | FeedPublicationModeratedAlert | CommunitiesThreadMentionAlert | FeedPublicationVoteAlert | RsvpBannedAlert | RsvpCreatedAlert | BankTransactionCreatedAlert | ChatRequestsRefilledAlert | ThreadAwardedAlert | ReplyAwardedAlert | PublicationSingleUnlockedAlert | PublicationCrowdUnlockedAlert | TagExpiredAlert | EventInviteAlert | EnrollmentApprovedAlert | TagsGiftedAlert | OrgPointsTransferredAlert | VideoProcessingCompleteAlert | VideoProcessingFailedAlert | BugReportRejectedAlert | BugReportResolvedAlert | ChatterScoreStateChangedAlert | AnnouncementAlert | SubscriptionRenewalFailedAlert | OrgWebhookPausedAlert | MercadopagoDisconnectedAlert;
68
68
  interface AlertComment {
69
69
  id: string;
70
70
  content?: string;
@@ -1350,6 +1350,18 @@ interface Membership {
1350
1350
  createdAt: string;
1351
1351
  updatedAt: string;
1352
1352
  }
1353
+ /**
1354
+ * The MercadoPago account linked to the account stopped working and has to be linked again to receive payments.
1355
+ */
1356
+ interface MercadopagoDisconnectedAlert {
1357
+ id: string;
1358
+ type: "MERCADOPAGO_DISCONNECTED";
1359
+ payload: Record<string, never>;
1360
+ userId: number;
1361
+ read: boolean;
1362
+ createdAt: string;
1363
+ updatedAt: string;
1364
+ }
1353
1365
  interface Messenger {
1354
1366
  id: string;
1355
1367
  participants: MessengerParticipant[];
@@ -1459,6 +1471,49 @@ interface Order {
1459
1471
  createdAt: string;
1460
1472
  updatedAt: string;
1461
1473
  }
1474
+ interface OrganizationWebhookDeliveries {
1475
+ deliveries: OrganizationWebhookDelivery[];
1476
+ }
1477
+ interface OrganizationWebhookDelivery {
1478
+ id: string;
1479
+ event: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
1480
+ /**
1481
+ * The URL the event was sent to.
1482
+ */
1483
+ url: string;
1484
+ /**
1485
+ * When the last attempt was sent.
1486
+ */
1487
+ sentAt: string;
1488
+ /**
1489
+ * How many attempts it took, the last one included.
1490
+ */
1491
+ attempts: number;
1492
+ /**
1493
+ * Whether the URL answered a 2xx status.
1494
+ */
1495
+ delivered: boolean;
1496
+ /**
1497
+ * The HTTP status the URL answered on the last attempt, or null when it answered none.
1498
+ */
1499
+ status: number | null;
1500
+ /**
1501
+ * Why the last attempt got no response: `timeout` when the URL answered nothing in time, `refused` when it refused the connection, `dns` when its host does not resolve, `not-public` when it points to an address that is not public, `connection` when it could not be reached otherwise. Null when it answered a status.
1502
+ */
1503
+ error: "timeout" | "refused" | "dns" | "not-public" | "connection" | null;
1504
+ /**
1505
+ * How long the last attempt took, in milliseconds.
1506
+ */
1507
+ durationMs: number;
1508
+ /**
1509
+ * The first 500 characters of the body the URL answered, or null when it answered none.
1510
+ */
1511
+ response: string | null;
1512
+ /**
1513
+ * Whether it was a test delivery, requested by the organization, with made-up data.
1514
+ */
1515
+ test: boolean;
1516
+ }
1462
1517
  interface OrganizationWebhookError {
1463
1518
  /**
1464
1519
  * `status` when the URL answered an error status, `timeout` when it answered nothing in time, `connection` when it could not be reached.
@@ -6470,6 +6525,26 @@ interface UsersListMyOrgPointsLedger {
6470
6525
  };
6471
6526
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
6472
6527
  }
6528
+ /**
6529
+ * GET /users/:username/webhookdeliveries
6530
+ *
6531
+ * List the webhook deliveries
6532
+ */
6533
+ interface UsersListOrganizationWebhookDeliveries {
6534
+ request: {
6535
+ params: {
6536
+ username: string;
6537
+ };
6538
+ query?: {
6539
+ /**
6540
+ * Only the deliveries of this event. Leaving it out answers those of every event.
6541
+ */
6542
+ event?: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
6543
+ };
6544
+ };
6545
+ response: OrganizationWebhookDeliveries;
6546
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ORGANIZATION">;
6547
+ }
6473
6548
  /**
6474
6549
  * GET /users/orgpoints/users
6475
6550
  *
@@ -7121,6 +7196,20 @@ interface UsersSortTags {
7121
7196
  }) | HiddenUser | ClosedUser;
7122
7197
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"INVALID_PARAMS">;
7123
7198
  }
7199
+ /**
7200
+ * POST /users/organizationwebhooks/test
7201
+ *
7202
+ * Send a test delivery to a webhook
7203
+ */
7204
+ interface UsersTestOrganizationWebhook {
7205
+ request: {
7206
+ body: {
7207
+ event: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
7208
+ };
7209
+ };
7210
+ response: OrganizationWebhookDelivery;
7211
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ORGANIZATION">;
7212
+ }
7124
7213
  /**
7125
7214
  * POST /users/orgpoints/transfer
7126
7215
  *
@@ -8384,6 +8473,7 @@ type Endpoints = {
8384
8473
  listBlocks: UsersListBlocks;
8385
8474
  listFollowLists: UsersListFollowLists;
8386
8475
  listMyOrgPointsLedger: UsersListMyOrgPointsLedger;
8476
+ listOrganizationWebhookDeliveries: UsersListOrganizationWebhookDeliveries;
8387
8477
  listOrgPointsHolders: UsersListOrgPointsHolders;
8388
8478
  listReports: UsersListReports;
8389
8479
  listSavedSearches: UsersListSavedSearches;
@@ -8405,6 +8495,7 @@ type Endpoints = {
8405
8495
  searchAdvancedUsers: UsersSearchAdvancedUsers;
8406
8496
  searchUsers: UsersSearchUsers;
8407
8497
  sortTags: UsersSortTags;
8498
+ testOrganizationWebhook: UsersTestOrganizationWebhook;
8408
8499
  transferOrgPoints: UsersTransferOrgPoints;
8409
8500
  updateAvatar: UsersUpdateAvatar;
8410
8501
  updateCover: UsersUpdateCover;
package/dist/index.js CHANGED
@@ -300,6 +300,7 @@ var routes = {
300
300
  listBlocks: { method: "GET", path: "/users/blocks" },
301
301
  listFollowLists: { method: "GET", path: "/users/followlists" },
302
302
  listMyOrgPointsLedger: { method: "GET", path: "/users/orgpoints/ledger" },
303
+ listOrganizationWebhookDeliveries: { method: "GET", path: "/users/:username/webhookdeliveries" },
303
304
  listOrgPointsHolders: { method: "GET", path: "/users/orgpoints/users" },
304
305
  listReports: { method: "GET", path: "/users/reports" },
305
306
  listSavedSearches: { method: "GET", path: "/users/saved-searches" },
@@ -321,6 +322,7 @@ var routes = {
321
322
  searchAdvancedUsers: { method: "GET", path: "/users/advanced-search" },
322
323
  searchUsers: { method: "GET", path: "/users/search/:query" },
323
324
  sortTags: { method: "PUT", path: "/users/tags/sort" },
325
+ testOrganizationWebhook: { method: "POST", path: "/users/organizationwebhooks/test" },
324
326
  transferOrgPoints: { method: "POST", path: "/users/orgpoints/transfer" },
325
327
  updateAvatar: { method: "PUT", path: "/users/avatar" },
326
328
  updateCover: { method: "PUT", path: "/users/cover" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mazmo/sdk",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Typed client for the Mazmo API",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.mazmo.net",
@@ -33,7 +33,7 @@
33
33
  "node": ">=18"
34
34
  },
35
35
  "mazmo": {
36
- "commit": "5620500a62562867e30e0dfb18a6dbe2c1ea1384",
37
- "apiVersion": "7.7.82"
36
+ "commit": "554e9a6a719d1ed225aa3b85a6ac2e2dbfd380dd",
37
+ "apiVersion": "7.7.87"
38
38
  }
39
39
  }