@oxy.so/contracts 4.8.0 → 4.9.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/accountGraph.js +13 -5
- package/dist/cjs/accountSubject.js +189 -0
- package/dist/cjs/agency.js +56 -4
- package/dist/cjs/agentKeys.js +67 -0
- package/dist/cjs/capabilityBindings.js +72 -0
- package/dist/cjs/index.js +60 -13
- package/dist/cjs/inference/economics.js +135 -0
- package/dist/cjs/products/access.js +60 -0
- package/dist/cjs/products/billing.js +32 -0
- package/dist/cjs/signIn.js +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/accountGraph.js +13 -5
- package/dist/esm/accountSubject.js +182 -0
- package/dist/esm/agency.js +55 -3
- package/dist/esm/agentKeys.js +63 -0
- package/dist/esm/capabilityBindings.js +67 -0
- package/dist/esm/index.js +10 -1
- package/dist/esm/inference/economics.js +132 -0
- package/dist/esm/products/access.js +57 -0
- package/dist/esm/products/billing.js +29 -0
- package/dist/esm/signIn.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountGraph.d.ts +23 -8
- package/dist/types/accountSubject.d.ts +210 -0
- package/dist/types/agency.d.ts +956 -190
- package/dist/types/agentKeys.d.ts +525 -0
- package/dist/types/capabilityBindings.d.ts +6 -0
- package/dist/types/deviceDirectory.d.ts +50 -50
- package/dist/types/deviceSession.d.ts +14 -14
- package/dist/types/externalIdentity.d.ts +4 -4
- package/dist/types/identity.d.ts +2 -2
- package/dist/types/index.d.ts +12 -2
- package/dist/types/inference/accountBilling.d.ts +30 -30
- package/dist/types/inference/aliaModelRelease.d.ts +83 -83
- package/dist/types/inference/catalogue.d.ts +180 -180
- package/dist/types/inference/economics.d.ts +376 -0
- package/dist/types/inference/entitlement.d.ts +47 -47
- package/dist/types/inference/inbox.d.ts +12 -12
- package/dist/types/inference/modelDocumentation.d.ts +231 -231
- package/dist/types/inference/priceVersion.d.ts +4 -4
- package/dist/types/inference/providerConnection.d.ts +38 -38
- package/dist/types/inference/realtime.d.ts +802 -802
- package/dist/types/inference/request.d.ts +844 -844
- package/dist/types/inference/routingPolicy.d.ts +4 -4
- package/dist/types/inference/scopedExecution.d.ts +38 -38
- package/dist/types/inference/streamEvents.d.ts +4 -4
- package/dist/types/inference/usage.d.ts +12 -12
- package/dist/types/keyRotation.d.ts +2 -2
- package/dist/types/notifications.d.ts +4 -4
- package/dist/types/oauth.d.ts +30 -30
- package/dist/types/products/access.d.ts +487 -0
- package/dist/types/products/billing.d.ts +563 -0
- package/dist/types/recommendations.d.ts +2 -2
- package/dist/types/sessionStatus.d.ts +10 -10
- package/dist/types/signIn.d.ts +6 -6
- package/dist/types/transparency.d.ts +2 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -25,19 +25,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
25
25
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
28
|
+
exports.resolveUserId = exports.deviceLinkedSessionsResponseSchema = exports.deviceLinkedSessionSchema = exports.currentUserResponseSchema = exports.userProfileUpdateSchema = exports.userResponseSchema = exports.dateOfBirthSchema = exports.themePreferenceSchema = exports.userRelationshipSchema = exports.userNameSchema = exports.NUMERIC_USERNAME_MESSAGE = exports.RESERVED_USERNAME_MESSAGE = exports.BOT_USERNAME_INVALID_MESSAGE = exports.USERNAME_INVALID_MESSAGE = exports.USERNAME_MAX_LENGTH = exports.USERNAME_MIN_LENGTH = exports.applyBotUsernameSuffix = exports.stripDisallowedUsernameCharacters = exports.isValidUsername = exports.usernameSchemaForAccountKind = exports.usernameSchema = exports.financialEffectAttributionSchema = exports.attributeFinancialEffect = exports.accountKindActsAsItself = exports.accountKindActorNature = exports.accountActorNatureSchema = exports.accountActorChainSchema = exports.accountActorChainFromSession = exports.KIND_INDEPENDENT_ACCOUNT_DIMENSIONS = exports.FINANCIAL_EFFECT_DIRECTIONS = exports.ACCOUNT_SUBJECT_CONTRACT_VERSION = exports.ACCOUNT_ACTOR_NATURES = exports.createAccountRequestSchema = exports.SELECTABLE_ACCOUNT_CATEGORY_IDS = exports.RETIRED_ACCOUNT_CATEGORY_IDS = exports.newlyAddedRetiredCategories = exports.MAX_ACCOUNT_CATEGORIES = exports.kindAcceptsAccountCategories = exports.isSelectableAccountCategoryId = exports.accountCategoryIdSchema = exports.accountCategoriesSchema = exports.ACCOUNT_CATEGORY_KINDS = exports.ACCOUNT_CATEGORY_IDS = exports.isOperatorSwitchTargetKind = exports.isDelegatedActAsEligibleKind = exports.isAccountKind = exports.childAccountKindSchema = exports.CHILD_ACCOUNT_KINDS = exports.accountKindSchema = exports.ACCOUNT_KINDS = void 0;
|
|
29
|
+
exports.signedPublicCardSchema = exports.publicCardSchema = exports.logPageResponseSchema = exports.chainHeadResponseSchema = exports.oxySignedRecordTypeSchema = exports.exportBundleSchema = exports.exportFinancialSectionSchema = exports.exportUsageReservationSchema = exports.exportLedgerEntrySchema = exports.exportUsageReceiptSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.resourceDomainOwnershipResponseSchema = exports.resourceDomainOwnershipRequestSchema = 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.oxyUserInvalidationEventSchema = exports.isPublishedOxyUserChangeReason = exports.OXY_PUBLISHED_USER_CHANGE_REASONS = exports.OXY_USER_CHANGE_REASONS = exports.OXY_USER_INVALIDATION_CHANNEL = exports.inboxEmailPushDataSchema = exports.INBOX_EMAIL_PUSH_TYPE = exports.INBOX_EMAIL_PUSH_CHANNEL = exports.IDENTITY_APPROVAL_PUSH_CHANNEL = exports.commonsDenyReasonSchema = exports.COMMONS_DENY_REASONS = exports.sessionStatusSchema = exports.publicApplicationSchema = exports.applicationTypeSchema = exports.safeParseContract = void 0;
|
|
30
|
+
exports.PERSONHOOD_STATUSES = exports.CONTRIBUTION_TIERS = exports.CONDUCT_STANDINGS = exports.CONDUCT_STRIKE_STATUSES = exports.MODERATION_EFFECT_SKIP_REASONS = exports.MODERATION_EFFECT_STATUSES = exports.MODERATION_EFFECT_TYPES = exports.MODERATION_DECISION_STATUSES = exports.MODERATION_ATTRIBUTIONS = exports.MODERATION_FINDING_SCOPES = exports.MODERATION_SEVERITIES = exports.isFullReputationBalance = exports.awardReputationSchema = exports.reputationInfluenceResultSchema = exports.reputationLeaderboardEntrySchema = exports.reputationLeaderboardUserSchema = exports.reputationRulesResponseSchema = exports.reputationRuleSchema = exports.reputationBalanceSchema = exports.reputationBalanceSummarySchema = exports.reputationReliabilitySchema = exports.reputationInfluenceSchema = exports.reputationBalanceBreakdownSchema = exports.reputationTransactionSchema = exports.reputationInfluenceContextSchema = exports.reputationTargetEntityTypeSchema = exports.trustTierSchema = exports.reputationTransactionStatusSchema = exports.reputationCategorySchema = exports.REPUTATION_INFLUENCE_CONTEXTS = exports.REPUTATION_TARGET_ENTITY_TYPES = exports.TRUST_TIERS = exports.REPUTATION_TRANSACTION_STATUSES = exports.REPUTATION_CATEGORIES = exports.credentialVerifyResultSchema = exports.credentialListResultSchema = exports.credentialIssueResultSchema = exports.verifiableCredentialResponseSchema = exports.credentialRecordSchema = exports.vouchResultSchema = exports.personhoodStatusResultSchema = exports.personhoodBreakdownSchema = exports.personhoodVouchRecordSchema = exports.validationVoteResultSchema = exports.validationRequestSummarySchema = exports.validationOpenResultSchema = exports.validationOpenRequestSchema = exports.validationVerdictRecordSchema = exports.realLifeAttestationResultSchema = exports.realLifeAttestationRecordSchema = void 0;
|
|
31
|
+
exports.deviceJoinResponseSchema = exports.deviceJoinRequestSchema = exports.deviceJoinCodeResponseSchema = exports.deviceJoinCodeRequestSchema = exports.deviceRegisterResponseSchema = exports.deviceProofSchema = exports.deviceBackgroundTokenResponseSchema = exports.deviceBackgroundTokenRequestSchema = exports.deviceBackgroundCredentialResponseSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.applicationModerationTrustSchema = exports.reputationContextualInfluenceSchema = exports.reputationReviewingSchema = exports.reputationReportingSchema = exports.reputationConductSchema = exports.reputationContributionSchema = exports.reputationPersonhoodSchema = exports.identityBindingSchema = exports.registerIdentityBindingSchema = exports.reverseModerationEffectResultSchema = exports.applyModerationDecisionResultSchema = exports.moderationEffectSchema = exports.reverseModerationEffectSchema = exports.finalizeModerationDecisionSchema = exports.moderationDecisionEventSchema = exports.moderationPolicyVersionsSchema = exports.moderationDecisionEventSubjectSchema = exports.moderationFindingSchema = exports.applicationModerationStandingSchema = exports.identityBindingStatusSchema = exports.identityBindingTypeSchema = exports.personhoodStatusSchema = exports.contributionTierSchema = exports.conductStandingSchema = exports.conductStrikeStatusSchema = exports.moderationEffectSkipReasonSchema = exports.moderationEffectStatusSchema = exports.moderationEffectTypeSchema = exports.moderationDecisionStatusSchema = exports.moderationAttributionSchema = exports.moderationFindingScopeSchema = exports.moderationSeveritySchema = exports.APPLICATION_MODERATION_STANDINGS = exports.IDENTITY_BINDING_STATUSES = exports.IDENTITY_BINDING_TYPES = void 0;
|
|
32
|
+
exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_ERROR_CODES = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.mcpOAuthConsentResponseSchema = exports.mcpOAuthClientInfoResponseSchema = exports.mcpOAuthConsentContextSchema = exports.mcpOAuthWriteActionSchema = exports.mcpOAuthClientApplicationSchema = exports.oauthAuthorizeCodeResponseSchema = exports.oauthConsentDecisionSchema = exports.deviceDirectorySyncSchema = exports.deviceActivateResponseSchema = exports.deviceActivateRequestSchema = exports.deviceDirectorySchema = exports.devicePrincipalSchema = exports.deviceAccountContextSchema = exports.deviceDirectoryProfileSchema = exports.deviceContextRelationshipSchema = exports.sessionAccountsChangedEventSchema = exports.sessionAccountsChangedReasonSchema = exports.SESSION_ACCOUNTS_CHANGED_EVENT = void 0;
|
|
33
|
+
exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.emailVerificationConfirmResponseSchema = exports.emailVerificationConfirmRequestSchema = exports.emailVerificationStartResponseSchema = exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_LENGTH = exports.EMAIL_VERIFICATION_PURPOSES = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = void 0;
|
|
34
|
+
exports.routingProfileSlugSchema = exports.routingProfileIdSchema = exports.modelReferenceSchema = exports.modelRevisionLabelSchema = exports.modelIdSchema = exports.modelSlugSchema = exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = exports.requestIdSchema = exports.oxyCredentialIdSchema = exports.oxyApplicationIdSchema = exports.delegatedUserIdSchema = exports.oxyAccountIdSchema = exports.INFERENCE_CONTRACT_VERSION = exports.transparencyCheckpointListSchema = exports.transparencyInclusionProofSchema = exports.transparencyCheckpointSchema = exports.transparencyAnchorSchema = exports.transparencyCheckpointSignatureSchema = exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = exports.passwordSetRequestSchema = exports.reauthEmailStartRequestSchema = exports.REAUTH_ACTIONS = exports.emailReauthProofSchema = exports.reauthProofSchema = exports.isSecondFactorRequired = exports.signUpRequestSchema = exports.secondFactorRequiredSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.emailSignInPendingSchema = void 0;
|
|
35
|
+
exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceModalitySchema = exports.priceSnapshotSchema = exports.priceVersionSchema = exports.priceVersionStatusSchema = exports.embeddingResponseSchema = exports.embeddingFailureSchema = exports.embeddingSuccessSchema = exports.embeddingUsageSchema = exports.embeddingVectorSchema = exports.inferenceErrorSchema = exports.providerErrorPassthroughSchema = exports.safeErrorTextSchema = exports.upstreamErrorCategorySchema = exports.inferenceErrorCodeSchema = exports.NON_RETRYABLE_INFERENCE_ERROR_CODES = exports.INFERENCE_ERROR_CODES = exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = exports.unitPriceSchema = exports.usageQuantitySchema = exports.usageSourceSchema = exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = exports.INFERENCE_MONEY_SCALE = exports.currencyCodeSchema = exports.RESERVED_ALIA_PUBLISHER = exports.inferenceRegionSchema = exports.deploymentIdSchema = exports.inferenceProviderSlugSchema = void 0;
|
|
36
|
+
exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = void 0;
|
|
37
|
+
exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = void 0;
|
|
38
|
+
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 = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = void 0;
|
|
39
|
+
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 = 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 = void 0;
|
|
40
|
+
exports.decisionFailureSchema = exports.decisionSuccessSchema = exports.decisionResultSchema = exports.decisionAnswerSchema = exports.decisionRequestSchema = exports.decisionInputSchema = exports.decisionQuestionSchema = exports.decisionEffortSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = 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.catalogEventSchema = exports.catalogToolSchema = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.invocationPrincipalSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.delegationGrantSchema = exports.capabilityTicketRequestSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.foregroundExecutionAuthorizationInputSchema = void 0;
|
|
41
|
+
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.productAccessGrantSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = exports.scopedInferenceRequestSchema = exports.canonicalScopedExecutionJson = exports.scopedExecutionSchema = exports.scopedExecutionAudienceSchema = exports.SCOPED_REQUEST_ENVELOPE_VERSION = exports.SCOPED_EXECUTION_CONTRACT_VERSION = exports.decisionAnswersMatch = exports.decisionFitsGateway = exports.decisionInputBudget = void 0;
|
|
41
42
|
var accountGraph_1 = require("./accountGraph");
|
|
42
43
|
Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
|
|
43
44
|
Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
|
|
@@ -57,6 +58,18 @@ Object.defineProperty(exports, "newlyAddedRetiredCategories", { enumerable: true
|
|
|
57
58
|
Object.defineProperty(exports, "RETIRED_ACCOUNT_CATEGORY_IDS", { enumerable: true, get: function () { return accountGraph_1.RETIRED_ACCOUNT_CATEGORY_IDS; } });
|
|
58
59
|
Object.defineProperty(exports, "SELECTABLE_ACCOUNT_CATEGORY_IDS", { enumerable: true, get: function () { return accountGraph_1.SELECTABLE_ACCOUNT_CATEGORY_IDS; } });
|
|
59
60
|
Object.defineProperty(exports, "createAccountRequestSchema", { enumerable: true, get: function () { return accountGraph_1.createAccountRequestSchema; } });
|
|
61
|
+
var accountSubject_1 = require("./accountSubject");
|
|
62
|
+
Object.defineProperty(exports, "ACCOUNT_ACTOR_NATURES", { enumerable: true, get: function () { return accountSubject_1.ACCOUNT_ACTOR_NATURES; } });
|
|
63
|
+
Object.defineProperty(exports, "ACCOUNT_SUBJECT_CONTRACT_VERSION", { enumerable: true, get: function () { return accountSubject_1.ACCOUNT_SUBJECT_CONTRACT_VERSION; } });
|
|
64
|
+
Object.defineProperty(exports, "FINANCIAL_EFFECT_DIRECTIONS", { enumerable: true, get: function () { return accountSubject_1.FINANCIAL_EFFECT_DIRECTIONS; } });
|
|
65
|
+
Object.defineProperty(exports, "KIND_INDEPENDENT_ACCOUNT_DIMENSIONS", { enumerable: true, get: function () { return accountSubject_1.KIND_INDEPENDENT_ACCOUNT_DIMENSIONS; } });
|
|
66
|
+
Object.defineProperty(exports, "accountActorChainFromSession", { enumerable: true, get: function () { return accountSubject_1.accountActorChainFromSession; } });
|
|
67
|
+
Object.defineProperty(exports, "accountActorChainSchema", { enumerable: true, get: function () { return accountSubject_1.accountActorChainSchema; } });
|
|
68
|
+
Object.defineProperty(exports, "accountActorNatureSchema", { enumerable: true, get: function () { return accountSubject_1.accountActorNatureSchema; } });
|
|
69
|
+
Object.defineProperty(exports, "accountKindActorNature", { enumerable: true, get: function () { return accountSubject_1.accountKindActorNature; } });
|
|
70
|
+
Object.defineProperty(exports, "accountKindActsAsItself", { enumerable: true, get: function () { return accountSubject_1.accountKindActsAsItself; } });
|
|
71
|
+
Object.defineProperty(exports, "attributeFinancialEffect", { enumerable: true, get: function () { return accountSubject_1.attributeFinancialEffect; } });
|
|
72
|
+
Object.defineProperty(exports, "financialEffectAttributionSchema", { enumerable: true, get: function () { return accountSubject_1.financialEffectAttributionSchema; } });
|
|
60
73
|
var username_1 = require("./username");
|
|
61
74
|
Object.defineProperty(exports, "usernameSchema", { enumerable: true, get: function () { return username_1.usernameSchema; } });
|
|
62
75
|
Object.defineProperty(exports, "usernameSchemaForAccountKind", { enumerable: true, get: function () { return username_1.usernameSchemaForAccountKind; } });
|
|
@@ -727,24 +740,35 @@ Object.defineProperty(exports, "costCenterStatusSchema", { enumerable: true, get
|
|
|
727
740
|
Object.defineProperty(exports, "costCenterSchema", { enumerable: true, get: function () { return entitlement_1.costCenterSchema; } });
|
|
728
741
|
Object.defineProperty(exports, "costCenterSpendSchema", { enumerable: true, get: function () { return entitlement_1.costCenterSpendSchema; } });
|
|
729
742
|
Object.defineProperty(exports, "productEntitlementSchema", { enumerable: true, get: function () { return entitlement_1.productEntitlementSchema; } });
|
|
743
|
+
var economics_1 = require("./inference/economics");
|
|
744
|
+
// Economic treatment (I09): derived by the server, never sent by a caller.
|
|
745
|
+
Object.defineProperty(exports, "INFERENCE_ECONOMIC_TREATMENTS", { enumerable: true, get: function () { return economics_1.INFERENCE_ECONOMIC_TREATMENTS; } });
|
|
746
|
+
Object.defineProperty(exports, "inferenceEconomicTreatmentSchema", { enumerable: true, get: function () { return economics_1.inferenceEconomicTreatmentSchema; } });
|
|
747
|
+
Object.defineProperty(exports, "PROVIDER_COST_SOURCES", { enumerable: true, get: function () { return economics_1.PROVIDER_COST_SOURCES; } });
|
|
748
|
+
Object.defineProperty(exports, "providerCostSourceSchema", { enumerable: true, get: function () { return economics_1.providerCostSourceSchema; } });
|
|
749
|
+
Object.defineProperty(exports, "costCenterUsageSchema", { enumerable: true, get: function () { return economics_1.costCenterUsageSchema; } });
|
|
730
750
|
var agency_1 = require("./agency");
|
|
731
751
|
Object.defineProperty(exports, "AUTONOMY_LEVELS", { enumerable: true, get: function () { return agency_1.AUTONOMY_LEVELS; } });
|
|
732
752
|
Object.defineProperty(exports, "CAPABILITY_PACKAGES", { enumerable: true, get: function () { return agency_1.CAPABILITY_PACKAGES; } });
|
|
733
753
|
Object.defineProperty(exports, "autonomyLevelSchema", { enumerable: true, get: function () { return agency_1.autonomyLevelSchema; } });
|
|
734
754
|
Object.defineProperty(exports, "capabilityPackageSchema", { enumerable: true, get: function () { return agency_1.capabilityPackageSchema; } });
|
|
735
755
|
Object.defineProperty(exports, "actorRefSchema", { enumerable: true, get: function () { return agency_1.actorRefSchema; } });
|
|
756
|
+
Object.defineProperty(exports, "executionActorRefSchema", { enumerable: true, get: function () { return agency_1.executionActorRefSchema; } });
|
|
757
|
+
Object.defineProperty(exports, "foregroundExecutionAuthorizationInputSchema", { enumerable: true, get: function () { return agency_1.foregroundExecutionAuthorizationInputSchema; } });
|
|
736
758
|
Object.defineProperty(exports, "resourceRefSchema", { enumerable: true, get: function () { return agency_1.resourceRefSchema; } });
|
|
737
759
|
Object.defineProperty(exports, "toolGrantOverrideSchema", { enumerable: true, get: function () { return agency_1.toolGrantOverrideSchema; } });
|
|
738
760
|
Object.defineProperty(exports, "grantLimitSchema", { enumerable: true, get: function () { return agency_1.grantLimitSchema; } });
|
|
739
761
|
Object.defineProperty(exports, "capabilityCatalogBindingSchema", { enumerable: true, get: function () { return agency_1.capabilityCatalogBindingSchema; } });
|
|
740
762
|
Object.defineProperty(exports, "executionAuthorizationRefSchema", { enumerable: true, get: function () { return agency_1.executionAuthorizationRefSchema; } });
|
|
741
763
|
Object.defineProperty(exports, "capabilityCoordinatorSchema", { enumerable: true, get: function () { return agency_1.capabilityCoordinatorSchema; } });
|
|
764
|
+
Object.defineProperty(exports, "capabilityTicketRequestSchema", { enumerable: true, get: function () { return agency_1.capabilityTicketRequestSchema; } });
|
|
742
765
|
Object.defineProperty(exports, "delegationGrantSchema", { enumerable: true, get: function () { return agency_1.delegationGrantSchema; } });
|
|
743
766
|
Object.defineProperty(exports, "automationTriggerSchema", { enumerable: true, get: function () { return agency_1.automationTriggerSchema; } });
|
|
744
767
|
Object.defineProperty(exports, "automationActorSelectionSchema", { enumerable: true, get: function () { return agency_1.automationActorSelectionSchema; } });
|
|
745
768
|
Object.defineProperty(exports, "automationDataFlowSchema", { enumerable: true, get: function () { return agency_1.automationDataFlowSchema; } });
|
|
746
769
|
Object.defineProperty(exports, "automationDefinitionSchema", { enumerable: true, get: function () { return agency_1.automationDefinitionSchema; } });
|
|
747
770
|
Object.defineProperty(exports, "capabilityTicketClaimsSchema", { enumerable: true, get: function () { return agency_1.capabilityTicketClaimsSchema; } });
|
|
771
|
+
Object.defineProperty(exports, "invocationPrincipalSchema", { enumerable: true, get: function () { return agency_1.invocationPrincipalSchema; } });
|
|
748
772
|
Object.defineProperty(exports, "policyDecisionSchema", { enumerable: true, get: function () { return agency_1.policyDecisionSchema; } });
|
|
749
773
|
Object.defineProperty(exports, "auditResultSchema", { enumerable: true, get: function () { return agency_1.auditResultSchema; } });
|
|
750
774
|
Object.defineProperty(exports, "auditEventSchema", { enumerable: true, get: function () { return agency_1.auditEventSchema; } });
|
|
@@ -801,3 +825,26 @@ Object.defineProperty(exports, "scopedExecutionSchema", { enumerable: true, get:
|
|
|
801
825
|
Object.defineProperty(exports, "canonicalScopedExecutionJson", { enumerable: true, get: function () { return scopedExecution_1.canonicalScopedExecutionJson; } });
|
|
802
826
|
var request_2 = require("./inference/request");
|
|
803
827
|
Object.defineProperty(exports, "scopedInferenceRequestSchema", { enumerable: true, get: function () { return request_2.scopedInferenceRequestSchema; } });
|
|
828
|
+
var access_1 = require("./products/access");
|
|
829
|
+
Object.defineProperty(exports, "productDefinitionSchema", { enumerable: true, get: function () { return access_1.productDefinitionSchema; } });
|
|
830
|
+
Object.defineProperty(exports, "subjectProductAccessQuerySchema", { enumerable: true, get: function () { return access_1.subjectProductAccessQuerySchema; } });
|
|
831
|
+
Object.defineProperty(exports, "productBenefitSchema", { enumerable: true, get: function () { return access_1.productBenefitSchema; } });
|
|
832
|
+
Object.defineProperty(exports, "productOfferSchema", { enumerable: true, get: function () { return access_1.productOfferSchema; } });
|
|
833
|
+
Object.defineProperty(exports, "productSubscriptionSourceSchema", { enumerable: true, get: function () { return access_1.productSubscriptionSourceSchema; } });
|
|
834
|
+
Object.defineProperty(exports, "productAccessGrantSchema", { enumerable: true, get: function () { return access_1.productAccessGrantSchema; } });
|
|
835
|
+
Object.defineProperty(exports, "productOfferSegmentSchema", { enumerable: true, get: function () { return access_1.productOfferSegmentSchema; } });
|
|
836
|
+
Object.defineProperty(exports, "subjectProductAccessSchema", { enumerable: true, get: function () { return access_1.subjectProductAccessSchema; } });
|
|
837
|
+
var economics_2 = require("./inference/economics");
|
|
838
|
+
Object.defineProperty(exports, "meteredGenerationSchema", { enumerable: true, get: function () { return economics_2.meteredGenerationSchema; } });
|
|
839
|
+
var capabilityBindings_1 = require("./capabilityBindings");
|
|
840
|
+
Object.defineProperty(exports, "canonicalCapabilityJson", { enumerable: true, get: function () { return capabilityBindings_1.canonicalCapabilityJson; } });
|
|
841
|
+
Object.defineProperty(exports, "inputSatisfiesCapabilityLimits", { enumerable: true, get: function () { return capabilityBindings_1.inputSatisfiesCapabilityLimits; } });
|
|
842
|
+
Object.defineProperty(exports, "isLoopbackOrigin", { enumerable: true, get: function () { return capabilityBindings_1.isLoopbackOrigin; } });
|
|
843
|
+
__exportStar(require("./agentKeys"), exports);
|
|
844
|
+
var billing_1 = require("./products/billing");
|
|
845
|
+
Object.defineProperty(exports, "productSubscriptionSummarySchema", { enumerable: true, get: function () { return billing_1.productSubscriptionSummarySchema; } });
|
|
846
|
+
Object.defineProperty(exports, "productSubscriptionsResponseSchema", { enumerable: true, get: function () { return billing_1.productSubscriptionsResponseSchema; } });
|
|
847
|
+
Object.defineProperty(exports, "subscriptionCreditGrantSchema", { enumerable: true, get: function () { return billing_1.subscriptionCreditGrantSchema; } });
|
|
848
|
+
Object.defineProperty(exports, "subscriptionCreditGrantsResponseSchema", { enumerable: true, get: function () { return billing_1.subscriptionCreditGrantsResponseSchema; } });
|
|
849
|
+
Object.defineProperty(exports, "cancelProductSubscriptionSchema", { enumerable: true, get: function () { return billing_1.cancelProductSubscriptionSchema; } });
|
|
850
|
+
Object.defineProperty(exports, "productSubscriptionCancellationResultSchema", { enumerable: true, get: function () { return billing_1.productSubscriptionCancellationResultSchema; } });
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Economic treatment and durable usage/cost reporting for inference
|
|
4
|
+
* (issue #1526, plan item I09).
|
|
5
|
+
*
|
|
6
|
+
* ## Two treatments, decided by the server
|
|
7
|
+
*
|
|
8
|
+
* - `commercial` — the default for every caller. Reserve → settle → refund
|
|
9
|
+
* (ADR 0009), when this deployment charges at all.
|
|
10
|
+
* - `internal_metered` — a product relationship Oxy itself configured and
|
|
11
|
+
* versioned (e.g. Alia consuming Kaana through the Oxy edge). No hold, no
|
|
12
|
+
* receipt, no promotional grant, no `platform_revenue` entry and no transfer
|
|
13
|
+
* between products; usage and cost are still recorded durably, and scopes,
|
|
14
|
+
* revocation, technical capacity, model eligibility, privacy and
|
|
15
|
+
* idempotency all still apply.
|
|
16
|
+
*
|
|
17
|
+
* The treatment is derived from the AUTHENTICATED application, its environment
|
|
18
|
+
* and lane, against a versioned policy. Nothing a caller sends — body, header,
|
|
19
|
+
* bot kind, agent id, delegated user — can select it, so neither value is ever
|
|
20
|
+
* accepted on a request shape.
|
|
21
|
+
*
|
|
22
|
+
* ## Four numbers that never merge
|
|
23
|
+
*
|
|
24
|
+
* A usage report separates what was consumed (units), upstream cost evidence
|
|
25
|
+
* (`providerCost`, reported or rate-card-estimated by Kaana's operator feed), what the published
|
|
26
|
+
* tariff would have charged (`tariff`) and what a customer was actually charged
|
|
27
|
+
* (`customerCharge`, from settled receipts only). A tariff is not a cost, and an
|
|
28
|
+
* UNKNOWN cost is reported as unknown — counted, never summed as zero.
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.meteredGenerationSchema = exports.costCenterUsageSchema = exports.providerCostSourceSchema = exports.PROVIDER_COST_SOURCES = exports.inferenceEconomicTreatmentSchema = exports.INFERENCE_ECONOMIC_TREATMENTS = void 0;
|
|
32
|
+
const zod_1 = require("zod");
|
|
33
|
+
const entitlement_1 = require("./entitlement");
|
|
34
|
+
const money_1 = require("./money");
|
|
35
|
+
const identifiers_1 = require("./identifiers");
|
|
36
|
+
const usage_1 = require("./usage");
|
|
37
|
+
/** How a request is treated economically. The first entry is the default. */
|
|
38
|
+
exports.INFERENCE_ECONOMIC_TREATMENTS = ['commercial', 'internal_metered'];
|
|
39
|
+
exports.inferenceEconomicTreatmentSchema = zod_1.z.enum(exports.INFERENCE_ECONOMIC_TREATMENTS);
|
|
40
|
+
/**
|
|
41
|
+
* Where an upstream attempt's cost came from, exactly as Kaana's operator feed
|
|
42
|
+
* states it: an exact provider billing fact, a versioned rate-card estimate, or
|
|
43
|
+
* nothing known. `unknown` carries no amount, so it cannot be summed as free.
|
|
44
|
+
*/
|
|
45
|
+
exports.PROVIDER_COST_SOURCES = ['provider_reported', 'rate_card', 'unknown'];
|
|
46
|
+
exports.providerCostSourceSchema = zod_1.z.enum(exports.PROVIDER_COST_SOURCES);
|
|
47
|
+
const nonNegativeCount = zod_1.z.number().int().nonnegative().safe();
|
|
48
|
+
/** One amount family, with the rows it could not include counted beside it. */
|
|
49
|
+
const knownAmountSchema = zod_1.z
|
|
50
|
+
.object({
|
|
51
|
+
/** Sum of the rows whose amount is known, in `currency`. */
|
|
52
|
+
amount: money_1.exactDecimalSchema,
|
|
53
|
+
/** Rows (requests or attempts) whose amount is known. */
|
|
54
|
+
knownCount: nonNegativeCount,
|
|
55
|
+
/** Rows that exist and have NO amount. Never folded into `amount` as zero. */
|
|
56
|
+
unknownCount: nonNegativeCount,
|
|
57
|
+
})
|
|
58
|
+
.strict();
|
|
59
|
+
/**
|
|
60
|
+
* What one cost centre consumed over a window under one economic treatment.
|
|
61
|
+
*
|
|
62
|
+
* `customerCharge` is always zero with zero receipts for `internal_metered`:
|
|
63
|
+
* those requests have no receipt by construction, and saying so is the point.
|
|
64
|
+
*/
|
|
65
|
+
exports.costCenterUsageSchema = zod_1.z
|
|
66
|
+
.object({
|
|
67
|
+
schemaVersion: zod_1.z.literal(1),
|
|
68
|
+
/** `null` for usage booked to an account with no cost centre above it. */
|
|
69
|
+
costCenter: entitlement_1.costCenterSchema.nullable(),
|
|
70
|
+
treatment: exports.inferenceEconomicTreatmentSchema,
|
|
71
|
+
currency: money_1.currencyCodeSchema,
|
|
72
|
+
periodStart: zod_1.z.string().datetime(),
|
|
73
|
+
periodEnd: zod_1.z.string().datetime(),
|
|
74
|
+
/** Requests settled in the window (completed, failed, cancelled or partial). */
|
|
75
|
+
requestCount: nonNegativeCount,
|
|
76
|
+
/** Requests admitted and not yet settled when the report was read. */
|
|
77
|
+
inFlightCount: nonNegativeCount,
|
|
78
|
+
/** Expired admissions with no authoritative terminal usage; never called in-flight. */
|
|
79
|
+
expiredCount: nonNegativeCount.default(0),
|
|
80
|
+
/** Metered units, by unit name, summed over the settled requests. */
|
|
81
|
+
units: zod_1.z.record(zod_1.z.string(), nonNegativeCount),
|
|
82
|
+
/** The published tariff at each request's pinned price version. Not a cost. */
|
|
83
|
+
tariff: knownAmountSchema,
|
|
84
|
+
/** Upstream cost evidence, reported or estimated, per attempt including failed failovers. */
|
|
85
|
+
providerCost: knownAmountSchema.extend({
|
|
86
|
+
/** Attempts with a known subtotal and incomplete upstream cost coverage. */
|
|
87
|
+
partialCount: nonNegativeCount.default(0),
|
|
88
|
+
/** Requests with no ingested provider-cost attempt yet; never measured zero. */
|
|
89
|
+
missingRequestCount: nonNegativeCount.default(0),
|
|
90
|
+
/** Attempts priced in a different currency, excluded without currency conversion. */
|
|
91
|
+
otherCurrencyCount: nonNegativeCount.default(0),
|
|
92
|
+
/** Amount stated by the provider; this is not a copy of its invoice. */
|
|
93
|
+
providerReportedAmount: money_1.exactDecimalSchema.default('0'),
|
|
94
|
+
providerReportedCount: nonNegativeCount.default(0),
|
|
95
|
+
/** Amount estimated from Kaana's immutable rate card, never described as invoiced. */
|
|
96
|
+
estimatedAmount: money_1.exactDecimalSchema.default('0'),
|
|
97
|
+
estimatedCount: nonNegativeCount.default(0),
|
|
98
|
+
}),
|
|
99
|
+
/**
|
|
100
|
+
* What customers were actually charged, from settled receipts only. A
|
|
101
|
+
* request with no receipt was not charged — an internal one by
|
|
102
|
+
* construction, a shadow-metered one because charging is off.
|
|
103
|
+
*/
|
|
104
|
+
customerCharge: zod_1.z
|
|
105
|
+
.object({ amount: money_1.exactDecimalSchema, receiptCount: nonNegativeCount })
|
|
106
|
+
.strict(),
|
|
107
|
+
})
|
|
108
|
+
.strict();
|
|
109
|
+
/** A technical generation record for an internal request, never a financial receipt. */
|
|
110
|
+
exports.meteredGenerationSchema = zod_1.z.object({
|
|
111
|
+
schemaVersion: zod_1.z.literal(2),
|
|
112
|
+
kind: zod_1.z.literal('metered_usage'),
|
|
113
|
+
meteredUsageId: zod_1.z.string().min(1),
|
|
114
|
+
requestId: zod_1.z.string().min(1),
|
|
115
|
+
generationId: zod_1.z.string().min(1).optional(),
|
|
116
|
+
parentRequestId: zod_1.z.string().min(1).optional(),
|
|
117
|
+
applicationId: zod_1.z.string().min(1),
|
|
118
|
+
credentialId: zod_1.z.string().min(1),
|
|
119
|
+
delegatedUserId: zod_1.z.string().min(1).optional(),
|
|
120
|
+
environment: identifiers_1.inferenceEnvironmentSchema,
|
|
121
|
+
economicTreatment: zod_1.z.literal('internal_metered'),
|
|
122
|
+
economicPolicyVersion: zod_1.z.string().min(1),
|
|
123
|
+
outcome: usage_1.inferenceRequestOutcomeSchema,
|
|
124
|
+
usageSource: money_1.usageSourceSchema,
|
|
125
|
+
units: zod_1.z.array(money_1.usageQuantitySchema),
|
|
126
|
+
resolvedModelReference: identifiers_1.modelReferenceSchema,
|
|
127
|
+
servingProvider: zod_1.z.string().min(1),
|
|
128
|
+
tariff: zod_1.z.discriminatedUnion('status', [
|
|
129
|
+
zod_1.z.object({ status: zod_1.z.literal('quoted'), amount: money_1.exactDecimalSchema, currency: money_1.currencyCodeSchema,
|
|
130
|
+
priceVersionId: zod_1.z.string().min(1) }).strict(),
|
|
131
|
+
zod_1.z.object({ status: zod_1.z.literal('unpriced'), priceVersionId: zod_1.z.string().min(1).nullable() }).strict(),
|
|
132
|
+
]),
|
|
133
|
+
customerCharge: zod_1.z.object({ status: zod_1.z.literal('not_charged') }).strict(),
|
|
134
|
+
settledAt: zod_1.z.string().datetime(),
|
|
135
|
+
}).strict();
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subjectProductAccessSchema = exports.productAccessGrantSchema = exports.productOfferSegmentSchema = exports.productSubscriptionSourceSchema = exports.productOfferSchema = exports.productBenefitSchema = exports.subjectProductAccessQuerySchema = exports.productDefinitionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const identifiers_1 = require("../inference/identifiers");
|
|
6
|
+
const identifier = zod_1.z.string().min(1).max(160);
|
|
7
|
+
const count = zod_1.z.number().int().nonnegative().safe();
|
|
8
|
+
const period = zod_1.z.object({ start: zod_1.z.string().datetime(), end: zod_1.z.string().datetime() }).strict()
|
|
9
|
+
.refine(value => Date.parse(value.end) > Date.parse(value.start), 'period end must follow start');
|
|
10
|
+
/** Product ownership and audience are registered together; branding grants no trust. */
|
|
11
|
+
exports.productDefinitionSchema = zod_1.z.object({
|
|
12
|
+
schemaVersion: zod_1.z.literal(1), id: identifier, ownerAccountId: identifiers_1.oxyAccountIdSchema,
|
|
13
|
+
applicationId: identifiers_1.oxyApplicationIdSchema,
|
|
14
|
+
}).strict();
|
|
15
|
+
exports.subjectProductAccessQuerySchema = zod_1.z.object({
|
|
16
|
+
schemaVersion: zod_1.z.literal(1), subjectAccountId: identifiers_1.oxyAccountIdSchema, productId: identifier,
|
|
17
|
+
}).strict();
|
|
18
|
+
/** Every quota declares its combination rule; there is no commercial default. */
|
|
19
|
+
exports.productBenefitSchema = zod_1.z.discriminatedUnion('kind', [
|
|
20
|
+
zod_1.z.object({ kind: zod_1.z.literal('capability'), productId: identifier, key: identifier }).strict(),
|
|
21
|
+
zod_1.z.object({ kind: zod_1.z.literal('quota'), productId: identifier, key: identifier,
|
|
22
|
+
unit: identifier, included: count, combination: zod_1.z.enum(['maximum', 'sum', 'exclusive']) }).strict(),
|
|
23
|
+
]);
|
|
24
|
+
/** A version names a frozen offer. An empty bundle grants nothing. */
|
|
25
|
+
exports.productOfferSchema = zod_1.z.object({
|
|
26
|
+
schemaVersion: zod_1.z.literal(1), id: identifier, version: zod_1.z.number().int().positive().safe(),
|
|
27
|
+
kind: zod_1.z.enum(['individual', 'bundle']), benefits: zod_1.z.array(exports.productBenefitSchema),
|
|
28
|
+
}).strict().refine(value => value.kind === 'bundle' || new Set(value.benefits.map(benefit => benefit.productId)).size <= 1, 'individual offers cannot cover multiple products');
|
|
29
|
+
exports.productSubscriptionSourceSchema = zod_1.z.object({
|
|
30
|
+
schemaVersion: zod_1.z.literal(1), id: identifier,
|
|
31
|
+
beneficiaryAccountId: identifiers_1.oxyAccountIdSchema, payerAccountId: identifiers_1.oxyAccountIdSchema,
|
|
32
|
+
provider: zod_1.z.enum(['stripe', 'peable']), providerSubscriptionId: identifier,
|
|
33
|
+
status: zod_1.z.enum(['active', 'trialing', 'past_due', 'unpaid', 'canceled', 'paused', 'incomplete', 'incomplete_expired']),
|
|
34
|
+
period, cancelAtPeriodEnd: zod_1.z.boolean(),
|
|
35
|
+
}).strict();
|
|
36
|
+
/** A frozen paid-period/offer segment; upgrades append, never rewrite it. */
|
|
37
|
+
exports.productOfferSegmentSchema = zod_1.z.object({
|
|
38
|
+
schemaVersion: zod_1.z.literal(1), id: identifier, subscriptionId: identifier,
|
|
39
|
+
beneficiaryAccountId: identifiers_1.oxyAccountIdSchema, offerId: identifier,
|
|
40
|
+
offerVersion: zod_1.z.number().int().positive().safe(), origin: zod_1.z.enum(['individual', 'bundle']), period,
|
|
41
|
+
}).strict();
|
|
42
|
+
/** Provenance survives cancellation: deactivate a source, never delete history. */
|
|
43
|
+
exports.productAccessGrantSchema = zod_1.z.object({
|
|
44
|
+
schemaVersion: zod_1.z.literal(1), id: identifier, sourceSegmentId: identifier,
|
|
45
|
+
beneficiaryAccountId: identifiers_1.oxyAccountIdSchema, offerId: identifier,
|
|
46
|
+
offerVersion: zod_1.z.number().int().positive().safe(),
|
|
47
|
+
origin: zod_1.z.enum(['individual', 'bundle']), benefit: exports.productBenefitSchema,
|
|
48
|
+
period, revokedAt: zod_1.z.string().datetime().nullable(),
|
|
49
|
+
}).strict();
|
|
50
|
+
/** Access answers contain no payer, provider reference, price or account balance. */
|
|
51
|
+
exports.subjectProductAccessSchema = zod_1.z.object({
|
|
52
|
+
schemaVersion: zod_1.z.literal(1), subjectAccountId: identifiers_1.oxyAccountIdSchema, productId: identifier,
|
|
53
|
+
evaluatedAt: zod_1.z.string().datetime(),
|
|
54
|
+
capabilities: zod_1.z.array(zod_1.z.object({ key: identifier, grantIds: zod_1.z.array(identifier) }).strict()),
|
|
55
|
+
quotas: zod_1.z.array(zod_1.z.object({ key: identifier, unit: identifier, included: count,
|
|
56
|
+
combination: zod_1.z.enum(['maximum', 'sum', 'exclusive']), grantIds: zod_1.z.array(identifier) }).strict()),
|
|
57
|
+
conflicts: zod_1.z.array(zod_1.z.object({ key: identifier,
|
|
58
|
+
reason: zod_1.z.enum(['combination_mismatch', 'unit_mismatch', 'exclusive_overlap', 'unsafe_total']),
|
|
59
|
+
grantIds: zod_1.z.array(identifier) }).strict()),
|
|
60
|
+
}).strict();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.productSubscriptionCancellationResultSchema = exports.cancelProductSubscriptionSchema = exports.subscriptionCreditGrantsResponseSchema = exports.subscriptionCreditGrantSchema = exports.productSubscriptionsResponseSchema = exports.productSubscriptionSummarySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const identifiers_1 = require("../inference/identifiers");
|
|
6
|
+
const id = zod_1.z.string().min(1).max(160);
|
|
7
|
+
const name = zod_1.z.string().min(1).max(100);
|
|
8
|
+
const count = zod_1.z.number().int().nonnegative().safe();
|
|
9
|
+
const period = zod_1.z.object({ start: zod_1.z.string().datetime(), end: zod_1.z.string().datetime() }).strict()
|
|
10
|
+
.refine(value => Date.parse(value.end) > Date.parse(value.start), 'Period end must follow start');
|
|
11
|
+
/** Self-service provenance; no payer/provider identifiers or balances in access metadata. */
|
|
12
|
+
exports.productSubscriptionSummarySchema = zod_1.z.object({ sourceId: id,
|
|
13
|
+
status: zod_1.z.enum(['active', 'trialing', 'past_due', 'unpaid', 'canceled', 'paused', 'incomplete', 'incomplete_expired']),
|
|
14
|
+
period, cancelAtPeriodEnd: zod_1.z.boolean(), canCancel: zod_1.z.boolean(),
|
|
15
|
+
offers: zod_1.z.array(zod_1.z.object({ segmentId: id, offerId: id, offerVersion: zod_1.z.number().int().positive().safe(),
|
|
16
|
+
displayName: name, origin: zod_1.z.enum(['individual', 'bundle']), period, current: zod_1.z.boolean(),
|
|
17
|
+
products: zod_1.z.array(zod_1.z.object({ id, displayName: name }).strict()),
|
|
18
|
+
}).strict()),
|
|
19
|
+
}).strict();
|
|
20
|
+
exports.productSubscriptionsResponseSchema = zod_1.z.object({ subscriptions: zod_1.z.array(exports.productSubscriptionSummarySchema) }).strict();
|
|
21
|
+
exports.subscriptionCreditGrantSchema = zod_1.z.object({ id, invoiceId: id,
|
|
22
|
+
origin: zod_1.z.enum(['subscription_payment', 'subscription_proration', 'subscription_promotional_grant']),
|
|
23
|
+
period, granted: count, consumed: count, clawed: count, remaining: count,
|
|
24
|
+
promotionId: id.nullable(), createdAt: zod_1.z.string().datetime(),
|
|
25
|
+
}).strict().refine(value => BigInt(value.consumed) + BigInt(value.clawed) + BigInt(value.remaining) === BigInt(value.granted), 'Grant conservation differs');
|
|
26
|
+
exports.subscriptionCreditGrantsResponseSchema = zod_1.z.object({ grants: zod_1.z.array(exports.subscriptionCreditGrantSchema) }).strict();
|
|
27
|
+
exports.cancelProductSubscriptionSchema = zod_1.z.object({ sourceId: id, expectedSubjectAccountId: identifiers_1.oxyAccountIdSchema.optional() }).strict();
|
|
28
|
+
/** Remote acceptance is distinct from completed local reconciliation. */
|
|
29
|
+
exports.productSubscriptionCancellationResultSchema = zod_1.z.union([
|
|
30
|
+
zod_1.z.object({ sourceId: id, cancelAtPeriodEnd: zod_1.z.literal(true) }).strict(),
|
|
31
|
+
zod_1.z.object({ sourceId: id, reconciliationPending: zod_1.z.literal(true) }).strict(),
|
|
32
|
+
]);
|
package/dist/cjs/signIn.js
CHANGED
|
@@ -199,7 +199,7 @@ function isSecondFactorRequired(result) {
|
|
|
199
199
|
* What a re-verification email code confirms. The code is bound to it: a code
|
|
200
200
|
* asked for one change never authorises another, and the email names it.
|
|
201
201
|
*/
|
|
202
|
-
exports.REAUTH_ACTIONS = ['change_password', 'totp', 'link_commons', 'delete_account'];
|
|
202
|
+
exports.REAUTH_ACTIONS = ['change_password', 'totp', 'link_commons', 'delete_account', 'credentials_manage'];
|
|
203
203
|
/** `POST /users/me/reauth/email` */
|
|
204
204
|
exports.reauthEmailStartRequestSchema = zod_1.z.object({ action: zod_1.z.enum(exports.REAUTH_ACTIONS) }).strict();
|
|
205
205
|
/**
|