@mazmo/sdk 4.0.0 → 5.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
@@ -45,11 +45,12 @@ The SDK follows semver, and a release says what changed in the API's public endp
45
45
 
46
46
  - **major**: an endpoint was removed, or changed in a way code written against the previous version may
47
47
  not handle;
48
- - **minor**: an endpoint or a field was added;
48
+ - **minor**: an endpoint, a field, or a value of an enum was added. Keep a `default` when you switch
49
+ over an enum the API answers, as you do over the error codes;
49
50
  - **patch**: the SDK itself changed, not the endpoints.
50
51
 
51
52
  Each release says, at the end of this page, which version of the API it was built against.
52
53
 
53
54
  The reference of every endpoint is at [docs.mazmo.net](https://docs.mazmo.net).
54
55
 
55
- Built against version 7.7.87 of the Mazmo API.
56
+ Built against version 7.7.97 of the Mazmo API.
package/dist/index.cjs CHANGED
@@ -82,7 +82,6 @@ var routes = {
82
82
  },
83
83
  bank: {
84
84
  acknowledgeCoupon: { method: "PUT", path: "/bank/coupons/:couponCode" },
85
- createOrder: { method: "POST", path: "/bank/orders" },
86
85
  createTransaction: { method: "POST", path: "/bank/transactions" },
87
86
  deleteCoupon: { method: "DELETE", path: "/bank/coupons/:couponId" },
88
87
  getCoupon: { method: "GET", path: "/bank/coupons/:couponCode" },
@@ -279,14 +278,11 @@ var routes = {
279
278
  addToFollowList: { method: "POST", path: "/users/followlists/:listId" },
280
279
  assignOrgPoints: { method: "POST", path: "/users/orgpoints/assign" },
281
280
  cancelMySubscription: { method: "DELETE", path: "/users/subscriptions" },
282
- cancelSubscription: { method: "DELETE", path: "/users/subscriptions/:subscriptionId" },
283
- connectMercadopago: { method: "POST", path: "/users/marketplace/mercadopago" },
284
281
  createBlock: { method: "POST", path: "/users/blocks" },
285
282
  createFollowList: { method: "POST", path: "/users/followlists" },
286
283
  createOrganizationSession: { method: "POST", path: "/users/organizations/session" },
287
284
  createReport: { method: "POST", path: "/users/reports" },
288
285
  createSavedSearch: { method: "POST", path: "/users/saved-searches" },
289
- createSubscription: { method: "POST", path: "/users/subscriptions" },
290
286
  deleteFollowList: { method: "DELETE", path: "/users/followlists/:listId" },
291
287
  deleteSavedSearch: { method: "DELETE", path: "/users/saved-searches/:id" },
292
288
  dismissSuggestion: { method: "DELETE", path: "/users/suggestions/:userId" },
package/dist/index.d.cts CHANGED
@@ -187,6 +187,10 @@ interface BankTransactionCreatedAlert {
187
187
  createdAt: string;
188
188
  updatedAt: string;
189
189
  }
190
+ interface BirthdateCorrection {
191
+ at: string;
192
+ reason: "underage-at-signup" | "import-placeholder";
193
+ }
190
194
  /**
191
195
  * A bug the account reported was rejected.
192
196
  */
@@ -1437,40 +1441,6 @@ interface Onboarding {
1437
1441
  emailConfirm: boolean;
1438
1442
  };
1439
1443
  }
1440
- interface Order {
1441
- id: string;
1442
- buyerId: number;
1443
- item: {
1444
- name: string;
1445
- data?: unknown;
1446
- };
1447
- completed: boolean;
1448
- mercadopago?: {
1449
- preference?: unknown;
1450
- };
1451
- paypal?: {
1452
- order?: unknown;
1453
- payments?: unknown[];
1454
- };
1455
- gumroad?: {
1456
- saleId?: string;
1457
- sale?: unknown;
1458
- };
1459
- coupon?: string | Coupon;
1460
- invoice?: {
1461
- items: Array<{
1462
- _id?: string;
1463
- id?: string;
1464
- name?: string;
1465
- total?: number;
1466
- }>;
1467
- subtotal?: number;
1468
- total?: number;
1469
- currency: "ARS" | "USD";
1470
- };
1471
- createdAt: string;
1472
- updatedAt: string;
1473
- }
1474
1444
  interface OrganizationWebhookDeliveries {
1475
1445
  deliveries: OrganizationWebhookDelivery[];
1476
1446
  }
@@ -2303,6 +2273,10 @@ interface SignedInUser {
2303
2273
  lastActivity: string | null;
2304
2274
  lastContentCreatorActivity: string | null;
2305
2275
  legal: LegalAcceptance;
2276
+ /**
2277
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
2278
+ */
2279
+ birthdateCorrection?: BirthdateCorrection;
2306
2280
  };
2307
2281
  canReportPublications: boolean;
2308
2282
  checklist: {
@@ -2914,23 +2888,6 @@ interface BankAcknowledgeCoupon {
2914
2888
  response: Coupon;
2915
2889
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
2916
2890
  }
2917
- /**
2918
- * POST /bank/orders
2919
- *
2920
- * Start a purchase
2921
- */
2922
- interface BankCreateOrder {
2923
- request: {
2924
- body: {
2925
- itemName: string;
2926
- itemData?: unknown;
2927
- paymentMethod: string;
2928
- coupon?: string;
2929
- };
2930
- };
2931
- response: Order;
2932
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"EVENT_STARTED"> | ApiErrorOf<"BANNED"> | ApiErrorOf<"RSVP_LIMIT_REACHED"> | ApiErrorOf<"ENROLLMENT_REQUIRED"> | ApiErrorOf<"ALREADY_RSVPD"> | ApiErrorOf<"MARKETPLACE_NOT_FOUND"> | ApiErrorOf<"IVALID_PAYMENT_METHOD"> | ApiErrorOf<"ITEM_NOT_FOUND"> | ApiErrorOf<"COUPON_DOESNT_EXIST"> | ApiErrorOf<"COUPON_ALREADY_USED"> | ApiErrorOf<"COUPON_EXPIRED">;
2933
- }
2934
2891
  /**
2935
2892
  * POST /bank/transactions
2936
2893
  *
@@ -5925,6 +5882,10 @@ interface UsersAddOrganizationAdmin {
5925
5882
  lastActivity: string | null;
5926
5883
  lastContentCreatorActivity: string | null;
5927
5884
  legal: LegalAcceptance;
5885
+ /**
5886
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
5887
+ */
5888
+ birthdateCorrection?: BirthdateCorrection;
5928
5889
  };
5929
5890
  canReportPublications: boolean;
5930
5891
  checklist: {
@@ -6044,6 +6005,10 @@ interface UsersAddTag {
6044
6005
  lastActivity: string | null;
6045
6006
  lastContentCreatorActivity: string | null;
6046
6007
  legal: LegalAcceptance;
6008
+ /**
6009
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
6010
+ */
6011
+ birthdateCorrection?: BirthdateCorrection;
6047
6012
  };
6048
6013
  canReportPublications: boolean;
6049
6014
  checklist: {
@@ -6143,38 +6108,6 @@ interface UsersCancelMySubscription {
6143
6108
  };
6144
6109
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ACTIVE_SUBSCRIPTION"> | ApiErrorOf<"CANCEL_ON_PROVIDER_SITE">;
6145
6110
  }
6146
- /**
6147
- * DELETE /users/subscriptions/:subscriptionId
6148
- *
6149
- * Drop a pending subscription
6150
- */
6151
- interface UsersCancelSubscription {
6152
- request: {
6153
- params: {
6154
- subscriptionId: string;
6155
- };
6156
- };
6157
- response: {
6158
- success: true;
6159
- result: string;
6160
- };
6161
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"INVALID_PARAMS"> | ApiErrorOf<"UNAUTHORIZED"> | ApiErrorOf<"NOT_ACTIVE_SUBSCRIPTION"> | ApiErrorOf<"CANCEL_ON_PROVIDER_SITE">;
6162
- }
6163
- /**
6164
- * POST /users/marketplace/mercadopago
6165
- *
6166
- * Connect Mercado Pago
6167
- */
6168
- interface UsersConnectMercadopago {
6169
- request: {
6170
- body: {
6171
- code: string;
6172
- redirectUri: string;
6173
- };
6174
- };
6175
- response: string;
6176
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
6177
- }
6178
6111
  /**
6179
6112
  * POST /users/blocks
6180
6113
  *
@@ -6251,56 +6184,6 @@ interface UsersCreateSavedSearch {
6251
6184
  };
6252
6185
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"LOW_PLAN"> | ApiErrorOf<"LIMIT_REACHED">;
6253
6186
  }
6254
- /**
6255
- * POST /users/subscriptions
6256
- *
6257
- * Subscribe to a membership
6258
- */
6259
- interface UsersCreateSubscription {
6260
- request: {
6261
- body: {
6262
- planName: "BASIC" | "VELVET" | "LATEX" | "LEATHER";
6263
- provider: "mercadopago" | "gumroad";
6264
- email?: string;
6265
- };
6266
- };
6267
- response: {
6268
- success: true;
6269
- result: string;
6270
- data: {
6271
- updated: boolean;
6272
- };
6273
- upserted: {
6274
- subscriptions: Record<string, {
6275
- id: string;
6276
- userId: string;
6277
- provider: "mercadopago" | "paypal" | "gumroad" | "complimentary";
6278
- providerSubscriptionId?: string;
6279
- providerSubscriptionInitPoint?: string;
6280
- status: "active" | "cancelled" | "paused" | "pending";
6281
- planName: "BASIC" | "VELVET" | "LATEX" | "LEATHER";
6282
- amount: number;
6283
- currency: "ARS" | "USD";
6284
- startedAt?: string;
6285
- cancelledAt?: string;
6286
- validUntil?: string;
6287
- nextPaymentDate?: string;
6288
- lastPaymentAt?: string;
6289
- renewalFailed: boolean;
6290
- manageUrl?: string;
6291
- payments: Array<{
6292
- id: string;
6293
- status?: "approved" | "failed" | "refunded";
6294
- currency?: "ARS" | "USD";
6295
- amount: number;
6296
- paidAt?: string;
6297
- providerPaymentId?: string;
6298
- }>;
6299
- }>;
6300
- };
6301
- };
6302
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"MERCADOPAGO_FOREIGN_PAYER"> | ApiErrorOf<"EMAIL_REQUIRED">;
6303
- }
6304
6187
  /**
6305
6188
  * DELETE /users/followlists/:listId
6306
6189
  *
@@ -6760,6 +6643,10 @@ interface UsersRemoveOrganizationAdmin {
6760
6643
  lastActivity: string | null;
6761
6644
  lastContentCreatorActivity: string | null;
6762
6645
  legal: LegalAcceptance;
6646
+ /**
6647
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
6648
+ */
6649
+ birthdateCorrection?: BirthdateCorrection;
6763
6650
  };
6764
6651
  canReportPublications: boolean;
6765
6652
  checklist: {
@@ -6893,6 +6780,10 @@ interface UsersRemoveTag {
6893
6780
  lastActivity: string | null;
6894
6781
  lastContentCreatorActivity: string | null;
6895
6782
  legal: LegalAcceptance;
6783
+ /**
6784
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
6785
+ */
6786
+ birthdateCorrection?: BirthdateCorrection;
6896
6787
  };
6897
6788
  canReportPublications: boolean;
6898
6789
  checklist: {
@@ -7169,6 +7060,10 @@ interface UsersSortTags {
7169
7060
  lastActivity: string | null;
7170
7061
  lastContentCreatorActivity: string | null;
7171
7062
  legal: LegalAcceptance;
7063
+ /**
7064
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7065
+ */
7066
+ birthdateCorrection?: BirthdateCorrection;
7172
7067
  };
7173
7068
  canReportPublications: boolean;
7174
7069
  checklist: {
@@ -7319,6 +7214,10 @@ interface UsersUpdateAvatar {
7319
7214
  lastActivity: string | null;
7320
7215
  lastContentCreatorActivity: string | null;
7321
7216
  legal: LegalAcceptance;
7217
+ /**
7218
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7219
+ */
7220
+ birthdateCorrection?: BirthdateCorrection;
7322
7221
  };
7323
7222
  canReportPublications: boolean;
7324
7223
  checklist: {
@@ -7434,6 +7333,10 @@ interface UsersUpdateCover {
7434
7333
  lastActivity: string | null;
7435
7334
  lastContentCreatorActivity: string | null;
7436
7335
  legal: LegalAcceptance;
7336
+ /**
7337
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7338
+ */
7339
+ birthdateCorrection?: BirthdateCorrection;
7437
7340
  };
7438
7341
  canReportPublications: boolean;
7439
7342
  checklist: {
@@ -7556,6 +7459,10 @@ interface UsersUpdateExcludeFromAdvancedSearch {
7556
7459
  lastActivity: string | null;
7557
7460
  lastContentCreatorActivity: string | null;
7558
7461
  legal: LegalAcceptance;
7462
+ /**
7463
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7464
+ */
7465
+ birthdateCorrection?: BirthdateCorrection;
7559
7466
  };
7560
7467
  canReportPublications: boolean;
7561
7468
  checklist: {
@@ -7677,6 +7584,10 @@ interface UsersUpdateFollowPublicationOnComment {
7677
7584
  lastActivity: string | null;
7678
7585
  lastContentCreatorActivity: string | null;
7679
7586
  legal: LegalAcceptance;
7587
+ /**
7588
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7589
+ */
7590
+ birthdateCorrection?: BirthdateCorrection;
7680
7591
  };
7681
7592
  canReportPublications: boolean;
7682
7593
  checklist: {
@@ -7817,6 +7728,10 @@ interface UsersUpdateMe {
7817
7728
  lastActivity: string | null;
7818
7729
  lastContentCreatorActivity: string | null;
7819
7730
  legal: LegalAcceptance;
7731
+ /**
7732
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7733
+ */
7734
+ birthdateCorrection?: BirthdateCorrection;
7820
7735
  };
7821
7736
  canReportPublications: boolean;
7822
7737
  checklist: {
@@ -7938,6 +7853,10 @@ interface UsersUpdateOrganization {
7938
7853
  lastActivity: string | null;
7939
7854
  lastContentCreatorActivity: string | null;
7940
7855
  legal: LegalAcceptance;
7856
+ /**
7857
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7858
+ */
7859
+ birthdateCorrection?: BirthdateCorrection;
7941
7860
  };
7942
7861
  canReportPublications: boolean;
7943
7862
  checklist: {
@@ -8100,6 +8019,10 @@ interface UsersUpdateProfile {
8100
8019
  lastActivity: string | null;
8101
8020
  lastContentCreatorActivity: string | null;
8102
8021
  legal: LegalAcceptance;
8022
+ /**
8023
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
8024
+ */
8025
+ birthdateCorrection?: BirthdateCorrection;
8103
8026
  };
8104
8027
  canReportPublications: boolean;
8105
8028
  checklist: {
@@ -8125,7 +8048,7 @@ interface UsersUpdateProfile {
8125
8048
  initial: Onboarding;
8126
8049
  };
8127
8050
  }) | HiddenUser | ClosedUser;
8128
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
8051
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"INVALID_PARAMS"> | ApiErrorOf<"UNDERAGE_AT_SIGNUP">;
8129
8052
  }
8130
8053
  /**
8131
8054
  * PUT /users/starMode
@@ -8219,6 +8142,10 @@ interface UsersUpdateStarMode {
8219
8142
  lastActivity: string | null;
8220
8143
  lastContentCreatorActivity: string | null;
8221
8144
  legal: LegalAcceptance;
8145
+ /**
8146
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
8147
+ */
8148
+ birthdateCorrection?: BirthdateCorrection;
8222
8149
  };
8223
8150
  canReportPublications: boolean;
8224
8151
  checklist: {
@@ -8253,7 +8180,6 @@ type Endpoints = {
8253
8180
  };
8254
8181
  bank: {
8255
8182
  acknowledgeCoupon: BankAcknowledgeCoupon;
8256
- createOrder: BankCreateOrder;
8257
8183
  createTransaction: BankCreateTransaction;
8258
8184
  deleteCoupon: BankDeleteCoupon;
8259
8185
  getCoupon: BankGetCoupon;
@@ -8450,14 +8376,11 @@ type Endpoints = {
8450
8376
  addToFollowList: UsersAddToFollowList;
8451
8377
  assignOrgPoints: UsersAssignOrgPoints;
8452
8378
  cancelMySubscription: UsersCancelMySubscription;
8453
- cancelSubscription: UsersCancelSubscription;
8454
- connectMercadopago: UsersConnectMercadopago;
8455
8379
  createBlock: UsersCreateBlock;
8456
8380
  createFollowList: UsersCreateFollowList;
8457
8381
  createOrganizationSession: UsersCreateOrganizationSession;
8458
8382
  createReport: UsersCreateReport;
8459
8383
  createSavedSearch: UsersCreateSavedSearch;
8460
- createSubscription: UsersCreateSubscription;
8461
8384
  deleteFollowList: UsersDeleteFollowList;
8462
8385
  deleteSavedSearch: UsersDeleteSavedSearch;
8463
8386
  dismissSuggestion: UsersDismissSuggestion;
package/dist/index.d.ts CHANGED
@@ -187,6 +187,10 @@ interface BankTransactionCreatedAlert {
187
187
  createdAt: string;
188
188
  updatedAt: string;
189
189
  }
190
+ interface BirthdateCorrection {
191
+ at: string;
192
+ reason: "underage-at-signup" | "import-placeholder";
193
+ }
190
194
  /**
191
195
  * A bug the account reported was rejected.
192
196
  */
@@ -1437,40 +1441,6 @@ interface Onboarding {
1437
1441
  emailConfirm: boolean;
1438
1442
  };
1439
1443
  }
1440
- interface Order {
1441
- id: string;
1442
- buyerId: number;
1443
- item: {
1444
- name: string;
1445
- data?: unknown;
1446
- };
1447
- completed: boolean;
1448
- mercadopago?: {
1449
- preference?: unknown;
1450
- };
1451
- paypal?: {
1452
- order?: unknown;
1453
- payments?: unknown[];
1454
- };
1455
- gumroad?: {
1456
- saleId?: string;
1457
- sale?: unknown;
1458
- };
1459
- coupon?: string | Coupon;
1460
- invoice?: {
1461
- items: Array<{
1462
- _id?: string;
1463
- id?: string;
1464
- name?: string;
1465
- total?: number;
1466
- }>;
1467
- subtotal?: number;
1468
- total?: number;
1469
- currency: "ARS" | "USD";
1470
- };
1471
- createdAt: string;
1472
- updatedAt: string;
1473
- }
1474
1444
  interface OrganizationWebhookDeliveries {
1475
1445
  deliveries: OrganizationWebhookDelivery[];
1476
1446
  }
@@ -2303,6 +2273,10 @@ interface SignedInUser {
2303
2273
  lastActivity: string | null;
2304
2274
  lastContentCreatorActivity: string | null;
2305
2275
  legal: LegalAcceptance;
2276
+ /**
2277
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
2278
+ */
2279
+ birthdateCorrection?: BirthdateCorrection;
2306
2280
  };
2307
2281
  canReportPublications: boolean;
2308
2282
  checklist: {
@@ -2914,23 +2888,6 @@ interface BankAcknowledgeCoupon {
2914
2888
  response: Coupon;
2915
2889
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
2916
2890
  }
2917
- /**
2918
- * POST /bank/orders
2919
- *
2920
- * Start a purchase
2921
- */
2922
- interface BankCreateOrder {
2923
- request: {
2924
- body: {
2925
- itemName: string;
2926
- itemData?: unknown;
2927
- paymentMethod: string;
2928
- coupon?: string;
2929
- };
2930
- };
2931
- response: Order;
2932
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"EVENT_STARTED"> | ApiErrorOf<"BANNED"> | ApiErrorOf<"RSVP_LIMIT_REACHED"> | ApiErrorOf<"ENROLLMENT_REQUIRED"> | ApiErrorOf<"ALREADY_RSVPD"> | ApiErrorOf<"MARKETPLACE_NOT_FOUND"> | ApiErrorOf<"IVALID_PAYMENT_METHOD"> | ApiErrorOf<"ITEM_NOT_FOUND"> | ApiErrorOf<"COUPON_DOESNT_EXIST"> | ApiErrorOf<"COUPON_ALREADY_USED"> | ApiErrorOf<"COUPON_EXPIRED">;
2933
- }
2934
2891
  /**
2935
2892
  * POST /bank/transactions
2936
2893
  *
@@ -5925,6 +5882,10 @@ interface UsersAddOrganizationAdmin {
5925
5882
  lastActivity: string | null;
5926
5883
  lastContentCreatorActivity: string | null;
5927
5884
  legal: LegalAcceptance;
5885
+ /**
5886
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
5887
+ */
5888
+ birthdateCorrection?: BirthdateCorrection;
5928
5889
  };
5929
5890
  canReportPublications: boolean;
5930
5891
  checklist: {
@@ -6044,6 +6005,10 @@ interface UsersAddTag {
6044
6005
  lastActivity: string | null;
6045
6006
  lastContentCreatorActivity: string | null;
6046
6007
  legal: LegalAcceptance;
6008
+ /**
6009
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
6010
+ */
6011
+ birthdateCorrection?: BirthdateCorrection;
6047
6012
  };
6048
6013
  canReportPublications: boolean;
6049
6014
  checklist: {
@@ -6143,38 +6108,6 @@ interface UsersCancelMySubscription {
6143
6108
  };
6144
6109
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"NOT_ACTIVE_SUBSCRIPTION"> | ApiErrorOf<"CANCEL_ON_PROVIDER_SITE">;
6145
6110
  }
6146
- /**
6147
- * DELETE /users/subscriptions/:subscriptionId
6148
- *
6149
- * Drop a pending subscription
6150
- */
6151
- interface UsersCancelSubscription {
6152
- request: {
6153
- params: {
6154
- subscriptionId: string;
6155
- };
6156
- };
6157
- response: {
6158
- success: true;
6159
- result: string;
6160
- };
6161
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"INVALID_PARAMS"> | ApiErrorOf<"UNAUTHORIZED"> | ApiErrorOf<"NOT_ACTIVE_SUBSCRIPTION"> | ApiErrorOf<"CANCEL_ON_PROVIDER_SITE">;
6162
- }
6163
- /**
6164
- * POST /users/marketplace/mercadopago
6165
- *
6166
- * Connect Mercado Pago
6167
- */
6168
- interface UsersConnectMercadopago {
6169
- request: {
6170
- body: {
6171
- code: string;
6172
- redirectUri: string;
6173
- };
6174
- };
6175
- response: string;
6176
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
6177
- }
6178
6111
  /**
6179
6112
  * POST /users/blocks
6180
6113
  *
@@ -6251,56 +6184,6 @@ interface UsersCreateSavedSearch {
6251
6184
  };
6252
6185
  error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"LOW_PLAN"> | ApiErrorOf<"LIMIT_REACHED">;
6253
6186
  }
6254
- /**
6255
- * POST /users/subscriptions
6256
- *
6257
- * Subscribe to a membership
6258
- */
6259
- interface UsersCreateSubscription {
6260
- request: {
6261
- body: {
6262
- planName: "BASIC" | "VELVET" | "LATEX" | "LEATHER";
6263
- provider: "mercadopago" | "gumroad";
6264
- email?: string;
6265
- };
6266
- };
6267
- response: {
6268
- success: true;
6269
- result: string;
6270
- data: {
6271
- updated: boolean;
6272
- };
6273
- upserted: {
6274
- subscriptions: Record<string, {
6275
- id: string;
6276
- userId: string;
6277
- provider: "mercadopago" | "paypal" | "gumroad" | "complimentary";
6278
- providerSubscriptionId?: string;
6279
- providerSubscriptionInitPoint?: string;
6280
- status: "active" | "cancelled" | "paused" | "pending";
6281
- planName: "BASIC" | "VELVET" | "LATEX" | "LEATHER";
6282
- amount: number;
6283
- currency: "ARS" | "USD";
6284
- startedAt?: string;
6285
- cancelledAt?: string;
6286
- validUntil?: string;
6287
- nextPaymentDate?: string;
6288
- lastPaymentAt?: string;
6289
- renewalFailed: boolean;
6290
- manageUrl?: string;
6291
- payments: Array<{
6292
- id: string;
6293
- status?: "approved" | "failed" | "refunded";
6294
- currency?: "ARS" | "USD";
6295
- amount: number;
6296
- paidAt?: string;
6297
- providerPaymentId?: string;
6298
- }>;
6299
- }>;
6300
- };
6301
- };
6302
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"MERCADOPAGO_FOREIGN_PAYER"> | ApiErrorOf<"EMAIL_REQUIRED">;
6303
- }
6304
6187
  /**
6305
6188
  * DELETE /users/followlists/:listId
6306
6189
  *
@@ -6760,6 +6643,10 @@ interface UsersRemoveOrganizationAdmin {
6760
6643
  lastActivity: string | null;
6761
6644
  lastContentCreatorActivity: string | null;
6762
6645
  legal: LegalAcceptance;
6646
+ /**
6647
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
6648
+ */
6649
+ birthdateCorrection?: BirthdateCorrection;
6763
6650
  };
6764
6651
  canReportPublications: boolean;
6765
6652
  checklist: {
@@ -6893,6 +6780,10 @@ interface UsersRemoveTag {
6893
6780
  lastActivity: string | null;
6894
6781
  lastContentCreatorActivity: string | null;
6895
6782
  legal: LegalAcceptance;
6783
+ /**
6784
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
6785
+ */
6786
+ birthdateCorrection?: BirthdateCorrection;
6896
6787
  };
6897
6788
  canReportPublications: boolean;
6898
6789
  checklist: {
@@ -7169,6 +7060,10 @@ interface UsersSortTags {
7169
7060
  lastActivity: string | null;
7170
7061
  lastContentCreatorActivity: string | null;
7171
7062
  legal: LegalAcceptance;
7063
+ /**
7064
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7065
+ */
7066
+ birthdateCorrection?: BirthdateCorrection;
7172
7067
  };
7173
7068
  canReportPublications: boolean;
7174
7069
  checklist: {
@@ -7319,6 +7214,10 @@ interface UsersUpdateAvatar {
7319
7214
  lastActivity: string | null;
7320
7215
  lastContentCreatorActivity: string | null;
7321
7216
  legal: LegalAcceptance;
7217
+ /**
7218
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7219
+ */
7220
+ birthdateCorrection?: BirthdateCorrection;
7322
7221
  };
7323
7222
  canReportPublications: boolean;
7324
7223
  checklist: {
@@ -7434,6 +7333,10 @@ interface UsersUpdateCover {
7434
7333
  lastActivity: string | null;
7435
7334
  lastContentCreatorActivity: string | null;
7436
7335
  legal: LegalAcceptance;
7336
+ /**
7337
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7338
+ */
7339
+ birthdateCorrection?: BirthdateCorrection;
7437
7340
  };
7438
7341
  canReportPublications: boolean;
7439
7342
  checklist: {
@@ -7556,6 +7459,10 @@ interface UsersUpdateExcludeFromAdvancedSearch {
7556
7459
  lastActivity: string | null;
7557
7460
  lastContentCreatorActivity: string | null;
7558
7461
  legal: LegalAcceptance;
7462
+ /**
7463
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7464
+ */
7465
+ birthdateCorrection?: BirthdateCorrection;
7559
7466
  };
7560
7467
  canReportPublications: boolean;
7561
7468
  checklist: {
@@ -7677,6 +7584,10 @@ interface UsersUpdateFollowPublicationOnComment {
7677
7584
  lastActivity: string | null;
7678
7585
  lastContentCreatorActivity: string | null;
7679
7586
  legal: LegalAcceptance;
7587
+ /**
7588
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7589
+ */
7590
+ birthdateCorrection?: BirthdateCorrection;
7680
7591
  };
7681
7592
  canReportPublications: boolean;
7682
7593
  checklist: {
@@ -7817,6 +7728,10 @@ interface UsersUpdateMe {
7817
7728
  lastActivity: string | null;
7818
7729
  lastContentCreatorActivity: string | null;
7819
7730
  legal: LegalAcceptance;
7731
+ /**
7732
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7733
+ */
7734
+ birthdateCorrection?: BirthdateCorrection;
7820
7735
  };
7821
7736
  canReportPublications: boolean;
7822
7737
  checklist: {
@@ -7938,6 +7853,10 @@ interface UsersUpdateOrganization {
7938
7853
  lastActivity: string | null;
7939
7854
  lastContentCreatorActivity: string | null;
7940
7855
  legal: LegalAcceptance;
7856
+ /**
7857
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
7858
+ */
7859
+ birthdateCorrection?: BirthdateCorrection;
7941
7860
  };
7942
7861
  canReportPublications: boolean;
7943
7862
  checklist: {
@@ -8100,6 +8019,10 @@ interface UsersUpdateProfile {
8100
8019
  lastActivity: string | null;
8101
8020
  lastContentCreatorActivity: string | null;
8102
8021
  legal: LegalAcceptance;
8022
+ /**
8023
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
8024
+ */
8025
+ birthdateCorrection?: BirthdateCorrection;
8103
8026
  };
8104
8027
  canReportPublications: boolean;
8105
8028
  checklist: {
@@ -8125,7 +8048,7 @@ interface UsersUpdateProfile {
8125
8048
  initial: Onboarding;
8126
8049
  };
8127
8050
  }) | HiddenUser | ClosedUser;
8128
- error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR">;
8051
+ error: ApiErrorOf<"BAD_REQUEST" | "VALIDATION_FAILED" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "RATE_LIMITED" | "EMAIL_VERIFICATION_REQUIRED" | "INTERNAL_ERROR"> | ApiErrorOf<"INVALID_PARAMS"> | ApiErrorOf<"UNDERAGE_AT_SIGNUP">;
8129
8052
  }
8130
8053
  /**
8131
8054
  * PUT /users/starMode
@@ -8219,6 +8142,10 @@ interface UsersUpdateStarMode {
8219
8142
  lastActivity: string | null;
8220
8143
  lastContentCreatorActivity: string | null;
8221
8144
  legal: LegalAcceptance;
8145
+ /**
8146
+ * Present when Mazmo changed the birthdate of the account and the account has not acknowledged it yet: when, and why.
8147
+ */
8148
+ birthdateCorrection?: BirthdateCorrection;
8222
8149
  };
8223
8150
  canReportPublications: boolean;
8224
8151
  checklist: {
@@ -8253,7 +8180,6 @@ type Endpoints = {
8253
8180
  };
8254
8181
  bank: {
8255
8182
  acknowledgeCoupon: BankAcknowledgeCoupon;
8256
- createOrder: BankCreateOrder;
8257
8183
  createTransaction: BankCreateTransaction;
8258
8184
  deleteCoupon: BankDeleteCoupon;
8259
8185
  getCoupon: BankGetCoupon;
@@ -8450,14 +8376,11 @@ type Endpoints = {
8450
8376
  addToFollowList: UsersAddToFollowList;
8451
8377
  assignOrgPoints: UsersAssignOrgPoints;
8452
8378
  cancelMySubscription: UsersCancelMySubscription;
8453
- cancelSubscription: UsersCancelSubscription;
8454
- connectMercadopago: UsersConnectMercadopago;
8455
8379
  createBlock: UsersCreateBlock;
8456
8380
  createFollowList: UsersCreateFollowList;
8457
8381
  createOrganizationSession: UsersCreateOrganizationSession;
8458
8382
  createReport: UsersCreateReport;
8459
8383
  createSavedSearch: UsersCreateSavedSearch;
8460
- createSubscription: UsersCreateSubscription;
8461
8384
  deleteFollowList: UsersDeleteFollowList;
8462
8385
  deleteSavedSearch: UsersDeleteSavedSearch;
8463
8386
  dismissSuggestion: UsersDismissSuggestion;
package/dist/index.js CHANGED
@@ -80,7 +80,6 @@ var routes = {
80
80
  },
81
81
  bank: {
82
82
  acknowledgeCoupon: { method: "PUT", path: "/bank/coupons/:couponCode" },
83
- createOrder: { method: "POST", path: "/bank/orders" },
84
83
  createTransaction: { method: "POST", path: "/bank/transactions" },
85
84
  deleteCoupon: { method: "DELETE", path: "/bank/coupons/:couponId" },
86
85
  getCoupon: { method: "GET", path: "/bank/coupons/:couponCode" },
@@ -277,14 +276,11 @@ var routes = {
277
276
  addToFollowList: { method: "POST", path: "/users/followlists/:listId" },
278
277
  assignOrgPoints: { method: "POST", path: "/users/orgpoints/assign" },
279
278
  cancelMySubscription: { method: "DELETE", path: "/users/subscriptions" },
280
- cancelSubscription: { method: "DELETE", path: "/users/subscriptions/:subscriptionId" },
281
- connectMercadopago: { method: "POST", path: "/users/marketplace/mercadopago" },
282
279
  createBlock: { method: "POST", path: "/users/blocks" },
283
280
  createFollowList: { method: "POST", path: "/users/followlists" },
284
281
  createOrganizationSession: { method: "POST", path: "/users/organizations/session" },
285
282
  createReport: { method: "POST", path: "/users/reports" },
286
283
  createSavedSearch: { method: "POST", path: "/users/saved-searches" },
287
- createSubscription: { method: "POST", path: "/users/subscriptions" },
288
284
  deleteFollowList: { method: "DELETE", path: "/users/followlists/:listId" },
289
285
  deleteSavedSearch: { method: "DELETE", path: "/users/saved-searches/:id" },
290
286
  dismissSuggestion: { method: "DELETE", path: "/users/suggestions/:userId" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mazmo/sdk",
3
- "version": "4.0.0",
3
+ "version": "5.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": "554e9a6a719d1ed225aa3b85a6ac2e2dbfd380dd",
37
- "apiVersion": "7.7.87"
36
+ "commit": "53ee69223787f0d1b01b5438692665206360a93c",
37
+ "apiVersion": "7.7.97"
38
38
  }
39
39
  }