@prdb/sdk 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +82 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,6 +119,78 @@ Kiota's own native response handler cannot serve this: it surfaces the raw
|
|
|
119
119
|
comes back `undefined`. The option is the other half — the call returns its
|
|
120
120
|
model as usual, and the status is on the option afterwards.
|
|
121
121
|
|
|
122
|
+
## Reading the rate limit
|
|
123
|
+
|
|
124
|
+
Every metered response carries the rate limit it was counted against, so you can
|
|
125
|
+
pace off the answers you are already getting instead of spending a request on
|
|
126
|
+
`GET /rate-limit` to ask.
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
import { RateLimitOption } from "@prdb/sdk";
|
|
130
|
+
|
|
131
|
+
const limits = new RateLimitOption();
|
|
132
|
+
|
|
133
|
+
const sites = await client.sites.get({ options: [limits] });
|
|
134
|
+
|
|
135
|
+
if (limits.hour && limits.hour.remaining < 50) {
|
|
136
|
+
// Slow down; limits.hour.resetInSeconds until a slot frees up.
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`hour` and `month` are each a `RateLimitWindow` with `limit`, `remaining` and
|
|
141
|
+
`resetInSeconds`, or `undefined`.
|
|
142
|
+
|
|
143
|
+
`resetInSeconds` is the wait until the oldest request leaves the sliding window
|
|
144
|
+
and frees **one** slot — not a timestamp, and not the time until the whole
|
|
145
|
+
window resets. It is the same quantity `resetsInSeconds` carries on
|
|
146
|
+
`GET /rate-limit`.
|
|
147
|
+
|
|
148
|
+
`undefined` is an answer rather than a gap. A response the API did not meter —
|
|
149
|
+
`401`, `403`, `503`, and `GET /rate-limit` itself — carries no headers at all,
|
|
150
|
+
and a `429` carries only the window that refused the request, so exactly one of
|
|
151
|
+
the two being set is normal. A rejected call records too, so the reading is
|
|
152
|
+
there for a caller that catches the error.
|
|
153
|
+
|
|
154
|
+
Kiota can also surface response headers itself, through
|
|
155
|
+
`HeadersInspectionOptions`, as raw multi-valued strings. This option is the
|
|
156
|
+
typed reading of the six that matter.
|
|
157
|
+
|
|
158
|
+
## Conditional requests
|
|
159
|
+
|
|
160
|
+
`GET /sites` returns a weak `ETag` covering the matched rows and the paging,
|
|
161
|
+
sorting and search parameters. Send it back as `If-None-Match` and the endpoint
|
|
162
|
+
answers **304 Not Modified** with no body while nothing has changed — the whole
|
|
163
|
+
site list fits in one request at `pageSize: 1000`, so this is worth doing.
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
import { HeadersInspectionOptions } from "@microsoft/kiota-http-fetchlibrary";
|
|
167
|
+
import { ResponseStatusOption } from "@prdb/sdk";
|
|
168
|
+
|
|
169
|
+
// First call: read the validator off the response.
|
|
170
|
+
const inspect = new HeadersInspectionOptions({ inspectResponseHeaders: true });
|
|
171
|
+
await client.sites.get({ options: [inspect] });
|
|
172
|
+
const [etag] = inspect.getResponseHeaders().get("etag") ?? [];
|
|
173
|
+
|
|
174
|
+
// Later: ask only for what changed.
|
|
175
|
+
const status = new ResponseStatusOption();
|
|
176
|
+
const sites = await client.sites.get({
|
|
177
|
+
headers: { "If-None-Match": etag },
|
|
178
|
+
options: [status],
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
if (status.statusCode === 304) {
|
|
182
|
+
// Nothing changed; keep the copy you already have.
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
A `304` returns `undefined` from the typed call rather than rejecting.
|
|
187
|
+
`undefined` alone does not distinguish "not modified" from "no rows", so pass a
|
|
188
|
+
`ResponseStatusOption` when you need to tell them apart.
|
|
189
|
+
|
|
190
|
+
One wrinkle from the API side: the shared read-only cache does not vary by
|
|
191
|
+
`If-None-Match`, so a request that hits it is answered `200` with a body even
|
|
192
|
+
when your validator still matches. That is expected rather than an error.
|
|
193
|
+
|
|
122
194
|
Use one instance per call. It is written when the response arrives, so sharing
|
|
123
195
|
one across concurrent calls means whichever finishes last wins.
|
|
124
196
|
|
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,63 @@ export declare class ResponseStatusOption implements RequestOption {
|
|
|
79
79
|
statusCode?: number;
|
|
80
80
|
getKey(): string;
|
|
81
81
|
}
|
|
82
|
+
/** Key the {@link RateLimitOption} travels under. */
|
|
83
|
+
export declare const RATE_LIMIT_OPTION_KEY = "prdb.rateLimit";
|
|
84
|
+
/** One rate-limiting window, as the API reported it on a response. */
|
|
85
|
+
export interface RateLimitWindow {
|
|
86
|
+
/** How many requests the window allows in total. */
|
|
87
|
+
readonly limit: number;
|
|
88
|
+
/** How many of them are left. */
|
|
89
|
+
readonly remaining: number;
|
|
90
|
+
/**
|
|
91
|
+
* Seconds until the oldest request leaves the sliding window and frees one
|
|
92
|
+
* slot — not a timestamp, and not the time until the whole window resets.
|
|
93
|
+
* The same quantity `resetsInSeconds` carries on `GET /rate-limit`.
|
|
94
|
+
*/
|
|
95
|
+
readonly resetInSeconds: number;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Per-request option reporting the rate-limit state the API sent back.
|
|
99
|
+
*
|
|
100
|
+
* Every metered response carries its rate-limit headers, so a client can pace
|
|
101
|
+
* itself off the answers it is already getting instead of spending a request on
|
|
102
|
+
* `GET /rate-limit` to ask.
|
|
103
|
+
*
|
|
104
|
+
* Kiota can surface response headers through its own headers-inspection option,
|
|
105
|
+
* but as raw multi-valued strings that a caller has to find, pick apart and
|
|
106
|
+
* parse. This option is the typed form:
|
|
107
|
+
*
|
|
108
|
+
* ```ts
|
|
109
|
+
* const limits = new RateLimitOption();
|
|
110
|
+
*
|
|
111
|
+
* const sites = await client.sites.get({ options: [limits] });
|
|
112
|
+
*
|
|
113
|
+
* if (limits.hour && limits.hour.remaining < 50) {
|
|
114
|
+
* // Slow down; limits.hour.resetInSeconds until a slot frees up.
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* Use one instance per call: it is written when the response arrives, so
|
|
119
|
+
* sharing one across concurrent calls means whichever finishes last wins.
|
|
120
|
+
*/
|
|
121
|
+
export declare class RateLimitOption implements RequestOption {
|
|
122
|
+
/**
|
|
123
|
+
* The hourly window, or `undefined` if the response carried no hourly
|
|
124
|
+
* headers.
|
|
125
|
+
*/
|
|
126
|
+
hour?: RateLimitWindow;
|
|
127
|
+
/**
|
|
128
|
+
* The monthly window, or `undefined` if the response carried no monthly
|
|
129
|
+
* headers.
|
|
130
|
+
*
|
|
131
|
+
* Both are `undefined` for a response the API did not meter — `401`, `403`,
|
|
132
|
+
* `503` and `GET /rate-limit` itself — and for a call that never reached a
|
|
133
|
+
* response. A `429` carries only the window that refused it, so exactly one
|
|
134
|
+
* of the two being set is normal rather than a partial reading.
|
|
135
|
+
*/
|
|
136
|
+
month?: RateLimitWindow;
|
|
137
|
+
getKey(): string;
|
|
138
|
+
}
|
|
82
139
|
/**
|
|
83
140
|
* How the SDK retries a request the API refused with 429, 503 or 504.
|
|
84
141
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAIN,KAAK,aAAa,EAClB,MAAM,+BAA+B,CAAC;AAavC,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE9E,yCAAyC;AACzC,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,yBAAyB,CAAC;AAEvD,yEAAyE;AACzE,MAAM,MAAM,SAAS,GAAG,CACvB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,WAAW,KACb,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB;;;;;;GAMG;AACH,qBAAa,wB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MAAM,CAAC;IACvB,iCAAiC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,eAAgB,YAAW,aAAa;IACpD;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IAExB,MAAM,IAAI,MAAM;CAGhB;AA4ED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,8EAA8E;AAC9E,eAAO,MAAM,cAAc,EAAE,YAAgC,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC7B,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,CAiB/D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,GAAE,sBAA2B,GAClC,UAAU,CAUZ;AAuKD,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -85,15 +85,85 @@ export class ResponseStatusOption {
|
|
|
85
85
|
return RESPONSE_STATUS_OPTION_KEY;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
+
/** Key the {@link RateLimitOption} travels under. */
|
|
89
|
+
export const RATE_LIMIT_OPTION_KEY = "prdb.rateLimit";
|
|
88
90
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
+
* Per-request option reporting the rate-limit state the API sent back.
|
|
92
|
+
*
|
|
93
|
+
* Every metered response carries its rate-limit headers, so a client can pace
|
|
94
|
+
* itself off the answers it is already getting instead of spending a request on
|
|
95
|
+
* `GET /rate-limit` to ask.
|
|
96
|
+
*
|
|
97
|
+
* Kiota can surface response headers through its own headers-inspection option,
|
|
98
|
+
* but as raw multi-valued strings that a caller has to find, pick apart and
|
|
99
|
+
* parse. This option is the typed form:
|
|
100
|
+
*
|
|
101
|
+
* ```ts
|
|
102
|
+
* const limits = new RateLimitOption();
|
|
103
|
+
*
|
|
104
|
+
* const sites = await client.sites.get({ options: [limits] });
|
|
105
|
+
*
|
|
106
|
+
* if (limits.hour && limits.hour.remaining < 50) {
|
|
107
|
+
* // Slow down; limits.hour.resetInSeconds until a slot frees up.
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* Use one instance per call: it is written when the response arrives, so
|
|
112
|
+
* sharing one across concurrent calls means whichever finishes last wins.
|
|
113
|
+
*/
|
|
114
|
+
export class RateLimitOption {
|
|
115
|
+
/**
|
|
116
|
+
* The hourly window, or `undefined` if the response carried no hourly
|
|
117
|
+
* headers.
|
|
118
|
+
*/
|
|
119
|
+
hour;
|
|
120
|
+
/**
|
|
121
|
+
* The monthly window, or `undefined` if the response carried no monthly
|
|
122
|
+
* headers.
|
|
123
|
+
*
|
|
124
|
+
* Both are `undefined` for a response the API did not meter — `401`, `403`,
|
|
125
|
+
* `503` and `GET /rate-limit` itself — and for a call that never reached a
|
|
126
|
+
* response. A `429` carries only the window that refused it, so exactly one
|
|
127
|
+
* of the two being set is normal rather than a partial reading.
|
|
128
|
+
*/
|
|
129
|
+
month;
|
|
130
|
+
getKey() {
|
|
131
|
+
return RATE_LIMIT_OPTION_KEY;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Read one window's three headers, or `undefined` if they are not all there.
|
|
136
|
+
*
|
|
137
|
+
* Deliberately lenient: rate-limit headers are metadata about a call that has
|
|
138
|
+
* already succeeded, so a missing or malformed one reports "no reading" rather
|
|
139
|
+
* than failing the call the caller actually made.
|
|
140
|
+
*/
|
|
141
|
+
function readRateLimitWindow(headers, window) {
|
|
142
|
+
const values = [];
|
|
143
|
+
for (const name of ["Limit", "Remaining", "Reset"]) {
|
|
144
|
+
const raw = headers.get(`X-RateLimit-${name}-${window}`);
|
|
145
|
+
if (raw === null) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
// Number() rather than parseInt(): parseInt("12abc") is 12, which would
|
|
149
|
+
// turn a malformed header into a plausible-looking reading.
|
|
150
|
+
const value = Number(raw.trim());
|
|
151
|
+
if (!Number.isInteger(value)) {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
values.push(value);
|
|
155
|
+
}
|
|
156
|
+
const [limit, remaining, resetInSeconds] = values;
|
|
157
|
+
return { limit, remaining, resetInSeconds };
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Records response metadata into the options a request carries.
|
|
91
161
|
*
|
|
92
162
|
* Sits at the outer end of the SDK's pipeline, above the retry and redirect
|
|
93
163
|
* handlers, so what it records is the response the caller's result is built
|
|
94
164
|
* from rather than an attempt on the way there.
|
|
95
165
|
*/
|
|
96
|
-
class
|
|
166
|
+
class ResponseMetadataHandler {
|
|
97
167
|
next;
|
|
98
168
|
async execute(url, requestInit, requestOptions) {
|
|
99
169
|
if (!this.next) {
|
|
@@ -103,9 +173,14 @@ class ResponseStatusHandler {
|
|
|
103
173
|
// Matched by key rather than `instanceof`: the key is ours alone, and two
|
|
104
174
|
// copies of this package in one dependency tree would still agree on it
|
|
105
175
|
// where a class identity check would not.
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
|
|
176
|
+
const status = requestOptions?.[RESPONSE_STATUS_OPTION_KEY];
|
|
177
|
+
if (status) {
|
|
178
|
+
status.statusCode = response.status;
|
|
179
|
+
}
|
|
180
|
+
const limits = requestOptions?.[RATE_LIMIT_OPTION_KEY];
|
|
181
|
+
if (limits) {
|
|
182
|
+
limits.hour = readRateLimitWindow(response.headers, "Hour");
|
|
183
|
+
limits.month = readRateLimitWindow(response.headers, "Month");
|
|
109
184
|
}
|
|
110
185
|
return response;
|
|
111
186
|
}
|
|
@@ -173,7 +248,7 @@ function buildHttpClient(customFetch, retry) {
|
|
|
173
248
|
// First in the list is outermost, which puts it above the retry and redirect
|
|
174
249
|
// handlers: the status it records is the one the caller's result was built
|
|
175
250
|
// from, not that of an attempt on the way there.
|
|
176
|
-
middlewares = [new
|
|
251
|
+
middlewares = [new ResponseMetadataHandler(), ...middlewares];
|
|
177
252
|
return KiotaClientFactory.create(customFetch, middlewares);
|
|
178
253
|
}
|
|
179
254
|
/**
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACN,+BAA+B,EAC/B,4BAA4B,EAC5B,cAAc,GAEd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAEN,kBAAkB,EAElB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAmB,MAAM,2BAA2B,CAAC;AAE9E,yCAAyC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAQvD;;;;;;GAMG;AACH,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAClD,YA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