@oxy.so/contracts 4.15.0 → 4.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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/accountEmail.js +12 -34
- package/dist/cjs/accountGraph.js +22 -320
- package/dist/cjs/agentKeys.js +11 -13
- package/dist/cjs/client/accountEmail.js +48 -0
- package/dist/cjs/client/accountGraph.js +323 -0
- package/dist/cjs/client/agentKeys.js +77 -0
- package/dist/cjs/client/check.js +466 -0
- package/dist/cjs/client/deviceBoot.js +22 -0
- package/dist/cjs/client/deviceDirectory.js +51 -0
- package/dist/cjs/client/deviceSession.js +63 -0
- package/dist/cjs/client/externalIdentity.js +19 -0
- package/dist/cjs/client/identity.js +45 -0
- package/dist/cjs/client/identityLink.js +55 -0
- package/dist/cjs/client/identityProof.js +109 -0
- package/dist/cjs/client/index.js +190 -0
- package/dist/cjs/client/organizations.js +114 -0
- package/dist/cjs/client/products.js +153 -0
- package/dist/cjs/client/recommendations.js +33 -0
- package/dist/cjs/client/reputation.js +41 -0
- package/dist/cjs/client/safety.js +15 -0
- package/dist/cjs/client/sessionStatus.js +23 -0
- package/dist/cjs/client/signIn.js +157 -0
- package/dist/cjs/client/userResponse.js +15 -0
- package/dist/cjs/client/username.js +173 -0
- package/dist/cjs/deviceSession.js +3 -16
- package/dist/cjs/identityLink.js +13 -34
- package/dist/cjs/identityProof.js +18 -106
- package/dist/cjs/index.js +15 -10
- package/dist/cjs/inference/money.js +10 -0
- package/dist/cjs/inference/version.js +1 -1
- package/dist/cjs/organizations.js +21 -41
- package/dist/cjs/products/billing.js +0 -1
- package/dist/cjs/products/checkout.js +1 -14
- package/dist/cjs/products/plans.js +2 -18
- package/dist/cjs/reputation.js +3 -34
- package/dist/cjs/signIn.js +57 -96
- package/dist/cjs/userResponse.js +1 -8
- package/dist/cjs/username.js +23 -158
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/accountEmail.js +4 -32
- package/dist/esm/accountGraph.js +4 -309
- package/dist/esm/agentKeys.js +4 -10
- package/dist/esm/client/accountEmail.js +45 -0
- package/dist/esm/client/accountGraph.js +314 -0
- package/dist/esm/client/agentKeys.js +74 -0
- package/dist/esm/client/check.js +428 -0
- package/dist/esm/client/deviceBoot.js +19 -0
- package/dist/esm/client/deviceDirectory.js +48 -0
- package/dist/esm/client/deviceSession.js +60 -0
- package/dist/esm/client/externalIdentity.js +16 -0
- package/dist/esm/client/identity.js +42 -0
- package/dist/esm/client/identityLink.js +50 -0
- package/dist/esm/client/identityProof.js +104 -0
- package/dist/esm/client/index.js +37 -0
- package/dist/esm/client/organizations.js +111 -0
- package/dist/esm/client/products.js +150 -0
- package/dist/esm/client/recommendations.js +30 -0
- package/dist/esm/client/reputation.js +37 -0
- package/dist/esm/client/safety.js +12 -0
- package/dist/esm/client/sessionStatus.js +20 -0
- package/dist/esm/client/signIn.js +151 -0
- package/dist/esm/client/userResponse.js +12 -0
- package/dist/esm/client/username.js +167 -0
- package/dist/esm/deviceSession.js +1 -15
- package/dist/esm/identityLink.js +4 -27
- package/dist/esm/identityProof.js +4 -99
- package/dist/esm/index.js +2 -2
- package/dist/esm/inference/money.js +10 -0
- package/dist/esm/inference/version.js +1 -1
- package/dist/esm/organizations.js +4 -31
- package/dist/esm/products/billing.js +0 -1
- package/dist/esm/products/checkout.js +0 -13
- package/dist/esm/products/plans.js +1 -17
- package/dist/esm/reputation.js +1 -32
- package/dist/esm/signIn.js +29 -83
- package/dist/esm/userResponse.js +1 -8
- package/dist/esm/username.js +4 -148
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountEmail.d.ts +2 -34
- package/dist/types/accountGraph.d.ts +12 -208
- package/dist/types/agency.d.ts +24 -24
- package/dist/types/agentKeys.d.ts +8 -6
- package/dist/types/client/accountEmail.d.ts +44 -0
- package/dist/types/client/accountGraph.d.ts +203 -0
- package/dist/types/client/agentKeys.d.ts +113 -0
- package/dist/types/client/check.d.ts +184 -0
- package/dist/types/client/deviceBoot.d.ts +6 -0
- package/dist/types/client/deviceDirectory.d.ts +134 -0
- package/dist/types/client/deviceSession.d.ts +91 -0
- package/dist/types/client/externalIdentity.d.ts +14 -0
- package/dist/types/client/identity.d.ts +8 -0
- package/dist/types/client/identityLink.d.ts +21 -0
- package/dist/types/client/identityProof.d.ts +73 -0
- package/dist/types/client/index.d.ts +37 -0
- package/dist/types/client/organizations.d.ts +167 -0
- package/dist/types/client/products.d.ts +145 -0
- package/dist/types/client/recommendations.d.ts +27 -0
- package/dist/types/client/reputation.d.ts +28 -0
- package/dist/types/client/safety.d.ts +13 -0
- package/dist/types/client/sessionStatus.d.ts +19 -0
- package/dist/types/client/signIn.d.ts +107 -0
- package/dist/types/client/userResponse.d.ts +7 -0
- package/dist/types/client/username.d.ts +126 -0
- package/dist/types/deviceDirectory.d.ts +28 -28
- package/dist/types/deviceSession.d.ts +1 -12
- package/dist/types/externalIdentity.d.ts +11 -44
- package/dist/types/identityLink.d.ts +3 -11
- package/dist/types/identityProof.d.ts +2 -65
- package/dist/types/index.d.ts +3 -3
- package/dist/types/inference/catalogue.d.ts +7 -7
- package/dist/types/inference/decisions.d.ts +41 -41
- package/dist/types/inference/economics.d.ts +5 -5
- package/dist/types/inference/embeddings.d.ts +16 -16
- package/dist/types/inference/errors.d.ts +8 -8
- package/dist/types/inference/inbox.d.ts +8 -8
- package/dist/types/inference/money.d.ts +17 -8
- package/dist/types/inference/priceVersion.d.ts +12 -12
- package/dist/types/inference/privateAutoExecution.d.ts +6 -6
- package/dist/types/inference/realtime.d.ts +54 -54
- package/dist/types/inference/request.d.ts +28 -28
- package/dist/types/inference/routingPolicy.d.ts +7 -7
- package/dist/types/inference/streamEvents.d.ts +26 -26
- package/dist/types/inference/usage.d.ts +32 -32
- package/dist/types/inference/version.d.ts +1 -1
- package/dist/types/oauth.d.ts +2 -2
- package/dist/types/organizations.d.ts +8 -10
- package/dist/types/products/billing.d.ts +3 -8
- package/dist/types/products/checkout.d.ts +0 -36
- package/dist/types/products/plans.d.ts +5 -102
- package/dist/types/reputation.d.ts +1 -11
- package/dist/types/sessionStatus.d.ts +2 -2
- package/dist/types/signIn.d.ts +74 -76
- package/dist/types/userResponse.d.ts +23 -159
- package/dist/types/username.d.ts +1 -96
- package/package.json +20 -1
package/dist/cjs/identityLink.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = void 0;
|
|
4
|
-
exports.buildIdentityLinkQrPayload = buildIdentityLinkQrPayload;
|
|
5
|
-
exports.parseIdentityLinkQrPayload = parseIdentityLinkQrPayload;
|
|
3
|
+
exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.identityLinkIdSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = void 0;
|
|
6
4
|
/**
|
|
7
5
|
* Linking Commons to an account without a key (ADR 0029 D3) — the two-device
|
|
8
6
|
* relay.
|
|
@@ -31,45 +29,26 @@ exports.parseIdentityLinkQrPayload = parseIdentityLinkQrPayload;
|
|
|
31
29
|
const zod_1 = require("zod");
|
|
32
30
|
const identityProof_1 = require("./identityProof");
|
|
33
31
|
const signIn_1 = require("./signIn");
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
// The Zod-free half of this contract lives in `./client/` (`@oxy.so/contracts/client`);
|
|
33
|
+
// it is re-exported here so the root entry is unchanged.
|
|
34
|
+
const identityLink_1 = require("./client/identityLink");
|
|
35
|
+
var identityLink_2 = require("./client/identityLink");
|
|
36
|
+
Object.defineProperty(exports, "IDENTITY_LINK_STATUSES", { enumerable: true, get: function () { return identityLink_2.IDENTITY_LINK_STATUSES; } });
|
|
37
|
+
Object.defineProperty(exports, "IDENTITY_LINK_QR_PREFIX", { enumerable: true, get: function () { return identityLink_2.IDENTITY_LINK_QR_PREFIX; } });
|
|
38
|
+
Object.defineProperty(exports, "buildIdentityLinkQrPayload", { enumerable: true, get: function () { return identityLink_2.buildIdentityLinkQrPayload; } });
|
|
39
|
+
Object.defineProperty(exports, "parseIdentityLinkQrPayload", { enumerable: true, get: function () { return identityLink_2.parseIdentityLinkQrPayload; } });
|
|
39
40
|
exports.identityLinkIdSchema = zod_1.z
|
|
40
41
|
.string()
|
|
41
42
|
.trim()
|
|
42
|
-
.regex(LINK_ID, 'linkId must be 32 lowercase hex characters');
|
|
43
|
-
/** The QR auth.oxy.so shows: the request's id and the challenge Commons signs. */
|
|
44
|
-
function buildIdentityLinkQrPayload(linkId, challenge) {
|
|
45
|
-
return `${exports.IDENTITY_LINK_QR_PREFIX}?id=${linkId}&c=${challenge}`;
|
|
46
|
-
}
|
|
47
|
-
/** The request a scanned code names, or `null` for anything that is not a link QR. */
|
|
48
|
-
function parseIdentityLinkQrPayload(raw) {
|
|
49
|
-
const value = raw.trim();
|
|
50
|
-
if (!value.startsWith(`${exports.IDENTITY_LINK_QR_PREFIX}?`))
|
|
51
|
-
return null;
|
|
52
|
-
// Parsed by hand: React Native's `URLSearchParams` does not implement `get`.
|
|
53
|
-
const params = new Map();
|
|
54
|
-
for (const pair of value.slice(exports.IDENTITY_LINK_QR_PREFIX.length + 1).split('&')) {
|
|
55
|
-
const separator = pair.indexOf('=');
|
|
56
|
-
if (separator > 0)
|
|
57
|
-
params.set(pair.slice(0, separator), pair.slice(separator + 1));
|
|
58
|
-
}
|
|
59
|
-
const linkId = params.get('id') ?? '';
|
|
60
|
-
const challenge = params.get('c') ?? '';
|
|
61
|
-
if (!LINK_ID.test(linkId) || !CHALLENGE.test(challenge))
|
|
62
|
-
return null;
|
|
63
|
-
return { linkId, challenge };
|
|
64
|
-
}
|
|
43
|
+
.regex(identityLink_1.LINK_ID, 'linkId must be 32 lowercase hex characters');
|
|
65
44
|
exports.identityLinkCreateResponseSchema = zod_1.z.object({
|
|
66
45
|
linkId: exports.identityLinkIdSchema,
|
|
67
|
-
challenge: zod_1.z.string().regex(CHALLENGE),
|
|
46
|
+
challenge: zod_1.z.string().regex(identityLink_1.CHALLENGE),
|
|
68
47
|
expiresAt: zod_1.z.number().int().positive(),
|
|
69
|
-
qrPayload: zod_1.z.string().startsWith(
|
|
48
|
+
qrPayload: zod_1.z.string().startsWith(identityLink_1.IDENTITY_LINK_QR_PREFIX),
|
|
70
49
|
});
|
|
71
50
|
exports.identityLinkStateSchema = zod_1.z.object({
|
|
72
|
-
status: zod_1.z.enum(
|
|
51
|
+
status: zod_1.z.enum(identityLink_1.IDENTITY_LINK_STATUSES),
|
|
73
52
|
userId: zod_1.z.string().min(1),
|
|
74
53
|
username: zod_1.z.string().nullable(),
|
|
75
54
|
publicKey: zod_1.z.string().nullable(),
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.identityRootStatusSchema = exports.
|
|
4
|
-
exports.canonicalJson = canonicalJson;
|
|
5
|
-
exports.buildIdentityProofMessage = buildIdentityProofMessage;
|
|
3
|
+
exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.IDENTITY_ERROR_CODES = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = void 0;
|
|
6
4
|
/**
|
|
7
5
|
* Identity proof contract — the ONE signed format for operations on a personal root.
|
|
8
6
|
*
|
|
@@ -21,121 +19,35 @@ exports.buildIdentityProofMessage = buildIdentityProofMessage;
|
|
|
21
19
|
* primitive and passes the hex digest in).
|
|
22
20
|
*/
|
|
23
21
|
const zod_1 = require("zod");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
exports.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* The account becomes self-custodied and its email is deleted
|
|
38
|
-
* (ADR 0029 D3).
|
|
39
|
-
*/
|
|
40
|
-
link: 'link_identity',
|
|
41
|
-
};
|
|
42
|
-
exports.IDENTITY_PROOF_ACTION_VALUES = Object.values(exports.IDENTITY_PROOF_ACTIONS);
|
|
43
|
-
const HEX_DIGEST = /^[0-9a-f]{64}$/;
|
|
44
|
-
const ROOT_KEY = /^04[0-9a-f]{128}$/;
|
|
45
|
-
const CHALLENGE = /^[0-9a-f]{64}$/;
|
|
46
|
-
/**
|
|
47
|
-
* Canonical JSON: object keys sorted by UTF-16 code unit, no whitespace,
|
|
48
|
-
* `undefined` members omitted, arrays in order. Numbers must be finite. This is
|
|
49
|
-
* the ONLY serializer for anything digested into a proof.
|
|
50
|
-
*/
|
|
51
|
-
function canonicalJson(value) {
|
|
52
|
-
if (value === null)
|
|
53
|
-
return 'null';
|
|
54
|
-
switch (typeof value) {
|
|
55
|
-
case 'string':
|
|
56
|
-
case 'boolean':
|
|
57
|
-
return JSON.stringify(value);
|
|
58
|
-
case 'number':
|
|
59
|
-
if (!Number.isFinite(value))
|
|
60
|
-
throw new Error('canonicalJson: non-finite number');
|
|
61
|
-
return JSON.stringify(value);
|
|
62
|
-
case 'object': {
|
|
63
|
-
if (Array.isArray(value)) {
|
|
64
|
-
return `[${value.map((entry) => (entry === undefined ? 'null' : canonicalJson(entry))).join(',')}]`;
|
|
65
|
-
}
|
|
66
|
-
const record = value;
|
|
67
|
-
const keys = Object.keys(record)
|
|
68
|
-
.filter((key) => record[key] !== undefined)
|
|
69
|
-
.sort();
|
|
70
|
-
return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key])}`).join(',')}}`;
|
|
71
|
-
}
|
|
72
|
-
default:
|
|
73
|
-
throw new Error(`canonicalJson: unsupported ${typeof value}`);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* The exact bytes a root signs. Throws on a malformed claim rather than signing
|
|
78
|
-
* (or verifying) something ambiguous.
|
|
79
|
-
*/
|
|
80
|
-
function buildIdentityProofMessage(claims) {
|
|
81
|
-
if (!exports.IDENTITY_PROOF_ACTION_VALUES.includes(claims.action))
|
|
82
|
-
throw new Error('identity proof: unknown action');
|
|
83
|
-
if (!claims.subject || !claims.actor)
|
|
84
|
-
throw new Error('identity proof: subject and actor are required');
|
|
85
|
-
if (!ROOT_KEY.test(claims.rootPublicKey))
|
|
86
|
-
throw new Error('identity proof: rootPublicKey must be canonical');
|
|
87
|
-
if (claims.payloadDigest !== null && !HEX_DIGEST.test(claims.payloadDigest)) {
|
|
88
|
-
throw new Error('identity proof: payloadDigest must be a lowercase SHA-256 hex digest');
|
|
89
|
-
}
|
|
90
|
-
if (claims.expectedRevision !== null &&
|
|
91
|
-
(!Number.isSafeInteger(claims.expectedRevision) || claims.expectedRevision < 0)) {
|
|
92
|
-
throw new Error('identity proof: expectedRevision must be a non-negative integer');
|
|
93
|
-
}
|
|
94
|
-
if (!CHALLENGE.test(claims.challenge))
|
|
95
|
-
throw new Error('identity proof: challenge must be 64 lowercase hex characters');
|
|
96
|
-
if (!Number.isSafeInteger(claims.expiresAt) || claims.expiresAt <= 0)
|
|
97
|
-
throw new Error('identity proof: expiresAt must be unix milliseconds');
|
|
98
|
-
return canonicalJson({
|
|
99
|
-
v: exports.IDENTITY_PROOF_VERSION,
|
|
100
|
-
domain: exports.IDENTITY_PROOF_DOMAIN,
|
|
101
|
-
action: claims.action,
|
|
102
|
-
subject: claims.subject,
|
|
103
|
-
actor: claims.actor,
|
|
104
|
-
rootPublicKey: claims.rootPublicKey,
|
|
105
|
-
payloadDigest: claims.payloadDigest,
|
|
106
|
-
expectedRevision: claims.expectedRevision,
|
|
107
|
-
audience: claims.audience,
|
|
108
|
-
challenge: claims.challenge,
|
|
109
|
-
expiresAt: claims.expiresAt,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
22
|
+
// The Zod-free half of this contract lives in `./client/` (`@oxy.so/contracts/client`);
|
|
23
|
+
// it is re-exported here so the root entry is unchanged.
|
|
24
|
+
const identityProof_1 = require("./client/identityProof");
|
|
25
|
+
var identityProof_2 = require("./client/identityProof");
|
|
26
|
+
Object.defineProperty(exports, "IDENTITY_PROOF_VERSION", { enumerable: true, get: function () { return identityProof_2.IDENTITY_PROOF_VERSION; } });
|
|
27
|
+
Object.defineProperty(exports, "IDENTITY_PROOF_DOMAIN", { enumerable: true, get: function () { return identityProof_2.IDENTITY_PROOF_DOMAIN; } });
|
|
28
|
+
Object.defineProperty(exports, "IDENTITY_PROOF_AUDIENCE", { enumerable: true, get: function () { return identityProof_2.IDENTITY_PROOF_AUDIENCE; } });
|
|
29
|
+
Object.defineProperty(exports, "IDENTITY_PROOF_CHALLENGE_TTL_MS", { enumerable: true, get: function () { return identityProof_2.IDENTITY_PROOF_CHALLENGE_TTL_MS; } });
|
|
30
|
+
Object.defineProperty(exports, "IDENTITY_PROOF_ACTIONS", { enumerable: true, get: function () { return identityProof_2.IDENTITY_PROOF_ACTIONS; } });
|
|
31
|
+
Object.defineProperty(exports, "IDENTITY_PROOF_ACTION_VALUES", { enumerable: true, get: function () { return identityProof_2.IDENTITY_PROOF_ACTION_VALUES; } });
|
|
32
|
+
Object.defineProperty(exports, "canonicalJson", { enumerable: true, get: function () { return identityProof_2.canonicalJson; } });
|
|
33
|
+
Object.defineProperty(exports, "buildIdentityProofMessage", { enumerable: true, get: function () { return identityProof_2.buildIdentityProofMessage; } });
|
|
34
|
+
Object.defineProperty(exports, "IDENTITY_ERROR_CODES", { enumerable: true, get: function () { return identityProof_2.IDENTITY_ERROR_CODES; } });
|
|
112
35
|
/** The proof as it travels: the signature plus the two claims the verifier cannot derive. */
|
|
113
36
|
exports.identityProofSchema = zod_1.z.object({
|
|
114
|
-
v: zod_1.z.literal(
|
|
115
|
-
challenge: zod_1.z.string().trim().regex(CHALLENGE, 'challenge must be 64 lowercase hex characters'),
|
|
37
|
+
v: zod_1.z.literal(identityProof_1.IDENTITY_PROOF_VERSION),
|
|
38
|
+
challenge: zod_1.z.string().trim().regex(identityProof_1.CHALLENGE, 'challenge must be 64 lowercase hex characters'),
|
|
116
39
|
expiresAt: zod_1.z.number().int().positive(),
|
|
117
40
|
signature: zod_1.z.string().trim().min(1).max(512),
|
|
118
41
|
});
|
|
119
42
|
/** `POST /identity/proof-challenge` */
|
|
120
43
|
exports.identityProofChallengeRequestSchema = zod_1.z.object({
|
|
121
|
-
action: zod_1.z.enum(
|
|
44
|
+
action: zod_1.z.enum(identityProof_1.IDENTITY_PROOF_ACTION_VALUES),
|
|
122
45
|
});
|
|
123
46
|
exports.identityProofChallengeResponseSchema = zod_1.z.object({
|
|
124
|
-
challenge: zod_1.z.string().regex(CHALLENGE),
|
|
47
|
+
challenge: zod_1.z.string().regex(identityProof_1.CHALLENGE),
|
|
125
48
|
expiresAt: zod_1.z.number().int().positive(),
|
|
126
49
|
audience: zod_1.z.string().min(1),
|
|
127
50
|
});
|
|
128
|
-
/**
|
|
129
|
-
* Stable error codes the root routes answer with (`error.code` in the API error
|
|
130
|
-
* body). Clients map these through their localization, never the English message.
|
|
131
|
-
*/
|
|
132
|
-
exports.IDENTITY_ERROR_CODES = {
|
|
133
|
-
proofInvalid: 'IDENTITY_PROOF_INVALID',
|
|
134
|
-
rootAlreadyLinked: 'IDENTITY_ROOT_ALREADY_LINKED',
|
|
135
|
-
rootLinkedElsewhere: 'IDENTITY_ROOT_LINKED_ELSEWHERE',
|
|
136
|
-
freshFactorRequired: 'IDENTITY_FRESH_FACTOR_REQUIRED',
|
|
137
|
-
notPersonal: 'IDENTITY_NOT_PERSONAL_ACCOUNT',
|
|
138
|
-
};
|
|
139
51
|
exports.identityRootStatusSchema = zod_1.z.object({
|
|
140
52
|
rootLinked: zod_1.z.boolean(),
|
|
141
53
|
recoveryEmail: zod_1.z.string().nullable(),
|
package/dist/cjs/index.js
CHANGED
|
@@ -31,15 +31,15 @@ exports.MODERATION_ATTRIBUTIONS = exports.MODERATION_FINDING_SCOPES = exports.MO
|
|
|
31
31
|
exports.deviceBackgroundCredentialResponseSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.applicationModerationTrustSchema = exports.reputationContextualInfluenceSchema = exports.reputationReviewingSchema = exports.reputationReportingSchema = exports.reputationConductSchema = exports.reputationContributionSchema = exports.reputationPersonhoodSchema = exports.identityBindingSchema = exports.registerIdentityBindingSchema = exports.reverseModerationEffectResultSchema = exports.applyModerationDecisionResultSchema = exports.moderationEffectSchema = exports.reverseModerationEffectSchema = exports.finalizeModerationDecisionSchema = exports.moderationDecisionEventSchema = exports.moderationPolicyVersionsSchema = exports.moderationDecisionEventSubjectSchema = exports.moderationFindingSchema = exports.applicationModerationStandingSchema = exports.identityBindingStatusSchema = exports.identityBindingTypeSchema = exports.personhoodStatusSchema = exports.contributionTierSchema = exports.conductStandingSchema = exports.conductStrikeStatusSchema = exports.moderationEffectSkipReasonSchema = exports.moderationEffectStatusSchema = exports.moderationEffectTypeSchema = exports.moderationDecisionStatusSchema = exports.moderationAttributionSchema = exports.moderationFindingScopeSchema = exports.moderationSeveritySchema = exports.APPLICATION_MODERATION_STANDINGS = exports.IDENTITY_BINDING_STATUSES = exports.IDENTITY_BINDING_TYPES = exports.PERSONHOOD_STATUSES = exports.CONTRIBUTION_TIERS = exports.CONDUCT_STANDINGS = exports.CONDUCT_STRIKE_STATUSES = exports.MODERATION_EFFECT_SKIP_REASONS = exports.MODERATION_EFFECT_STATUSES = exports.MODERATION_EFFECT_TYPES = exports.MODERATION_DECISION_STATUSES = void 0;
|
|
32
32
|
exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_ERROR_CODES = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.mcpOAuthConsentResponseSchema = exports.mcpOAuthClientInfoResponseSchema = exports.mcpOAuthConsentContextSchema = exports.mcpOAuthWriteActionSchema = exports.mcpOAuthClientApplicationSchema = exports.oauthAuthorizeCodeResponseSchema = exports.oauthConsentDecisionSchema = exports.deviceDirectorySyncSchema = exports.deviceActivateResponseSchema = exports.deviceActivateRequestSchema = exports.deviceDirectorySchema = exports.devicePrincipalSchema = exports.deviceAccountContextSchema = exports.deviceDirectoryProfileSchema = exports.deviceContextRelationshipSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = void 0;
|
|
33
33
|
exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.emailVerificationConfirmResponseSchema = exports.emailVerificationConfirmRequestSchema = exports.emailVerificationStartResponseSchema = exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_LENGTH = exports.EMAIL_VERIFICATION_PURPOSES = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = void 0;
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
34
|
+
exports.requestIdSchema = exports.oxyCredentialIdSchema = exports.oxyApplicationIdSchema = exports.delegatedUserIdSchema = exports.oxyAccountIdSchema = exports.INFERENCE_CONTRACT_VERSION = exports.transparencyCheckpointListSchema = exports.transparencyInclusionProofSchema = exports.transparencyCheckpointSchema = exports.transparencyAnchorSchema = exports.transparencyCheckpointSignatureSchema = exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.passwordSetRequestSchema = exports.reauthEmailStartRequestSchema = exports.REAUTH_ACTIONS = exports.emailReauthProofSchema = exports.reauthProofSchema = exports.isSecondFactorRequired = exports.signUpRequestSchema = exports.secondFactorRequiredSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.isEmailSignInChooseAccount = exports.emailSignInChooseRequestSchema = exports.emailSignInChooseAccountSchema = exports.emailSignInAccountOptionSchema = exports.EMAIL_ACCOUNTS_MAX = exports.EMAIL_SIGNIN_CHOICE_TTL_MS = exports.emailSignInPendingSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = void 0;
|
|
35
|
+
exports.inferenceModalitySchema = exports.priceSnapshotSchema = exports.priceVersionSchema = exports.priceVersionStatusSchema = exports.embeddingResponseSchema = exports.embeddingFailureSchema = exports.embeddingSuccessSchema = exports.embeddingUsageSchema = exports.embeddingVectorSchema = exports.inferenceErrorSchema = exports.providerErrorPassthroughSchema = exports.safeErrorTextSchema = exports.upstreamErrorCategorySchema = exports.inferenceErrorCodeSchema = exports.NON_RETRYABLE_INFERENCE_ERROR_CODES = exports.INFERENCE_ERROR_CODES = exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = exports.unitPriceSchema = exports.usageQuantitySchema = exports.usageSourceSchema = exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = exports.INFERENCE_MONEY_SCALE = exports.currencyCodeSchema = exports.RESERVED_ALIA_PUBLISHER = exports.inferenceFundingTierSchema = exports.inferenceRegionSchema = exports.deploymentIdSchema = exports.inferenceProviderSlugSchema = exports.routingProfileSlugSchema = exports.routingProfileIdSchema = exports.modelReferenceSchema = exports.modelRevisionLabelSchema = exports.modelIdSchema = exports.modelSlugSchema = exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = void 0;
|
|
36
|
+
exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceOutputModalitySchema = void 0;
|
|
37
|
+
exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = void 0;
|
|
38
|
+
exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = exports.kaanaCredentialIdentitySchema = exports.kaanaCredentialOperationActionSchema = exports.kaanaCredentialOperationIdSchema = exports.kaanaCredentialHandleSchema = exports.providerConnectionScopeSchema = exports.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = exports.realtimeServerEventSchema = exports.realtimeSessionClosedEventSchema = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = void 0;
|
|
39
|
+
exports.payAsYouGoEntitlementSchema = exports.productPlanSchema = exports.planAllowanceSchema = exports.LIVE_PRODUCT_PLAN_STATUSES = exports.productPlanStatusSchema = exports.PRODUCT_PLAN_STATUSES = exports.reconciliationReportSchema = exports.reconciliationRunSchema = exports.reconciliationDiscrepancySchema = exports.reconciliationRunStatusSchema = exports.RECONCILIATION_RUN_STATUSES = exports.reconciliationDiscrepancyKindSchema = exports.RECONCILIATION_DISCREPANCY_KINDS = exports.autoRechargeAttemptSchema = exports.autoRechargeStatusSchema = exports.AUTO_RECHARGE_STATUSES = exports.externalPaymentSchema = exports.externalPaymentKindSchema = exports.EXTERNAL_PAYMENT_KINDS = exports.externalPaymentProviderSchema = exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = exports.billingModeSchema = exports.BILLING_MODES = exports.providerConnectionSchema = exports.providerConnectionStatusSchema = exports.providerConnectionValidationSchema = exports.providerCredentialCustodyStateSchema = exports.providerCredentialValidationDeploymentSchema = exports.providerCredentialValidationOperationSchema = exports.kaanaCredentialValidationOutcomeSchema = exports.kaanaCredentialValidationFailureCodeSchema = exports.kaanaCredentialValidationOutcomeStateSchema = exports.kaanaCredentialValidationTaskSchema = exports.kaanaCredentialOutcomeSchema = exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = void 0;
|
|
40
|
+
exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = exports.resolveCatalogInvocation = exports.matchCatalogInvocation = exports.findOverlappingCatalogInvocations = exports.catalogInvocationTemplatesEquivalent = exports.catalogInvocationsOverlap = exports.catalogInvocationPathParameters = exports.normalizedAppEventSchema = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.foregroundExecutionAuthorizationInputSchema = exports.executionActorRefSchema = exports.actorRefSchema = exports.capabilityPackageSchema = exports.autonomyLevelSchema = exports.CAPABILITY_PACKAGES = exports.AUTONOMY_LEVELS = exports.costCenterUsageSchema = exports.providerCostSourceSchema = exports.PROVIDER_COST_SOURCES = exports.inferenceEconomicTreatmentSchema = exports.INFERENCE_ECONOMIC_TREATMENTS = exports.productEntitlementSchema = exports.costCenterSpendSchema = exports.costCenterSchema = exports.costCenterStatusSchema = exports.COST_CENTER_STATUSES = void 0;
|
|
41
|
+
exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.privateAutoInferenceRequestSchema = exports.privateAutoOperationId = exports.privateAutoInputSchema = exports.privateAutoExecutionSchema = exports.privateAutoSourceApprovalSchema = exports.privateAutoPrincipalSchema = exports.PRIVATE_AUTO_QUESTION = exports.PRIVATE_AUTO_INSTRUCTIONS = exports.PRIVATE_AUTO_LIMITS = exports.PRIVATE_AUTO_REQUEST_ENVELOPE_VERSION = exports.PRIVATE_AUTO_EXECUTION_CONTRACT_VERSION = exports.scopedInferenceRequestSchema = exports.canonicalScopedExecutionJson = exports.scopedExecutionSchema = exports.scopedExecutionAudienceSchema = exports.SCOPED_REQUEST_ENVELOPE_VERSION = exports.SCOPED_EXECUTION_CONTRACT_VERSION = exports.decisionAnswersMatch = exports.decisionFitsGateway = exports.decisionInputBudget = exports.decisionFailureSchema = exports.decisionSuccessSchema = exports.decisionResultSchema = exports.decisionAnswerSchema = exports.decisionRequestSchema = exports.decisionInputSchema = exports.decisionQuestionSchema = exports.decisionEffortSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.INBOX_DAILY_BRIEF_SECTIONS = exports.inboxDailyBriefResponseSchema = exports.inboxDailyBriefRequestSchema = void 0;
|
|
42
|
+
exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = void 0;
|
|
43
43
|
var accountGraph_1 = require("./accountGraph");
|
|
44
44
|
Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
|
|
45
45
|
Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
|
|
@@ -410,6 +410,12 @@ Object.defineProperty(exports, "emailSignInCollectRequestSchema", { enumerable:
|
|
|
410
410
|
Object.defineProperty(exports, "emailSignInLinkRequestSchema", { enumerable: true, get: function () { return signIn_1.emailSignInLinkRequestSchema; } });
|
|
411
411
|
Object.defineProperty(exports, "emailSignInLinkResponseSchema", { enumerable: true, get: function () { return signIn_1.emailSignInLinkResponseSchema; } });
|
|
412
412
|
Object.defineProperty(exports, "emailSignInPendingSchema", { enumerable: true, get: function () { return signIn_1.emailSignInPendingSchema; } });
|
|
413
|
+
Object.defineProperty(exports, "EMAIL_SIGNIN_CHOICE_TTL_MS", { enumerable: true, get: function () { return signIn_1.EMAIL_SIGNIN_CHOICE_TTL_MS; } });
|
|
414
|
+
Object.defineProperty(exports, "EMAIL_ACCOUNTS_MAX", { enumerable: true, get: function () { return signIn_1.EMAIL_ACCOUNTS_MAX; } });
|
|
415
|
+
Object.defineProperty(exports, "emailSignInAccountOptionSchema", { enumerable: true, get: function () { return signIn_1.emailSignInAccountOptionSchema; } });
|
|
416
|
+
Object.defineProperty(exports, "emailSignInChooseAccountSchema", { enumerable: true, get: function () { return signIn_1.emailSignInChooseAccountSchema; } });
|
|
417
|
+
Object.defineProperty(exports, "emailSignInChooseRequestSchema", { enumerable: true, get: function () { return signIn_1.emailSignInChooseRequestSchema; } });
|
|
418
|
+
Object.defineProperty(exports, "isEmailSignInChooseAccount", { enumerable: true, get: function () { return signIn_1.isEmailSignInChooseAccount; } });
|
|
413
419
|
Object.defineProperty(exports, "passwordSignInRequestSchema", { enumerable: true, get: function () { return signIn_1.passwordSignInRequestSchema; } });
|
|
414
420
|
Object.defineProperty(exports, "secondFactorSignInRequestSchema", { enumerable: true, get: function () { return signIn_1.secondFactorSignInRequestSchema; } });
|
|
415
421
|
Object.defineProperty(exports, "secondFactorRequiredSchema", { enumerable: true, get: function () { return signIn_1.secondFactorRequiredSchema; } });
|
|
@@ -880,7 +886,6 @@ Object.defineProperty(exports, "productSubscriptionCancellationResultSchema", {
|
|
|
880
886
|
var plans_1 = require("./products/plans");
|
|
881
887
|
Object.defineProperty(exports, "personalPlanDisplayPriceSchema", { enumerable: true, get: function () { return plans_1.personalPlanDisplayPriceSchema; } });
|
|
882
888
|
Object.defineProperty(exports, "personalPlanCatalogueSchema", { enumerable: true, get: function () { return plans_1.personalPlanCatalogueSchema; } });
|
|
883
|
-
Object.defineProperty(exports, "productPlanCatalogueSchema", { enumerable: true, get: function () { return plans_1.productPlanCatalogueSchema; } });
|
|
884
889
|
__exportStar(require("./products/checkout"), exports);
|
|
885
890
|
__exportStar(require("./organizations"), exports);
|
|
886
891
|
__exportStar(require("./safety"), exports);
|
|
@@ -147,6 +147,15 @@ exports.moneySchema = zod_1.z
|
|
|
147
147
|
* estimated from the audio, and a provider billed by the audio it carries (or
|
|
148
148
|
* by tokens) never reports it.
|
|
149
149
|
*
|
|
150
|
+
* **`input_transcription_milliseconds` is a second model's reading** (added in
|
|
151
|
+
* contract set 3.9.0, mirroring `@kaana.ai/contracts` 4.1.0): milliseconds of a
|
|
152
|
+
* realtime session's input audio that the deployment's own TRANSCRIPTION model
|
|
153
|
+
* transcribed, when the provider bills that model apart from the session model
|
|
154
|
+
* (OpenAI bills input transcription at the ASR model's price). The session
|
|
155
|
+
* model's `audio_input_tokens` and this unit are two charges for two models,
|
|
156
|
+
* each read once, so the partition rule holds. A provider whose session price
|
|
157
|
+
* already includes the transcription (xAI's Voice Agent) never reports it.
|
|
158
|
+
*
|
|
150
159
|
* No refinement in this package can enforce it, and saying so is part of the
|
|
151
160
|
* rule: a nested report and a disjoint one are the same four non-negative
|
|
152
161
|
* integers, so no predicate over a single report can tell them apart. The two
|
|
@@ -184,6 +193,7 @@ exports.USAGE_UNITS = [
|
|
|
184
193
|
'cached_audio_input_tokens',
|
|
185
194
|
'audio_output_tokens',
|
|
186
195
|
'session_milliseconds',
|
|
196
|
+
'input_transcription_milliseconds',
|
|
187
197
|
];
|
|
188
198
|
exports.usageUnitSchema = zod_1.z.enum(exports.USAGE_UNITS);
|
|
189
199
|
/**
|
|
@@ -102,4 +102,4 @@ exports.INFERENCE_CONTRACT_VERSION = void 0;
|
|
|
102
102
|
* change to, say, the catalogue reject every in-flight inference request; the
|
|
103
103
|
* per-shape `schemaVersion` is what a message is validated against.
|
|
104
104
|
*/
|
|
105
|
-
exports.INFERENCE_CONTRACT_VERSION = '3.
|
|
105
|
+
exports.INFERENCE_CONTRACT_VERSION = '3.9.0';
|
|
@@ -1,46 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.organizationCurationResultSchema = exports.organizationCurationSchema = exports.organizationErrorSchema = exports.
|
|
3
|
+
exports.organizationCurationResultSchema = exports.organizationCurationSchema = exports.organizationErrorSchema = exports.organizationMergeSchema = exports.organizationExternalResolutionSchema = exports.organizationExternalSchema = exports.organizationImportBatchResultSchema = exports.organizationImportBatchSchema = exports.organizationExternalInputSchema = exports.organizationClaimReviewSchema = exports.organizationClaimListSchema = exports.organizationClaimListQuerySchema = exports.organizationClaimDetailSchema = exports.organizationClaimSchema = exports.organizationClaimInputSchema = exports.organizationBatchSchema = exports.organizationBatchInputSchema = exports.organizationListSchema = exports.organizationSearchSchema = exports.organizationSchema = exports.updateOrganizationSchema = exports.createOrganizationSchema = exports.organizationNameSchema = exports.organizationAliasSchema = exports.ORGANIZATION_ERROR_CODES = exports.ORGANIZATION_NAME_MAX_LENGTH = exports.ORGANIZATION_CLAIM_DECISIONS = exports.ORGANIZATION_ALIAS_KINDS = exports.ORGANIZATION_CLAIM_STATUSES = exports.ORGANIZATION_STATUSES = exports.ORGANIZATION_TYPES = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports
|
|
14
|
-
exports
|
|
15
|
-
exports.
|
|
16
|
-
'name_variant',
|
|
17
|
-
'former_name',
|
|
18
|
-
'localized_name',
|
|
19
|
-
'marketing_name',
|
|
20
|
-
'misspelling',
|
|
21
|
-
];
|
|
22
|
-
exports.ORGANIZATION_CLAIM_DECISIONS = ['pending', 'approved', 'rejected'];
|
|
5
|
+
// The Zod-free half of this contract lives in `./client/` (`@oxy.so/contracts/client`);
|
|
6
|
+
// it is re-exported here so the root entry is unchanged.
|
|
7
|
+
const organizations_1 = require("./client/organizations");
|
|
8
|
+
var organizations_2 = require("./client/organizations");
|
|
9
|
+
Object.defineProperty(exports, "ORGANIZATION_TYPES", { enumerable: true, get: function () { return organizations_2.ORGANIZATION_TYPES; } });
|
|
10
|
+
Object.defineProperty(exports, "ORGANIZATION_STATUSES", { enumerable: true, get: function () { return organizations_2.ORGANIZATION_STATUSES; } });
|
|
11
|
+
Object.defineProperty(exports, "ORGANIZATION_CLAIM_STATUSES", { enumerable: true, get: function () { return organizations_2.ORGANIZATION_CLAIM_STATUSES; } });
|
|
12
|
+
Object.defineProperty(exports, "ORGANIZATION_ALIAS_KINDS", { enumerable: true, get: function () { return organizations_2.ORGANIZATION_ALIAS_KINDS; } });
|
|
13
|
+
Object.defineProperty(exports, "ORGANIZATION_CLAIM_DECISIONS", { enumerable: true, get: function () { return organizations_2.ORGANIZATION_CLAIM_DECISIONS; } });
|
|
14
|
+
Object.defineProperty(exports, "ORGANIZATION_NAME_MAX_LENGTH", { enumerable: true, get: function () { return organizations_2.ORGANIZATION_NAME_MAX_LENGTH; } });
|
|
15
|
+
Object.defineProperty(exports, "ORGANIZATION_ERROR_CODES", { enumerable: true, get: function () { return organizations_2.ORGANIZATION_ERROR_CODES; } });
|
|
23
16
|
const id = zod_1.z.string().min(1).max(128);
|
|
24
17
|
const optionalText = (max) => zod_1.z.string().trim().min(1).max(max).nullable().optional();
|
|
25
18
|
exports.organizationAliasSchema = zod_1.z
|
|
26
19
|
.object({
|
|
27
20
|
alias: zod_1.z.string().trim().min(1).max(300),
|
|
28
|
-
kind: zod_1.z.enum(
|
|
21
|
+
kind: zod_1.z.enum(organizations_1.ORGANIZATION_ALIAS_KINDS),
|
|
29
22
|
language: zod_1.z.string().min(2).max(35).optional(),
|
|
30
23
|
})
|
|
31
24
|
.strict();
|
|
32
|
-
exports.ORGANIZATION_NAME_MAX_LENGTH = 300;
|
|
33
25
|
exports.organizationNameSchema = zod_1.z
|
|
34
26
|
.string()
|
|
35
27
|
.trim()
|
|
36
28
|
.min(1)
|
|
37
|
-
.max(
|
|
29
|
+
.max(organizations_1.ORGANIZATION_NAME_MAX_LENGTH)
|
|
38
30
|
.refine((value) => !/[<>]/.test(value) &&
|
|
39
31
|
Array.from(value).every((character) => character.charCodeAt(0) >= 32 && character.charCodeAt(0) !== 127), 'Organization name must be plain text');
|
|
40
32
|
exports.createOrganizationSchema = zod_1.z
|
|
41
33
|
.object({
|
|
42
34
|
name: exports.organizationNameSchema,
|
|
43
|
-
organizationType: zod_1.z.enum(
|
|
35
|
+
organizationType: zod_1.z.enum(organizations_1.ORGANIZATION_TYPES),
|
|
44
36
|
legalName: optionalText(300),
|
|
45
37
|
websiteUrl: zod_1.z
|
|
46
38
|
.string()
|
|
@@ -68,8 +60,8 @@ exports.organizationSchema = exports.createOrganizationSchema
|
|
|
68
60
|
countryCode: zod_1.z.string().nullable(),
|
|
69
61
|
aliases: zod_1.z.array(exports.organizationAliasSchema),
|
|
70
62
|
verifiedDomains: zod_1.z.array(zod_1.z.string()),
|
|
71
|
-
claimStatus: zod_1.z.enum(
|
|
72
|
-
status: zod_1.z.enum(
|
|
63
|
+
claimStatus: zod_1.z.enum(organizations_1.ORGANIZATION_CLAIM_STATUSES),
|
|
64
|
+
status: zod_1.z.enum(organizations_1.ORGANIZATION_STATUSES),
|
|
73
65
|
mergedIntoAccountId: id.nullable(),
|
|
74
66
|
createdAt: zod_1.z.string().datetime(),
|
|
75
67
|
updatedAt: zod_1.z.string().datetime(),
|
|
@@ -78,7 +70,7 @@ exports.organizationSchema = exports.createOrganizationSchema
|
|
|
78
70
|
exports.organizationSearchSchema = zod_1.z
|
|
79
71
|
.object({
|
|
80
72
|
query: zod_1.z.string().trim().max(200).default(''),
|
|
81
|
-
organizationType: zod_1.z.enum(
|
|
73
|
+
organizationType: zod_1.z.enum(organizations_1.ORGANIZATION_TYPES).optional(),
|
|
82
74
|
limit: zod_1.z.coerce.number().int().min(1).max(50).default(20),
|
|
83
75
|
cursor: zod_1.z.string().min(1).max(2048).optional(),
|
|
84
76
|
})
|
|
@@ -103,7 +95,7 @@ exports.organizationClaimSchema = zod_1.z
|
|
|
103
95
|
id,
|
|
104
96
|
accountId: id,
|
|
105
97
|
claimantUserId: id,
|
|
106
|
-
status: zod_1.z.enum(
|
|
98
|
+
status: zod_1.z.enum(organizations_1.ORGANIZATION_CLAIM_DECISIONS),
|
|
107
99
|
createdAt: zod_1.z.string().datetime(),
|
|
108
100
|
})
|
|
109
101
|
.strict();
|
|
@@ -116,7 +108,7 @@ exports.organizationClaimDetailSchema = exports.organizationClaimSchema
|
|
|
116
108
|
.strict();
|
|
117
109
|
exports.organizationClaimListQuerySchema = zod_1.z
|
|
118
110
|
.object({
|
|
119
|
-
status: zod_1.z.enum(
|
|
111
|
+
status: zod_1.z.enum(organizations_1.ORGANIZATION_CLAIM_DECISIONS).optional(),
|
|
120
112
|
limit: zod_1.z.coerce.number().int().min(1).max(50).default(20),
|
|
121
113
|
cursor: zod_1.z.string().min(1).max(2048).optional(),
|
|
122
114
|
})
|
|
@@ -171,23 +163,11 @@ exports.organizationMergeSchema = zod_1.z
|
|
|
171
163
|
evidenceReference: zod_1.z.string().trim().min(1).max(1000),
|
|
172
164
|
})
|
|
173
165
|
.strict();
|
|
174
|
-
exports.ORGANIZATION_ERROR_CODES = [
|
|
175
|
-
'bad_request',
|
|
176
|
-
'unauthorized',
|
|
177
|
-
'forbidden',
|
|
178
|
-
'not_found',
|
|
179
|
-
'unknown_route',
|
|
180
|
-
'conflict',
|
|
181
|
-
'validation_failed',
|
|
182
|
-
'rate_limited',
|
|
183
|
-
'internal_error',
|
|
184
|
-
'service_unavailable',
|
|
185
|
-
];
|
|
186
166
|
exports.organizationErrorSchema = zod_1.z
|
|
187
167
|
.object({
|
|
188
168
|
error: zod_1.z
|
|
189
169
|
.object({
|
|
190
|
-
code: zod_1.z.enum(
|
|
170
|
+
code: zod_1.z.enum(organizations_1.ORGANIZATION_ERROR_CODES),
|
|
191
171
|
message: zod_1.z.string(),
|
|
192
172
|
details: zod_1.z
|
|
193
173
|
.record(zod_1.z.string(), zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null()]))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.personalPlanCheckoutResultSchema = exports.personalPlanCheckoutRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const identifiers_1 = require("../inference/identifiers");
|
|
6
6
|
exports.personalPlanCheckoutRequestSchema = zod_1.z
|
|
@@ -33,16 +33,3 @@ exports.personalPlanCheckoutResultSchema = zod_1.z.discriminatedUnion('state', [
|
|
|
33
33
|
zod_1.z.object({ state: zod_1.z.literal('closed'), intentId: zod_1.z.string().min(1).max(160) }).strict(),
|
|
34
34
|
zod_1.z.object({ state: zod_1.z.literal('fulfilled'), intentId: zod_1.z.string().min(1).max(160) }).strict(),
|
|
35
35
|
]);
|
|
36
|
-
/** Explicit individual product offer; still owned and paid through Oxy. */
|
|
37
|
-
exports.productPlanCheckoutRequestSchema = exports.personalPlanCheckoutRequestSchema
|
|
38
|
-
.extend({
|
|
39
|
-
productId: zod_1.z.string().min(1).max(160),
|
|
40
|
-
})
|
|
41
|
-
.strict();
|
|
42
|
-
exports.productSubscriptionRenewalRequestSchema = zod_1.z
|
|
43
|
-
.object({
|
|
44
|
-
expectedSubjectAccountId: identifiers_1.oxyAccountIdSchema,
|
|
45
|
-
sourceId: zod_1.z.string().min(1).max(160),
|
|
46
|
-
idempotencyKey: exports.personalPlanCheckoutRequestSchema.shape.idempotencyKey,
|
|
47
|
-
})
|
|
48
|
-
.strict();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const access_1 = require("./access");
|
|
6
6
|
/** Approved display terms never identify or activate a billing-provider price. */
|
|
@@ -19,7 +19,7 @@ exports.personalPlanCatalogueSchema = zod_1.z
|
|
|
19
19
|
.object({
|
|
20
20
|
schemaVersion: zod_1.z.literal(1),
|
|
21
21
|
state: zod_1.z.enum(['unconfigured', 'configured']),
|
|
22
|
-
purchase: zod_1.z.
|
|
22
|
+
purchase: zod_1.z.literal('unavailable'),
|
|
23
23
|
plans: zod_1.z.array(zod_1.z
|
|
24
24
|
.object({
|
|
25
25
|
offerId: zod_1.z.string().min(1).max(160),
|
|
@@ -36,19 +36,3 @@ exports.personalPlanCatalogueSchema = zod_1.z
|
|
|
36
36
|
})
|
|
37
37
|
.strict()
|
|
38
38
|
.refine((value) => (value.state === 'unconfigured') === (value.plans.length === 0), 'Catalogue state must match published plans');
|
|
39
|
-
exports.productPlanCatalogueSchema = zod_1.z
|
|
40
|
-
.object({
|
|
41
|
-
schemaVersion: zod_1.z.literal(1),
|
|
42
|
-
productId: zod_1.z.string().min(1).max(160),
|
|
43
|
-
purchase: zod_1.z.enum(['unavailable', 'available']),
|
|
44
|
-
plans: zod_1.z.array(zod_1.z
|
|
45
|
-
.object({
|
|
46
|
-
productId: zod_1.z.string().min(1).max(160),
|
|
47
|
-
offerId: zod_1.z.string().min(1).max(160),
|
|
48
|
-
offerVersion: zod_1.z.number().int().positive().safe(),
|
|
49
|
-
displayName: zod_1.z.string().min(1).max(100),
|
|
50
|
-
price: exports.personalPlanDisplayPriceSchema.extend({ interval: zod_1.z.enum(['month', 'year']) }),
|
|
51
|
-
})
|
|
52
|
-
.strict()),
|
|
53
|
-
})
|
|
54
|
-
.strict();
|
package/dist/cjs/reputation.js
CHANGED
|
@@ -40,11 +40,12 @@
|
|
|
40
40
|
* `require()`).
|
|
41
41
|
*/
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.awardReputationSchema = exports.reputationInfluenceResultSchema = exports.reputationLeaderboardEntrySchema = exports.reputationLeaderboardUserSchema = exports.reputationRulesResponseSchema = exports.reputationRuleSchema = exports.reputationBalanceSchema = exports.reputationBalanceSummarySchema = exports.reputationReliabilitySchema = exports.reputationInfluenceSchema = exports.reputationBalanceBreakdownSchema = exports.reputationTransactionSchema = exports.reputationInfluenceContextSchema = exports.REPUTATION_INFLUENCE_CONTEXTS = exports.reputationTargetEntityTypeSchema = exports.REPUTATION_TARGET_ENTITY_TYPES = exports.trustTierSchema = exports.TRUST_TIERS = exports.reputationTransactionStatusSchema = exports.REPUTATION_TRANSACTION_STATUSES = exports.reputationCategorySchema = exports.REPUTATION_CATEGORIES = void 0;
|
|
44
|
-
exports.isFullReputationBalance = isFullReputationBalance;
|
|
43
|
+
exports.awardReputationSchema = exports.reputationInfluenceResultSchema = exports.reputationLeaderboardEntrySchema = exports.reputationLeaderboardUserSchema = exports.reputationRulesResponseSchema = exports.reputationRuleSchema = exports.reputationBalanceSchema = exports.reputationBalanceSummarySchema = exports.reputationReliabilitySchema = exports.reputationInfluenceSchema = exports.reputationBalanceBreakdownSchema = exports.reputationTransactionSchema = exports.reputationInfluenceContextSchema = exports.REPUTATION_INFLUENCE_CONTEXTS = exports.reputationTargetEntityTypeSchema = exports.REPUTATION_TARGET_ENTITY_TYPES = exports.trustTierSchema = exports.TRUST_TIERS = exports.reputationTransactionStatusSchema = exports.REPUTATION_TRANSACTION_STATUSES = exports.reputationCategorySchema = exports.REPUTATION_CATEGORIES = exports.isFullReputationBalance = void 0;
|
|
45
44
|
const zod_1 = require("zod");
|
|
46
45
|
const userResponse_1 = require("./userResponse");
|
|
47
46
|
const moderationReputation_1 = require("./moderationReputation");
|
|
47
|
+
var reputation_1 = require("./client/reputation");
|
|
48
|
+
Object.defineProperty(exports, "isFullReputationBalance", { enumerable: true, get: function () { return reputation_1.isFullReputationBalance; } });
|
|
48
49
|
/* -------------------------------------------------------------------------- */
|
|
49
50
|
/* Closed value sets */
|
|
50
51
|
/* -------------------------------------------------------------------------- */
|
|
@@ -174,38 +175,6 @@ exports.reputationBalanceSchema = zod_1.z.object({
|
|
|
174
175
|
reviewing: moderationReputation_1.reputationReviewingSchema.optional(),
|
|
175
176
|
contextualInfluence: moderationReputation_1.reputationContextualInfluenceSchema.optional(),
|
|
176
177
|
});
|
|
177
|
-
/**
|
|
178
|
-
* The fields the full {@link ReputationBalance} carries beyond the public
|
|
179
|
-
* {@link ReputationBalanceSummary} that the API sends ALL-OR-NOTHING. The
|
|
180
|
-
* runtime discriminant between the two views.
|
|
181
|
-
*
|
|
182
|
-
* The V2 blocks (`conduct`, `contribution`, …) are deliberately NOT listed:
|
|
183
|
-
* they are optional on the wire, so requiring them here would make a balance
|
|
184
|
-
* from a server that predates them fail to narrow, hiding the whole private
|
|
185
|
-
* view. Read a V2 block by checking that block.
|
|
186
|
-
*/
|
|
187
|
-
const FULL_BALANCE_FIELDS = [
|
|
188
|
-
'positive',
|
|
189
|
-
'negative',
|
|
190
|
-
'breakdown',
|
|
191
|
-
'influence',
|
|
192
|
-
'reliability',
|
|
193
|
-
'recalculatedAt',
|
|
194
|
-
'updatedAt',
|
|
195
|
-
];
|
|
196
|
-
/**
|
|
197
|
-
* Whether a balance came back as the SUBJECT view, and so carries the
|
|
198
|
-
* breakdown / influence / reliability blocks.
|
|
199
|
-
*
|
|
200
|
-
* Checks every extra field rather than one representative: the point of the
|
|
201
|
-
* guard is that the caller then dereferences those blocks, so a partial payload
|
|
202
|
-
* must not narrow.
|
|
203
|
-
*
|
|
204
|
-
* @param balance - A balance from `getReputationBalance`.
|
|
205
|
-
*/
|
|
206
|
-
function isFullReputationBalance(balance) {
|
|
207
|
-
return FULL_BALANCE_FIELDS.every((field) => field in balance);
|
|
208
|
-
}
|
|
209
178
|
exports.reputationRuleSchema = zod_1.z.object({
|
|
210
179
|
actionType: zod_1.z.string(),
|
|
211
180
|
points: zod_1.z.number(),
|