@crombolo/api-management 0.14.4 → 0.16.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crombolo/api-management",
3
- "version": "0.14.4",
3
+ "version": "0.16.0",
4
4
  "description": "Umbraco-compatible Management API handlers for crombolo.",
5
5
  "license": "MIT",
6
6
  "author": "Crombolo",
@@ -28,7 +28,7 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@crombolo/core": "0.14.4",
32
- "@crombolo/contracts": "0.14.4"
31
+ "@crombolo/core": "0.16.0",
32
+ "@crombolo/contracts": "0.16.0"
33
33
  }
34
34
  }
@@ -51,7 +51,8 @@ function readVariants(body: Record<string, unknown>) {
51
51
  }
52
52
 
53
53
  /**
54
- * A member save request. Create carries `password` and `memberType`; update
54
+ * A member save request. Create carries `memberType`, and `password` unless the
55
+ * member will only sign in through an identity provider (story 035); update
55
56
  * carries `newPassword` with `oldPassword` and neither of the other two, since
56
57
  * a member's type never changes.
57
58
  */
@@ -84,7 +85,6 @@ function missingFields(input: SaveMember, forCreate: boolean): string | undefine
84
85
  if (!input.username) return 'A username is required'
85
86
  if (input.variants.length === 0 || !input.variants[0]?.name) return 'A name is required'
86
87
  if (forCreate && !input.memberTypeKey) return 'A member type is required'
87
- if (forCreate && !input.password) return 'A password is required'
88
88
  return undefined
89
89
  }
90
90