@oxyhq/contracts 0.16.0 → 0.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/index.js +5 -3
- package/dist/cjs/userResponse.js +27 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/userResponse.js +26 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/sessionStatus.d.ts +6 -6
- package/dist/types/userResponse.d.ts +256 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* expo, no `require()` in the ESM build.
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.webauthnLoginVerifyRequestSchema = exports.webauthnRegisterVerifyRequestSchema = exports.webauthnLoginOptionsRequestSchema = exports.webauthnRegisterOptionsRequestSchema = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = void 0;
|
|
14
|
+
exports.validationOpenResultSchema = exports.validationOpenRequestSchema = exports.validationVerdictRecordSchema = exports.realLifeAttestationResultSchema = exports.realLifeAttestationRecordSchema = exports.signedPublicCardSchema = exports.publicCardSchema = exports.logPageResponseSchema = exports.chainHeadResponseSchema = exports.oxySignedRecordTypeSchema = exports.exportBundleSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = exports.appAffinityEventsIngestSchema = exports.appAffinityEventSchema = exports.appAffinityEventTypeSchema = exports.appUserSignalIngestSchema = exports.appInterestInputSchema = exports.appEndorsementInputSchema = exports.recommendationResponseSchema = exports.recommendationItemSchema = exports.recommendationCountSchema = exports.recommendationRequestSchema = exports.recommendationSignalWeightsSchema = exports.recommendationBoostSchema = exports.recommendationExcludeTypeSchema = exports.sessionStatusSchema = exports.publicApplicationSchema = exports.applicationTypeSchema = exports.safeParseContract = exports.resolveUserId = exports.deviceLinkedSessionsResponseSchema = exports.deviceLinkedSessionSchema = exports.currentUserResponseSchema = exports.userProfileUpdateSchema = exports.userResponseSchema = exports.themePreferenceSchema = exports.userRelationshipSchema = exports.userNameSchema = exports.createAccountRequestSchema = exports.organizationCategorySchema = exports.ORGANIZATION_CATEGORIES = void 0;
|
|
15
|
+
exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = exports.deviceHubTicketRedeemResponseSchema = exports.deviceHubTicketRedeemRequestSchema = exports.deviceHubTicketIssueResponseSchema = exports.deviceHubTicketIssueRequestSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.linkPreviewResponseSchema = exports.linkPreviewBatchResponseSchema = exports.linkPreviewBatchRequestSchema = exports.linkPreviewSchema = exports.credentialVerifyResultSchema = exports.credentialListResultSchema = exports.credentialIssueResultSchema = exports.verifiableCredentialResponseSchema = exports.credentialRecordSchema = exports.vouchResultSchema = exports.personhoodStatusResultSchema = exports.personhoodBreakdownSchema = exports.personhoodVouchRecordSchema = exports.validationVoteResultSchema = exports.validationRequestSummarySchema = void 0;
|
|
16
|
+
exports.webauthnLoginVerifyRequestSchema = exports.webauthnRegisterVerifyRequestSchema = exports.webauthnLoginOptionsRequestSchema = exports.webauthnRegisterOptionsRequestSchema = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = void 0;
|
|
17
17
|
var accountGraph_1 = require("./accountGraph");
|
|
18
18
|
Object.defineProperty(exports, "ORGANIZATION_CATEGORIES", { enumerable: true, get: function () { return accountGraph_1.ORGANIZATION_CATEGORIES; } });
|
|
19
19
|
Object.defineProperty(exports, "organizationCategorySchema", { enumerable: true, get: function () { return accountGraph_1.organizationCategorySchema; } });
|
|
@@ -21,6 +21,8 @@ Object.defineProperty(exports, "createAccountRequestSchema", { enumerable: true,
|
|
|
21
21
|
var userResponse_1 = require("./userResponse");
|
|
22
22
|
// Schemas
|
|
23
23
|
Object.defineProperty(exports, "userNameSchema", { enumerable: true, get: function () { return userResponse_1.userNameSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "userRelationshipSchema", { enumerable: true, get: function () { return userResponse_1.userRelationshipSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "themePreferenceSchema", { enumerable: true, get: function () { return userResponse_1.themePreferenceSchema; } });
|
|
24
26
|
Object.defineProperty(exports, "userResponseSchema", { enumerable: true, get: function () { return userResponse_1.userResponseSchema; } });
|
|
25
27
|
Object.defineProperty(exports, "userProfileUpdateSchema", { enumerable: true, get: function () { return userResponse_1.userProfileUpdateSchema; } });
|
|
26
28
|
Object.defineProperty(exports, "currentUserResponseSchema", { enumerable: true, get: function () { return userResponse_1.currentUserResponseSchema; } });
|
package/dist/cjs/userResponse.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* `require()`).
|
|
31
31
|
*/
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.deviceLinkedSessionsResponseSchema = exports.deviceLinkedSessionSchema = exports.currentUserResponseSchema = exports.userProfileUpdateSchema = exports.userResponseSchema = exports.userNameSchema = void 0;
|
|
33
|
+
exports.deviceLinkedSessionsResponseSchema = exports.deviceLinkedSessionSchema = exports.currentUserResponseSchema = exports.userProfileUpdateSchema = exports.userResponseSchema = exports.themePreferenceSchema = exports.userRelationshipSchema = exports.userNameSchema = void 0;
|
|
34
34
|
exports.resolveUserId = resolveUserId;
|
|
35
35
|
exports.safeParseContract = safeParseContract;
|
|
36
36
|
const zod_1 = require("zod");
|
|
@@ -44,6 +44,14 @@ exports.userNameSchema = zod_1.z
|
|
|
44
44
|
displayName: zod_1.z.string().optional(),
|
|
45
45
|
})
|
|
46
46
|
.passthrough();
|
|
47
|
+
exports.userRelationshipSchema = zod_1.z.object({
|
|
48
|
+
isFollowing: zod_1.z.boolean(),
|
|
49
|
+
followsYou: zod_1.z.boolean(),
|
|
50
|
+
});
|
|
51
|
+
exports.themePreferenceSchema = zod_1.z.object({
|
|
52
|
+
mode: zod_1.z.enum(['light', 'dark', 'system']),
|
|
53
|
+
colorPreset: zod_1.z.string(),
|
|
54
|
+
});
|
|
47
55
|
/**
|
|
48
56
|
* The canonical user object emitted by `formatUserResponse`.
|
|
49
57
|
*
|
|
@@ -102,6 +110,19 @@ exports.userResponseSchema = zod_1.z
|
|
|
102
110
|
* Absent on personal, project, and bot accounts.
|
|
103
111
|
*/
|
|
104
112
|
organizationCategory: accountGraph_1.organizationCategorySchema.optional(),
|
|
113
|
+
/**
|
|
114
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
115
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
116
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
117
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
118
|
+
*/
|
|
119
|
+
relationship: exports.userRelationshipSchema.optional(),
|
|
120
|
+
/**
|
|
121
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
122
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
123
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
124
|
+
*/
|
|
125
|
+
themePreference: exports.themePreferenceSchema.optional(),
|
|
105
126
|
})
|
|
106
127
|
.passthrough();
|
|
107
128
|
exports.userProfileUpdateSchema = zod_1.z
|
|
@@ -142,6 +163,11 @@ exports.userProfileUpdateSchema = zod_1.z
|
|
|
142
163
|
notificationPreferences: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
143
164
|
userPreferences: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
144
165
|
privacySettings: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
166
|
+
/**
|
|
167
|
+
* Portable theme preference. Written through the same `PUT /users/me`
|
|
168
|
+
* settings-update path as `languages`/`userPreferences`.
|
|
169
|
+
*/
|
|
170
|
+
themePreference: exports.themePreferenceSchema.optional(),
|
|
145
171
|
})
|
|
146
172
|
.passthrough();
|
|
147
173
|
/**
|