{ "sourceCommit": "1c90c5e408592d5b4e87944ea79b998890633249", "description": "Structural JSON Schema projections of the shared Zod client contract. Custom refinements, transforms, binary values, and runtime authorization require the original Zod schemas and server implementation. Inputs are client method objects before HTTP transport mapping.", "methods": [ { "name": "auth.challenge", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/auth/challenge", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "accountKind": { "default": "wallet", "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "purpose": { "default": "signIn", "type": "string", "enum": [ "signIn", "link", "confirm" ] }, "action": { "type": "string", "minLength": 1, "maxLength": 80 } }, "required": [ "address", "chainId" ], "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "message": { "type": "string" }, "nonce": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "message", "nonce", "expiresAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L120" }, { "name": "auth.verify", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/auth/verify", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "message": { "type": "string", "minLength": 1, "maxLength": 4096 }, "signature": { "type": "string", "maxLength": 16384, "pattern": "^0x[\\da-fA-F]+$" }, "method": { "default": "wallet", "type": "string", "enum": [ "wallet", "passkey", "phrase" ] } }, "required": [ "message", "signature" ], "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "expiresAt": { "$ref": "#/$defs/__schema1" }, "isNewAccount": { "type": "boolean" }, "csrfToken": { "type": "string" } }, "required": [ "address", "chainId", "expiresAt", "isNewAccount", "csrfToken" ], "additionalProperties": false }, { "type": "object", "properties": { "confirmationToken": { "type": "string" }, "expiresAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "confirmationToken", "expiresAt" ], "additionalProperties": false }, { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema0" }, "isNewAccount": { "type": "boolean", "const": true }, "session": { "type": "null" } }, "required": [ "address", "isNewAccount", "session" ], "additionalProperties": false } ], "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L121" }, { "name": "auth.signOut", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/auth/sign-out", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L129" }, { "name": "account.me", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema0" }, "accountKind": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": "string" }, "avatarSeed": { "type": "string" }, "bio": { "type": "string" }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "onboarding": { "type": "object", "properties": { "intent": { "anyOf": [ { "type": "string", "enum": [ "buy", "earn", "sell" ] }, { "type": "null" } ] }, "completedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "intent", "completedAt" ], "additionalProperties": false }, "recovery": { "type": "object", "properties": { "checkedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "checkedAt" ], "additionalProperties": false }, "handleChangedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "handleChangeAvailableAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "payoutAddress": { "$ref": "#/$defs/__schema0" }, "workspaces": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema0" }, "description": { "type": "string" }, "logo": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "verificationTier": { "type": "string", "enum": [ "unverified", "domain", "business" ] }, "joinedAt": { "$ref": "#/$defs/__schema1" }, "offersCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "closedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "category": { "type": [ "string", "null" ] }, "categories": { "type": "array", "items": { "type": "string" } }, "supportEmail": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "moderation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema1" }, "action": { "type": "string" }, "reasonCategory": { "type": "string" } }, "required": [ "at", "action", "reasonCategory" ], "additionalProperties": false } } }, "required": [ "state", "actions" ], "additionalProperties": false }, "region": { "type": "string" }, "defaults": { "anyOf": [ { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema0" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, { "type": "null" } ] }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "agreement": { "type": "object", "properties": { "version": { "type": "string" }, "publishedAt": { "$ref": "#/$defs/__schema1" }, "url": { "type": "string", "format": "uri" }, "acceptedAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "version", "publishedAt", "url", "acceptedAt" ], "additionalProperties": false }, "businessWallet": { "$ref": "#/$defs/__schema0" }, "showSupportEmail": { "type": "boolean" } }, "required": [ "id", "name", "slug", "address", "description", "logo", "website", "verificationTier", "joinedAt", "offersCount", "closedAt", "supportEmail", "region", "defaults", "budgetAlertSales", "agreement", "businessWallet" ], "additionalProperties": false } }, "isMerchant": { "type": "boolean" }, "isOperator": { "type": "boolean" }, "createdAt": { "$ref": "#/$defs/__schema1" }, "visibility": { "type": "object", "properties": { "level": { "$ref": "#/$defs/__schema10" }, "fields": { "$ref": "#/$defs/__schema11" }, "acceptsInvitations": { "$ref": "#/$defs/__schema12" } }, "required": [ "level", "fields", "acceptsInvitations" ], "additionalProperties": false } }, "required": [ "address", "accountKind", "handle", "displayName", "avatarSeed", "bio", "website", "onboarding", "recovery", "handleChangedAt", "handleChangeAvailableAt", "payoutAddress", "workspaces", "isMerchant", "isOperator", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema10": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] }, "__schema11": { "default": [], "type": "array", "items": { "type": "string", "enum": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ] } }, "__schema12": { "default": false, "type": "boolean" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L130" }, { "name": "account.updateProfile", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/me", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": "string", "maxLength": 80 }, "handle": { "type": "string", "minLength": 3, "maxLength": 30, "pattern": "^[a-z][a-z0-9_]+$" }, "avatarSeed": { "type": "string", "maxLength": 100 }, "bio": { "type": "string", "maxLength": 500 }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "intent": { "type": "string", "enum": [ "buy", "earn", "sell" ] }, "onboardingCompleted": { "type": "boolean" } }, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema0" }, "accountKind": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": "string" }, "avatarSeed": { "type": "string" }, "bio": { "type": "string" }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "onboarding": { "type": "object", "properties": { "intent": { "anyOf": [ { "type": "string", "enum": [ "buy", "earn", "sell" ] }, { "type": "null" } ] }, "completedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "intent", "completedAt" ], "additionalProperties": false }, "recovery": { "type": "object", "properties": { "checkedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "checkedAt" ], "additionalProperties": false }, "handleChangedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "handleChangeAvailableAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "payoutAddress": { "$ref": "#/$defs/__schema0" }, "workspaces": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema0" }, "description": { "type": "string" }, "logo": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "verificationTier": { "type": "string", "enum": [ "unverified", "domain", "business" ] }, "joinedAt": { "$ref": "#/$defs/__schema1" }, "offersCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "closedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "category": { "type": [ "string", "null" ] }, "categories": { "type": "array", "items": { "type": "string" } }, "supportEmail": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "moderation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema1" }, "action": { "type": "string" }, "reasonCategory": { "type": "string" } }, "required": [ "at", "action", "reasonCategory" ], "additionalProperties": false } } }, "required": [ "state", "actions" ], "additionalProperties": false }, "region": { "type": "string" }, "defaults": { "anyOf": [ { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema0" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, { "type": "null" } ] }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "agreement": { "type": "object", "properties": { "version": { "type": "string" }, "publishedAt": { "$ref": "#/$defs/__schema1" }, "url": { "type": "string", "format": "uri" }, "acceptedAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "version", "publishedAt", "url", "acceptedAt" ], "additionalProperties": false }, "businessWallet": { "$ref": "#/$defs/__schema0" }, "showSupportEmail": { "type": "boolean" } }, "required": [ "id", "name", "slug", "address", "description", "logo", "website", "verificationTier", "joinedAt", "offersCount", "closedAt", "supportEmail", "region", "defaults", "budgetAlertSales", "agreement", "businessWallet" ], "additionalProperties": false } }, "isMerchant": { "type": "boolean" }, "isOperator": { "type": "boolean" }, "createdAt": { "$ref": "#/$defs/__schema1" }, "visibility": { "type": "object", "properties": { "level": { "$ref": "#/$defs/__schema10" }, "fields": { "$ref": "#/$defs/__schema11" }, "acceptsInvitations": { "$ref": "#/$defs/__schema12" } }, "required": [ "level", "fields", "acceptsInvitations" ], "additionalProperties": false } }, "required": [ "address", "accountKind", "handle", "displayName", "avatarSeed", "bio", "website", "onboarding", "recovery", "handleChangedAt", "handleChangeAvailableAt", "payoutAddress", "workspaces", "isMerchant", "isOperator", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema10": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] }, "__schema11": { "default": [], "type": "array", "items": { "type": "string", "enum": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ] } }, "__schema12": { "default": false, "type": "boolean" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L131" }, { "name": "account.handleAvailable", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/handles/:handle", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "handle": { "type": "string" } }, "required": [ "handle" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "available": { "type": "boolean" }, "reason": { "anyOf": [ { "type": "string", "enum": [ "taken", "reserved", "invalid" ] }, { "type": "null" } ] }, "suggestions": { "maxItems": 3, "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "available", "reason", "suggestions" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L132" }, { "name": "account.activity", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/activity", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "filter": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "amount": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "token": { "anyOf": [ { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, { "type": "null" } ] }, "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "status": { "type": "string", "enum": [ "not_submitted", "wallet_confirmation", "submitted", "included", "confirmed", "indexed", "done", "rejected", "unknown", "replaced", "failed" ] }, "objectId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "kind", "amount", "token", "txHash", "blockNumber", "status", "objectId", "at" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L133" }, { "name": "account.balances", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/balances", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "monWei": { "$ref": "#/$defs/__schema0" }, "sdusd": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "sdusdAllowanceToProtocol": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "blockNumber": { "$ref": "#/$defs/__schema0" } }, "required": [ "monWei", "sdusd", "sdusdAllowanceToProtocol", "blockNumber" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L137" }, { "name": "account.recordRecoveryCheck", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/me/recovery-check", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "checkedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "checkedAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L138" }, { "name": "account.passkeys", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/passkeys", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "credentialId": { "type": "string" }, "label": { "type": "string" }, "kind": { "type": "string", "enum": [ "original", "added" ] }, "deviceHint": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema0" }, "lastUsedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "hasVault": { "type": "boolean" } }, "required": [ "credentialId", "label", "kind", "deviceHint", "createdAt", "lastUsedAt", "hasVault" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L139" }, { "name": "account.addPasskey", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/me/passkeys", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "credentialId": { "type": "string", "minLength": 16, "maxLength": 1024 }, "kind": { "type": "string", "enum": [ "original", "added" ] }, "transports": { "type": "array", "items": { "type": "string", "enum": [ "usb", "nfc", "ble", "internal", "hybrid", "smart-card" ] } }, "label": { "type": "string", "minLength": 1, "maxLength": 80 }, "vault": { "type": "object", "propertyNames": { "$ref": "#/$defs/__schema0" }, "additionalProperties": { "$ref": "#/$defs/__schema1" } }, "confirmationToken": { "type": "string" } }, "required": [ "credentialId", "kind", "transports", "label" ], "$defs": { "__schema0": { "type": "string" }, "__schema1": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "#/$defs/__schema1" } } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "credentialId": { "type": "string" }, "label": { "type": "string" }, "kind": { "type": "string", "enum": [ "original", "added" ] }, "deviceHint": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema0" }, "lastUsedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "hasVault": { "type": "boolean" } }, "required": [ "credentialId", "label", "kind", "deviceHint", "createdAt", "lastUsedAt", "hasVault" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L140" }, { "name": "account.updatePasskey", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/me/passkeys/:credentialId", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "credentialId": { "type": "string", "minLength": 16, "maxLength": 1024 }, "label": { "type": "string", "minLength": 1, "maxLength": 80 } }, "required": [ "credentialId", "label" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "credentialId": { "type": "string" }, "label": { "type": "string" }, "kind": { "type": "string", "enum": [ "original", "added" ] }, "deviceHint": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema0" }, "lastUsedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "hasVault": { "type": "boolean" } }, "required": [ "credentialId", "label", "kind", "deviceHint", "createdAt", "lastUsedAt", "hasVault" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L150" }, { "name": "account.removePasskey", "release": "core", "status": "Core live", "route": { "verb": "DELETE", "path": "/me/passkeys/:credentialId", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "credentialId": { "type": "string", "minLength": 16, "maxLength": 1024 }, "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 } }, "required": [ "credentialId", "confirmationToken" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L154" }, { "name": "account.passkeyVault", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/passkey-vaults/:credentialId", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "credentialId": { "type": "string", "minLength": 16, "maxLength": 1024 } }, "required": [ "credentialId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "propertyNames": { "$ref": "#/$defs/__schema0" }, "additionalProperties": { "$ref": "#/$defs/__schema1" }, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "#/$defs/__schema1" } } ] } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L155" }, { "name": "account.wallets", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/wallets", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "kind": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "derivationIndex": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 4 }, { "type": "null" } ] }, "walletName": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "isPayout": { "type": "boolean" }, "isCurrentSigner": { "type": "boolean" }, "linkedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "address", "kind", "derivationIndex", "walletName", "label", "isPayout", "isCurrentSigner", "linkedAt" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L156" }, { "name": "account.linkWallet", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/me/wallets", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 }, "kind": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "derivationIndex": { "type": "integer", "minimum": 0, "maximum": 4 }, "walletName": { "type": "string", "maxLength": 80 }, "label": { "type": "string", "maxLength": 80 }, "linkSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "nonce": { "type": "string" } }, "required": [ "address", "confirmationToken", "kind", "linkSignature", "nonce" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "kind": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "derivationIndex": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 4 }, { "type": "null" } ] }, "walletName": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "isPayout": { "type": "boolean" }, "isCurrentSigner": { "type": "boolean" }, "linkedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "address", "kind", "derivationIndex", "walletName", "label", "isPayout", "isCurrentSigner", "linkedAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L157" }, { "name": "account.unlinkWallet", "release": "core", "status": "Core live", "route": { "verb": "DELETE", "path": "/me/wallets/:address", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 } }, "required": [ "address", "confirmationToken" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L168" }, { "name": "account.labelWallet", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/me/wallets/:address", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "label": { "type": "string", "maxLength": 80 } }, "required": [ "address", "label" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "kind": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "derivationIndex": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 4 }, { "type": "null" } ] }, "walletName": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "isPayout": { "type": "boolean" }, "isCurrentSigner": { "type": "boolean" }, "linkedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "address", "kind", "derivationIndex", "walletName", "label", "isPayout", "isCurrentSigner", "linkedAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L169" }, { "name": "account.setPayoutAddress", "release": "core", "status": "Core live", "route": { "verb": "PUT", "path": "/me/payout-address", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 } }, "required": [ "address", "confirmationToken" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "kind": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "derivationIndex": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 4 }, { "type": "null" } ] }, "walletName": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "isPayout": { "type": "boolean" }, "isCurrentSigner": { "type": "boolean" }, "linkedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "address", "kind", "derivationIndex", "walletName", "label", "isPayout", "isCurrentSigner", "linkedAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L170" }, { "name": "account.sessions", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/sessions", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "deviceLabel": { "type": "string" }, "method": { "type": "string", "enum": [ "wallet", "passkey", "phrase" ] }, "signedInAt": { "$ref": "#/$defs/__schema0" }, "lastActiveAt": { "$ref": "#/$defs/__schema0" }, "expiresAt": { "$ref": "#/$defs/__schema0" }, "isCurrent": { "type": "boolean" } }, "required": [ "id", "deviceLabel", "method", "signedInAt", "lastActiveAt", "expiresAt", "isCurrent" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L171" }, { "name": "account.revokeSession", "release": "core", "status": "Core live", "route": { "verb": "DELETE", "path": "/me/sessions", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "sessionId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "sessionId" ] }, { "type": "object", "properties": { "scope": { "type": "string", "enum": [ "others", "all" ] } }, "required": [ "scope" ] } ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L172" }, { "name": "account.preferences", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/preferences", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayCurrency": { "type": "string", "enum": [ "SDUSD", "USD", "NGN", "EUR", "GBP" ] }, "theme": { "type": "string", "enum": [ "system", "light", "dark" ] }, "language": { "type": "string", "const": "en" }, "startWorkspace": { "type": "string", "enum": [ "buy", "earn", "sell" ] }, "earnChecklistHidden": { "type": "boolean" }, "sellChecklistHidden": { "type": "boolean" } }, "required": [ "displayCurrency", "theme", "language", "startWorkspace", "earnChecklistHidden" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L179" }, { "name": "account.updatePreferences", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/me/preferences", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayCurrency": { "type": "string", "enum": [ "SDUSD", "USD", "NGN", "EUR", "GBP" ] }, "theme": { "type": "string", "enum": [ "system", "light", "dark" ] }, "language": { "type": "string", "const": "en" }, "startWorkspace": { "type": "string", "enum": [ "buy", "earn", "sell" ] }, "earnChecklistHidden": { "type": "boolean" }, "sellChecklistHidden": { "type": "boolean" } }, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayCurrency": { "type": "string", "enum": [ "SDUSD", "USD", "NGN", "EUR", "GBP" ] }, "theme": { "type": "string", "enum": [ "system", "light", "dark" ] }, "language": { "type": "string", "const": "en" }, "startWorkspace": { "type": "string", "enum": [ "buy", "earn", "sell" ] }, "earnChecklistHidden": { "type": "boolean" }, "sellChecklistHidden": { "type": "boolean" } }, "required": [ "displayCurrency", "theme", "language", "startWorkspace", "earnChecklistHidden" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L180" }, { "name": "account.exportData", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/me/export", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 } }, "required": [ "confirmationToken" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "jobId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "status": { "type": "string", "enum": [ "queued", "running", "ready", "failed" ] }, "url": { "type": [ "string", "null" ] }, "expiresAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "jobId", "status", "url" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L181" }, { "name": "account.deleteAccount", "release": "core", "status": "Core live", "route": { "verb": "DELETE", "path": "/me", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 }, "typedConfirmation": { "type": "string", "const": "delete my account" } }, "required": [ "confirmationToken", "typedConfirmation" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L182" }, { "name": "funding.status", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/funding/status", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "monWei": { "$ref": "#/$defs/__schema0" }, "sdusd": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "sdusdAllowanceToProtocol": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "faucetLimit": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "covers": { "anyOf": [ { "type": "object", "properties": { "createNode": { "type": "boolean" }, "purchase": { "type": "boolean" }, "finalizeSale": { "type": "boolean" }, "claimRewards": { "type": "boolean" } }, "required": [ "createNode", "purchase", "finalizeSale", "claimRewards" ], "additionalProperties": false }, { "type": "null" } ] }, "gas": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "eligible", "sending", "received", "already_received", "balance_sufficient", "device_limit", "station_empty", "wallet_account", "failed", "unavailable", "not_configured" ] }, "dripAmount": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "lastDripAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "lastDripTxHash": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, { "type": "null" } ] }, "nextEligibleAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "state", "dripAmount", "lastDripAt", "lastDripTxHash", "nextEligibleAt" ], "additionalProperties": false } }, "required": [ "monWei", "sdusd", "sdusdAllowanceToProtocol", "blockNumber", "chainId", "faucetLimit", "covers", "gas" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L186" }, { "name": "funding.requestGas", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/funding/gas", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "amount": { "type": "string" } }, "required": [ "txHash", "amount" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L187" }, { "name": "funding.auroraConfig", "release": "core", "status": "Optional — check configuration", "route": { "verb": "GET", "path": "/funding/aurora", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string", "const": "aurora" }, "configured": { "type": "boolean" }, "destinationChainId": { "type": "number", "const": 143 }, "destinationNetwork": { "type": "string", "const": "Monad Mainnet" }, "sources": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } }, "destinations": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "provider", "configured", "destinationChainId", "destinationNetwork", "sources", "destinations" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "assetId": { "type": "string", "minLength": 1, "maxLength": 256 }, "blockchain": { "type": "string", "minLength": 1, "maxLength": 40 }, "networkName": { "type": "string", "minLength": 1, "maxLength": 60 }, "chainId": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "symbol": { "type": "string", "minLength": 1, "maxLength": 30 }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "contractAddress": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] } }, "required": [ "assetId", "blockchain", "networkName", "chainId", "symbol", "decimals", "contractAddress" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L188" }, { "name": "funding.auroraPreview", "release": "core", "status": "Optional — check configuration", "route": { "verb": "POST", "path": "/funding/aurora/preview", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "originAsset": { "type": "string", "minLength": 1, "maxLength": 256 }, "destinationAsset": { "type": "string", "minLength": 1, "maxLength": 256 }, "amount": { "$ref": "#/$defs/__schema0" }, "refundAddress": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "slippageBps": { "default": 50, "type": "integer", "minimum": 10, "maximum": 300 } }, "required": [ "originAsset", "destinationAsset", "amount", "refundAddress" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string", "const": "aurora" }, "destinationChainId": { "type": "number", "const": 143 }, "source": { "$ref": "#/$defs/__schema0" }, "destination": { "$ref": "#/$defs/__schema0" }, "recipient": { "$ref": "#/$defs/__schema1" }, "refundAddress": { "$ref": "#/$defs/__schema1" }, "amountIn": { "$ref": "#/$defs/__schema2" }, "amountOut": { "$ref": "#/$defs/__schema2" }, "minAmountOut": { "$ref": "#/$defs/__schema2" }, "slippageBps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "refundFee": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "withdrawFee": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "timeEstimateSeconds": { "type": "number", "minimum": 0 }, "quotedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "provider", "destinationChainId", "source", "destination", "recipient", "refundAddress", "amountIn", "amountOut", "minAmountOut", "slippageBps", "refundFee", "withdrawFee", "timeEstimateSeconds", "quotedAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "assetId": { "type": "string", "minLength": 1, "maxLength": 256 }, "blockchain": { "type": "string", "minLength": 1, "maxLength": 40 }, "networkName": { "type": "string", "minLength": 1, "maxLength": 60 }, "chainId": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "symbol": { "type": "string", "minLength": 1, "maxLength": 30 }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "contractAddress": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "assetId", "blockchain", "networkName", "chainId", "symbol", "decimals", "contractAddress" ], "additionalProperties": false }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L189" }, { "name": "funding.auroraCreateDeposit", "release": "core", "status": "Optional — check configuration", "route": { "verb": "POST", "path": "/funding/aurora/deposits", "auth": "session", "idempotencyField": "requestId" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "originAsset": { "type": "string", "minLength": 1, "maxLength": 256 }, "destinationAsset": { "type": "string", "minLength": 1, "maxLength": 256 }, "amount": { "$ref": "#/$defs/__schema0" }, "refundAddress": { "$ref": "#/$defs/__schema1" }, "slippageBps": { "default": 50, "type": "integer", "minimum": 10, "maximum": 300 }, "requestId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "acknowledgeMainnet": { "type": "boolean", "const": true }, "expectedRecipient": { "$ref": "#/$defs/__schema1" } }, "required": [ "originAsset", "destinationAsset", "amount", "refundAddress", "requestId", "acknowledgeMainnet", "expectedRecipient" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string", "const": "aurora" }, "destinationChainId": { "type": "number", "const": 143 }, "source": { "$ref": "#/$defs/__schema0" }, "destination": { "$ref": "#/$defs/__schema0" }, "recipient": { "$ref": "#/$defs/__schema1" }, "refundAddress": { "$ref": "#/$defs/__schema1" }, "amountIn": { "$ref": "#/$defs/__schema2" }, "amountOut": { "$ref": "#/$defs/__schema2" }, "minAmountOut": { "$ref": "#/$defs/__schema2" }, "slippageBps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "refundFee": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "withdrawFee": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "timeEstimateSeconds": { "type": "number", "minimum": 0 }, "quotedAt": { "$ref": "#/$defs/__schema3" }, "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "createdAt": { "$ref": "#/$defs/__schema3" }, "depositAddress": { "$ref": "#/$defs/__schema1" }, "deadline": { "$ref": "#/$defs/__schema3" }, "state": { "type": "string", "enum": [ "PENDING_DEPOSIT", "KNOWN_DEPOSIT_TX", "INCOMPLETE_DEPOSIT", "PROCESSING", "SUCCESS", "REFUNDED", "FAILED" ] }, "stateSource": { "type": "string", "const": "aurora" }, "statusAvailable": { "default": true, "type": "boolean" }, "observedAt": { "$ref": "#/$defs/__schema3" }, "destinationTxHashes": { "type": "array", "items": { "type": "string", "pattern": "^0x[\\da-fA-F]{64}$" } }, "confirmation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "verified", "unavailable" ] }, "txHash": { "anyOf": [ { "type": "string", "pattern": "^0x[\\da-fA-F]{64}$" }, { "type": "null" } ] }, "blockNumber": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "state", "txHash", "blockNumber" ], "additionalProperties": false } }, "required": [ "provider", "destinationChainId", "source", "destination", "recipient", "refundAddress", "amountIn", "amountOut", "minAmountOut", "slippageBps", "refundFee", "withdrawFee", "timeEstimateSeconds", "quotedAt", "id", "createdAt", "depositAddress", "deadline", "state", "stateSource", "statusAvailable", "observedAt", "destinationTxHashes", "confirmation" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "assetId": { "type": "string", "minLength": 1, "maxLength": 256 }, "blockchain": { "type": "string", "minLength": 1, "maxLength": 40 }, "networkName": { "type": "string", "minLength": 1, "maxLength": 60 }, "chainId": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "symbol": { "type": "string", "minLength": 1, "maxLength": 30 }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "contractAddress": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "assetId", "blockchain", "networkName", "chainId", "symbol", "decimals", "contractAddress" ], "additionalProperties": false }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L190" }, { "name": "funding.auroraDeposit", "release": "core", "status": "Optional — check configuration", "route": { "verb": "GET", "path": "/funding/aurora/deposits/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string", "const": "aurora" }, "destinationChainId": { "type": "number", "const": 143 }, "source": { "$ref": "#/$defs/__schema0" }, "destination": { "$ref": "#/$defs/__schema0" }, "recipient": { "$ref": "#/$defs/__schema1" }, "refundAddress": { "$ref": "#/$defs/__schema1" }, "amountIn": { "$ref": "#/$defs/__schema2" }, "amountOut": { "$ref": "#/$defs/__schema2" }, "minAmountOut": { "$ref": "#/$defs/__schema2" }, "slippageBps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "refundFee": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "withdrawFee": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "timeEstimateSeconds": { "type": "number", "minimum": 0 }, "quotedAt": { "$ref": "#/$defs/__schema3" }, "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "createdAt": { "$ref": "#/$defs/__schema3" }, "depositAddress": { "$ref": "#/$defs/__schema1" }, "deadline": { "$ref": "#/$defs/__schema3" }, "state": { "type": "string", "enum": [ "PENDING_DEPOSIT", "KNOWN_DEPOSIT_TX", "INCOMPLETE_DEPOSIT", "PROCESSING", "SUCCESS", "REFUNDED", "FAILED" ] }, "stateSource": { "type": "string", "const": "aurora" }, "statusAvailable": { "default": true, "type": "boolean" }, "observedAt": { "$ref": "#/$defs/__schema3" }, "destinationTxHashes": { "type": "array", "items": { "type": "string", "pattern": "^0x[\\da-fA-F]{64}$" } }, "confirmation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "pending", "verified", "unavailable" ] }, "txHash": { "anyOf": [ { "type": "string", "pattern": "^0x[\\da-fA-F]{64}$" }, { "type": "null" } ] }, "blockNumber": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "state", "txHash", "blockNumber" ], "additionalProperties": false } }, "required": [ "provider", "destinationChainId", "source", "destination", "recipient", "refundAddress", "amountIn", "amountOut", "minAmountOut", "slippageBps", "refundFee", "withdrawFee", "timeEstimateSeconds", "quotedAt", "id", "createdAt", "depositAddress", "deadline", "state", "stateSource", "statusAvailable", "observedAt", "destinationTxHashes", "confirmation" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "assetId": { "type": "string", "minLength": 1, "maxLength": 256 }, "blockchain": { "type": "string", "minLength": 1, "maxLength": 40 }, "networkName": { "type": "string", "minLength": 1, "maxLength": 60 }, "chainId": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "symbol": { "type": "string", "minLength": 1, "maxLength": 30 }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "contractAddress": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "assetId", "blockchain", "networkName", "chainId", "symbol", "decimals", "contractAddress" ], "additionalProperties": false }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L191" }, { "name": "notifications.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/notifications", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "unreadOnly": { "type": "boolean" }, "category": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "kind": { "type": "string", "pattern": "^[a-z][\\w]*\\.[a-z][\\w]*$" }, "category": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "amount": { "type": "string" }, "href": { "type": "string" }, "workspace": { "type": "string", "enum": [ "earn", "sell", "account" ] }, "readAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema0" } }, "required": [ "id", "kind", "category", "title", "body", "href", "workspace", "readAt", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L192" }, { "name": "notifications.markRead", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/me/notifications/read", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "ids" ] }, { "type": "object", "properties": { "all": { "type": "boolean", "const": true } }, "required": [ "all" ] } ], "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L196" }, { "name": "notifications.preferences", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/notification-preferences", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "sales": { "default": true, "type": "boolean" }, "earnings": { "default": true, "type": "boolean" }, "campaigns": { "default": true, "type": "boolean" }, "invitations": { "default": true, "type": "boolean" }, "account": { "default": true, "type": "boolean" }, "toastsEnabled": { "default": true, "type": "boolean" } }, "required": [ "sales", "earnings", "campaigns", "invitations", "account", "toastsEnabled" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L203" }, { "name": "notifications.updatePreferences", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/me/notification-preferences", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "sales": { "default": true, "type": "boolean" }, "earnings": { "default": true, "type": "boolean" }, "campaigns": { "default": true, "type": "boolean" }, "invitations": { "default": true, "type": "boolean" }, "account": { "default": true, "type": "boolean" }, "toastsEnabled": { "default": true, "type": "boolean" } }, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "sales": { "default": true, "type": "boolean" }, "earnings": { "default": true, "type": "boolean" }, "campaigns": { "default": true, "type": "boolean" }, "invitations": { "default": true, "type": "boolean" }, "account": { "default": true, "type": "boolean" }, "toastsEnabled": { "default": true, "type": "boolean" } }, "required": [ "sales", "earnings", "campaigns", "invitations", "account", "toastsEnabled" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L204" }, { "name": "campaigns.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "q": { "type": "string", "maxLength": 200 }, "category": { "type": "string" }, "rateMin": { "type": "integer", "minimum": 1, "maximum": 10000 }, "rateMax": { "type": "integer", "minimum": 1, "maximum": 10000 }, "levels": { "type": "integer", "minimum": 1, "maximum": 5 }, "holdMax": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "budgetLeftMin": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "source": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "invitationOnly": { "type": "boolean" }, "excludeJoined": { "type": "boolean" }, "status": { "type": "string", "enum": [ "active", "not_live", "paused", "ended", "expired" ] }, "merchant": { "type": "string" }, "sort": { "type": "string", "enum": [ "balanced", "newest", "reward", "budget", "hold" ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "merchant": { "type": "object", "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema1" } }, "required": [ "name", "slug", "address" ], "additionalProperties": false }, "product": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema2" }, "title": { "type": "string" }, "summary": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema2" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "category": { "type": "string" } }, "required": [ "id", "title", "summary", "media", "category" ], "additionalProperties": false }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema1" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "price": { "$ref": "#/$defs/__schema0" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema1" }, "commissionBps": { "type": "integer", "minimum": 1, "maximum": 10000 }, "perSaleCap": { "$ref": "#/$defs/__schema0" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema0" }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 5 }, "weightsBps": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "shortPathMode": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "holdSeconds": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "expiry": { "$ref": "#/$defs/__schema0" }, "eligibilityHash": { "$ref": "#/$defs/__schema4" }, "policyHash": { "$ref": "#/$defs/__schema4" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveAt": { "$ref": "#/$defs/__schema5" }, "regions": { "type": "array", "items": { "type": "string" } }, "sharingRules": { "type": "array", "items": { "type": "string" } }, "registrationTx": { "anyOf": [ { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema4" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema5" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] }, "salesCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash", "policyHash", "version", "effectiveAt", "regions", "sharingRules" ], "additionalProperties": false }, "rewardAvailable": { "$ref": "#/$defs/__schema0" }, "rewardTotal": { "$ref": "#/$defs/__schema0" }, "settledSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "onchainUrl": { "type": "string", "format": "uri" }, "rankReasons": { "type": "array", "items": { "type": "string" } }, "inviteOnly": { "type": "boolean" }, "endsAt": { "$ref": "#/$defs/__schema5" } }, "required": [ "campaignId", "chainId", "contractAddress", "state", "merchant", "product", "token", "price", "policy", "rewardAvailable", "rewardTotal", "settledSales", "onchainUrl", "rankReasons" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] }, "total": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "items", "nextCursor", "total" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema3": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema4": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema5": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L208" }, { "name": "campaigns.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "required": [ "campaignId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema2" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "merchant": { "type": "object", "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema2" } }, "required": [ "name", "slug", "address" ], "additionalProperties": false }, "product": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema3" }, "merchantId": { "$ref": "#/$defs/__schema3" }, "title": { "type": "string" }, "summary": { "type": "string" }, "outcome": { "type": "string" }, "description": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema3" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" }, "token": { "$ref": "#/$defs/__schema4" }, "category": { "type": "string" }, "fulfillmentMode": { "type": "string", "enum": [ "download", "external", "manual" ] }, "deliverable": { "type": "string", "minLength": 1, "maxLength": 2048 }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "skuHash": { "$ref": "#/$defs/__schema5" }, "refundPolicy": { "type": "string" }, "variants": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema3" }, "name": { "type": "string" }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "name", "priceBaseUnits" ], "additionalProperties": false } }, "billingPeriod": { "anyOf": [ { "type": "string", "enum": [ "monthly", "yearly" ] }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "draft", "ready", "archived" ] }, "missing": { "type": "array", "items": { "type": "string", "enum": [ "title", "outcome", "description", "category", "cover", "coverAlt", "price", "deliverable" ] } }, "coverUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "coverAlt": { "type": [ "string", "null" ] }, "accessTiming": { "type": "string", "enum": [ "afterPurchase", "afterHold" ] }, "liveCampaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "usedBy": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "name": { "type": "string" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "productVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "name", "state", "productVersion" ], "additionalProperties": false } }, "updatedAt": { "$ref": "#/$defs/__schema6" } }, "required": [ "id", "merchantId", "title", "summary", "outcome", "description", "media", "priceBaseUnits", "token", "category", "fulfillmentMode", "version", "skuHash", "refundPolicy", "variants", "billingPeriod" ], "additionalProperties": false }, "token": { "$ref": "#/$defs/__schema4" }, "price": { "$ref": "#/$defs/__schema1" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema2" }, "commissionBps": { "type": "integer", "minimum": 1, "maximum": 10000 }, "perSaleCap": { "$ref": "#/$defs/__schema1" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema1" }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 5 }, "weightsBps": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema7" } }, "shortPathMode": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "holdSeconds": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "expiry": { "$ref": "#/$defs/__schema1" }, "eligibilityHash": { "$ref": "#/$defs/__schema5" }, "policyHash": { "$ref": "#/$defs/__schema5" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveAt": { "$ref": "#/$defs/__schema6" }, "regions": { "type": "array", "items": { "type": "string" } }, "sharingRules": { "type": "array", "items": { "type": "string" } }, "registrationTx": { "anyOf": [ { "$ref": "#/$defs/__schema8" }, { "type": "null" } ] }, "salesCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash", "policyHash", "version", "effectiveAt", "regions", "sharingRules" ], "additionalProperties": false }, "rewardAvailable": { "$ref": "#/$defs/__schema1" }, "rewardTotal": { "$ref": "#/$defs/__schema1" }, "settledSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "onchainUrl": { "type": "string", "format": "uri" }, "rankReasons": { "type": "array", "items": { "type": "string" } }, "inviteOnly": { "type": "boolean" }, "endsAt": { "$ref": "#/$defs/__schema6" }, "rewardLedger": { "type": "object", "properties": { "netDeposited": { "$ref": "#/$defs/__schema1" }, "available": { "$ref": "#/$defs/__schema1" }, "pendingReserved": { "$ref": "#/$defs/__schema1" }, "vestedUnclaimed": { "$ref": "#/$defs/__schema1" }, "rewardsClaimed": { "$ref": "#/$defs/__schema1" }, "surplusWithdrawn": { "$ref": "#/$defs/__schema1" } }, "required": [ "netDeposited", "available", "pendingReserved", "vestedUnclaimed", "rewardsClaimed", "surplusWithdrawn" ], "additionalProperties": false }, "proceedsLedger": { "type": "object", "properties": { "proceedsPending": { "$ref": "#/$defs/__schema1" }, "proceedsClaimable": { "$ref": "#/$defs/__schema1" }, "proceedsClaimed": { "$ref": "#/$defs/__schema1" }, "buyerRefunded": { "$ref": "#/$defs/__schema1" } }, "required": [ "proceedsPending", "proceedsClaimable", "proceedsClaimed", "buyerRefunded" ], "additionalProperties": false }, "startsAt": { "$ref": "#/$defs/__schema6" }, "counts": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "nodeCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "moderation": { "type": "object", "properties": { "hidden": { "type": "boolean" }, "reason": { "type": [ "string", "null" ] } }, "required": [ "hidden", "reason" ], "additionalProperties": false }, "capacity": { "type": "object", "properties": { "nodes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "nodes", "sales" ], "additionalProperties": false }, "trustMode": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "creationTx": { "$ref": "#/$defs/__schema8" }, "fundingTxs": { "type": "array", "items": { "$ref": "#/$defs/__schema8" } }, "indexedAt": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "metadataHash": { "$ref": "#/$defs/__schema5" } }, "required": [ "campaignId", "chainId", "contractAddress", "state", "merchant", "product", "token", "price", "policy", "rewardAvailable", "rewardTotal", "settledSales", "onchainUrl", "rankReasons", "inviteOnly", "endsAt", "rewardLedger", "proceedsLedger", "startsAt", "counts", "nodeCount", "moderation", "capacity", "trustMode", "creationTx", "fundingTxs", "indexedAt" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema3": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema4": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "__schema5": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema6": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema7": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema8": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema5" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema6" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L212" }, { "name": "campaigns.policy", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/policy", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "required": [ "campaignId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "current": { "$ref": "#/$defs/__schema0" }, "scheduled": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "history": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "current", "scheduled", "history" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "rewardToken": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "commissionBps": { "type": "integer", "minimum": 1, "maximum": 10000 }, "perSaleCap": { "$ref": "#/$defs/__schema1" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema1" }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 5 }, "weightsBps": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema2" } }, "shortPathMode": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "holdSeconds": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "expiry": { "$ref": "#/$defs/__schema1" }, "eligibilityHash": { "$ref": "#/$defs/__schema3" }, "policyHash": { "$ref": "#/$defs/__schema3" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveAt": { "$ref": "#/$defs/__schema4" }, "regions": { "type": "array", "items": { "type": "string" } }, "sharingRules": { "type": "array", "items": { "type": "string" } }, "registrationTx": { "anyOf": [ { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema3" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema4" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] }, "salesCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash", "policyHash", "version", "effectiveAt", "regions", "sharingRules" ], "additionalProperties": false }, "__schema1": { "type": "string" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema4": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L213" }, { "name": "campaigns.stats", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/stats", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "required": [ "campaignId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "branches": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "deepestLevel": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "settledValue": { "$ref": "#/$defs/__schema0" }, "reservedRewards": { "$ref": "#/$defs/__schema0" }, "depthMix": { "type": "array", "items": { "type": "object", "properties": { "level": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "sales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "level", "sales" ], "additionalProperties": false } } }, "required": [ "links", "branches", "deepestLevel", "sales", "settledValue", "reservedRewards", "depthMix" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L214" }, { "name": "campaigns.activity", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/activity", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "kinds": { "type": "array", "items": { "type": "string" } } }, "required": [ "campaignId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "salePending", "saleSettled", "saleRefunded", "saleFinalized", "linkCreated", "claimed", "funded", "paused", "resumed", "ended", "termsPublished" ] }, "actor": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "amount": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "tx": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema1" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, "at": { "$ref": "#/$defs/__schema1" }, "saleId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "required": [ "kind", "actor", "amount", "tx", "at" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L215" }, { "name": "campaigns.mine", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/campaigns", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "q": { "type": "string", "maxLength": 200 }, "category": { "type": "string" }, "rateMin": { "type": "integer", "minimum": 1, "maximum": 10000 }, "rateMax": { "type": "integer", "minimum": 1, "maximum": 10000 }, "levels": { "type": "integer", "minimum": 1, "maximum": 5 }, "holdMax": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "budgetLeftMin": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "source": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "invitationOnly": { "type": "boolean" }, "excludeJoined": { "type": "boolean" }, "status": { "type": "string", "enum": [ "active", "not_live", "paused", "ended", "expired", "draft" ] }, "merchant": { "type": "string" }, "sort": { "type": "string", "enum": [ "balanced", "newest", "reward", "budget", "hold" ] }, "eligibility": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, { "type": "null" } ] }, "draftId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "state": { "type": "string" }, "productTitle": { "type": "string" }, "rewardPerSale": { "$ref": "#/$defs/__schema0" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema2" }, "commissionBps": { "$ref": "#/$defs/__schema3" }, "perSaleCap": { "$ref": "#/$defs/__schema0" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema0" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema0" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "source": { "type": "string" }, "trustMode": { "type": "string" }, "eligibility": { "type": "string" }, "availableRewards": { "$ref": "#/$defs/__schema0" }, "pendingSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "proceedsClaimable": { "$ref": "#/$defs/__schema0" }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "endsAt": { "$ref": "#/$defs/__schema10" }, "scheduledPolicyHash": { "anyOf": [ { "$ref": "#/$defs/__schema9" }, { "type": "null" } ] }, "productId": { "$ref": "#/$defs/__schema1" }, "name": { "type": "string" }, "savedAt": { "$ref": "#/$defs/__schema10" }, "stepReached": { "type": "integer", "minimum": 0, "maximum": 5 }, "settledValue": { "$ref": "#/$defs/__schema0" }, "updatedAt": { "$ref": "#/$defs/__schema10" } }, "required": [ "campaignId", "draftId", "state", "productTitle", "rewardPerSale", "policy", "source", "trustMode", "eligibility", "availableRewards", "pendingSales", "proceedsClaimable", "sales", "links", "budgetAlertSales", "endsAt", "scheduledPolicyHash" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] }, "countsByState": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "required": [ "items", "nextCursor", "countsByState" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema3": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema10": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L216" }, { "name": "campaigns.saveDraft", "release": "core", "status": "Core live", "route": { "verb": "PUT", "path": "/merchant/campaign-drafts/:id", "auth": "session", "payload": "draft" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "draft": { "type": "object", "properties": { "productId": { "$ref": "#/$defs/__schema1" }, "productVersion": { "$ref": "#/$defs/__schema2" }, "policy": { "$ref": "#/$defs/__schema3" }, "endsAt": { "$ref": "#/$defs/__schema13" }, "inviteOnly": { "$ref": "#/$defs/__schema14" }, "stepReached": { "$ref": "#/$defs/__schema15" }, "version": { "$ref": "#/$defs/__schema16" }, "mode": { "$ref": "#/$defs/__schema17" }, "campaignId": { "$ref": "#/$defs/__schema18" }, "effectiveAt": { "$ref": "#/$defs/__schema19" }, "name": { "$ref": "#/$defs/__schema20" }, "deposit": { "$ref": "#/$defs/__schema21" }, "budgetAlertSales": { "$ref": "#/$defs/__schema22" }, "endPreset": { "$ref": "#/$defs/__schema23" }, "refundTerms": { "$ref": "#/$defs/__schema24" }, "regions": { "$ref": "#/$defs/__schema25" }, "disclosure": { "$ref": "#/$defs/__schema27" }, "cohort": { "$ref": "#/$defs/__schema28" }, "templateId": { "$ref": "#/$defs/__schema29" } }, "required": [ "policy", "endsAt", "stepReached", "version", "mode" ], "additionalProperties": false } }, "required": [ "id", "draft" ], "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "$ref": "#/$defs/__schema0" }, "__schema2": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "__schema3": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema4" }, "commissionBps": { "$ref": "#/$defs/__schema5" }, "perSaleCap": { "$ref": "#/$defs/__schema6" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema6" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema7" }, "weightsBps": { "$ref": "#/$defs/__schema8" }, "shortPathMode": { "$ref": "#/$defs/__schema10" }, "holdSeconds": { "$ref": "#/$defs/__schema11" }, "expiry": { "$ref": "#/$defs/__schema6" }, "eligibilityHash": { "$ref": "#/$defs/__schema12" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "__schema4": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema5": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema6": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "__schema7": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema8": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema9" } }, "__schema9": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema10": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema11": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema12": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema13": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema14": { "default": false, "type": "boolean" }, "__schema15": { "type": "integer", "minimum": 0, "maximum": 5 }, "__schema16": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "__schema17": { "type": "string", "enum": [ "create", "newVersion" ] }, "__schema18": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema19": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema20": { "type": "string", "maxLength": 80 }, "__schema21": { "$ref": "#/$defs/__schema6" }, "__schema22": { "type": "integer", "minimum": 1, "maximum": 50 }, "__schema23": { "type": "string", "enum": [ "30d", "90d", "180d", "365d", "custom" ] }, "__schema24": { "type": "string", "maxLength": 500 }, "__schema25": { "maxItems": 250, "type": "array", "items": { "$ref": "#/$defs/__schema26" } }, "__schema26": { "type": "string", "pattern": "^[A-Z]{2}$" }, "__schema27": { "type": "string", "maxLength": 280 }, "__schema28": { "maxItems": 200, "type": "array", "items": { "$ref": "#/$defs/__schema4" } }, "__schema29": { "$ref": "#/$defs/__schema0" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "draftId": { "$ref": "#/$defs/__schema0" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "savedAt": { "$ref": "#/$defs/__schema1" }, "stepReached": { "type": "integer", "minimum": 0, "maximum": 5 }, "mode": { "type": "string", "enum": [ "create", "newVersion" ] }, "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "productId": { "$ref": "#/$defs/__schema0" }, "productVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema3" }, "commissionBps": { "$ref": "#/$defs/__schema4" }, "perSaleCap": { "$ref": "#/$defs/__schema2" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema2" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema5" }, "weightsBps": { "$ref": "#/$defs/__schema6" }, "shortPathMode": { "$ref": "#/$defs/__schema8" }, "holdSeconds": { "$ref": "#/$defs/__schema9" }, "expiry": { "$ref": "#/$defs/__schema2" }, "eligibilityHash": { "$ref": "#/$defs/__schema10" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "endsAt": { "$ref": "#/$defs/__schema1" }, "effectiveAt": { "$ref": "#/$defs/__schema1" }, "inviteOnly": { "type": "boolean" }, "name": { "type": "string" }, "deposit": { "$ref": "#/$defs/__schema2" }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "endPreset": { "type": "string", "enum": [ "30d", "90d", "180d", "365d", "custom" ] }, "refundTerms": { "type": "string" }, "regions": { "type": "array", "items": { "type": "string" } }, "disclosure": { "type": "string" }, "cohort": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "templateId": { "$ref": "#/$defs/__schema0" } }, "required": [ "draftId", "version", "savedAt", "stepReached", "mode", "productId", "productVersion", "policy", "endsAt", "inviteOnly" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema5": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema6": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema7" } }, "__schema7": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema8": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema9": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema10": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L222" }, { "name": "campaigns.getDraft", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/campaign-drafts/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "draftId": { "$ref": "#/$defs/__schema0" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "savedAt": { "$ref": "#/$defs/__schema1" }, "stepReached": { "type": "integer", "minimum": 0, "maximum": 5 }, "mode": { "type": "string", "enum": [ "create", "newVersion" ] }, "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "productId": { "$ref": "#/$defs/__schema0" }, "productVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema3" }, "commissionBps": { "$ref": "#/$defs/__schema4" }, "perSaleCap": { "$ref": "#/$defs/__schema2" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema2" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema5" }, "weightsBps": { "$ref": "#/$defs/__schema6" }, "shortPathMode": { "$ref": "#/$defs/__schema8" }, "holdSeconds": { "$ref": "#/$defs/__schema9" }, "expiry": { "$ref": "#/$defs/__schema2" }, "eligibilityHash": { "$ref": "#/$defs/__schema10" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "endsAt": { "$ref": "#/$defs/__schema1" }, "effectiveAt": { "$ref": "#/$defs/__schema1" }, "inviteOnly": { "type": "boolean" }, "name": { "type": "string" }, "deposit": { "$ref": "#/$defs/__schema2" }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "endPreset": { "type": "string", "enum": [ "30d", "90d", "180d", "365d", "custom" ] }, "refundTerms": { "type": "string" }, "regions": { "type": "array", "items": { "type": "string" } }, "disclosure": { "type": "string" }, "cohort": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "templateId": { "$ref": "#/$defs/__schema0" } }, "required": [ "draftId", "version", "savedAt", "stepReached", "mode", "productId", "productVersion", "policy", "endsAt", "inviteOnly" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema5": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema6": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema7" } }, "__schema7": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema8": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema9": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema10": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L223" }, { "name": "campaigns.deleteDraft", "release": "core", "status": "Core live", "route": { "verb": "DELETE", "path": "/merchant/campaign-drafts/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "deleted": { "type": "boolean", "const": true } }, "required": [ "deleted" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L224" }, { "name": "campaigns.prepareCreate", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/campaign-drafts/:id/prepare", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "metadataHash": { "$ref": "#/$defs/__schema0" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema1" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema0" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "policyHash": { "$ref": "#/$defs/__schema0" }, "eligibilityHash": { "$ref": "#/$defs/__schema0" }, "productVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "gasEstimate": { "anyOf": [ { "$ref": "#/$defs/__schema3" }, { "type": "null" } ] }, "expectedEvents": { "type": "array", "items": { "type": "string" } }, "cohortEnforcement": { "type": "string", "enum": [ "onchain", "offchain" ] }, "mode": { "type": "string", "enum": [ "create", "newVersion" ] }, "config": { "type": "object", "properties": { "skuHash": { "$ref": "#/$defs/__schema0" }, "skuPrice": { "$ref": "#/$defs/__schema3" } }, "required": [ "skuHash", "skuPrice" ], "additionalProperties": false }, "earliestEffectiveAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "diff": { "type": "array", "items": { "type": "object", "properties": { "field": { "type": "string" }, "before": { "$ref": "#/$defs/__schema9" }, "after": { "$ref": "#/$defs/__schema10" } }, "required": [ "field", "before", "after" ], "additionalProperties": false } } }, "required": [ "metadataHash", "policy", "policyHash", "eligibilityHash", "productVersion", "gasEstimate", "expectedEvents", "cohortEnforcement", "mode" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "array", "items": { "$ref": "#/$defs/__schema9" } }, { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "#/$defs/__schema9" } } ] }, "__schema10": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "array", "items": { "$ref": "#/$defs/__schema10" } }, { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "#/$defs/__schema10" } } ] } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L225" }, { "name": "campaigns.updateSettings", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/merchant/campaigns/:campaignId/settings", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "campaignId", "budgetAlertSales" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "budgetAlertSales" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L226" }, { "name": "campaigns.distributors", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/campaigns/:campaignId/distributors", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "sort": { "type": "string" } }, "required": [ "campaignId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "handle": { "type": [ "string", "null" ] }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "linkCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "descendants": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "directSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "paidSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "rewards": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema1" }, "readyToFinalize": { "$ref": "#/$defs/__schema1" }, "claimable": { "$ref": "#/$defs/__schema1" }, "claimed": { "$ref": "#/$defs/__schema1" }, "refunded": { "$ref": "#/$defs/__schema1" }, "reversed": { "$ref": "#/$defs/__schema1" } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed" ], "additionalProperties": false }, "lastActivityAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "invitationStatus": { "type": [ "string", "null" ] } }, "required": [ "address", "handle", "parentNodeId", "nodeId", "linkCount", "descendants", "directSales", "paidSales", "rewards", "lastActivityAt", "invitationStatus" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L230" }, { "name": "products.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/products", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "billing": { "type": "string", "enum": [ "oneTime", "subscription" ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "title": { "type": "string" }, "summary": { "type": "string" }, "outcome": { "type": "string" }, "description": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "category": { "type": "string" }, "fulfillmentMode": { "type": "string", "enum": [ "download", "external", "manual" ] }, "deliverable": { "type": "string", "minLength": 1, "maxLength": 2048 }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "skuHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "refundPolicy": { "type": "string" }, "variants": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "name": { "type": "string" }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "name", "priceBaseUnits" ], "additionalProperties": false } }, "billingPeriod": { "anyOf": [ { "type": "string", "enum": [ "monthly", "yearly" ] }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "draft", "ready", "archived" ] }, "missing": { "type": "array", "items": { "type": "string", "enum": [ "title", "outcome", "description", "category", "cover", "coverAlt", "price", "deliverable" ] } }, "coverUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "coverAlt": { "type": [ "string", "null" ] }, "accessTiming": { "type": "string", "enum": [ "afterPurchase", "afterHold" ] }, "liveCampaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "usedBy": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "name": { "type": "string" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "productVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "name", "state", "productVersion" ], "additionalProperties": false } }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "merchantId", "title", "summary", "outcome", "description", "media", "priceBaseUnits", "token", "category", "fulfillmentMode", "version", "skuHash", "refundPolicy", "variants", "billingPeriod" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L234" }, { "name": "products.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/products/:id", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "title": { "type": "string" }, "summary": { "type": "string" }, "outcome": { "type": "string" }, "description": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "category": { "type": "string" }, "fulfillmentMode": { "type": "string", "enum": [ "download", "external", "manual" ] }, "deliverable": { "type": "string", "minLength": 1, "maxLength": 2048 }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "skuHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "refundPolicy": { "type": "string" }, "variants": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "name": { "type": "string" }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "name", "priceBaseUnits" ], "additionalProperties": false } }, "billingPeriod": { "anyOf": [ { "type": "string", "enum": [ "monthly", "yearly" ] }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "draft", "ready", "archived" ] }, "missing": { "type": "array", "items": { "type": "string", "enum": [ "title", "outcome", "description", "category", "cover", "coverAlt", "price", "deliverable" ] } }, "coverUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "coverAlt": { "type": [ "string", "null" ] }, "accessTiming": { "type": "string", "enum": [ "afterPurchase", "afterHold" ] }, "liveCampaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "usedBy": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "name": { "type": "string" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "productVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "name", "state", "productVersion" ], "additionalProperties": false } }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "merchantId", "title", "summary", "outcome", "description", "media", "priceBaseUnits", "token", "category", "fulfillmentMode", "version", "skuHash", "refundPolicy", "variants", "billingPeriod" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L238" }, { "name": "products.save", "release": "core", "status": "Core live", "route": { "verb": "PUT", "path": "/merchant/products/:id", "auth": "session", "payload": "product" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "product": { "type": "object", "properties": { "merchantId": { "$ref": "#/$defs/__schema0" }, "title": { "type": "string", "minLength": 2, "maxLength": 150 }, "summary": { "type": "string", "maxLength": 300 }, "outcome": { "default": "", "type": "string", "maxLength": 500 }, "description": { "type": "string", "maxLength": 15000 }, "category": { "type": "string", "enum": [ "digital", "education", "software", "design", "other" ] }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" }, "token": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "images": { "default": [], "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema2" } }, "fulfillmentMode": { "type": "string", "enum": [ "download", "external", "manual" ] }, "deliverable": { "type": "string", "minLength": 1, "maxLength": 2048 }, "refundPolicy": { "type": "string", "minLength": 10, "maxLength": 3000 }, "coverAlt": { "type": "string", "maxLength": 140 }, "accessTiming": { "type": "string", "enum": [ "afterPurchase", "afterHold" ] }, "status": { "type": "string", "enum": [ "draft", "ready", "archived" ] } }, "required": [ "title", "summary", "description", "category", "priceBaseUnits", "token", "fulfillmentMode", "deliverable", "refundPolicy" ], "additionalProperties": false } }, "required": [ "id", "product" ], "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "__schema2": { "type": "string", "format": "uri" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "title": { "type": "string" }, "summary": { "type": "string" }, "outcome": { "type": "string" }, "description": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "category": { "type": "string" }, "fulfillmentMode": { "type": "string", "enum": [ "download", "external", "manual" ] }, "deliverable": { "type": "string", "minLength": 1, "maxLength": 2048 }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "skuHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "refundPolicy": { "type": "string" }, "variants": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "name": { "type": "string" }, "priceBaseUnits": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "name", "priceBaseUnits" ], "additionalProperties": false } }, "billingPeriod": { "anyOf": [ { "type": "string", "enum": [ "monthly", "yearly" ] }, { "type": "null" } ] }, "status": { "type": "string", "enum": [ "draft", "ready", "archived" ] }, "missing": { "type": "array", "items": { "type": "string", "enum": [ "title", "outcome", "description", "category", "cover", "coverAlt", "price", "deliverable" ] } }, "coverUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "coverAlt": { "type": [ "string", "null" ] }, "accessTiming": { "type": "string", "enum": [ "afterPurchase", "afterHold" ] }, "liveCampaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "usedBy": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "name": { "type": "string" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "productVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "name", "state", "productVersion" ], "additionalProperties": false } }, "updatedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "merchantId", "title", "summary", "outcome", "description", "media", "priceBaseUnits", "token", "category", "fulfillmentMode", "version", "skuHash", "refundPolicy", "variants", "billingPeriod" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L239" }, { "name": "products.uploadAsset", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/products/:id/assets", "auth": "session", "multipart": true }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "file": { "type": "string", "format": "binary", "contentEncoding": "binary", "maxLength": 25000000 } }, "required": [ "id", "file" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L240" }, { "name": "products.categories", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/categories", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L241" }, { "name": "merchants.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchants/:slug", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "slug": { "type": "string" } }, "required": [ "slug" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "description": { "type": "string" }, "logo": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "verificationTier": { "type": "string", "enum": [ "unverified", "domain", "business" ] }, "joinedAt": { "$ref": "#/$defs/__schema0" }, "offersCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "closedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "category": { "type": [ "string", "null" ] }, "categories": { "type": "array", "items": { "type": "string" } }, "supportEmail": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "moderation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema0" }, "action": { "type": "string" }, "reasonCategory": { "type": "string" } }, "required": [ "at", "action", "reasonCategory" ], "additionalProperties": false } } }, "required": [ "state", "actions" ], "additionalProperties": false } }, "required": [ "id", "name", "slug", "address", "description", "logo", "website", "verificationTier", "joinedAt", "offersCount", "closedAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L242" }, { "name": "merchants.record", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchants/:slug/record", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "slug": { "type": "string" } }, "required": [ "slug" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "refundRateBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "medianRefundSeconds": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "rewardsDeposited": { "$ref": "#/$defs/__schema0" }, "rewardsEarned": { "$ref": "#/$defs/__schema0" }, "rewardsWithdrawn": { "$ref": "#/$defs/__schema0" }, "indexedBlock": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] } }, "required": [ "sales", "refundRateBps", "medianRefundSeconds", "rewardsDeposited", "rewardsEarned", "rewardsWithdrawn", "indexedBlock" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L243" }, { "name": "merchants.me", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema0" }, "description": { "type": "string" }, "logo": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "verificationTier": { "type": "string", "enum": [ "unverified", "domain", "business" ] }, "joinedAt": { "$ref": "#/$defs/__schema1" }, "offersCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "closedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "category": { "type": [ "string", "null" ] }, "categories": { "type": "array", "items": { "type": "string" } }, "supportEmail": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "moderation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema1" }, "action": { "type": "string" }, "reasonCategory": { "type": "string" } }, "required": [ "at", "action", "reasonCategory" ], "additionalProperties": false } } }, "required": [ "state", "actions" ], "additionalProperties": false }, "region": { "type": "string" }, "defaults": { "anyOf": [ { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema0" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, { "type": "null" } ] }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "agreement": { "type": "object", "properties": { "version": { "type": "string" }, "publishedAt": { "$ref": "#/$defs/__schema1" }, "url": { "type": "string", "format": "uri" }, "acceptedAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "version", "publishedAt", "url", "acceptedAt" ], "additionalProperties": false }, "businessWallet": { "$ref": "#/$defs/__schema0" }, "showSupportEmail": { "type": "boolean" } }, "required": [ "id", "name", "slug", "address", "description", "logo", "website", "verificationTier", "joinedAt", "offersCount", "closedAt", "supportEmail", "region", "defaults", "budgetAlertSales", "agreement", "businessWallet" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L244" }, { "name": "merchants.setup", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 2, "maxLength": 100 }, "slug": { "type": "string", "minLength": 3, "maxLength": 30, "pattern": "^[a-z][a-z0-9_]+$" }, "description": { "default": "", "type": "string", "maxLength": 2000 }, "website": { "default": null, "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "supportEmail": { "type": "string", "maxLength": 200, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "region": { "type": "string", "minLength": 2, "maxLength": 80 }, "agreementVersion": { "type": "string", "const": "1.0" }, "budgetAlertSales": { "default": 5, "type": "integer", "minimum": 1, "maximum": 50 }, "logo": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "category": { "type": "string", "enum": [ "digital", "education", "software", "design", "other" ] }, "showSupportEmail": { "type": "boolean" } }, "required": [ "name", "slug", "supportEmail", "region", "agreementVersion" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "uri" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema0" }, "description": { "type": "string" }, "logo": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "verificationTier": { "type": "string", "enum": [ "unverified", "domain", "business" ] }, "joinedAt": { "$ref": "#/$defs/__schema1" }, "offersCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "closedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "category": { "type": [ "string", "null" ] }, "categories": { "type": "array", "items": { "type": "string" } }, "supportEmail": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "moderation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema1" }, "action": { "type": "string" }, "reasonCategory": { "type": "string" } }, "required": [ "at", "action", "reasonCategory" ], "additionalProperties": false } } }, "required": [ "state", "actions" ], "additionalProperties": false }, "region": { "type": "string" }, "defaults": { "anyOf": [ { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema0" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, { "type": "null" } ] }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "agreement": { "type": "object", "properties": { "version": { "type": "string" }, "publishedAt": { "$ref": "#/$defs/__schema1" }, "url": { "type": "string", "format": "uri" }, "acceptedAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "version", "publishedAt", "url", "acceptedAt" ], "additionalProperties": false }, "businessWallet": { "$ref": "#/$defs/__schema0" }, "showSupportEmail": { "type": "boolean" } }, "required": [ "id", "name", "slug", "address", "description", "logo", "website", "verificationTier", "joinedAt", "offersCount", "closedAt", "supportEmail", "region", "defaults", "budgetAlertSales", "agreement", "businessWallet" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L245" }, { "name": "merchants.update", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/merchant", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 2, "maxLength": 100 }, "slug": { "type": "string", "minLength": 3, "maxLength": 30, "pattern": "^[a-z][a-z0-9_]+$" }, "description": { "default": "", "type": "string", "maxLength": 2000 }, "website": { "default": null, "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "supportEmail": { "type": "string", "maxLength": 200, "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "region": { "type": "string", "minLength": 2, "maxLength": 80 }, "budgetAlertSales": { "default": 5, "type": "integer", "minimum": 1, "maximum": 50 }, "logo": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "category": { "type": "string", "enum": [ "digital", "education", "software", "design", "other" ] }, "showSupportEmail": { "type": "boolean" } }, "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "uri" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema0" }, "description": { "type": "string" }, "logo": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "website": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "verificationTier": { "type": "string", "enum": [ "unverified", "domain", "business" ] }, "joinedAt": { "$ref": "#/$defs/__schema1" }, "offersCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "closedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "category": { "type": [ "string", "null" ] }, "categories": { "type": "array", "items": { "type": "string" } }, "supportEmail": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "moderation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden" ] }, "actions": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema1" }, "action": { "type": "string" }, "reasonCategory": { "type": "string" } }, "required": [ "at", "action", "reasonCategory" ], "additionalProperties": false } } }, "required": [ "state", "actions" ], "additionalProperties": false }, "region": { "type": "string" }, "defaults": { "anyOf": [ { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema0" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, { "type": "null" } ] }, "budgetAlertSales": { "type": "integer", "minimum": 1, "maximum": 50 }, "agreement": { "type": "object", "properties": { "version": { "type": "string" }, "publishedAt": { "$ref": "#/$defs/__schema1" }, "url": { "type": "string", "format": "uri" }, "acceptedAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "version", "publishedAt", "url", "acceptedAt" ], "additionalProperties": false }, "businessWallet": { "$ref": "#/$defs/__schema0" }, "showSupportEmail": { "type": "boolean" } }, "required": [ "id", "name", "slug", "address", "description", "logo", "website", "verificationTier", "joinedAt", "offersCount", "closedAt", "supportEmail", "region", "defaults", "budgetAlertSales", "agreement", "businessWallet" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L246" }, { "name": "merchants.slugAvailable", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant-slugs/:slug", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "slug": { "type": "string" } }, "required": [ "slug" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "available": { "type": "boolean" }, "reason": { "anyOf": [ { "type": "string", "enum": [ "taken", "reserved", "invalid" ] }, { "type": "null" } ] }, "suggestion": { "type": [ "string", "null" ] } }, "required": [ "available", "reason", "suggestion" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L247" }, { "name": "merchants.uploadLogo", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/logo", "auth": "session", "multipart": true }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "file": { "type": "string", "format": "binary", "contentEncoding": "binary", "maxLength": 2000000, "anyOf": [ { "contentMediaType": "image/png" }, { "contentMediaType": "image/jpeg" }, { "contentMediaType": "image/webp" } ] } }, "required": [ "file" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" } }, "required": [ "sha256" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L255" }, { "name": "merchants.requestVerification", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/merchant/verification", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "tier": { "type": "string", "const": "domain" }, "domain": { "type": "string" } }, "required": [ "tier", "domain" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "status": { "type": "string", "enum": [ "pending", "verified", "failed" ] }, "record": { "type": "object", "properties": { "type": { "type": "string", "const": "TXT" }, "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "type", "name", "value" ], "additionalProperties": false } }, "required": [ "status", "record" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L259" }, { "name": "merchants.close", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/close", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 }, "confirmation": { "type": "string" } }, "required": [ "confirmationToken", "confirmation" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L266" }, { "name": "merchants.offers", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchants/:slug/offers", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "slug": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "slug" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "merchant": { "type": "object", "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema1" } }, "required": [ "name", "slug", "address" ], "additionalProperties": false }, "product": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema2" }, "title": { "type": "string" }, "summary": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema2" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "category": { "type": "string" } }, "required": [ "id", "title", "summary", "media", "category" ], "additionalProperties": false }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema1" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "price": { "$ref": "#/$defs/__schema0" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema1" }, "commissionBps": { "type": "integer", "minimum": 1, "maximum": 10000 }, "perSaleCap": { "$ref": "#/$defs/__schema0" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema0" }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 5 }, "weightsBps": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "shortPathMode": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "holdSeconds": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "expiry": { "$ref": "#/$defs/__schema0" }, "eligibilityHash": { "$ref": "#/$defs/__schema4" }, "policyHash": { "$ref": "#/$defs/__schema4" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveAt": { "$ref": "#/$defs/__schema5" }, "regions": { "type": "array", "items": { "type": "string" } }, "sharingRules": { "type": "array", "items": { "type": "string" } }, "registrationTx": { "anyOf": [ { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema4" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema5" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] }, "salesCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash", "policyHash", "version", "effectiveAt", "regions", "sharingRules" ], "additionalProperties": false }, "rewardAvailable": { "$ref": "#/$defs/__schema0" }, "rewardTotal": { "$ref": "#/$defs/__schema0" }, "settledSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "onchainUrl": { "type": "string", "format": "uri" }, "rankReasons": { "type": "array", "items": { "type": "string" } }, "inviteOnly": { "type": "boolean" }, "endsAt": { "$ref": "#/$defs/__schema5" } }, "required": [ "campaignId", "chainId", "contractAddress", "state", "merchant", "product", "token", "price", "policy", "rewardAvailable", "rewardTotal", "settledSales", "onchainUrl", "rankReasons" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema3": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema4": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema5": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L267" }, { "name": "links.mine", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/links", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "code": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "campaign": { "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema2" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "merchant": { "type": "object", "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema2" } }, "required": [ "name", "slug", "address" ], "additionalProperties": false }, "product": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema3" }, "title": { "type": "string" }, "summary": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema3" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "category": { "type": "string" } }, "required": [ "id", "title", "summary", "media", "category" ], "additionalProperties": false }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "price": { "$ref": "#/$defs/__schema1" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema2" }, "commissionBps": { "type": "integer", "minimum": 1, "maximum": 10000 }, "perSaleCap": { "$ref": "#/$defs/__schema1" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema1" }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 5 }, "weightsBps": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema4" } }, "shortPathMode": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "holdSeconds": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "expiry": { "$ref": "#/$defs/__schema1" }, "eligibilityHash": { "$ref": "#/$defs/__schema5" }, "policyHash": { "$ref": "#/$defs/__schema5" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveAt": { "$ref": "#/$defs/__schema6" }, "regions": { "type": "array", "items": { "type": "string" } }, "sharingRules": { "type": "array", "items": { "type": "string" } }, "registrationTx": { "anyOf": [ { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema5" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema6" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] }, "salesCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash", "policyHash", "version", "effectiveAt", "regions", "sharingRules" ], "additionalProperties": false }, "rewardAvailable": { "$ref": "#/$defs/__schema1" }, "rewardTotal": { "$ref": "#/$defs/__schema1" }, "settledSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "onchainUrl": { "type": "string", "format": "uri" }, "rankReasons": { "type": "array", "items": { "type": "string" } }, "inviteOnly": { "type": "boolean" }, "endsAt": { "$ref": "#/$defs/__schema6" } }, "required": [ "campaignId", "chainId", "contractAddress", "state", "merchant", "product", "token", "price", "policy", "rewardAvailable", "rewardTotal", "settledSales", "onchainUrl", "rankReasons" ], "additionalProperties": false }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "levelFromMerchant": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "campaignStatus": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "moderation": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden", "flagged" ] }, "reason": { "type": [ "string", "null" ] }, "decidedAt": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] } }, "required": [ "state", "reason", "decidedAt" ], "additionalProperties": false }, "visitsEstimate": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "conversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "earned": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema1" }, "readyToFinalize": { "$ref": "#/$defs/__schema1" }, "claimable": { "$ref": "#/$defs/__schema1" }, "claimed": { "$ref": "#/$defs/__schema1" }, "refunded": { "$ref": "#/$defs/__schema1" }, "reversed": { "$ref": "#/$defs/__schema1" } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed" ], "additionalProperties": false }, "createdTxHash": { "$ref": "#/$defs/__schema5" }, "createdAt": { "$ref": "#/$defs/__schema6" } }, "required": [ "nodeId", "code", "url", "campaign", "parentNodeId", "levelFromMerchant", "campaignStatus", "moderation", "visitsEstimate", "conversions", "earned", "createdTxHash", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema3": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema5": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema6": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L271" }, { "name": "links.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/links/:nodeId", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "nodeId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "required": [ "nodeId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "code": { "$ref": "#/$defs/__schema2" }, "url": { "$ref": "#/$defs/__schema3" }, "campaign": { "$ref": "#/$defs/__schema4" }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "levelFromMerchant": { "$ref": "#/$defs/__schema10" }, "campaignStatus": { "$ref": "#/$defs/__schema11" }, "moderation": { "$ref": "#/$defs/__schema12" }, "visitsEstimate": { "type": "null" }, "conversions": { "$ref": "#/$defs/__schema13" }, "earned": { "type": "null" }, "createdTxHash": { "$ref": "#/$defs/__schema8" }, "createdAt": { "$ref": "#/$defs/__schema9" } }, "required": [ "nodeId", "code", "url", "campaign", "parentNodeId", "levelFromMerchant", "campaignStatus", "moderation", "visitsEstimate", "conversions", "earned", "createdTxHash", "createdAt" ], "additionalProperties": false }, { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "code": { "$ref": "#/$defs/__schema2" }, "url": { "$ref": "#/$defs/__schema3" }, "campaign": { "$ref": "#/$defs/__schema4" }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "levelFromMerchant": { "$ref": "#/$defs/__schema10" }, "campaignStatus": { "$ref": "#/$defs/__schema11" }, "moderation": { "$ref": "#/$defs/__schema12" }, "visitsEstimate": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "conversions": { "$ref": "#/$defs/__schema13" }, "earned": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema1" }, "readyToFinalize": { "$ref": "#/$defs/__schema1" }, "claimable": { "$ref": "#/$defs/__schema1" }, "claimed": { "$ref": "#/$defs/__schema1" }, "refunded": { "$ref": "#/$defs/__schema1" }, "reversed": { "$ref": "#/$defs/__schema1" } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed" ], "additionalProperties": false }, "createdTxHash": { "$ref": "#/$defs/__schema8" }, "createdAt": { "$ref": "#/$defs/__schema9" } }, "required": [ "nodeId", "code", "url", "campaign", "parentNodeId", "levelFromMerchant", "campaignStatus", "moderation", "visitsEstimate", "conversions", "earned", "createdTxHash", "createdAt" ], "additionalProperties": false } ], "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "format": "uri" }, "__schema4": { "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema5" }, "state": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "merchant": { "type": "object", "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "address": { "$ref": "#/$defs/__schema5" } }, "required": [ "name", "slug", "address" ], "additionalProperties": false }, "product": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema6" }, "title": { "type": "string" }, "summary": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema6" }, "kind": { "type": "string", "enum": [ "image", "download" ] }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }, "url": { "type": "string", "format": "uri" }, "width": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "height": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "kind", "size", "sha256" ], "additionalProperties": false } }, "category": { "type": "string" } }, "required": [ "id", "title", "summary", "media", "category" ], "additionalProperties": false }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema5" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "price": { "$ref": "#/$defs/__schema1" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema5" }, "commissionBps": { "type": "integer", "minimum": 1, "maximum": 10000 }, "perSaleCap": { "$ref": "#/$defs/__schema1" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema1" }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 5 }, "weightsBps": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema7" } }, "shortPathMode": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "holdSeconds": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "expiry": { "$ref": "#/$defs/__schema1" }, "eligibilityHash": { "$ref": "#/$defs/__schema8" }, "policyHash": { "$ref": "#/$defs/__schema8" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveAt": { "$ref": "#/$defs/__schema9" }, "regions": { "type": "array", "items": { "type": "string" } }, "sharingRules": { "type": "array", "items": { "type": "string" } }, "registrationTx": { "anyOf": [ { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema8" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema9" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] }, "salesCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash", "policyHash", "version", "effectiveAt", "regions", "sharingRules" ], "additionalProperties": false }, "rewardAvailable": { "$ref": "#/$defs/__schema1" }, "rewardTotal": { "$ref": "#/$defs/__schema1" }, "settledSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "onchainUrl": { "type": "string", "format": "uri" }, "rankReasons": { "type": "array", "items": { "type": "string" } }, "inviteOnly": { "type": "boolean" }, "endsAt": { "$ref": "#/$defs/__schema9" } }, "required": [ "campaignId", "chainId", "contractAddress", "state", "merchant", "product", "token", "price", "policy", "rewardAvailable", "rewardTotal", "settledSales", "onchainUrl", "rankReasons" ], "additionalProperties": false }, "__schema5": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema6": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema7": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema8": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema9": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema10": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "__schema11": { "type": "string", "enum": [ "DRAFT_OFFCHAIN", "CREATED_UNFUNDED", "FUNDED_ACTIVE", "PAUSED", "ENDED", "EXPIRED" ] }, "__schema12": { "type": "object", "properties": { "state": { "type": "string", "enum": [ "visible", "hidden", "flagged" ] }, "reason": { "type": [ "string", "null" ] }, "decidedAt": { "anyOf": [ { "$ref": "#/$defs/__schema9" }, { "type": "null" } ] } }, "required": [ "state", "reason", "decidedAt" ], "additionalProperties": false }, "__schema13": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L272" }, { "name": "links.resolveCode", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/referrals/:code", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "code": { "type": "string" } }, "required": [ "code" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok", "unknown", "retired", "otherChain" ] }, "slug": { "type": "string" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "owner": { "$ref": "#/$defs/__schema2" }, "eligiblePath": { "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "indexingStatus": { "type": "string", "enum": [ "live", "syncing", "behind" ] } }, "required": [ "status", "slug", "chainId", "campaignId", "nodeId", "parentNodeId", "owner", "eligiblePath", "depth", "indexingStatus" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "__schema3": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "creator": { "$ref": "#/$defs/__schema2" }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "paid": { "type": "boolean" }, "repeatedWallet": { "type": "boolean" }, "outsideWindow": { "type": "boolean" }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "anyOf": [ { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, { "type": "null" } ] }, "reasonIfUnpaid": { "anyOf": [ { "type": "string", "enum": [ "OUTSIDE_DEPTH", "CAMPAIGN_EXCLUSION", "REFUNDED", "REVERSED" ] }, { "type": "null" } ] } }, "required": [ "nodeId", "creator", "depth", "paid", "repeatedWallet", "outsideWindow", "effectiveWeightBps", "amount", "state", "reasonIfUnpaid" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L273" }, { "name": "links.recordOpen", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/referrals/:code/open", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "code": { "type": "string" } }, "required": [ "code" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L274" }, { "name": "links.previewJoin", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/join-preview", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "parent": { "$ref": "#/$defs/__schema0" } }, "required": [ "campaignId" ], "$defs": { "__schema0": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "eligibility": { "type": "string", "enum": [ "ok", "already_joined", "is_merchant", "invitation_required", "paused", "ended", "capacity_reached", "invalid_parent", "not_deployed" ] }, "nodeId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "enforcedBy": { "type": "string", "enum": [ "contract", "spoke" ] }, "budgetState": { "type": "string", "enum": [ "funded", "unfunded", "exhausted" ] }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "ancestorsAbove": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "creator": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "paid": { "type": "boolean" }, "repeatedWallet": { "type": "boolean" }, "outsideWindow": { "type": "boolean" }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "anyOf": [ { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, { "type": "null" } ] }, "reasonIfUnpaid": { "anyOf": [ { "type": "string", "enum": [ "OUTSIDE_DEPTH", "CAMPAIGN_EXCLUSION", "REFUNDED", "REVERSED" ] }, { "type": "null" } ] } }, "required": [ "nodeId", "creator", "depth", "paid", "repeatedWallet", "outsideWindow", "effectiveWeightBps", "amount", "state", "reasonIfUnpaid" ], "additionalProperties": false } }, "policy": { "anyOf": [ { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema2" }, "commissionBps": { "type": "integer", "minimum": 1, "maximum": 10000 }, "perSaleCap": { "$ref": "#/$defs/__schema1" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema1" }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 5 }, "weightsBps": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "shortPathMode": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "holdSeconds": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "expiry": { "$ref": "#/$defs/__schema1" }, "eligibilityHash": { "$ref": "#/$defs/__schema4" }, "policyHash": { "$ref": "#/$defs/__schema4" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveAt": { "$ref": "#/$defs/__schema5" }, "regions": { "type": "array", "items": { "type": "string" } }, "sharingRules": { "type": "array", "items": { "type": "string" } }, "registrationTx": { "anyOf": [ { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema4" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema5" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] }, "salesCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash", "policyHash", "version", "effectiveAt", "regions", "sharingRules" ], "additionalProperties": false }, { "type": "null" } ] }, "exampleAmounts": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } } }, "required": [ "eligibility", "nodeId", "enforcedBy", "budgetState", "depth", "ancestorsAbove", "policy", "exampleAmounts" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema3": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema4": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema5": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L275" }, { "name": "links.stats", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/links/:nodeId/stats", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "nodeId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "required": [ "nodeId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "nodeId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "visitsEstimate": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "visitsBySource": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string" }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "estimate": { "type": "boolean", "const": true } }, "required": [ "source", "count", "estimate" ], "additionalProperties": false } }, "estimate": { "type": "boolean", "const": true }, "directChildren": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "descendants": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "maxDepthBelow": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "earned": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema0" }, "readyToFinalize": { "$ref": "#/$defs/__schema0" }, "claimable": { "$ref": "#/$defs/__schema0" }, "claimed": { "$ref": "#/$defs/__schema0" }, "refunded": { "$ref": "#/$defs/__schema0" }, "reversed": { "$ref": "#/$defs/__schema0" } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed" ], "additionalProperties": false } }, "required": [ "nodeId", "visitsEstimate", "visitsBySource", "estimate", "directChildren", "descendants", "maxDepthBelow", "sales", "earned" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L276" }, { "name": "graph.forCampaign", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/graph", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "rootNode": { "$ref": "#/$defs/__schema0" }, "depth": { "type": "integer", "minimum": 1, "maximum": 16 }, "childLimit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "campaignId" ], "$defs": { "__schema0": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "nodes": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "owner": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "childCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "hiddenChildCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "counts": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "moderationFlag": { "type": "boolean" }, "activity": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "amount": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "token": { "anyOf": [ { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, { "type": "null" } ] }, "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "status": { "type": "string", "enum": [ "not_submitted", "wallet_confirmation", "submitted", "included", "confirmed", "indexed", "done", "rejected", "unknown", "replaced", "failed" ] }, "objectId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "kind", "amount", "token", "txHash", "blockNumber", "status", "objectId", "at" ], "additionalProperties": false } } }, "required": [ "nodeId", "campaignId", "parentNodeId", "owner", "depth", "childCount", "hiddenChildCount", "counts", "moderationFlag", "activity" ], "additionalProperties": false } }, "edges": { "type": "array", "items": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ], "additionalProperties": false } }, "saleMarkers": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "state": { "type": "string", "enum": [ "PENDING", "REFUNDED", "FINALIZED" ] } }, "required": [ "saleId", "nodeId", "state" ], "additionalProperties": false } }, "truncated": { "type": "boolean" }, "indexedBlock": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "nodes", "edges", "saleMarkers", "truncated", "indexedBlock" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L277" }, { "name": "graph.mine", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/graph", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "rootNode": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "depth": { "type": "integer", "minimum": 1, "maximum": 16 }, "childLimit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "nodes": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "owner": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "childCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "hiddenChildCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "counts": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "moderationFlag": { "type": "boolean" }, "activity": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "amount": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "token": { "anyOf": [ { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, { "type": "null" } ] }, "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "status": { "type": "string", "enum": [ "not_submitted", "wallet_confirmation", "submitted", "included", "confirmed", "indexed", "done", "rejected", "unknown", "replaced", "failed" ] }, "objectId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "kind", "amount", "token", "txHash", "blockNumber", "status", "objectId", "at" ], "additionalProperties": false } } }, "required": [ "nodeId", "campaignId", "parentNodeId", "owner", "depth", "childCount", "hiddenChildCount", "counts", "moderationFlag", "activity" ], "additionalProperties": false } }, "edges": { "type": "array", "items": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ], "additionalProperties": false } }, "saleMarkers": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "state": { "type": "string", "enum": [ "PENDING", "REFUNDED", "FINALIZED" ] } }, "required": [ "saleId", "nodeId", "state" ], "additionalProperties": false } }, "truncated": { "type": "boolean" }, "indexedBlock": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "nodes", "edges", "saleMarkers", "truncated", "indexedBlock" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L278" }, { "name": "graph.ancestry", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/nodes/:chainId/:nodeId/ancestry", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "nodeId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "nodeId", "chainId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "nodes": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "owner": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "childCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "hiddenChildCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "counts": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "moderationFlag": { "type": "boolean" }, "activity": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "amount": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "token": { "anyOf": [ { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, { "type": "null" } ] }, "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "status": { "type": "string", "enum": [ "not_submitted", "wallet_confirmation", "submitted", "included", "confirmed", "indexed", "done", "rejected", "unknown", "replaced", "failed" ] }, "objectId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "kind", "amount", "token", "txHash", "blockNumber", "status", "objectId", "at" ], "additionalProperties": false } } }, "required": [ "nodeId", "campaignId", "parentNodeId", "owner", "depth", "childCount", "hiddenChildCount", "counts", "moderationFlag", "activity" ], "additionalProperties": false } }, "truncated": { "type": "boolean" } }, "required": [ "nodes", "truncated" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L279" }, { "name": "graph.salePath", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/receipts/:chainId/:saleId/path", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "saleId", "chainId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "nodes": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "creator": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "paid": { "type": "boolean" }, "repeatedWallet": { "type": "boolean" }, "outsideWindow": { "type": "boolean" }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "anyOf": [ { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, { "type": "null" } ] }, "reasonIfUnpaid": { "anyOf": [ { "type": "string", "enum": [ "OUTSIDE_DEPTH", "CAMPAIGN_EXCLUSION", "REFUNDED", "REVERSED" ] }, { "type": "null" } ] } }, "required": [ "nodeId", "creator", "depth", "paid", "repeatedWallet", "outsideWindow", "effectiveWeightBps", "amount", "state", "reasonIfUnpaid" ], "additionalProperties": false } }, "policyHash": { "$ref": "#/$defs/__schema2" }, "evidence": { "type": "array", "items": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema2" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } }, "truncated": { "type": "boolean" } }, "required": [ "saleId", "nodes", "policyHash", "evidence", "truncated" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L283" }, { "name": "graph.search", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/graph/search", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "q": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "campaignId", "q" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "parentNodeId": { "$ref": "#/$defs/__schema0" }, "owner": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "childCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "hiddenChildCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "counts": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "moderationFlag": { "type": "boolean" }, "activity": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "amount": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "token": { "anyOf": [ { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, { "type": "null" } ] }, "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "status": { "type": "string", "enum": [ "not_submitted", "wallet_confirmation", "submitted", "included", "confirmed", "indexed", "done", "rejected", "unknown", "replaced", "failed" ] }, "objectId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "kind", "amount", "token", "txHash", "blockNumber", "status", "objectId", "at" ], "additionalProperties": false } } }, "required": [ "nodeId", "campaignId", "parentNodeId", "owner", "depth", "childCount", "hiddenChildCount", "counts", "moderationFlag", "activity" ], "additionalProperties": false }, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L293" }, { "name": "graph.export", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/graph/exports", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "scope": { "type": "string", "enum": [ "campaign", "mine" ] }, "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "depth": { "type": "integer", "minimum": 1, "maximum": 256 }, "saleStates": { "type": "array", "items": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] } }, "period": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "format": { "type": "string", "enum": [ "csv", "json" ] } }, "required": [ "scope", "depth", "saleStates", "period", "format" ], "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "schemaVersion": { "type": "string" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "fromBlock": { "$ref": "#/$defs/__schema0" }, "toBlock": { "$ref": "#/$defs/__schema0" }, "files": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string", "format": "uri" }, "rows": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" } }, "required": [ "url", "rows", "sha256" ], "additionalProperties": false } } }, "required": [ "schemaVersion", "chainId", "fromBlock", "toBlock", "files" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L294" }, { "name": "checkout.preview", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/checkout-preview", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "node": { "$ref": "#/$defs/__schema0" }, "buyer": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } }, "required": [ "campaignId" ], "$defs": { "__schema0": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "price": { "$ref": "#/$defs/__schema0" }, "recipients": { "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "rewardTotal": { "$ref": "#/$defs/__schema0" }, "unallocated": { "$ref": "#/$defs/__schema0" }, "policyHash": { "$ref": "#/$defs/__schema3" }, "policyVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "nextPolicy": { "anyOf": [ { "type": "object", "properties": { "policyHash": { "$ref": "#/$defs/__schema3" }, "effectiveAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "policyHash", "effectiveAt" ], "additionalProperties": false }, { "type": "null" } ] }, "directPurchaseAvailable": { "type": "boolean" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "holdSeconds": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "refundPolicy": { "type": "string" }, "blocking": { "anyOf": [ { "type": "object", "properties": { "code": { "type": "string", "enum": [ "RATE_LIMITED", "CONFLICT", "REAUTH_REQUIRED", "NOT_ELIGIBLE", "HANDLE_TAKEN", "HANDLE_RESERVED", "HANDLE_CHANGE_TOO_SOON", "WALLET_ALREADY_LINKED", "SLUG_TAKEN", "BUSINESS_NOT_CLOSABLE", "ACCOUNT_HAS_ACTIVE_CAMPAIGNS", "PROTOCOL_NOT_DEPLOYED", "FEATURE_NOT_AVAILABLE", "POLICY_MISMATCH", "CAMPAIGN_NOT_FUNDED", "EXPORT_RECONCILIATION_MISMATCH", "GAS_ALREADY_RECEIVED", "GAS_STATION_EMPTY", "CAMPAIGN_FROZEN", "TEAM_ALREADY_MEMBER", "WEBHOOK_URL_NOT_ALLOWED", "CHECKOUT_PAYMENT_FAILED", "ATTESTATION_UNTRUSTED", "SOURCE_REFUND_UNRESOLVED", "UNAUTHENTICATED", "INVALID_SIGNATURE", "WRONG_NETWORK", "CAMPAIGN_NOT_ACTIVE", "CAMPAIGN_PAUSED", "TOKEN_NOT_ALLOWED", "PRODUCT_VERSION_MISMATCH", "INVALID_REFERRAL_PATH", "SELF_REFERRAL", "DUPLICATE_CHECKOUT", "INSUFFICIENT_REWARD_ESCROW", "PAYMENT_ALLOWANCE_INSUFFICIENT", "SALE_NOT_MATURE", "SALE_ALREADY_FINALIZED", "SALE_REFUNDED", "NOT_AUTHORIZED_TO_REFUND", "TX_REJECTED", "TX_PENDING", "INDEXER_LAGGING", "UPSTREAM_UNAVAILABLE", "NANSEN_UNAVAILABLE", "REFUND_WINDOW_CLOSED", "NOTHING_TO_CLAIM", "NOT_AUTHORIZED", "NOT_FOUND", "VALIDATION_FAILED", "INTERNAL" ] }, "contractError": { "type": [ "string", "null" ] } }, "required": [ "code", "contractError" ], "additionalProperties": false }, { "type": "null" } ] }, "buyer": { "type": "object", "properties": { "tokenBalance": { "$ref": "#/$defs/__schema0" }, "allowance": { "$ref": "#/$defs/__schema0" }, "monWei": { "$ref": "#/$defs/__schema0" }, "alreadyPurchasedSaleId": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "buyerOnPath": { "type": "boolean" }, "buyerIsMerchant": { "type": "boolean" } }, "required": [ "tokenBalance", "allowance", "monWei", "alreadyPurchasedSaleId", "buyerOnPath", "buyerIsMerchant" ], "additionalProperties": false }, "feeEstimate": { "type": "object", "properties": { "gasUnits": { "$ref": "#/$defs/__schema0" }, "gasPriceWei": { "$ref": "#/$defs/__schema0" }, "feeWei": { "$ref": "#/$defs/__schema0" }, "basis": { "type": "string", "enum": [ "estimate", "recentPurchase", "sample" ] } }, "required": [ "gasUnits", "gasPriceWei", "feeWei", "basis" ], "additionalProperties": false } }, "required": [ "price", "recipients", "rewardTotal", "unallocated", "policyHash", "policyVersion", "nextPolicy", "directPurchaseAvailable", "blockNumber", "holdSeconds", "refundPolicy", "blocking" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema2" }, "creator": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "paid": { "type": "boolean" }, "repeatedWallet": { "type": "boolean" }, "outsideWindow": { "type": "boolean" }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema0" }, "state": { "anyOf": [ { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, { "type": "null" } ] }, "reasonIfUnpaid": { "anyOf": [ { "type": "string", "enum": [ "OUTSIDE_DEPTH", "CAMPAIGN_EXCLUSION", "REFUNDED", "REVERSED" ] }, { "type": "null" } ] } }, "required": [ "nodeId", "creator", "depth", "paid", "repeatedWallet", "outsideWindow", "effectiveWeightBps", "amount", "state", "reasonIfUnpaid" ], "additionalProperties": false }, "__schema2": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L305" }, { "name": "checkout.createIntent", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/checkout/intents", "auth": "session", "idempotencyField": "orderKey" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "default": "0", "$ref": "#/$defs/__schema0" }, "orderKey": { "$ref": "#/$defs/__schema2" }, "expectedPrice": { "$ref": "#/$defs/__schema1" }, "expectedReward": { "$ref": "#/$defs/__schema1" }, "policyHash": { "$ref": "#/$defs/__schema2" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "campaignId", "orderKey", "expectedPrice", "expectedReward", "policyHash", "chainId" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "orderKey": { "$ref": "#/$defs/__schema2" }, "expectedPrice": { "$ref": "#/$defs/__schema1" }, "expectedReward": { "$ref": "#/$defs/__schema1" }, "policyHash": { "$ref": "#/$defs/__schema2" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "buyer": { "$ref": "#/$defs/__schema3" }, "status": { "type": "string", "enum": [ "created", "submitted", "included", "confirmed", "expired", "failed" ] }, "txHash": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "saleId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema4" }, "expiresAt": { "$ref": "#/$defs/__schema4" }, "to": { "$ref": "#/$defs/__schema3" }, "data": { "type": "string", "pattern": "^0x[\\da-fA-F]*$" }, "value": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "campaignId", "nodeId", "orderKey", "expectedPrice", "expectedReward", "policyHash", "chainId", "buyer", "status", "txHash", "saleId", "createdAt", "expiresAt", "to", "data", "value" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema4": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L309" }, { "name": "checkout.getIntent", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/checkout/intents/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "orderKey": { "$ref": "#/$defs/__schema2" }, "expectedPrice": { "$ref": "#/$defs/__schema1" }, "expectedReward": { "$ref": "#/$defs/__schema1" }, "policyHash": { "$ref": "#/$defs/__schema2" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "buyer": { "$ref": "#/$defs/__schema3" }, "status": { "type": "string", "enum": [ "created", "submitted", "included", "confirmed", "expired", "failed" ] }, "txHash": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "saleId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema4" }, "expiresAt": { "$ref": "#/$defs/__schema4" }, "to": { "$ref": "#/$defs/__schema3" }, "data": { "type": "string", "pattern": "^0x[\\da-fA-F]*$" }, "value": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "campaignId", "nodeId", "orderKey", "expectedPrice", "expectedReward", "policyHash", "chainId", "buyer", "status", "txHash", "saleId", "createdAt", "expiresAt", "to", "data", "value" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema4": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L313" }, { "name": "checkout.attachTransaction", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/checkout/intents/:id/transaction", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } }, "required": [ "id", "txHash" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "orderKey": { "$ref": "#/$defs/__schema2" }, "expectedPrice": { "$ref": "#/$defs/__schema1" }, "expectedReward": { "$ref": "#/$defs/__schema1" }, "policyHash": { "$ref": "#/$defs/__schema2" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "buyer": { "$ref": "#/$defs/__schema3" }, "status": { "type": "string", "enum": [ "created", "submitted", "included", "confirmed", "expired", "failed" ] }, "txHash": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "saleId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema4" }, "expiresAt": { "$ref": "#/$defs/__schema4" }, "to": { "$ref": "#/$defs/__schema3" }, "data": { "type": "string", "pattern": "^0x[\\da-fA-F]*$" }, "value": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "campaignId", "nodeId", "orderKey", "expectedPrice", "expectedReward", "policyHash", "chainId", "buyer", "status", "txHash", "saleId", "createdAt", "expiresAt", "to", "data", "value" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema4": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L314" }, { "name": "receipts.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/receipts/:chainId/:saleId", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "saleId", "chainId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema2" }, "buyer": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "nodeId": { "$ref": "#/$defs/__schema0" }, "orderKey": { "$ref": "#/$defs/__schema3" }, "policyHash": { "$ref": "#/$defs/__schema3" }, "policyVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "source": { "type": "string", "enum": [ "native", "merchant_attested" ] }, "trustMode": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "price": { "$ref": "#/$defs/__schema1" }, "rewardReserved": { "$ref": "#/$defs/__schema1" }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "state": { "type": "string", "enum": [ "PENDING", "REFUNDED", "FINALIZED" ] }, "purchasedAt": { "$ref": "#/$defs/__schema4" }, "unlockAt": { "$ref": "#/$defs/__schema4" }, "allocations": { "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema5" } }, "proceedsState": { "type": "string", "enum": [ "pending", "claimable", "claimed", "refunded" ] }, "purchaseTx": { "$ref": "#/$defs/__schema6" }, "finalizeTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "refundTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "indexedBlock": { "$ref": "#/$defs/__schema1" }, "timeline": { "type": "array", "items": { "type": "object", "properties": { "state": { "type": "string" }, "at": { "$ref": "#/$defs/__schema4" }, "tx": { "$ref": "#/$defs/__schema6" } }, "required": [ "state", "at", "tx" ], "additionalProperties": false } }, "refundRequest": { "anyOf": [ { "type": "object", "properties": { "disputeId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "status": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema4" } }, "required": [ "disputeId", "status", "createdAt" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "saleId", "campaignId", "chainId", "contractAddress", "buyer", "nodeId", "orderKey", "policyHash", "policyVersion", "source", "trustMode", "price", "rewardReserved", "token", "state", "purchasedAt", "unlockAt", "allocations", "proceedsState", "purchaseTx", "finalizeTx", "refundTx", "indexedBlock", "timeline" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema4": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema5": { "type": "object", "properties": { "recipient": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "level": { "type": "integer", "minimum": 1, "maximum": 8 }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "claimTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] } }, "required": [ "recipient", "level", "effectiveWeightBps", "amount", "state", "claimTx" ], "additionalProperties": false }, "__schema6": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema3" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema4" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L315" }, { "name": "receipts.events", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/receipts/:chainId/:saleId/events", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "saleId", "chainId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "tx": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "type": "string" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema0" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, "logIndex": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "at": { "$ref": "#/$defs/__schema0" }, "actor": { "anyOf": [ { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, { "type": "null" } ] }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "boolean" }, { "type": "array", "items": { "type": "string" } } ] } } }, "required": [ "name", "tx", "logIndex", "at", "actor", "args" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L316" }, { "name": "receipts.verify", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/receipts/:chainId/:saleId/verify", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "saleId", "chainId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "sale": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema2" }, "buyer": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "nodeId": { "$ref": "#/$defs/__schema0" }, "orderKey": { "$ref": "#/$defs/__schema3" }, "policyHash": { "$ref": "#/$defs/__schema3" }, "policyVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "source": { "type": "string", "enum": [ "native", "merchant_attested" ] }, "trustMode": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "price": { "$ref": "#/$defs/__schema1" }, "rewardReserved": { "$ref": "#/$defs/__schema1" }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "state": { "type": "string", "enum": [ "PENDING", "REFUNDED", "FINALIZED" ] }, "purchasedAt": { "$ref": "#/$defs/__schema4" }, "unlockAt": { "$ref": "#/$defs/__schema4" }, "allocations": { "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema5" } }, "proceedsState": { "type": "string", "enum": [ "pending", "claimable", "claimed", "refunded" ] }, "purchaseTx": { "$ref": "#/$defs/__schema6" }, "finalizeTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "refundTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "indexedBlock": { "$ref": "#/$defs/__schema1" }, "timeline": { "type": "array", "items": { "type": "object", "properties": { "state": { "type": "string" }, "at": { "$ref": "#/$defs/__schema4" }, "tx": { "$ref": "#/$defs/__schema6" } }, "required": [ "state", "at", "tx" ], "additionalProperties": false } }, "refundRequest": { "anyOf": [ { "type": "object", "properties": { "disputeId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "status": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema4" } }, "required": [ "disputeId", "status", "createdAt" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "saleId", "campaignId", "chainId", "contractAddress", "buyer", "nodeId", "orderKey", "policyHash", "policyVersion", "source", "trustMode", "price", "rewardReserved", "token", "state", "purchasedAt", "unlockAt", "allocations", "proceedsState", "purchaseTx", "finalizeTx", "refundTx", "indexedBlock", "timeline" ], "additionalProperties": false }, "allocations": { "type": "array", "items": { "$ref": "#/$defs/__schema5" } }, "policyHash": { "$ref": "#/$defs/__schema3" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "matchesIndex": { "type": "boolean" } }, "required": [ "sale", "allocations", "policyHash", "blockNumber", "matchesIndex" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema4": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema5": { "type": "object", "properties": { "recipient": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "level": { "type": "integer", "minimum": 1, "maximum": 8 }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "claimTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] } }, "required": [ "recipient", "level", "effectiveWeightBps", "amount", "state", "claimTx" ], "additionalProperties": false }, "__schema6": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema3" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema4" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L317" }, { "name": "receipts.recent", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/receipts", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "q": { "type": "string", "maxLength": 200 }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "campaignId": { "$ref": "#/$defs/__schema1" }, "source": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED" ] }, "provider": { "type": "string" }, "unlockBefore": { "$ref": "#/$defs/__schema0" } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema2" }, "buyer": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "nodeId": { "$ref": "#/$defs/__schema0" }, "orderKey": { "$ref": "#/$defs/__schema3" }, "policyHash": { "$ref": "#/$defs/__schema3" }, "policyVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "source": { "type": "string", "enum": [ "native", "merchant_attested" ] }, "trustMode": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "price": { "$ref": "#/$defs/__schema1" }, "rewardReserved": { "$ref": "#/$defs/__schema1" }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema2" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "state": { "type": "string", "enum": [ "PENDING", "REFUNDED", "FINALIZED" ] }, "purchasedAt": { "$ref": "#/$defs/__schema4" }, "unlockAt": { "$ref": "#/$defs/__schema4" }, "allocations": { "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema5" } }, "proceedsState": { "type": "string", "enum": [ "pending", "claimable", "claimed", "refunded" ] }, "purchaseTx": { "$ref": "#/$defs/__schema6" }, "finalizeTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "refundTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "indexedBlock": { "$ref": "#/$defs/__schema1" }, "timeline": { "type": "array", "items": { "type": "object", "properties": { "state": { "type": "string" }, "at": { "$ref": "#/$defs/__schema4" }, "tx": { "$ref": "#/$defs/__schema6" } }, "required": [ "state", "at", "tx" ], "additionalProperties": false } }, "refundRequest": { "anyOf": [ { "type": "object", "properties": { "disputeId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "status": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema4" } }, "required": [ "disputeId", "status", "createdAt" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "saleId", "campaignId", "chainId", "contractAddress", "buyer", "nodeId", "orderKey", "policyHash", "policyVersion", "source", "trustMode", "price", "rewardReserved", "token", "state", "purchasedAt", "unlockAt", "allocations", "proceedsState", "purchaseTx", "finalizeTx", "refundTx", "indexedBlock", "timeline" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema4": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema5": { "type": "object", "properties": { "recipient": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "level": { "type": "integer", "minimum": 1, "maximum": 8 }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "claimTx": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] } }, "required": [ "recipient", "level", "effectiveWeightBps", "amount", "state", "claimTx" ], "additionalProperties": false }, "__schema6": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema3" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema4" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L327" }, { "name": "receipts.forBuyer", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/purchases", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "q": { "type": "string", "maxLength": 200 }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "campaignId": { "$ref": "#/$defs/__schema1" }, "source": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED" ] }, "provider": { "type": "string" }, "unlockBefore": { "$ref": "#/$defs/__schema0" }, "since": { "$ref": "#/$defs/__schema0" } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "campaignId": { "$ref": "#/$defs/__schema0" }, "productTitle": { "type": "string" }, "image": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "merchantName": { "type": "string" }, "referrerHandle": { "type": [ "string", "null" ] }, "amountPaid": { "$ref": "#/$defs/__schema1" }, "purchasedAt": { "$ref": "#/$defs/__schema2" }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "unlockAt": { "$ref": "#/$defs/__schema2" }, "refundedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "refundRequestStatus": { "type": [ "string", "null" ] }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "finalizedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "saleId", "chainId", "campaignId", "productTitle", "image", "merchantName", "referrerHandle", "amountPaid", "purchasedAt", "state", "unlockAt", "refundedAt", "refundRequestStatus" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L328" }, { "name": "receipts.forMerchant", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/sales", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "q": { "type": "string", "maxLength": 200 }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "campaignId": { "$ref": "#/$defs/__schema1" }, "source": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED" ] }, "provider": { "type": "string" }, "unlockBefore": { "$ref": "#/$defs/__schema0" } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "campaignId": { "$ref": "#/$defs/__schema0" }, "productTitle": { "type": "string" }, "image": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "merchantName": { "type": "string" }, "referrerHandle": { "type": [ "string", "null" ] }, "amountPaid": { "$ref": "#/$defs/__schema1" }, "purchasedAt": { "$ref": "#/$defs/__schema2" }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "unlockAt": { "$ref": "#/$defs/__schema2" }, "refundedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "refundRequestStatus": { "type": [ "string", "null" ] }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema3" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "finalizedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "orderKey": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "reward": { "$ref": "#/$defs/__schema1" }, "paidCount": { "type": "integer", "minimum": 0, "maximum": 8 }, "maxPaid": { "type": "integer", "minimum": 1, "maximum": 8 }, "trustMode": { "type": "string" }, "proceedsState": { "type": "string", "enum": [ "pending", "claimable", "claimed", "refunded" ] }, "buyer": { "$ref": "#/$defs/__schema3" } }, "required": [ "saleId", "chainId", "campaignId", "productTitle", "image", "merchantName", "referrerHandle", "amountPaid", "purchasedAt", "state", "unlockAt", "refundedAt", "refundRequestStatus", "orderKey", "reward", "paidCount", "maxPaid", "trustMode", "proceedsState" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] }, "countsByState": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false } }, "required": [ "items", "nextCursor", "countsByState" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L332" }, { "name": "receipts.forCampaign", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/campaigns/:campaignId/sales", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } }, "q": { "type": "string", "maxLength": 200 }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "source": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED" ] }, "provider": { "type": "string" }, "unlockBefore": { "$ref": "#/$defs/__schema1" } }, "$defs": { "__schema0": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "campaignId": { "$ref": "#/$defs/__schema0" }, "productTitle": { "type": "string" }, "image": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "merchantName": { "type": "string" }, "referrerHandle": { "type": [ "string", "null" ] }, "amountPaid": { "$ref": "#/$defs/__schema1" }, "purchasedAt": { "$ref": "#/$defs/__schema2" }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "unlockAt": { "$ref": "#/$defs/__schema2" }, "refundedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "refundRequestStatus": { "type": [ "string", "null" ] }, "token": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema3" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "finalizedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "reward": { "$ref": "#/$defs/__schema1" }, "paidCount": { "type": "integer", "minimum": 0, "maximum": 8 }, "maxPaid": { "type": "integer", "minimum": 1, "maximum": 8 }, "trustMode": { "type": "string" }, "proceedsState": { "type": "string", "enum": [ "pending", "claimable", "claimed", "refunded" ] }, "buyer": { "$ref": "#/$defs/__schema3" } }, "required": [ "saleId", "chainId", "campaignId", "productTitle", "image", "merchantName", "referrerHandle", "amountPaid", "purchasedAt", "state", "unlockAt", "refundedAt", "refundRequestStatus", "reward", "paidCount", "maxPaid", "trustMode", "proceedsState" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L336" }, { "name": "fulfillment.access", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/fulfillment/:saleId/access", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "required": [ "saleId" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "url": { "type": "string", "format": "uri" }, "expiresAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "name": { "type": "string" }, "kind": { "type": "string", "enum": [ "file", "link", "text" ] }, "mimeType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "id", "url", "expiresAt" ], "additionalProperties": false } } }, "required": [ "saleId", "items" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L340" }, { "name": "earnings.summary", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/earnings", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "token": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "tokens": { "type": "array", "items": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema0" }, "readyToFinalize": { "$ref": "#/$defs/__schema0" }, "claimable": { "$ref": "#/$defs/__schema0" }, "claimed": { "$ref": "#/$defs/__schema0" }, "refunded": { "$ref": "#/$defs/__schema0" }, "reversed": { "$ref": "#/$defs/__schema0" }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed", "token" ], "additionalProperties": false } }, "nextUnlockAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "indexedBlock": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "blockNumber": { "$ref": "#/$defs/__schema0" } }, "required": [ "tokens", "nextUnlockAt", "indexedBlock", "blockNumber" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L341" }, { "name": "earnings.byCampaign", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/earnings/campaigns", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "campaignId": { "$ref": "#/$defs/__schema1" }, "nodeId": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "holdEnded": { "type": "boolean" } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema0" }, "readyToFinalize": { "$ref": "#/$defs/__schema0" }, "claimable": { "$ref": "#/$defs/__schema0" }, "claimed": { "$ref": "#/$defs/__schema0" }, "refunded": { "$ref": "#/$defs/__schema0" }, "reversed": { "$ref": "#/$defs/__schema0" }, "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "productTitle": { "type": "string" }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed", "campaignId", "token", "productTitle", "sales" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L342" }, { "name": "earnings.byConversion", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/earnings/conversions", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "campaignId": { "$ref": "#/$defs/__schema1" }, "nodeId": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "holdEnded": { "type": "boolean" } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema0" }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "level": { "type": "integer", "minimum": 1, "maximum": 8 }, "pathLength": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "unlockAt": { "$ref": "#/$defs/__schema2" }, "finalizedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "claimTxHash": { "anyOf": [ { "$ref": "#/$defs/__schema3" }, { "type": "null" } ] }, "evidence": { "type": "array", "items": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema3" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema2" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } }, "productTitle": { "type": "string" }, "purchasedAt": { "$ref": "#/$defs/__schema2" }, "refundRequested": { "type": "boolean" } }, "required": [ "saleId", "campaignId", "token", "level", "pathLength", "effectiveWeightBps", "amount", "state", "unlockAt", "finalizedAt", "claimTxHash", "evidence" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema3": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L343" }, { "name": "earnings.missed", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/earnings/missed", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "campaignId": { "$ref": "#/$defs/__schema1" }, "nodeId": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "holdEnded": { "type": "boolean" } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "sale" }, "reason": { "type": "string", "enum": [ "OUTSIDE_DEPTH", "CAMPAIGN_EXCLUSION", "REFUNDED", "REVERSED" ] }, "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "saleId": { "$ref": "#/$defs/__schema0" }, "position": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "maxRewardedAncestors": { "type": "integer", "minimum": 1, "maximum": 8 }, "ruleLabel": { "type": [ "string", "null" ] }, "at": { "$ref": "#/$defs/__schema2" }, "evidence": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } } }, "required": [ "kind", "reason", "campaignId", "nodeId", "saleId", "position", "maxRewardedAncestors", "ruleLabel", "at", "evidence" ], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "blocked_checkout" }, "reason": { "type": "string", "enum": [ "SELF_REFERRAL", "INVALID_BUYER", "DEPLETED_POOL", "CAMPAIGN_INACTIVE" ] }, "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "at": { "$ref": "#/$defs/__schema2" }, "evidence": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } } }, "required": [ "kind", "reason", "campaignId", "nodeId", "at", "evidence" ], "additionalProperties": false } ] } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema3": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema2" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L344" }, { "name": "earnings.claimable", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/claimable", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "token": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "tokens": { "type": "array", "items": { "type": "object", "properties": { "token": { "$ref": "#/$defs/__schema0" }, "amount": { "$ref": "#/$defs/__schema1" }, "campaigns": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema2" }, "amount": { "$ref": "#/$defs/__schema1" } }, "required": [ "campaignId", "amount" ], "additionalProperties": false } } }, "required": [ "token", "amount", "campaigns" ], "additionalProperties": false } }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "readyToFinalize": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema2" }, "campaignId": { "$ref": "#/$defs/__schema2" }, "token": { "$ref": "#/$defs/__schema0" }, "level": { "type": "integer", "minimum": 1, "maximum": 8 }, "pathLength": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "unlockAt": { "$ref": "#/$defs/__schema3" }, "finalizedAt": { "anyOf": [ { "$ref": "#/$defs/__schema3" }, { "type": "null" } ] }, "claimTxHash": { "anyOf": [ { "$ref": "#/$defs/__schema4" }, { "type": "null" } ] }, "evidence": { "type": "array", "items": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema4" }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema3" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } }, "productTitle": { "type": "string" }, "purchasedAt": { "$ref": "#/$defs/__schema3" }, "refundRequested": { "type": "boolean" } }, "required": [ "saleId", "campaignId", "token", "level", "pathLength", "effectiveWeightBps", "amount", "state", "unlockAt", "finalizedAt", "claimTxHash", "evidence" ], "additionalProperties": false } } }, "required": [ "tokens", "blockNumber", "readyToFinalize" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "__schema1": { "type": "string" }, "__schema2": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema3": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema4": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L345" }, { "name": "earnings.claims", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/claims", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tx": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema1" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, "amount": { "$ref": "#/$defs/__schema0" }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "source": { "type": "string", "enum": [ "REWARD", "SALE_PROCEEDS" ] }, "at": { "$ref": "#/$defs/__schema1" } }, "required": [ "tx", "amount", "token", "campaignId", "source", "at" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L346" }, { "name": "vault.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/vault", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "token": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaigns": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "token": { "$ref": "#/$defs/__schema2" }, "rewards": { "$ref": "#/$defs/__schema3" }, "proceeds": { "$ref": "#/$defs/__schema4" }, "rewardPerSale": { "$ref": "#/$defs/__schema1" }, "liabilityCap": { "$ref": "#/$defs/__schema1" }, "settledSalesReadyToFinalize": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "campaignId", "token", "rewards", "proceeds", "rewardPerSale", "liabilityCap", "settledSalesReadyToFinalize" ], "additionalProperties": false } }, "totals": { "type": "array", "items": { "type": "object", "properties": { "token": { "$ref": "#/$defs/__schema2" }, "rewards": { "$ref": "#/$defs/__schema3" }, "proceeds": { "$ref": "#/$defs/__schema4" } }, "required": [ "token", "rewards", "proceeds" ], "additionalProperties": false } }, "lastIndexedBlock": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "blockNumber": { "$ref": "#/$defs/__schema1" } }, "required": [ "campaigns", "totals", "lastIndexedBlock", "blockNumber" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string" }, "__schema2": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "__schema3": { "type": "object", "properties": { "netDeposited": { "$ref": "#/$defs/__schema1" }, "available": { "$ref": "#/$defs/__schema1" }, "pendingReserved": { "$ref": "#/$defs/__schema1" }, "vestedUnclaimed": { "$ref": "#/$defs/__schema1" }, "rewardsClaimed": { "$ref": "#/$defs/__schema1" }, "surplusWithdrawn": { "$ref": "#/$defs/__schema1" } }, "required": [ "netDeposited", "available", "pendingReserved", "vestedUnclaimed", "rewardsClaimed", "surplusWithdrawn" ], "additionalProperties": false }, "__schema4": { "type": "object", "properties": { "proceedsPending": { "$ref": "#/$defs/__schema1" }, "proceedsClaimable": { "$ref": "#/$defs/__schema1" }, "proceedsClaimed": { "$ref": "#/$defs/__schema1" }, "buyerRefunded": { "$ref": "#/$defs/__schema1" } }, "required": [ "proceedsPending", "proceedsClaimable", "proceedsClaimed", "buyerRefunded" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L347" }, { "name": "vault.movements", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/vault/movements", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "kind": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "tx": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema1" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, "amount": { "$ref": "#/$defs/__schema0" }, "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "campaignId": { "$ref": "#/$defs/__schema2" }, "source": { "type": "string", "enum": [ "REWARD", "SALE_PROCEEDS" ] }, "at": { "$ref": "#/$defs/__schema1" }, "kind": { "type": "string", "enum": [ "deposited", "reserved", "finalized", "refunded", "claimed", "withdrawn" ] }, "saleId": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "tx", "amount", "token", "campaignId", "source", "at", "kind", "saleId" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L348" }, { "name": "reputation.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/distributors/:addressOrHandle/profile", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "addressOrHandle": { "type": "string" }, "groupBy": { "type": "string", "enum": [ "merchant", "campaign" ] } }, "required": [ "addressOrHandle" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "subject": { "$ref": "#/$defs/__schema0" }, "handle": { "$ref": "#/$defs/__schema2" }, "displayName": { "$ref": "#/$defs/__schema3" }, "methodologyVersion": { "$ref": "#/$defs/__schema4" }, "evidencePeriod": { "$ref": "#/$defs/__schema5" }, "settledConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "directConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "networkConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "netAttributedValue": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "settledCommission": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "median": { "$ref": "#/$defs/__schema8" }, "merchantCount": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "campaignCount": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "refundAdjustment": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "lastIndexedBlock": { "$ref": "#/$defs/__schema9" }, "verificationTier": { "$ref": "#/$defs/__schema10" }, "evidence": { "$ref": "#/$defs/__schema11" }, "perMerchant": { "$ref": "#/$defs/__schema18" }, "perCampaign": { "$ref": "#/$defs/__schema25" }, "perCategory": { "$ref": "#/$defs/__schema26" }, "period": { "$ref": "#/$defs/__schema27" }, "totalsByToken": { "$ref": "#/$defs/__schema28" }, "pendingConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "visibility": { "$ref": "#/$defs/__schema29" }, "acceptsInvitations": { "$ref": "#/$defs/__schema30" }, "visibleFields": { "type": "array", "items": { "type": "string" } }, "indexing": { "type": "string", "enum": [ "index", "noindex" ] } }, "required": [ "subject", "handle", "displayName", "methodologyVersion", "evidencePeriod", "settledConversions", "directConversions", "networkConversions", "netAttributedValue", "settledCommission", "median", "merchantCount", "campaignCount", "refundAdjustment", "lastIndexedBlock", "verificationTier", "evidence", "perMerchant", "perCampaign", "pendingConversions", "visibility", "acceptsInvitations", "visibleFields", "indexing" ], "additionalProperties": false }, { "type": "object", "properties": { "subject": { "$ref": "#/$defs/__schema0" }, "handle": { "$ref": "#/$defs/__schema2" }, "displayName": { "$ref": "#/$defs/__schema3" }, "methodologyVersion": { "$ref": "#/$defs/__schema4" }, "evidencePeriod": { "$ref": "#/$defs/__schema5" }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "directConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "networkConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "netAttributedValue": { "$ref": "#/$defs/__schema7" }, "settledCommission": { "$ref": "#/$defs/__schema7" }, "median": { "$ref": "#/$defs/__schema8" }, "merchantCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "campaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refundAdjustment": { "$ref": "#/$defs/__schema7" }, "lastIndexedBlock": { "$ref": "#/$defs/__schema9" }, "verificationTier": { "$ref": "#/$defs/__schema10" }, "evidence": { "$ref": "#/$defs/__schema11" }, "perMerchant": { "$ref": "#/$defs/__schema18" }, "perCampaign": { "$ref": "#/$defs/__schema25" }, "perCategory": { "$ref": "#/$defs/__schema26" }, "period": { "$ref": "#/$defs/__schema27" }, "totalsByToken": { "$ref": "#/$defs/__schema28" }, "pendingConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "visibility": { "$ref": "#/$defs/__schema29" }, "acceptsInvitations": { "$ref": "#/$defs/__schema30" } }, "required": [ "subject", "handle", "displayName", "methodologyVersion", "evidencePeriod", "settledConversions", "directConversions", "networkConversions", "netAttributedValue", "settledCommission", "median", "merchantCount", "campaignCount", "refundAdjustment", "lastIndexedBlock", "verificationTier", "evidence", "perMerchant", "perCampaign", "pendingConversions", "visibility", "acceptsInvitations" ], "additionalProperties": false }, { "type": "object", "properties": { "hidden": { "type": "boolean", "const": true } }, "required": [ "hidden" ], "additionalProperties": false } ], "$defs": { "__schema0": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": [ "string", "null" ] }, "__schema3": { "type": [ "string", "null" ] }, "__schema4": { "type": "string" }, "__schema5": { "type": "object", "properties": { "from": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "to": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] } }, "required": [ "from", "to" ], "additionalProperties": false }, "__schema6": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema7": { "type": "string" }, "__schema8": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "__schema9": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "__schema10": { "type": "string" }, "__schema11": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema12" }, "campaignId": { "$ref": "#/$defs/__schema12" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema1" }, "buyer": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "nodeId": { "$ref": "#/$defs/__schema12" }, "orderKey": { "$ref": "#/$defs/__schema13" }, "policyHash": { "$ref": "#/$defs/__schema13" }, "policyVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "source": { "type": "string", "enum": [ "native", "merchant_attested" ] }, "trustMode": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "price": { "$ref": "#/$defs/__schema7" }, "rewardReserved": { "$ref": "#/$defs/__schema7" }, "token": { "$ref": "#/$defs/__schema14" }, "state": { "type": "string", "enum": [ "PENDING", "REFUNDED", "FINALIZED" ] }, "purchasedAt": { "$ref": "#/$defs/__schema6" }, "unlockAt": { "$ref": "#/$defs/__schema6" }, "allocations": { "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema15" } }, "proceedsState": { "type": "string", "enum": [ "pending", "claimable", "claimed", "refunded" ] }, "purchaseTx": { "$ref": "#/$defs/__schema16" }, "finalizeTx": { "anyOf": [ { "$ref": "#/$defs/__schema16" }, { "type": "null" } ] }, "refundTx": { "anyOf": [ { "$ref": "#/$defs/__schema16" }, { "type": "null" } ] }, "indexedBlock": { "$ref": "#/$defs/__schema7" }, "timeline": { "type": "array", "items": { "type": "object", "properties": { "state": { "type": "string" }, "at": { "$ref": "#/$defs/__schema6" }, "tx": { "$ref": "#/$defs/__schema16" } }, "required": [ "state", "at", "tx" ], "additionalProperties": false } }, "refundRequest": { "anyOf": [ { "type": "object", "properties": { "disputeId": { "$ref": "#/$defs/__schema17" }, "status": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema6" } }, "required": [ "disputeId", "status", "createdAt" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "saleId", "campaignId", "chainId", "contractAddress", "buyer", "nodeId", "orderKey", "policyHash", "policyVersion", "source", "trustMode", "price", "rewardReserved", "token", "state", "purchasedAt", "unlockAt", "allocations", "proceedsState", "purchaseTx", "finalizeTx", "refundTx", "indexedBlock", "timeline" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false }, "__schema12": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema13": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema14": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema1" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "__schema15": { "type": "object", "properties": { "recipient": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "level": { "type": "integer", "minimum": 1, "maximum": 8 }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema7" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "claimTx": { "anyOf": [ { "$ref": "#/$defs/__schema16" }, { "type": "null" } ] } }, "required": [ "recipient", "level", "effectiveWeightBps", "amount", "state", "claimTx" ], "additionalProperties": false }, "__schema16": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema13" }, "blockNumber": { "$ref": "#/$defs/__schema7" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema6" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, "__schema17": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema18": { "type": "array", "items": { "type": "object", "properties": { "name": { "$ref": "#/$defs/__schema19" }, "settledCommission": { "$ref": "#/$defs/__schema20" }, "refunded": { "$ref": "#/$defs/__schema21" }, "levels": { "$ref": "#/$defs/__schema22" }, "lastSettledAt": { "$ref": "#/$defs/__schema23" }, "token": { "$ref": "#/$defs/__schema24" }, "merchantId": { "$ref": "#/$defs/__schema17" }, "receiptIds": { "type": "array", "items": { "$ref": "#/$defs/__schema12" } }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "merchantId", "receiptIds", "settledConversions" ], "additionalProperties": false } }, "__schema19": { "type": "string" }, "__schema20": { "$ref": "#/$defs/__schema7" }, "__schema21": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "__schema22": { "type": "array", "items": { "type": "object", "properties": { "level": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "level", "count" ], "additionalProperties": false } }, "__schema23": { "anyOf": [ { "$ref": "#/$defs/__schema6" }, { "type": "null" } ] }, "__schema24": { "$ref": "#/$defs/__schema14" }, "__schema25": { "type": "array", "items": { "type": "object", "properties": { "name": { "$ref": "#/$defs/__schema19" }, "settledCommission": { "$ref": "#/$defs/__schema20" }, "refunded": { "$ref": "#/$defs/__schema21" }, "levels": { "$ref": "#/$defs/__schema22" }, "lastSettledAt": { "$ref": "#/$defs/__schema23" }, "token": { "$ref": "#/$defs/__schema24" }, "campaignId": { "$ref": "#/$defs/__schema12" }, "receiptIds": { "type": "array", "items": { "$ref": "#/$defs/__schema12" } }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "receiptIds", "settledConversions" ], "additionalProperties": false } }, "__schema26": { "type": "array", "items": { "type": "object", "properties": { "name": { "$ref": "#/$defs/__schema19" }, "settledCommission": { "$ref": "#/$defs/__schema20" }, "refunded": { "$ref": "#/$defs/__schema21" }, "levels": { "$ref": "#/$defs/__schema22" }, "lastSettledAt": { "$ref": "#/$defs/__schema23" }, "token": { "$ref": "#/$defs/__schema24" }, "category": { "type": "string" }, "receiptIds": { "type": "array", "items": { "$ref": "#/$defs/__schema12" } }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "category", "receiptIds", "settledConversions" ], "additionalProperties": false } }, "__schema27": { "type": "string", "enum": [ "all", "90d", "30d" ] }, "__schema28": { "type": "array", "items": { "type": "object", "properties": { "token": { "$ref": "#/$defs/__schema14" }, "netAttributedValue": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "settledCommission": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "refundAdjustment": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] } }, "required": [ "token", "netAttributedValue", "settledCommission", "refundAdjustment" ], "additionalProperties": false } }, "__schema29": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] }, "__schema30": { "type": "boolean" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L352" }, { "name": "reputation.mine", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/reputation", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "subject": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "methodologyVersion": { "type": "string" }, "evidencePeriod": { "type": "object", "properties": { "from": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "to": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] } }, "required": [ "from", "to" ], "additionalProperties": false }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "directConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "networkConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "netAttributedValue": { "$ref": "#/$defs/__schema2" }, "settledCommission": { "$ref": "#/$defs/__schema2" }, "median": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "merchantCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "campaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refundAdjustment": { "$ref": "#/$defs/__schema2" }, "lastIndexedBlock": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "verificationTier": { "type": "string" }, "evidence": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema3" }, "campaignId": { "$ref": "#/$defs/__schema3" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "contractAddress": { "$ref": "#/$defs/__schema0" }, "buyer": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "nodeId": { "$ref": "#/$defs/__schema3" }, "orderKey": { "$ref": "#/$defs/__schema4" }, "policyHash": { "$ref": "#/$defs/__schema4" }, "policyVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "source": { "type": "string", "enum": [ "native", "merchant_attested" ] }, "trustMode": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED", "THIRD_PARTY_VERIFIED" ] }, "price": { "$ref": "#/$defs/__schema2" }, "rewardReserved": { "$ref": "#/$defs/__schema2" }, "token": { "$ref": "#/$defs/__schema5" }, "state": { "type": "string", "enum": [ "PENDING", "REFUNDED", "FINALIZED" ] }, "purchasedAt": { "$ref": "#/$defs/__schema1" }, "unlockAt": { "$ref": "#/$defs/__schema1" }, "allocations": { "maxItems": 8, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "proceedsState": { "type": "string", "enum": [ "pending", "claimable", "claimed", "refunded" ] }, "purchaseTx": { "$ref": "#/$defs/__schema7" }, "finalizeTx": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "refundTx": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] }, "indexedBlock": { "$ref": "#/$defs/__schema2" }, "timeline": { "type": "array", "items": { "type": "object", "properties": { "state": { "type": "string" }, "at": { "$ref": "#/$defs/__schema1" }, "tx": { "$ref": "#/$defs/__schema7" } }, "required": [ "state", "at", "tx" ], "additionalProperties": false } }, "refundRequest": { "anyOf": [ { "type": "object", "properties": { "disputeId": { "$ref": "#/$defs/__schema8" }, "status": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "disputeId", "status", "createdAt" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "saleId", "campaignId", "chainId", "contractAddress", "buyer", "nodeId", "orderKey", "policyHash", "policyVersion", "source", "trustMode", "price", "rewardReserved", "token", "state", "purchasedAt", "unlockAt", "allocations", "proceedsState", "purchaseTx", "finalizeTx", "refundTx", "indexedBlock", "timeline" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false }, "perMerchant": { "type": "array", "items": { "type": "object", "properties": { "name": { "$ref": "#/$defs/__schema9" }, "settledCommission": { "$ref": "#/$defs/__schema10" }, "refunded": { "$ref": "#/$defs/__schema11" }, "levels": { "$ref": "#/$defs/__schema12" }, "lastSettledAt": { "$ref": "#/$defs/__schema13" }, "token": { "$ref": "#/$defs/__schema14" }, "merchantId": { "$ref": "#/$defs/__schema8" }, "receiptIds": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "merchantId", "receiptIds", "settledConversions" ], "additionalProperties": false } }, "perCampaign": { "type": "array", "items": { "type": "object", "properties": { "name": { "$ref": "#/$defs/__schema9" }, "settledCommission": { "$ref": "#/$defs/__schema10" }, "refunded": { "$ref": "#/$defs/__schema11" }, "levels": { "$ref": "#/$defs/__schema12" }, "lastSettledAt": { "$ref": "#/$defs/__schema13" }, "token": { "$ref": "#/$defs/__schema14" }, "campaignId": { "$ref": "#/$defs/__schema3" }, "receiptIds": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "receiptIds", "settledConversions" ], "additionalProperties": false } }, "perCategory": { "type": "array", "items": { "type": "object", "properties": { "name": { "$ref": "#/$defs/__schema9" }, "settledCommission": { "$ref": "#/$defs/__schema10" }, "refunded": { "$ref": "#/$defs/__schema11" }, "levels": { "$ref": "#/$defs/__schema12" }, "lastSettledAt": { "$ref": "#/$defs/__schema13" }, "token": { "$ref": "#/$defs/__schema14" }, "category": { "type": "string" }, "receiptIds": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "category", "receiptIds", "settledConversions" ], "additionalProperties": false } }, "period": { "type": "string", "enum": [ "all", "90d", "30d" ] }, "totalsByToken": { "type": "array", "items": { "type": "object", "properties": { "token": { "$ref": "#/$defs/__schema5" }, "netAttributedValue": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "settledCommission": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "refundAdjustment": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "token", "netAttributedValue", "settledCommission", "refundAdjustment" ], "additionalProperties": false } }, "pendingConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] }, "acceptsInvitations": { "type": "boolean" } }, "required": [ "subject", "handle", "displayName", "methodologyVersion", "evidencePeriod", "settledConversions", "directConversions", "networkConversions", "netAttributedValue", "settledCommission", "median", "merchantCount", "campaignCount", "refundAdjustment", "lastIndexedBlock", "verificationTier", "evidence", "perMerchant", "perCampaign", "pendingConversions", "visibility", "acceptsInvitations" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "string" }, "__schema3": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema4": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema5": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema0" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "__schema6": { "type": "object", "properties": { "recipient": { "type": "object", "properties": { "address": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "level": { "type": "integer", "minimum": 1, "maximum": 8 }, "effectiveWeightBps": { "type": "integer", "minimum": 0, "maximum": 10000 }, "amount": { "$ref": "#/$defs/__schema2" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] }, "claimTx": { "anyOf": [ { "$ref": "#/$defs/__schema7" }, { "type": "null" } ] } }, "required": [ "recipient", "level", "effectiveWeightBps", "amount", "state", "claimTx" ], "additionalProperties": false }, "__schema7": { "type": "object", "properties": { "hash": { "$ref": "#/$defs/__schema4" }, "blockNumber": { "$ref": "#/$defs/__schema2" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema1" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, "__schema8": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema9": { "type": "string" }, "__schema10": { "$ref": "#/$defs/__schema2" }, "__schema11": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "__schema12": { "type": "array", "items": { "type": "object", "properties": { "level": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "level", "count" ], "additionalProperties": false } }, "__schema13": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "__schema14": { "$ref": "#/$defs/__schema5" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L360" }, { "name": "reputation.updateVisibility", "release": "core", "status": "Core live", "route": { "verb": "PATCH", "path": "/me/reputation/visibility", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "level": { "$ref": "#/$defs/__schema0" }, "fields": { "$ref": "#/$defs/__schema1" }, "acceptsInvitations": { "$ref": "#/$defs/__schema2" } }, "required": [ "level" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] }, "__schema1": { "default": [], "type": "array", "items": { "type": "string", "enum": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ] } }, "__schema2": { "default": false, "type": "boolean" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "level": { "$ref": "#/$defs/__schema0" }, "fields": { "$ref": "#/$defs/__schema1" }, "acceptsInvitations": { "$ref": "#/$defs/__schema2" } }, "required": [ "level", "fields", "acceptsInvitations" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] }, "__schema1": { "default": [], "type": "array", "items": { "type": "string", "enum": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ] } }, "__schema2": { "default": false, "type": "boolean" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L361" }, { "name": "reputation.exportCredential", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/me/reputation/credential", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "issuer": { "$ref": "#/$defs/__schema0" }, "subject": { "$ref": "#/$defs/__schema0" }, "issuedAt": { "$ref": "#/$defs/__schema1" }, "evidencePeriod": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ], "additionalProperties": false }, "expiresAt": { "$ref": "#/$defs/__schema1" }, "metrics": { "type": "object", "properties": { "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "netAttributedValue": { "$ref": "#/$defs/__schema2" }, "merchantCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "campaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refundAdjustment": { "$ref": "#/$defs/__schema2" } }, "required": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ], "additionalProperties": false }, "evidenceRoot": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "issuerSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "holderSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "status": { "type": "string", "enum": [ "active", "revoked", "expired" ] } }, "required": [ "id", "issuer", "subject", "issuedAt", "evidencePeriod", "expiresAt", "metrics", "evidenceRoot", "issuerSignature", "holderSignature", "status" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L362" }, { "name": "reputation.credentials", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/me/reputation/credentials", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "issuer": { "$ref": "#/$defs/__schema0" }, "subject": { "$ref": "#/$defs/__schema0" }, "issuedAt": { "$ref": "#/$defs/__schema1" }, "evidencePeriod": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ], "additionalProperties": false }, "expiresAt": { "$ref": "#/$defs/__schema1" }, "metrics": { "type": "object", "properties": { "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "netAttributedValue": { "$ref": "#/$defs/__schema2" }, "merchantCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "campaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refundAdjustment": { "$ref": "#/$defs/__schema2" } }, "required": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ], "additionalProperties": false }, "evidenceRoot": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "issuerSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "holderSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "status": { "type": "string", "enum": [ "active", "revoked", "expired" ] } }, "required": [ "id", "issuer", "subject", "issuedAt", "evidencePeriod", "expiresAt", "metrics", "evidenceRoot", "issuerSignature", "holderSignature", "status" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L363" }, { "name": "reputation.revokeCredential", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "DELETE", "path": "/me/reputation/credentials/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "issuer": { "$ref": "#/$defs/__schema0" }, "subject": { "$ref": "#/$defs/__schema0" }, "issuedAt": { "$ref": "#/$defs/__schema1" }, "evidencePeriod": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ], "additionalProperties": false }, "expiresAt": { "$ref": "#/$defs/__schema1" }, "metrics": { "type": "object", "properties": { "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "netAttributedValue": { "$ref": "#/$defs/__schema2" }, "merchantCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "campaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refundAdjustment": { "$ref": "#/$defs/__schema2" } }, "required": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ], "additionalProperties": false }, "evidenceRoot": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "issuerSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "holderSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "status": { "type": "string", "enum": [ "active", "revoked", "expired" ] } }, "required": [ "id", "issuer", "subject", "issuedAt", "evidencePeriod", "expiresAt", "metrics", "evidenceRoot", "issuerSignature", "holderSignature", "status" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L364" }, { "name": "reputation.verifyCredential", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/credentials/verify", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "credential": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "issuer": { "$ref": "#/$defs/__schema0" }, "subject": { "$ref": "#/$defs/__schema0" }, "issuedAt": { "$ref": "#/$defs/__schema1" }, "evidencePeriod": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ] }, "expiresAt": { "$ref": "#/$defs/__schema1" }, "metrics": { "type": "object", "properties": { "settledConversions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "netAttributedValue": { "$ref": "#/$defs/__schema2" }, "merchantCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "campaignCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refundAdjustment": { "$ref": "#/$defs/__schema2" } }, "required": [ "settledConversions", "netAttributedValue", "merchantCount", "campaignCount", "refundAdjustment" ] }, "evidenceRoot": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "issuerSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "holderSignature": { "type": "string", "pattern": "^0x[\\da-fA-F]+$" }, "status": { "type": "string", "enum": [ "active", "revoked", "expired" ] } }, "required": [ "id", "issuer", "subject", "issuedAt", "evidencePeriod", "expiresAt", "metrics", "evidenceRoot", "issuerSignature", "holderSignature", "status" ] } }, "required": [ "credential" ], "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "valid": { "type": "boolean" }, "checks": { "type": "object", "properties": { "issuerSignature": { "type": "boolean" }, "holderSignature": { "type": "boolean" }, "revocation": { "type": "boolean" }, "expiry": { "type": "boolean" }, "evidenceRoot": { "type": "boolean" } }, "required": [ "issuerSignature", "holderSignature", "revocation", "expiry", "evidenceRoot" ], "additionalProperties": false } }, "required": [ "valid", "checks" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L365" }, { "name": "distributors.search", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/distributors", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "q": { "type": "string", "maxLength": 200 }, "categories": { "type": "array", "items": { "type": "string" } }, "minSettledSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "merchantDiversity": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "recency": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "sort": { "type": "string", "enum": [ "balanced", "settled", "diversity", "recent", "new" ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } }, "nextCursor": { "type": [ "string", "null" ] }, "newDistributors": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "items", "nextCursor", "newDistributors" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous" ] }, "settledConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "merchantCount": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "categories": { "type": "array", "items": { "type": "string" } }, "lastSettledAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "rankSignals": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "number" } }, "required": [ "name", "value" ], "additionalProperties": false } }, "slot": { "type": "string", "enum": [ "ranked", "new" ] }, "rankingVersion": { "type": "string", "const": "discovery-v1" }, "methodologyVersion": { "type": "string" }, "isPartner": { "type": "boolean" } }, "required": [ "address", "handle", "displayName", "visibility", "settledConversions", "merchantCount", "categories", "lastSettledAt", "rankSignals", "slot", "rankingVersion", "methodologyVersion", "isPartner" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L366" }, { "name": "distributors.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/distributors/:address", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } }, "required": [ "address" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous" ] }, "settledConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "merchantCount": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "categories": { "type": "array", "items": { "type": "string" } }, "lastSettledAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "rankSignals": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "number" } }, "required": [ "name", "value" ], "additionalProperties": false } }, "slot": { "type": "string", "enum": [ "ranked", "new" ] }, "rankingVersion": { "type": "string", "const": "discovery-v1" }, "methodologyVersion": { "type": "string" }, "isPartner": { "type": "boolean" } }, "required": [ "address", "handle", "displayName", "visibility", "settledConversions", "merchantCount", "categories", "lastSettledAt", "rankSignals", "slot", "rankingVersion", "methodologyVersion", "isPartner" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L370" }, { "name": "distributors.recommendations", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/recommendations", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous" ] }, "settledConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "merchantCount": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "categories": { "type": "array", "items": { "type": "string" } }, "lastSettledAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "rankSignals": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "number" } }, "required": [ "name", "value" ], "additionalProperties": false } }, "slot": { "type": "string", "enum": [ "ranked", "new" ] }, "rankingVersion": { "type": "string", "const": "discovery-v1" }, "methodologyVersion": { "type": "string" }, "isPartner": { "type": "boolean" }, "reasons": { "type": "array", "items": { "type": "string" } } }, "required": [ "address", "handle", "displayName", "visibility", "settledConversions", "merchantCount", "categories", "lastSettledAt", "rankSignals", "slot", "rankingVersion", "methodologyVersion", "isPartner", "reasons" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L371" }, { "name": "partners.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/partners", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "status": { "type": "string" }, "q": { "type": "string" }, "sort": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous" ] }, "settledConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "merchantCount": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "categories": { "type": "array", "items": { "type": "string" } }, "lastSettledAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "rankSignals": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "number" } }, "required": [ "name", "value" ], "additionalProperties": false } }, "slot": { "type": "string", "enum": [ "ranked", "new" ] }, "rankingVersion": { "type": "string", "const": "discovery-v1" }, "methodologyVersion": { "type": "string" }, "isPartner": { "type": "boolean" }, "linkCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "directSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "networkSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "settledValue": { "$ref": "#/$defs/__schema1" }, "rewards": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema1" }, "readyToFinalize": { "$ref": "#/$defs/__schema1" }, "claimable": { "$ref": "#/$defs/__schema1" }, "claimed": { "$ref": "#/$defs/__schema1" }, "refunded": { "$ref": "#/$defs/__schema1" }, "reversed": { "$ref": "#/$defs/__schema1" } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed" ], "additionalProperties": false }, "firstLinkAt": { "$ref": "#/$defs/__schema0" } }, "required": [ "address", "handle", "displayName", "visibility", "settledConversions", "merchantCount", "categories", "lastSettledAt", "rankSignals", "slot", "rankingVersion", "methodologyVersion", "isPartner", "linkCount", "directSales", "networkSales", "settledValue", "rewards", "firstLinkAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] }, "summary": { "type": "object", "properties": { "partners": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sales": { "$ref": "#/$defs/__schema2" }, "value": { "$ref": "#/$defs/__schema1" }, "series": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema0" }, "sales": { "$ref": "#/$defs/__schema2" }, "value": { "$ref": "#/$defs/__schema1" }, "rewards": { "$ref": "#/$defs/__schema1" }, "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "at", "sales", "value", "rewards", "links" ], "additionalProperties": false } } }, "required": [ "partners", "sales", "value", "series" ], "additionalProperties": false } }, "required": [ "items", "nextCursor", "summary" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "type": "string" }, "__schema2": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L375" }, { "name": "partners.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/partners/:address", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } }, "required": [ "address" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "partner": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous" ] }, "settledConversions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "merchantCount": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "categories": { "type": "array", "items": { "type": "string" } }, "lastSettledAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "rankSignals": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "number" } }, "required": [ "name", "value" ], "additionalProperties": false } }, "slot": { "type": "string", "enum": [ "ranked", "new" ] }, "rankingVersion": { "type": "string", "const": "discovery-v1" }, "methodologyVersion": { "type": "string" }, "isPartner": { "type": "boolean" }, "linkCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "directSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "networkSales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "settledValue": { "$ref": "#/$defs/__schema1" }, "rewards": { "$ref": "#/$defs/__schema2" }, "firstLinkAt": { "$ref": "#/$defs/__schema0" } }, "required": [ "address", "handle", "displayName", "visibility", "settledConversions", "merchantCount", "categories", "lastSettledAt", "rankSignals", "slot", "rankingVersion", "methodologyVersion", "isPartner", "linkCount", "directSales", "networkSales", "settledValue", "rewards", "firstLinkAt" ], "additionalProperties": false }, "nodes": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "$ref": "#/$defs/__schema3" }, "parentNodeId": { "$ref": "#/$defs/__schema3" }, "childCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "nodeId", "parentNodeId", "childCount" ], "additionalProperties": false } }, "sales": { "type": "array", "items": { "type": "object", "properties": { "saleId": { "$ref": "#/$defs/__schema3" }, "level": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "amount": { "$ref": "#/$defs/__schema1" }, "state": { "type": "string", "enum": [ "reserved", "claimable", "claimed", "refunded", "reversed" ] } }, "required": [ "saleId", "level", "amount", "state" ], "additionalProperties": false } }, "rewards": { "$ref": "#/$defs/__schema2" } }, "required": [ "partner", "nodes", "sales", "rewards" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "type": "string" }, "__schema2": { "type": "object", "properties": { "atRisk": { "$ref": "#/$defs/__schema1" }, "readyToFinalize": { "$ref": "#/$defs/__schema1" }, "claimable": { "$ref": "#/$defs/__schema1" }, "claimed": { "$ref": "#/$defs/__schema1" }, "refunded": { "$ref": "#/$defs/__schema1" }, "reversed": { "$ref": "#/$defs/__schema1" } }, "required": [ "atRisk", "readyToFinalize", "claimable", "claimed", "refunded", "reversed" ], "additionalProperties": false }, "__schema3": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L390" }, { "name": "invitations.mine", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/invitations", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "status": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "distributor": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "message": { "type": "string" }, "terms": { "type": "string" }, "parentNodeId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "policyHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "status": { "type": "string", "enum": [ "pending", "accepted", "declined", "withdrawn", "expired" ] }, "expiresAt": { "$ref": "#/$defs/__schema2" }, "withdrawnAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema2" } }, "required": [ "id", "distributor", "campaignId", "merchantId", "message", "terms", "parentNodeId", "policyHash", "status", "expiresAt", "withdrawnAt", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L391" }, { "name": "invitations.sent", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/invitations", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "distributor": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "distributor": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "message": { "type": "string" }, "terms": { "type": "string" }, "parentNodeId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "policyHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "status": { "type": "string", "enum": [ "pending", "accepted", "declined", "withdrawn", "expired" ] }, "expiresAt": { "$ref": "#/$defs/__schema2" }, "withdrawnAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema2" } }, "required": [ "id", "distributor", "campaignId", "merchantId", "message", "terms", "parentNodeId", "policyHash", "status", "expiresAt", "withdrawnAt", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L395" }, { "name": "invitations.send", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/invitations", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "distributor": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "message": { "type": "string", "maxLength": 2000 }, "terms": { "type": "string", "maxLength": 3000 }, "expiresAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "distributor", "campaignId", "message", "terms", "expiresAt" ], "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "distributor": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "message": { "type": "string" }, "terms": { "type": "string" }, "parentNodeId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "policyHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "status": { "type": "string", "enum": [ "pending", "accepted", "declined", "withdrawn", "expired" ] }, "expiresAt": { "$ref": "#/$defs/__schema2" }, "withdrawnAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema2" } }, "required": [ "id", "distributor", "campaignId", "merchantId", "message", "terms", "parentNodeId", "policyHash", "status", "expiresAt", "withdrawnAt", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L399" }, { "name": "invitations.respond", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/me/invitations/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "response": { "type": "string", "enum": [ "accept", "decline" ] }, "reason": { "type": "string", "maxLength": 500 } }, "required": [ "id", "response" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "distributor": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "message": { "type": "string" }, "terms": { "type": "string" }, "parentNodeId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "policyHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "status": { "type": "string", "enum": [ "pending", "accepted", "declined", "withdrawn", "expired" ] }, "expiresAt": { "$ref": "#/$defs/__schema2" }, "withdrawnAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema2" } }, "required": [ "id", "distributor", "campaignId", "merchantId", "message", "terms", "parentNodeId", "policyHash", "status", "expiresAt", "withdrawnAt", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L400" }, { "name": "invitations.withdraw", "release": "core", "status": "Core live", "route": { "verb": "DELETE", "path": "/merchant/invitations/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "distributor": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "merchantId": { "$ref": "#/$defs/__schema0" }, "message": { "type": "string" }, "terms": { "type": "string" }, "parentNodeId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "policyHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "status": { "type": "string", "enum": [ "pending", "accepted", "declined", "withdrawn", "expired" ] }, "expiresAt": { "$ref": "#/$defs/__schema2" }, "withdrawnAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema2" } }, "required": [ "id", "distributor", "campaignId", "merchantId", "message", "terms", "parentNodeId", "policyHash", "status", "expiresAt", "withdrawnAt", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L404" }, { "name": "insights.forDistributor", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/distributors/:address/insights", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } }, "required": [ "address" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "status": { "type": "string", "enum": [ "available", "no_history", "none" ] }, "source": { "type": [ "string", "null" ] }, "fetchedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "labels": { "type": "array", "items": { "type": "string" } }, "networks": { "type": "array", "items": { "type": "string" } }, "scopeNote": { "type": "string" }, "activitySummary": { "anyOf": [ { "type": "object", "properties": { "transactions": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "lastActiveAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] } }, "required": [ "transactions", "lastActiveAt" ], "additionalProperties": false }, { "type": "null" } ] }, "reviewSignals": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "label", "reason" ], "additionalProperties": false } } }, "required": [ "status", "source", "fetchedAt", "labels", "networks", "scopeNote", "activitySummary", "reviewSignals" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L405" }, { "name": "analytics.merchant", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/analytics", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "source": { "type": "string" }, "basis": { "type": "string" }, "compare": { "type": "boolean" } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "period": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ], "additionalProperties": false }, "series": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "totals": { "$ref": "#/$defs/__schema1" }, "previousPeriodTotals": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "depthMix": { "type": "array", "items": { "type": "object", "properties": { "depth": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "sales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "rewards": { "$ref": "#/$defs/__schema2" } }, "required": [ "depth", "sales", "rewards" ], "additionalProperties": false } }, "networkGrowth": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "funnel": { "type": "array", "items": { "type": "object", "properties": { "stage": { "type": "string" }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "estimate": { "type": "boolean" } }, "required": [ "stage", "count", "estimate" ], "additionalProperties": false } }, "cohortGrid": { "type": "array", "items": { "type": "object", "properties": { "cohort": { "$ref": "#/$defs/__schema0" }, "periods": { "type": "array", "items": { "type": "number", "minimum": 0 } } }, "required": [ "cohort", "periods" ], "additionalProperties": false } }, "byCampaign": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "totals": { "$ref": "#/$defs/__schema1" } }, "required": [ "campaignId", "totals" ], "additionalProperties": false } } }, "required": [ "period", "series", "totals", "previousPeriodTotals", "depthMix", "networkGrowth", "funnel", "cohortGrid", "byCampaign" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema0" }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "value": { "$ref": "#/$defs/__schema2" }, "rewards": { "$ref": "#/$defs/__schema2" }, "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "at", "sales", "value", "rewards", "links" ], "additionalProperties": false }, "__schema2": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L406" }, { "name": "analytics.campaign", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/campaigns/:campaignId/analytics", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "campaignId": { "$ref": "#/$defs/__schema0" }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "campaignId" ], "$defs": { "__schema0": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "period": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ], "additionalProperties": false }, "series": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "totals": { "$ref": "#/$defs/__schema1" }, "previousPeriodTotals": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "depthMix": { "type": "array", "items": { "type": "object", "properties": { "depth": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "sales": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "rewards": { "$ref": "#/$defs/__schema2" } }, "required": [ "depth", "sales", "rewards" ], "additionalProperties": false } }, "networkGrowth": { "type": "array", "items": { "$ref": "#/$defs/__schema1" } }, "funnel": { "type": "array", "items": { "type": "object", "properties": { "stage": { "type": "string" }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "estimate": { "type": "boolean" } }, "required": [ "stage", "count", "estimate" ], "additionalProperties": false } }, "cohortGrid": { "type": "array", "items": { "type": "object", "properties": { "cohort": { "$ref": "#/$defs/__schema0" }, "periods": { "type": "array", "items": { "type": "number", "minimum": 0 } } }, "required": [ "cohort", "periods" ], "additionalProperties": false } }, "byCampaign": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "totals": { "$ref": "#/$defs/__schema1" } }, "required": [ "campaignId", "totals" ], "additionalProperties": false } } }, "required": [ "period", "series", "totals", "previousPeriodTotals", "depthMix", "networkGrowth", "funnel", "cohortGrid", "byCampaign" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema0" }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "value": { "$ref": "#/$defs/__schema2" }, "rewards": { "$ref": "#/$defs/__schema2" }, "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "at", "sales", "value", "rewards", "links" ], "additionalProperties": false }, "__schema2": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L414" }, { "name": "reports.export", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/reports", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "range": { "$ref": "#/$defs/__schema0" }, "campaignIds": { "$ref": "#/$defs/__schema2" }, "kind": { "type": "string", "enum": [ "sales", "vault", "distributorEarnings", "partners", "analytics" ] }, "filters": { "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "range": { "$ref": "#/$defs/__schema0" }, "campaignIds": { "$ref": "#/$defs/__schema2" }, "q": { "type": "string", "maxLength": 200 }, "state": { "type": "string", "enum": [ "PENDING", "FINALIZED", "REFUNDED" ] }, "campaignId": { "$ref": "#/$defs/__schema3" }, "source": { "type": "string", "enum": [ "NATIVE_ONCHAIN", "MERCHANT_ATTESTED" ] }, "provider": { "type": "string" }, "unlockBefore": { "$ref": "#/$defs/__schema1" } } }, "format": { "type": "string", "enum": [ "csv", "json" ] } }, "required": [ "kind", "format" ], "$defs": { "__schema0": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ] }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "array", "items": { "$ref": "#/$defs/__schema3" } }, "__schema3": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "url": { "type": "string", "format": "uri" } }, "required": [ "url" ], "additionalProperties": false }, { "type": "object", "properties": { "jobId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "status": { "type": "string", "enum": [ "queued", "running", "ready", "failed" ] }, "url": { "type": [ "string", "null" ] }, "expiresAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "jobId", "status", "url" ], "additionalProperties": false } ] }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L415" }, { "name": "reports.preview", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/reports/preview", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "counts": { "type": "array", "items": { "type": "object", "properties": { "kind": { "type": "string" }, "rows": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "kind", "rows" ], "additionalProperties": false } }, "reconciliation": { "type": "object", "properties": { "matches": { "type": "boolean" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "rewardIndex": { "$ref": "#/$defs/__schema1" }, "rewardChain": { "$ref": "#/$defs/__schema1" }, "proceedsIndex": { "$ref": "#/$defs/__schema2" }, "proceedsChain": { "$ref": "#/$defs/__schema2" }, "mismatches": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "field": { "type": "string" }, "indexed": { "$ref": "#/$defs/__schema0" }, "canonical": { "$ref": "#/$defs/__schema0" } }, "required": [ "campaignId", "field", "indexed", "canonical" ], "additionalProperties": false } } }, "required": [ "matches", "blockNumber", "rewardIndex", "rewardChain", "proceedsIndex", "proceedsChain", "mismatches" ], "additionalProperties": false } }, "required": [ "counts", "reconciliation" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "object", "properties": { "netDeposited": { "$ref": "#/$defs/__schema0" }, "available": { "$ref": "#/$defs/__schema0" }, "pendingReserved": { "$ref": "#/$defs/__schema0" }, "vestedUnclaimed": { "$ref": "#/$defs/__schema0" }, "rewardsClaimed": { "$ref": "#/$defs/__schema0" }, "surplusWithdrawn": { "$ref": "#/$defs/__schema0" } }, "required": [ "netDeposited", "available", "pendingReserved", "vestedUnclaimed", "rewardsClaimed", "surplusWithdrawn" ], "additionalProperties": false }, "__schema2": { "type": "object", "properties": { "proceedsPending": { "$ref": "#/$defs/__schema0" }, "proceedsClaimable": { "$ref": "#/$defs/__schema0" }, "proceedsClaimed": { "$ref": "#/$defs/__schema0" }, "buyerRefunded": { "$ref": "#/$defs/__schema0" } }, "required": [ "proceedsPending", "proceedsClaimable", "proceedsClaimed", "buyerRefunded" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L416" }, { "name": "reports.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/reports", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "jobId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "status": { "type": "string", "enum": [ "queued", "running", "ready", "failed" ] }, "url": { "type": [ "string", "null" ] }, "expiresAt": { "$ref": "#/$defs/__schema0" }, "kind": { "type": "string", "enum": [ "sales", "vault", "distributorEarnings", "partners", "analytics" ] }, "period": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ], "additionalProperties": false }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "blockNumber": { "$ref": "#/$defs/__schema1" }, "rows": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "anyOf": [ { "type": "string", "pattern": "^[\\da-f]{64}$" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema0" } }, "required": [ "jobId", "status", "url", "kind", "period", "campaignIds", "blockNumber", "rows", "size", "sha256", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L417" }, { "name": "studio.templates", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/policy-templates", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "policy": { "$ref": "#/$defs/__schema0" }, "status": { "type": "string", "enum": [ "active", "archived" ] }, "createdAt": { "$ref": "#/$defs/__schema10" }, "category": { "type": [ "string", "null" ] }, "description": { "type": "string" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "updatedAt": { "$ref": "#/$defs/__schema10" }, "history": { "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "policy": { "$ref": "#/$defs/__schema0" }, "savedAt": { "$ref": "#/$defs/__schema10" } }, "required": [ "version", "policy", "savedAt" ], "additionalProperties": false } }, "usedBy": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema3" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "version" ], "additionalProperties": false } } }, "required": [ "id", "name", "policy", "status", "createdAt" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema1" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema10": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L418" }, { "name": "studio.saveTemplate", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/policy-templates", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string", "minLength": 2, "maxLength": 100 }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema0" }, "commissionBps": { "$ref": "#/$defs/__schema1" }, "perSaleCap": { "$ref": "#/$defs/__schema2" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema2" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema3" }, "weightsBps": { "$ref": "#/$defs/__schema4" }, "shortPathMode": { "$ref": "#/$defs/__schema6" }, "holdSeconds": { "$ref": "#/$defs/__schema7" }, "expiry": { "$ref": "#/$defs/__schema2" }, "eligibilityHash": { "$ref": "#/$defs/__schema8" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false } }, "required": [ "name", "policy" ], "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema2": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "__schema3": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema4": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema5" } }, "__schema5": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema6": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema7": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema8": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "policy": { "$ref": "#/$defs/__schema0" }, "status": { "type": "string", "enum": [ "active", "archived" ] }, "createdAt": { "$ref": "#/$defs/__schema10" }, "category": { "type": [ "string", "null" ] }, "description": { "type": "string" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "updatedAt": { "$ref": "#/$defs/__schema10" }, "history": { "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "policy": { "$ref": "#/$defs/__schema0" }, "savedAt": { "$ref": "#/$defs/__schema10" } }, "required": [ "version", "policy", "savedAt" ], "additionalProperties": false } }, "usedBy": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema3" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "campaignId", "version" ], "additionalProperties": false } } }, "required": [ "id", "name", "policy", "status", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema1" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema3" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema3" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema4" }, "weightsBps": { "$ref": "#/$defs/__schema5" }, "shortPathMode": { "$ref": "#/$defs/__schema7" }, "holdSeconds": { "$ref": "#/$defs/__schema8" }, "expiry": { "$ref": "#/$defs/__schema3" }, "eligibilityHash": { "$ref": "#/$defs/__schema9" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "shortPathMode", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "string" }, "__schema4": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema5": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema6" } }, "__schema6": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema7": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema8": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema9": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema10": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L419" }, { "name": "studio.simulate", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/policies/simulate", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "price": { "$ref": "#/$defs/__schema0" }, "policy": { "type": "object", "properties": { "rewardToken": { "$ref": "#/$defs/__schema1" }, "commissionBps": { "$ref": "#/$defs/__schema2" }, "perSaleCap": { "$ref": "#/$defs/__schema0" }, "campaignLiabilityCap": { "$ref": "#/$defs/__schema0" }, "maxRewardedAncestors": { "$ref": "#/$defs/__schema3" }, "weightsBps": { "$ref": "#/$defs/__schema4" }, "shortPathMode": { "$ref": "#/$defs/__schema6" }, "holdSeconds": { "$ref": "#/$defs/__schema7" }, "expiry": { "$ref": "#/$defs/__schema0" }, "eligibilityHash": { "$ref": "#/$defs/__schema8" } }, "required": [ "rewardToken", "commissionBps", "perSaleCap", "campaignLiabilityCap", "maxRewardedAncestors", "weightsBps", "holdSeconds", "expiry", "eligibilityHash" ], "additionalProperties": false }, "pathLengths": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/$defs/__schema9" } } }, "required": [ "price", "policy", "pathLengths" ], "$defs": { "__schema0": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, "__schema1": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema2": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema3": { "type": "integer", "minimum": 1, "maximum": 5 }, "__schema4": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "$ref": "#/$defs/__schema5" } }, "__schema5": { "type": "integer", "minimum": 1, "maximum": 10000 }, "__schema6": { "default": "RENORMALIZE_EXISTING", "type": "string", "enum": [ "RENORMALIZE_EXISTING", "RETURN_UNUSED" ] }, "__schema7": { "type": "integer", "minimum": 60, "maximum": 7776000 }, "__schema8": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "__schema9": { "type": "integer", "minimum": 0, "maximum": 256 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "policyHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "simulations": { "type": "array", "items": { "type": "object", "properties": { "pathLength": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "weightsBps": { "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "amounts": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } }, "reserved": { "$ref": "#/$defs/__schema0" }, "unallocated": { "$ref": "#/$defs/__schema0" } }, "required": [ "pathLength", "weightsBps", "amounts", "reserved", "unallocated" ], "additionalProperties": false } }, "contractChecks": { "type": "array", "items": { "type": "object", "properties": { "nodeId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "pathLength": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "amounts": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } }, "rewardTotal": { "$ref": "#/$defs/__schema0" }, "matches": { "type": "boolean" }, "blockNumber": { "$ref": "#/$defs/__schema0" } }, "required": [ "nodeId", "pathLength", "amounts", "rewardTotal", "matches", "blockNumber" ], "additionalProperties": false } } }, "required": [ "policyHash", "simulations" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L423" }, { "name": "disputes.open", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/me/refund-requests", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "saleId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "reason": { "type": "string", "minLength": 3, "maxLength": 100 }, "message": { "type": "string", "minLength": 20, "maxLength": 3000 } }, "required": [ "saleId", "reason", "message" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "disputeId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "status": { "type": "string", "const": "open" } }, "required": [ "disputeId", "status" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L431" }, { "name": "disputes.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/disputes", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "kind": { "type": "string", "enum": [ "refund_request", "attribution_appeal", "moderation_appeal", "chargeback" ] }, "status": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "saleId": { "$ref": "#/$defs/__schema1" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "kind": { "type": "string", "enum": [ "refund_request", "attribution_appeal", "moderation_appeal", "chargeback" ] }, "status": { "type": "string", "enum": [ "open", "refunded", "declined", "explained", "escalated", "appealed", "covered" ] }, "reason": { "type": "string" }, "message": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema3" }, "events": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "at": { "$ref": "#/$defs/__schema3" }, "actor": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "kind": { "type": "string" }, "message": { "type": "string" }, "tx": { "anyOf": [ { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema2" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema3" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "id", "at", "actor", "kind", "message", "tx" ], "additionalProperties": false } } }, "required": [ "id", "saleId", "campaignId", "kind", "status", "reason", "message", "createdAt", "events" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L439" }, { "name": "disputes.get", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/disputes/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "saleId": { "$ref": "#/$defs/__schema1" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "kind": { "type": "string", "enum": [ "refund_request", "attribution_appeal", "moderation_appeal", "chargeback" ] }, "status": { "type": "string", "enum": [ "open", "refunded", "declined", "explained", "escalated", "appealed", "covered" ] }, "reason": { "type": "string" }, "message": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema3" }, "events": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "at": { "$ref": "#/$defs/__schema3" }, "actor": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "kind": { "type": "string" }, "message": { "type": "string" }, "tx": { "anyOf": [ { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema2" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema3" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "id", "at", "actor", "kind", "message", "tx" ], "additionalProperties": false } } }, "required": [ "id", "saleId", "campaignId", "kind", "status", "reason", "message", "createdAt", "events" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L448" }, { "name": "disputes.respond", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/merchant/disputes/:id/responses", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "outcome": { "type": "string", "enum": [ "refunded", "declined", "explained", "escalated", "appealed", "covered" ] }, "message": { "type": "string", "minLength": 10, "maxLength": 3000 } }, "required": [ "id", "outcome", "message" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "saleId": { "$ref": "#/$defs/__schema1" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "kind": { "type": "string", "enum": [ "refund_request", "attribution_appeal", "moderation_appeal", "chargeback" ] }, "status": { "type": "string", "enum": [ "open", "refunded", "declined", "explained", "escalated", "appealed", "covered" ] }, "reason": { "type": "string" }, "message": { "type": "string" }, "createdAt": { "$ref": "#/$defs/__schema3" }, "events": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "at": { "$ref": "#/$defs/__schema3" }, "actor": { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, "kind": { "type": "string" }, "message": { "type": "string" }, "tx": { "anyOf": [ { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "$ref": "#/$defs/__schema2" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema3" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "id", "at", "actor", "kind", "message", "tx" ], "additionalProperties": false } } }, "required": [ "id", "saleId", "campaignId", "kind", "status", "reason", "message", "createdAt", "events" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "__schema2": { "type": "string" }, "__schema3": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L449" }, { "name": "disputes.exposure", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/disputes/exposure", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "openRefundRequests": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refundValue": { "$ref": "#/$defs/__schema0" }, "appeals": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "chargebacks": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "riskDebt": { "$ref": "#/$defs/__schema0" } }, "required": [ "openRefundRequests", "refundValue", "appeals", "chargebacks", "riskDebt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L456" }, { "name": "billing.summary", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/billing", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "feeBps": { "type": "number", "const": 0 }, "period": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ], "additionalProperties": false }, "totals": { "type": "array", "items": { "type": "object", "properties": { "token": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false }, "settledValue": { "$ref": "#/$defs/__schema1" }, "protocolFees": { "$ref": "#/$defs/__schema1" } }, "required": [ "token", "settledValue", "protocolFees" ], "additionalProperties": false } } }, "required": [ "feeBps", "period", "totals" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L466" }, { "name": "billing.invoices", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/merchant/billing/invoices", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "period": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ], "additionalProperties": false }, "amount": { "type": "string" }, "currency": { "type": "string" }, "status": { "type": "string", "enum": [ "draft", "issued", "paid", "void" ] }, "url": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] } }, "required": [ "id", "period", "amount", "currency", "status", "url" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L467" }, { "name": "integrations.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/integrations", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "provider": { "type": "string", "enum": [ "shopify", "stripe", "woocommerce" ] }, "status": { "type": "string", "enum": [ "connected", "disconnected", "error", "pending" ] }, "connectedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "lastSyncAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] } }, "required": [ "id", "provider", "status", "connectedAt", "lastSyncAt" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L468" }, { "name": "integrations.connect", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/merchant/integrations/:provider", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string", "enum": [ "shopify", "stripe", "woocommerce" ] }, "storeUrl": { "type": "string", "format": "uri" }, "authorizationCode": { "type": "string" } }, "required": [ "provider" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "provider": { "type": "string", "enum": [ "shopify", "stripe", "woocommerce" ] }, "status": { "type": "string", "enum": [ "connected", "disconnected", "error", "pending" ] }, "connectedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "lastSyncAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] } }, "required": [ "id", "provider", "status", "connectedAt", "lastSyncAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L469" }, { "name": "integrations.disconnect", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "DELETE", "path": "/merchant/integrations/:provider", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string" } }, "required": [ "provider" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L477" }, { "name": "integrations.status", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/integrations/:provider/status", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string" }, "refresh": { "type": "boolean" } }, "required": [ "provider" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "lastSyncAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "pendingOrders": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sourceTotal": { "$ref": "#/$defs/__schema0" }, "attestedTotal": { "$ref": "#/$defs/__schema0" }, "acceptedTotal": { "$ref": "#/$defs/__schema0" }, "mismatches": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "kind": { "type": "string" }, "severity": { "type": "string", "enum": [ "info", "warning", "critical" ] }, "sourceOrderId": { "type": "string" }, "saleId": { "anyOf": [ { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, { "type": "null" } ] }, "suggestedAction": { "type": "string" } }, "required": [ "id", "kind", "severity", "sourceOrderId", "saleId", "suggestedAction" ], "additionalProperties": false } } }, "required": [ "lastSyncAt", "pendingOrders", "sourceTotal", "attestedTotal", "acceptedTotal", "mismatches" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L478" }, { "name": "integrations.reconciliation", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/integrations/:provider/reconciliation", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "provider": { "type": "string" }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "required": [ "provider" ], "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "lastSyncAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "pendingOrders": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sourceTotal": { "$ref": "#/$defs/__schema0" }, "attestedTotal": { "$ref": "#/$defs/__schema0" }, "acceptedTotal": { "$ref": "#/$defs/__schema0" }, "mismatches": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "kind": { "type": "string" }, "severity": { "type": "string", "enum": [ "info", "warning", "critical" ] }, "sourceOrderId": { "type": "string" }, "saleId": { "anyOf": [ { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, { "type": "null" } ] }, "suggestedAction": { "type": "string" } }, "required": [ "id", "kind", "severity", "sourceOrderId", "saleId", "suggestedAction" ], "additionalProperties": false } } }, "required": [ "lastSyncAt", "pendingOrders", "sourceTotal", "attestedTotal", "acceptedTotal", "mismatches" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L482" }, { "name": "integrations.resolveMismatch", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/merchant/integrations/mismatches/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "note": { "type": "string", "minLength": 20, "maxLength": 1000 } }, "required": [ "id", "note" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "actor": { "type": "string" }, "role": { "type": "string" }, "resource": { "type": "string" }, "action": { "type": "string" }, "beforeHash": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "afterHash": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "actor", "role", "resource", "action", "beforeHash", "afterHash", "at" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L486" }, { "name": "signers.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/signers", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "address": { "$ref": "#/$defs/__schema0" }, "scopes": { "type": "array", "items": { "type": "string" } }, "limits": { "type": "object", "properties": { "perOrder": { "$ref": "#/$defs/__schema1" }, "daily": { "$ref": "#/$defs/__schema1" } }, "required": [ "perOrder", "daily" ], "additionalProperties": false }, "expiry": { "$ref": "#/$defs/__schema2" }, "revokedAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] }, "usedToday": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "address", "scopes", "limits", "expiry", "revokedAt", "usedToday" ], "additionalProperties": false } }, "policy": { "type": "object", "properties": { "domain": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "verifyingContract": { "$ref": "#/$defs/__schema0" } }, "required": [ "name", "version", "chainId", "verifyingContract" ], "additionalProperties": false }, "nonceRule": { "type": "string" }, "maxValiditySeconds": { "type": "number", "const": 900 } }, "required": [ "domain", "nonceRule", "maxValiditySeconds" ], "additionalProperties": false } }, "required": [ "items", "policy" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L490" }, { "name": "signers.add", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/merchant/signers", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "scopes": { "type": "array", "items": { "type": "string" } }, "limits": { "type": "object", "properties": { "perOrder": { "$ref": "#/$defs/__schema0" }, "daily": { "$ref": "#/$defs/__schema0" } }, "required": [ "perOrder", "daily" ] }, "expiry": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "address", "scopes", "limits", "expiry" ], "$defs": { "__schema0": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "scopes": { "type": "array", "items": { "type": "string" } }, "limits": { "type": "object", "properties": { "perOrder": { "$ref": "#/$defs/__schema0" }, "daily": { "$ref": "#/$defs/__schema0" } }, "required": [ "perOrder", "daily" ], "additionalProperties": false }, "expiry": { "$ref": "#/$defs/__schema1" }, "revokedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "usedToday": { "$ref": "#/$defs/__schema0" } }, "required": [ "id", "address", "scopes", "limits", "expiry", "revokedAt", "usedToday" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L506" }, { "name": "signers.revoke", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "DELETE", "path": "/merchant/signers/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "scopes": { "type": "array", "items": { "type": "string" } }, "limits": { "type": "object", "properties": { "perOrder": { "$ref": "#/$defs/__schema0" }, "daily": { "$ref": "#/$defs/__schema0" } }, "required": [ "perOrder", "daily" ], "additionalProperties": false }, "expiry": { "$ref": "#/$defs/__schema1" }, "revokedAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "usedToday": { "$ref": "#/$defs/__schema0" } }, "required": [ "id", "address", "scopes", "limits", "expiry", "revokedAt", "usedToday" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L510" }, { "name": "signers.attestations", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/signers/:id/attestations", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 }, "outcome": { "type": "string" }, "nonce": { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "orderHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "nonce": { "$ref": "#/$defs/__schema0" }, "campaignId": { "$ref": "#/$defs/__schema1" }, "amount": { "$ref": "#/$defs/__schema0" }, "outcome": { "type": "string", "enum": [ "accepted", "rejected", "pending" ] }, "saleId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "orderHash", "nonce", "campaignId", "amount", "outcome", "saleId", "at" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L511" }, { "name": "apiKeys.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/developer/keys", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "prefix": { "type": "string" }, "scopes": { "type": "array", "items": { "type": "string" } }, "createdAt": { "$ref": "#/$defs/__schema0" }, "lastUsedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] } }, "required": [ "id", "prefix", "scopes", "createdAt", "lastUsedAt", "revokedAt" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L517" }, { "name": "apiKeys.create", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/developer/keys", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 }, "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "scopes": { "minItems": 1, "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "confirmationToken", "name", "scopes" ], "$defs": { "__schema0": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "prefix": { "type": "string" }, "scopes": { "type": "array", "items": { "type": "string" } }, "createdAt": { "$ref": "#/$defs/__schema0" }, "lastUsedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "secret": { "type": "string" } }, "required": [ "id", "prefix", "scopes", "createdAt", "lastUsedAt", "revokedAt", "secret" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L518" }, { "name": "apiKeys.revoke", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "DELETE", "path": "/developer/keys/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L522" }, { "name": "apiKeys.usage", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/developer/keys/:id/usage", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "range": { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema0" }, "to": { "$ref": "#/$defs/__schema0" } }, "required": [ "from", "to" ] }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "required": [ "id" ], "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "hourly": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema0" }, "statusClass": { "type": "string" }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "at", "statusClass", "count" ], "additionalProperties": false } }, "requests": { "maxItems": 50, "type": "array", "items": { "$ref": "#/$defs/__schema1" } } }, "required": [ "hourly", "requests" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema1": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema0" }, "method": { "type": "string" }, "path": { "type": "string" }, "status": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "latencyMs": { "type": "number", "minimum": 0 }, "requestId": { "type": "string" } }, "required": [ "at", "method", "path", "status", "latencyMs", "requestId" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L523" }, { "name": "webhooks.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/developer/webhooks", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "url": { "type": "string", "format": "uri" }, "events": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "url", "events", "enabled", "createdAt" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L536" }, { "name": "webhooks.create", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/developer/webhooks", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "url": { "type": "string", "format": "uri" }, "events": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "url", "events" ], "$defs": { "__schema0": { "type": "string" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "url": { "type": "string", "format": "uri" }, "events": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "secret": { "type": "string" } }, "required": [ "id", "url", "events", "enabled", "createdAt", "secret" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L537" }, { "name": "webhooks.test", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/developer/webhooks/:id/test", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "endpointId": { "$ref": "#/$defs/__schema0" }, "eventId": { "$ref": "#/$defs/__schema0" }, "attempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "queued", "sending", "delivered", "failed", "cancelled" ] }, "httpStatus": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "nextAttemptAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "endpointId", "eventId", "attempt", "status", "httpStatus", "nextAttemptAt", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L538" }, { "name": "webhooks.deliveries", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/developer/webhooks/:id/deliveries", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "endpointId": { "$ref": "#/$defs/__schema0" }, "eventId": { "$ref": "#/$defs/__schema0" }, "attempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "queued", "sending", "delivered", "failed", "cancelled" ] }, "httpStatus": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "nextAttemptAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "endpointId", "eventId", "attempt", "status", "httpStatus", "nextAttemptAt", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L539" }, { "name": "webhooks.update", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "PATCH", "path": "/developer/webhooks/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "events": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "url": { "type": "string", "format": "uri" }, "events": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "url", "events", "enabled", "createdAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L540" }, { "name": "webhooks.rotateSecret", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/developer/webhooks/:id/secret", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "secret": { "type": "string" }, "oldSecretExpiresAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "secret", "oldSecretExpiresAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L544" }, { "name": "webhooks.remove", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "DELETE", "path": "/developer/webhooks/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L548" }, { "name": "webhooks.replay", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/developer/webhooks/deliveries/:id/replay", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "endpointId": { "$ref": "#/$defs/__schema0" }, "eventId": { "$ref": "#/$defs/__schema0" }, "attempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "queued", "sending", "delivered", "failed", "cancelled" ] }, "httpStatus": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "nextAttemptAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "createdAt": { "$ref": "#/$defs/__schema1" } }, "required": [ "id", "endpointId", "eventId", "attempt", "status", "httpStatus", "nextAttemptAt", "createdAt" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L549" }, { "name": "team.members", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/team", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "role": { "type": "string", "enum": [ "owner", "admin", "analyst", "viewer" ] }, "status": { "type": "string", "enum": [ "invited", "active", "removed" ] }, "joinedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] } }, "required": [ "id", "address", "role", "status", "joinedAt" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L550" }, { "name": "team.invite", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/merchant/team", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "role": { "type": "string", "enum": [ "admin", "analyst", "viewer" ] } }, "required": [ "address", "role" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "role": { "type": "string", "enum": [ "owner", "admin", "analyst", "viewer" ] }, "status": { "type": "string", "enum": [ "invited", "active", "removed" ] }, "joinedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] } }, "required": [ "id", "address", "role", "status", "joinedAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L551" }, { "name": "team.updateRole", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "PATCH", "path": "/merchant/team/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "role": { "type": "string", "enum": [ "admin", "analyst", "viewer" ] } }, "required": [ "id", "role" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "role": { "type": "string", "enum": [ "owner", "admin", "analyst", "viewer" ] }, "status": { "type": "string", "enum": [ "invited", "active", "removed" ] }, "joinedAt": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] } }, "required": [ "id", "address", "role", "status", "joinedAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L555" }, { "name": "team.remove", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "DELETE", "path": "/merchant/team/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L559" }, { "name": "team.audit", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/team/audit", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "actor": { "type": "string" }, "role": { "type": "string" }, "resource": { "type": "string" }, "action": { "type": "string" }, "beforeHash": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "afterHash": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "actor", "role", "resource", "action", "beforeHash", "afterHash", "at" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L560" }, { "name": "team.transferOwnership", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/merchant/team/transfer", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "confirmationToken": { "type": "string", "minLength": 32, "maxLength": 128 } }, "required": [ "address", "confirmationToken" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L561" }, { "name": "subscriptions.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/subscriptions", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "name": { "type": "string" }, "billingPeriod": { "type": "string", "enum": [ "monthly", "yearly" ] }, "subscribers": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "renewalCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "rewards": { "$ref": "#/$defs/__schema1" }, "cap": { "$ref": "#/$defs/__schema1" }, "nextRenewalAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "id", "renewalCount", "rewards", "cap", "nextRenewalAt" ], "additionalProperties": false } }, "series": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema2" }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "value": { "$ref": "#/$defs/__schema1" }, "rewards": { "$ref": "#/$defs/__schema1" }, "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "at", "sales", "value", "rewards", "links" ], "additionalProperties": false } } }, "required": [ "id", "campaignId", "name", "billingPeriod", "subscribers", "series" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L562" }, { "name": "subscriptions.get", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/merchant/subscriptions/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "name": { "type": "string" }, "billingPeriod": { "type": "string", "enum": [ "monthly", "yearly" ] }, "subscribers": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "renewalCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "rewards": { "$ref": "#/$defs/__schema1" }, "cap": { "$ref": "#/$defs/__schema1" }, "nextRenewalAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "id", "renewalCount", "rewards", "cap", "nextRenewalAt" ], "additionalProperties": false } }, "series": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema2" }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "value": { "$ref": "#/$defs/__schema1" }, "rewards": { "$ref": "#/$defs/__schema1" }, "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "at", "sales", "value", "rewards", "links" ], "additionalProperties": false } } }, "required": [ "id", "campaignId", "name", "billingPeriod", "subscribers", "series" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L563" }, { "name": "subscriptions.save", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "PUT", "path": "/merchant/subscriptions/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "campaignId": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "name": { "type": "string" }, "billingPeriod": { "type": "string", "enum": [ "monthly", "yearly" ] } }, "required": [ "id", "campaignId", "name", "billingPeriod" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "name": { "type": "string" }, "billingPeriod": { "type": "string", "enum": [ "monthly", "yearly" ] }, "subscribers": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "renewalCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "rewards": { "$ref": "#/$defs/__schema1" }, "cap": { "$ref": "#/$defs/__schema1" }, "nextRenewalAt": { "anyOf": [ { "$ref": "#/$defs/__schema2" }, { "type": "null" } ] } }, "required": [ "id", "renewalCount", "rewards", "cap", "nextRenewalAt" ], "additionalProperties": false } }, "series": { "type": "array", "items": { "type": "object", "properties": { "at": { "$ref": "#/$defs/__schema2" }, "sales": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false }, "value": { "$ref": "#/$defs/__schema1" }, "rewards": { "$ref": "#/$defs/__schema1" }, "links": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "at", "sales", "value", "rewards", "links" ], "additionalProperties": false } } }, "required": [ "id", "campaignId", "name", "billingPeriod", "subscribers", "series" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "__schema1": { "type": "string" }, "__schema2": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L564" }, { "name": "partnerships.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/partnerships", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "fromMerchantId": { "$ref": "#/$defs/__schema0" }, "toMerchantId": { "$ref": "#/$defs/__schema0" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "terms": { "type": "string" }, "status": { "type": "string", "enum": [ "proposed", "accepted", "declined", "notice", "withdrawn", "terminated" ] }, "versionHistory": { "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "terms": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "terms", "at" ], "additionalProperties": false } }, "performance": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false } }, "required": [ "id", "fromMerchantId", "toMerchantId", "campaignIds", "terms", "status", "versionHistory", "performance" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L572" }, { "name": "partnerships.propose", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/partnerships", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "toMerchantId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "terms": { "type": "string" } }, "required": [ "toMerchantId", "campaignIds", "terms" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "fromMerchantId": { "$ref": "#/$defs/__schema0" }, "toMerchantId": { "$ref": "#/$defs/__schema0" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "terms": { "type": "string" }, "status": { "type": "string", "enum": [ "proposed", "accepted", "declined", "notice", "withdrawn", "terminated" ] }, "versionHistory": { "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "terms": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "terms", "at" ], "additionalProperties": false } }, "performance": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false } }, "required": [ "id", "fromMerchantId", "toMerchantId", "campaignIds", "terms", "status", "versionHistory", "performance" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L573" }, { "name": "partnerships.respond", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/partnerships/:id/responses", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "response": { "type": "string", "enum": [ "accept", "decline" ] }, "reason": { "type": "string" } }, "required": [ "id", "response" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "fromMerchantId": { "$ref": "#/$defs/__schema0" }, "toMerchantId": { "$ref": "#/$defs/__schema0" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "terms": { "type": "string" }, "status": { "type": "string", "enum": [ "proposed", "accepted", "declined", "notice", "withdrawn", "terminated" ] }, "versionHistory": { "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "terms": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "terms", "at" ], "additionalProperties": false } }, "performance": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false } }, "required": [ "id", "fromMerchantId", "toMerchantId", "campaignIds", "terms", "status", "versionHistory", "performance" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L577" }, { "name": "partnerships.terminate", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/partnerships/:id/terminate", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "mode": { "type": "string", "enum": [ "notice", "withdraw" ] } }, "required": [ "id", "mode" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "$ref": "#/$defs/__schema0" }, "fromMerchantId": { "$ref": "#/$defs/__schema0" }, "toMerchantId": { "$ref": "#/$defs/__schema0" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "terms": { "type": "string" }, "status": { "type": "string", "enum": [ "proposed", "accepted", "declined", "notice", "withdrawn", "terminated" ] }, "versionHistory": { "type": "array", "items": { "type": "object", "properties": { "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "terms": { "type": "string" }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "version", "terms", "at" ], "additionalProperties": false } }, "performance": { "type": "object", "properties": { "pending": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "finalized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "refunded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "pending", "finalized", "refunded" ], "additionalProperties": false } }, "required": [ "id", "fromMerchantId", "toMerchantId", "campaignIds", "terms", "status", "versionHistory", "performance" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L581" }, { "name": "communities.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/communities", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "owner": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "name": { "type": "string" }, "description": { "type": "string" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "memberCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "owner", "name", "description", "campaignIds", "memberCount", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L585" }, { "name": "communities.get", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/communities/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "owner": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "name": { "type": "string" }, "description": { "type": "string" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "memberCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "owner", "name", "description", "campaignIds", "memberCount", "createdAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L586" }, { "name": "communities.create", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/communities", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } } }, "required": [ "name", "description", "campaignIds" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "owner": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "name": { "type": "string" }, "description": { "type": "string" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "memberCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "owner", "name", "description", "campaignIds", "memberCount", "createdAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L587" }, { "name": "communities.members", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/communities/:id/members", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "role": { "type": "string", "enum": [ "owner", "member" ] }, "joinedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "address", "role", "joinedAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L591" }, { "name": "communities.join", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "POST", "path": "/communities/:id/members", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "inviteCode": { "type": "string" } }, "required": [ "id", "inviteCode" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "role": { "type": "string", "enum": [ "owner", "member" ] }, "joinedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "address", "role", "joinedAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L592" }, { "name": "communities.leave", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "DELETE", "path": "/communities/:id/members/me", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ok": { "type": "boolean", "const": true } }, "required": [ "ok" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L593" }, { "name": "communities.update", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "PATCH", "path": "/communities/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "name": { "type": "string" }, "description": { "type": "string" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string", "maxLength": 78, "pattern": "^(0|[1-9]\\d*)$" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "removeMember": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "regenerateInvite": { "type": "boolean" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "owner": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "name": { "type": "string" }, "description": { "type": "string" }, "campaignIds": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] } }, "memberCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "owner", "name", "description", "campaignIds", "memberCount", "createdAt" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L594" }, { "name": "networks.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/networks", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "name": { "type": "string" }, "explorer": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "protocolAddress": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "allowedTokens": { "type": "array", "items": { "type": "object", "properties": { "address": { "$ref": "#/$defs/__schema0" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" } }, "required": [ "address", "symbol", "decimals" ], "additionalProperties": false } }, "status": { "type": "string", "enum": [ "live", "not_deployed", "unavailable" ] } }, "required": [ "chainId", "name", "explorer", "protocolAddress", "allowedTokens", "status" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L604" }, { "name": "tokens.list", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/tokens", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "symbol": { "type": "string" }, "decimals": { "type": "integer", "minimum": 0, "maximum": 36 }, "name": { "type": "string" }, "testnet": { "type": "boolean" }, "role": { "type": "string", "enum": [ "payment", "reward", "both" ] }, "label": { "type": "string" } }, "required": [ "address", "symbol", "decimals", "role", "label" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L605" }, { "name": "support.report", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/support/reports", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "subject": { "type": "string", "minLength": 3, "maxLength": 150 }, "category": { "type": "string", "enum": [ "abuse", "fraud", "product", "payment", "account", "other" ] }, "message": { "type": "string", "minLength": 20, "maxLength": 5000 }, "email": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "context": { "type": "object", "properties": { "page": { "type": "string", "minLength": 1, "maxLength": 2048 }, "campaignId": { "$ref": "#/$defs/__schema0" }, "nodeId": { "$ref": "#/$defs/__schema0" }, "saleId": { "$ref": "#/$defs/__schema0" }, "merchantId": { "$ref": "#/$defs/__schema0" } }, "required": [ "page" ], "additionalProperties": false }, "target": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "campaign", "link", "merchant", "distributor", "sale" ] }, "id": { "$ref": "#/$defs/__schema0" } }, "required": [ "kind", "id" ], "additionalProperties": false } }, "required": [ "category", "message", "context" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticketId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "ticketId" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L609" }, { "name": "support.contact", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/support/contact", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "subject": { "type": "string", "minLength": 3, "maxLength": 150 }, "message": { "type": "string", "minLength": 20, "maxLength": 5000 }, "email": { "type": "string", "format": "email", "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" } }, "required": [ "subject", "message", "email" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticketId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "ticketId" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L610" }, { "name": "support.mine", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/me/support", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "subject": { "type": "string" }, "category": { "type": "string" }, "status": { "type": "string", "enum": [ "open", "answered", "resolved", "declined" ] }, "createdAt": { "$ref": "#/$defs/__schema0" }, "updatedAt": { "$ref": "#/$defs/__schema0" } }, "required": [ "id", "subject", "category", "status", "createdAt", "updatedAt" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L618" }, { "name": "system.health", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/health", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "api": { "type": "string", "enum": [ "ok", "degraded", "down", "not_configured" ] }, "database": { "type": "string", "enum": [ "ok", "degraded", "down", "not_configured" ] }, "rpc": { "type": "string", "enum": [ "ok", "degraded", "down", "not_configured" ] }, "indexer": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok", "degraded", "down", "not_configured" ] }, "lastBlock": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "lagSeconds": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "null" } ] } }, "required": [ "status", "lastBlock", "lagSeconds" ], "additionalProperties": false }, "chainHead": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "chainId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "protocolAddress": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] } }, "required": [ "api", "database", "rpc", "indexer", "chainHead", "chainId", "protocolAddress" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L619" }, { "name": "system.status", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/system/status", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "indexer": { "type": "object", "properties": { "name": { "type": [ "string", "null" ] }, "indexedBlock": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "chainHead": { "$ref": "#/$defs/__schema0" }, "chainTime": { "$ref": "#/$defs/__schema1" }, "lagBlocks": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "lagSeconds": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "null" } ] }, "state": { "type": "string", "enum": [ "live", "syncing", "behind", "not_configured" ] } }, "required": [ "name", "indexedBlock", "chainHead", "chainTime", "lagBlocks", "lagSeconds", "state" ], "additionalProperties": false }, "reconciliation": { "anyOf": [ { "type": "object", "properties": { "matches": { "type": "boolean" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "rewardIndex": { "$ref": "#/$defs/__schema2" }, "rewardChain": { "$ref": "#/$defs/__schema2" }, "proceedsIndex": { "$ref": "#/$defs/__schema3" }, "proceedsChain": { "$ref": "#/$defs/__schema3" }, "mismatches": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "field": { "type": "string" }, "indexed": { "$ref": "#/$defs/__schema0" }, "canonical": { "$ref": "#/$defs/__schema0" } }, "required": [ "campaignId", "field", "indexed", "canonical" ], "additionalProperties": false } } }, "required": [ "matches", "blockNumber", "rewardIndex", "rewardChain", "proceedsIndex", "proceedsChain", "mismatches" ], "additionalProperties": false }, { "type": "null" } ] }, "incidents": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "title": { "type": "string" }, "impact": { "type": "string" }, "severity": { "type": "string", "enum": [ "degraded", "outage", "maintenance" ] }, "startsAt": { "$ref": "#/$defs/__schema1" }, "endsAt": { "anyOf": [ { "$ref": "#/$defs/__schema1" }, { "type": "null" } ] }, "updatedAt": { "$ref": "#/$defs/__schema1" }, "updates": { "type": "array", "items": { "type": "object", "properties": { "message": { "type": "string" }, "at": { "$ref": "#/$defs/__schema1" } }, "required": [ "message", "at" ], "additionalProperties": false } } }, "required": [ "id", "title", "impact", "severity", "startsAt", "endsAt", "updatedAt", "updates" ], "additionalProperties": false } }, "maintenanceWindow": { "anyOf": [ { "type": "object", "properties": { "from": { "$ref": "#/$defs/__schema1" }, "to": { "$ref": "#/$defs/__schema1" } }, "required": [ "from", "to" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "indexer", "reconciliation", "incidents", "maintenanceWindow" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, "__schema2": { "type": "object", "properties": { "netDeposited": { "$ref": "#/$defs/__schema0" }, "available": { "$ref": "#/$defs/__schema0" }, "pendingReserved": { "$ref": "#/$defs/__schema0" }, "vestedUnclaimed": { "$ref": "#/$defs/__schema0" }, "rewardsClaimed": { "$ref": "#/$defs/__schema0" }, "surplusWithdrawn": { "$ref": "#/$defs/__schema0" } }, "required": [ "netDeposited", "available", "pendingReserved", "vestedUnclaimed", "rewardsClaimed", "surplusWithdrawn" ], "additionalProperties": false }, "__schema3": { "type": "object", "properties": { "proceedsPending": { "$ref": "#/$defs/__schema0" }, "proceedsClaimable": { "$ref": "#/$defs/__schema0" }, "proceedsClaimed": { "$ref": "#/$defs/__schema0" }, "buyerRefunded": { "$ref": "#/$defs/__schema0" } }, "required": [ "proceedsPending", "proceedsClaimable", "proceedsClaimed", "buyerRefunded" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L620" }, { "name": "system.contracts", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/system/contracts", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "contracts": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "deployedBlock": { "type": "string" }, "deploymentTx": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "abiHash": { "$ref": "#/$defs/__schema0" }, "sourceVerified": { "type": "boolean" }, "version": { "type": "string" } }, "required": [ "name", "address", "deployedBlock", "deploymentTx", "abiHash", "sourceVerified", "version" ], "additionalProperties": false } } }, "required": [ "contracts" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L621" }, { "name": "system.endpoints", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/system/endpoints", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "method": { "type": "string", "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE" ] }, "path": { "type": "string" }, "auth": { "type": "string", "enum": [ "public", "session", "owner", "merchant", "operator" ] }, "inputSchema": { "type": "string" }, "outputSchema": { "type": "string" }, "rateLimit": { "type": "object", "properties": { "requests": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "windowSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "requests", "windowSeconds" ], "additionalProperties": false }, "apiVersion": { "type": "string", "const": "v1" }, "availability": { "type": "string", "enum": [ "live", "designed", "requires_contract" ] } }, "required": [ "method", "path", "auth", "inputSchema", "outputSchema", "rateLimit", "apiVersion", "availability" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L622" }, { "name": "system.events", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/system/events", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "tx": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "type": "string" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema0" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false }, "logIndex": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "at": { "$ref": "#/$defs/__schema0" }, "actor": { "anyOf": [ { "type": "object", "properties": { "address": { "anyOf": [ { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, { "type": "null" } ] }, "handle": { "type": [ "string", "null" ] }, "displayName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "pseudonymous", "private" ] } }, "required": [ "address", "handle", "displayName", "visibility" ], "additionalProperties": false }, { "type": "null" } ] }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "boolean" }, { "type": "array", "items": { "type": "string" } } ] } } }, "required": [ "name", "tx", "logIndex", "at", "actor", "args" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L623" }, { "name": "playground.run", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/playground", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "path": { "type": "string", "minLength": 4, "maxLength": 2048 } }, "required": [ "path" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "status": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "headers": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string" } }, "body": { "type": "string" }, "durationMs": { "type": "number", "minimum": 0 }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "status", "headers", "body", "durationMs", "size" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L627" }, { "name": "clients.list", "release": "demo-only", "status": "Designed — unavailable", "route": { "verb": "GET", "path": "/clients", "auth": "public" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "maker": { "type": "string" }, "purpose": { "type": "string" }, "type": { "type": "string", "enum": [ "web", "widget", "sdk", "wallet" ] }, "uses": { "type": "array", "items": { "type": "string" } }, "protocolVersion": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "lastCheckedAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "name", "maker", "purpose", "type", "uses", "protocolVersion", "checks", "lastCheckedAt" ], "additionalProperties": false } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L637" }, { "name": "ops.queue", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/ops/queue", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "category": { "type": "string" }, "status": { "type": "string", "enum": [ "open", "closed" ] }, "revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "assignedTo": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "category", "status", "revision", "assignedTo", "createdAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L638" }, { "name": "ops.case", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/ops/cases/:id", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "id" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "category": { "type": "string" }, "status": { "type": "string", "enum": [ "open", "closed" ] }, "revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "assignedTo": { "type": [ "string", "null" ] }, "createdAt": { "$ref": "#/$defs/__schema0" }, "evidence": { "type": "array", "items": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "type": "string" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema0" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } }, "notes": { "type": "array", "items": { "type": "object", "properties": { "actor": { "type": "string" }, "internalNote": { "type": "string" }, "publicNote": { "type": [ "string", "null" ] }, "at": { "$ref": "#/$defs/__schema0" } }, "required": [ "actor", "internalNote", "publicNote", "at" ], "additionalProperties": false } } }, "required": [ "id", "category", "status", "revision", "assignedTo", "createdAt", "evidence", "notes" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L639" }, { "name": "ops.act", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/ops/cases/:id/actions", "auth": "session", "payload": "action" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "action": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "addNote", "assign", "close", "reopen", "openCase", "dismissReport", "acknowledgeAlert", "requestInformation", "hideFromDiscovery", "addPublicNotice", "freezeNewActivity", "askMerchantToPause", "restore", "liftFreeze" ] }, "revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "reasonCategory": { "type": "string" }, "internalNote": { "type": "string", "minLength": 20, "maxLength": 1000 }, "publicNote": { "type": "string", "maxLength": 280 }, "assignee": { "type": "string" } }, "required": [ "action", "revision", "reasonCategory", "internalNote" ] } }, "required": [ "id", "action" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "category": { "type": "string" }, "status": { "type": "string", "enum": [ "open", "closed" ] }, "revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "assignedTo": { "type": [ "string", "null" ] }, "createdAt": { "$ref": "#/$defs/__schema0" }, "evidence": { "type": "array", "items": { "type": "object", "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "type": "string" }, "explorerUrl": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "null" } ] }, "at": { "$ref": "#/$defs/__schema0" } }, "required": [ "hash", "blockNumber", "explorerUrl" ], "additionalProperties": false } }, "notes": { "type": "array", "items": { "type": "object", "properties": { "actor": { "type": "string" }, "internalNote": { "type": "string" }, "publicNote": { "type": [ "string", "null" ] }, "at": { "$ref": "#/$defs/__schema0" } }, "required": [ "actor", "internalNote", "publicNote", "at" ], "additionalProperties": false } } }, "required": [ "id", "category", "status", "revision", "assignedTo", "createdAt", "evidence", "notes" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L640" }, { "name": "ops.moderation", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/ops/moderation", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "subject": { "type": "string" }, "category": { "type": "string" }, "status": { "type": "string", "enum": [ "open", "answered", "resolved", "declined" ] }, "createdAt": { "$ref": "#/$defs/__schema0" }, "updatedAt": { "$ref": "#/$defs/__schema0" } }, "required": [ "id", "subject", "category", "status", "createdAt", "updatedAt" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L641" }, { "name": "ops.audit", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/ops/audit", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } } }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "actor": { "type": "string" }, "role": { "type": "string" }, "resource": { "type": "string" }, "action": { "type": "string" }, "beforeHash": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "afterHash": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } }, "required": [ "id", "actor", "role", "resource", "action", "beforeHash", "afterHash", "at" ], "additionalProperties": false } }, "nextCursor": { "type": [ "string", "null" ] } }, "required": [ "items", "nextCursor" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L642" }, { "name": "ops.reconciliation", "release": "core", "status": "Core live", "route": { "verb": "GET", "path": "/ops/reconciliation", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", "items": { "type": "object", "properties": { "matches": { "type": "boolean" }, "blockNumber": { "$ref": "#/$defs/__schema0" }, "rewardIndex": { "$ref": "#/$defs/__schema1" }, "rewardChain": { "$ref": "#/$defs/__schema1" }, "proceedsIndex": { "$ref": "#/$defs/__schema2" }, "proceedsChain": { "$ref": "#/$defs/__schema2" }, "mismatches": { "type": "array", "items": { "type": "object", "properties": { "campaignId": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "string", "pattern": "^demo-[\\w-]+$" } ] }, "field": { "type": "string" }, "indexed": { "$ref": "#/$defs/__schema0" }, "canonical": { "$ref": "#/$defs/__schema0" } }, "required": [ "campaignId", "field", "indexed", "canonical" ], "additionalProperties": false } } }, "required": [ "matches", "blockNumber", "rewardIndex", "rewardChain", "proceedsIndex", "proceedsChain", "mismatches" ], "additionalProperties": false }, "$defs": { "__schema0": { "type": "string" }, "__schema1": { "type": "object", "properties": { "netDeposited": { "$ref": "#/$defs/__schema0" }, "available": { "$ref": "#/$defs/__schema0" }, "pendingReserved": { "$ref": "#/$defs/__schema0" }, "vestedUnclaimed": { "$ref": "#/$defs/__schema0" }, "rewardsClaimed": { "$ref": "#/$defs/__schema0" }, "surplusWithdrawn": { "$ref": "#/$defs/__schema0" } }, "required": [ "netDeposited", "available", "pendingReserved", "vestedUnclaimed", "rewardsClaimed", "surplusWithdrawn" ], "additionalProperties": false }, "__schema2": { "type": "object", "properties": { "proceedsPending": { "$ref": "#/$defs/__schema0" }, "proceedsClaimable": { "$ref": "#/$defs/__schema0" }, "proceedsClaimed": { "$ref": "#/$defs/__schema0" }, "buyerRefunded": { "$ref": "#/$defs/__schema0" } }, "required": [ "proceedsPending", "proceedsClaimable", "proceedsClaimed", "buyerRefunded" ], "additionalProperties": false } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L643" }, { "name": "ops.runReconciliation", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/ops/reconciliation", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" } }, "required": [ "runId" ], "additionalProperties": false }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L644" }, { "name": "ops.incident", "release": "core", "status": "Core live", "route": { "verb": "POST", "path": "/ops/incidents", "auth": "session" }, "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "title": { "type": "string", "minLength": 5, "maxLength": 150 }, "impact": { "type": "string", "minLength": 10, "maxLength": 1000 }, "severity": { "type": "string", "enum": [ "degraded", "outage", "maintenance" ] }, "publicMessage": { "type": "string", "minLength": 10, "maxLength": 2000 }, "status": { "type": "string", "enum": [ "open", "resolved" ] } }, "required": [ "title", "impact", "severity", "publicMessage", "status" ] }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]+$" }, "title": { "type": "string" }, "impact": { "type": "string" }, "severity": { "type": "string", "enum": [ "degraded", "outage", "maintenance" ] }, "startsAt": { "$ref": "#/$defs/__schema0" }, "endsAt": { "anyOf": [ { "$ref": "#/$defs/__schema0" }, { "type": "null" } ] }, "updatedAt": { "$ref": "#/$defs/__schema0" }, "updates": { "type": "array", "items": { "type": "object", "properties": { "message": { "type": "string" }, "at": { "$ref": "#/$defs/__schema0" } }, "required": [ "message", "at" ], "additionalProperties": false } } }, "required": [ "id", "title", "impact", "severity", "startsAt", "endsAt", "updatedAt", "updates" ], "additionalProperties": false, "$defs": { "__schema0": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" } } }, "source": "https://github.com/Enoch208/spoke/blob/1c90c5e408592d5b4e87944ea79b998890633249/packages/protocol/src/api/methods.ts#L645" } ] }