@oxy.so/contracts 6.6.0 → 6.7.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/safety.js +21 -2
- package/dist/esm/safety.js +19 -0
- package/dist/types/safety.d.ts +42 -0
- package/package.json +2 -2
package/dist/cjs/safety.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.safetyOrganizationsResponseSchema = exports.safetyOrganizationsInputSchema = exports.safetyOrganizationIdentitySchema = exports.safetyPeopleResponseSchema = exports.safetyPeopleInputSchema = exports.safetyPersonSchema = exports.safetySessionValidationSchema = exports.safetySessionInputSchema = exports.purchaseReviewInputSchema = exports.supervisionReviewInputSchema = exports.supervisionContactInputSchema = exports.supervisionAcceptInputSchema = exports.supervisionInviteInputSchema = void 0;
|
|
3
|
+
exports.confirmPurchaseSchema = exports.reservePurchaseSchema = exports.purchaseApprovalListSchema = exports.purchaseApprovalSummarySchema = exports.purchaseApprovalSchema = exports.purchaseEffectsSchema = exports.purchaseApprovalLineSchema = exports.supervisionContactsResponseSchema = exports.supervisionStateSchema = exports.supervisionContactSchema = exports.supervisionInvitationSchema = exports.supervisionSchema = exports.safetyRequesterSchema = exports.messagingSessionsResponseSchema = exports.messagingSessionsInputSchema = exports.notificationAccessBatchResponseSchema = exports.notificationAccessBatchInputSchema = exports.notificationAccessInputSchema = exports.messageAccessBatchResponseSchema = exports.deliveryAccessBatchInputSchema = exports.messageAccessBatchInputSchema = exports.deliveryAccessInputSchema = exports.contentAccessBatchResponseSchema = exports.contentAccessBatchInputSchema = exports.publicationPoliciesResponseSchema = exports.publicationPoliciesInputSchema = exports.publicationPolicySchema = exports.contentAccessInputSchema = exports.CONTENT_CLASSIFICATIONS = exports.contactAccessResponseSchema = exports.contactAccessInputSchema = exports.messageAccessInputSchema = exports.MESSAGE_ACCESS_MAX_INPUT_BYTES = exports.MESSAGE_ACCESS_MAX_PARTICIPANT_SLOTS = exports.MESSAGE_ACCESS_MAX_SUPERVISED_PARTICIPANTS = exports.MESSAGE_ACCESS_MAX_PARTICIPANTS = exports.MESSAGE_ACCESS_MAX_RESOURCES = exports.profileAccessBatchResponseSchema = exports.profileAccessBatchInputSchema = exports.safetyDecisionSchema = exports.SAFETY_DECISION_REASONS = exports.profileAccessDecisionSchema = exports.profileAccessInputSchema = exports.SUPERVISION_STATUSES = exports.SUPERVISION_INVITATION_STATUSES = exports.SUPERVISION_CONSENT_VERSION = exports.SUPERVISION_CHANGED_EVENT = exports.SUPERVISED_ACTIONS = exports.SAFETY_POLICY_VERSION = exports.PURCHASE_APPROVAL_STATUSES = void 0;
|
|
4
|
+
exports.safetyOrganizationsResponseSchema = exports.safetyOrganizationsInputSchema = exports.safetyOrganizationIdentitySchema = exports.safetyPeopleResponseSchema = exports.safetyPeopleInputSchema = exports.safetyPersonSchema = exports.safetySessionValidationSchema = exports.safetySessionInputSchema = exports.purchaseReviewInputSchema = exports.supervisionReviewInputSchema = exports.supervisionContactInputSchema = exports.supervisionAcceptInputSchema = exports.supervisionInviteInputSchema = exports.safetyErrorSchema = exports.SAFETY_ERROR_CODES = exports.cancelPurchaseSchema = void 0;
|
|
5
5
|
const numberChecks_1 = require("./numberChecks");
|
|
6
6
|
const stringChecks_1 = require("./stringChecks");
|
|
7
7
|
const zod_1 = require("zod");
|
|
@@ -172,6 +172,25 @@ const messageBatch = (schema) => zod_1.z
|
|
|
172
172
|
exports.messageAccessBatchInputSchema = messageBatch(exports.messageAccessInputSchema);
|
|
173
173
|
exports.deliveryAccessBatchInputSchema = messageBatch(exports.deliveryAccessInputSchema);
|
|
174
174
|
exports.messageAccessBatchResponseSchema = exports.contentAccessBatchResponseSchema;
|
|
175
|
+
/**
|
|
176
|
+
* May `actorAccountId`'s activity notify `recipientAccountId`? A reviewed
|
|
177
|
+
* background consumer asks before a socket emit or push, with no human proof:
|
|
178
|
+
* the decision covers blocks in either direction, availability and supervised
|
|
179
|
+
* contact approval, and discloses nothing else.
|
|
180
|
+
*/
|
|
181
|
+
exports.notificationAccessInputSchema = zod_1.z
|
|
182
|
+
.object({ resourceId, actorAccountId: accountId, recipientAccountId: accountId })
|
|
183
|
+
.strict();
|
|
184
|
+
exports.notificationAccessBatchInputSchema = zod_1.z
|
|
185
|
+
.object({
|
|
186
|
+
items: zod_1.z
|
|
187
|
+
.array(exports.notificationAccessInputSchema)
|
|
188
|
+
.min(1)
|
|
189
|
+
.max(100)
|
|
190
|
+
.refine((items) => new Set(items.map((item) => item.resourceId)).size === items.length, 'Resource IDs must be unique'),
|
|
191
|
+
})
|
|
192
|
+
.strict();
|
|
193
|
+
exports.notificationAccessBatchResponseSchema = exports.contentAccessBatchResponseSchema;
|
|
175
194
|
/** Live socket-recipient proof; a request ID correlates the result and never identifies an account. */
|
|
176
195
|
exports.messagingSessionsInputSchema = zod_1.z
|
|
177
196
|
.object({
|
package/dist/esm/safety.js
CHANGED
|
@@ -162,6 +162,25 @@ const messageBatch = (schema) => z
|
|
|
162
162
|
export const messageAccessBatchInputSchema = messageBatch(messageAccessInputSchema);
|
|
163
163
|
export const deliveryAccessBatchInputSchema = messageBatch(deliveryAccessInputSchema);
|
|
164
164
|
export const messageAccessBatchResponseSchema = contentAccessBatchResponseSchema;
|
|
165
|
+
/**
|
|
166
|
+
* May `actorAccountId`'s activity notify `recipientAccountId`? A reviewed
|
|
167
|
+
* background consumer asks before a socket emit or push, with no human proof:
|
|
168
|
+
* the decision covers blocks in either direction, availability and supervised
|
|
169
|
+
* contact approval, and discloses nothing else.
|
|
170
|
+
*/
|
|
171
|
+
export const notificationAccessInputSchema = z
|
|
172
|
+
.object({ resourceId, actorAccountId: accountId, recipientAccountId: accountId })
|
|
173
|
+
.strict();
|
|
174
|
+
export const notificationAccessBatchInputSchema = z
|
|
175
|
+
.object({
|
|
176
|
+
items: z
|
|
177
|
+
.array(notificationAccessInputSchema)
|
|
178
|
+
.min(1)
|
|
179
|
+
.max(100)
|
|
180
|
+
.refine((items) => new Set(items.map((item) => item.resourceId)).size === items.length, 'Resource IDs must be unique'),
|
|
181
|
+
})
|
|
182
|
+
.strict();
|
|
183
|
+
export const notificationAccessBatchResponseSchema = contentAccessBatchResponseSchema;
|
|
165
184
|
/** Live socket-recipient proof; a request ID correlates the result and never identifies an account. */
|
|
166
185
|
export const messagingSessionsInputSchema = z
|
|
167
186
|
.object({
|
package/dist/types/safety.d.ts
CHANGED
|
@@ -231,6 +231,48 @@ export declare const messageAccessBatchResponseSchema: z.ZodObject<{
|
|
|
231
231
|
}, z.core.$strict>;
|
|
232
232
|
export type MessageAccessBatchInput = z.infer<typeof messageAccessBatchInputSchema>;
|
|
233
233
|
export type DeliveryAccessBatchInput = z.infer<typeof deliveryAccessBatchInputSchema>;
|
|
234
|
+
/**
|
|
235
|
+
* May `actorAccountId`'s activity notify `recipientAccountId`? A reviewed
|
|
236
|
+
* background consumer asks before a socket emit or push, with no human proof:
|
|
237
|
+
* the decision covers blocks in either direction, availability and supervised
|
|
238
|
+
* contact approval, and discloses nothing else.
|
|
239
|
+
*/
|
|
240
|
+
export declare const notificationAccessInputSchema: z.ZodObject<{
|
|
241
|
+
resourceId: z.ZodString;
|
|
242
|
+
actorAccountId: z.ZodString;
|
|
243
|
+
recipientAccountId: z.ZodString;
|
|
244
|
+
}, z.core.$strict>;
|
|
245
|
+
export declare const notificationAccessBatchInputSchema: z.ZodObject<{
|
|
246
|
+
items: z.ZodArray<z.ZodObject<{
|
|
247
|
+
resourceId: z.ZodString;
|
|
248
|
+
actorAccountId: z.ZodString;
|
|
249
|
+
recipientAccountId: z.ZodString;
|
|
250
|
+
}, z.core.$strict>>;
|
|
251
|
+
}, z.core.$strict>;
|
|
252
|
+
export declare const notificationAccessBatchResponseSchema: z.ZodObject<{
|
|
253
|
+
items: z.ZodArray<z.ZodObject<{
|
|
254
|
+
resourceId: z.ZodString;
|
|
255
|
+
decision: z.ZodObject<{
|
|
256
|
+
allowed: z.ZodBoolean;
|
|
257
|
+
reason: z.ZodEnum<{
|
|
258
|
+
owner: "owner";
|
|
259
|
+
unavailable: "unavailable";
|
|
260
|
+
allowed: "allowed";
|
|
261
|
+
blocked: "blocked";
|
|
262
|
+
private: "private";
|
|
263
|
+
public: "public";
|
|
264
|
+
unsupported_consumer: "unsupported_consumer";
|
|
265
|
+
contact_not_approved: "contact_not_approved";
|
|
266
|
+
mature_content: "mature_content";
|
|
267
|
+
unrated_content: "unrated_content";
|
|
268
|
+
approval_required: "approval_required";
|
|
269
|
+
}>;
|
|
270
|
+
policyVersion: z.ZodLiteral<"2">;
|
|
271
|
+
}, z.core.$strict>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
273
|
+
}, z.core.$strict>;
|
|
274
|
+
export type NotificationAccessInput = z.infer<typeof notificationAccessInputSchema>;
|
|
275
|
+
export type NotificationAccessBatchInput = z.infer<typeof notificationAccessBatchInputSchema>;
|
|
234
276
|
/** Live socket-recipient proof; a request ID correlates the result and never identifies an account. */
|
|
235
277
|
export declare const messagingSessionsInputSchema: z.ZodObject<{
|
|
236
278
|
items: z.ZodArray<z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/contracts",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"@types/node": "^26.6.6",
|
|
90
90
|
"jest": "^30.5.2",
|
|
91
91
|
"typescript": "~6.0.3",
|
|
92
|
-
"@oxy.so/bloom": "17.
|
|
92
|
+
"@oxy.so/bloom": "17.4.0"
|
|
93
93
|
}
|
|
94
94
|
}
|