diff --git a/docs/account/index.html b/docs/account/index.html index ff92fc1a..7bbe3a0f 100644 --- a/docs/account/index.html +++ b/docs/account/index.html @@ -12,340 +12,340 @@ margin: 0; } - -

Account Service (1.0)

Download OpenAPI specification:Download

Account Service API

-

v1/accounts

Get the Sign In With Frequency configuration

Responses

Response samples

Content type
application/json
{
  • "providerId": "string",
  • "siwfUrl": "string",
  • "frequencyRpcUrl": "string"
}

Request to Sign In With Frequency

Request Body schema: application/json
required
object

The wallet login request information

-
object (SignUpResponseDto)

Responses

Request samples

Content type
application/json
{
  • "signIn": {
    },
  • "signUp": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string",
  • "msaId": "string",
  • "publicKey": "string"
}

Fetch an account given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Fetch an account given an Account Id

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Get a retireMsa unsigned, encoded extrinsic payload.

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

-

Responses

Response samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N"
}

Request to retire an MSA ID.

Request Body schema: application/json
required
encodedExtrinsic
required
string

Hex-encoded representation of the "RetireMsa" extrinsic

-
payloadToSign
required
string

payload to be signed

-
accountId
required
string

AccountId in hex or SS58 format

-
signature
required
string

signature of the owner

-

Responses

Request samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "signature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

delegations

Get all delegation information associated with an MSA Id

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

Get an MSA's delegation information for a specific provider

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

-
providerId
string
Example: 1

MSA Id of the provider to whom the requesting user wishes to delegate

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

delegation

Get the delegation information associated with an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Response samples

Content type
application/json
{
  • "providerId": "string",
  • "schemaPermissions": { },
  • "revokedAt": { }
}

Get a properly encoded RevokeDelegationPayload that can be signed

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

-
providerId
required
string
Example: 1

Msa Id of provider

-

Responses

Response samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234"
}

Request to revoke a delegation

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
providerId
required
string

MSA Id of the provider to whom the requesting user wishes to delegate

-
encodedExtrinsic
required
string

Hex-encoded representation of the "revokeDelegation" extrinsic

-
payloadToSign
required
string

payload to be signed

-
signature
required
string

signature of the owner

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "signature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

v1/handles

Request to create a new handle for an account

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Request to change a handle

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Get a properly encoded ClaimHandlePayload that can be signed.

path Parameters
newHandle
required
string >= 3 characters
Example: handle

newHandle in the request

-

Responses

Fetch a handle given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

v1/keys

Add new control keys for an MSA Id

Request Body schema: application/json
required
msaOwnerAddress
required
string

msaOwnerAddress representing the target of this request

-
msaOwnerSignature
required
string

msaOwnerSignature is the signature by msa owner

-
newKeyOwnerSignature
required
string

newKeyOwnerSignature is the signature with new key

-
required
object (KeysRequestPayloadDto)

Responses

Request samples

Content type
application/json
{
  • "msaOwnerAddress": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "msaOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "newKeyOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "payload": {
    }
}

Fetch public keys given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Get a properly encoded StatefulStorageItemizedSignaturePayloadV2 that can be signed.

query Parameters
msaId
required
string
Example: msaId=3

MSA Id representing the target of this request

-
newKey
required
string
Example: newKey=0x0ed2f8c714efcac51ca2325cfe95637e5e0b898ae397aa365978b7348a717d0b

New public key to be added to the account (32-byte value in hex format)

-

Responses

Request to add a new public Key

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
required
object (ItemizedSignaturePayloadDto)
proof
required
string

proof is the signature for the payload

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

+ " fill="currentColor">

Account Service (1.0)

Download OpenAPI specification:Download

Account Service API

+

v1/accounts

Get the Sign In With Frequency configuration

Responses

Response samples

Content type
application/json
{
  • "providerId": "string",
  • "siwfUrl": "string",
  • "frequencyRpcUrl": "string"
}

Request to Sign In With Frequency

Request Body schema: application/json
required
object

The wallet login request information

+
object (SignUpResponseDto)

Responses

Request samples

Content type
application/json
{
  • "signIn": {
    },
  • "signUp": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string",
  • "msaId": "string",
  • "publicKey": "string"
}

Fetch an account given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Fetch an account given an Account Id

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Get a retireMsa unsigned, encoded extrinsic payload.

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

+

Responses

Response samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N"
}

Request to retire an MSA ID.

Request Body schema: application/json
required
encodedExtrinsic
required
string

Hex-encoded representation of the "RetireMsa" extrinsic

+
payloadToSign
required
string

payload to be signed

+
accountId
required
string

AccountId in hex or SS58 format

+
signature
required
string

signature of the owner

+

Responses

Request samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "signature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

delegations

Get all delegation information associated with an MSA Id

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

Get an MSA's delegation information for a specific provider

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

+
providerId
string
Example: 1

MSA Id of the provider to whom the requesting user wishes to delegate

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

delegation

Get the delegation information associated with an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

Response samples

Content type
application/json
{
  • "providerId": "string",
  • "schemaPermissions": { },
  • "revokedAt": { }
}

Get a properly encoded RevokeDelegationPayload that can be signed

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

+
providerId
required
string
Example: 1

Msa Id of provider

+

Responses

Response samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234"
}

Request to revoke a delegation

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
providerId
required
string

MSA Id of the provider to whom the requesting user wishes to delegate

+
encodedExtrinsic
required
string

Hex-encoded representation of the "revokeDelegation" extrinsic

+
payloadToSign
required
string

payload to be signed

+
signature
required
string

signature of the owner

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "signature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

v1/handles

Request to create a new handle for an account

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Request to change a handle

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Get a properly encoded ClaimHandlePayload that can be signed.

path Parameters
newHandle
required
string >= 3 characters
Example: handle

newHandle in the request

+

Responses

Fetch a handle given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

v1/keys

Add new control keys for an MSA Id

Request Body schema: application/json
required
msaOwnerAddress
required
string

msaOwnerAddress representing the target of this request

+
msaOwnerSignature
required
string

msaOwnerSignature is the signature by msa owner

+
newKeyOwnerSignature
required
string

newKeyOwnerSignature is the signature with new key

+
required
object (KeysRequestPayloadDto)

Responses

Request samples

Content type
application/json
{
  • "msaOwnerAddress": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "msaOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "newKeyOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "payload": {
    }
}

Fetch public keys given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

Get a properly encoded StatefulStorageItemizedSignaturePayloadV2 that can be signed.

query Parameters
msaId
required
string
Example: msaId=3

MSA Id representing the target of this request

+
newKey
required
string
Example: newKey=0x0ed2f8c714efcac51ca2325cfe95637e5e0b898ae397aa365978b7348a717d0b

New public key to be added to the account (32-byte value in hex format)

+

Responses

Request to add a new public Key

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
required
object (ItemizedSignaturePayloadDto)
proof
required
string

proof is the signature for the payload

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

+ + + + + +

Transaction Notification API (1.0.0)

Download OpenAPI specification:Download

Notify transaction

Request Body schema: application/json
required
One of
providerId
required
string
referenceId
required
string
msaId
required
string
"CREATE_HANDLE" (string) or "CHANGE_HANDLE" (string)
handle
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "providerId": "string",
  • "referenceId": "string",
  • "msaId": "string",
  • "transactionType": "CREATE_HANDLE",
  • "handle": "string"
}
+ + + + diff --git a/docs/content-publishing/index.html b/docs/content-publishing/index.html index e6af9605..ae70367c 100644 --- a/docs/content-publishing/index.html +++ b/docs/content-publishing/index.html @@ -1,2002 +1,360 @@ - + - - - Content Publishing Service API - - - - - - - - -
-
- -
-
- - - + Content Publishing Service API + + + + + + + + + +
- - - - - -
-
-
-
-
-
-

- Content Publishing Service API - (1.0) -

-

- Download OpenAPI specification:Download -

-
-
-
- - -
-
-
-
-
-

Content Publishing Service API

-
-
-
-
-
-
-
-

- v1/asset -

-
-
-
-
-
-
-

- Upload asset files -

-
- Request Body schema: multipart/form-data -
required
-
-
-

Asset files

-
- - - - - - - -
- files -
required
-
-
-
- Array of strings - <binary> [ items - <binary - > - ] -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "assetIds": - [ -
      -
    • - -
    • -
    - ] -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- v1/content -

-
-
-
-
-
-
-

- Create DSNP Broadcast for user -

-
-
- path - Parameters -
- - - - - - - -
- userDsnpId -
required
-
-
-
- string -
-
-
-
-
-
- Request Body schema: application/json -
required
-
-
- - - - - - - -
- -
required
-
-
-
- object (NoteActivityDto) -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "content": - { -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    - } -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "referenceId": - "string" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Create DSNP Reply for user -

-
-
- path - Parameters -
- - - - - - - -
- userDsnpId -
required
-
-
-
- string -
-
-
-
-
-
- Request Body schema: application/json -
required
-
-
- - - - - - - - - - - -
- inReplyTo -
required
-
-
-
- string -
-
-
-
- -
required
-
-
-
- object (NoteActivityDto) -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "inReplyTo": - "string", -
    -
  • -
  • -
    - "content": - { -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    - } -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "referenceId": - "string" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Create DSNP Reaction for user -

-
-
- path - Parameters -
- - - - - - - -
- userDsnpId -
required
-
-
-
- string -
-
-
-
-
-
- Request Body schema: application/json -
required
-
-
- - - - - - - - - - - - - - - -
- emoji -
required
-
-
-
- string - non-empty DSNP_EMOJI_REGEX -
-
-
-
- apply -
required
-
-
-
- number - [ 0 .. 255 ] -
-
-
-
- inReplyTo -
required
-
-
-
- string -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "emoji": - "string", -
    -
  • -
  • -
    - "apply": - 255, -
    -
  • -
  • -
    - "inReplyTo": - "string" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "referenceId": - "string" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Update DSNP Content for user -

-
-
- path - Parameters -
- - - - - - - -
- userDsnpId -
required
-
-
-
- string -
-
-
-
-
-
- Request Body schema: application/json -
required
-
-
- - - - - - - - - - - - - - - -
- targetContentHash -
required
-
-
-
- string -
-
-
-
- targetAnnouncementType -
required
-
-
-
- string -
-
- Enum: - "broadcast" - "reply" -
-
-
-
- -
required
-
-
-
- object (NoteActivityDto) -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "targetContentHash": - "string", -
    -
  • -
  • -
    - "targetAnnouncementType": - "broadcast", -
    -
  • -
  • -
    - "content": - { -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    - } -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "referenceId": - "string" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Delete DSNP Content for user -

-
-
- path - Parameters -
- - - - - - - -
- userDsnpId -
required
-
-
-
- string -
-
-
-
-
-
- Request Body schema: application/json -
required
-
-
- - - - - - - - - - - -
- targetContentHash -
required
-
-
-
- string -
-
-
-
- targetAnnouncementType -
required
-
-
-
- string -
-
- Enum: - "broadcast" - "reply" -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "targetContentHash": - "string", -
    -
  • -
  • -
    - "targetAnnouncementType": - "broadcast" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "referenceId": - "string" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- v1/profile -

-
-
-
-
-
-
-

- Update a user's Profile -

-
-
- path - Parameters -
- - - - - - - -
- userDsnpId -
required
-
-
-
- string -
-
-
-
-
-
- Request Body schema: application/json -
required
-
-
- - - - - - - -
- -
required
-
-
-
- object - (ProfileActivityDto) - -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "profile": - { -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    - } -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "referenceId": - "string" -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- health -

-
-
-
-
-
-
-

- Check the health status of the service -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Check the live status of the service -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Check the ready status of the service -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- dev -

-
-
-
-
-
-
-

- Get a Job given a jobId -

-
-
-

ONLY enabled when ENVIRONMENT="dev".

-
-
-
-
- path - Parameters -
- - - - - - - -
- jobId -
required
-
-
-
- string -
-
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Get an Asset given an assetId -

-
-
-

ONLY enabled when ENVIRONMENT="dev".

-
-
-
-
- path - Parameters -
- - - - - - - -
- assetId -
required
-
-
-
- string -
-
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Create dummy announcement data -

-
-
-

ONLY enabled when ENVIRONMENT="dev".

-
-
-
-
- path - Parameters -
- - - - - - - -
- count -
required
-
-
-
- number -
-
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-
- - + + + + diff --git a/docs/content-watcher/index.html b/docs/content-watcher/index.html index dd539801..78c7cf08 100644 --- a/docs/content-watcher/index.html +++ b/docs/content-watcher/index.html @@ -1,1948 +1,353 @@ - + - - - Content Watcher Service API - - - - - - - - -
-
- -
-
- - - + Content Watcher Service API + + + + + + + + + +
- - - - - -
-
-
-
-
-
-

- Content Watcher Service API - (1.0) -

-

- Download OpenAPI specification:Download -

-
-
-
- - -
-
-
-
-
-

Content Watcher Service API

-
-
-
-
-
-
-
-

- v1/scanner -

-
-
-
-
-
-
-

- Reset blockchain scan to a specific block number or offset from the current position -

-
- Request Body schema: application/json -
required
-
-
-

blockNumber

-
- - - - - - - - - - - - - - - -
- blockNumber - -
-
- number - - [ 0 .. 4294967296 ] - -
-
-
-

The block number to reset the scanner to

-
-
-
-
- rewindOffset - -
-
- number - - [ 0 .. 4294967296 ] - -
-
-
-

- Number of blocks to rewind the scanner to (from blockNumber if supplied; - else from latest block) -

-
-
-
-
- immediate - -
-
- boolean -
-
-
-

- Whether to schedule the new scan immediately or wait for the next scheduled interval -

-
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "blockNumber": - 0, -
    -
  • -
  • -
    - "rewindOffset": - 100, -
    -
  • -
  • -
    - "immediate": - true -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Get the current watch options for the blockchain content event scanner -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "schemaIds": - [ -
      -
    • - -
    • -
    • - -
    • -
    - ], -
    -
  • -
  • -
    - "dsnpIds": - [ -
      -
    • - -
    • -
    • - -
    • -
    - ] -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Set watch options to filter the blockchain content scanner by schemas or MSA Ids -

-
- Request Body schema: application/json -
required
-
-
-

watchOptions: Filter contents by schemaIds and/or msaIds

-
- - - - - - - - - - - -
- schemaIds - -
-
- Array of numbers - - [ 0 .. 65536 ] - -
-
-
-

Specific schema ids to watch for

-
-
-
-
- dsnpIds - -
-
- Array of strings -
-
-
-

Specific dsnpIds (msa_id) to watch for

-
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "schemaIds": - [ -
      -
    • - -
    • -
    • - -
    • -
    - ], -
    -
  • -
  • -
    - "dsnpIds": - [ -
      -
    • - -
    • -
    • - -
    • -
    - ] -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Pause the blockchain scanner -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Resume the blockchain content event scanner -

-
-
- query - Parameters -
- - - - - - - -
- immediate - -
-
- boolean -
-
-
-

- Immediate: whether to resume scan immediately (true), or wait until next scheduled - scan (false) -

-
-
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- v1/search -

-
-
-
- -
-
-
-

- v1/webhooks -

-
-
-
-
-
-
-

- Register a webhook to be called when new content is encountered on the chain -

-
- Request Body schema: application/json -
required
-
-
-

Register a webhook to be called when a new content is encountered

-
- - - - - - - - - - - -
- url -
required
-
-
-
- string -
-
-
-

Webhook URL

-
-
-
-
- announcementTypes -
required
-
-
-
- Array of strings - (AnnouncementTypeName) - -
-
- Items - Enum: - "tombstone" - "broadcast" - "reply" - "reaction" - "profile" - "update" -
-
-
-
-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Request samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- { -
    -
  • -
    - "url": - "https://example.com/webhook", -
    -
  • -
  • -
    - "announcementTypes": - [ -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    - ] -
    -
  • -
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- Clear all previously registered webhooks -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Get the list of currently registered webhooks -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-

Response samples

-
-
    - -
-
-
-
- Content type -
application/json
-
-
-
-
- -
-
-
- [ -
    -
  • -
    - { -
      -
    • - -
    • -
    • - -
    • -
    - } -
    -
  • -
- ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- health -

-
-
-
-
-
-
-

- Check the health status of the service -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Check the live status of the service -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-

- Check the ready status of the service -

-
-

Responses

-
- -
-
-
-
-
- - -
-
-
-
-
-
-
-
- - + + + + diff --git a/docs/content-watcher/webhooks.html b/docs/content-watcher/webhooks.html new file mode 100644 index 00000000..25a64814 --- /dev/null +++ b/docs/content-watcher/webhooks.html @@ -0,0 +1,367 @@ + + + + + + Content Announcement API + + + + + + + + + +

Content Announcement API (1.0.0)

Download OpenAPI specification:Download

Create a new content announcement

Request Body schema: application/json
required
requestId
string or null

An optional identifier for the request, may be used for tracking or correlation

+
webhookUrl
string or null

An optional webhook URL registered as part of a specific search request

+
schemaId
required
integer

Identifier for the schema being used or referenced

+
blockNumber
required
integer

The block number on the blockchain where this announcement was recorded

+
required
TombstoneAnnouncement (object) or BroadcastAnnouncement (object) or ReplyAnnouncement (object) or ReactionAnnouncement (object) or ProfileAnnouncement (object) or UpdateAnnouncement (object)

Responses

Request samples

Content type
application/json
{
  • "requestId": "string",
  • "webhookUrl": "string",
  • "schemaId": 0,
  • "blockNumber": 0,
  • "announcement": {
    }
}
+ + + + diff --git a/docs/graph/index.html b/docs/graph/index.html index 03019bce..779dcc8a 100644 --- a/docs/graph/index.html +++ b/docs/graph/index.html @@ -12,339 +12,339 @@ margin: 0; } - -

Graph Service (1.0)

Download OpenAPI specification:Download

Graph Service API

-

v1/graphs

Fetch graphs for specified MSA Ids and Block Number

Request Body schema: application/json
required
dsnpIds
required
Array of strings

Array of MSA Ids for which to query graphs

-
privacyType
required
string
Enum: "private" "public"

Graph type to query (public or private)

-
Array of objects (GraphKeyPairDto)

Graph encryption keypairs for the users requested in dsnpIds. (Only for privacyType === "private"

-

Responses

Request samples

Content type
application/json
{
  • "dsnpIds": [
    ],
  • "privacyType": "public",
  • "graphKeyPairs": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Request an update to a given user's graph

Request Body schema: application/json
required
dsnpId
required
string

MSA Id that owns the connections represented in this object

-
required
object

Array of connections known to the Provider for ths MSA referenced in this object

-
Array of objects (GraphKeyPairDto)

Optional array of graph encryption keypairs decrypting/encrypting the above-referenced users private graph

-
webhookUrl
string

Optional URL of a webhook to invoke when the request is complete

-

Responses

Request samples

Content type
application/json
{
  • "dsnpId": "2",
  • "connections": {
    },
  • "graphKeyPairs": [
    ],
  • "webhookUrl": "http://localhost/webhook"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

v1/webhooks

Get all registered webhooks

Responses

Watch graphs for specified dsnpIds and receive updates

Request Body schema: application/json
required
dsnpIds
Array of strings

MSA Ids for which to watch for graph updates

-
webhookEndpoint
required
string

Webhook URL to call when graph changes for the referenced MSAs are detected

-

Responses

Request samples

Content type
application/json
{}

Delete all registered webhooks

Responses

Get all registered webhooks for a specific MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
query Parameters
includeAll
boolean
Example: includeAll=true

Boolean whether to include webhooks registered for 'all' MSA Ids (default: true)

-

Responses

Delete all webhooks registered for a specific MSA

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Get all webhooks registered to the specified URL

query Parameters
url
required
string
Example: url=http://localhost/webhook

URL related to the request

-

Responses

Delete all MSA webhooks registered with the given URL

query Parameters
url
required
string
Example: url=http://localhost/webhook

URL related to the request

-

Responses

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

+ " fill="currentColor">

Graph Service (1.0)

Download OpenAPI specification:Download

Graph Service API

+

v1/graphs

Fetch graphs for specified MSA Ids and Block Number

Request Body schema: application/json
required
dsnpIds
required
Array of strings

Array of MSA Ids for which to query graphs

+
privacyType
required
string
Enum: "private" "public"

Graph type to query (public or private)

+
Array of objects (GraphKeyPairDto)

Graph encryption keypairs for the users requested in dsnpIds. (Only for privacyType === "private"

+

Responses

Request samples

Content type
application/json
{
  • "dsnpIds": [
    ],
  • "privacyType": "public",
  • "graphKeyPairs": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Request an update to a given user's graph

Request Body schema: application/json
required
dsnpId
required
string

MSA Id that owns the connections represented in this object

+
required
object

Array of connections known to the Provider for ths MSA referenced in this object

+
Array of objects (GraphKeyPairDto)

Optional array of graph encryption keypairs decrypting/encrypting the above-referenced users private graph

+
webhookUrl
string

Optional URL of a webhook to invoke when the request is complete

+

Responses

Request samples

Content type
application/json
{
  • "dsnpId": "2",
  • "connections": {
    },
  • "graphKeyPairs": [
    ],
  • "webhookUrl": "http://localhost/webhook"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

v1/webhooks

Get all registered webhooks

Responses

Watch graphs for specified dsnpIds and receive updates

Request Body schema: application/json
required
dsnpIds
Array of strings

MSA Ids for which to watch for graph updates

+
webhookEndpoint
required
string

Webhook URL to call when graph changes for the referenced MSAs are detected

+

Responses

Request samples

Content type
application/json
{}

Delete all registered webhooks

Responses

Get all registered webhooks for a specific MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
query Parameters
includeAll
boolean
Example: includeAll=true

Boolean whether to include webhooks registered for 'all' MSA Ids (default: true)

+

Responses

Delete all webhooks registered for a specific MSA

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

Get all webhooks registered to the specified URL

query Parameters
url
required
string
Example: url=http://localhost/webhook

URL related to the request

+

Responses

Delete all MSA webhooks registered with the given URL

query Parameters
url
required
string
Example: url=http://localhost/webhook

URL related to the request

+

Responses

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

+ + + + + +

Graph Service Webhooks API (1.0.0)

Download OpenAPI specification:Download

Announce a graph update

Request Body schema: application/json
required
msaId
required
string

MSA Id for which this notification is being sent

+
schemaId
required
number

Schema ID of graph that was updated

+
pageId
required
number

Page ID of graph page that was updated/deleted

+
prevContentHash
required
number

integer representation of the content hash of the updated page's previous state

+
currContentHash
number

integer representation of the content hash of the updated pages new state

+
updateType
required
any (updateType)
Enum: "GraphPageUpdated" "GraphPageDeleted"

Responses

Request samples

Content type
application/json
{
  • "msaId": "2",
  • "schemaId": 8,
  • "pageId": 15,
  • "prevContentHash": 123456,
  • "currContentHash": 0,
  • "updateType": "GraphPageUpdated"
}

Send the status of a requested graph update

Request Body schema: application/json
required
referenceId
required
string

Job reference ID of a previously submitted graph update request

+
status
required
string (status)
Enum: "pending" "expired" "failed" "succeeded"

Responses

Request samples

Content type
application/json
{
  • "referenceId": "Lve95gjOVATpfV8EL5X4nxwjKHE",
  • "status": "pending"
}
+ + + + diff --git a/docs/src/Build/AccountService.md b/docs/src/Build/AccountService/AccountService.md similarity index 72% rename from docs/src/Build/AccountService.md rename to docs/src/Build/AccountService/AccountService.md index 0545ddde..259fa345 100644 --- a/docs/src/Build/AccountService.md +++ b/docs/src/Build/AccountService/AccountService.md @@ -5,8 +5,8 @@ It includes endpoints for managing user authentication, account details, delegat ## API Reference -[Open Direct API Reference Page](https://projectlibertylabs.github.io/gateway/account) -{{#swagger-embed ../openapi-specs/account.openapi.json}} +- [REST API](./Api.md) (Full docs) +- [Webhooks](./Webhooks.md) (Full docs) ## Configuration diff --git a/docs/src/Build/AccountService/Api.md b/docs/src/Build/AccountService/Api.md new file mode 100644 index 00000000..b9b54589 --- /dev/null +++ b/docs/src/Build/AccountService/Api.md @@ -0,0 +1,6 @@ +# Account Service + +## API Reference + +[Open Direct API Reference Page](https://projectlibertylabs.github.io/gateway/account) +{{#swagger-embed ../openapi-specs/account.openapi.json}} diff --git a/docs/src/Build/AccountService/Webhooks.md b/docs/src/Build/AccountService/Webhooks.md new file mode 100644 index 00000000..2db2ba3f --- /dev/null +++ b/docs/src/Build/AccountService/Webhooks.md @@ -0,0 +1,6 @@ +# Account Service + +## Webhooks API Reference + +[Open Direct API Reference Page](https://projectlibertylabs.github.io/gateway/account/webhooks.html) +{{#swagger-embed ../openapi-specs/account-webhooks.openapi.json}} diff --git a/docs/src/Build/ContentPublishing/Api.md b/docs/src/Build/ContentPublishing/Api.md new file mode 100644 index 00000000..154636f2 --- /dev/null +++ b/docs/src/Build/ContentPublishing/Api.md @@ -0,0 +1,6 @@ +# Content Watcher Service + +## API Reference + +[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/content-publishing) +{{#swagger-embed ../openapi-specs/content-publishing.openapi.json}} diff --git a/docs/src/Build/ContentPublishing.md b/docs/src/Build/ContentPublishing/ContentPublishing.md similarity index 77% rename from docs/src/Build/ContentPublishing.md rename to docs/src/Build/ContentPublishing/ContentPublishing.md index 88c23d80..176d96c6 100644 --- a/docs/src/Build/ContentPublishing.md +++ b/docs/src/Build/ContentPublishing/ContentPublishing.md @@ -4,8 +4,7 @@ The Content Publishing Service allows users to create, post, and manage content ## API Reference -[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/content-publishing) -{{#swagger-embed ../openapi-specs/content-publishing.openapi.json}} +- [REST API](./Api.md) (Full docs) ## Configuration diff --git a/docs/src/Build/ContentWatcher/Api.md b/docs/src/Build/ContentWatcher/Api.md new file mode 100644 index 00000000..cdf7f3a0 --- /dev/null +++ b/docs/src/Build/ContentWatcher/Api.md @@ -0,0 +1,6 @@ +# Content Watcher Service + +## API Reference + +[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/content-watcher) +{{#swagger-embed ../openapi-specs/content-watcher.openapi.json}} diff --git a/docs/src/Build/ContentWatcher.md b/docs/src/Build/ContentWatcher/ContentWatcher.md similarity index 71% rename from docs/src/Build/ContentWatcher.md rename to docs/src/Build/ContentWatcher/ContentWatcher.md index 73ca9b33..33ce3921 100644 --- a/docs/src/Build/ContentWatcher.md +++ b/docs/src/Build/ContentWatcher/ContentWatcher.md @@ -4,8 +4,8 @@ The Content Watcher Service monitors and retrieves the latest feed state, includ ## API Reference -[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/content-watcher) -{{#swagger-embed ../openapi-specs/content-watcher.openapi.json}} +- [REST API](./Api.md) (Full docs) +- [Webhooks](./Webhooks.md) (Full docs) ## Configuration diff --git a/docs/src/Build/ContentWatcher/Webhooks.md b/docs/src/Build/ContentWatcher/Webhooks.md new file mode 100644 index 00000000..91676810 --- /dev/null +++ b/docs/src/Build/ContentWatcher/Webhooks.md @@ -0,0 +1,6 @@ +# Content Watcher Service + +## Webhooks Reference + +[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/content-watcher/webhooks.html) +{{#swagger-embed ../openapi-specs/content-announcement.openapi.json}} diff --git a/docs/src/Build/GraphService/Api.md b/docs/src/Build/GraphService/Api.md new file mode 100644 index 00000000..b00c0eb8 --- /dev/null +++ b/docs/src/Build/GraphService/Api.md @@ -0,0 +1,6 @@ +# Graph Service + +## API Reference + +[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/graph) +{{#swagger-embed ../openapi-specs/graph.openapi.json}} diff --git a/docs/src/Build/GraphService.md b/docs/src/Build/GraphService/GraphService.md similarity index 72% rename from docs/src/Build/GraphService.md rename to docs/src/Build/GraphService/GraphService.md index b05f29c2..416f0067 100644 --- a/docs/src/Build/GraphService.md +++ b/docs/src/Build/GraphService/GraphService.md @@ -4,8 +4,8 @@ The Graph Service manages the social graphs, including follow/unfollow actions, ## API Reference -[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/graph) -{{#swagger-embed ../openapi-specs/graph.openapi.json}} +- [REST API](./Api.md) (Full docs) +- [Webhooks](./Webhooks.md) (Full docs) ## Configuration diff --git a/docs/src/Build/GraphService/Webhooks.md b/docs/src/Build/GraphService/Webhooks.md new file mode 100644 index 00000000..a77831bf --- /dev/null +++ b/docs/src/Build/GraphService/Webhooks.md @@ -0,0 +1,6 @@ +# Graph Service + +## Webhooks Reference + +[Open Full API Reference Page](https://projectlibertylabs.github.io/gateway/graph/webhooks.html) +{{#swagger-embed ../openapi-specs/graph-webhooks.openapi.yaml}} diff --git a/docs/src/Build/README.md b/docs/src/Build/README.md index 5da49672..38f8f6c8 100644 --- a/docs/src/Build/README.md +++ b/docs/src/Build/README.md @@ -1,10 +1,10 @@ # Services {{#svg-embed ./src/TopLevel.svg Gateway Application Microservice Diagram}} @@ -19,7 +19,7 @@ Accounts are defined as an `msaId` (64-bit identifier) and can contain additiona - User Handle creation and retrieval - User key retrieval and management -See [Account Service Details & API Reference](./AccountService) +See [Account Service Details & API Reference](./AccountService/README) ## Graph Service diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 91955c27..fe36b6d3 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -11,10 +11,17 @@ - [Gateway Architecture](./Fundamentals/Architecture.md) - [Migrating from Web2 to Web3](./Fundamentals/Migrating.md) - [Build](./Build/README.md) - - [Account Service](./Build/AccountService.md) - - [Content Publishing Service](./Build/ContentPublishing.md) - - [Content Watcher Service](./Build/ContentWatcher.md) - - [Graph Service](./Build/GraphService.md) + - [Account Service](./Build/AccountService/AccountService.md) + - [REST API](./Build/AccountService/Api.md) + - [Webhooks API](./Build/AccountService/Webhooks.md) + - [Content Publishing Service](./Build/ContentPublishing/ContentPublishing.md) + - [REST API](./Build/ContentPublishing/Api.md) + - [Content Watcher Service](./Build/ContentWatcher/ContentWatcher.md) + - [REST API](./Build/ContentWatcher/Api.md) + - [Webhooks API](./Build/ContentWatcher/Webhooks.md) + - [Graph Service](./Build/GraphService/GraphService.md) + - [REST API](./Build/GraphService/Api.md) + - [Webhooks API](./Build/GraphService/Webhooks.md) - [Run](./Run/README.md) - [Deployment](./Run/Deployment.md) - [Security](./Run/Security.md) diff --git a/openapi-specs/graph-webhooks.openapi.yaml b/openapi-specs/graph-webhooks.openapi.yaml index 561a689a..2a2e73b9 100644 --- a/openapi-specs/graph-webhooks.openapi.yaml +++ b/openapi-specs/graph-webhooks.openapi.yaml @@ -8,7 +8,7 @@ openapi: 3.1.0 info: title: Graph Service Webhooks API version: 1.0.0 -webhooks: +paths: graph-update: post: summary: Announce a graph update diff --git a/package-lock.json b/package-lock.json index 7c921e72..180732a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@nestjs/core": "^10.0.0", "@nestjs/event-emitter": "^2.0.4", "@nestjs/microservices": "^10.4.1", - "@nestjs/platform-express": "^10.4.1", + "@nestjs/platform-express": "^10.4.4", "@nestjs/schedule": "^4.1.0", "@nestjs/swagger": "^7.4.0", "@polkadot/api": "^10.9.1", @@ -2900,14 +2900,15 @@ } }, "node_modules/@nestjs/platform-express": { - "version": "10.4.1", - "license": "MIT", + "version": "10.4.4", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.4.tgz", + "integrity": "sha512-y52q1MxhbHaT3vAgWd08RgiYon0lJgtTa8U6g6gV0KI0IygwZhDQFJVxnrRDUdxQGIP5CKHmfQu3sk9gTNFoEA==", "dependencies": { - "body-parser": "1.20.2", + "body-parser": "1.20.3", "cors": "2.8.5", - "express": "4.19.2", + "express": "4.21.0", "multer": "1.4.4-lts.1", - "tslib": "2.6.3" + "tslib": "2.7.0" }, "funding": { "type": "opencollective", @@ -2918,6 +2919,11 @@ "@nestjs/core": "^10.0.0" } }, + "node_modules/@nestjs/platform-express/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, "node_modules/@nestjs/schedule": { "version": "4.1.0", "license": "MIT", @@ -7020,8 +7026,9 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.2", - "license": "MIT", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -7031,7 +7038,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -7043,14 +7050,16 @@ }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/bowser": { "version": "2.11.0", @@ -8177,8 +8186,9 @@ "license": "MIT" }, "node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "engines": { "node": ">= 0.8" } @@ -8388,7 +8398,8 @@ }, "node_modules/escape-html": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "node_modules/escape-string-regexp": { "version": "4.0.0", @@ -8863,7 +8874,8 @@ }, "node_modules/etag": { "version": "1.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "engines": { "node": ">= 0.6" } @@ -8933,35 +8945,36 @@ } }, "node_modules/express": { - "version": "4.19.2", - "license": "MIT", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", + "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -8974,34 +8987,21 @@ }, "node_modules/express/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, - "node_modules/express/node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/express/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" }, "node_modules/external-editor": { "version": "3.1.0", @@ -9208,6 +9208,36 @@ "node": ">=8" } }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/find-up": { "version": "5.0.0", "dev": true, @@ -9381,7 +9411,8 @@ }, "node_modules/fresh": { "version": "0.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "engines": { "node": ">= 0.6" } @@ -11763,8 +11794,12 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-options": { "version": "3.0.4", @@ -11817,6 +11852,17 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/mime-db": { "version": "1.52.0", "license": "MIT", @@ -12736,7 +12782,8 @@ }, "node_modules/parseurl": { "version": "1.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "engines": { "node": ">= 0.8" } @@ -13071,10 +13118,11 @@ } }, "node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -13177,7 +13225,8 @@ }, "node_modules/range-parser": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "engines": { "node": ">= 0.6" } @@ -13778,8 +13827,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "license": "MIT", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -13801,28 +13851,29 @@ }, "node_modules/send/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/send/node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "engines": { - "node": ">=4" + "node": ">= 0.8" } }, "node_modules/send/node_modules/ms": { "version": "2.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/sentence-case": { "version": "3.0.4", @@ -13843,13 +13894,14 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" diff --git a/package.json b/package.json index c133bdfe..584a22b9 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "start:graph-worker:debug": "dotenvx run -f .env.graph -- nest start graph-worker --debug --watch", "pregenerate:metadata:account": "cp metadata.raw.ts.template apps/account-api/src/metadata.ts", "pregenerate:metadata:content-publishing": "cp metadata.raw.ts.template apps/content-publishing-api/src/metadata.ts", - "pregenerate:metadata:content-watcher": "cp metadata.raw.ts.template apps/content-watcher-api/src/metadata.ts", + "pregenerate:metadata:content-watcher": "cp metadata.raw.ts.template apps/content-watcher/src/metadata.ts", "pregenerate:metadata:graph": "cp metadata.raw.ts.template apps/graph-api/src/metadata.ts", "generate:metadata:account": "npx ts-node -r tsconfig-paths/register apps/account-api/src/generate-metadata.ts", "generate:metadata:content-publishing": "npx ts-node -r tsconfig-paths/register apps/content-publishing-api/src/generate-metadata.ts", @@ -66,10 +66,13 @@ "generate:types:graph": "npx openapi-client-axios-typegen openapi-specs/graph-webhooks.openapi.yaml > libs/types/src/graph-webhook/webhook-types.d.ts ; prettier --write libs/types/src/graph-webhook/webhook-types.d.ts", "generate:types:content-watcher": "npx @hey-api/openapi-ts -i openapi-specs/content-announcement.openapi.json -o libs/types/src/content-announcement ; prettier --write libs/types/src/content-announcement", "generate:types": "npm run generate:types:account ; npm run generate:types:graph ; npm run generate:types:content-watcher", + "pregenerate:swagger-ui:account": "npx --yes @redocly/cli build-docs openapi-specs/account-webhooks.openapi.yaml --output=./docs/account/webhooks.html", "generate:swagger-ui:account": "npx --yes @redocly/cli build-docs openapi-specs/account.openapi.json --output=./docs/account/index.html", "generate:swagger-ui:content-publishing": "npx --yes @redocly/cli build-docs openapi-specs/content-publishing.openapi.json --output=./docs/content-publishing/index.html", + "pregenerate:swagger-ui:content-watcher": "npx --yes @redocly/cli build-docs openapi-specs/content-announcement.openapi.json --output=./docs/content-watcher/webhooks.html", "generate:swagger-ui:content-watcher": "npx --yes @redocly/cli build-docs openapi-specs/content-watcher.openapi.json --output=./docs/content-watcher/index.html", "generate:swagger-ui:graph": "npx --yes @redocly/cli build-docs openapi-specs/graph.openapi.json --output=./docs/graph/index.html", + "pregenerate:swagger-ui:graph": "npx --yes @redocly/cli build-docs openapi-specs/graph-webhooks.openapi.yaml --output=./docs/graph/webhooks.html", "generate:swagger-ui": "npm run generate:swagger-ui:account ; npm run generate:swagger-ui:content-publishing ; npm run generate:swagger-ui:content-watcher ; npm run generate:swagger-ui:graph", "test:account": "dotenvx run -f env-files/account.template.env -- jest 'account*'", "test:content-publishing": "dotenvx run -f env-files/content-publishing.template.env -- jest 'content-publishing*'", @@ -115,7 +118,7 @@ "@nestjs/core": "^10.0.0", "@nestjs/event-emitter": "^2.0.4", "@nestjs/microservices": "^10.4.1", - "@nestjs/platform-express": "^10.4.1", + "@nestjs/platform-express": "^10.4.4", "@nestjs/schedule": "^4.1.0", "@nestjs/swagger": "^7.4.0", "@polkadot/api": "^10.9.1",