1.1.15 • Published 14 days ago

@rc-ex/debug v1.1.15

Weekly downloads
82
License
MIT
Repository
github
Last release
14 days ago

Debug Extension

Provide debug mode for this SDK.

Install

yarn add @rc-ex/debug

Usage

import RingCentral from '@rc-ex/core';
import DebugExtension from '@rc-ex/debug';

const rc = new RingCentral(...);
const debugExtension = new DebugExtension();
await rc.installExtension(debugExtension);

With this extension installed, details for every API request traffic will be printed using console.debug.

Below is sample output for await rc.restapi().account().extension().messageStore().list():

console.debug
HTTP 200 OK

Response:
{
    "data": {
    "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/233676004/extension/233676004/message-store?availability=Alive&dateFrom=2020-06-03T01:35:00.000Z&page=1&perPage=100",
    "records": [],
    "paging": {
        "page": 1,
        "totalPages": 1,
        "perPage": 100,
        "totalElements": 0
    },
    "navigation": {
        "firstPage": {
        "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/233676004/extension/233676004/message-store?availability=Alive&dateFrom=2020-06-03T01:35:00.000Z&page=1&perPage=100"
        },
        "lastPage": {
        "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/233676004/extension/233676004/message-store?availability=Alive&dateFrom=2020-06-03T01:35:00.000Z&page=1&perPage=100"
        }
    }
    },
    "status": 200,
    "statusText": "OK",
    "headers": {
    "server": "nginx",
    "date": "Thu, 04 Jun 2020 01:34:47 GMT",
    "content-type": "application/json;charset=utf-8",
    "content-length": "779",
    "connection": "close",
    "rcrequestid": "9379f134-a603-11ea-899e-005056bbcdd9",
    "routingkey": "SJC11P01PAS02",
    "content-language": "en-US",
    "vary": "Accept-Encoding, User-Agent",
    "x-rate-limit-group": "light",
    "x-rate-limit-limit": "100",
    "x-rate-limit-remaining": "99",
    "x-rate-limit-window": "60"
    }
}

Request:
{
    "method": "get",
    "baseURL": "https://platform.devtest.ringcentral.com",
    "url": "/restapi/v1.0/account/~/extension/~/message-store",
    "headers": {
    "Accept": "application/json, text/plain, */*",
    "X-User-Agent": "Unknown/0.0.1 ringcentral-extensible/core/0.5.5",
    "Authorization": "Bearer U0pDMTFQMDFQQVMwMHxBQUFmUXE0dG9FbTBBNll2eDlWYUhoNkQyblBWVXlXZnc0b0VxWldtVjNTZkw1MGExNG8wbHdscU4tOVEwU1RiWU9IYUt3NUY2Y2lVQk9oaDE4amlSN2VqTDl0VlhNMnZNYzVOa1FLZWJyejJRRDk3VnFESkdIV3k2U1RuU28zeG52RHlPdW5OcXFIR3FkbU1IQWhTaUluY0psN3A2ckQxbEhPRG1MdkIxX0FpSlhQeXlES2tYaURWejkwWFdiVjlfQXxrRjF4RVF8S1BrdVJvLVhBMlhIMXdlcnV6VVdjd3xBUQ",
    "User-Agent": "axios/0.19.2"
    }
}

For a working sample, please check this test case.

loggingAction

Optionally, you can specify a loggingAction function to the extension constructor.

export type LoggingAction = (message: string) => void;

loggingAction determines how debug messages are logged. By default it is:

(message) => console.debug(message);
1.1.15

14 days ago

1.1.14

17 days ago

1.1.12

24 days ago

1.1.13

24 days ago

1.1.11

1 month ago

1.1.10

2 months ago

1.1.9

2 months ago

1.1.8

3 months ago

1.1.7

4 months ago

1.1.6

4 months ago

1.1.5

4 months ago

1.1.4

7 months ago

1.1.3

8 months ago

1.1.1

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.1.0

1 year ago

1.0.10

1 year ago

1.0.5-alpha.0

1 year ago

1.0.4-alpha.0

1 year ago

1.0.0-alpha.1

1 year ago

1.0.0-alpha.0

1 year ago

1.0.2-alpha.0

1 year ago

1.0.1-alpha.0

1 year ago

1.0.3-alpha.0

1 year ago

0.9.3

2 years ago

0.9.2

2 years ago

0.9.0

2 years ago

0.9.1

2 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.20

3 years ago

0.7.19

3 years ago

0.7.18

3 years ago

0.7.17

3 years ago

0.7.16

3 years ago

0.7.15

3 years ago

0.7.14

3 years ago

0.7.12

3 years ago

0.7.11

3 years ago

0.7.10

3 years ago

0.7.9

3 years ago

0.7.8

3 years ago

0.7.7

3 years ago

0.7.6

3 years ago

0.7.5

3 years ago

0.7.4

3 years ago

0.7.3

3 years ago

0.7.2

3 years ago

0.6.9

3 years ago

0.6.10

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.8

3 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.9

4 years ago

0.5.8

4 years ago

0.5.7

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.12

4 years ago

0.4.11

4 years ago

0.4.10

4 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago