@mazmo/sdk 1.0.1 → 3.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.63 of the Mazmo API.
55
+ Built against version 7.7.82 of the Mazmo API.
package/dist/index.cjs CHANGED
@@ -316,6 +316,7 @@ var routes = {
316
316
  renameDevice: { method: "PATCH", path: "/users/devices/:deviceId" },
317
317
  renameFollowList: { method: "PUT", path: "/users/followlists/:listId/name" },
318
318
  renameSavedSearch: { method: "PATCH", path: "/users/saved-searches/:id" },
319
+ resumeOrganizationWebhook: { method: "POST", path: "/users/organizationwebhooks/resume" },
319
320
  revokeOtherSessions: { method: "DELETE", path: "/users/sessions/others" },
320
321
  revokeSession: { method: "DELETE", path: "/users/sessions/:id" },
321
322
  rotateOrganizationWebhooksSecret: { method: "POST", path: "/users/organizationwebhooks/secret" },
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;
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;
68
68
  interface AlertComment {
69
69
  id: string;
70
70
  content?: string;
@@ -1459,8 +1459,22 @@ interface Order {
1459
1459
  createdAt: string;
1460
1460
  updatedAt: string;
1461
1461
  }
1462
+ interface OrganizationWebhookError {
1463
+ /**
1464
+ * `status` when the URL answered an error status, `timeout` when it answered nothing in time, `connection` when it could not be reached.
1465
+ */
1466
+ reason: "status" | "timeout" | "connection";
1467
+ /**
1468
+ * The HTTP status the URL answered, or null when it answered none.
1469
+ */
1470
+ status: number | null;
1471
+ }
1462
1472
  interface OrganizationWebhooks {
1463
1473
  hooks: Partial<Record<"channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban", string>>;
1474
+ /**
1475
+ * The events whose URL kept failing, which are not delivered until the webhook is resumed or its URL changes. An event that is delivered is not in it.
1476
+ */
1477
+ paused: Partial<Record<"channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban", PausedOrganizationWebhook>>;
1464
1478
  secret: string | null;
1465
1479
  }
1466
1480
  interface OrgPointsHolder {
@@ -1504,6 +1518,22 @@ interface OrgPointsTransferredAlert {
1504
1518
  createdAt: string;
1505
1519
  updatedAt: string;
1506
1520
  }
1521
+ /**
1522
+ * A webhook of the organization was paused because its URL kept failing.
1523
+ */
1524
+ interface OrgWebhookPausedAlert {
1525
+ id: string;
1526
+ type: "ORG_WEBHOOK_PAUSED";
1527
+ payload: {
1528
+ event: string;
1529
+ url: string;
1530
+ lastError: OrganizationWebhookError;
1531
+ };
1532
+ userId: number;
1533
+ read: boolean;
1534
+ createdAt: string;
1535
+ updatedAt: string;
1536
+ }
1507
1537
  interface OwnMembership {
1508
1538
  _id: string;
1509
1539
  id: string;
@@ -1543,6 +1573,10 @@ interface OwnMembership {
1543
1573
  createdAt: string;
1544
1574
  updatedAt: string;
1545
1575
  }
1576
+ interface PausedOrganizationWebhook {
1577
+ pausedAt: string;
1578
+ lastError: OrganizationWebhookError;
1579
+ }
1546
1580
  interface Place {
1547
1581
  id: string;
1548
1582
  name: string;
@@ -6171,7 +6205,7 @@ interface UsersCreateSubscription {
6171
6205
  request: {
6172
6206
  body: {
6173
6207
  planName: "BASIC" | "VELVET" | "LATEX" | "LEATHER";
6174
- provider: "mercadopago" | "paypal" | "gumroad";
6208
+ provider: "mercadopago" | "gumroad";
6175
6209
  email?: string;
6176
6210
  };
6177
6211
  };
@@ -6869,6 +6903,20 @@ interface UsersRenameSavedSearch {
6869
6903
  };
6870
6904
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"LOW_PLAN">;
6871
6905
  }
6906
+ /**
6907
+ * POST /users/organizationwebhooks/resume
6908
+ *
6909
+ * Resume a webhook
6910
+ */
6911
+ interface UsersResumeOrganizationWebhook {
6912
+ request: {
6913
+ body: {
6914
+ event: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
6915
+ };
6916
+ };
6917
+ response: OrganizationWebhooks;
6918
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ORGANIZATION">;
6919
+ }
6872
6920
  /**
6873
6921
  * DELETE /users/sessions/others
6874
6922
  *
@@ -8350,6 +8398,7 @@ type Endpoints = {
8350
8398
  renameDevice: UsersRenameDevice;
8351
8399
  renameFollowList: UsersRenameFollowList;
8352
8400
  renameSavedSearch: UsersRenameSavedSearch;
8401
+ resumeOrganizationWebhook: UsersResumeOrganizationWebhook;
8353
8402
  revokeOtherSessions: UsersRevokeOtherSessions;
8354
8403
  revokeSession: UsersRevokeSession;
8355
8404
  rotateOrganizationWebhooksSecret: UsersRotateOrganizationWebhooksSecret;
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;
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;
68
68
  interface AlertComment {
69
69
  id: string;
70
70
  content?: string;
@@ -1459,8 +1459,22 @@ interface Order {
1459
1459
  createdAt: string;
1460
1460
  updatedAt: string;
1461
1461
  }
1462
+ interface OrganizationWebhookError {
1463
+ /**
1464
+ * `status` when the URL answered an error status, `timeout` when it answered nothing in time, `connection` when it could not be reached.
1465
+ */
1466
+ reason: "status" | "timeout" | "connection";
1467
+ /**
1468
+ * The HTTP status the URL answered, or null when it answered none.
1469
+ */
1470
+ status: number | null;
1471
+ }
1462
1472
  interface OrganizationWebhooks {
1463
1473
  hooks: Partial<Record<"channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban", string>>;
1474
+ /**
1475
+ * The events whose URL kept failing, which are not delivered until the webhook is resumed or its URL changes. An event that is delivered is not in it.
1476
+ */
1477
+ paused: Partial<Record<"channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban", PausedOrganizationWebhook>>;
1464
1478
  secret: string | null;
1465
1479
  }
1466
1480
  interface OrgPointsHolder {
@@ -1504,6 +1518,22 @@ interface OrgPointsTransferredAlert {
1504
1518
  createdAt: string;
1505
1519
  updatedAt: string;
1506
1520
  }
1521
+ /**
1522
+ * A webhook of the organization was paused because its URL kept failing.
1523
+ */
1524
+ interface OrgWebhookPausedAlert {
1525
+ id: string;
1526
+ type: "ORG_WEBHOOK_PAUSED";
1527
+ payload: {
1528
+ event: string;
1529
+ url: string;
1530
+ lastError: OrganizationWebhookError;
1531
+ };
1532
+ userId: number;
1533
+ read: boolean;
1534
+ createdAt: string;
1535
+ updatedAt: string;
1536
+ }
1507
1537
  interface OwnMembership {
1508
1538
  _id: string;
1509
1539
  id: string;
@@ -1543,6 +1573,10 @@ interface OwnMembership {
1543
1573
  createdAt: string;
1544
1574
  updatedAt: string;
1545
1575
  }
1576
+ interface PausedOrganizationWebhook {
1577
+ pausedAt: string;
1578
+ lastError: OrganizationWebhookError;
1579
+ }
1546
1580
  interface Place {
1547
1581
  id: string;
1548
1582
  name: string;
@@ -6171,7 +6205,7 @@ interface UsersCreateSubscription {
6171
6205
  request: {
6172
6206
  body: {
6173
6207
  planName: "BASIC" | "VELVET" | "LATEX" | "LEATHER";
6174
- provider: "mercadopago" | "paypal" | "gumroad";
6208
+ provider: "mercadopago" | "gumroad";
6175
6209
  email?: string;
6176
6210
  };
6177
6211
  };
@@ -6869,6 +6903,20 @@ interface UsersRenameSavedSearch {
6869
6903
  };
6870
6904
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"LOW_PLAN">;
6871
6905
  }
6906
+ /**
6907
+ * POST /users/organizationwebhooks/resume
6908
+ *
6909
+ * Resume a webhook
6910
+ */
6911
+ interface UsersResumeOrganizationWebhook {
6912
+ request: {
6913
+ body: {
6914
+ event: "channel.message" | "channel.join" | "channel.part" | "channel.ban" | "channel.unban";
6915
+ };
6916
+ };
6917
+ response: OrganizationWebhooks;
6918
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ORGANIZATION">;
6919
+ }
6872
6920
  /**
6873
6921
  * DELETE /users/sessions/others
6874
6922
  *
@@ -8350,6 +8398,7 @@ type Endpoints = {
8350
8398
  renameDevice: UsersRenameDevice;
8351
8399
  renameFollowList: UsersRenameFollowList;
8352
8400
  renameSavedSearch: UsersRenameSavedSearch;
8401
+ resumeOrganizationWebhook: UsersResumeOrganizationWebhook;
8353
8402
  revokeOtherSessions: UsersRevokeOtherSessions;
8354
8403
  revokeSession: UsersRevokeSession;
8355
8404
  rotateOrganizationWebhooksSecret: UsersRotateOrganizationWebhooksSecret;
package/dist/index.js CHANGED
@@ -314,6 +314,7 @@ var routes = {
314
314
  renameDevice: { method: "PATCH", path: "/users/devices/:deviceId" },
315
315
  renameFollowList: { method: "PUT", path: "/users/followlists/:listId/name" },
316
316
  renameSavedSearch: { method: "PATCH", path: "/users/saved-searches/:id" },
317
+ resumeOrganizationWebhook: { method: "POST", path: "/users/organizationwebhooks/resume" },
317
318
  revokeOtherSessions: { method: "DELETE", path: "/users/sessions/others" },
318
319
  revokeSession: { method: "DELETE", path: "/users/sessions/:id" },
319
320
  rotateOrganizationWebhooksSecret: { method: "POST", path: "/users/organizationwebhooks/secret" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mazmo/sdk",
3
- "version": "1.0.1",
3
+ "version": "3.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": "a6d0721fe87f4b5f2099a14e5a3a7eed10f76613",
37
- "apiVersion": "7.7.63"
36
+ "commit": "5620500a62562867e30e0dfb18a6dbe2c1ea1384",
37
+ "apiVersion": "7.7.82"
38
38
  }
39
39
  }