Skip to content

Commit

Permalink
Add responseEncoding option; remove Pacer* code and remain only the i…
Browse files Browse the repository at this point in the history
…nterface
  • Loading branch information
dimikot committed Aug 24, 2024
1 parent 3b4172b commit 39e3cc1
Show file tree
Hide file tree
Showing 26 changed files with 132 additions and 504 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = (projectRoot, extraRules = {}) => ({
"typescript-enum",
"typescript-sort-keys",
"unused-imports",
"no-only-tests",
],
settings: {
react: {
Expand Down Expand Up @@ -109,6 +110,10 @@ module.exports = (projectRoot, extraRules = {}) => ({
"@typescript-eslint/no-useless-constructor": ["error"],
"@typescript-eslint/prefer-optional-chain": ["error"],
"@typescript-eslint/consistent-type-imports": ["error"],
"@typescript-eslint/require-array-sort-compare": [
"error",
{ ignoreStringArrays: true },
],
eqeqeq: ["error"],
"object-shorthand": ["error", "always"],
"@typescript-eslint/unbound-method": ["error"],
Expand Down Expand Up @@ -430,6 +435,9 @@ module.exports = (projectRoot, extraRules = {}) => ({
],

quotes: ["error", "double", { avoidEscape: true }],

"no-only-tests/no-only-tests": "error",

...extraRules,
},
});
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"options": { "parser": "typescript" }
}
]
}
66 changes: 0 additions & 66 deletions docs/classes/PacerComposite.md

This file was deleted.

79 changes: 0 additions & 79 deletions docs/classes/PacerQPS.md

This file was deleted.

19 changes: 7 additions & 12 deletions docs/interfaces/Pacer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,31 @@
Pacer is a class which allows to pace requests on some resource identified by
the instance of this class.

## Implemented by

- [`PacerComposite`](../classes/PacerComposite.md)
- [`PacerQPS`](../classes/PacerQPS.md)

## Properties

### name
### key

`Readonly` **name**: `string`
`Readonly` **key**: `string`

Human readable name of the pacer, used when composing multiple pacers.

#### Defined in

[src/pacers/Pacer.ts:15](https://github.com/clickup/rest-client/blob/master/src/pacers/Pacer.ts#L15)
[src/middlewares/paceRequests.ts:12](https://github.com/clickup/rest-client/blob/master/src/middlewares/paceRequests.ts#L12)

## Methods

### touch
### pace

**touch**(): `Promise`\<[`PacerDelay`](PacerDelay.md)\>
**pace**(): `Promise`\<[`PacerOutcome`](PacerOutcome.md)\>

Signals that we're about to send a request. Returns the delay we need to
wait for before actually sending.

#### Returns

`Promise`\<[`PacerDelay`](PacerDelay.md)\>
`Promise`\<[`PacerOutcome`](PacerOutcome.md)\>

#### Defined in

[src/pacers/Pacer.ts:21](https://github.com/clickup/rest-client/blob/master/src/pacers/Pacer.ts#L21)
[src/middlewares/paceRequests.ts:18](https://github.com/clickup/rest-client/blob/master/src/middlewares/paceRequests.ts#L18)
25 changes: 0 additions & 25 deletions docs/interfaces/PacerDelay.md

This file was deleted.

25 changes: 25 additions & 0 deletions docs/interfaces/PacerOutcome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[@clickup/rest-client](../README.md) / [Exports](../modules.md) / PacerOutcome

# Interface: PacerOutcome

A result of some Pacer work.

## Properties

### delayMs

**delayMs**: `number`

#### Defined in

[src/middlewares/paceRequests.ts:25](https://github.com/clickup/rest-client/blob/master/src/middlewares/paceRequests.ts#L25)

___

### reason

**reason**: `string`

#### Defined in

[src/middlewares/paceRequests.ts:26](https://github.com/clickup/rest-client/blob/master/src/middlewares/paceRequests.ts#L26)
44 changes: 0 additions & 44 deletions docs/interfaces/PacerQPSBackend.md

This file was deleted.

40 changes: 0 additions & 40 deletions docs/interfaces/PacerQPSOptions.md

This file was deleted.

Loading

0 comments on commit 39e3cc1

Please sign in to comment.