@flamelink/sdk-users
Advanced tools
Comparing version 1.0.0-alpha.10 to 1.0.0-alpha.11
@@ -2122,15 +2122,26 @@ import flamelink from '@flamelink/sdk-app'; | ||
var uid = _a.uid, data = _a.data; | ||
if (!uid) { | ||
throw new FlamelinkError("Please provide the user's \"uid\""); | ||
} | ||
var payload = typeof data === 'object' | ||
? Object.assign({}, data, __assign({ _fl_meta_: { | ||
createdBy: getCurrentUser(context), | ||
createdDate: getTimestamp(context), | ||
docId: uid | ||
}, displayName: data.displayName || '', email: data.email || '', enabled: data.enabled || 'Yes', firstName: data.firstName || '', id: uid, lastName: data.lastName || '' }, (data.permissions | ||
? { permissions: api._getPermissionsRef(data.permissions) } | ||
: {}))) | ||
: data; | ||
return api.ref(uid).set(payload); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var payload; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
if (!uid) { | ||
throw new FlamelinkError("Please provide the user's \"uid\""); | ||
} | ||
payload = typeof data === 'object' | ||
? Object.assign({}, data, __assign({ _fl_meta_: { | ||
createdBy: getCurrentUser(context), | ||
createdDate: getTimestamp(context), | ||
docId: uid | ||
}, displayName: data.displayName || '', email: data.email || '', enabled: data.enabled || 'Yes', firstName: data.firstName || '', id: uid, lastName: data.lastName || '' }, (data.permissions | ||
? { permissions: api._getPermissionsRef(data.permissions) } | ||
: {}))) | ||
: data; | ||
return [4, api.ref(uid).set(payload)]; | ||
case 1: | ||
_b.sent(); | ||
return [2, payload]; | ||
} | ||
}); | ||
}); | ||
}, | ||
@@ -2164,3 +2175,5 @@ updateInDB: function (_a) { | ||
return [4, users[0].ref.update(payload)]; | ||
case 2: return [2, _b.sent()]; | ||
case 2: | ||
_b.sent(); | ||
return [2, payload]; | ||
} | ||
@@ -2167,0 +2180,0 @@ }); |
@@ -2126,15 +2126,26 @@ 'use strict'; | ||
var uid = _a.uid, data = _a.data; | ||
if (!uid) { | ||
throw new sdkUtils.FlamelinkError("Please provide the user's \"uid\""); | ||
} | ||
var payload = typeof data === 'object' | ||
? Object.assign({}, data, __assign({ _fl_meta_: { | ||
createdBy: sdkUtils.getCurrentUser(context), | ||
createdDate: sdkUtils.getTimestamp(context), | ||
docId: uid | ||
}, displayName: data.displayName || '', email: data.email || '', enabled: data.enabled || 'Yes', firstName: data.firstName || '', id: uid, lastName: data.lastName || '' }, (data.permissions | ||
? { permissions: api._getPermissionsRef(data.permissions) } | ||
: {}))) | ||
: data; | ||
return api.ref(uid).set(payload); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var payload; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
if (!uid) { | ||
throw new sdkUtils.FlamelinkError("Please provide the user's \"uid\""); | ||
} | ||
payload = typeof data === 'object' | ||
? Object.assign({}, data, __assign({ _fl_meta_: { | ||
createdBy: sdkUtils.getCurrentUser(context), | ||
createdDate: sdkUtils.getTimestamp(context), | ||
docId: uid | ||
}, displayName: data.displayName || '', email: data.email || '', enabled: data.enabled || 'Yes', firstName: data.firstName || '', id: uid, lastName: data.lastName || '' }, (data.permissions | ||
? { permissions: api._getPermissionsRef(data.permissions) } | ||
: {}))) | ||
: data; | ||
return [4, api.ref(uid).set(payload)]; | ||
case 1: | ||
_b.sent(); | ||
return [2, payload]; | ||
} | ||
}); | ||
}); | ||
}, | ||
@@ -2168,3 +2179,5 @@ updateInDB: function (_a) { | ||
return [4, users[0].ref.update(payload)]; | ||
case 2: return [2, _b.sent()]; | ||
case 2: | ||
_b.sent(); | ||
return [2, payload]; | ||
} | ||
@@ -2171,0 +2184,0 @@ }); |
@@ -2122,15 +2122,26 @@ import flamelink from '@flamelink/sdk-app'; | ||
var uid = _a.uid, data = _a.data; | ||
if (!uid) { | ||
throw new FlamelinkError("Please provide the user's \"uid\""); | ||
} | ||
var payload = typeof data === 'object' | ||
? Object.assign({}, data, __assign({ _fl_meta_: { | ||
createdBy: getCurrentUser(context), | ||
createdDate: getTimestamp(context), | ||
docId: uid | ||
}, displayName: data.displayName || '', email: data.email || '', enabled: data.enabled || 'Yes', firstName: data.firstName || '', id: uid, lastName: data.lastName || '' }, (data.permissions | ||
? { permissions: api._getPermissionsRef(data.permissions) } | ||
: {}))) | ||
: data; | ||
return api.ref(uid).set(payload); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var payload; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
if (!uid) { | ||
throw new FlamelinkError("Please provide the user's \"uid\""); | ||
} | ||
payload = typeof data === 'object' | ||
? Object.assign({}, data, __assign({ _fl_meta_: { | ||
createdBy: getCurrentUser(context), | ||
createdDate: getTimestamp(context), | ||
docId: uid | ||
}, displayName: data.displayName || '', email: data.email || '', enabled: data.enabled || 'Yes', firstName: data.firstName || '', id: uid, lastName: data.lastName || '' }, (data.permissions | ||
? { permissions: api._getPermissionsRef(data.permissions) } | ||
: {}))) | ||
: data; | ||
return [4, api.ref(uid).set(payload)]; | ||
case 1: | ||
_b.sent(); | ||
return [2, payload]; | ||
} | ||
}); | ||
}); | ||
}, | ||
@@ -2164,3 +2175,5 @@ updateInDB: function (_a) { | ||
return [4, users[0].ref.update(payload)]; | ||
case 2: return [2, _b.sent()]; | ||
case 2: | ||
_b.sent(); | ||
return [2, payload]; | ||
} | ||
@@ -2167,0 +2180,0 @@ }); |
{ | ||
"name": "@flamelink/sdk-users", | ||
"version": "1.0.0-alpha.10", | ||
"version": "1.0.0-alpha.11", | ||
"publishConfig": { | ||
@@ -40,3 +40,3 @@ "access": "public" | ||
}, | ||
"gitHead": "e011bd4e1a0dcb257597c1e6990e92cc4f6e693b" | ||
"gitHead": "ca9ad652cd3067b0b85e9f05004f9cfdca456b4c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
223658
6455