1.1.18 • Published 9 months ago

@rc-ex/debug v1.1.18

Weekly downloads
82
License
MIT
Repository
github
Last release
9 months 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.18

9 months ago

1.1.17

10 months ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.12

1 year ago

1.1.13

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.1

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.1.0

2 years ago

1.0.10

2 years ago

1.0.5-alpha.0

2 years ago

1.0.4-alpha.0

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

3 years ago

1.0.2-alpha.0

2 years ago

1.0.1-alpha.0

2 years ago

1.0.3-alpha.0

2 years ago

0.9.3

3 years ago

0.9.2

3 years ago

0.9.0

3 years ago

0.9.1

3 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.20

4 years ago

0.7.19

4 years ago

0.7.18

4 years ago

0.7.17

4 years ago

0.7.16

4 years ago

0.7.15

4 years ago

0.7.14

4 years ago

0.7.12

4 years ago

0.7.11

4 years ago

0.7.10

4 years ago

0.7.9

4 years ago

0.7.8

4 years ago

0.7.7

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.4

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.6.9

4 years ago

0.6.10

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.8

4 years ago

0.6.7

4 years ago

0.6.6

4 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.9

5 years ago

0.5.8

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.12

5 years ago

0.4.11

5 years ago

0.4.10

5 years ago

0.4.9

5 years ago

0.4.8

5 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago