Variable: oc
const oc: {
config: {
validate: (cfg: IntegratorPriceConfig) => ValidationResult;
};
event: {
fire: (options: FireEventOptions) => Promise<BillableEvent>;
fireBatch: (options: FireBatchOptions) => Promise<FireBatchResponse>;
verify: (envelope: BillableEvent, config: IntegratorPriceConfig, payment_amount_sats?: number) => VerifyEventResult;
};
federations: {
defaultLive: () => Promise<Federation | null>;
get: (slug: string) => Promise<Federation | null>;
list: () => Promise<Federation[]>;
live: () => Promise<Federation[]>;
};
payment: {
authorize: (opts: PaymentAuthorizeOptions) => Promise<PaymentResult>;
};
scope: {
granted: (options: GrantedOptions) => Promise<GrantedResult>;
request: (scopes: Scope[], options: RequestOptions) => never;
};
session: {
create: (opts: SignInOptions) => Promise<Session>;
invalidate: (sessionId: string) => Promise<void>;
refresh: (sessionId: string) => Promise<Session>;
};
webhook: {
fetchJwks: (issuer: string) => Promise<void>;
verify: (rawBody: string | Uint8Array<ArrayBufferLike>, sigHex: string, kid: string, options: VerifyOptions) => Promise<VerifyResult>;
};
};
Defined in: me-client/src/index.ts:107
Convenience namespace mirroring the public API surface in /integrate
code samples — oc.session.create(), oc.payment.authorize(),
oc.event.fire(), oc.config.validate(), oc.webhook.verify(),
oc.federations.live(), oc.scope.granted() / oc.scope.request().
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
<a id="property-config"></a> config | { validate: (cfg: IntegratorPriceConfig) => ValidationResult; } | - | me-client/src/index.ts:107 |
config.validate() | (cfg: IntegratorPriceConfig) => ValidationResult | - | me-client/src/config.ts:25 |
<a id="property-event"></a> event | { fire: (options: FireEventOptions) => Promise<BillableEvent>; fireBatch: (options: FireBatchOptions) => Promise<FireBatchResponse>; verify: (envelope: BillableEvent, config: IntegratorPriceConfig, payment_amount_sats?: number) => VerifyEventResult; } | - | me-client/src/index.ts:107 |
event.fire() | (options: FireEventOptions) => Promise<BillableEvent> | - | me-client/src/event.ts:329 |
event.fireBatch() | (options: FireBatchOptions) => Promise<FireBatchResponse> | - | me-client/src/event.ts:329 |
event.verify() | (envelope: BillableEvent, config: IntegratorPriceConfig, payment_amount_sats?: number) => VerifyEventResult | - | me-client/src/event.ts:329 |
<a id="property-federations"></a> federations | { defaultLive: () => Promise<Federation | null>; get: (slug: string) => Promise<Federation | null>; list: () => Promise<Federation[]>; live: () => Promise<Federation[]>; } | - | me-client/src/index.ts:107 |
federations.defaultLive() | () => Promise<Federation | null> | - | me-client/src/federations.ts:51 |
federations.get() | (slug: string) => Promise<Federation | null> | - | me-client/src/federations.ts:51 |
federations.list() | () => Promise<Federation[]> | - | me-client/src/federations.ts:51 |
federations.live() | () => Promise<Federation[]> | - | me-client/src/federations.ts:51 |
<a id="property-payment"></a> payment | { authorize: (opts: PaymentAuthorizeOptions) => Promise<PaymentResult>; } | - | me-client/src/index.ts:107 |
payment.authorize() | (opts: PaymentAuthorizeOptions) => Promise<PaymentResult> | - | me-client/src/payment.ts:25 |
<a id="property-scope"></a> scope | { granted: (options: GrantedOptions) => Promise<GrantedResult>; request: (scopes: Scope[], options: RequestOptions) => never; } | - | me-client/src/index.ts:107 |
scope.granted() | (options: GrantedOptions) => Promise<GrantedResult> | - | me-client/src/scope.ts:144 |
scope.request() | (scopes: Scope[], options: RequestOptions) => never | - | me-client/src/scope.ts:144 |
<a id="property-session"></a> session | { create: (opts: SignInOptions) => Promise<Session>; invalidate: (sessionId: string) => Promise<void>; refresh: (sessionId: string) => Promise<Session>; } | - | me-client/src/index.ts:107 |
session.create() | (opts: SignInOptions) => Promise<Session> | - | me-client/src/session.ts:77 |
session.invalidate() | (sessionId: string) => Promise<void> | - | me-client/src/session.ts:77 |
session.refresh() | (sessionId: string) => Promise<Session> | - | me-client/src/session.ts:77 |
<a id="property-webhook"></a> webhook | { fetchJwks: (issuer: string) => Promise<void>; verify: (rawBody: string | Uint8Array<ArrayBufferLike>, sigHex: string, kid: string, options: VerifyOptions) => Promise<VerifyResult>; } | - | me-client/src/index.ts:107 |
webhook.fetchJwks() | (issuer: string) => Promise<void> | fetchJwksForce | me-client/src/webhook.ts:221 |
webhook.verify() | (rawBody: string | Uint8Array<ArrayBufferLike>, sigHex: string, kid: string, options: VerifyOptions) => Promise<VerifyResult> | - | me-client/src/webhook.ts:221 |