wabe 0.5.16 → 0.5.18

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/dist/index.d.ts CHANGED
@@ -1136,6 +1136,7 @@ export type CreatePaymentOptions = {
1136
1136
  createInvoice?: boolean;
1137
1137
  allowPromotionCode?: boolean;
1138
1138
  promotionCodeId?: string;
1139
+ couponCodeId?: string;
1139
1140
  };
1140
1141
  export type InitWebhookOptions = {
1141
1142
  webhookUrl: string;
package/dist/index.js CHANGED
@@ -62565,6 +62565,9 @@ var signInWithResolver = async (_, {
62565
62565
  var signUpWithResolver = async (_, {
62566
62566
  input
62567
62567
  }, context) => {
62568
+ const userSchema = context.wabe.config.schema?.classes?.find((classItem) => classItem.name === "User");
62569
+ if (userSchema?.permissions?.create?.requireAuthentication === true)
62570
+ throw new Error("Permission denied to create class User");
62568
62571
  const res = await context.wabe.controllers.database.createObject({
62569
62572
  className: "User",
62570
62573
  data: {
@@ -63480,7 +63483,6 @@ class Schema {
63480
63483
  requireAuthentication: true
63481
63484
  },
63482
63485
  create: {
63483
- authorizedRoles: [],
63484
63486
  requireAuthentication: false
63485
63487
  },
63486
63488
  read: {
@@ -75727,7 +75729,7 @@ class Wabe {
75727
75729
  const roleEnum = {
75728
75730
  name: "RoleEnum",
75729
75731
  values: roles.reduce((acc, currentRole) => {
75730
- acc[currentRole] = { value: currentRole };
75732
+ acc[currentRole] = currentRole;
75731
75733
  return acc;
75732
75734
  }, {})
75733
75735
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wabe",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
4
4
  "description": "Your backend in minutes not days",
5
5
  "homepage": "https://wabe.dev",
6
6
  "author": {