From bc5c5ccf452875ce184a1448c01598cae7dd6e66 Mon Sep 17 00:00:00 2001 From: ochk-docs-bot Date: Sun, 5 Jul 2026 00:00:13 +0000 Subject: [PATCH] docs(sdk): sync me-client@0.23.0 Auto-generated by oc-packages release workflow on tag me-client-v0.23.0. Source: https://github.com/orangecheck/oc-packages/tree/me-client-v0.23.0/me-client/src Co-Authored-By: ochk-docs-bot --- src/pages/sdk/me-client/README.mdx | 1 + .../sdk/me-client/functions/computeFees.mdx | 2 +- .../functions/validateIntegratorConfig.mdx | 2 +- .../interfaces/AgentClassOverride.mdx | 8 ++--- .../me-client/interfaces/BillableEvent.mdx | 30 ++++++++-------- .../sdk/me-client/interfaces/ComputedFees.mdx | 10 +++--- .../interfaces/DropClosedWebhookPayload.mdx | 30 ++++++++-------- .../interfaces/DropResponseBlock.mdx | 12 +++---- .../interfaces/DropScheduleSummary.mdx | 10 +++--- .../sdk/me-client/interfaces/Federation.mdx | 32 ++++++++--------- .../me-client/interfaces/FireEventOptions.mdx | 12 +++---- .../interfaces/IntegratorEventConfig.mdx | 10 +++--- .../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 | 8 ++--- .../me-client/interfaces/TelemetryEvent.mdx | 8 ++--- .../me-client/interfaces/ValidationResult.mdx | 6 ++-- .../interfaces/VerifyEventResult.mdx | 8 ++--- .../me-client/interfaces/WebhookHeaders.mdx | 14 ++++---- .../me-client/interfaces/WebhookPayload.mdx | 36 +++++++++---------- .../sdk/me-client/type-aliases/AttestTier.mdx | 2 +- .../me-client/type-aliases/DropCadence.mdx | 2 +- .../sdk/me-client/type-aliases/EventKey.mdx | 29 +++++++++++++++ .../type-aliases/FederationStatus.mdx | 2 +- .../me-client/type-aliases/SigningMethod.mdx | 2 +- .../me-client/type-aliases/SiteFeeShape.mdx | 2 +- src/pages/sdk/me-client/variables/event.mdx | 8 ++--- src/pages/sdk/me-client/variables/oc.mdx | 26 +++++++------- 32 files changed, 204 insertions(+), 174 deletions(-) create mode 100644 src/pages/sdk/me-client/type-aliases/EventKey.mdx diff --git a/src/pages/sdk/me-client/README.mdx b/src/pages/sdk/me-client/README.mdx index 02ea60f..715fc0f 100644 --- a/src/pages/sdk/me-client/README.mdx +++ b/src/pages/sdk/me-client/README.mdx @@ -63,6 +63,7 @@ export const metadata = { - [ClassCSubtype](type-aliases/ClassCSubtype.mdx) - [DropCadence](type-aliases/DropCadence.mdx) - [EventClass](type-aliases/EventClass.mdx) +- [EventKey](type-aliases/EventKey.mdx) - [EventSubtype](type-aliases/EventSubtype.mdx) - [FamilyVerb](type-aliases/FamilyVerb.mdx) - [FederationStatus](type-aliases/FederationStatus.mdx) diff --git a/src/pages/sdk/me-client/functions/computeFees.mdx b/src/pages/sdk/me-client/functions/computeFees.mdx index 260f0c6..4d8885a 100644 --- a/src/pages/sdk/me-client/functions/computeFees.mdx +++ b/src/pages/sdk/me-client/functions/computeFees.mdx @@ -20,7 +20,7 @@ function computeFees( }): ComputedFees; ``` -Defined in: [me-client/src/types.ts:156](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L156) +Defined in: [me-client/src/types.ts:168](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L168) Compute the four-way fee split for an event given an integrator's config and (for percent_of_amount events) the underlying payment diff --git a/src/pages/sdk/me-client/functions/validateIntegratorConfig.mdx b/src/pages/sdk/me-client/functions/validateIntegratorConfig.mdx index 7f05ac0..7736aa5 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:205](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L205) +Defined in: [me-client/src/types.ts:217](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L217) 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 index 3cd57fb..7c952d1 100644 --- a/src/pages/sdk/me-client/interfaces/AgentClassOverride.mdx +++ b/src/pages/sdk/me-client/interfaces/AgentClassOverride.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: AgentClassOverride -Defined in: [me-client/src/types.ts:90](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L90) +Defined in: [me-client/src/types.ts:101](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L101) Optional per-class pricing overrides · per OCHK-V3-PLAN §7 phase-1. Agents acting under a scoped oc-agent delegation may bill @@ -24,6 +24,6 @@ Optional per-class pricing overrides · per OCHK-V3-PLAN §7 phase-1. | 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) | +| <a id="property-refuse"></a> `refuse?` | `boolean` | When true, agent traffic is refused for this subtype. | [me-client/src/types.ts:107](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L107) | +| <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:103](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L103) | +| <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:105](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L105) | diff --git a/src/pages/sdk/me-client/interfaces/BillableEvent.mdx b/src/pages/sdk/me-client/interfaces/BillableEvent.mdx index f6bee2b..7780107 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:248](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L248) +Defined in: [me-client/src/types.ts:260](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L260) ## Extended by @@ -21,17 +21,17 @@ Defined in: [me-client/src/types.ts:248](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: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) | +| <a id="property-class"></a> `class` | [`EventClass`](../type-aliases/EventClass.mdx) | - | [me-client/src/types.ts:263](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L263) | +| <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:285](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L285) | +| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | - | [me-client/src/types.ts:266](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L266) | +| <a id="property-id"></a> `id` | `string` | - | [me-client/src/types.ts:261](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L261) | +| <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:277](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L277) | +| <a id="property-occurred_at"></a> `occurred_at` | `string` | - | [me-client/src/types.ts:262](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L262) | +| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | - | [me-client/src/types.ts:267](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L267) | +| <a id="property-site"></a> `site` | \{ `display_name`: `string`; `domain`: `string`; \} | - | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| `site.display_name` | `string` | - | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| `site.domain` | `string` | - | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | - | [me-client/src/types.ts:269](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L269) | +| <a id="property-subtype"></a> `subtype` | [`EventKey`](../type-aliases/EventKey.mdx) | - | [me-client/src/types.ts:264](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L264) | +| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | - | [me-client/src/types.ts:268](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L268) | +| <a id="property-verify_url"></a> `verify_url` | `string` | - | [me-client/src/types.ts:270](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L270) | diff --git a/src/pages/sdk/me-client/interfaces/ComputedFees.mdx b/src/pages/sdk/me-client/interfaces/ComputedFees.mdx index 4d5f454..aac0e74 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:130](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L130) +Defined in: [me-client/src/types.ts:142](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L142) 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: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) | +| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | [me-client/src/types.ts:143](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L143) | +| <a id="property-platform_fee_sats"></a> `platform_fee_sats` | `number` | [me-client/src/types.ts:144](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L144) | +| <a id="property-site_rebate_sats"></a> `site_rebate_sats` | `number` | [me-client/src/types.ts:146](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L146) | +| <a id="property-user_earned_sats"></a> `user_earned_sats` | `number` | [me-client/src/types.ts:145](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L145) | diff --git a/src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx b/src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx index 8c43612..60022ae 100644 --- a/src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx +++ b/src/pages/sdk/me-client/interfaces/DropClosedWebhookPayload.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: DropClosedWebhookPayload -Defined in: [me-client/src/types.ts:393](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L393) +Defined in: [me-client/src/types.ts:405](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L405) The `drop.closed` system event — one per closed drop window. The manifest is the signed, content-addressed record (Merkle commitments @@ -32,17 +32,17 @@ The `drop.closed` system event — one per closed drop window. The | 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) | +| <a id="property-event_count"></a> `event_count` | `number` | - | - | [me-client/src/types.ts:414](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L414) | +| <a id="property-gross_fee_sats"></a> `gross_fee_sats` | `number` | - | - | [me-client/src/types.ts:416](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L416) | +| <a id="property-kind"></a> `kind` | `"oc-system-event"` | - | [`SystemWebhookPayload`](SystemWebhookPayload.mdx).[`kind`](SystemWebhookPayload.mdx#property-kind) | [me-client/src/types.ts:395](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L395) | +| <a id="property-label"></a> `label` | `string` | - | - | [me-client/src/types.ts:409](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L409) | +| <a id="property-manifest_id"></a> `manifest_id` | `string` | - | - | [me-client/src/types.ts:410](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L410) | +| <a id="property-project_key"></a> `project_key` | `string` | - | [`SystemWebhookPayload`](SystemWebhookPayload.mdx).[`project_key`](SystemWebhookPayload.mdx#property-project_key) | [me-client/src/types.ts:397](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L397) | +| <a id="property-recipient_count"></a> `recipient_count` | `number` | - | - | [me-client/src/types.ts:415](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L415) | +| <a id="property-schedule_id"></a> `schedule_id` | `string` | - | - | [me-client/src/types.ts:408](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L408) | +| <a id="property-sealed_at"></a> `sealed_at` | `string` | - | - | [me-client/src/types.ts:412](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L412) | +| <a id="property-sealed_height"></a> `sealed_height` | `number` \| `null` | - | - | [me-client/src/types.ts:413](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L413) | +| <a id="property-subtype"></a> `subtype` | `"drop.closed"` | [`SystemWebhookPayload`](SystemWebhookPayload.mdx).[`subtype`](SystemWebhookPayload.mdx#property-subtype) | - | [me-client/src/types.ts:406](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L406) | +| <a id="property-user_share_sats"></a> `user_share_sats` | `number` | - | - | [me-client/src/types.ts:417](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L417) | +| <a id="property-verify_url"></a> `verify_url` | `string` | - | - | [me-client/src/types.ts:411](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L411) | +| <a id="property-window_id"></a> `window_id` | `string` | - | - | [me-client/src/types.ts:407](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L407) | diff --git a/src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx b/src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx index 0d66d0b..26950a2 100644 --- a/src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx +++ b/src/pages/sdk/me-client/interfaces/DropResponseBlock.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: DropResponseBlock -Defined in: [me-client/src/types.ts:310](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L310) +Defined in: [me-client/src/types.ts:322](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L322) Drop-period context on event-ingest responses (single route: top-level `drop`; batch route: per-result `drop`). `state` flips @@ -23,8 +23,8 @@ Drop-period context on event-ingest responses (single route: | 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) | +| <a id="property-close_height_target"></a> `close_height_target` | `number` \| `null` | [me-client/src/types.ts:327](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L327) | +| <a id="property-closes_at_target"></a> `closes_at_target` | `string` | [me-client/src/types.ts:326](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L326) | +| <a id="property-label"></a> `label` | `string` | [me-client/src/types.ts:324](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L324) | +| <a id="property-state"></a> `state` | `"open"` \| `"closing"` | [me-client/src/types.ts:325](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L325) | +| <a id="property-window_id"></a> `window_id` | `string` | [me-client/src/types.ts:323](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L323) | diff --git a/src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx b/src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx index b2aef6b..a51f578 100644 --- a/src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx +++ b/src/pages/sdk/me-client/interfaces/DropScheduleSummary.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: DropScheduleSummary -Defined in: [me-client/src/types.ts:298](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L298) +Defined in: [me-client/src/types.ts:310](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L310) Public shape of an enabled drop schedule, as returned in the `drops` array of GET /api/integrator/config — part of the project's @@ -22,7 +22,7 @@ Public shape of an enabled drop schedule, as returned in the | 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) | +| <a id="property-cadence"></a> `cadence` | [`DropCadence`](../type-aliases/DropCadence.mdx) | [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-schedule_id"></a> `schedule_id` | `string` | [me-client/src/types.ts:311](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L311) | +| <a id="property-subtypes"></a> `subtypes` | [`EventSubtype`](../type-aliases/EventSubtype.mdx)[] | [me-client/src/types.ts:313](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L313) | diff --git a/src/pages/sdk/me-client/interfaces/Federation.mdx b/src/pages/sdk/me-client/interfaces/Federation.mdx index 3f739b3..4343764 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:496](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L496) +Defined in: [me-client/src/types.ts:508](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L508) 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: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) | +| <a id="property-apply_cta"></a> `apply_cta?` | `string` | - | [me-client/src/types.ts:528](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L528) | +| <a id="property-apply_href"></a> `apply_href?` | `string` | - | [me-client/src/types.ts:529](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L529) | +| <a id="property-ceremony_window"></a> `ceremony_window?` | `string` | - | [me-client/src/types.ts:526](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L526) | +| <a id="property-charter_hash"></a> `charter_hash` | `string` \| `null` | SHA-256 of the canonical federation charter, hex-encoded. | [me-client/src/types.ts:517](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L517) | +| <a id="property-charter_status"></a> `charter_status?` | `string` | - | [me-client/src/types.ts:525](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L525) | +| <a id="property-geography_hint"></a> `geography_hint` | `string` | - | [me-client/src/types.ts:520](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L520) | +| <a id="property-geography_requirements"></a> `geography_requirements?` | `string` | - | [me-client/src/types.ts:524](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L524) | +| <a id="property-invite"></a> `invite` | `string` \| `null` | Fedimint invite code; null until status === 'live'. | [me-client/src/types.ts:515](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L515) | +| <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:519](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L519) | +| <a id="property-name"></a> `name` | `string` | - | [me-client/src/types.ts:510](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L510) | +| <a id="property-slug"></a> `slug` | `string` | - | [me-client/src/types.ts:509](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L509) | +| <a id="property-status"></a> `status` | [`FederationStatus`](../type-aliases/FederationStatus.mdx) | - | [me-client/src/types.ts:511](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L511) | +| <a id="property-target_guardian_count"></a> `target_guardian_count` | `number` | - | [me-client/src/types.ts:513](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L513) | +| <a id="property-threshold"></a> `threshold` | `string` | - | [me-client/src/types.ts:512](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L512) | +| <a id="property-why_this_one"></a> `why_this_one?` | `string` | - | [me-client/src/types.ts:527](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L527) | diff --git a/src/pages/sdk/me-client/interfaces/FireEventOptions.mdx b/src/pages/sdk/me-client/interfaces/FireEventOptions.mdx index 62c4195..582f578 100644 --- a/src/pages/sdk/me-client/interfaces/FireEventOptions.mdx +++ b/src/pages/sdk/me-client/interfaces/FireEventOptions.mdx @@ -17,10 +17,10 @@ Defined in: [me-client/src/event.ts:38](https://github.com/orangecheck/oc-packag | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <a id="property-action_label"></a> `action_label?` | `string` | Human-readable action label that appears on the envelope. Optional but encouraged — it's what the user sees in their /me/earn ledger. | [me-client/src/event.ts:46](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L46) | -| <a id="property-is_agent"></a> `is_agent?` | `boolean` | Per OCHK-V3-PLAN §7 phase-1 · when true, the event was fired by an oc-agent delegation rather than a human acting under their own session. The integrator's IntegratorEventConfig.agent block applies the override (or refuses · 422 agent_refused). Set this when an autonomous agent (oc-agent kind 30084 action envelope) is the source of the event. Don't set it for events the human user clicked themselves. | [me-client/src/event.ts:66](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L66) | -| <a id="property-metadata"></a> `metadata?` | `Record`\<`string`, `unknown`\> | Free-form metadata stored on the envelope. Public — anyone who GETs /api/envelope/<id> sees it. Don't put secrets here. | [me-client/src/event.ts:57](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L57) | -| <a id="property-payment_amount_sats"></a> `payment_amount_sats?` | `number` | For percent_of_amount-priced subtypes, the underlying amount the fee is computed against. Required for those subtypes. | [me-client/src/event.ts:49](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L49) | +| <a id="property-action_label"></a> `action_label?` | `string` | Human-readable action label that appears on the envelope. Optional but encouraged — it's what the user sees in their /me/earn ledger. | [me-client/src/event.ts:47](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L47) | +| <a id="property-is_agent"></a> `is_agent?` | `boolean` | Per OCHK-V3-PLAN §7 phase-1 · when true, the event was fired by an oc-agent delegation rather than a human acting under their own session. The integrator's IntegratorEventConfig.agent block applies the override (or refuses · 422 agent_refused). Set this when an autonomous agent (oc-agent kind 30084 action envelope) is the source of the event. Don't set it for events the human user clicked themselves. | [me-client/src/event.ts:67](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L67) | +| <a id="property-metadata"></a> `metadata?` | `Record`\<`string`, `unknown`\> | Free-form metadata stored on the envelope. Public — anyone who GETs /api/envelope/<id> sees it. Don't put secrets here. | [me-client/src/event.ts:58](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L58) | +| <a id="property-payment_amount_sats"></a> `payment_amount_sats?` | `number` | For percent_of_amount-priced subtypes, the underlying amount the fee is computed against. Required for those subtypes. | [me-client/src/event.ts:50](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L50) | | <a id="property-project_key"></a> `project_key` | `string` | Your project_key (e.g. `pk_live_yourcompany`). Required. | [me-client/src/event.ts:40](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L40) | -| <a id="property-subtype"></a> `subtype` | [`EventSubtype`](../type-aliases/EventSubtype.mdx) | Canonical billable subtype. Class is inferred by the server. | [me-client/src/event.ts:42](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L42) | -| <a id="property-user_address"></a> `user_address?` | `string` | Override the user identity the envelope is credited to. Default is the currently-authenticated user (cookie / Bearer). Pass this only when firing on a user's behalf in a server-to-server flow — the project must have an explicit allowlist. | [me-client/src/event.ts:54](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L54) | +| <a id="property-subtype"></a> `subtype` | [`EventKey`](../type-aliases/EventKey.mdx) | Billable event key · a built-in subtype OR a custom key defined on your project catalog. Class + label are resolved server-side from the catalog. | [me-client/src/event.ts:43](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L43) | +| <a id="property-user_address"></a> `user_address?` | `string` | Override the user identity the envelope is credited to. Default is the currently-authenticated user (cookie / Bearer). Pass this only when firing on a user's behalf in a server-to-server flow — the project must have an explicit allowlist. | [me-client/src/event.ts:55](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L55) | diff --git a/src/pages/sdk/me-client/interfaces/IntegratorEventConfig.mdx b/src/pages/sdk/me-client/interfaces/IntegratorEventConfig.mdx index b8a1951..4125b91 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:100](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L100) +Defined in: [me-client/src/types.ts:111](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L111) What an integrator declares for a single event subtype. @@ -19,7 +19,7 @@ What an integrator declares for a single event subtype. | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <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) | +| <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:122](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L122) | +| <a id="property-enabled"></a> `enabled` | `boolean` | Whether this site bills this event subtype at all. | [me-client/src/types.ts:113](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L113) | +| <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:115](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L115) | +| <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:119](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L119) | diff --git a/src/pages/sdk/me-client/interfaces/IntegratorPriceConfig.mdx b/src/pages/sdk/me-client/interfaces/IntegratorPriceConfig.mdx index c454245..6b5548b 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:117](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L117) +Defined in: [me-client/src/types.ts:128](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L128) 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: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) | +| <a id="property-display_name"></a> `display_name` | `string` | - | [me-client/src/types.ts:130](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L130) | +| <a id="property-domain"></a> `domain` | `string` | - | [me-client/src/types.ts:131](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L131) | +| <a id="property-events"></a> `events` | `Partial`\<`Record`\<[`EventKey`](../type-aliases/EventKey.mdx), [`IntegratorEventConfig`](IntegratorEventConfig.mdx)\>\> | Per-event configs, keyed by event key. Open catalog: built-in subtypes AND your own custom keys. Keys not listed are disabled by default. | [me-client/src/types.ts:136](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L136) | +| <a id="property-project_key"></a> `project_key` | `string` | - | [me-client/src/types.ts:129](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L129) | +| <a id="property-updated_at"></a> `updated_at` | `string` | ISO-8601 timestamp the config was last updated. | [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/PaymentAuthorizeOptions.mdx b/src/pages/sdk/me-client/interfaces/PaymentAuthorizeOptions.mdx index c55fd56..631ea28 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:456](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L456) +Defined in: [me-client/src/types.ts:468](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L468) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <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) | +| <a id="property-amount_sats"></a> `amount_sats?` | `number` | [me-client/src/types.ts:470](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L470) | +| <a id="property-description"></a> `description` | `string` | [me-client/src/types.ts:472](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L472) | +| <a id="property-external_ref"></a> `external_ref?` | `string` | [me-client/src/types.ts:473](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L473) | +| <a id="property-identity"></a> `identity` | `string` | [me-client/src/types.ts:469](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L469) | +| <a id="property-usd_cents"></a> `usd_cents?` | `number` | [me-client/src/types.ts:471](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L471) | diff --git a/src/pages/sdk/me-client/interfaces/PaymentResult.mdx b/src/pages/sdk/me-client/interfaces/PaymentResult.mdx index 67bff62..d33ad3f 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:464](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L464) +Defined in: [me-client/src/types.ts:476](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L476) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <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) | +| <a id="property-id"></a> `id` | `string` | [me-client/src/types.ts:477](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L477) | +| <a id="property-sats_charged"></a> `sats_charged?` | `number` | [me-client/src/types.ts:479](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L479) | +| <a id="property-status"></a> `status` | `"authorized"` \| `"failed"` \| `"cancelled"` | [me-client/src/types.ts:478](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L478) | +| <a id="property-user_envelope_id"></a> `user_envelope_id?` | `string` | [me-client/src/types.ts:480](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L480) | +| <a id="property-verify_url"></a> `verify_url?` | `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/Session.mdx b/src/pages/sdk/me-client/interfaces/Session.mdx index 25711e3..11b450a 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:441](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L441) +Defined in: [me-client/src/types.ts:453](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L453) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <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) | +| <a id="property-expires_at"></a> `expires_at` | `string` | [me-client/src/types.ts:457](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L457) | +| <a id="property-id"></a> `id` | `string` | [me-client/src/types.ts:454](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L454) | +| <a id="property-identity"></a> `identity` | `string` | [me-client/src/types.ts:455](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L455) | +| <a id="property-opens_at"></a> `opens_at` | `string` | [me-client/src/types.ts:456](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L456) | +| <a id="property-policy"></a> `policy` | [`SessionPolicy`](SessionPolicy.mdx) | [me-client/src/types.ts:458](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L458) | +| <a id="property-scope"></a> `scope` | `string`[] | [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/SessionPolicy.mdx b/src/pages/sdk/me-client/interfaces/SessionPolicy.mdx index cffd522..401d580 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:435](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L435) +Defined in: [me-client/src/types.ts:447](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L447) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <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) | +| <a id="property-duration_seconds"></a> `duration_seconds` | `number` | [me-client/src/types.ts:448](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L448) | +| <a id="property-refresh"></a> `refresh` | `"sliding"` \| `"rolling"` \| `"none"` | [me-client/src/types.ts:449](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L449) | +| <a id="property-sensitive_actions"></a> `sensitive_actions?` | `"none"` \| `"re-auth"` | [me-client/src/types.ts:450](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L450) | diff --git a/src/pages/sdk/me-client/interfaces/SignInOptions.mdx b/src/pages/sdk/me-client/interfaces/SignInOptions.mdx index afe0f22..2ea6281 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:450](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L450) +Defined in: [me-client/src/types.ts:462](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L462) ## Properties | Property | Type | Defined in | | ------ | ------ | ------ | -| <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) | +| <a id="property-returnto"></a> `returnTo?` | `string` | [me-client/src/types.ts:465](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L465) | +| <a id="property-scope"></a> `scope` | `string`[] | [me-client/src/types.ts:463](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L463) | +| <a id="property-sessionpolicy"></a> `sessionPolicy?` | `Partial`\<[`SessionPolicy`](SessionPolicy.mdx)\> | [me-client/src/types.ts:464](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L464) | diff --git a/src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx b/src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx index 3a03991..1cf0b18 100644 --- a/src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx +++ b/src/pages/sdk/me-client/interfaces/SystemWebhookPayload.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: SystemWebhookPayload -Defined in: [me-client/src/types.ts:382](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L382) +Defined in: [me-client/src/types.ts:394](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L394) Non-billable SYSTEM webhook deliveries — project-level operational signals (escrow.low, escrow.depleted, escrow.recovered, drop.closed). @@ -37,6 +37,6 @@ Carries no user identity. Discriminate on `kind` first, then | 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) | +| <a id="property-kind"></a> `kind` | `"oc-system-event"` | [me-client/src/types.ts:395](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L395) | +| <a id="property-project_key"></a> `project_key` | `string` | [me-client/src/types.ts:397](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L397) | +| <a id="property-subtype"></a> `subtype` | `string` | [me-client/src/types.ts:396](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L396) | diff --git a/src/pages/sdk/me-client/interfaces/TelemetryEvent.mdx b/src/pages/sdk/me-client/interfaces/TelemetryEvent.mdx index 2975758..9c291b3 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:472](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L472) +Defined in: [me-client/src/types.ts:484](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L484) ## 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: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) | +| <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:485](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L485) | +| <a id="property-session_id"></a> `session_id?` | `string` | [me-client/src/types.ts:494](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L494) | +| <a id="property-timestamp"></a> `timestamp` | `string` | [me-client/src/types.ts:493](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L493) | diff --git a/src/pages/sdk/me-client/interfaces/ValidationResult.mdx b/src/pages/sdk/me-client/interfaces/ValidationResult.mdx index b92c9c4..28d5f02 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:195](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L195) +Defined in: [me-client/src/types.ts:207](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L207) 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: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) | +| <a id="property-errors"></a> `errors` | \{ `message`: `string`; `subtype?`: [`EventKey`](../type-aliases/EventKey.mdx); \}[] | [me-client/src/types.ts:209](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L209) | +| <a id="property-ok"></a> `ok` | `boolean` | [me-client/src/types.ts:208](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L208) | diff --git a/src/pages/sdk/me-client/interfaces/VerifyEventResult.mdx b/src/pages/sdk/me-client/interfaces/VerifyEventResult.mdx index e052762..3b380d8 100644 --- a/src/pages/sdk/me-client/interfaces/VerifyEventResult.mdx +++ b/src/pages/sdk/me-client/interfaces/VerifyEventResult.mdx @@ -11,7 +11,7 @@ export const metadata = { # Interface: VerifyEventResult -Defined in: [me-client/src/event.ts:197](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L197) +Defined in: [me-client/src/event.ts:198](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L198) Result of replay-verifying a billable envelope against the integrator's price config. Every field returned tells the caller @@ -21,6 +21,6 @@ Result of replay-verifying a billable envelope against the | Property | Type | Description | Defined in | | ------ | ------ | ------ | ------ | -| <a id="property-expected"></a> `expected` | \| \{ `gross_fee_sats`: `number`; `platform_fee_sats`: `number`; `site_rebate_sats`: `number`; `user_earned_sats`: `number`; \} \| `null` | What computeFees() returned for the envelope's subtype + amount, given the integrator's current price config. Useful for the /audit divergence tracker — render expected vs actual side by side. Null when the subtype isn't enabled for this integrator. | [me-client/src/event.ts:219](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L219) | -| <a id="property-issues"></a> `issues` | \{ `actual`: `number` \| `null`; `expected`: `number` \| `null`; `field`: \| `"gross_fee_sats"` \| `"platform_fee_sats"` \| `"user_earned_sats"` \| `"site_rebate_sats"` \| `"subtype_disabled"` \| `"subtype_unconfigured"` \| `"percent_amount_missing"`; `message`: `string`; \}[] | Issues found during verification, with field-level granularity so callers can highlight exactly which line is off. | [me-client/src/event.ts:202](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L202) | -| <a id="property-ok"></a> `ok` | `boolean` | True iff every expected fee equals the recorded fee. | [me-client/src/event.ts:199](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L199) | +| <a id="property-expected"></a> `expected` | \| \{ `gross_fee_sats`: `number`; `platform_fee_sats`: `number`; `site_rebate_sats`: `number`; `user_earned_sats`: `number`; \} \| `null` | What computeFees() returned for the envelope's subtype + amount, given the integrator's current price config. Useful for the /audit divergence tracker — render expected vs actual side by side. Null when the subtype isn't enabled for this integrator. | [me-client/src/event.ts:220](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L220) | +| <a id="property-issues"></a> `issues` | \{ `actual`: `number` \| `null`; `expected`: `number` \| `null`; `field`: \| `"gross_fee_sats"` \| `"platform_fee_sats"` \| `"user_earned_sats"` \| `"site_rebate_sats"` \| `"subtype_disabled"` \| `"subtype_unconfigured"` \| `"percent_amount_missing"`; `message`: `string`; \}[] | Issues found during verification, with field-level granularity so callers can highlight exactly which line is off. | [me-client/src/event.ts:203](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L203) | +| <a id="property-ok"></a> `ok` | `boolean` | True iff every expected fee equals the recorded fee. | [me-client/src/event.ts:200](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L200) | diff --git a/src/pages/sdk/me-client/interfaces/WebhookHeaders.mdx b/src/pages/sdk/me-client/interfaces/WebhookHeaders.mdx index 1313090..2ebf6db 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:412](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L412) +Defined in: [me-client/src/types.ts:424](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L424) 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: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) | +| <a id="property-oc-class"></a> `OC-Class` | [`EventClass`](../type-aliases/EventClass.mdx) | Class · matches payload.class. | [me-client/src/types.ts:438](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L438) | +| <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:442](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L442) | +| <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:433](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L433) | +| <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:429](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L429) | +| <a id="property-oc-signature"></a> `OC-Signature` | `string` | Ed25519 signature over the raw response body, hex-encoded. | [me-client/src/types.ts:426](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L426) | +| <a id="property-oc-subtype"></a> `OC-Subtype` | [`EventKey`](../type-aliases/EventKey.mdx) | Subtype · matches payload.subtype (built-in or a custom event key); lets routers branch on the header before parsing. | [me-client/src/types.ts:436](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L436) | diff --git a/src/pages/sdk/me-client/interfaces/WebhookPayload.mdx b/src/pages/sdk/me-client/interfaces/WebhookPayload.mdx index 7f7f741..83b27aa 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:342](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L342) +Defined in: [me-client/src/types.ts:354](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L354) The exact JSON body delivered to a registered webhook endpoint when a billable event fires. Imported by integrator backends so the @@ -42,20 +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: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) | +| <a id="property-class"></a> `class` | [`EventClass`](../type-aliases/EventClass.mdx) | - | [`BillableEvent`](BillableEvent.mdx).[`class`](BillableEvent.mdx#property-class) | [me-client/src/types.ts:263](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L263) | +| <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:285](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L285) | +| <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:266](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L266) | +| <a id="property-id"></a> `id` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`id`](BillableEvent.mdx#property-id) | [me-client/src/types.ts:261](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L261) | +| <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:277](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L277) | +| <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:359](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L359) | +| <a id="property-occurred_at"></a> `occurred_at` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`occurred_at`](BillableEvent.mdx#property-occurred_at) | [me-client/src/types.ts:262](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L262) | +| <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:267](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L267) | +| <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:368](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L368) | +| <a id="property-site"></a> `site` | \{ `display_name`: `string`; `domain`: `string`; \} | - | [`BillableEvent`](BillableEvent.mdx).[`site`](BillableEvent.mdx#property-site) | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| `site.display_name` | `string` | - | - | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| `site.domain` | `string` | - | - | [me-client/src/types.ts:265](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L265) | +| <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:269](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L269) | +| <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:364](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L364) | +| <a id="property-subtype"></a> `subtype` | [`EventKey`](../type-aliases/EventKey.mdx) | - | [`BillableEvent`](BillableEvent.mdx).[`subtype`](BillableEvent.mdx#property-subtype) | [me-client/src/types.ts:264](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L264) | +| <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:268](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L268) | +| <a id="property-verify_url"></a> `verify_url` | `string` | - | [`BillableEvent`](BillableEvent.mdx).[`verify_url`](BillableEvent.mdx#property-verify_url) | [me-client/src/types.ts:270](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L270) | diff --git a/src/pages/sdk/me-client/type-aliases/AttestTier.mdx b/src/pages/sdk/me-client/type-aliases/AttestTier.mdx index bc8b0cf..1b2ec27 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:76](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L76) +Defined in: [me-client/src/types.ts:87](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L87) AttestTier · what an integrator's gate can read about an oc identity. diff --git a/src/pages/sdk/me-client/type-aliases/DropCadence.mdx b/src/pages/sdk/me-client/type-aliases/DropCadence.mdx index 844edd4..fc1f52e 100644 --- a/src/pages/sdk/me-client/type-aliases/DropCadence.mdx +++ b/src/pages/sdk/me-client/type-aliases/DropCadence.mdx @@ -29,7 +29,7 @@ type DropCadence = }; ``` -Defined in: [me-client/src/types.ts:289](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L289) +Defined in: [me-client/src/types.ts:301](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L301) A drop schedule's cadence. Weekly/monthly close at a fixed UTC boundary; manual closes when the integrator says (Drop now), with a diff --git a/src/pages/sdk/me-client/type-aliases/EventKey.mdx b/src/pages/sdk/me-client/type-aliases/EventKey.mdx new file mode 100644 index 0000000..531307d --- /dev/null +++ b/src/pages/sdk/me-client/type-aliases/EventKey.mdx @@ -0,0 +1,29 @@ +export const metadata = { + title: "Type Alias: EventKey", + description: "Auto-generated API reference for Type Alias: EventKey. Source: TypeScript types in oc-packages.", +}; + +[**@orangecheck/me-client**](../README.mdx) + +*** + +[@orangecheck/me-client](../README.mdx) / EventKey + +# Type Alias: EventKey + +```ts +type EventKey = + | EventSubtype + | string & { +}; +``` + +Defined in: [me-client/src/types.ts:75](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L75) + +Any billable event key. A project's catalog is OPEN: alongside the built-in +subtypes above, an integrator can define their own event keys (with their own +label + class + price) on the project config. `EventKey` keeps autocomplete +for the built-ins while accepting any custom string — the `(string & {})` +arm preserves the literal union in editors instead of collapsing it to +`string`. The server resolves class/label off the project's catalog for +custom keys. diff --git a/src/pages/sdk/me-client/type-aliases/FederationStatus.mdx b/src/pages/sdk/me-client/type-aliases/FederationStatus.mdx index 35a43be..65ae13b 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:492](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L492) +Defined in: [me-client/src/types.ts:504](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L504) diff --git a/src/pages/sdk/me-client/type-aliases/SigningMethod.mdx b/src/pages/sdk/me-client/type-aliases/SigningMethod.mdx index 13e0322..9f1c073 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:526](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L526) +Defined in: [me-client/src/types.ts:538](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L538) 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 c8c1cbf..9f56750 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:80](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L80) +Defined in: [me-client/src/types.ts:91](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/types.ts#L91) 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/event.mdx b/src/pages/sdk/me-client/variables/event.mdx index 24daf98..2aa6a05 100644 --- a/src/pages/sdk/me-client/variables/event.mdx +++ b/src/pages/sdk/me-client/variables/event.mdx @@ -19,12 +19,12 @@ const event: { }; ``` -Defined in: [me-client/src/event.ts:343](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L343) +Defined in: [me-client/src/event.ts:344](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L344) ## Type Declaration | Name | Type | Defined in | | ------ | ------ | ------ | -| <a id="property-fire"></a> `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) | -| <a id="property-firebatch"></a> `fireBatch()` | (`options`: `FireBatchOptions`) => `Promise`\<`FireBatchResponse`\> | [me-client/src/event.ts:343](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L343) | -| <a id="property-verify"></a> `verify()` | (`envelope`: [`BillableEvent`](../interfaces/BillableEvent.mdx), `config`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx), `payment_amount_sats?`: `number`) => [`VerifyEventResult`](../interfaces/VerifyEventResult.mdx) | [me-client/src/event.ts:343](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L343) | +| <a id="property-fire"></a> `fire()` | (`options`: [`FireEventOptions`](../interfaces/FireEventOptions.mdx)) => `Promise`\<[`BillableEvent`](../interfaces/BillableEvent.mdx)\> | [me-client/src/event.ts:344](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L344) | +| <a id="property-firebatch"></a> `fireBatch()` | (`options`: `FireBatchOptions`) => `Promise`\<`FireBatchResponse`\> | [me-client/src/event.ts:344](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L344) | +| <a id="property-verify"></a> `verify()` | (`envelope`: [`BillableEvent`](../interfaces/BillableEvent.mdx), `config`: [`IntegratorPriceConfig`](../interfaces/IntegratorPriceConfig.mdx), `payment_amount_sats?`: `number`) => [`VerifyEventResult`](../interfaces/VerifyEventResult.mdx) | [me-client/src/event.ts:344](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L344) | diff --git a/src/pages/sdk/me-client/variables/oc.mdx b/src/pages/sdk/me-client/variables/oc.mdx index 995bd5f..80b8fd7 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:156](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L156) +Defined in: [me-client/src/index.ts:157](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L157) 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:160](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L160) | +| <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:161](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L161) | | `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: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:164](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L164) | +| <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:160](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L160) | +| `event.fire()` | (`options`: [`FireEventOptions`](../interfaces/FireEventOptions.mdx)) => `Promise`\<[`BillableEvent`](../interfaces/BillableEvent.mdx)\> | - | - | [me-client/src/event.ts:344](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L344) | +| `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:344](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L344) | +| `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:344](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/event.ts#L344) | +| <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:165](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L165) | | `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:162](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L162) | +| <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:163](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L163) | | `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:165](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L165) | +| <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:166](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L166) | | `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:158](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L158) | +| <a id="property-payment"></a> `payment` | \{ `authorize`: (`opts`: [`PaymentAuthorizeOptions`](../interfaces/PaymentAuthorizeOptions.mdx)) => `Promise`\<[`PaymentResult`](../interfaces/PaymentResult.mdx)\>; \} | - | - | [me-client/src/index.ts:159](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L159) | | `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:163](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L163) | +| <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:164](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L164) | | `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:157](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L157) | +| <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:158](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L158) | | `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:161](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L161) | +| <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:162](https://github.com/orangecheck/oc-packages/blob/main/me-client/src/index.ts#L162) | | `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) |