@oxy.so/contracts 6.16.0 → 6.17.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.
|
@@ -121,4 +121,11 @@ exports.IDENTITY_ERROR_CODES = {
|
|
|
121
121
|
* was this account's root (security review R6-5).
|
|
122
122
|
*/
|
|
123
123
|
keyNotProven: 'IDENTITY_KEY_NOT_PROVEN',
|
|
124
|
+
/**
|
|
125
|
+
* `POST /identity/backup`: the stored backup is one a key rotation
|
|
126
|
+
* superseded, and the upload did not acknowledge it with its locator
|
|
127
|
+
* (`replacesLookupId`, security review R7-2). It carries retired keys under
|
|
128
|
+
* the previous phrase, so it is never silently replaced.
|
|
129
|
+
*/
|
|
130
|
+
backupSuperseded: 'IDENTITY_BACKUP_SUPERSEDED',
|
|
124
131
|
};
|
package/dist/cjs/keyRecovery.js
CHANGED
|
@@ -104,6 +104,17 @@ exports.backupUploadRequestSchema = backupEnvelopeFields.extend({
|
|
|
104
104
|
* DB dump therefore cannot recompute a locator to enumerate backups.
|
|
105
105
|
*/
|
|
106
106
|
lookupId: exports.backupLookupIdSchema,
|
|
107
|
+
/**
|
|
108
|
+
* The raw locator of a SUPERSEDED backup this upload replaces (security
|
|
109
|
+
* review R7-2). A key rotation keeps the previous backup, marked superseded,
|
|
110
|
+
* because it carries the person's retired keys under the previous phrase; an
|
|
111
|
+
* upload replaces it only with this acknowledgement, which proves the client
|
|
112
|
+
* opened it (or carried its keys at the rotation): its sha256 must be the
|
|
113
|
+
* stored backup's. Without it, or with any other locator, an upload over a
|
|
114
|
+
* superseded backup is refused (409 `IDENTITY_BACKUP_SUPERSEDED`). Ignored
|
|
115
|
+
* when the stored backup is current or there is none.
|
|
116
|
+
*/
|
|
117
|
+
replacesLookupId: exports.backupLookupIdSchema.optional(),
|
|
107
118
|
});
|
|
108
119
|
/**
|
|
109
120
|
* Response of `GET /identity/backup/status` (and the write/delete acks): whether
|
|
@@ -112,6 +123,13 @@ exports.backupUploadRequestSchema = backupEnvelopeFields.extend({
|
|
|
112
123
|
*/
|
|
113
124
|
exports.backupStatusResponseSchema = zod_1.z.object({
|
|
114
125
|
exists: zod_1.z.boolean(),
|
|
126
|
+
/**
|
|
127
|
+
* `true` when the stored backup is one a key rotation SUPERSEDED (R6-8,
|
|
128
|
+
* R7-2): `exists` is `false` (the current key has no backup), and
|
|
129
|
+
* `publicKeyHint` / `createdAt` describe the superseded one. A new backup
|
|
130
|
+
* replaces it only with `replacesLookupId`. Absent otherwise.
|
|
131
|
+
*/
|
|
132
|
+
superseded: zod_1.z.boolean().optional(),
|
|
115
133
|
publicKeyHint: zod_1.z.string().optional(),
|
|
116
134
|
createdAt: zod_1.z.string().optional(),
|
|
117
135
|
});
|
|
@@ -116,4 +116,11 @@ export const IDENTITY_ERROR_CODES = {
|
|
|
116
116
|
* was this account's root (security review R6-5).
|
|
117
117
|
*/
|
|
118
118
|
keyNotProven: 'IDENTITY_KEY_NOT_PROVEN',
|
|
119
|
+
/**
|
|
120
|
+
* `POST /identity/backup`: the stored backup is one a key rotation
|
|
121
|
+
* superseded, and the upload did not acknowledge it with its locator
|
|
122
|
+
* (`replacesLookupId`, security review R7-2). It carries retired keys under
|
|
123
|
+
* the previous phrase, so it is never silently replaced.
|
|
124
|
+
*/
|
|
125
|
+
backupSuperseded: 'IDENTITY_BACKUP_SUPERSEDED',
|
|
119
126
|
};
|
package/dist/esm/keyRecovery.js
CHANGED
|
@@ -101,6 +101,17 @@ export const backupUploadRequestSchema = backupEnvelopeFields.extend({
|
|
|
101
101
|
* DB dump therefore cannot recompute a locator to enumerate backups.
|
|
102
102
|
*/
|
|
103
103
|
lookupId: backupLookupIdSchema,
|
|
104
|
+
/**
|
|
105
|
+
* The raw locator of a SUPERSEDED backup this upload replaces (security
|
|
106
|
+
* review R7-2). A key rotation keeps the previous backup, marked superseded,
|
|
107
|
+
* because it carries the person's retired keys under the previous phrase; an
|
|
108
|
+
* upload replaces it only with this acknowledgement, which proves the client
|
|
109
|
+
* opened it (or carried its keys at the rotation): its sha256 must be the
|
|
110
|
+
* stored backup's. Without it, or with any other locator, an upload over a
|
|
111
|
+
* superseded backup is refused (409 `IDENTITY_BACKUP_SUPERSEDED`). Ignored
|
|
112
|
+
* when the stored backup is current or there is none.
|
|
113
|
+
*/
|
|
114
|
+
replacesLookupId: backupLookupIdSchema.optional(),
|
|
104
115
|
});
|
|
105
116
|
/**
|
|
106
117
|
* Response of `GET /identity/backup/status` (and the write/delete acks): whether
|
|
@@ -109,6 +120,13 @@ export const backupUploadRequestSchema = backupEnvelopeFields.extend({
|
|
|
109
120
|
*/
|
|
110
121
|
export const backupStatusResponseSchema = z.object({
|
|
111
122
|
exists: z.boolean(),
|
|
123
|
+
/**
|
|
124
|
+
* `true` when the stored backup is one a key rotation SUPERSEDED (R6-8,
|
|
125
|
+
* R7-2): `exists` is `false` (the current key has no backup), and
|
|
126
|
+
* `publicKeyHint` / `createdAt` describe the superseded one. A new backup
|
|
127
|
+
* replaces it only with `replacesLookupId`. Absent otherwise.
|
|
128
|
+
*/
|
|
129
|
+
superseded: z.boolean().optional(),
|
|
112
130
|
publicKeyHint: z.string().optional(),
|
|
113
131
|
createdAt: z.string().optional(),
|
|
114
132
|
});
|
|
@@ -84,5 +84,12 @@ export declare const IDENTITY_ERROR_CODES: {
|
|
|
84
84
|
* was this account's root (security review R6-5).
|
|
85
85
|
*/
|
|
86
86
|
readonly keyNotProven: "IDENTITY_KEY_NOT_PROVEN";
|
|
87
|
+
/**
|
|
88
|
+
* `POST /identity/backup`: the stored backup is one a key rotation
|
|
89
|
+
* superseded, and the upload did not acknowledge it with its locator
|
|
90
|
+
* (`replacesLookupId`, security review R7-2). It carries retired keys under
|
|
91
|
+
* the previous phrase, so it is never silently replaced.
|
|
92
|
+
*/
|
|
93
|
+
readonly backupSuperseded: "IDENTITY_BACKUP_SUPERSEDED";
|
|
87
94
|
};
|
|
88
95
|
export type IdentityErrorCode = (typeof IDENTITY_ERROR_CODES)[keyof typeof IDENTITY_ERROR_CODES];
|
|
@@ -70,6 +70,7 @@ export declare const backupUploadRequestSchema: z.ZodObject<{
|
|
|
70
70
|
createdAt: z.ZodString;
|
|
71
71
|
version: z.ZodNumber;
|
|
72
72
|
lookupId: z.ZodString;
|
|
73
|
+
replacesLookupId: z.ZodOptional<z.ZodString>;
|
|
73
74
|
}, z.core.$strip>;
|
|
74
75
|
export type BackupUploadRequest = z.infer<typeof backupUploadRequestSchema>;
|
|
75
76
|
/**
|
|
@@ -79,6 +80,7 @@ export type BackupUploadRequest = z.infer<typeof backupUploadRequestSchema>;
|
|
|
79
80
|
*/
|
|
80
81
|
export declare const backupStatusResponseSchema: z.ZodObject<{
|
|
81
82
|
exists: z.ZodBoolean;
|
|
83
|
+
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
82
84
|
publicKeyHint: z.ZodOptional<z.ZodString>;
|
|
83
85
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
84
86
|
}, z.core.$strip>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/contracts",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.17.0",
|
|
4
4
|
"description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|