From 32d0bf1c9820389740c8e27df73f3c96715e9235 Mon Sep 17 00:00:00 2001 From: ochk-docs-bot Date: Tue, 9 Jun 2026 22:20:16 +0000 Subject: [PATCH] docs(sdk): sync me-client@0.22.0 Auto-generated by oc-packages release workflow on tag me-client-v0.22.0. Source: https://github.com/orangecheck/oc-packages/tree/me-client-v0.22.0/me-client/src Co-Authored-By: ochk-docs-bot --- src/pages/sdk/me-client/README.mdx | 7 +++ .../sdk/me-client/functions/computeFees.mdx | 36 ++++++++++---- .../me-client/functions/subtypesForClass.mdx | 2 +- .../functions/validateIntegratorConfig.mdx | 2 +- .../interfaces/AgentClassOverride.mdx | 29 +++++++++++ .../me-client/interfaces/BillableEvent.mdx | 29 +++++------ .../sdk/me-client/interfaces/ComputedFees.mdx | 10 ++-- .../interfaces/DropClosedWebhookPayload.mdx | 48 +++++++++++++++++++ .../interfaces/DropResponseBlock.mdx | 30 ++++++++++++ .../interfaces/DropScheduleSummary.mdx | 28 +++++++++++ .../sdk/me-client/interfaces/Federation.mdx | 32 ++++++------- .../interfaces/IntegratorEventConfig.mdx | 9 ++-- .../interfaces/IntegratorPriceConfig.mdx | 12 ++--- .../interfaces/PaymentAuthorizeOptions.mdx | 12 ++--- .../me-client/interfaces/PaymentResult.mdx | 12 ++--- .../sdk/me-client/interfaces/Session.mdx | 14 +++--- .../me-client/interfaces/SessionPolicy.mdx | 8 ++-- .../me-client/interfaces/SignInOptions.mdx | 8 ++-- .../interfaces/SystemWebhookPayload.mdx | 42 ++++++++++++++++ .../me-client/interfaces/TelemetryEvent.mdx | 8 ++-- .../me-client/interfaces/ValidationResult.mdx | 6 +-- .../me-client/interfaces/WebhookHeaders.mdx | 14 +++--- .../me-client/interfaces/WebhookPayload.mdx | 35 +++++++------- .../sdk/me-client/type-aliases/AttestTier.mdx | 2 +- .../me-client/type-aliases/ClassASubtype.mdx | 2 +- .../me-client/type-aliases/ClassBSubtype.mdx | 2 +- .../me-client/type-aliases/ClassCSubtype.mdx | 2 +- .../me-client/type-aliases/DropCadence.mdx | 36 ++++++++++++++ .../sdk/me-client/type-aliases/EventClass.mdx | 2 +- .../me-client/type-aliases/EventSubtype.mdx | 2 +- .../type-aliases/FederationStatus.mdx | 2 +- .../me-client/type-aliases/SigningMethod.mdx | 2 +- .../me-client/type-aliases/SiteFeeShape.mdx | 2 +- .../variables/ALL_EVENT_SUBTYPES.mdx | 2 +- .../variables/MAX_DROP_WINDOW_DAYS.mdx | 22 +++++++++ .../variables/MIN_INTEGRATOR_PRICE_SATS.mdx | 13 +++-- src/pages/sdk/me-client/variables/oc.mdx | 20 ++++---- 37 files changed, 405 insertions(+), 139 deletions(-) create mode 100644 src/pages/sdk/me-client/interfaces/AgentClassOverride.mdx create mode 100644 src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx create mode 100644 src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx create mode 100644 src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx create mode 100644 src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx create mode 100644 src/pages/sdk/me-client/type-aliases/DropCadence.mdx create mode 100644 src/pages/sdk/me-client/variables/MAX_DROP_WINDOW_DAYS.mdx diff --git a/src/pages/sdk/me-client/README.mdx b/src/pages/sdk/me-client/README.mdx index cd159ca..02ea60f 100644 --- a/src/pages/sdk/me-client/README.mdx +++ b/src/pages/sdk/me-client/README.mdx @@ -19,9 +19,13 @@ export const metadata = { - [ActivityAttestationBundle](interfaces/ActivityAttestationBundle.mdx) - [ActivityVerifyCheck](interfaces/ActivityVerifyCheck.mdx) - [ActivityVerifyResult](interfaces/ActivityVerifyResult.mdx) +- [AgentClassOverride](interfaces/AgentClassOverride.mdx) - [ArchetypeTemplate](interfaces/ArchetypeTemplate.mdx) - [BillableEvent](interfaces/BillableEvent.mdx) - [ComputedFees](interfaces/ComputedFees.mdx) +- [DropClosedWebhookPayload](interfaces/DropClosedWebhookPayload.mdx) +- [DropResponseBlock](interfaces/DropResponseBlock.mdx) +- [DropScheduleSummary](interfaces/DropScheduleSummary.mdx) - [EventSubtypeMetadata](interfaces/EventSubtypeMetadata.mdx) - [FamilyScopesOptions](interfaces/FamilyScopesOptions.mdx) - [FamilyScopesResult](interfaces/FamilyScopesResult.mdx) @@ -39,6 +43,7 @@ export const metadata = { - [Session](interfaces/Session.mdx) - [SessionPolicy](interfaces/SessionPolicy.mdx) - [SignInOptions](interfaces/SignInOptions.mdx) +- [SystemWebhookPayload](interfaces/SystemWebhookPayload.mdx) - [TelemetryEvent](interfaces/TelemetryEvent.mdx) - [TrustAttestationCount](interfaces/TrustAttestationCount.mdx) - [ValidationResult](interfaces/ValidationResult.mdx) @@ -56,6 +61,7 @@ export const metadata = { - [ClassASubtype](type-aliases/ClassASubtype.mdx) - [ClassBSubtype](type-aliases/ClassBSubtype.mdx) - [ClassCSubtype](type-aliases/ClassCSubtype.mdx) +- [DropCadence](type-aliases/DropCadence.mdx) - [EventClass](type-aliases/EventClass.mdx) - [EventSubtype](type-aliases/EventSubtype.mdx) - [FamilyVerb](type-aliases/FamilyVerb.mdx) @@ -75,6 +81,7 @@ export const metadata = { - [family](variables/family.mdx) - [federations](variables/federations.mdx) - [identity](variables/identity.mdx) +- [MAX\_DROP\_WINDOW\_DAYS](variables/MAX_DROP_WINDOW_DAYS.mdx) - [MIN\_INTEGRATOR\_PRICE\_SATS](variables/MIN_INTEGRATOR_PRICE_SATS.mdx) - [oc](variables/oc.mdx) - [payment](variables/payment.mdx) diff --git a/src/pages/sdk/me-client/functions/computeFees.mdx b/src/pages/sdk/me-client/functions/computeFees.mdx index 383f121..260f0c6 100644 --- a/src/pages/sdk/me-client/functions/computeFees.mdx +++ b/src/pages/sdk/me-client/functions/computeFees.mdx @@ -12,21 +12,35 @@ export const metadata = { # Function: computeFees() ```ts -function computeFees(cfg: IntegratorEventConfig, payment_amount_sats?: number): ComputedFees; +function computeFees( + cfg: IntegratorEventConfig, + payment_amount_sats?: number, + opts?: { + is_agent?: boolean; +}): ComputedFees; ``` -Defined in: [me-client/src/types.ts:120](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L120) +Defined in: [me-client/src/types.ts:156](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L156) Compute the four-way fee split for an event given an integrator's config and (for percent_of_amount events) the underlying payment - amount. - - Invariants (verified by tests in oc-me-web/src/lib/events/types.test.ts): - 1. gross_fee_sats >= MIN_INTEGRATOR_PRICE_SATS - 2. platform_fee_sats >= PLATFORM_FEE_POLICY.min_floor_sats - 3. user_share_pct is clamped to [0, 0.8] - 4. site_rebate_sats >= 0 - 5. gross == platform + user + rebate (exact, modulo rounding into rebate) + amount. MIRRORS oc-me-web/src/lib/events/types.ts computeFees() + EXACTLY — the SDK-side replay (oc.event.verify) re-runs this against + envelopes the server billed, so any drift is a false "divergence". + + Invariants: + 1. gross_fee_sats >= MIN_INTEGRATOR_PRICE_SATS (1-sat atomic floor) + 2. platform_fee_sats = min(gross, max(min_floor, round(gross × pct))) + — bounded above by gross so a 1-sat event can't owe more + platform fee than it grossed + 3. user_earned_sats = min(gross − platform, round(gross × share)), + share clamped to [0, 0.8] + 4. site_rebate_sats = gross − platform − user (exact remainder) + 5. gross == platform + user + rebate exactly + + When `opts.is_agent` is true AND the config has an `agent` override, + the agent's site_pays / user_share_pct apply. `agent.refuse: true` + throws 'agent_refused' (the server maps it to 422). ## Parameters @@ -34,6 +48,8 @@ Compute the four-way fee split for an event given an integrator's | ------ | ------ | | `cfg` | [`IntegratorEventConfig`](../interfaces/IntegratorEventConfig.mdx) | | `payment_amount_sats?` | `number` | +| `opts?` | \{ `is_agent?`: `boolean`; \} | +| `opts.is_agent?` | `boolean` | ## Returns diff --git a/src/pages/sdk/me-client/functions/subtypesForClass.mdx b/src/pages/sdk/me-client/functions/subtypesForClass.mdx index 6fb2ce7..5345ea2 100644 --- a/src/pages/sdk/me-client/functions/subtypesForClass.mdx +++ b/src/pages/sdk/me-client/functions/subtypesForClass.mdx @@ -15,7 +15,7 @@ export const metadata = { function subtypesForClass(cls: EventClass): EventSubtypeMetadata[]; ``` -Defined in: [me-client/src/subtypes.ts:179](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/subtypes.ts#L179) +Defined in: [me-client/src/subtypes.ts:180](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/subtypes.ts#L180) All subtypes for a given class · convenience accessor. diff --git a/src/pages/sdk/me-client/functions/validateIntegratorConfig.mdx b/src/pages/sdk/me-client/functions/validateIntegratorConfig.mdx index 70ccc94..7f05ac0 100644 --- a/src/pages/sdk/me-client/functions/validateIntegratorConfig.mdx +++ b/src/pages/sdk/me-client/functions/validateIntegratorConfig.mdx @@ -15,7 +15,7 @@ export const metadata = { function validateIntegratorConfig(cfg: IntegratorPriceConfig): ValidationResult; ``` -Defined in: [me-client/src/types.ts:157](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L157) +Defined in: [me-client/src/types.ts:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) Validate an integrator's pricing config against the platform's non-negotiable rules. Run client-side before posting; the server runs diff --git a/src/pages/sdk/me-client/interfaces/AgentClassOverride.mdx b/src/pages/sdk/me-client/interfaces/AgentClassOverride.mdx new file mode 100644 index 0000000..3cd57fb --- /dev/null +++ b/src/pages/sdk/me-client/interfaces/AgentClassOverride.mdx @@ -0,0 +1,29 @@ +export const metadata = { + title: "Interface: AgentClassOverride", + description: "Auto-generated API reference for Interface: AgentClassOverride. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / AgentClassOverride + +# Interface: AgentClassOverride + +Defined in: [me-client/src/types.ts:90](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L90) + +Optional per-class pricing overrides · per OCHK-V3-PLAN §7 phase-1. + Agents acting under a scoped oc-agent delegation may bill + differently than humans firing the same subtype. When `agent` is + unset on a subtype, agent traffic bills at the human rate. `refuse: + true` makes the subtype human-only — the endpoint returns 422 + agent_refused for is_agent=true requests. + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| <a id="property-refuse"></a> `refuse?` | `boolean` | When true, agent traffic is refused for this subtype. | [me-client/src/types.ts:96](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L96) | +| <a id="property-site_pays"></a> `site_pays?` | [`SiteFeeShape`](../type-aliases/SiteFeeShape.mdx) | Override site_pays for agent-fired events. | [me-client/src/types.ts:92](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L92) | +| <a id="property-user_share_pct"></a> `user_share_pct?` | `number` | Override user_share_pct. Same default-fallback as site_pays. | [me-client/src/types.ts:94](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L94) | diff --git a/src/pages/sdk/me-client/interfaces/BillableEvent.mdx b/src/pages/sdk/me-client/interfaces/BillableEvent.mdx index 3252ee8..f6bee2b 100644 --- a/src/pages/sdk/me-client/interfaces/BillableEvent.mdx +++ b/src/pages/sdk/me-client/interfaces/BillableEvent.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: BillableEvent -Defined in: [me-client/src/types.ts:200](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L200) +Defined in: [me-client/src/types.ts:248](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L248) ## Extended by @@ -21,16 +21,17 @@ Defined in: [me-client/src/types.ts:200](https://github.com/orangecheck/oc-packa | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <a id="property-class"></a> `class` | [`EventClass`](../type-aliases/EventClass.mdx) | - | [me-client/src/types.ts:203](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L203) | -| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | - | [me-client/src/types.ts:206](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L206) | -| <a id="property-id"></a> `id` | `string` | - | [me-client/src/types.ts:201](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L201) | -| <a id="property-is_agent"></a> `is_agent?` | `boolean` | Per OCHK-V3-PLAN §7 phase-1 · true when the event was fired by an oc-agent delegation rather than a human session. The integrator's IntegratorEventConfig.agent block may price these differently or refuse them. Optional · canonical encoder branches to v=3 only when present, so legacy human-fired events keep their v=2 hash + signature. | [me-client/src/types.ts:217](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L217) | -| <a id="property-occurred_at"></a> `occurred_at` | `string` | - | [me-client/src/types.ts:202](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L202) | -| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | - | [me-client/src/types.ts:207](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L207) | -| <a id="property-site"></a> `site` | \{ `display_name`: `string`; `domain`: `string`; \} | - | [me-client/src/types.ts:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) | -| `site.display_name` | `string` | - | [me-client/src/types.ts:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) | -| `site.domain` | `string` | - | [me-client/src/types.ts:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) | -| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | - | [me-client/src/types.ts:209](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L209) | -| <a id="property-subtype"></a> `subtype` | [`EventSubtype`](../type-aliases/EventSubtype.mdx) | - | [me-client/src/types.ts:204](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L204) | -| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | - | [me-client/src/types.ts:208](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L208) | -| <a id="property-verify_url"></a> `verify_url` | `string` | - | [me-client/src/types.ts:210](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L210) | +| <a id="property-class"></a> `class` | [`EventClass`](../type-aliases/EventClass.mdx) | - | [me-client/src/types.ts:251](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L251) | +| <a id="property-drop"></a> `drop?` | \| \{ `close_height_target`: `number` \| `null`; `window_id`: `string`; \} \| `null` | Drop-period stamp · present when the project covers this subtype with a drop schedule. The user-share of a stamped event MATURES until the window's boundary, then vests as one batch (the drop). Billing is untouched. Part of the SIGNED canonical bytes (encoder branches to v=4 when present). No clawback exists — vesting is unconditional, and an open window's boundary can only ever move earlier. | [me-client/src/types.ts:273](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L273) | +| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | - | [me-client/src/types.ts:254](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L254) | +| <a id="property-id"></a> `id` | `string` | - | [me-client/src/types.ts:249](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L249) | +| <a id="property-is_agent"></a> `is_agent?` | `boolean` | Per OCHK-V3-PLAN §7 phase-1 · true when the event was fired by an oc-agent delegation rather than a human session. The integrator's IntegratorEventConfig.agent block may price these differently or refuse them. Optional · canonical encoder branches to v=3 only when present, so legacy human-fired events keep their v=2 hash + signature. | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| <a id="property-occurred_at"></a> `occurred_at` | `string` | - | [me-client/src/types.ts:250](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L250) | +| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | - | [me-client/src/types.ts:255](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L255) | +| <a id="property-site"></a> `site` | \{ `display_name`: `string`; `domain`: `string`; \} | - | [me-client/src/types.ts:253](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L253) | +| `site.display_name` | `string` | - | [me-client/src/types.ts:253](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L253) | +| `site.domain` | `string` | - | [me-client/src/types.ts:253](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L253) | +| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | - | [me-client/src/types.ts:257](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L257) | +| <a id="property-subtype"></a> `subtype` | [`EventSubtype`](../type-aliases/EventSubtype.mdx) | - | [me-client/src/types.ts:252](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L252) | +| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | - | [me-client/src/types.ts:256](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L256) | +| <a id="property-verify_url"></a> `verify_url` | `string` | - | [me-client/src/types.ts:258](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L258) | diff --git a/src/pages/sdk/me-client/interfaces/ComputedFees.mdx b/src/pages/sdk/me-client/interfaces/ComputedFees.mdx index d23ad28..4d5f454 100644 --- a/src/pages/sdk/me-client/interfaces/ComputedFees.mdx +++ b/src/pages/sdk/me-client/interfaces/ComputedFees.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: ComputedFees -Defined in: [me-client/src/types.ts:102](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L102) +Defined in: [me-client/src/types.ts:130](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L130) A computed fee breakdown for a single event. site_rebate_sats is what flows back to the integrator's OC balance after OC's platform fee and @@ -21,7 +21,7 @@ A computed fee breakdown for a single event. site_rebate_sats is what | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | [me-client/src/types.ts:103](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L103) | -| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | [me-client/src/types.ts:104](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L104) | -| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | [me-client/src/types.ts:106](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L106) | -| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | [me-client/src/types.ts:105](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L105) | +| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | [me-client/src/types.ts:131](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L131) | +| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | [me-client/src/types.ts:132](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L132) | +| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | [me-client/src/types.ts:134](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L134) | +| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | [me-client/src/types.ts:133](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L133) | diff --git a/src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx b/src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx new file mode 100644 index 0000000..8c43612 --- /dev/null +++ b/src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx @@ -0,0 +1,48 @@ +export const metadata = { + title: "Interface: DropClosedWebhookPayload", + description: "Auto-generated API reference for Interface: DropClosedWebhookPayload. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / DropClosedWebhookPayload + +# Interface: DropClosedWebhookPayload + +Defined in: [me-client/src/types.ts:393](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L393) + +The `drop.closed` system event — one per closed drop window. The + manifest is the signed, content-addressed record (Merkle commitments + over member events + recipients); verify_url renders + live-verifies + it, and /api/envelope/<manifest_id> serves the raw canonical bytes. + +## Extends + +- [`SystemWebhookPayload`](SystemWebhookPayload.mdx) + +## Indexable + +```ts +[extra: string]: unknown +``` + +## Properties + +| Property | Type | Overrides | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | +| <a id="property-event_count"></a> `event_count` | `number` | - | - | [me-client/src/types.ts:402](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L402) | +| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | - | - | [me-client/src/types.ts:404](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L404) | +| <a id="property-kind"></a> `kind` | `"oc-system-event"` | - | [`SystemWebhookPayload`](SystemWebhookPayload.mdx).[`kind`](SystemWebhookPayload.mdx#property-kind) | [me-client/src/types.ts:383](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L383) | +| <a id="property-label"></a> `label` | `string` | - | - | [me-client/src/types.ts:397](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L397) | +| <a id="property-manifest_id"></a> `manifest_id` | `string` | - | - | [me-client/src/types.ts:398](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L398) | +| <a id="property-project_key"></a> `project_key` | `string` | - | [`SystemWebhookPayload`](SystemWebhookPayload.mdx).[`project_key`](SystemWebhookPayload.mdx#property-project_key) | [me-client/src/types.ts:385](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L385) | +| <a id="property-recipient_count"></a> `recipient_count` | `number` | - | - | [me-client/src/types.ts:403](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L403) | +| <a id="property-schedule_id"></a> `schedule_id` | `string` | - | - | [me-client/src/types.ts:396](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L396) | +| <a id="property-sealed_at"></a> `sealed_at` | `string` | - | - | [me-client/src/types.ts:400](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L400) | +| <a id="property-sealed_height"></a> `sealed_height` | `number` \| `null` | - | - | [me-client/src/types.ts:401](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L401) | +| <a id="property-subtype"></a> `subtype` | `"drop.closed"` | [`SystemWebhookPayload`](SystemWebhookPayload.mdx).[`subtype`](SystemWebhookPayload.mdx#property-subtype) | - | [me-client/src/types.ts:394](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L394) | +| <a id="property-user_share_sats"></a> `user_share_sats` | `number` | - | - | [me-client/src/types.ts:405](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L405) | +| <a id="property-verify_url"></a> `verify_url` | `string` | - | - | [me-client/src/types.ts:399](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L399) | +| <a id="property-window_id"></a> `window_id` | `string` | - | - | [me-client/src/types.ts:395](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L395) | diff --git a/src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx b/src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx new file mode 100644 index 0000000..0d66d0b --- /dev/null +++ b/src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx @@ -0,0 +1,30 @@ +export const metadata = { + title: "Interface: DropResponseBlock", + description: "Auto-generated API reference for Interface: DropResponseBlock. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / DropResponseBlock + +# Interface: DropResponseBlock + +Defined in: [me-client/src/types.ts:310](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L310) + +Drop-period context on event-ingest responses (single route: + top-level `drop`; batch route: per-result `drop`). `state` flips + from 'open' to 'closing' once the scheduled boundary passes and the + window awaits its sweep (~15 min) — render "processing", never a + negative countdown. + +## Properties + +| Property | Type | Defined in | +| ------ | ------ | ------ | +| <a id="property-close_height_target"></a> `close_height_target` | `number` \| `null` | [me-client/src/types.ts:315](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L315) | +| <a id="property-closes_at_target"></a> `closes_at_target` | `string` | [me-client/src/types.ts:314](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L314) | +| <a id="property-label"></a> `label` | `string` | [me-client/src/types.ts:312](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L312) | +| <a id="property-state"></a> `state` | `"open"` \| `"closing"` | [me-client/src/types.ts:313](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L313) | +| <a id="property-window_id"></a> `window_id` | `string` | [me-client/src/types.ts:311](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L311) | diff --git a/src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx b/src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx new file mode 100644 index 0000000..b2aef6b --- /dev/null +++ b/src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx @@ -0,0 +1,28 @@ +export const metadata = { + title: "Interface: DropScheduleSummary", + description: "Auto-generated API reference for Interface: DropScheduleSummary. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / DropScheduleSummary + +# Interface: DropScheduleSummary + +Defined in: [me-client/src/types.ts:298](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L298) + +Public shape of an enabled drop schedule, as returned in the + `drops` array of GET /api/integrator/config — part of the project's + public payout contract (earners can see when covered subtypes pay + out before earning under them). + +## Properties + +| Property | Type | Defined in | +| ------ | ------ | ------ | +| <a id="property-cadence"></a> `cadence` | [`DropCadence`](../type-aliases/DropCadence.mdx) | [me-client/src/types.ts:302](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L302) | +| <a id="property-label"></a> `label` | `string` | [me-client/src/types.ts:300](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L300) | +| <a id="property-schedule_id"></a> `schedule_id` | `string` | [me-client/src/types.ts:299](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L299) | +| <a id="property-subtypes"></a> `subtypes` | [`EventSubtype`](../type-aliases/EventSubtype.mdx)[] | [me-client/src/types.ts:301](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L301) | diff --git a/src/pages/sdk/me-client/interfaces/Federation.mdx b/src/pages/sdk/me-client/interfaces/Federation.mdx index 2f0c892..3f739b3 100644 --- a/src/pages/sdk/me-client/interfaces/Federation.mdx +++ b/src/pages/sdk/me-client/interfaces/Federation.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: Federation -Defined in: [me-client/src/types.ts:361](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L361) +Defined in: [me-client/src/types.ts:496](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L496) Federation directory entry. Mirrors `oc-me-web/src/lib/federations/registry.ts` field-for-field; this package is the public consumption shape. @@ -20,18 +20,18 @@ Federation directory entry. Mirrors `oc-me-web/src/lib/federations/registry.ts` | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <a id="property-apply_cta"></a> `apply_cta?` | `string` | - | [me-client/src/types.ts:381](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L381) | -| <a id="property-apply_href"></a> `apply_href?` | `string` | - | [me-client/src/types.ts:382](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L382) | -| <a id="property-ceremony_window"></a> `ceremony_window?` | `string` | - | [me-client/src/types.ts:379](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L379) | -| <a id="property-charter_hash"></a> `charter_hash` | `string` \| `null` | SHA-256 of the canonical federation charter, hex-encoded. | [me-client/src/types.ts:370](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L370) | -| <a id="property-charter_status"></a> `charter_status?` | `string` | - | [me-client/src/types.ts:378](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L378) | -| <a id="property-geography_hint"></a> `geography_hint` | `string` | - | [me-client/src/types.ts:373](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L373) | -| <a id="property-geography_requirements"></a> `geography_requirements?` | `string` | - | [me-client/src/types.ts:377](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L377) | -| <a id="property-invite"></a> `invite` | `string` \| `null` | Fedimint invite code; null until status === 'live'. | [me-client/src/types.ts:368](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L368) | -| <a id="property-last_attestation_at"></a> `last_attestation_at` | `string` \| `null` | ISO-8601 of the most recent ongoing-attestation envelope. | [me-client/src/types.ts:372](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L372) | -| <a id="property-name"></a> `name` | `string` | - | [me-client/src/types.ts:363](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L363) | -| <a id="property-slug"></a> `slug` | `string` | - | [me-client/src/types.ts:362](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L362) | -| <a id="property-status"></a> `status` | [`FederationStatus`](../type-aliases/FederationStatus.mdx) | - | [me-client/src/types.ts:364](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L364) | -| <a id="property-target_guardian_count"></a> `target_guardian_count` | `number` | - | [me-client/src/types.ts:366](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L366) | -| <a id="property-threshold"></a> `threshold` | `string` | - | [me-client/src/types.ts:365](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L365) | -| <a id="property-why_this_one"></a> `why_this_one?` | `string` | - | [me-client/src/types.ts:380](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L380) | +| <a id="property-apply_cta"></a> `apply_cta?` | `string` | - | [me-client/src/types.ts:516](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L516) | +| <a id="property-apply_href"></a> `apply_href?` | `string` | - | [me-client/src/types.ts:517](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L517) | +| <a id="property-ceremony_window"></a> `ceremony_window?` | `string` | - | [me-client/src/types.ts:514](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L514) | +| <a id="property-charter_hash"></a> `charter_hash` | `string` \| `null` | SHA-256 of the canonical federation charter, hex-encoded. | [me-client/src/types.ts:505](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L505) | +| <a id="property-charter_status"></a> `charter_status?` | `string` | - | [me-client/src/types.ts:513](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L513) | +| <a id="property-geography_hint"></a> `geography_hint` | `string` | - | [me-client/src/types.ts:508](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L508) | +| <a id="property-geography_requirements"></a> `geography_requirements?` | `string` | - | [me-client/src/types.ts:512](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L512) | +| <a id="property-invite"></a> `invite` | `string` \| `null` | Fedimint invite code; null until status === 'live'. | [me-client/src/types.ts:503](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L503) | +| <a id="property-last_attestation_at"></a> `last_attestation_at` | `string` \| `null` | ISO-8601 of the most recent ongoing-attestation envelope. | [me-client/src/types.ts:507](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L507) | +| <a id="property-name"></a> `name` | `string` | - | [me-client/src/types.ts:498](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L498) | +| <a id="property-slug"></a> `slug` | `string` | - | [me-client/src/types.ts:497](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L497) | +| <a id="property-status"></a> `status` | [`FederationStatus`](../type-aliases/FederationStatus.mdx) | - | [me-client/src/types.ts:499](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L499) | +| <a id="property-target_guardian_count"></a> `target_guardian_count` | `number` | - | [me-client/src/types.ts:501](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L501) | +| <a id="property-threshold"></a> `threshold` | `string` | - | [me-client/src/types.ts:500](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L500) | +| <a id="property-why_this_one"></a> `why_this_one?` | `string` | - | [me-client/src/types.ts:515](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L515) | diff --git a/src/pages/sdk/me-client/interfaces/IntegratorEventConfig.mdx b/src/pages/sdk/me-client/interfaces/IntegratorEventConfig.mdx index e959d67..b8a1951 100644 --- a/src/pages/sdk/me-client/interfaces/IntegratorEventConfig.mdx +++ b/src/pages/sdk/me-client/interfaces/IntegratorEventConfig.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: IntegratorEventConfig -Defined in: [me-client/src/types.ts:75](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L75) +Defined in: [me-client/src/types.ts:100](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L100) What an integrator declares for a single event subtype. @@ -19,6 +19,7 @@ What an integrator declares for a single event subtype. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <a id="property-enabled"></a> `enabled` | `boolean` | Whether this site bills this event subtype at all. | [me-client/src/types.ts:77](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L77) | -| <a id="property-site_pays"></a> `site_pays` | [`SiteFeeShape`](../type-aliases/SiteFeeShape.mdx) | The per-event fee the site pays. | [me-client/src/types.ts:79](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L79) | -| <a id="property-user_share_pct"></a> `user_share_pct` | `number` | Fraction of post-platform-fee that flows to the user (0–0.8 since platform_fee is 20%). The remainder is a rebate to the site's OC project balance. | [me-client/src/types.ts:83](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L83) | +| <a id="property-agent"></a> `agent?` | [`AgentClassOverride`](AgentClassOverride.mdx) | Optional per-agent-class pricing override applied when an event fires with is_agent=true. | [me-client/src/types.ts:111](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L111) | +| <a id="property-enabled"></a> `enabled` | `boolean` | Whether this site bills this event subtype at all. | [me-client/src/types.ts:102](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L102) | +| <a id="property-site_pays"></a> `site_pays` | [`SiteFeeShape`](../type-aliases/SiteFeeShape.mdx) | The per-event fee the site pays. | [me-client/src/types.ts:104](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L104) | +| <a id="property-user_share_pct"></a> `user_share_pct` | `number` | Fraction of GROSS that flows to the user (0–0.8 since the platform fee is 20%). The remainder is a rebate to the site's OC project balance. | [me-client/src/types.ts:108](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L108) | diff --git a/src/pages/sdk/me-client/interfaces/IntegratorPriceConfig.mdx b/src/pages/sdk/me-client/interfaces/IntegratorPriceConfig.mdx index 288072d..c454245 100644 --- a/src/pages/sdk/me-client/interfaces/IntegratorPriceConfig.mdx +++ b/src/pages/sdk/me-client/interfaces/IntegratorPriceConfig.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: IntegratorPriceConfig -Defined in: [me-client/src/types.ts:89](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L89) +Defined in: [me-client/src/types.ts:117](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L117) A complete integrator pricing config. Posted to me.ochk.io once at integration time, mutable via the configurator UI or this SDK any time @@ -21,8 +21,8 @@ A complete integrator pricing config. Posted to me.ochk.io once at | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <a id="property-display_name"></a> `display_name` | `string` | - | [me-client/src/types.ts:91](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L91) | -| <a id="property-domain"></a> `domain` | `string` | - | [me-client/src/types.ts:92](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L92) | -| <a id="property-events"></a> `events` | `Partial`\<`Record`\<[`EventSubtype`](../type-aliases/EventSubtype.mdx), [`IntegratorEventConfig`](IntegratorEventConfig.mdx)\>\> | Per-subtype configs. Subtypes not listed are disabled by default. | [me-client/src/types.ts:96](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L96) | -| <a id="property-project_key"></a> `project_key` | `string` | - | [me-client/src/types.ts:90](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L90) | -| <a id="property-updated_at"></a> `updated_at` | `string` | ISO-8601 timestamp the config was last updated. | [me-client/src/types.ts:94](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L94) | +| <a id="property-display_name"></a> `display_name` | `string` | - | [me-client/src/types.ts:119](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L119) | +| <a id="property-domain"></a> `domain` | `string` | - | [me-client/src/types.ts:120](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L120) | +| <a id="property-events"></a> `events` | `Partial`\<`Record`\<[`EventSubtype`](../type-aliases/EventSubtype.mdx), [`IntegratorEventConfig`](IntegratorEventConfig.mdx)\>\> | Per-subtype configs. Subtypes not listed are disabled by default. | [me-client/src/types.ts:124](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L124) | +| <a id="property-project_key"></a> `project_key` | `string` | - | [me-client/src/types.ts:118](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L118) | +| <a id="property-updated_at"></a> `updated_at` | `string` | ISO-8601 timestamp the config was last updated. | [me-client/src/types.ts:122](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L122) | diff --git a/src/pages/sdk/me-client/interfaces/PaymentAuthorizeOptions.mdx b/src/pages/sdk/me-client/interfaces/PaymentAuthorizeOptions.mdx index 71df18e..c55fd56 100644 --- a/src/pages/sdk/me-client/interfaces/PaymentAuthorizeOptions.mdx +++ b/src/pages/sdk/me-client/interfaces/PaymentAuthorizeOptions.mdx @@ -11,14 +11,14 @@ export const metadata = { # Interface: PaymentAuthorizeOptions -Defined in: [me-client/src/types.ts:321](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L321) +Defined in: [me-client/src/types.ts:456](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L456) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-amount_sats"></a> `amount_sats?` | `number` | [me-client/src/types.ts:323](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L323) | -| <a id="property-description"></a> `description` | `string` | [me-client/src/types.ts:325](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L325) | -| <a id="property-external_ref"></a> `external_ref?` | `string` | [me-client/src/types.ts:326](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L326) | -| <a id="property-identity"></a> `identity` | `string` | [me-client/src/types.ts:322](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L322) | -| <a id="property-usd_cents"></a> `usd_cents?` | `number` | [me-client/src/types.ts:324](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L324) | +| <a id="property-amount_sats"></a> `amount_sats?` | `number` | [me-client/src/types.ts:458](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L458) | +| <a id="property-description"></a> `description` | `string` | [me-client/src/types.ts:460](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L460) | +| <a id="property-external_ref"></a> `external_ref?` | `string` | [me-client/src/types.ts:461](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L461) | +| <a id="property-identity"></a> `identity` | `string` | [me-client/src/types.ts:457](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L457) | +| <a id="property-usd_cents"></a> `usd_cents?` | `number` | [me-client/src/types.ts:459](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L459) | diff --git a/src/pages/sdk/me-client/interfaces/PaymentResult.mdx b/src/pages/sdk/me-client/interfaces/PaymentResult.mdx index f29a47b..67bff62 100644 --- a/src/pages/sdk/me-client/interfaces/PaymentResult.mdx +++ b/src/pages/sdk/me-client/interfaces/PaymentResult.mdx @@ -11,14 +11,14 @@ export const metadata = { # Interface: PaymentResult -Defined in: [me-client/src/types.ts:329](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L329) +Defined in: [me-client/src/types.ts:464](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L464) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-id"></a> `id` | `string` | [me-client/src/types.ts:330](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L330) | -| <a id="property-sats_charged"></a> `sats_charged?` | `number` | [me-client/src/types.ts:332](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L332) | -| <a id="property-status"></a> `status` | `"authorized"` \| `"failed"` \| `"cancelled"` | [me-client/src/types.ts:331](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L331) | -| <a id="property-user_envelope_id"></a> `user_envelope_id?` | `string` | [me-client/src/types.ts:333](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L333) | -| <a id="property-verify_url"></a> `verify_url?` | `string` | [me-client/src/types.ts:334](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L334) | +| <a id="property-id"></a> `id` | `string` | [me-client/src/types.ts:465](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L465) | +| <a id="property-sats_charged"></a> `sats_charged?` | `number` | [me-client/src/types.ts:467](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L467) | +| <a id="property-status"></a> `status` | `"authorized"` \| `"failed"` \| `"cancelled"` | [me-client/src/types.ts:466](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L466) | +| <a id="property-user_envelope_id"></a> `user_envelope_id?` | `string` | [me-client/src/types.ts:468](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L468) | +| <a id="property-verify_url"></a> `verify_url?` | `string` | [me-client/src/types.ts:469](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L469) | diff --git a/src/pages/sdk/me-client/interfaces/Session.mdx b/src/pages/sdk/me-client/interfaces/Session.mdx index f458e05..25711e3 100644 --- a/src/pages/sdk/me-client/interfaces/Session.mdx +++ b/src/pages/sdk/me-client/interfaces/Session.mdx @@ -11,15 +11,15 @@ export const metadata = { # Interface: Session -Defined in: [me-client/src/types.ts:306](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L306) +Defined in: [me-client/src/types.ts:441](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L441) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-expires_at"></a> `expires_at` | `string` | [me-client/src/types.ts:310](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L310) | -| <a id="property-id"></a> `id` | `string` | [me-client/src/types.ts:307](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L307) | -| <a id="property-identity"></a> `identity` | `string` | [me-client/src/types.ts:308](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L308) | -| <a id="property-opens_at"></a> `opens_at` | `string` | [me-client/src/types.ts:309](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L309) | -| <a id="property-policy"></a> `policy` | [`SessionPolicy`](SessionPolicy.mdx) | [me-client/src/types.ts:311](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L311) | -| <a id="property-scope"></a> `scope` | `string`[] | [me-client/src/types.ts:312](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L312) | +| <a id="property-expires_at"></a> `expires_at` | `string` | [me-client/src/types.ts:445](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L445) | +| <a id="property-id"></a> `id` | `string` | [me-client/src/types.ts:442](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L442) | +| <a id="property-identity"></a> `identity` | `string` | [me-client/src/types.ts:443](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L443) | +| <a id="property-opens_at"></a> `opens_at` | `string` | [me-client/src/types.ts:444](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L444) | +| <a id="property-policy"></a> `policy` | [`SessionPolicy`](SessionPolicy.mdx) | [me-client/src/types.ts:446](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L446) | +| <a id="property-scope"></a> `scope` | `string`[] | [me-client/src/types.ts:447](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L447) | diff --git a/src/pages/sdk/me-client/interfaces/SessionPolicy.mdx b/src/pages/sdk/me-client/interfaces/SessionPolicy.mdx index c94b80c..cffd522 100644 --- a/src/pages/sdk/me-client/interfaces/SessionPolicy.mdx +++ b/src/pages/sdk/me-client/interfaces/SessionPolicy.mdx @@ -11,12 +11,12 @@ export const metadata = { # Interface: SessionPolicy -Defined in: [me-client/src/types.ts:300](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L300) +Defined in: [me-client/src/types.ts:435](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L435) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-duration_seconds"></a> `duration_seconds` | `number` | [me-client/src/types.ts:301](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L301) | -| <a id="property-refresh"></a> `refresh` | `"sliding"` \| `"rolling"` \| `"none"` | [me-client/src/types.ts:302](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L302) | -| <a id="property-sensitive_actions"></a> `sensitive_actions?` | `"none"` \| `"re-auth"` | [me-client/src/types.ts:303](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L303) | +| <a id="property-duration_seconds"></a> `duration_seconds` | `number` | [me-client/src/types.ts:436](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L436) | +| <a id="property-refresh"></a> `refresh` | `"sliding"` \| `"rolling"` \| `"none"` | [me-client/src/types.ts:437](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L437) | +| <a id="property-sensitive_actions"></a> `sensitive_actions?` | `"none"` \| `"re-auth"` | [me-client/src/types.ts:438](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L438) | diff --git a/src/pages/sdk/me-client/interfaces/SignInOptions.mdx b/src/pages/sdk/me-client/interfaces/SignInOptions.mdx index 481d7d2..afe0f22 100644 --- a/src/pages/sdk/me-client/interfaces/SignInOptions.mdx +++ b/src/pages/sdk/me-client/interfaces/SignInOptions.mdx @@ -11,12 +11,12 @@ export const metadata = { # Interface: SignInOptions -Defined in: [me-client/src/types.ts:315](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L315) +Defined in: [me-client/src/types.ts:450](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L450) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-returnto"></a> `returnTo?` | `string` | [me-client/src/types.ts:318](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L318) | -| <a id="property-scope"></a> `scope` | `string`[] | [me-client/src/types.ts:316](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L316) | -| <a id="property-sessionpolicy"></a> `sessionPolicy?` | `Partial`\<[`SessionPolicy`](SessionPolicy.mdx)\> | [me-client/src/types.ts:317](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L317) | +| <a id="property-returnto"></a> `returnTo?` | `string` | [me-client/src/types.ts:453](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L453) | +| <a id="property-scope"></a> `scope` | `string`[] | [me-client/src/types.ts:451](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L451) | +| <a id="property-sessionpolicy"></a> `sessionPolicy?` | `Partial`\<[`SessionPolicy`](SessionPolicy.mdx)\> | [me-client/src/types.ts:452](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L452) | diff --git a/src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx b/src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx new file mode 100644 index 0000000..3a03991 --- /dev/null +++ b/src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx @@ -0,0 +1,42 @@ +export const metadata = { + title: "Interface: SystemWebhookPayload", + description: "Auto-generated API reference for Interface: SystemWebhookPayload. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / SystemWebhookPayload + +# Interface: SystemWebhookPayload + +Defined in: [me-client/src/types.ts:382](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L382) + +Non-billable SYSTEM webhook deliveries — project-level operational +signals (escrow.low, escrow.depleted, escrow.recovered, drop.closed). +Same signing + headers as billable deliveries; receivers subscribe +via the same `subscribed` list ('*' or the explicit subtype string). +Carries no user identity. Discriminate on `kind` first, then +`subtype`: + + const payload = JSON.parse(body) as WebhookPayload | SystemWebhookPayload; + if (payload.kind === 'oc-system-event' && payload.subtype === 'drop.closed') { … } + +## Extended by + +- [`DropClosedWebhookPayload`](DropClosedWebhookPayload.mdx) + +## Indexable + +```ts +[extra: string]: unknown +``` + +## Properties + +| Property | Type | Defined in | +| ------ | ------ | ------ | +| <a id="property-kind"></a> `kind` | `"oc-system-event"` | [me-client/src/types.ts:383](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L383) | +| <a id="property-project_key"></a> `project_key` | `string` | [me-client/src/types.ts:385](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L385) | +| <a id="property-subtype"></a> `subtype` | `string` | [me-client/src/types.ts:384](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L384) | diff --git a/src/pages/sdk/me-client/interfaces/TelemetryEvent.mdx b/src/pages/sdk/me-client/interfaces/TelemetryEvent.mdx index ab5b99a..2975758 100644 --- a/src/pages/sdk/me-client/interfaces/TelemetryEvent.mdx +++ b/src/pages/sdk/me-client/interfaces/TelemetryEvent.mdx @@ -11,12 +11,12 @@ export const metadata = { # Interface: TelemetryEvent -Defined in: [me-client/src/types.ts:337](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L337) +Defined in: [me-client/src/types.ts:472](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L472) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-code"></a> `code` | \| `"session.intra_signin"` \| `"session.token_refresh"` \| `"session.navigation"` \| `"auth.signin_failed"` \| `"auth.signin_cancelled"` \| `"auth.signin_rejected"` \| `"verify.passive_check"` | [me-client/src/types.ts:338](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L338) | -| <a id="property-session_id"></a> `session_id?` | `string` | [me-client/src/types.ts:347](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L347) | -| <a id="property-timestamp"></a> `timestamp` | `string` | [me-client/src/types.ts:346](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L346) | +| <a id="property-code"></a> `code` | \| `"session.intra_signin"` \| `"session.token_refresh"` \| `"session.navigation"` \| `"auth.signin_failed"` \| `"auth.signin_cancelled"` \| `"auth.signin_rejected"` \| `"verify.passive_check"` | [me-client/src/types.ts:473](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L473) | +| <a id="property-session_id"></a> `session_id?` | `string` | [me-client/src/types.ts:482](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L482) | +| <a id="property-timestamp"></a> `timestamp` | `string` | [me-client/src/types.ts:481](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L481) | diff --git a/src/pages/sdk/me-client/interfaces/ValidationResult.mdx b/src/pages/sdk/me-client/interfaces/ValidationResult.mdx index 6869b89..b92c9c4 100644 --- a/src/pages/sdk/me-client/interfaces/ValidationResult.mdx +++ b/src/pages/sdk/me-client/interfaces/ValidationResult.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: ValidationResult -Defined in: [me-client/src/types.ts:147](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L147) +Defined in: [me-client/src/types.ts:195](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L195) Result of validating an IntegratorPriceConfig. @@ -19,5 +19,5 @@ Result of validating an IntegratorPriceConfig. | Property | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-errors"></a> `errors` | \{ `message`: `string`; `subtype?`: [`EventSubtype`](../type-aliases/EventSubtype.mdx); \}[] | [me-client/src/types.ts:149](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L149) | -| <a id="property-ok"></a> `ok` | `boolean` | [me-client/src/types.ts:148](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L148) | +| <a id="property-errors"></a> `errors` | \{ `message`: `string`; `subtype?`: [`EventSubtype`](../type-aliases/EventSubtype.mdx); \}[] | [me-client/src/types.ts:197](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L197) | +| <a id="property-ok"></a> `ok` | `boolean` | [me-client/src/types.ts:196](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L196) | diff --git a/src/pages/sdk/me-client/interfaces/WebhookHeaders.mdx b/src/pages/sdk/me-client/interfaces/WebhookHeaders.mdx index 2e1cc53..1313090 100644 --- a/src/pages/sdk/me-client/interfaces/WebhookHeaders.mdx +++ b/src/pages/sdk/me-client/interfaces/WebhookHeaders.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: WebhookHeaders -Defined in: [me-client/src/types.ts:277](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L277) +Defined in: [me-client/src/types.ts:412](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L412) HTTP headers OC sends with every webhook delivery. Capture these in the receive handler · `OC-Signature` is what verifies the body. @@ -20,9 +20,9 @@ the receive handler · `OC-Signature` is what verifies the body. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <a id="property-oc-class"></a> `OC-Class` | [`EventClass`](../type-aliases/EventClass.mdx) | Class · matches payload.class. | [me-client/src/types.ts:291](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L291) | -| <a id="property-oc-delivery-attempt"></a> `OC-Delivery-Attempt` | `string` | 1-indexed delivery attempt count. >1 means the prior attempt did not return a 2xx within the timeout · idempotency key on payload.id is critical. | [me-client/src/types.ts:295](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L295) | -| <a id="property-oc-envelope-id"></a> `OC-Envelope-Id` | `string` | Envelope id · matches payload.id; useful for idempotent receive handlers that dedupe on this header without parsing the body. | [me-client/src/types.ts:286](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L286) | -| <a id="property-oc-key-id"></a> `OC-Key-Id` | `string` | Stable kid of the signing key · resolves against ochk.io/.well-known/jwks.json. | [me-client/src/types.ts:282](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L282) | -| <a id="property-oc-signature"></a> `OC-Signature` | `string` | Ed25519 signature over the raw response body, hex-encoded. | [me-client/src/types.ts:279](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L279) | -| <a id="property-oc-subtype"></a> `OC-Subtype` | [`EventSubtype`](../type-aliases/EventSubtype.mdx) | Subtype · matches payload.subtype; lets routers branch on the header before parsing. | [me-client/src/types.ts:289](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L289) | +| <a id="property-oc-class"></a> `OC-Class` | [`EventClass`](../type-aliases/EventClass.mdx) | Class · matches payload.class. | [me-client/src/types.ts:426](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L426) | +| <a id="property-oc-delivery-attempt"></a> `OC-Delivery-Attempt` | `string` | 1-indexed delivery attempt count. >1 means the prior attempt did not return a 2xx within the timeout · idempotency key on payload.id is critical. | [me-client/src/types.ts:430](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L430) | +| <a id="property-oc-envelope-id"></a> `OC-Envelope-Id` | `string` | Envelope id · matches payload.id; useful for idempotent receive handlers that dedupe on this header without parsing the body. | [me-client/src/types.ts:421](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L421) | +| <a id="property-oc-key-id"></a> `OC-Key-Id` | `string` | Stable kid of the signing key · resolves against ochk.io/.well-known/jwks.json. | [me-client/src/types.ts:417](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L417) | +| <a id="property-oc-signature"></a> `OC-Signature` | `string` | Ed25519 signature over the raw response body, hex-encoded. | [me-client/src/types.ts:414](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L414) | +| <a id="property-oc-subtype"></a> `OC-Subtype` | [`EventSubtype`](../type-aliases/EventSubtype.mdx) | Subtype · matches payload.subtype; lets routers branch on the header before parsing. | [me-client/src/types.ts:424](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L424) | diff --git a/src/pages/sdk/me-client/interfaces/WebhookPayload.mdx b/src/pages/sdk/me-client/interfaces/WebhookPayload.mdx index 127bf50..7f7f741 100644 --- a/src/pages/sdk/me-client/interfaces/WebhookPayload.mdx +++ b/src/pages/sdk/me-client/interfaces/WebhookPayload.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: WebhookPayload -Defined in: [me-client/src/types.ts:244](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L244) +Defined in: [me-client/src/types.ts:342](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L342) The exact JSON body delivered to a registered webhook endpoint when a billable event fires. Imported by integrator backends so the @@ -42,19 +42,20 @@ Integrators see `sub` (per-integrator anonymous id) plus any | Property | Type | Description | Inherited from | Defined in | | ------ | ------ | ------ | ------ | ------ | -| <a id="property-class"></a> `class` | [`EventClass`](../type-aliases/EventClass.mdx) | - | [`BillableEvent`](BillableEvent.mdx).[`class`](BillableEvent.mdx#property-class) | [me-client/src/types.ts:203](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L203) | -| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`gross_fee_sats`](BillableEvent.mdx#property-gross_fee_sats) | [me-client/src/types.ts:206](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L206) | -| <a id="property-id"></a> `id` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`id`](BillableEvent.mdx#property-id) | [me-client/src/types.ts:201](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L201) | -| <a id="property-is_agent"></a> `is_agent?` | `boolean` | Per OCHK-V3-PLAN §7 phase-1 · true when the event was fired by an oc-agent delegation rather than a human session. The integrator's IntegratorEventConfig.agent block may price these differently or refuse them. Optional · canonical encoder branches to v=3 only when present, so legacy human-fired events keep their v=2 hash + signature. | [`BillableEvent`](BillableEvent.mdx).[`is_agent`](BillableEvent.mdx#property-is_agent) | [me-client/src/types.ts:217](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L217) | -| <a id="property-kind"></a> `kind` | `"oc-billable-event"` | Discriminator · identifies the payload kind for routing on the integrator's side. Always 'oc-billable-event' today; future webhook payload kinds (refunds, charters, etc) will use distinct discriminator values. | - | [me-client/src/types.ts:249](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L249) | -| <a id="property-occurred_at"></a> `occurred_at` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`occurred_at`](BillableEvent.mdx#property-occurred_at) | [me-client/src/types.ts:202](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L202) | -| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`platform_fee_sats`](BillableEvent.mdx#property-platform_fee_sats) | [me-client/src/types.ts:207](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L207) | -| <a id="property-scopes"></a> `scopes?` | `Partial`\<`Record`\< \| `"bitcoin_address"` \| `"email"` \| `"attest_tier"` \| `"display_name"` \| `"cross_integrator_event_count"` \| `"cross_integrator_human_event_count"` \| `"trust_attestation_count"` \| `"trust_attestations_bundle"`, `string`\>\> | Resolved scoped fields · only present for scopes the user has granted to this project. Wire format is string-keyed (every value is stringified · ints stringified, addresses as-is). | - | [me-client/src/types.ts:258](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L258) | -| <a id="property-site"></a> `site` | \{ `display_name`: `string`; `domain`: `string`; \} | - | [`BillableEvent`](BillableEvent.mdx).[`site`](BillableEvent.mdx#property-site) | [me-client/src/types.ts:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) | -| `site.display_name` | `string` | - | - | [me-client/src/types.ts:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) | -| `site.domain` | `string` | - | - | [me-client/src/types.ts:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) | -| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`site_rebate_sats`](BillableEvent.mdx#property-site_rebate_sats) | [me-client/src/types.ts:209](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L209) | -| <a id="property-sub"></a> `sub` | `string` | Per-integrator anonymous subject id · stable across events for the same (oc_identity, project_key) pair. Key your user records on this; OC will never give you the master address unless the user explicitly grants `bitcoin_address` or `email` scope. | - | [me-client/src/types.ts:254](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L254) | -| <a id="property-subtype"></a> `subtype` | [`EventSubtype`](../type-aliases/EventSubtype.mdx) | - | [`BillableEvent`](BillableEvent.mdx).[`subtype`](BillableEvent.mdx#property-subtype) | [me-client/src/types.ts:204](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L204) | -| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`user_earned_sats`](BillableEvent.mdx#property-user_earned_sats) | [me-client/src/types.ts:208](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L208) | -| <a id="property-verify_url"></a> `verify_url` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`verify_url`](BillableEvent.mdx#property-verify_url) | [me-client/src/types.ts:210](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L210) | +| <a id="property-class"></a> `class` | [`EventClass`](../type-aliases/EventClass.mdx) | - | [`BillableEvent`](BillableEvent.mdx).[`class`](BillableEvent.mdx#property-class) | [me-client/src/types.ts:251](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L251) | +| <a id="property-drop"></a> `drop?` | \| \{ `close_height_target`: `number` \| `null`; `window_id`: `string`; \} \| `null` | Drop-period stamp · present when the project covers this subtype with a drop schedule. The user-share of a stamped event MATURES until the window's boundary, then vests as one batch (the drop). Billing is untouched. Part of the SIGNED canonical bytes (encoder branches to v=4 when present). No clawback exists — vesting is unconditional, and an open window's boundary can only ever move earlier. | [`BillableEvent`](BillableEvent.mdx).[`drop`](BillableEvent.mdx#property-drop) | [me-client/src/types.ts:273](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L273) | +| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`gross_fee_sats`](BillableEvent.mdx#property-gross_fee_sats) | [me-client/src/types.ts:254](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L254) | +| <a id="property-id"></a> `id` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`id`](BillableEvent.mdx#property-id) | [me-client/src/types.ts:249](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L249) | +| <a id="property-is_agent"></a> `is_agent?` | `boolean` | Per OCHK-V3-PLAN §7 phase-1 · true when the event was fired by an oc-agent delegation rather than a human session. The integrator's IntegratorEventConfig.agent block may price these differently or refuse them. Optional · canonical encoder branches to v=3 only when present, so legacy human-fired events keep their v=2 hash + signature. | [`BillableEvent`](BillableEvent.mdx).[`is_agent`](BillableEvent.mdx#property-is_agent) | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| <a id="property-kind"></a> `kind` | `"oc-billable-event"` | Discriminator · identifies the payload kind for routing on the integrator's side. Always 'oc-billable-event' today; future webhook payload kinds (refunds, charters, etc) will use distinct discriminator values. | - | [me-client/src/types.ts:347](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L347) | +| <a id="property-occurred_at"></a> `occurred_at` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`occurred_at`](BillableEvent.mdx#property-occurred_at) | [me-client/src/types.ts:250](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L250) | +| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`platform_fee_sats`](BillableEvent.mdx#property-platform_fee_sats) | [me-client/src/types.ts:255](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L255) | +| <a id="property-scopes"></a> `scopes?` | `Partial`\<`Record`\< \| `"bitcoin_address"` \| `"email"` \| `"attest_tier"` \| `"display_name"` \| `"cross_integrator_event_count"` \| `"cross_integrator_human_event_count"` \| `"trust_attestation_count"` \| `"trust_attestations_bundle"`, `string`\>\> | Resolved scoped fields · only present for scopes the user has granted to this project. Wire format is string-keyed (every value is stringified · ints stringified, addresses as-is). | - | [me-client/src/types.ts:356](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L356) | +| <a id="property-site"></a> `site` | \{ `display_name`: `string`; `domain`: `string`; \} | - | [`BillableEvent`](BillableEvent.mdx).[`site`](BillableEvent.mdx#property-site) | [me-client/src/types.ts:253](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L253) | +| `site.display_name` | `string` | - | - | [me-client/src/types.ts:253](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L253) | +| `site.domain` | `string` | - | - | [me-client/src/types.ts:253](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L253) | +| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`site_rebate_sats`](BillableEvent.mdx#property-site_rebate_sats) | [me-client/src/types.ts:257](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L257) | +| <a id="property-sub"></a> `sub` | `string` | Per-integrator anonymous subject id · stable across events for the same (oc_identity, project_key) pair. Key your user records on this; OC will never give you the master address unless the user explicitly grants `bitcoin_address` or `email` scope. | - | [me-client/src/types.ts:352](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L352) | +| <a id="property-subtype"></a> `subtype` | [`EventSubtype`](../type-aliases/EventSubtype.mdx) | - | [`BillableEvent`](BillableEvent.mdx).[`subtype`](BillableEvent.mdx#property-subtype) | [me-client/src/types.ts:252](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L252) | +| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | - | [`BillableEvent`](BillableEvent.mdx).[`user_earned_sats`](BillableEvent.mdx#property-user_earned_sats) | [me-client/src/types.ts:256](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L256) | +| <a id="property-verify_url"></a> `verify_url` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`verify_url`](BillableEvent.mdx#property-verify_url) | [me-client/src/types.ts:258](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L258) | diff --git a/src/pages/sdk/me-client/type-aliases/AttestTier.mdx b/src/pages/sdk/me-client/type-aliases/AttestTier.mdx index a84e19d..bc8b0cf 100644 --- a/src/pages/sdk/me-client/type-aliases/AttestTier.mdx +++ b/src/pages/sdk/me-client/type-aliases/AttestTier.mdx @@ -15,7 +15,7 @@ export const metadata = { type AttestTier = "anonymous" | "bonded"; ``` -Defined in: [me-client/src/types.ts:66](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L66) +Defined in: [me-client/src/types.ts:76](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L76) AttestTier · what an integrator's gate can read about an oc identity. diff --git a/src/pages/sdk/me-client/type-aliases/ClassASubtype.mdx b/src/pages/sdk/me-client/type-aliases/ClassASubtype.mdx index 832c712..a936078 100644 --- a/src/pages/sdk/me-client/type-aliases/ClassASubtype.mdx +++ b/src/pages/sdk/me-client/type-aliases/ClassASubtype.mdx @@ -21,4 +21,4 @@ type ClassASubtype = | "recovery_method_updated"; ``` -Defined in: [me-client/src/types.ts:37](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L37) +Defined in: [me-client/src/types.ts:47](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L47) diff --git a/src/pages/sdk/me-client/type-aliases/ClassBSubtype.mdx b/src/pages/sdk/me-client/type-aliases/ClassBSubtype.mdx index ce98a21..3457fd8 100644 --- a/src/pages/sdk/me-client/type-aliases/ClassBSubtype.mdx +++ b/src/pages/sdk/me-client/type-aliases/ClassBSubtype.mdx @@ -20,4 +20,4 @@ type ClassBSubtype = | "pledge_resolution"; ``` -Defined in: [me-client/src/types.ts:45](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L45) +Defined in: [me-client/src/types.ts:55](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L55) diff --git a/src/pages/sdk/me-client/type-aliases/ClassCSubtype.mdx b/src/pages/sdk/me-client/type-aliases/ClassCSubtype.mdx index 654a19c..554e752 100644 --- a/src/pages/sdk/me-client/type-aliases/ClassCSubtype.mdx +++ b/src/pages/sdk/me-client/type-aliases/ClassCSubtype.mdx @@ -15,4 +15,4 @@ export const metadata = { type ClassCSubtype = "session_creation"; ``` -Defined in: [me-client/src/types.ts:52](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L52) +Defined in: [me-client/src/types.ts:62](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L62) diff --git a/src/pages/sdk/me-client/type-aliases/DropCadence.mdx b/src/pages/sdk/me-client/type-aliases/DropCadence.mdx new file mode 100644 index 0000000..844edd4 --- /dev/null +++ b/src/pages/sdk/me-client/type-aliases/DropCadence.mdx @@ -0,0 +1,36 @@ +export const metadata = { + title: "Type Alias: DropCadence", + description: "Auto-generated API reference for Type Alias: DropCadence. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / DropCadence + +# Type Alias: DropCadence + +```ts +type DropCadence = + | { + day: number; + hour: number; + kind: "weekly"; +} + | { + day: number; + hour: number; + kind: "monthly"; +} + | { + kind: "manual"; + max_open_days: number; +}; +``` + +Defined in: [me-client/src/types.ts:289](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L289) + +A drop schedule's cadence. Weekly/monthly close at a fixed UTC + boundary; manual closes when the integrator says (Drop now), with a + hard auto-close at max_open_days (≤ MAX_DROP_WINDOW_DAYS). diff --git a/src/pages/sdk/me-client/type-aliases/EventClass.mdx b/src/pages/sdk/me-client/type-aliases/EventClass.mdx index e034203..effc0a6 100644 --- a/src/pages/sdk/me-client/type-aliases/EventClass.mdx +++ b/src/pages/sdk/me-client/type-aliases/EventClass.mdx @@ -15,4 +15,4 @@ export const metadata = { type EventClass = "A" | "B" | "C"; ``` -Defined in: [me-client/src/types.ts:35](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L35) +Defined in: [me-client/src/types.ts:45](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L45) diff --git a/src/pages/sdk/me-client/type-aliases/EventSubtype.mdx b/src/pages/sdk/me-client/type-aliases/EventSubtype.mdx index 88d904c..cd4bd68 100644 --- a/src/pages/sdk/me-client/type-aliases/EventSubtype.mdx +++ b/src/pages/sdk/me-client/type-aliases/EventSubtype.mdx @@ -18,4 +18,4 @@ type EventSubtype = | ClassCSubtype; ``` -Defined in: [me-client/src/types.ts:54](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L54) +Defined in: [me-client/src/types.ts:64](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L64) diff --git a/src/pages/sdk/me-client/type-aliases/FederationStatus.mdx b/src/pages/sdk/me-client/type-aliases/FederationStatus.mdx index 8ba396c..35a43be 100644 --- a/src/pages/sdk/me-client/type-aliases/FederationStatus.mdx +++ b/src/pages/sdk/me-client/type-aliases/FederationStatus.mdx @@ -15,4 +15,4 @@ export const metadata = { type FederationStatus = "recruiting" | "forming" | "binding" | "live"; ``` -Defined in: [me-client/src/types.ts:357](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L357) +Defined in: [me-client/src/types.ts:492](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L492) diff --git a/src/pages/sdk/me-client/type-aliases/SigningMethod.mdx b/src/pages/sdk/me-client/type-aliases/SigningMethod.mdx index 2ddbe9a..13e0322 100644 --- a/src/pages/sdk/me-client/type-aliases/SigningMethod.mdx +++ b/src/pages/sdk/me-client/type-aliases/SigningMethod.mdx @@ -15,7 +15,7 @@ export const metadata = { type SigningMethod = "fedimint_threshold" | "fedimint_client" | "bip322"; ``` -Defined in: [me-client/src/types.ts:391](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L391) +Defined in: [me-client/src/types.ts:526](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L526) SigningMethod discriminator on the user identity. Federation-agnostic by construction — the OC identity (did:email or BIP-322 address) diff --git a/src/pages/sdk/me-client/type-aliases/SiteFeeShape.mdx b/src/pages/sdk/me-client/type-aliases/SiteFeeShape.mdx index 686daaf..c8c1cbf 100644 --- a/src/pages/sdk/me-client/type-aliases/SiteFeeShape.mdx +++ b/src/pages/sdk/me-client/type-aliases/SiteFeeShape.mdx @@ -23,7 +23,7 @@ type SiteFeeShape = }; ``` -Defined in: [me-client/src/types.ts:70](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L70) +Defined in: [me-client/src/types.ts:80](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L80) The shape of a per-event fee — either a fixed sats amount or a percent of the underlying transaction amount (used for payments + pledges). diff --git a/src/pages/sdk/me-client/variables/ALL_EVENT_SUBTYPES.mdx b/src/pages/sdk/me-client/variables/ALL_EVENT_SUBTYPES.mdx index 2b26745..d8add43 100644 --- a/src/pages/sdk/me-client/variables/ALL_EVENT_SUBTYPES.mdx +++ b/src/pages/sdk/me-client/variables/ALL_EVENT_SUBTYPES.mdx @@ -15,6 +15,6 @@ export const metadata = { const ALL_EVENT_SUBTYPES: readonly EventSubtypeMetadata[]; ``` -Defined in: [me-client/src/subtypes.ts:184](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/subtypes.ts#L184) +Defined in: [me-client/src/subtypes.ts:185](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/subtypes.ts#L185) All subtypes as a flat list, ordered class A → B → C. diff --git a/src/pages/sdk/me-client/variables/MAX_DROP_WINDOW_DAYS.mdx b/src/pages/sdk/me-client/variables/MAX_DROP_WINDOW_DAYS.mdx new file mode 100644 index 0000000..1fc24f6 --- /dev/null +++ b/src/pages/sdk/me-client/variables/MAX_DROP_WINDOW_DAYS.mdx @@ -0,0 +1,22 @@ +export const metadata = { + title: "Variable: MAXDROPWINDOWDAYS", + description: "Auto-generated API reference for Variable: MAXDROPWINDOWDAYS. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / MAX\_DROP\_WINDOW\_DAYS + +# Variable: MAX\_DROP\_WINDOW\_DAYS + +```ts +const MAX_DROP_WINDOW_DAYS: 92 = 92; +``` + +Defined in: [me-client/src/types.ts:41](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L41) + +Platform ceiling on drop-period windows: no integrator schedule may + hold a user's earned share open longer than this, regardless of + cadence. Published in ABUSE_LIMITS on me.ochk.io /trust + /security. diff --git a/src/pages/sdk/me-client/variables/MIN_INTEGRATOR_PRICE_SATS.mdx b/src/pages/sdk/me-client/variables/MIN_INTEGRATOR_PRICE_SATS.mdx index 663093c..20389a0 100644 --- a/src/pages/sdk/me-client/variables/MIN_INTEGRATOR_PRICE_SATS.mdx +++ b/src/pages/sdk/me-client/variables/MIN_INTEGRATOR_PRICE_SATS.mdx @@ -12,10 +12,15 @@ export const metadata = { # Variable: MIN\_INTEGRATOR\_PRICE\_SATS ```ts -const MIN_INTEGRATOR_PRICE_SATS: 5 = 5; +const MIN_INTEGRATOR_PRICE_SATS: 1 = 1; ``` -Defined in: [me-client/src/types.ts:31](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L31) +Defined in: [me-client/src/types.ts:36](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L36) -Anti-spam price floor. No integrator can configure a per-event price - below this. +Per-event price floor. 1 sat — the natural atomic Bitcoin unit. + Integrators choose their own per-event prices above this; OC does + not impose sybil-resistance opinions on integrators (that's their + call, from their own threat model). The 1-sat floor is purely + mechanical — fees can't be fractional sats. Mirrors the canonical + value at oc-me-web/src/lib/events/types.ts (a previous SDK release + drifted to 5 while the platform ratified 1). diff --git a/src/pages/sdk/me-client/variables/oc.mdx b/src/pages/sdk/me-client/variables/oc.mdx index 69dbbb9..995bd5f 100644 --- a/src/pages/sdk/me-client/variables/oc.mdx +++ b/src/pages/sdk/me-client/variables/oc.mdx @@ -59,7 +59,7 @@ const oc: { }; ``` -Defined in: [me-client/src/index.ts:149](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L149) +Defined in: [me-client/src/index.ts:156](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L156) Convenience namespace mirroring the public API surface in /integrate code samples — `oc.session.create()`, `oc.payment.authorize()`, @@ -71,35 +71,35 @@ Convenience namespace mirroring the public API surface in /integrate | Name | Type | Default value | Description | Defined in | | ------ | ------ | ------ | ------ | ------ | -| <a id="property-config"></a> `config` | \{ `archetypes`: readonly [`ArchetypeTemplate`](../interfaces/ArchetypeTemplate.mdx)[]; `fromTemplate`: (`useCase`: [`IntegratorArchetype`](../type-aliases/IntegratorArchetype.mdx), `identity`: `ProjectIdentity`) => [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx); `getArchetype`: (`id`: [`IntegratorArchetype`](../type-aliases/IntegratorArchetype.mdx)) => [`ArchetypeTemplate`](../interfaces/ArchetypeTemplate.mdx); `validate`: (`cfg`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx)) => [`ValidationResult`](../interfaces/ValidationResult.mdx); \} | - | - | [me-client/src/index.ts:153](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L153) | +| <a id="property-config"></a> `config` | \{ `archetypes`: readonly [`ArchetypeTemplate`](../interfaces/ArchetypeTemplate.mdx)[]; `fromTemplate`: (`useCase`: [`IntegratorArchetype`](../type-aliases/IntegratorArchetype.mdx), `identity`: `ProjectIdentity`) => [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx); `getArchetype`: (`id`: [`IntegratorArchetype`](../type-aliases/IntegratorArchetype.mdx)) => [`ArchetypeTemplate`](../interfaces/ArchetypeTemplate.mdx); `validate`: (`cfg`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx)) => [`ValidationResult`](../interfaces/ValidationResult.mdx); \} | - | - | [me-client/src/index.ts:160](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L160) | | `config.archetypes` | readonly [`ArchetypeTemplate`](../interfaces/ArchetypeTemplate.mdx)[] | `ARCHETYPE_TEMPLATES` | All available archetypes · render in a picker. | [me-client/src/config.ts:56](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/config.ts#L56) | | `config.fromTemplate()` | (`useCase`: [`IntegratorArchetype`](../type-aliases/IntegratorArchetype.mdx), `identity`: `ProjectIdentity`) => [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx) | - | Build a complete IntegratorPriceConfig from an archetype id + the project's identity fields. Every subtype gets an entry — the archetype's listed subtypes get the template's pricing; everything else gets `enabled: false` with conservative defaults so the config is type-complete and the integrator can flip-on later subtypes without re-deriving prices. Throws synchronously if `useCase` isn't a known archetype id. | [me-client/src/config.ts:51](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/config.ts#L51) | | `config.getArchetype()` | (`id`: [`IntegratorArchetype`](../type-aliases/IntegratorArchetype.mdx)) => [`ArchetypeTemplate`](../interfaces/ArchetypeTemplate.mdx) | `getArchetypeTemplate` | Look up a template's metadata · for rendering "you picked X" state and offering one-click swaps in your own UI. Look up a template's metadata · used by config-editor UIs to render "you're on the X template · here's what it enables" copy. | [me-client/src/config.ts:54](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/config.ts#L54) | | `config.validate()` | (`cfg`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx)) => [`ValidationResult`](../interfaces/ValidationResult.mdx) | - | - | [me-client/src/config.ts:50](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/config.ts#L50) | -| <a id="property-event"></a> `event` | \{ `fire`: (`options`: [`FireEventOptions`](../interfaces/FireEventOptions.mdx)) => `Promise`\<[`BillableEvent`](../interfaces/BillableEvent.mdx)\>; `fireBatch`: (`options`: `FireBatchOptions`) => `Promise`\<`FireBatchResponse`\>; `verify`: (`envelope`: [`BillableEvent`](../interfaces/BillableEvent.mdx), `config`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx), `payment_amount_sats?`: `number`) => [`VerifyEventResult`](../interfaces/VerifyEventResult.mdx); \} | - | - | [me-client/src/index.ts:152](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L152) | +| <a id="property-event"></a> `event` | \{ `fire`: (`options`: [`FireEventOptions`](../interfaces/FireEventOptions.mdx)) => `Promise`\<[`BillableEvent`](../interfaces/BillableEvent.mdx)\>; `fireBatch`: (`options`: `FireBatchOptions`) => `Promise`\<`FireBatchResponse`\>; `verify`: (`envelope`: [`BillableEvent`](../interfaces/BillableEvent.mdx), `config`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx), `payment_amount_sats?`: `number`) => [`VerifyEventResult`](../interfaces/VerifyEventResult.mdx); \} | - | - | [me-client/src/index.ts:159](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L159) | | `event.fire()` | (`options`: [`FireEventOptions`](../interfaces/FireEventOptions.mdx)) => `Promise`\<[`BillableEvent`](../interfaces/BillableEvent.mdx)\> | - | - | [me-client/src/event.ts:343](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L343) | | `event.fireBatch()` | (`options`: `FireBatchOptions`) => `Promise`\<`FireBatchResponse`\> | - | `oc.event.fireBatch` — bulk-ingest up to 100 billable envelopes under one project_key in a single HTTP round-trip. Wins amortize across the batch: one auth roundtrip, one project lookup, one scope-grants resolve, parallel KV writes via Promise.all. For a 50-event batch the server-side processing time drops from ~3-4.5 seconds (50 sequential per-event POSTs) to ~100-200ms. import { oc } from '@orangecheck/me-client'; const res = await oc.event.fireBatch({ project_key: 'pk_live_yourcompany', events: [ { subtype: 'session_creation' }, { subtype: 'page_view', action_label: 'home' }, { subtype: 'page_view', action_label: 'pricing' }, ], }); for (const r of res.results) { if (r.status === 'recorded') console.log('+', r.event.id, r.event.gross_fee_sats); else if (r.status === 'duplicate') console.log('~ idempotent replay', r.event.id); else console.log('!', r.reason); } Failure modes: - 400 if events.length === 0 or > 100, or events[].subtype missing - 403 if the project is frozen or the domain is unverified - 429 if the project's rate limit (1000 events/sec sustained) is exceeded; Retry-After header indicates backoff. Per OCHK-V3-PLAN §12.2. | [me-client/src/event.ts:343](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L343) | | `event.verify()` | (`envelope`: [`BillableEvent`](../interfaces/BillableEvent.mdx), `config`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx), `payment_amount_sats?`: `number`) => [`VerifyEventResult`](../interfaces/VerifyEventResult.mdx) | - | Replay-verify a billable envelope against the integrator's current price config. Re-runs computeFees() with the same inputs and compares against the four-way split recorded on the envelope. Anyone — the integrator, a user, OC, an auditor — can run this function and reach the same answer. The integrator-side replay is what keeps OC honest: a divergence means OC's billing engine computed differently than the published price config says it should have, and the integrator can flag it on /audit. For percent_of_amount-priced subtypes, the underlying payment amount must be passed explicitly (it isn't stored on the envelope top-level — only inside the context payload — so callers should pass `envelope.context.payment_amount_sats`). import { oc } from '@orangecheck/me-client'; const env = await fetch(`https://me.ochk.io/api/envelope/${id}`).then(r => r.json()); const cfg = await oc.config.fetch({ project_key: env.site.domain }); const result = oc.event.verify(env, cfg); if (!result.ok) reportDivergence(result.issues); | [me-client/src/event.ts:343](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L343) | -| <a id="property-family"></a> `family` | \{ `scopes`: (`verb`: [`FamilyVerb`](../type-aliases/FamilyVerb.mdx), `options?`: [`FamilyScopesOptions`](../interfaces/FamilyScopesOptions.mdx)) => `Promise`\<[`FamilyScopesResult`](../interfaces/FamilyScopesResult.mdx)\>; \} | - | - | [me-client/src/index.ts:157](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L157) | +| <a id="property-family"></a> `family` | \{ `scopes`: (`verb`: [`FamilyVerb`](../type-aliases/FamilyVerb.mdx), `options?`: [`FamilyScopesOptions`](../interfaces/FamilyScopesOptions.mdx)) => `Promise`\<[`FamilyScopesResult`](../interfaces/FamilyScopesResult.mdx)\>; \} | - | - | [me-client/src/index.ts:164](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L164) | | `family.scopes()` | (`verb`: [`FamilyVerb`](../type-aliases/FamilyVerb.mdx), `options?`: [`FamilyScopesOptions`](../interfaces/FamilyScopesOptions.mdx)) => `Promise`\<[`FamilyScopesResult`](../interfaces/FamilyScopesResult.mdx)\> | - | Read the cross-family scope grants the user has issued to the named sibling product. Browser-side · uses cookie credentials. Errors thrown: - `unknown_family_verb` if `verb` is not in the family allowlist - `sign in required` (401) if no oc_session cookie present - `unknown_family_verb` (404) if me.ochk doesn't recognize the verb If you need to drive a consent prompt for a verb the user hasn't granted yet, use `oc.scope.request(scopes, { project_key: 'family:', return_to })` — the consent prompt page detects the `family:` prefix and renders the sibling-product chrome. | [me-client/src/family.ts:110](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/family.ts#L110) | -| <a id="property-federations"></a> `federations` | \{ `defaultLive`: () => `Promise`\<[`Federation`](../interfaces/Federation.mdx) \| `null`\>; `get`: (`slug`: `string`) => `Promise`\<[`Federation`](../interfaces/Federation.mdx) \| `null`\>; `list`: () => `Promise`\<[`Federation`](../interfaces/Federation.mdx)[]\>; `live`: () => `Promise`\<[`Federation`](../interfaces/Federation.mdx)[]\>; \} | - | - | [me-client/src/index.ts:155](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L155) | +| <a id="property-federations"></a> `federations` | \{ `defaultLive`: () => `Promise`\<[`Federation`](../interfaces/Federation.mdx) \| `null`\>; `get`: (`slug`: `string`) => `Promise`\<[`Federation`](../interfaces/Federation.mdx) \| `null`\>; `list`: () => `Promise`\<[`Federation`](../interfaces/Federation.mdx)[]\>; `live`: () => `Promise`\<[`Federation`](../interfaces/Federation.mdx)[]\>; \} | - | - | [me-client/src/index.ts:162](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L162) | | `federations.defaultLive()` | () => `Promise`\<[`Federation`](../interfaces/Federation.mdx) \| `null`\> | - | Default federation a fresh user/integrator should bind to when no explicit policy exists yet. v1: the first live federation in the directory; falls back to null if none live yet. v2+: routing policy (geography, capacity, explicit choice) consults the directory directly. | [me-client/src/federations.ts:51](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/federations.ts#L51) | | `federations.get()` | (`slug`: `string`) => `Promise`\<[`Federation`](../interfaces/Federation.mdx) \| `null`\> | - | Look up a single federation by slug. Returns null if the slug isn't in the directory. | [me-client/src/federations.ts:51](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/federations.ts#L51) | | `federations.list()` | () => `Promise`\<[`Federation`](../interfaces/Federation.mdx)[]\> | - | List every federation in the directory — recruiting, forming, binding, and live. Consumers filter by status as needed. | [me-client/src/federations.ts:51](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/federations.ts#L51) | | `federations.live()` | () => `Promise`\<[`Federation`](../interfaces/Federation.mdx)[]\> | - | Return only federations currently accepting bindings — i.e. status === 'live' with a non-null invite. The set the consumer wallet provider can route a user wallet to. | [me-client/src/federations.ts:51](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/federations.ts#L51) | -| <a id="property-identity"></a> `identity` | \{ `refreshEnvelopeJwks`: (`issuer`: `string`) => `Promise`\<`void`\>; `verifyActivityAttestation`: (`bundle`: [`ActivityAttestationBundle`](../interfaces/ActivityAttestationBundle.mdx), `options`: [`VerifyActivityOptions`](../interfaces/VerifyActivityOptions.mdx)) => `Promise`\<[`ActivityVerifyResult`](../interfaces/ActivityVerifyResult.mdx)\>; \} | - | - | [me-client/src/index.ts:158](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L158) | +| <a id="property-identity"></a> `identity` | \{ `refreshEnvelopeJwks`: (`issuer`: `string`) => `Promise`\<`void`\>; `verifyActivityAttestation`: (`bundle`: [`ActivityAttestationBundle`](../interfaces/ActivityAttestationBundle.mdx), `options`: [`VerifyActivityOptions`](../interfaces/VerifyActivityOptions.mdx)) => `Promise`\<[`ActivityVerifyResult`](../interfaces/ActivityVerifyResult.mdx)\>; \} | - | - | [me-client/src/index.ts:165](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L165) | | `identity.refreshEnvelopeJwks()` | (`issuer`: `string`) => `Promise`\<`void`\> | - | Force-refresh the envelope-JWKS cache · useful after a key rotation if you don't want to wait for the TTL to expire. | [me-client/src/identity.ts:361](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/identity.ts#L361) | | `identity.verifyActivityAttestation()` | (`bundle`: [`ActivityAttestationBundle`](../interfaces/ActivityAttestationBundle.mdx), `options`: [`VerifyActivityOptions`](../interfaces/VerifyActivityOptions.mdx)) => `Promise`\<[`ActivityVerifyResult`](../interfaces/ActivityVerifyResult.mdx)\> | - | Verify a signed activity attestation bundle. Returns a typed ActivityVerifyResult with per-check detail · never throws (network + parse failures surface as ok=false rows in the checks array, so the caller can log them without try/catch). Five checks, in order: bundle shape, canonical-bytes hash matches id, JWK with matching kid present, ed25519 signature, freshness. | [me-client/src/identity.ts:360](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/identity.ts#L360) | -| <a id="property-payment"></a> `payment` | \{ `authorize`: (`opts`: [`PaymentAuthorizeOptions`](../interfaces/PaymentAuthorizeOptions.mdx)) => `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.mdx)\>; \} | - | - | [me-client/src/index.ts:151](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L151) | +| <a id="property-payment"></a> `payment` | \{ `authorize`: (`opts`: [`PaymentAuthorizeOptions`](../interfaces/PaymentAuthorizeOptions.mdx)) => `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.mdx)\>; \} | - | - | [me-client/src/index.ts:158](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L158) | | `payment.authorize()` | (`opts`: [`PaymentAuthorizeOptions`](../interfaces/PaymentAuthorizeOptions.mdx)) => `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.mdx)\> | - | Authorize a payment through the user's OC identity. Class B billable event for the integrating site (sub-Stripe rate, percentage-based); cashback flows to the user as Lightning credit on /me/earn. The user is prompted by me.ochk.io to consent to the specific payment before this resolves. If the user declines or cancels, the result has status `'cancelled'`, a non-billable telemetry record is emitted, and NO billable event is created. | [me-client/src/payment.ts:25](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/payment.ts#L25) | -| <a id="property-scope"></a> `scope` | \{ `granted`: (`options`: [`GrantedOptions`](../interfaces/GrantedOptions.mdx)) => `Promise`\<[`GrantedResult`](../interfaces/GrantedResult.mdx)\>; `parseTrustAttestationCount`: (`value`: `string`) => \| [`TrustAttestationCount`](../interfaces/TrustAttestationCount.mdx) \| `null`; `request`: (`scopes`: [`Scope`](../type-aliases/Scope.mdx)[], `options`: [`RequestOptions`](../interfaces/RequestOptions.mdx)) => `never`; \} | - | - | [me-client/src/index.ts:156](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L156) | +| <a id="property-scope"></a> `scope` | \{ `granted`: (`options`: [`GrantedOptions`](../interfaces/GrantedOptions.mdx)) => `Promise`\<[`GrantedResult`](../interfaces/GrantedResult.mdx)\>; `parseTrustAttestationCount`: (`value`: `string`) => \| [`TrustAttestationCount`](../interfaces/TrustAttestationCount.mdx) \| `null`; `request`: (`scopes`: [`Scope`](../type-aliases/Scope.mdx)[], `options`: [`RequestOptions`](../interfaces/RequestOptions.mdx)) => `never`; \} | - | - | [me-client/src/index.ts:163](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L163) | | `scope.granted()` | (`options`: [`GrantedOptions`](../interfaces/GrantedOptions.mdx)) => `Promise`\<[`GrantedResult`](../interfaces/GrantedResult.mdx)\> | - | - | [me-client/src/scope.ts:193](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/scope.ts#L193) | | `scope.parseTrustAttestationCount()` | (`value`: `string`) => \| [`TrustAttestationCount`](../interfaces/TrustAttestationCount.mdx) \| `null` | - | Decode the `trust_attestation_count` scope's wire-format string into a typed quad. Returns null if the input is malformed (defensive · the resolver always emits well-formed strings, but third-party consumers may hand us anything). | [me-client/src/scope.ts:193](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/scope.ts#L193) | | `scope.request()` | (`scopes`: [`Scope`](../type-aliases/Scope.mdx)[], `options`: [`RequestOptions`](../interfaces/RequestOptions.mdx)) => `never` | - | Redirect the user to me.ochk.io's consent prompt. After they decide, browser returns to `return_to`. The scope grants are persisted server-side; subsequent calls to oc.scope.granted() reflect their decisions. This function does NOT return a promise that resolves to the user's decisions. The redirect leaves your page; the user lands back at return_to and your code re-reads granted state on mount. Consent flow: 1. Your code: oc.scope.request(['email'], { ... }) 2. Browser navigates to me.ochk.io/me/scope-grant?… 3. User decides per-scope (grant once / always / deny) 4. Browser redirects back to return_to 5. Your code re-runs oc.scope.granted(...) on mount Throws synchronously if the inputs are invalid (so the redirect is never issued with malformed params). | [me-client/src/scope.ts:193](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/scope.ts#L193) | -| <a id="property-session"></a> `session` | \{ `create`: (`opts`: [`SignInOptions`](../interfaces/SignInOptions.mdx)) => `Promise`\<[`Session`](../interfaces/Session.mdx)\>; `invalidate`: (`sessionId`: `string`) => `Promise`\<`void`\>; `refresh`: (`sessionId`: `string`) => `Promise`\<[`Session`](../interfaces/Session.mdx)\>; \} | - | - | [me-client/src/index.ts:150](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L150) | +| <a id="property-session"></a> `session` | \{ `create`: (`opts`: [`SignInOptions`](../interfaces/SignInOptions.mdx)) => `Promise`\<[`Session`](../interfaces/Session.mdx)\>; `invalidate`: (`sessionId`: `string`) => `Promise`\<`void`\>; `refresh`: (`sessionId`: `string`) => `Promise`\<[`Session`](../interfaces/Session.mdx)\>; \} | - | - | [me-client/src/index.ts:157](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L157) | | `session.create()` | (`opts`: [`SignInOptions`](../interfaces/SignInOptions.mdx)) => `Promise`\<[`Session`](../interfaces/Session.mdx)\> | - | Open a sign-in flow at me.ochk.io. Returns the resulting Session once the user consents (Class C billable event for the integrating site, cashback for the user). Internally this opens the OC consent UI in a popup; v1 implementations may also redirect. | [me-client/src/session.ts:77](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/session.ts#L77) | | `session.invalidate()` | (`sessionId`: `string`) => `Promise`\<`void`\> | - | Invalidate a session. Free, telemetry-only. | [me-client/src/session.ts:77](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/session.ts#L77) | | `session.refresh()` | (`sessionId`: `string`) => `Promise`\<[`Session`](../interfaces/Session.mdx)\> | - | Refresh a still-valid session inside its policy window. Free for the integrating site (does NOT instantiate a billable event); emits a `session.token_refresh` telemetry record. | [me-client/src/session.ts:77](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/session.ts#L77) | -| <a id="property-webhook"></a> `webhook` | \{ `fetchJwks`: (`issuer`: `string`) => `Promise`\<`void`\>; `verify`: (`rawBody`: `string` \| `Uint8Array`\<`ArrayBufferLike`\>, `sigHex`: `string`, `kid`: `string`, `options`: [`VerifyOptions`](../interfaces/VerifyOptions.mdx)) => `Promise`\<[`VerifyResult`](../interfaces/VerifyResult.mdx)\>; \} | - | - | [me-client/src/index.ts:154](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L154) | +| <a id="property-webhook"></a> `webhook` | \{ `fetchJwks`: (`issuer`: `string`) => `Promise`\<`void`\>; `verify`: (`rawBody`: `string` \| `Uint8Array`\<`ArrayBufferLike`\>, `sigHex`: `string`, `kid`: `string`, `options`: [`VerifyOptions`](../interfaces/VerifyOptions.mdx)) => `Promise`\<[`VerifyResult`](../interfaces/VerifyResult.mdx)\>; \} | - | - | [me-client/src/index.ts:161](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L161) | | `webhook.fetchJwks()` | (`issuer`: `string`) => `Promise`\<`void`\> | `fetchJwksForce` | Force-refresh the JWKS cache. Useful after a key rotation event if you don't want to wait for the TTL to expire. | [me-client/src/webhook.ts:221](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/webhook.ts#L221) | | `webhook.verify()` | (`rawBody`: `string` \| `Uint8Array`\<`ArrayBufferLike`\>, `sigHex`: `string`, `kid`: `string`, `options`: [`VerifyOptions`](../interfaces/VerifyOptions.mdx)) => `Promise`\<[`VerifyResult`](../interfaces/VerifyResult.mdx)\> | - | Verify a webhook signature. Pass the raw body bytes (not parsed JSON), the hex-encoded signature from the `OC-Signature` header, and the kid from the `OC-Key-Id` header. Returns `{ ok: true }` on success, `{ ok: false, reason }` on any failure (bad signature, kid not in JWKS, malformed signature, network-only JWKS fetch failed without prior cache, etc.). Never throws. | [me-client/src/webhook.ts:221](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/webhook.ts#L221) |