@oxy.so/contracts 6.2.0 → 6.3.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.
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /**
3
+ * Registered-account aggregate for one first-party deployment.
4
+ *
5
+ * A federated product (Mention's NodeInfo `usage.users.total`) needs "how many
6
+ * people registered on THIS deployment". Oxy accounts are global, so the
7
+ * deployment registers the accounts it provisions and Oxy answers with a bounded
8
+ * aggregate. Both calls are made by the deployment's own workload; the
9
+ * application is the workload's, never a request field, so a managed instance
10
+ * and the main deployment never see each other's rows or counts.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.applicationAccountTotalSchema = exports.applicationAccountRegistrationResponseSchema = exports.applicationAccountRegistrationRequestSchema = exports.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = void 0;
14
+ const zod_1 = require("zod");
15
+ /** Most account ids one registration call accepts. */
16
+ exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = 500;
17
+ /** Seconds a total is considered fresh; a later `computedAt` is served `stale: true`. */
18
+ exports.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = 300;
19
+ exports.applicationAccountRegistrationRequestSchema = zod_1.z.strictObject({
20
+ accountIds: zod_1.z
21
+ .array(zod_1.z.string().min(1).max(128))
22
+ .min(1)
23
+ .max(exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX),
24
+ });
25
+ /**
26
+ * Aggregate only. `registered` is how many ids became newly registered; ids that
27
+ * were already registered, unknown or ineligible are not distinguished.
28
+ */
29
+ exports.applicationAccountRegistrationResponseSchema = zod_1.z.strictObject({
30
+ registered: zod_1.z.number().int().nonnegative(),
31
+ });
32
+ /**
33
+ * The eligible registered-account total.
34
+ *
35
+ * - `total`: registered accounts that are local, personal, active and not being
36
+ * closed, as of `computedAt`. Unknown is an error response, never `0`.
37
+ * - `exact`: `true` when `total` is an exact count of the ledger at
38
+ * `computedAt`; `false` would mark an estimate. This version always counts
39
+ * exactly, so it is `true`; clients must still read the flag.
40
+ * - `stale`: `computedAt` is older than `maxAgeSeconds`. A refresh is in flight
41
+ * or has failed; the number is the last good one, not a fabricated zero.
42
+ */
43
+ exports.applicationAccountTotalSchema = zod_1.z.strictObject({
44
+ schemaVersion: zod_1.z.literal(1),
45
+ applicationId: zod_1.z.string().min(1),
46
+ total: zod_1.z.number().int().nonnegative(),
47
+ exact: zod_1.z.boolean(),
48
+ computedAt: zod_1.z.string().datetime(),
49
+ maxAgeSeconds: zod_1.z.number().int().positive(),
50
+ stale: zod_1.z.boolean(),
51
+ });
package/dist/cjs/index.js CHANGED
@@ -39,7 +39,7 @@ exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = ex
39
39
  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 = 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 = void 0;
40
40
  exports.applicationAgentAvailabilitySchema = exports.APPLICATION_AGENT_AVAILABILITIES = exports.agentRequesterCeilingSchema = exports.agentRequesterCeilingWriteSchema = exports.AGENT_REQUESTER_CEILING_AUTONOMY = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.firstPartyTaskInputSchema = exports.firstPartyExecutionAuthorizationInputSchema = 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 = 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 = void 0;
41
41
  exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.INBOX_DAILY_BRIEF_SECTIONS = exports.inboxDailyBriefResponseSchema = exports.inboxDailyBriefRequestSchema = 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.CATALOG_INTERNAL_TRANSPORTS = exports.catalogFeatureSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.catalogToolAllowsActor = exports.catalogToolActors = exports.catalogToolActorTypeSchema = exports.CATALOG_TOOL_DEFAULT_ACTORS = exports.CATALOG_TOOL_ACTOR_TYPES = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.agentAvailabilitySchema = exports.applicationAgentSchema = exports.applicationAgentWriteSchema = void 0;
42
- exports.campaignAttributionSchema = exports.safeNumberCheck = exports.integerCheck = exports.urlCheck = exports.isoDateTime = exports.utf16Length = exports.utf16MaxLength = exports.utf16MinLength = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = void 0;
42
+ exports.applicationAccountTotalSchema = exports.applicationAccountRegistrationResponseSchema = exports.applicationAccountRegistrationRequestSchema = exports.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = exports.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = exports.campaignAttributionSchema = exports.safeNumberCheck = exports.integerCheck = exports.urlCheck = exports.isoDateTime = exports.utf16Length = exports.utf16MaxLength = exports.utf16MinLength = exports.FREE_USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLOR_PRESETS = exports.USER_PROFILE_COLORS = exports.productPlanCatalogueSchema = exports.personalPlanCatalogueSchema = exports.personalPlanDisplayPriceSchema = exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = exports.isLoopbackOrigin = exports.inputSatisfiesCapabilityLimits = exports.canonicalCapabilityJson = exports.meteredGenerationSchema = exports.subjectProductAccessSchema = exports.productOfferSegmentSchema = exports.subjectProductGrantSnapshotSchema = exports.productAccessGrantSchema = 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; } });
@@ -916,3 +916,9 @@ Object.defineProperty(exports, "integerCheck", { enumerable: true, get: function
916
916
  Object.defineProperty(exports, "safeNumberCheck", { enumerable: true, get: function () { return numberChecks_1.safeNumberCheck; } });
917
917
  var campaignAttribution_1 = require("./campaignAttribution");
918
918
  Object.defineProperty(exports, "campaignAttributionSchema", { enumerable: true, get: function () { return campaignAttribution_1.campaignAttributionSchema; } });
919
+ var applicationAccounts_1 = require("./applicationAccounts");
920
+ Object.defineProperty(exports, "APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX", { enumerable: true, get: function () { return applicationAccounts_1.APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX; } });
921
+ Object.defineProperty(exports, "APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS", { enumerable: true, get: function () { return applicationAccounts_1.APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS; } });
922
+ Object.defineProperty(exports, "applicationAccountRegistrationRequestSchema", { enumerable: true, get: function () { return applicationAccounts_1.applicationAccountRegistrationRequestSchema; } });
923
+ Object.defineProperty(exports, "applicationAccountRegistrationResponseSchema", { enumerable: true, get: function () { return applicationAccounts_1.applicationAccountRegistrationResponseSchema; } });
924
+ Object.defineProperty(exports, "applicationAccountTotalSchema", { enumerable: true, get: function () { return applicationAccounts_1.applicationAccountTotalSchema; } });
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Registered-account aggregate for one first-party deployment.
3
+ *
4
+ * A federated product (Mention's NodeInfo `usage.users.total`) needs "how many
5
+ * people registered on THIS deployment". Oxy accounts are global, so the
6
+ * deployment registers the accounts it provisions and Oxy answers with a bounded
7
+ * aggregate. Both calls are made by the deployment's own workload; the
8
+ * application is the workload's, never a request field, so a managed instance
9
+ * and the main deployment never see each other's rows or counts.
10
+ */
11
+ import { z } from 'zod';
12
+ /** Most account ids one registration call accepts. */
13
+ export const APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = 500;
14
+ /** Seconds a total is considered fresh; a later `computedAt` is served `stale: true`. */
15
+ export const APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = 300;
16
+ export const applicationAccountRegistrationRequestSchema = z.strictObject({
17
+ accountIds: z
18
+ .array(z.string().min(1).max(128))
19
+ .min(1)
20
+ .max(APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX),
21
+ });
22
+ /**
23
+ * Aggregate only. `registered` is how many ids became newly registered; ids that
24
+ * were already registered, unknown or ineligible are not distinguished.
25
+ */
26
+ export const applicationAccountRegistrationResponseSchema = z.strictObject({
27
+ registered: z.number().int().nonnegative(),
28
+ });
29
+ /**
30
+ * The eligible registered-account total.
31
+ *
32
+ * - `total`: registered accounts that are local, personal, active and not being
33
+ * closed, as of `computedAt`. Unknown is an error response, never `0`.
34
+ * - `exact`: `true` when `total` is an exact count of the ledger at
35
+ * `computedAt`; `false` would mark an estimate. This version always counts
36
+ * exactly, so it is `true`; clients must still read the flag.
37
+ * - `stale`: `computedAt` is older than `maxAgeSeconds`. A refresh is in flight
38
+ * or has failed; the number is the last good one, not a fabricated zero.
39
+ */
40
+ export const applicationAccountTotalSchema = z.strictObject({
41
+ schemaVersion: z.literal(1),
42
+ applicationId: z.string().min(1),
43
+ total: z.number().int().nonnegative(),
44
+ exact: z.boolean(),
45
+ computedAt: z.string().datetime(),
46
+ maxAgeSeconds: z.number().int().positive(),
47
+ stale: z.boolean(),
48
+ });
package/dist/esm/index.js CHANGED
@@ -212,3 +212,4 @@ export { USER_PROFILE_COLORS, USER_PROFILE_COLOR_PRESETS, FREE_USER_PROFILE_COLO
212
212
  export { utf16MinLength, utf16MaxLength, utf16Length, isoDateTime, urlCheck, } from './stringChecks.js';
213
213
  export { integerCheck, safeNumberCheck } from './numberChecks.js';
214
214
  export { campaignAttributionSchema } from './campaignAttribution.js';
215
+ export { APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX, APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS, applicationAccountRegistrationRequestSchema, applicationAccountRegistrationResponseSchema, applicationAccountTotalSchema, } from './applicationAccounts.js';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Registered-account aggregate for one first-party deployment.
3
+ *
4
+ * A federated product (Mention's NodeInfo `usage.users.total`) needs "how many
5
+ * people registered on THIS deployment". Oxy accounts are global, so the
6
+ * deployment registers the accounts it provisions and Oxy answers with a bounded
7
+ * aggregate. Both calls are made by the deployment's own workload; the
8
+ * application is the workload's, never a request field, so a managed instance
9
+ * and the main deployment never see each other's rows or counts.
10
+ */
11
+ import { z } from 'zod';
12
+ /** Most account ids one registration call accepts. */
13
+ export declare const APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX = 500;
14
+ /** Seconds a total is considered fresh; a later `computedAt` is served `stale: true`. */
15
+ export declare const APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS = 300;
16
+ export declare const applicationAccountRegistrationRequestSchema: z.ZodObject<{
17
+ accountIds: z.ZodArray<z.ZodString>;
18
+ }, z.core.$strict>;
19
+ export type ApplicationAccountRegistrationRequest = z.infer<typeof applicationAccountRegistrationRequestSchema>;
20
+ /**
21
+ * Aggregate only. `registered` is how many ids became newly registered; ids that
22
+ * were already registered, unknown or ineligible are not distinguished.
23
+ */
24
+ export declare const applicationAccountRegistrationResponseSchema: z.ZodObject<{
25
+ registered: z.ZodNumber;
26
+ }, z.core.$strict>;
27
+ export type ApplicationAccountRegistrationResponse = z.infer<typeof applicationAccountRegistrationResponseSchema>;
28
+ /**
29
+ * The eligible registered-account total.
30
+ *
31
+ * - `total`: registered accounts that are local, personal, active and not being
32
+ * closed, as of `computedAt`. Unknown is an error response, never `0`.
33
+ * - `exact`: `true` when `total` is an exact count of the ledger at
34
+ * `computedAt`; `false` would mark an estimate. This version always counts
35
+ * exactly, so it is `true`; clients must still read the flag.
36
+ * - `stale`: `computedAt` is older than `maxAgeSeconds`. A refresh is in flight
37
+ * or has failed; the number is the last good one, not a fabricated zero.
38
+ */
39
+ export declare const applicationAccountTotalSchema: z.ZodObject<{
40
+ schemaVersion: z.ZodLiteral<1>;
41
+ applicationId: z.ZodString;
42
+ total: z.ZodNumber;
43
+ exact: z.ZodBoolean;
44
+ computedAt: z.ZodString;
45
+ maxAgeSeconds: z.ZodNumber;
46
+ stale: z.ZodBoolean;
47
+ }, z.core.$strict>;
48
+ export type ApplicationAccountTotal = z.infer<typeof applicationAccountTotalSchema>;
@@ -142,3 +142,5 @@ export { utf16MinLength, utf16MaxLength, utf16Length, isoDateTime, urlCheck, } f
142
142
  export { integerCheck, safeNumberCheck } from './numberChecks';
143
143
  export { campaignAttributionSchema } from './campaignAttribution';
144
144
  export type { CampaignAttribution } from './client/campaignAttribution';
145
+ export { APPLICATION_ACCOUNT_REGISTRATION_BATCH_MAX, APPLICATION_ACCOUNT_TOTAL_MAX_AGE_SECONDS, applicationAccountRegistrationRequestSchema, applicationAccountRegistrationResponseSchema, applicationAccountTotalSchema, } from './applicationAccounts';
146
+ export type { ApplicationAccountRegistrationRequest, ApplicationAccountRegistrationResponse, ApplicationAccountTotal, } from './applicationAccounts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "6.2.0",
3
+ "version": "6.3.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",