TipsInteractionReadyPayload tips.interaction.ready@1

Generated at from openvibe-contracts v0.33.0 and openvibe-sdk v0.5.0.

Version
1.0.0
Owner
tips
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-012
Schema
https://openvibe.network/contracts/events/payloads/tips.interaction.ready.v1.json

tips.interaction.ready v1 (OpenVibe.Tips server/domain/interactions.js settle, summary()). The interaction settled: it is active and its effects (overlay alert, chat line, paid message, TTS, media request) are queued. Envelope: subject { type: interaction, id: tint_… }, visibility internal, priority important, actor service:tips. Never emitted for tests or imports.

Fields

FieldTypeRequiredDescriptionConstraints
interaction_idstringyes
  • pattern ^tint_[0-9A-HJKMNP-TV-Z]{26}$
creatoridentity.subject-refyes
supporterone ofyesThe supporter, null when external, anonymous or unmapped.
supporter_namestring | nullyesDisplay name at the time.
kindenumyes
  • one of "tip", "paid_message", "tts", "media_request"
amountintegeryesInteger amount in currency minor units (Vibes bits).
  • minimum 1
currencystringyesvibes-bits today.
settlementenumyes
  • one of "billing", "external", "simulated", "imported"
payment_stateenumyes
  • one of "pending", "settled", "reversed", "failed"
delivery_stateenumyes
  • one of "awaiting_payment", "queued", "delivered", "failed", "cancelled"
billing_txn_idstring | nullyesThe Billing transaction (txn_…) that settled it.
testbooleanyesSimulations never emit events, so false in practice.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: external-anonymous
{
  "interaction_id": "tint_01JAB3C4D5E6F7G8H9J0K1MNPQ",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "supporter": null,
  "supporter_name": "Anonymous",
  "kind": "tip",
  "amount": 500,
  "currency": "vibes-bits",
  "settlement": "external",
  "payment_state": "settled",
  "delivery_state": "queued",
  "billing_txn_id": null,
  "test": false
}
Valid: settled-tip
{
  "interaction_id": "tint_01JAB3C4D5E6F7G8H9J0K1MNPQ",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "supporter": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "supporter_name": "Generous Fan",
  "kind": "tip",
  "amount": 500,
  "currency": "vibes-bits",
  "settlement": "billing",
  "payment_state": "settled",
  "delivery_state": "queued",
  "billing_txn_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNPR",
  "test": false
}
Rejected: local-user-id
{
  "interaction_id": "tint_01JAB3C4D5E6F7G8H9J0K1MNPQ",
  "creator": {
    "type": "user",
    "id": "42"
  },
  "supporter": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "supporter_name": "Generous Fan",
  "kind": "tip",
  "amount": 500,
  "currency": "vibes-bits",
  "settlement": "billing",
  "payment_state": "settled",
  "delivery_state": "queued",
  "billing_txn_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNPR",
  "test": false
}
Rejected: string-amount
{
  "interaction_id": "tint_01JAB3C4D5E6F7G8H9J0K1MNPQ",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "supporter": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "supporter_name": "Generous Fan",
  "kind": "tip",
  "amount": "5.00",
  "currency": "vibes-bits",
  "settlement": "billing",
  "payment_state": "settled",
  "delivery_state": "queued",
  "billing_txn_id": "txn_01JAB3C4D5E6F7G8H9J0K1MNPR",
  "test": false
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('tips.interaction.ready@1', value);   // { valid, errors: [{ path, message }] }