@fonoster/identity 0.22.4 → 0.22.7
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.
|
@@ -49,7 +49,9 @@ function createCreateApiKey(prisma) {
|
|
|
49
49
|
role,
|
|
50
50
|
accessKeyId: (0, generateAccessKeyId_1.generateAccessKeyId)(generateAccessKeyId_1.AccessKeyIdType.API_KEY),
|
|
51
51
|
accessKeySecret: (0, generateAccessKeySecret_1.generateAccessKeySecret)(),
|
|
52
|
-
|
|
52
|
+
// expiresAt arrives as epoch seconds (the wire field is int32, which
|
|
53
|
+
// can't hold epoch milliseconds).
|
|
54
|
+
expiresAt: expiresAt ? new Date(expiresAt * 1000) : null
|
|
53
55
|
}
|
|
54
56
|
});
|
|
55
57
|
callback(null, {
|
|
@@ -50,7 +50,11 @@ function createListApiKeys(prisma) {
|
|
|
50
50
|
skip: pageToken ? 1 : 0,
|
|
51
51
|
cursor: pageToken ? { ref: pageToken } : undefined
|
|
52
52
|
});
|
|
53
|
-
|
|
53
|
+
// The wire fields are int32, so timestamps travel as epoch seconds
|
|
54
|
+
// rather than the millisecond Date values Prisma returns.
|
|
55
|
+
const items = keys.map((key) => (Object.assign(Object.assign({}, key), { role: key.role, expiresAt: key.expiresAt
|
|
56
|
+
? Math.floor(key.expiresAt.getTime() / 1000)
|
|
57
|
+
: undefined, createdAt: Math.floor(key.createdAt.getTime() / 1000), updatedAt: Math.floor(key.updatedAt.getTime() / 1000) })));
|
|
54
58
|
const response = {
|
|
55
59
|
items,
|
|
56
60
|
nextPageToken: items.length < pageSize ? "" : (_a = items[items.length - 1]) === null || _a === void 0 ? void 0 : _a.ref
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/identity",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.7",
|
|
4
4
|
"description": "Identity service for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@fonoster/common": "^0.22.3",
|
|
27
27
|
"@fonoster/logger": "^0.22.0",
|
|
28
|
-
"@fonoster/types": "^0.22.
|
|
28
|
+
"@fonoster/types": "^0.22.7",
|
|
29
29
|
"@grpc/grpc-js": "~1.10.6",
|
|
30
30
|
"@prisma/client": "^6.8.2",
|
|
31
31
|
"express": "^5.0.1",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"@types/jsonwebtoken": "^9.0.6",
|
|
56
56
|
"prisma": "^6.8.2"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "af2404e51a423e45e59515282495ecdec27e0eed"
|
|
59
59
|
}
|