@prdb/sdk 0.5.0 → 0.6.1

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 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
 
@@ -12,7 +12,7 @@ export interface DownloadedFromIndexersRequestBuilder extends BaseRequestBuilder
12
12
  */
13
13
  byDownloadedFromIndexerId(downloadedFromIndexerId: Guid): WithDownloadedFromIndexerItemRequestBuilder;
14
14
  /**
15
- * Creates a downloaded-from-indexer entry for the authenticated user and returns 201, or returns the complete existing owned entry without mutating it and returns 200. Uniqueness is defined by userId, videoId (including null), indexerSource, and the trimmed indexerId; comparison uses the database collation. downloadIdentifier is not part of the key. Returns 404 when the referenced wanted video does not exist and 409 only for a different non-recoverable conflict.
15
+ * Creates a downloaded-from-indexer entry for the authenticated user and returns 201, or returns the complete existing owned entry without mutating it and returns 200. Uniqueness is defined by userId, videoId (including null), indexerSource, and the trimmed indexerId; comparison uses the database collation. downloadIdentifier is not part of the key. A pHash on a filename must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. Returns 404 when the referenced wanted video does not exist and 409 only for a different non-recoverable conflict.
16
16
  * @param body The request body
17
17
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
18
18
  * @returns {Promise<DownloadedFromIndexerResponse>}
@@ -26,7 +26,7 @@ export interface DownloadedFromIndexersRequestBuilder extends BaseRequestBuilder
26
26
  */
27
27
  post(body: AddDownloadedFromIndexerRequest, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<DownloadedFromIndexerResponse | undefined>;
28
28
  /**
29
- * Creates a downloaded-from-indexer entry for the authenticated user and returns 201, or returns the complete existing owned entry without mutating it and returns 200. Uniqueness is defined by userId, videoId (including null), indexerSource, and the trimmed indexerId; comparison uses the database collation. downloadIdentifier is not part of the key. Returns 404 when the referenced wanted video does not exist and 409 only for a different non-recoverable conflict.
29
+ * Creates a downloaded-from-indexer entry for the authenticated user and returns 201, or returns the complete existing owned entry without mutating it and returns 200. Uniqueness is defined by userId, videoId (including null), indexerSource, and the trimmed indexerId; comparison uses the database collation. downloadIdentifier is not part of the key. A pHash on a filename must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. Returns 404 when the referenced wanted video does not exist and 409 only for a different non-recoverable conflict.
30
30
  * @param body The request body
31
31
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
32
32
  * @returns {RequestInformation}
@@ -12,7 +12,7 @@ export interface FilenamesRequestBuilder extends BaseRequestBuilder<FilenamesReq
12
12
  */
13
13
  byFilenameId(filenameId: Guid): WithFilenameItemRequestBuilder;
14
14
  /**
15
- * Adds a single filename row to a downloaded-from-indexer entry owned by the currently authenticated user. Returns 409 when the filename already exists under the parent entry.
15
+ * Adds a single filename row to a downloaded-from-indexer entry owned by the currently authenticated user. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. Returns 409 when the filename already exists under the parent entry.
16
16
  * @param body The request body
17
17
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
18
18
  * @returns {Promise<DownloadedFromIndexerResponse>}
@@ -26,7 +26,7 @@ export interface FilenamesRequestBuilder extends BaseRequestBuilder<FilenamesReq
26
26
  */
27
27
  post(body: AddDownloadedFromIndexerFilenameRequest, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<DownloadedFromIndexerResponse | undefined>;
28
28
  /**
29
- * Adds a single filename row to a downloaded-from-indexer entry owned by the currently authenticated user. Returns 409 when the filename already exists under the parent entry.
29
+ * Adds a single filename row to a downloaded-from-indexer entry owned by the currently authenticated user. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. Returns 409 when the filename already exists under the parent entry.
30
30
  * @param body The request body
31
31
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
32
32
  * @returns {RequestInformation}
@@ -15,7 +15,7 @@ export interface WithFilenameItemRequestBuilder extends BaseRequestBuilder<WithF
15
15
  */
16
16
  delete(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
17
17
  /**
18
- * Updates a single filename row for a downloaded-from-indexer entry owned by the currently authenticated user. Returns 409 when the filename would duplicate another filename under the same parent.
18
+ * Updates a single filename row for a downloaded-from-indexer entry owned by the currently authenticated user. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. Returns 409 when the filename would duplicate another filename under the same parent.
19
19
  * @param body The request body
20
20
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
21
21
  * @returns {Promise<DownloadedFromIndexerResponse>}
@@ -35,7 +35,7 @@ export interface WithFilenameItemRequestBuilder extends BaseRequestBuilder<WithF
35
35
  */
36
36
  toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
37
37
  /**
38
- * Updates a single filename row for a downloaded-from-indexer entry owned by the currently authenticated user. Returns 409 when the filename would duplicate another filename under the same parent.
38
+ * Updates a single filename row for a downloaded-from-indexer entry owned by the currently authenticated user. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. Returns 409 when the filename would duplicate another filename under the same parent.
39
39
  * @param body The request body
40
40
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
41
41
  * @returns {RequestInformation}
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
5
5
  */
6
6
  export interface LookupRequestBuilder extends BaseRequestBuilder<LookupRequestBuilder> {
7
7
  /**
8
- * Returns a flat list of active indexer filehash entries matching any supplied IDs, combined indexer source and indexer ID pairs, hashes, filenames, or file sizes. Requires API key authentication.
8
+ * Returns a flat list of active indexer filehash entries matching any supplied IDs, combined indexer source and indexer ID pairs, hashes, filenames, or file sizes. pHashes are matched for equality and must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure matches nothing. Requires API key authentication.
9
9
  * @param body The request body
10
10
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
11
11
  * @returns {Promise<LookupIndexerFilehashesResponse>}
@@ -17,7 +17,7 @@ export interface LookupRequestBuilder extends BaseRequestBuilder<LookupRequestBu
17
17
  */
18
18
  post(body: LookupIndexerFilehashesRequest, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<LookupIndexerFilehashesResponse | undefined>;
19
19
  /**
20
- * Returns a flat list of active indexer filehash entries matching any supplied IDs, combined indexer source and indexer ID pairs, hashes, filenames, or file sizes. Requires API key authentication.
20
+ * Returns a flat list of active indexer filehash entries matching any supplied IDs, combined indexer source and indexer ID pairs, hashes, filenames, or file sizes. pHashes are matched for equality and must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure matches nothing. Requires API key authentication.
21
21
  * @param body The request body
22
22
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
23
23
  * @returns {RequestInformation}
@@ -51,7 +51,7 @@ export interface ActorChangeActorDto extends AdditionalDataHolder, Parsable {
51
51
  */
52
52
  birthday?: DateOnly | null;
53
53
  /**
54
- * The birthdayType property
54
+ * Known values: ExactDate (1), MonthYear (2), Year (3).
55
55
  */
56
56
  birthdayType?: number | null;
57
57
  /**
@@ -269,7 +269,7 @@ export interface ActorDetailDto extends AdditionalDataHolder, Parsable {
269
269
  */
270
270
  birthday?: DateOnly | null;
271
271
  /**
272
- * The birthdayType property
272
+ * Known values: ExactDate (1), MonthYear (2), Year (3).
273
273
  */
274
274
  birthdayType?: number | null;
275
275
  /**
@@ -2149,11 +2149,11 @@ export interface FulfillWantedVideoItem extends AdditionalDataHolder, Parsable {
2149
2149
  */
2150
2150
  fulfilledAtUtc?: Date | null;
2151
2151
  /**
2152
- * The fulfilledInQuality property
2152
+ * Known values: P720 (0), P1080 (1), P2160 (2).
2153
2153
  */
2154
2154
  fulfilledInQuality?: number | null;
2155
2155
  /**
2156
- * The fulfillmentByApp property
2156
+ * Known values: Sabnzbd (0), Nzbget (1), Filesystem (2), Other (3), Ordeno (4).
2157
2157
  */
2158
2158
  fulfillmentByApp?: number | null;
2159
2159
  /**
@@ -2443,7 +2443,7 @@ export interface IdentifyVideoResultDto extends AdditionalDataHolder, Parsable {
2443
2443
  */
2444
2444
  confidence?: number | null;
2445
2445
  /**
2446
- * The matchedBy property
2446
+ * Known values: OsHash (0), PHash (1), Filename (2), ReleaseName (3), Site (4).
2447
2447
  */
2448
2448
  matchedBy?: number | null;
2449
2449
  /**
@@ -4088,11 +4088,11 @@ export interface UpdateWantedVideoRequest extends AdditionalDataHolder, Parsable
4088
4088
  */
4089
4089
  fulfilledAtUtc?: Date | null;
4090
4090
  /**
4091
- * The fulfilledInQuality property
4091
+ * Known values: P720 (0), P1080 (1), P2160 (2).
4092
4092
  */
4093
4093
  fulfilledInQuality?: number | null;
4094
4094
  /**
4095
- * The fulfillmentByApp property
4095
+ * Known values: Sabnzbd (0), Nzbget (1), Filesystem (2), Other (3), Ordeno (4).
4096
4096
  */
4097
4097
  fulfillmentByApp?: number | null;
4098
4098
  /**
@@ -4114,11 +4114,11 @@ export interface UpdateWantedVideoResponse extends AdditionalDataHolder, Parsabl
4114
4114
  */
4115
4115
  fulfilledAtUtc?: Date | null;
4116
4116
  /**
4117
- * The fulfilledInQuality property
4117
+ * Known values: P720 (0), P1080 (1), P2160 (2).
4118
4118
  */
4119
4119
  fulfilledInQuality?: number | null;
4120
4120
  /**
4121
- * The fulfillmentByApp property
4121
+ * Known values: Sabnzbd (0), Nzbget (1), Filesystem (2), Other (3), Ordeno (4).
4122
4122
  */
4123
4123
  fulfillmentByApp?: number | null;
4124
4124
  /**
@@ -4588,11 +4588,11 @@ export interface WantedVideoChangeWantedVideoDto extends AdditionalDataHolder, P
4588
4588
  */
4589
4589
  fulfilledAtUtc?: Date | null;
4590
4590
  /**
4591
- * The fulfilledInQuality property
4591
+ * Known values: P720 (0), P1080 (1), P2160 (2).
4592
4592
  */
4593
4593
  fulfilledInQuality?: number | null;
4594
4594
  /**
4595
- * The fulfillmentByApp property
4595
+ * Known values: Sabnzbd (0), Nzbget (1), Filesystem (2), Other (3), Ordeno (4).
4596
4596
  */
4597
4597
  fulfillmentByApp?: number | null;
4598
4598
  /**
@@ -4646,11 +4646,11 @@ export interface WantedVideoSummaryDto extends AdditionalDataHolder, Parsable {
4646
4646
  */
4647
4647
  fulfilledAtUtc?: Date | null;
4648
4648
  /**
4649
- * The fulfilledInQuality property
4649
+ * Known values: P720 (0), P1080 (1), P2160 (2).
4650
4650
  */
4651
4651
  fulfilledInQuality?: number | null;
4652
4652
  /**
4653
- * The fulfillmentByApp property
4653
+ * Known values: Sabnzbd (0), Nzbget (1), Filesystem (2), Other (3), Ordeno (4).
4654
4654
  */
4655
4655
  fulfillmentByApp?: number | null;
4656
4656
  /**
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
5
5
  */
6
6
  export interface FilehashSubmissionsRequestBuilder extends BaseRequestBuilder<FilehashSubmissionsRequestBuilder> {
7
7
  /**
8
- * Submits up to 200 assignments of a file hash to a video, on behalf of the authenticated user. Intended for assignments a person confirmed in a client's UI — exactly the cases automatic detection missed. Each entry needs a videoId and an osHash; the osHash is the only aggregation key, so an entry carrying only a pHash cannot be used. The filename is optional and may be withheld; the endpoint works without it. Every entry gets its own outcome and the status stays 200: an unknown videoId is reported as videoNotFound, and an assignment that contradicts an existing one is stored as conflicted rather than overwriting it. Submissions are recorded in their own table. They appear in no read endpoint and change no lookup result; whether they ever enter the aggregated hash set is decided by the scraper's aggregation job, not here. Clients must make this strictly opt-in and off by default — that is a client-side obligation the API cannot enforce. Requires API key authentication.
8
+ * Submits up to 200 assignments of a file hash to a video, on behalf of the authenticated user. Intended for assignments a person confirmed in a client's UI — exactly the cases automatic detection missed. Each entry needs a videoId and an osHash; the osHash is the only aggregation key, so an entry carrying only a pHash cannot be used. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. The filename is optional and may be withheld; the endpoint works without it. Every entry gets its own outcome and the status stays 200: an unknown videoId is reported as videoNotFound, and an assignment that contradicts an existing one is stored as conflicted rather than overwriting it. Submissions are recorded in their own table. They appear in no read endpoint and change no lookup result; whether they ever enter the aggregated hash set is decided by the scraper's aggregation job, not here. Clients must make this strictly opt-in and off by default — that is a client-side obligation the API cannot enforce. Requires API key authentication.
9
9
  * @param body The request body
10
10
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
11
11
  * @returns {Promise<SubmitVideoFilehashesResponse>}
@@ -17,7 +17,7 @@ export interface FilehashSubmissionsRequestBuilder extends BaseRequestBuilder<Fi
17
17
  */
18
18
  post(body: SubmitVideoFilehashesRequest, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<SubmitVideoFilehashesResponse | undefined>;
19
19
  /**
20
- * Submits up to 200 assignments of a file hash to a video, on behalf of the authenticated user. Intended for assignments a person confirmed in a client's UI — exactly the cases automatic detection missed. Each entry needs a videoId and an osHash; the osHash is the only aggregation key, so an entry carrying only a pHash cannot be used. The filename is optional and may be withheld; the endpoint works without it. Every entry gets its own outcome and the status stays 200: an unknown videoId is reported as videoNotFound, and an assignment that contradicts an existing one is stored as conflicted rather than overwriting it. Submissions are recorded in their own table. They appear in no read endpoint and change no lookup result; whether they ever enter the aggregated hash set is decided by the scraper's aggregation job, not here. Clients must make this strictly opt-in and off by default — that is a client-side obligation the API cannot enforce. Requires API key authentication.
20
+ * Submits up to 200 assignments of a file hash to a video, on behalf of the authenticated user. Intended for assignments a person confirmed in a client's UI — exactly the cases automatic detection missed. Each entry needs a videoId and an osHash; the osHash is the only aggregation key, so an entry carrying only a pHash cannot be used. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure is stored but can never be matched. The filename is optional and may be withheld; the endpoint works without it. Every entry gets its own outcome and the status stays 200: an unknown videoId is reported as videoNotFound, and an assignment that contradicts an existing one is stored as conflicted rather than overwriting it. Submissions are recorded in their own table. They appear in no read endpoint and change no lookup result; whether they ever enter the aggregated hash set is decided by the scraper's aggregation job, not here. Clients must make this strictly opt-in and off by default — that is a client-side obligation the API cannot enforce. Requires API key authentication.
21
21
  * @param body The request body
22
22
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
23
23
  * @returns {RequestInformation}
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
5
5
  */
6
6
  export interface LookupRequestBuilder extends BaseRequestBuilder<LookupRequestBuilder> {
7
7
  /**
8
- * Returns a flat list of active filehash entries matching any supplied IDs, video IDs, hashes, filenames, or file sizes. Results can include unlinked rows whose videoId is null. Requires API key authentication.
8
+ * Returns a flat list of active filehash entries matching any supplied IDs, video IDs, hashes, filenames, or file sizes. Results can include unlinked rows whose videoId is null. pHashes are matched for equality and must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure matches nothing. Requires API key authentication.
9
9
  * @param body The request body
10
10
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
11
11
  * @returns {Promise<LookupVideoFilehashesResponse>}
@@ -17,7 +17,7 @@ export interface LookupRequestBuilder extends BaseRequestBuilder<LookupRequestBu
17
17
  */
18
18
  post(body: LookupVideoFilehashesRequest, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<LookupVideoFilehashesResponse | undefined>;
19
19
  /**
20
- * Returns a flat list of active filehash entries matching any supplied IDs, video IDs, hashes, filenames, or file sizes. Results can include unlinked rows whose videoId is null. Requires API key authentication.
20
+ * Returns a flat list of active filehash entries matching any supplied IDs, video IDs, hashes, filenames, or file sizes. Results can include unlinked rows whose videoId is null. pHashes are matched for equality and must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure matches nothing. Requires API key authentication.
21
21
  * @param body The request body
22
22
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
23
23
  * @returns {RequestInformation}
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
5
5
  */
6
6
  export interface IdentifyRequestBuilder extends BaseRequestBuilder<IdentifyRequestBuilder> {
7
7
  /**
8
- * Identifies up to 200 local files in one request and returns one result per file, mapped back by the client-assigned ref and in input order. Each file walks an identification ladder and the first rung that matches wins: OS hash, then perceptual hash (compared for equality), then a stored file name, then the file name without its extension as a scene release title, and finally the site read out of the file name. matchedBy names the rung and confidence says how far the result can be trusted, so a client can decide which files it may file automatically and which it must show to a person. When a rung matches several videos equally well, the server does not guess: videoId is null, confidence is ambiguous and every candidate is listed. A file that matches nothing is a result with confidence none, not an error. Set includeVideoDetails to receive the full video document per matched file; it is off by default because 200 full documents is a large response. The whole request counts as one request against the rate limit. Nothing sent to this endpoint is stored. Requires API key authentication.
8
+ * Identifies up to 200 local files in one request and returns one result per file, mapped back by the client-assigned ref and in input order. Each file walks an identification ladder and the first rung that matches wins: OS hash, then perceptual hash (compared for equality), then a stored file name, then the file name without its extension as a scene release title, and finally the site read out of the file name. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure skips that rung silently rather than failing, so send none if in doubt. matchedBy names the rung and confidence says how far the result can be trusted, so a client can decide which files it may file automatically and which it must show to a person. When a rung matches several videos equally well, the server does not guess: videoId is null, confidence is ambiguous and every candidate is listed. A file that matches nothing is a result with confidence none, not an error. Set includeVideoDetails to receive the full video document per matched file; it is off by default because 200 full documents is a large response. The whole request counts as one request against the rate limit. Nothing sent to this endpoint is stored. Requires API key authentication.
9
9
  * @param body The request body
10
10
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
11
11
  * @returns {Promise<IdentifyVideosResponse>}
@@ -17,7 +17,7 @@ export interface IdentifyRequestBuilder extends BaseRequestBuilder<IdentifyReque
17
17
  */
18
18
  post(body: IdentifyVideosRequest, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<IdentifyVideosResponse | undefined>;
19
19
  /**
20
- * Identifies up to 200 local files in one request and returns one result per file, mapped back by the client-assigned ref and in input order. Each file walks an identification ladder and the first rung that matches wins: OS hash, then perceptual hash (compared for equality), then a stored file name, then the file name without its extension as a scene release title, and finally the site read out of the file name. matchedBy names the rung and confidence says how far the result can be trusted, so a client can decide which files it may file automatically and which it must show to a person. When a rung matches several videos equally well, the server does not guess: videoId is null, confidence is ambiguous and every candidate is listed. A file that matches nothing is a result with confidence none, not an error. Set includeVideoDetails to receive the full video document per matched file; it is off by default because 200 full documents is a large response. The whole request counts as one request against the rate limit. Nothing sent to this endpoint is stored. Requires API key authentication.
20
+ * Identifies up to 200 local files in one request and returns one result per file, mapped back by the client-assigned ref and in input order. Each file walks an identification ladder and the first rung that matches wins: OS hash, then perceptual hash (compared for equality), then a stored file name, then the file name without its extension as a scene release title, and finally the site read out of the file name. A pHash must be computed exactly as described under Perceptual hashes in the API description; a value from any other procedure skips that rung silently rather than failing, so send none if in doubt. matchedBy names the rung and confidence says how far the result can be trusted, so a client can decide which files it may file automatically and which it must show to a person. When a rung matches several videos equally well, the server does not guess: videoId is null, confidence is ambiguous and every candidate is listed. A file that matches nothing is a result with confidence none, not an error. Set includeVideoDetails to receive the full video document per matched file; it is off by default because 200 full documents is a large response. The whole request counts as one request against the rate limit. Nothing sent to this endpoint is stored. Requires API key authentication.
21
21
  * @param body The request body
22
22
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
23
23
  * @returns {RequestInformation}
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
  *
@@ -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,wBAAyB,SAAQ,KAAK;gBACtC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAO/C;AAED,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,wBAAwB,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,oBAAqB,YAAW,aAAa;IACzD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,IAAI,MAAM;CAGhB;AAsCD;;;;;;;;;;;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;;;O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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
- * Records the response status into the {@link ResponseStatusOption} a request
90
- * carries.
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 ResponseStatusHandler {
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 option = requestOptions?.[RESPONSE_STATUS_OPTION_KEY];
107
- if (option) {
108
- option.statusCode = response.status;
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 ResponseStatusHandler(), ...middlewares];
251
+ middlewares = [new ResponseMetadataHandler(), ...middlewares];
177
252
  return KiotaClientFactory.create(customFetch, middlewares);
178
253
  }
179
254
  /**
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xB,CAAC;IAAC,MAAM,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,wCAAwC,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CAAC,wCAAwC,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,IAAI,YAAY,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACd,uEAAuE,OAAO,EAAE,CAChF,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prdb/sdk",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "TypeScript SDK for the prdb Public API",
5
5
  "license": "MIT",
6
6
  "repository": {