@oxy.so/core 7.20.0 → 7.21.1
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.
|
@@ -47,6 +47,14 @@ class ServerSafetyApi extends safety_1.SafetyApi {
|
|
|
47
47
|
async deliveryAccessBatch(input) {
|
|
48
48
|
return contracts_1.messageAccessBatchResponseSchema.parse(await this.service('delivery-access-batch', contracts_1.deliveryAccessBatchInputSchema.parse(input)));
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Whether each actor may notify each recipient — blocks either way,
|
|
52
|
+
* availability and supervised contact approval — for background delivery
|
|
53
|
+
* with no human proof. Reviewed `safety:notification-delivery:v1` authority.
|
|
54
|
+
*/
|
|
55
|
+
async notificationAccessBatch(input) {
|
|
56
|
+
return contracts_1.notificationAccessBatchResponseSchema.parse(await this.service('notification-access-batch', contracts_1.notificationAccessBatchInputSchema.parse(input)));
|
|
57
|
+
}
|
|
50
58
|
async contactAccess(input, options) {
|
|
51
59
|
return contracts_1.contactAccessResponseSchema.parse(await this.decision('contact-access', contracts_1.contactAccessInputSchema.parse(input), options));
|
|
52
60
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Server-only, so the Zod schemas parse here; the browser half of the API is
|
|
10
10
|
* `../api/safety.ts`, on the Zod-free checks.
|
|
11
11
|
*/
|
|
12
|
-
import { cancelPurchaseSchema, confirmPurchaseSchema, contactAccessInputSchema, contactAccessResponseSchema, contentAccessBatchInputSchema, contentAccessBatchResponseSchema, contentAccessInputSchema, deliveryAccessBatchInputSchema, deliveryAccessInputSchema, messageAccessBatchInputSchema, messageAccessBatchResponseSchema, messageAccessInputSchema, messagingSessionsInputSchema, messagingSessionsResponseSchema, profileAccessBatchInputSchema, profileAccessBatchResponseSchema, profileAccessDecisionSchema, profileAccessInputSchema, publicationPoliciesInputSchema, publicationPoliciesResponseSchema, publicationPolicySchema, purchaseApprovalSchema, purchaseEffectsSchema, reservePurchaseSchema, safetyDecisionSchema, safetyRequesterSchema, } from '@oxy.so/contracts';
|
|
12
|
+
import { cancelPurchaseSchema, confirmPurchaseSchema, contactAccessInputSchema, contactAccessResponseSchema, contentAccessBatchInputSchema, contentAccessBatchResponseSchema, contentAccessInputSchema, deliveryAccessBatchInputSchema, deliveryAccessInputSchema, messageAccessBatchInputSchema, messageAccessBatchResponseSchema, messageAccessInputSchema, messagingSessionsInputSchema, messagingSessionsResponseSchema, notificationAccessBatchInputSchema, notificationAccessBatchResponseSchema, profileAccessBatchInputSchema, profileAccessBatchResponseSchema, profileAccessDecisionSchema, profileAccessInputSchema, publicationPoliciesInputSchema, publicationPoliciesResponseSchema, publicationPolicySchema, purchaseApprovalSchema, purchaseEffectsSchema, reservePurchaseSchema, safetyDecisionSchema, safetyRequesterSchema, } from '@oxy.so/contracts';
|
|
13
13
|
import { SafetyApi } from '../api/safety.js';
|
|
14
14
|
export class ServerSafetyApi extends SafetyApi {
|
|
15
15
|
service(path, input) {
|
|
@@ -44,6 +44,14 @@ export class ServerSafetyApi extends SafetyApi {
|
|
|
44
44
|
async deliveryAccessBatch(input) {
|
|
45
45
|
return messageAccessBatchResponseSchema.parse(await this.service('delivery-access-batch', deliveryAccessBatchInputSchema.parse(input)));
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Whether each actor may notify each recipient — blocks either way,
|
|
49
|
+
* availability and supervised contact approval — for background delivery
|
|
50
|
+
* with no human proof. Reviewed `safety:notification-delivery:v1` authority.
|
|
51
|
+
*/
|
|
52
|
+
async notificationAccessBatch(input) {
|
|
53
|
+
return notificationAccessBatchResponseSchema.parse(await this.service('notification-access-batch', notificationAccessBatchInputSchema.parse(input)));
|
|
54
|
+
}
|
|
47
55
|
async contactAccess(input, options) {
|
|
48
56
|
return contactAccessResponseSchema.parse(await this.decision('contact-access', contactAccessInputSchema.parse(input), options));
|
|
49
57
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Server-only, so the Zod schemas parse here; the browser half of the API is
|
|
10
10
|
* `../api/safety.ts`, on the Zod-free checks.
|
|
11
11
|
*/
|
|
12
|
-
import { type CancelPurchase, type ConfirmPurchase, type ContactAccessInput, type ContentAccessBatchInput, type ContentAccessInput, type DeliveryAccessBatchInput, type DeliveryAccessInput, type MessageAccessBatchInput, type MessageAccessInput, type MessagingSessionsInput, type ProfileAccessBatchInput, type ProfileAccessInput, type PublicationPoliciesInput, type PurchaseEffects, type ReservePurchase, type SafetyRequester } from '@oxy.so/contracts';
|
|
12
|
+
import { type CancelPurchase, type ConfirmPurchase, type ContactAccessInput, type ContentAccessBatchInput, type ContentAccessInput, type DeliveryAccessBatchInput, type DeliveryAccessInput, type MessageAccessBatchInput, type MessageAccessInput, type MessagingSessionsInput, type NotificationAccessBatchInput, type ProfileAccessBatchInput, type ProfileAccessInput, type PublicationPoliciesInput, type PurchaseEffects, type ReservePurchase, type SafetyRequester } from '@oxy.so/contracts';
|
|
13
13
|
import { SafetyApi } from '../api/safety';
|
|
14
14
|
export declare class ServerSafetyApi extends SafetyApi {
|
|
15
15
|
private service;
|
|
@@ -65,6 +65,21 @@ export declare class ServerSafetyApi extends SafetyApi {
|
|
|
65
65
|
};
|
|
66
66
|
}[];
|
|
67
67
|
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Whether each actor may notify each recipient — blocks either way,
|
|
70
|
+
* availability and supervised contact approval — for background delivery
|
|
71
|
+
* with no human proof. Reviewed `safety:notification-delivery:v1` authority.
|
|
72
|
+
*/
|
|
73
|
+
notificationAccessBatch(input: NotificationAccessBatchInput): Promise<{
|
|
74
|
+
items: {
|
|
75
|
+
resourceId: string;
|
|
76
|
+
decision: {
|
|
77
|
+
allowed: boolean;
|
|
78
|
+
reason: "blocked" | "private" | "public" | "unavailable" | "owner" | "allowed" | "unsupported_consumer" | "contact_not_approved" | "mature_content" | "unrated_content" | "approval_required";
|
|
79
|
+
policyVersion: "2";
|
|
80
|
+
};
|
|
81
|
+
}[];
|
|
82
|
+
}>;
|
|
68
83
|
contactAccess(input: ContactAccessInput, options: SafetyRequester): Promise<{
|
|
69
84
|
items: {
|
|
70
85
|
targetAccountId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/core",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.21.1",
|
|
4
4
|
"description": "OxyHQ SDK Foundation — API client, authentication, cryptographic identity, and shared utilities",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"dependencies": {
|
|
182
182
|
"@noble/ciphers": "^2.4.0",
|
|
183
183
|
"@noble/hashes": "^2.4.0",
|
|
184
|
-
"@oxy.so/contracts": "6.
|
|
184
|
+
"@oxy.so/contracts": "6.8.0",
|
|
185
185
|
"@oxy.so/protocol": "^1.6.1",
|
|
186
186
|
"@oxy.so/telemetry": "^2.1.0",
|
|
187
187
|
"@scure/bip39": "^2.4.0",
|
package/src/server/safety.ts
CHANGED
|
@@ -24,6 +24,8 @@ import {
|
|
|
24
24
|
messageAccessInputSchema,
|
|
25
25
|
messagingSessionsInputSchema,
|
|
26
26
|
messagingSessionsResponseSchema,
|
|
27
|
+
notificationAccessBatchInputSchema,
|
|
28
|
+
notificationAccessBatchResponseSchema,
|
|
27
29
|
profileAccessBatchInputSchema,
|
|
28
30
|
profileAccessBatchResponseSchema,
|
|
29
31
|
profileAccessDecisionSchema,
|
|
@@ -46,6 +48,7 @@ import {
|
|
|
46
48
|
type MessageAccessBatchInput,
|
|
47
49
|
type MessageAccessInput,
|
|
48
50
|
type MessagingSessionsInput,
|
|
51
|
+
type NotificationAccessBatchInput,
|
|
49
52
|
type ProfileAccessBatchInput,
|
|
50
53
|
type ProfileAccessInput,
|
|
51
54
|
type PublicationPoliciesInput,
|
|
@@ -116,6 +119,20 @@ export class ServerSafetyApi extends SafetyApi {
|
|
|
116
119
|
);
|
|
117
120
|
}
|
|
118
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Whether each actor may notify each recipient — blocks either way,
|
|
124
|
+
* availability and supervised contact approval — for background delivery
|
|
125
|
+
* with no human proof. Reviewed `safety:notification-delivery:v1` authority.
|
|
126
|
+
*/
|
|
127
|
+
async notificationAccessBatch(input: NotificationAccessBatchInput) {
|
|
128
|
+
return notificationAccessBatchResponseSchema.parse(
|
|
129
|
+
await this.service(
|
|
130
|
+
'notification-access-batch',
|
|
131
|
+
notificationAccessBatchInputSchema.parse(input),
|
|
132
|
+
),
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
119
136
|
async contactAccess(input: ContactAccessInput, options: SafetyRequester) {
|
|
120
137
|
return contactAccessResponseSchema.parse(
|
|
121
138
|
await this.decision('contact-access', contactAccessInputSchema.parse(input), options),
|