@oxy.so/contracts 4.16.0 → 4.21.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/accountAccess.js +72 -0
- package/dist/cjs/accountEmail.js +12 -34
- package/dist/cjs/accountGraph.js +22 -320
- package/dist/cjs/agency.js +112 -1
- package/dist/cjs/agentKeys.js +11 -13
- package/dist/cjs/applicationRoles.js +211 -0
- 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 +475 -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 +211 -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 +196 -0
- package/dist/cjs/client/sessionStatus.js +23 -0
- package/dist/cjs/client/signIn.js +159 -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 +13 -3
- package/dist/cjs/organizations.js +21 -41
- package/dist/cjs/reputation.js +3 -34
- package/dist/cjs/safety.js +430 -1
- package/dist/cjs/serviceToken.js +14 -0
- package/dist/cjs/signIn.js +33 -111
- package/dist/cjs/username.js +23 -158
- package/dist/esm/accountAccess.js +69 -0
- package/dist/esm/accountEmail.js +4 -32
- package/dist/esm/accountGraph.js +4 -309
- package/dist/esm/agency.js +111 -0
- package/dist/esm/agentKeys.js +4 -10
- package/dist/esm/applicationRoles.js +207 -0
- 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 +436 -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 +193 -0
- package/dist/esm/client/sessionStatus.js +20 -0
- package/dist/esm/client/signIn.js +153 -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 +4 -1
- package/dist/esm/organizations.js +4 -31
- package/dist/esm/reputation.js +1 -32
- package/dist/esm/safety.js +423 -0
- package/dist/esm/serviceToken.js +11 -0
- package/dist/esm/signIn.js +4 -96
- package/dist/esm/username.js +4 -148
- package/dist/types/accountAccess.d.ts +128 -0
- package/dist/types/accountEmail.d.ts +4 -36
- package/dist/types/accountGraph.d.ts +12 -208
- package/dist/types/agency.d.ts +351 -26
- package/dist/types/agentKeys.d.ts +14 -12
- package/dist/types/applicationRoles.d.ts +438 -0
- 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 +187 -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 +213 -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 +5 -16
- package/dist/types/email/messages.d.ts +2 -2
- package/dist/types/externalIdentity.d.ts +15 -15
- package/dist/types/identityLink.d.ts +3 -11
- package/dist/types/identityProof.d.ts +2 -65
- package/dist/types/index.d.ts +5 -2
- package/dist/types/inference/accountBilling.d.ts +2 -2
- package/dist/types/inference/catalogue.d.ts +22 -22
- package/dist/types/inference/decisions.d.ts +10 -10
- 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/privateAutoExecution.d.ts +6 -6
- package/dist/types/inference/providerConnection.d.ts +4 -4
- package/dist/types/inference/realtime.d.ts +92 -92
- package/dist/types/inference/request.d.ts +48 -48
- package/dist/types/inference/streamEvents.d.ts +16 -16
- package/dist/types/inference/usage.d.ts +4 -4
- package/dist/types/oauth.d.ts +2 -2
- package/dist/types/organizations.d.ts +8 -10
- package/dist/types/products/access.d.ts +4 -4
- package/dist/types/products/billing.d.ts +3 -0
- package/dist/types/reputation.d.ts +1 -11
- package/dist/types/safety.d.ts +2374 -2
- package/dist/types/serviceToken.d.ts +11 -0
- package/dist/types/sessionStatus.d.ts +2 -2
- package/dist/types/signIn.d.ts +11 -94
- package/dist/types/userResponse.d.ts +22 -22
- package/dist/types/username.d.ts +1 -96
- package/package.json +24 -20
- package/dist/cjs/.tsbuildinfo +0 -1
- package/dist/esm/.tsbuildinfo +0 -1
- package/dist/types/.tsbuildinfo +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Device-session checks, without Zod. Schemas: `../deviceSession.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Name of the token-free Socket.IO event emitted to room `user:<userId>` on
|
|
8
|
+
* every DeviceSession mutation that changes what is signed in for that user.
|
|
9
|
+
*
|
|
10
|
+
* This is a pure SIGNAL — it carries NO access token, NO deviceSecret and NO
|
|
11
|
+
* account bodies. A client that receives it re-fetches its authenticated
|
|
12
|
+
* session/account state (`GET /session/device/state`, `GET /accounts`). Unlike
|
|
13
|
+
* `session_state` (scoped to `device:<deviceId>`, i.e. a single origin), this
|
|
14
|
+
* reaches ALL of a user's connected sockets across their devices/origins so
|
|
15
|
+
* every Oxy app reflects an add / switch / signout instantly.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SESSION_ACCOUNTS_CHANGED_EVENT = "session_accounts_changed";
|
|
18
|
+
export declare const deviceSessionStateCheck: import("./check").Check<{
|
|
19
|
+
updatedAt: number;
|
|
20
|
+
activeAccountId: string | null;
|
|
21
|
+
deviceId: string;
|
|
22
|
+
accounts: {
|
|
23
|
+
accountId: string;
|
|
24
|
+
sessionId: string;
|
|
25
|
+
authuser: number;
|
|
26
|
+
operatedByUserId?: string | undefined;
|
|
27
|
+
}[];
|
|
28
|
+
revision: number;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const activeTokenCheck: import("./check").Check<{
|
|
31
|
+
expiresAt: string;
|
|
32
|
+
accessToken: string;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const deviceSessionSyncCheck: import("./check").Check<{
|
|
35
|
+
state: {
|
|
36
|
+
updatedAt: number;
|
|
37
|
+
activeAccountId: string | null;
|
|
38
|
+
deviceId: string;
|
|
39
|
+
accounts: {
|
|
40
|
+
accountId: string;
|
|
41
|
+
sessionId: string;
|
|
42
|
+
authuser: number;
|
|
43
|
+
operatedByUserId?: string | undefined;
|
|
44
|
+
}[];
|
|
45
|
+
revision: number;
|
|
46
|
+
};
|
|
47
|
+
activeToken: {
|
|
48
|
+
expiresAt: string;
|
|
49
|
+
accessToken: string;
|
|
50
|
+
} | null;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const deviceTokenMintResponseCheck: import("./check").Check<{
|
|
53
|
+
expiresAt: string;
|
|
54
|
+
accessToken: string;
|
|
55
|
+
state: {
|
|
56
|
+
updatedAt: number;
|
|
57
|
+
activeAccountId: string | null;
|
|
58
|
+
deviceId: string;
|
|
59
|
+
accounts: {
|
|
60
|
+
accountId: string;
|
|
61
|
+
sessionId: string;
|
|
62
|
+
authuser: number;
|
|
63
|
+
operatedByUserId?: string | undefined;
|
|
64
|
+
}[];
|
|
65
|
+
revision: number;
|
|
66
|
+
};
|
|
67
|
+
nextDeviceSecret: string;
|
|
68
|
+
}>;
|
|
69
|
+
export declare const sessionAccountsChangedEventCheck: import("./check").Check<{
|
|
70
|
+
reason: "login" | "add" | "switch" | "signout" | "revoke";
|
|
71
|
+
revision: number;
|
|
72
|
+
userId: string;
|
|
73
|
+
}>;
|
|
74
|
+
export declare const deviceBackgroundCredentialResponseCheck: import("./check").Check<{
|
|
75
|
+
accountId: string;
|
|
76
|
+
expiresAt: string;
|
|
77
|
+
deviceId: string;
|
|
78
|
+
secret: string;
|
|
79
|
+
}>;
|
|
80
|
+
export declare const deviceRegisterResponseCheck: import("./check").Check<{
|
|
81
|
+
deviceId: string;
|
|
82
|
+
deviceSecret: string;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const deviceJoinResponseCheck: import("./check").Check<{
|
|
85
|
+
deviceId: string;
|
|
86
|
+
deviceSecret: string;
|
|
87
|
+
}>;
|
|
88
|
+
export declare const deviceJoinCodeResponseCheck: import("./check").Check<{
|
|
89
|
+
code: string;
|
|
90
|
+
expiresIn: number;
|
|
91
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The external-identity reference check, without Zod. Schemas: `../externalIdentity.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
/** One Oxy-proven network alias of a profile — the twin of `externalIdentityReferenceSchema`. */
|
|
7
|
+
export declare const externalIdentityReferenceCheck: import("./check").Check<{
|
|
8
|
+
canonicalAcct: string;
|
|
9
|
+
network: string;
|
|
10
|
+
protocol: "activitypub" | "atproto" | "instagram-graph";
|
|
11
|
+
actorUri: string;
|
|
12
|
+
transportAcct: string;
|
|
13
|
+
sourceUserId: string;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signed-record envelope check, without Zod. Schemas: `../identity.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { SignedRecordEnvelope } from '../identity';
|
|
7
|
+
/** The twin of `signedRecordEnvelopeSchema`: v2 requires the chain fields, v1 forbids them. */
|
|
8
|
+
export declare const signedRecordEnvelopeCheck: import("./check").Check<SignedRecordEnvelope>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity-link constants, QR payload and response checks, without Zod. Schemas: `../identityLink.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { IdentityLinkCreateResponse, IdentityLinkState } from '../identityLink';
|
|
7
|
+
export declare const IDENTITY_LINK_STATUSES: readonly ["pending", "signed", "completed", "cancelled"];
|
|
8
|
+
export type IdentityLinkStatus = (typeof IDENTITY_LINK_STATUSES)[number];
|
|
9
|
+
/** The scheme and host Commons routes a link QR to. */
|
|
10
|
+
export declare const IDENTITY_LINK_QR_PREFIX = "oxycommons://link";
|
|
11
|
+
export declare const LINK_ID: RegExp;
|
|
12
|
+
export declare const CHALLENGE: RegExp;
|
|
13
|
+
/** The QR auth.oxy.so shows: the request's id and the challenge Commons signs. */
|
|
14
|
+
export declare function buildIdentityLinkQrPayload(linkId: string, challenge: string): string;
|
|
15
|
+
/** The request a scanned code names, or `null` for anything that is not a link QR. */
|
|
16
|
+
export declare function parseIdentityLinkQrPayload(raw: string): {
|
|
17
|
+
linkId: string;
|
|
18
|
+
challenge: string;
|
|
19
|
+
} | null;
|
|
20
|
+
export declare const identityLinkCreateResponseCheck: import("./check").Check<IdentityLinkCreateResponse>;
|
|
21
|
+
export declare const identityLinkStateCheck: import("./check").Check<IdentityLinkState>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The identity-proof message format, without Zod. Schemas: `../identityProof.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const IDENTITY_PROOF_VERSION: 2;
|
|
7
|
+
export declare const IDENTITY_PROOF_DOMAIN: "oxy-identity-proof";
|
|
8
|
+
/** The audience every API-verified identity proof names. */
|
|
9
|
+
export declare const IDENTITY_PROOF_AUDIENCE: "oxy-api/identity";
|
|
10
|
+
/** How long a proof challenge lives: one interactive ceremony. */
|
|
11
|
+
export declare const IDENTITY_PROOF_CHALLENGE_TTL_MS: number;
|
|
12
|
+
/**
|
|
13
|
+
* Everything a root proof may authorize. A challenge is minted for exactly one
|
|
14
|
+
* action and spent only by a proof for that action.
|
|
15
|
+
*/
|
|
16
|
+
export declare const IDENTITY_PROOF_ACTIONS: {
|
|
17
|
+
/**
|
|
18
|
+
* Link Commons' root to an account that has none (`POST /auth/link`).
|
|
19
|
+
* The account becomes self-custodied and its email is deleted
|
|
20
|
+
* (ADR 0029 D3).
|
|
21
|
+
*/
|
|
22
|
+
readonly link: "link_identity";
|
|
23
|
+
};
|
|
24
|
+
export type IdentityProofAction = (typeof IDENTITY_PROOF_ACTIONS)[keyof typeof IDENTITY_PROOF_ACTIONS];
|
|
25
|
+
export declare const IDENTITY_PROOF_ACTION_VALUES: [IdentityProofAction, ...IdentityProofAction[]];
|
|
26
|
+
/**
|
|
27
|
+
* The signed claims. `null` is written explicitly for a field that does not
|
|
28
|
+
* apply, so "absent" can never be confused with a value.
|
|
29
|
+
*/
|
|
30
|
+
export interface IdentityProofClaims {
|
|
31
|
+
action: IdentityProofAction;
|
|
32
|
+
/** The account the operation changes (`users.id`), or a namespaced subject (`username:alice`) before one exists. */
|
|
33
|
+
subject: string;
|
|
34
|
+
/** Who performs it: the signed-in personal principal, or `credential:<id>` / `anonymous` where none exists. */
|
|
35
|
+
actor: string;
|
|
36
|
+
/** The root doing the signing, lowercase uncompressed hex. */
|
|
37
|
+
rootPublicKey: string;
|
|
38
|
+
/** SHA-256 hex of `canonicalJson(payload)`, or `null` when the operation has no payload. */
|
|
39
|
+
payloadDigest: string | null;
|
|
40
|
+
/** The revision the operation expects to replace, or `null` when it replaces nothing. */
|
|
41
|
+
expectedRevision: number | null;
|
|
42
|
+
audience: string;
|
|
43
|
+
/** The one-use server challenge. */
|
|
44
|
+
challenge: string;
|
|
45
|
+
/** Unix milliseconds after which the proof is refused. */
|
|
46
|
+
expiresAt: number;
|
|
47
|
+
}
|
|
48
|
+
export declare const HEX_DIGEST: RegExp;
|
|
49
|
+
export declare const ROOT_KEY: RegExp;
|
|
50
|
+
export declare const CHALLENGE: RegExp;
|
|
51
|
+
/**
|
|
52
|
+
* Canonical JSON: object keys sorted by UTF-16 code unit, no whitespace,
|
|
53
|
+
* `undefined` members omitted, arrays in order. Numbers must be finite. This is
|
|
54
|
+
* the ONLY serializer for anything digested into a proof.
|
|
55
|
+
*/
|
|
56
|
+
export declare function canonicalJson(value: unknown): string;
|
|
57
|
+
/**
|
|
58
|
+
* The exact bytes a root signs. Throws on a malformed claim rather than signing
|
|
59
|
+
* (or verifying) something ambiguous.
|
|
60
|
+
*/
|
|
61
|
+
export declare function buildIdentityProofMessage(claims: IdentityProofClaims): string;
|
|
62
|
+
/**
|
|
63
|
+
* Stable error codes the root routes answer with (`error.code` in the API error
|
|
64
|
+
* body). Clients map these through their localization, never the English message.
|
|
65
|
+
*/
|
|
66
|
+
export declare const IDENTITY_ERROR_CODES: {
|
|
67
|
+
readonly proofInvalid: "IDENTITY_PROOF_INVALID";
|
|
68
|
+
readonly rootAlreadyLinked: "IDENTITY_ROOT_ALREADY_LINKED";
|
|
69
|
+
readonly rootLinkedElsewhere: "IDENTITY_ROOT_LINKED_ELSEWHERE";
|
|
70
|
+
readonly freshFactorRequired: "IDENTITY_FRESH_FACTOR_REQUIRED";
|
|
71
|
+
readonly notPersonal: "IDENTITY_NOT_PERSONAL_ACCOUNT";
|
|
72
|
+
};
|
|
73
|
+
export type IdentityErrorCode = (typeof IDENTITY_ERROR_CODES)[keyof typeof IDENTITY_ERROR_CODES];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@oxy.so/contracts/client` — the contracts without Zod, for client bundles.
|
|
3
|
+
*
|
|
4
|
+
* The root entry is the contract: Zod schemas the API parses with, and the
|
|
5
|
+
* types inferred from them. Zod's runtime is ~120 KB of JavaScript, evaluated
|
|
6
|
+
* at startup, that a client only needed to answer "does this response have
|
|
7
|
+
* the shape its type promises". This entry answers that with small structural
|
|
8
|
+
* checks (`*Check`, used through {@link checkContract} / {@link parseContract}),
|
|
9
|
+
* and carries the constants and pure helpers clients use, so an app or SDK
|
|
10
|
+
* that imports only from here ships no Zod at all.
|
|
11
|
+
*
|
|
12
|
+
* Every check is the twin of one schema in the root entry: it is tied to the
|
|
13
|
+
* schema's type at compile time (`exact` in `./check.ts`) and to its runtime
|
|
14
|
+
* behaviour by `__tests__/clientChecks.parity.test.ts`. Types are not repeated
|
|
15
|
+
* here; import them from `@oxy.so/contracts` with `import type`.
|
|
16
|
+
*/
|
|
17
|
+
export { type Check, type CheckIssue, type CheckPath, type CheckResult, ContractCheckError, checkContract, formatCheckPath, parseContract, } from './check';
|
|
18
|
+
export { ACCOUNT_CATEGORY_IDS, ACCOUNT_CATEGORY_KINDS, ACCOUNT_KINDS, CHILD_ACCOUNT_KINDS, MAX_ACCOUNT_CATEGORIES, RETIRED_ACCOUNT_CATEGORY_IDS, SELECTABLE_ACCOUNT_CATEGORY_IDS, isAccountKind, isDelegatedActAsEligibleKind, isOperatorSwitchTargetKind, isSelectableAccountCategoryId, kindAcceptsAccountCategories, newlyAddedRetiredCategories, } from './accountGraph';
|
|
19
|
+
export { EMAIL_CODE_LENGTH, EMAIL_CODE_MAX_ATTEMPTS, EMAIL_CODE_TTL_MS, EMAIL_TICKET_TTL_MS, EMAIL_VERIFICATION_ERROR_CODES, EMAIL_VERIFICATION_PURPOSES, emailAddressCheck, emailTicketCheck, emailVerificationConfirmResponseCheck, emailVerificationStartResponseCheck, } from './accountEmail';
|
|
20
|
+
export { ACCOUNT_AUTH_METHODS, AGENT_PROOF_ACTIONS, AGENT_PROOF_AUDIENCE, AGENT_PROOF_TTL_MS, agentChallengeRequestCheck, agentKeyListResponseCheck, agentKeyOperationChallengeCheck, agentKeyOperationCheck, agentKeyOperationResultCheck, agentProofClaimsCheck, agentVerifyRequestCheck, executeAgentKeyOperationCheck, } from './agentKeys';
|
|
21
|
+
export { isLoopbackOrigin } from '../capabilityBindings';
|
|
22
|
+
export { loginResultCheck } from './deviceBoot';
|
|
23
|
+
export { externalIdentityReferenceCheck } from './externalIdentity';
|
|
24
|
+
export { signedRecordEnvelopeCheck } from './identity';
|
|
25
|
+
export { deviceActivateResponseCheck, deviceDirectoryCheck, deviceDirectorySyncCheck, } from './deviceDirectory';
|
|
26
|
+
export { SESSION_ACCOUNTS_CHANGED_EVENT, activeTokenCheck, deviceBackgroundCredentialResponseCheck, deviceJoinCodeResponseCheck, deviceJoinResponseCheck, deviceRegisterResponseCheck, deviceSessionStateCheck, deviceSessionSyncCheck, deviceTokenMintResponseCheck, sessionAccountsChangedEventCheck, } from './deviceSession';
|
|
27
|
+
export { IDENTITY_LINK_QR_PREFIX, IDENTITY_LINK_STATUSES, buildIdentityLinkQrPayload, identityLinkCreateResponseCheck, identityLinkStateCheck, parseIdentityLinkQrPayload, } from './identityLink';
|
|
28
|
+
export { IDENTITY_ERROR_CODES, IDENTITY_PROOF_ACTIONS, IDENTITY_PROOF_ACTION_VALUES, IDENTITY_PROOF_AUDIENCE, IDENTITY_PROOF_CHALLENGE_TTL_MS, IDENTITY_PROOF_DOMAIN, IDENTITY_PROOF_VERSION, buildIdentityProofMessage, canonicalJson, } from './identityProof';
|
|
29
|
+
export { ORGANIZATION_ALIAS_KINDS, ORGANIZATION_CLAIM_DECISIONS, ORGANIZATION_CLAIM_STATUSES, ORGANIZATION_ERROR_CODES, ORGANIZATION_NAME_MAX_LENGTH, ORGANIZATION_STATUSES, ORGANIZATION_TYPES, createOrganizationCheck, organizationBatchCheck, organizationCheck, organizationClaimCheck, organizationClaimDetailCheck, organizationClaimInputCheck, organizationClaimListCheck, organizationClaimReviewCheck, organizationCurationResultCheck, organizationExternalCheck, organizationExternalResolutionCheck, organizationImportBatchResultCheck, organizationListCheck, organizationNameCheck, updateOrganizationCheck, } from './organizations';
|
|
30
|
+
export { cancelProductSubscriptionCheck, personalPlanCatalogueCheck, personalPlanCheckoutRequestCheck, personalPlanCheckoutResultCheck, productSubscriptionCancellationResultCheck, productSubscriptionsResponseCheck, subjectProductAccessCheck, subjectProductAccessQueryCheck, subscriptionCreditGrantsResponseCheck, } from './products';
|
|
31
|
+
export { recommendationRequestCheck } from './recommendations';
|
|
32
|
+
export { isFullReputationBalance } from './reputation';
|
|
33
|
+
export { PURCHASE_APPROVAL_STATUSES, SAFETY_POLICY_VERSION, SUPERVISED_ACTIONS, SUPERVISION_CONSENT_VERSION, SUPERVISION_INVITATION_STATUSES, SUPERVISION_STATUSES, profileAccessDecisionCheck, profileAccessInputCheck, purchaseApprovalCheck, purchaseApprovalListCheck, purchaseReviewInputCheck, safetyOrganizationsInputCheck, safetyOrganizationsResponseCheck, safetyPeopleInputCheck, safetyPeopleResponseCheck, supervisionAcceptInputCheck, supervisionContactInputCheck, supervisionContactsResponseCheck, supervisionInvitationCheck, supervisionInviteInputCheck, supervisionReviewInputCheck, supervisionStateCheck, } from './safety';
|
|
34
|
+
export { publicApplicationCheck } from './sessionStatus';
|
|
35
|
+
export { EMAIL_ACCOUNTS_MAX, EMAIL_SIGNIN_CHOICE_TTL_MS, EMAIL_SIGNIN_LINK_TTL_MS, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, REAUTH_ACTIONS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGN_IN_ERROR_CODES, TOTP_BACKUP_CODE_COUNT, TOTP_DIGITS, TOTP_PERIOD_SECONDS, emailSignInChooseAccountCheck, emailSignInLinkResponseCheck, emailSignInPendingCheck, emailSignInStartResponseCheck, isEmailSignInChooseAccount, isSecondFactorRequired, normalizeEmailSignInCode, reauthProofCheck, secondFactorRequiredCheck, signInMethodsCheck, totpBackupCodesResponseCheck, totpEnrollResponseCheck, } from './signIn';
|
|
36
|
+
export { BOT_USERNAME_INVALID_MESSAGE, BOT_USERNAME_SUFFIX, NUMERIC_USERNAME_MESSAGE, RESERVED_USERNAMES, RESERVED_USERNAME_MESSAGE, USERNAME_INVALID_MESSAGE, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, USERNAME_PATTERN_SOURCE, applyBotUsernameSuffix, botUsernameCheck, stripDisallowedUsernameCharacters, usernameCheck, usernameCheckForAccountKind, } from './username';
|
|
37
|
+
export { userNameCheck } from './userResponse';
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organization vocabularies and checks, without Zod. Schemas: `../organizations.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import { type Check } from './check';
|
|
7
|
+
/** Real-world identity classification, independent of account topics and permissions. */
|
|
8
|
+
export declare const ORGANIZATION_TYPES: readonly ["business", "nonprofit", "public_body", "community", "other"];
|
|
9
|
+
export declare const ORGANIZATION_STATUSES: readonly ["active", "inactive", "merged", "suppressed"];
|
|
10
|
+
export declare const ORGANIZATION_CLAIM_STATUSES: readonly ["unclaimed", "claimed"];
|
|
11
|
+
export declare const ORGANIZATION_ALIAS_KINDS: readonly ["name_variant", "former_name", "localized_name", "marketing_name", "misspelling"];
|
|
12
|
+
export declare const ORGANIZATION_CLAIM_DECISIONS: readonly ["pending", "approved", "rejected"];
|
|
13
|
+
export declare const ORGANIZATION_NAME_MAX_LENGTH = 300;
|
|
14
|
+
export declare const ORGANIZATION_ERROR_CODES: readonly ["bad_request", "unauthorized", "forbidden", "not_found", "unknown_route", "conflict", "validation_failed", "rate_limited", "internal_error", "service_unavailable"];
|
|
15
|
+
/** The twin of `organizationNameSchema`. */
|
|
16
|
+
export declare const organizationNameCheck: Check<string>;
|
|
17
|
+
export declare const createOrganizationCheck: Check<{
|
|
18
|
+
name: string;
|
|
19
|
+
organizationType: "business" | "nonprofit" | "public_body" | "community" | "other";
|
|
20
|
+
legalName?: string | null | undefined;
|
|
21
|
+
websiteUrl?: string | null | undefined;
|
|
22
|
+
countryCode?: string | null | undefined;
|
|
23
|
+
aliases?: {
|
|
24
|
+
alias: string;
|
|
25
|
+
kind: "name_variant" | "former_name" | "localized_name" | "marketing_name" | "misspelling";
|
|
26
|
+
language?: string | undefined;
|
|
27
|
+
}[] | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const updateOrganizationCheck: Check<{
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
organizationType?: "business" | "nonprofit" | "public_body" | "community" | "other" | undefined;
|
|
32
|
+
legalName?: string | null | undefined;
|
|
33
|
+
websiteUrl?: string | null | undefined;
|
|
34
|
+
countryCode?: string | null | undefined;
|
|
35
|
+
aliases?: {
|
|
36
|
+
alias: string;
|
|
37
|
+
kind: "name_variant" | "former_name" | "localized_name" | "marketing_name" | "misspelling";
|
|
38
|
+
language?: string | undefined;
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const organizationCheck: Check<{
|
|
42
|
+
status: "active" | "inactive" | "merged" | "suppressed";
|
|
43
|
+
name: string;
|
|
44
|
+
organizationType: "business" | "nonprofit" | "public_body" | "community" | "other";
|
|
45
|
+
legalName: string | null;
|
|
46
|
+
websiteUrl: string | null;
|
|
47
|
+
countryCode: string | null;
|
|
48
|
+
aliases: {
|
|
49
|
+
alias: string;
|
|
50
|
+
kind: "name_variant" | "former_name" | "localized_name" | "marketing_name" | "misspelling";
|
|
51
|
+
language?: string | undefined;
|
|
52
|
+
}[];
|
|
53
|
+
accountId: string;
|
|
54
|
+
username: string | null;
|
|
55
|
+
avatar: string | null;
|
|
56
|
+
verifiedDomains: string[];
|
|
57
|
+
claimStatus: "unclaimed" | "claimed";
|
|
58
|
+
mergedIntoAccountId: string | null;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
updatedAt: string;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const organizationListCheck: Check<{
|
|
63
|
+
items: {
|
|
64
|
+
status: "active" | "inactive" | "merged" | "suppressed";
|
|
65
|
+
name: string;
|
|
66
|
+
organizationType: "business" | "nonprofit" | "public_body" | "community" | "other";
|
|
67
|
+
legalName: string | null;
|
|
68
|
+
websiteUrl: string | null;
|
|
69
|
+
countryCode: string | null;
|
|
70
|
+
aliases: {
|
|
71
|
+
alias: string;
|
|
72
|
+
kind: "name_variant" | "former_name" | "localized_name" | "marketing_name" | "misspelling";
|
|
73
|
+
language?: string | undefined;
|
|
74
|
+
}[];
|
|
75
|
+
accountId: string;
|
|
76
|
+
username: string | null;
|
|
77
|
+
avatar: string | null;
|
|
78
|
+
verifiedDomains: string[];
|
|
79
|
+
claimStatus: "unclaimed" | "claimed";
|
|
80
|
+
mergedIntoAccountId: string | null;
|
|
81
|
+
createdAt: string;
|
|
82
|
+
updatedAt: string;
|
|
83
|
+
}[];
|
|
84
|
+
nextCursor: string | null;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const organizationBatchCheck: Check<{
|
|
87
|
+
items: {
|
|
88
|
+
requestedAccountId: string;
|
|
89
|
+
organization: {
|
|
90
|
+
status: "active" | "inactive" | "merged" | "suppressed";
|
|
91
|
+
name: string;
|
|
92
|
+
organizationType: "business" | "nonprofit" | "public_body" | "community" | "other";
|
|
93
|
+
legalName: string | null;
|
|
94
|
+
websiteUrl: string | null;
|
|
95
|
+
countryCode: string | null;
|
|
96
|
+
aliases: {
|
|
97
|
+
alias: string;
|
|
98
|
+
kind: "name_variant" | "former_name" | "localized_name" | "marketing_name" | "misspelling";
|
|
99
|
+
language?: string | undefined;
|
|
100
|
+
}[];
|
|
101
|
+
accountId: string;
|
|
102
|
+
username: string | null;
|
|
103
|
+
avatar: string | null;
|
|
104
|
+
verifiedDomains: string[];
|
|
105
|
+
claimStatus: "unclaimed" | "claimed";
|
|
106
|
+
mergedIntoAccountId: string | null;
|
|
107
|
+
createdAt: string;
|
|
108
|
+
updatedAt: string;
|
|
109
|
+
};
|
|
110
|
+
}[];
|
|
111
|
+
missingIds: string[];
|
|
112
|
+
}>;
|
|
113
|
+
export declare const organizationClaimInputCheck: Check<{
|
|
114
|
+
evidenceReference: string;
|
|
115
|
+
}>;
|
|
116
|
+
export declare const organizationClaimCheck: Check<{
|
|
117
|
+
status: "pending" | "approved" | "rejected";
|
|
118
|
+
accountId: string;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
id: string;
|
|
121
|
+
claimantUserId: string;
|
|
122
|
+
}>;
|
|
123
|
+
export declare const organizationClaimDetailCheck: Check<{
|
|
124
|
+
status: "pending" | "approved" | "rejected";
|
|
125
|
+
accountId: string;
|
|
126
|
+
createdAt: string;
|
|
127
|
+
evidenceReference: string;
|
|
128
|
+
id: string;
|
|
129
|
+
claimantUserId: string;
|
|
130
|
+
reviewEvidenceReference: string | null;
|
|
131
|
+
reviewedAt: string | null;
|
|
132
|
+
}>;
|
|
133
|
+
export declare const organizationClaimListCheck: Check<{
|
|
134
|
+
items: {
|
|
135
|
+
status: "pending" | "approved" | "rejected";
|
|
136
|
+
accountId: string;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
evidenceReference: string;
|
|
139
|
+
id: string;
|
|
140
|
+
claimantUserId: string;
|
|
141
|
+
reviewEvidenceReference: string | null;
|
|
142
|
+
reviewedAt: string | null;
|
|
143
|
+
}[];
|
|
144
|
+
nextCursor: string | null;
|
|
145
|
+
}>;
|
|
146
|
+
export declare const organizationClaimReviewCheck: Check<{
|
|
147
|
+
evidenceReference: string;
|
|
148
|
+
decision: "approved" | "rejected";
|
|
149
|
+
}>;
|
|
150
|
+
export declare const organizationImportBatchResultCheck: Check<{
|
|
151
|
+
items: {
|
|
152
|
+
accountId: string;
|
|
153
|
+
externalId: string;
|
|
154
|
+
created: boolean;
|
|
155
|
+
}[];
|
|
156
|
+
}>;
|
|
157
|
+
export declare const organizationExternalCheck: Check<{
|
|
158
|
+
accountId: string;
|
|
159
|
+
created: boolean;
|
|
160
|
+
}>;
|
|
161
|
+
export declare const organizationExternalResolutionCheck: Check<{
|
|
162
|
+
accountId: string;
|
|
163
|
+
}>;
|
|
164
|
+
export declare const organizationCurationResultCheck: Check<{
|
|
165
|
+
status: "active" | "inactive" | "suppressed";
|
|
166
|
+
accountId: string;
|
|
167
|
+
}>;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product access, plans, checkout and subscription checks, without Zod.
|
|
3
|
+
* Schemas: `../products/*.ts`.
|
|
4
|
+
*
|
|
5
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
6
|
+
*/
|
|
7
|
+
export declare const subjectProductAccessQueryCheck: import("./check").Check<{
|
|
8
|
+
schemaVersion: 1;
|
|
9
|
+
subjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
10
|
+
productId: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const subjectProductAccessCheck: import("./check").Check<{
|
|
13
|
+
schemaVersion: 1;
|
|
14
|
+
subjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
15
|
+
capabilities: {
|
|
16
|
+
key: string;
|
|
17
|
+
grantIds: string[];
|
|
18
|
+
}[];
|
|
19
|
+
evaluatedAt: string;
|
|
20
|
+
productId: string;
|
|
21
|
+
quotas: {
|
|
22
|
+
key: string;
|
|
23
|
+
unit: string;
|
|
24
|
+
included: number;
|
|
25
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
26
|
+
grantIds: string[];
|
|
27
|
+
}[];
|
|
28
|
+
conflicts: {
|
|
29
|
+
key: string;
|
|
30
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
31
|
+
grantIds: string[];
|
|
32
|
+
}[];
|
|
33
|
+
}>;
|
|
34
|
+
export declare const personalPlanCatalogueCheck: import("./check").Check<{
|
|
35
|
+
schemaVersion: 1;
|
|
36
|
+
state: "unconfigured" | "configured";
|
|
37
|
+
purchase: "unavailable";
|
|
38
|
+
plans: {
|
|
39
|
+
kind: "oxy_one";
|
|
40
|
+
displayName: string;
|
|
41
|
+
audience: "personal";
|
|
42
|
+
benefits: {
|
|
43
|
+
displayName: string;
|
|
44
|
+
benefit: {
|
|
45
|
+
kind: "capability";
|
|
46
|
+
key: string;
|
|
47
|
+
productId: string;
|
|
48
|
+
} | {
|
|
49
|
+
kind: "quota";
|
|
50
|
+
key: string;
|
|
51
|
+
unit: string;
|
|
52
|
+
included: number;
|
|
53
|
+
productId: string;
|
|
54
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
55
|
+
};
|
|
56
|
+
}[];
|
|
57
|
+
offerId: string;
|
|
58
|
+
offerVersion: number;
|
|
59
|
+
price?: {
|
|
60
|
+
currency: string;
|
|
61
|
+
amountMinorUnits: number;
|
|
62
|
+
interval: "month";
|
|
63
|
+
trial: "none";
|
|
64
|
+
taxTreatment: "inclusive";
|
|
65
|
+
merchantTotal: "final";
|
|
66
|
+
} | undefined;
|
|
67
|
+
}[];
|
|
68
|
+
}>;
|
|
69
|
+
export declare const personalPlanCheckoutRequestCheck: import("./check").Check<{
|
|
70
|
+
idempotencyKey: string;
|
|
71
|
+
offerId: string;
|
|
72
|
+
offerVersion: number;
|
|
73
|
+
expectedSubjectAccountId: string & import("zod").BRAND<"OxyAccountId">;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const personalPlanCheckoutResultCheck: import("./check").Check<{
|
|
76
|
+
reason: "provider_unconfigured" | "offer_unconfigured" | "price_unconfigured";
|
|
77
|
+
state: "unconfigured";
|
|
78
|
+
} | {
|
|
79
|
+
state: "pending";
|
|
80
|
+
intentId: string;
|
|
81
|
+
checkoutUrl?: string | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
state: "closed";
|
|
84
|
+
intentId: string;
|
|
85
|
+
} | {
|
|
86
|
+
state: "fulfilled";
|
|
87
|
+
intentId: string;
|
|
88
|
+
}>;
|
|
89
|
+
export declare const productSubscriptionsResponseCheck: import("./check").Check<{
|
|
90
|
+
subscriptions: {
|
|
91
|
+
status: "active" | "incomplete" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
92
|
+
sourceId: string;
|
|
93
|
+
cancelAtPeriodEnd: boolean;
|
|
94
|
+
period: {
|
|
95
|
+
start: string;
|
|
96
|
+
end: string;
|
|
97
|
+
};
|
|
98
|
+
canCancel: boolean;
|
|
99
|
+
offers: {
|
|
100
|
+
displayName: string;
|
|
101
|
+
period: {
|
|
102
|
+
start: string;
|
|
103
|
+
end: string;
|
|
104
|
+
};
|
|
105
|
+
offerId: string;
|
|
106
|
+
offerVersion: number;
|
|
107
|
+
origin: "bundle" | "individual";
|
|
108
|
+
segmentId: string;
|
|
109
|
+
current: boolean;
|
|
110
|
+
products: {
|
|
111
|
+
id: string;
|
|
112
|
+
displayName: string;
|
|
113
|
+
}[];
|
|
114
|
+
}[];
|
|
115
|
+
}[];
|
|
116
|
+
}>;
|
|
117
|
+
export declare const subscriptionCreditGrantsResponseCheck: import("./check").Check<{
|
|
118
|
+
grants: {
|
|
119
|
+
createdAt: string;
|
|
120
|
+
id: string;
|
|
121
|
+
granted: number;
|
|
122
|
+
remaining: number;
|
|
123
|
+
period: {
|
|
124
|
+
start: string;
|
|
125
|
+
end: string;
|
|
126
|
+
};
|
|
127
|
+
origin: "subscription_payment" | "subscription_proration" | "subscription_promotional_grant";
|
|
128
|
+
invoiceId: string;
|
|
129
|
+
consumed: number;
|
|
130
|
+
clawed: number;
|
|
131
|
+
promotionId: string | null;
|
|
132
|
+
}[];
|
|
133
|
+
}>;
|
|
134
|
+
export declare const cancelProductSubscriptionCheck: import("./check").Check<{
|
|
135
|
+
sourceId: string;
|
|
136
|
+
actionId?: string | undefined;
|
|
137
|
+
expectedSubjectAccountId?: (string & import("zod").BRAND<"OxyAccountId">) | undefined;
|
|
138
|
+
}>;
|
|
139
|
+
export declare const productSubscriptionCancellationResultCheck: import("./check").Check<{
|
|
140
|
+
sourceId: string;
|
|
141
|
+
cancelAtPeriodEnd: true;
|
|
142
|
+
} | {
|
|
143
|
+
sourceId: string;
|
|
144
|
+
reconciliationPending: true;
|
|
145
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The recommendation-request check, without Zod. Schemas: `../recommendations.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const recommendationRequestCheck: import("./check").Check<{
|
|
7
|
+
limit?: number | undefined;
|
|
8
|
+
clientId?: string | undefined;
|
|
9
|
+
offset?: number | undefined;
|
|
10
|
+
excludeTypes?: ("agent" | "federated" | "automated")[] | undefined;
|
|
11
|
+
excludeIds?: string[] | undefined;
|
|
12
|
+
boosts?: {
|
|
13
|
+
userIds: string[];
|
|
14
|
+
weight: number;
|
|
15
|
+
reason?: string | undefined;
|
|
16
|
+
}[] | undefined;
|
|
17
|
+
signalWeights?: {
|
|
18
|
+
verified?: number | undefined;
|
|
19
|
+
graph?: number | undefined;
|
|
20
|
+
completeness?: number | undefined;
|
|
21
|
+
curation?: number | undefined;
|
|
22
|
+
interest?: number | undefined;
|
|
23
|
+
appBoost?: number | undefined;
|
|
24
|
+
repCandidate?: number | undefined;
|
|
25
|
+
affinity?: number | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reputation view guard, without Zod. Schemas: `../reputation.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Part of `@oxy.so/contracts/client`: never import `zod` here (see `./check.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { ReputationBalance, ReputationBalanceView } from '../reputation';
|
|
7
|
+
/**
|
|
8
|
+
* The fields the full {@link ReputationBalance} carries beyond the public
|
|
9
|
+
* {@link ReputationBalanceSummary} that the API sends ALL-OR-NOTHING. The
|
|
10
|
+
* runtime discriminant between the two views.
|
|
11
|
+
*
|
|
12
|
+
* The V2 blocks (`conduct`, `contribution`, …) are deliberately NOT listed:
|
|
13
|
+
* they are optional on the wire, so requiring them here would make a balance
|
|
14
|
+
* from a server that predates them fail to narrow, hiding the whole private
|
|
15
|
+
* view. Read a V2 block by checking that block.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FULL_BALANCE_FIELDS: readonly ["positive", "negative", "breakdown", "influence", "reliability", "recalculatedAt", "updatedAt"];
|
|
18
|
+
/**
|
|
19
|
+
* Whether a balance came back as the SUBJECT view, and so carries the
|
|
20
|
+
* breakdown / influence / reliability blocks.
|
|
21
|
+
*
|
|
22
|
+
* Checks every extra field rather than one representative: the point of the
|
|
23
|
+
* guard is that the caller then dereferences those blocks, so a partial payload
|
|
24
|
+
* must not narrow.
|
|
25
|
+
*
|
|
26
|
+
* @param balance - A balance from `getReputationBalance`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isFullReputationBalance(balance: ReputationBalanceView): balance is ReputationBalance;
|