@elmohq/sdk 0.1.0 → 0.1.2
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 +18 -17
- package/dist/calls/index.d.mts +2 -2
- package/dist/calls/index.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +52 -50
- package/dist/index.mjs.map +1 -1
- package/dist/{request-options-DWYI_Ldj.d.mts → request-options-DHd9ZVo4.d.mts} +71 -72
- package/dist/request-options-DHd9ZVo4.d.mts.map +1 -0
- package/dist/{tools-SwP0sK8H.mjs → tools-B1lVtYAr.mjs} +10 -9
- package/dist/tools-B1lVtYAr.mjs.map +1 -0
- package/dist/{tools-7Hs5J2xb.d.mts → tools-DpxrXc33.d.mts} +50 -36
- package/dist/tools-DpxrXc33.d.mts.map +1 -0
- package/dist/types/index.d.mts +1 -1
- package/package.json +2 -1
- package/src/calls/brands-list.ts +1 -1
- package/src/calls/competitors-list.ts +1 -1
- package/src/calls/organizations-list.ts +1 -1
- package/src/calls/prompts-list.ts +1 -1
- package/src/calls/prompts-runs-list.ts +1 -1
- package/src/calls/reports-list.ts +1 -1
- package/src/client.ts +7 -20
- package/src/internal/core/dispatch.ts +2 -4
- package/src/internal/core/errors.ts +5 -5
- package/src/internal/{page → core}/page.ts +5 -5
- package/src/internal/core/types.ts +6 -8
- package/src/internal/feature/logger.ts +2 -2
- package/src/internal/feature/retry.ts +53 -50
- package/src/internal/feature/timeout.ts +2 -2
- package/src/internal/feature/validate.ts +8 -0
- package/src/resources/analytics.ts +8 -7
- package/src/resources/brands.ts +7 -4
- package/src/resources/competitors.ts +4 -3
- package/src/resources/identity.ts +2 -1
- package/src/resources/opportunities.ts +3 -1
- package/src/resources/organizations.ts +6 -5
- package/src/resources/prompts.ts +3 -2
- package/src/resources/reports.ts +3 -2
- package/src/resources/runs.ts +5 -4
- package/src/resources/tools.ts +1 -0
- package/src/types/analytics.ts +35 -25
- package/src/types/runs.ts +7 -5
- package/src/types/shared/model-filter.ts +7 -5
- package/dist/request-options-DWYI_Ldj.d.mts.map +0 -1
- package/dist/tools-7Hs5J2xb.d.mts.map +0 -1
- package/dist/tools-SwP0sK8H.mjs.map +0 -1
|
@@ -27,14 +27,16 @@ type RateLimitError = Error;
|
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/types/shared/model-filter.d.ts
|
|
29
29
|
/**
|
|
30
|
-
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
31
|
+
* Aligned down to the quarter hour, the grain analytics are aggregated at; where a response repeats
|
|
32
|
+
* the window, it repeats the aligned one. A bare `YYYY-MM-DD` is rejected: that is
|
|
33
|
+
* `/prompts/{promptId}/snapshot`'s spelling and means a local calendar day there.
|
|
33
34
|
*/
|
|
34
35
|
type WindowStart = Date;
|
|
35
36
|
/**
|
|
36
|
-
* Exclusive upper bound of the window, an ISO 8601 timestamp
|
|
37
|
-
* exactly `end` is outside it.
|
|
37
|
+
* Exclusive upper bound of the window, an ISO 8601 timestamp, also aligned down to the quarter
|
|
38
|
+
* hour. The window is half-open: a run at exactly `end` is outside it. `start` and `end` inside one
|
|
39
|
+
* quarter-hour bucket leave an empty window and are rejected.
|
|
38
40
|
*/
|
|
39
41
|
type WindowEnd = Date;
|
|
40
42
|
/** Restrict to one model, e.g. `chatgpt`. See `models.list()`. */
|
|
@@ -388,14 +390,16 @@ type GetBrandQueryFanoutResponses = {
|
|
|
388
390
|
};
|
|
389
391
|
type GetBrandAnalyticsParams = {
|
|
390
392
|
/**
|
|
391
|
-
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
392
|
-
*
|
|
393
|
-
*
|
|
393
|
+
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
394
|
+
* Aligned down to the quarter hour, the grain analytics are aggregated at; where a response
|
|
395
|
+
* repeats the window, it repeats the aligned one. A bare `YYYY-MM-DD` is rejected: that is
|
|
396
|
+
* `/prompts/{promptId}/snapshot`'s spelling and means a local calendar day there.
|
|
394
397
|
*/
|
|
395
398
|
start: WindowStart;
|
|
396
399
|
/**
|
|
397
|
-
* Exclusive upper bound of the window, an ISO 8601 timestamp
|
|
398
|
-
* exactly `end` is outside it.
|
|
400
|
+
* Exclusive upper bound of the window, an ISO 8601 timestamp, also aligned down to the quarter
|
|
401
|
+
* hour. The window is half-open: a run at exactly `end` is outside it. `start` and `end` inside
|
|
402
|
+
* one quarter-hour bucket leave an empty window and are rejected.
|
|
399
403
|
*/
|
|
400
404
|
end: WindowEnd;
|
|
401
405
|
/** Restrict to one model, e.g. `chatgpt`. See `models.list()`. */
|
|
@@ -405,14 +409,16 @@ type GetBrandAnalyticsParams = {
|
|
|
405
409
|
};
|
|
406
410
|
type ListBrandCitationDomainsParams = {
|
|
407
411
|
/**
|
|
408
|
-
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
409
|
-
*
|
|
410
|
-
*
|
|
412
|
+
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
413
|
+
* Aligned down to the quarter hour, the grain analytics are aggregated at; where a response
|
|
414
|
+
* repeats the window, it repeats the aligned one. A bare `YYYY-MM-DD` is rejected: that is
|
|
415
|
+
* `/prompts/{promptId}/snapshot`'s spelling and means a local calendar day there.
|
|
411
416
|
*/
|
|
412
417
|
start: WindowStart;
|
|
413
418
|
/**
|
|
414
|
-
* Exclusive upper bound of the window, an ISO 8601 timestamp
|
|
415
|
-
* exactly `end` is outside it.
|
|
419
|
+
* Exclusive upper bound of the window, an ISO 8601 timestamp, also aligned down to the quarter
|
|
420
|
+
* hour. The window is half-open: a run at exactly `end` is outside it. `start` and `end` inside
|
|
421
|
+
* one quarter-hour bucket leave an empty window and are rejected.
|
|
416
422
|
*/
|
|
417
423
|
end: WindowEnd;
|
|
418
424
|
/** Restrict to one model, e.g. `chatgpt`. See `models.list()`. */
|
|
@@ -422,14 +428,16 @@ type ListBrandCitationDomainsParams = {
|
|
|
422
428
|
};
|
|
423
429
|
type ListBrandCitationURLsParams = {
|
|
424
430
|
/**
|
|
425
|
-
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
426
|
-
*
|
|
427
|
-
*
|
|
431
|
+
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
432
|
+
* Aligned down to the quarter hour, the grain analytics are aggregated at; where a response
|
|
433
|
+
* repeats the window, it repeats the aligned one. A bare `YYYY-MM-DD` is rejected: that is
|
|
434
|
+
* `/prompts/{promptId}/snapshot`'s spelling and means a local calendar day there.
|
|
428
435
|
*/
|
|
429
436
|
start: WindowStart;
|
|
430
437
|
/**
|
|
431
|
-
* Exclusive upper bound of the window, an ISO 8601 timestamp
|
|
432
|
-
* exactly `end` is outside it.
|
|
438
|
+
* Exclusive upper bound of the window, an ISO 8601 timestamp, also aligned down to the quarter
|
|
439
|
+
* hour. The window is half-open: a run at exactly `end` is outside it. `start` and `end` inside
|
|
440
|
+
* one quarter-hour bucket leave an empty window and are rejected.
|
|
433
441
|
*/
|
|
434
442
|
end: WindowEnd;
|
|
435
443
|
/** Restrict to one model, e.g. `chatgpt`. See `models.list()`. */
|
|
@@ -439,14 +447,16 @@ type ListBrandCitationURLsParams = {
|
|
|
439
447
|
};
|
|
440
448
|
type ListBrandPromptPerformanceParams = {
|
|
441
449
|
/**
|
|
442
|
-
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
443
|
-
*
|
|
444
|
-
*
|
|
450
|
+
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
451
|
+
* Aligned down to the quarter hour, the grain analytics are aggregated at; where a response
|
|
452
|
+
* repeats the window, it repeats the aligned one. A bare `YYYY-MM-DD` is rejected: that is
|
|
453
|
+
* `/prompts/{promptId}/snapshot`'s spelling and means a local calendar day there.
|
|
445
454
|
*/
|
|
446
455
|
start: WindowStart;
|
|
447
456
|
/**
|
|
448
|
-
* Exclusive upper bound of the window, an ISO 8601 timestamp
|
|
449
|
-
* exactly `end` is outside it.
|
|
457
|
+
* Exclusive upper bound of the window, an ISO 8601 timestamp, also aligned down to the quarter
|
|
458
|
+
* hour. The window is half-open: a run at exactly `end` is outside it. `start` and `end` inside
|
|
459
|
+
* one quarter-hour bucket leave an empty window and are rejected.
|
|
450
460
|
*/
|
|
451
461
|
end: WindowEnd;
|
|
452
462
|
/** Restrict to one model, e.g. `chatgpt`. See `models.list()`. */
|
|
@@ -456,14 +466,16 @@ type ListBrandPromptPerformanceParams = {
|
|
|
456
466
|
};
|
|
457
467
|
type GetBrandQueryFanoutParams = {
|
|
458
468
|
/**
|
|
459
|
-
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
460
|
-
*
|
|
461
|
-
*
|
|
469
|
+
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
470
|
+
* Aligned down to the quarter hour, the grain analytics are aggregated at; where a response
|
|
471
|
+
* repeats the window, it repeats the aligned one. A bare `YYYY-MM-DD` is rejected: that is
|
|
472
|
+
* `/prompts/{promptId}/snapshot`'s spelling and means a local calendar day there.
|
|
462
473
|
*/
|
|
463
474
|
start: WindowStart;
|
|
464
475
|
/**
|
|
465
|
-
* Exclusive upper bound of the window, an ISO 8601 timestamp
|
|
466
|
-
* exactly `end` is outside it.
|
|
476
|
+
* Exclusive upper bound of the window, an ISO 8601 timestamp, also aligned down to the quarter
|
|
477
|
+
* hour. The window is half-open: a run at exactly `end` is outside it. `start` and `end` inside
|
|
478
|
+
* one quarter-hour bucket leave an empty window and are rejected.
|
|
467
479
|
*/
|
|
468
480
|
end: WindowEnd;
|
|
469
481
|
/** Restrict to one model, e.g. `chatgpt`. See `models.list()`. */
|
|
@@ -1297,14 +1309,16 @@ type GetRunResponses = {
|
|
|
1297
1309
|
};
|
|
1298
1310
|
type ListPromptRunsParams = {
|
|
1299
1311
|
/**
|
|
1300
|
-
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1312
|
+
* Inclusive lower bound of the window, an ISO 8601 timestamp such as `2026-01-01T00:00:00Z`.
|
|
1313
|
+
* Aligned down to the quarter hour, the grain analytics are aggregated at; where a response
|
|
1314
|
+
* repeats the window, it repeats the aligned one. A bare `YYYY-MM-DD` is rejected: that is
|
|
1315
|
+
* `/prompts/{promptId}/snapshot`'s spelling and means a local calendar day there.
|
|
1303
1316
|
*/
|
|
1304
1317
|
start: WindowStart;
|
|
1305
1318
|
/**
|
|
1306
|
-
* Exclusive upper bound of the window, an ISO 8601 timestamp
|
|
1307
|
-
* exactly `end` is outside it.
|
|
1319
|
+
* Exclusive upper bound of the window, an ISO 8601 timestamp, also aligned down to the quarter
|
|
1320
|
+
* hour. The window is half-open: a run at exactly `end` is outside it. `start` and `end` inside
|
|
1321
|
+
* one quarter-hour bucket leave an empty window and are rejected.
|
|
1308
1322
|
*/
|
|
1309
1323
|
end: WindowEnd;
|
|
1310
1324
|
/** Restrict to one model, e.g. `chatgpt`. See `models.list()`. */
|
|
@@ -1942,4 +1956,4 @@ type AnalyzeBrandParams = {
|
|
|
1942
1956
|
};
|
|
1943
1957
|
//#endregion
|
|
1944
1958
|
export { GetOrganizationBillingResponses as $, BrandOpportunities as $t, ListPromptsResponses as A, PromptPerformance as An, UpdateCompetitorResponses as At, MentionEntry as B, WindowStart as Bn, ListBrandsResponses as Bt, DeletePromptResponse as C, ListBrandCitationURLsErrors as Cn, GetCompetitorErrors as Ct, ListPromptsErrors as D, ListBrandPromptPerformanceParams as Dn, ListCompetitorsResponses as Dt, GetPromptResponses as E, ListBrandPromptPerformanceErrors as En, ListCompetitorsParams as Et, CitedURLEntry as F, VisibilityPoint as Fn, CreateBrandResponses as Ft, ListPromptRunsParams as G, UnauthorizedError as Gn, Page as Gt, GetRunErrors as H, ForbiddenError as Hn, UpdateBrandParams as Ht, GetPromptSnapshotErrors as I, ValidationError as In, GetBrandErrors as It, RunCitation as J, PaymentRequiredError as Jt, ListPromptRunsResponses as K, Limit as Kt, GetPromptSnapshotParams as L, NotFoundError as Ln, GetBrandResponses as Lt, UpdatePromptErrors as M, ShareOfVoiceEntry as Mn, BrandsList as Mt, UpdatePromptParams as N, ShareOfVoicePoint as Nn, CreateBrandErrors as Nt, ListPromptsParams as O, ListBrandPromptPerformanceResponses as On, UpdateCompetitorErrors as Ot, UpdatePromptResponses as P, TagsFilter as Pn, CreateBrandParams as Pt, GetOrganizationBillingErrors as Q, TagList as Qt, GetPromptSnapshotResponses as R, ModelFilter as Rn, ListBrandsErrors as Rt, DeletePromptErrors as S, ListBrandCitationDomainsResponses as Sn, DeleteCompetitorResponses as St, GetPromptErrors as T, ListBrandCitationURLsResponses as Tn, ListCompetitorsErrors as Tt, GetRunResponses as U, InternalServerError as Un, UpdateBrandResponses as Ut, MentionsSummary as V, Error as Vn, UpdateBrandErrors as Vt, ListPromptRunsErrors as W, RateLimitError as Wn, Pagination as Wt, RunSummary as X, ListBrandTagsResponses as Xt, RunList as Y, ListBrandTagsErrors as Yt, BillingPlan as Z, Tag as Zt, ReportPromptSnapshot as _, GetBrandQueryFanoutErrors as _n, CompetitorsList as _t, CreateReportErrors as a, BrandIdPath as an, Organization as at, CreatePromptParams as b, ListBrandCitationDomainsErrors as bn, CreateCompetitorResponses as bt, CreateReportResponses as c, CitationDomain as cn, PlanLimits as ct, GetReportResponse as d, CitationURLList as dn, Model as dt, CitedPage as en, GetOrganizationErrors as et, GetReportResponses as f, DateRange as fn, ModelList as ft, ListReportsResponses as g, GetBrandAnalyticsResponses as gn, Competitor as gt, ListReportsResponse as h, GetBrandAnalyticsParams as hn, GetMeResponses as ht, OnboardingSuggestion as i, OpportunityPrompt as in, ListOrganizationsResponses as it, Prompt as j, PromptPerformanceList as jn, Brand as jt, ListPromptsResponse as k, ModelVisibility as kn, UpdateCompetitorParams as kt, GetReportErrors as l, CitationDomainList as ln, ListModelsErrors as lt, ListReportsParams as m, GetBrandAnalyticsErrors as mn, GetMeErrors as mt, AnalyzeBrandParams as n, GetBrandOpportunitiesResponses as nn, ListOrganizationsErrors as nt, CreateReportParams as o, BrandAnalytics as on, OrganizationBilling as ot, ListReportsErrors as p, FanoutQuery as pn, APIKeyIdentity as pt, Run as q, ConflictError as qt, AnalyzeBrandResponses as r, Opportunity as rn, ListOrganizationsParams as rt, CreateReportResponse as s, BrandQueryFanout as sn, OrganizationList as st, AnalyzeBrandErrors as t, GetBrandOpportunitiesErrors as tn, GetOrganizationResponses as tt, GetReportParams as u, CitationURL as un, ListModelsResponses as ut, ReportSummary as v, GetBrandQueryFanoutParams as vn, CreateCompetitorErrors as vt, DeletePromptResponses as w, ListBrandCitationURLsParams as wn, GetCompetitorResponses as wt, CreatePromptResponses as x, ListBrandCitationDomainsParams as xn, DeleteCompetitorErrors as xt, CreatePromptErrors as y, GetBrandQueryFanoutResponses as yn, CreateCompetitorParams as yt, PromptSnapshot as z, WindowEnd as zn, ListBrandsParams as zt };
|
|
1945
|
-
//# sourceMappingURL=tools-
|
|
1959
|
+
//# sourceMappingURL=tools-DpxrXc33.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools-DpxrXc33.d.mts","names":[],"sources":["../src/types/shared/error.ts","../src/types/shared/model-filter.ts","../src/types/shared/not-found-error.ts","../src/types/shared/validation-error.ts","../src/types/analytics.ts","../src/types/shared/brand-id-path.ts","../src/types/opportunities.ts","../src/types/tags.ts","../src/types/shared/conflict-error.ts","../src/types/shared/limit.ts","../src/types/shared/page.ts","../src/types/shared/pagination.ts","../src/types/brands.ts","../src/types/competitors.ts","../src/types/identity.ts","../src/types/models.ts","../src/types/organizations.ts","../src/types/runs.ts","../src/types/shared/mention-entry.ts","../src/types/snapshots.ts","../src/types/prompts.ts","../src/types/reports.ts","../src/types/tools.ts"],"mappings":";KAAY;;;;;;;;;EASV;;EAEA;;EAEA;;;KAIU,oBAAoB;KAEpB,sBAAsB;;;;;KAMtB,iBAAiB;;KAGjB,iBAAiB;;;;;;;;;KCtBjB,cAAc;;;;;;KAOd,YAAY;;KAGZ;;;;KCbA,gBAAgB;;;;KCAhB,kBAAkB;;;;;;KCUlB;;EAEV,KAAK;;EAEL,OAAO;;KAGG;EACV;;;;;;;;EAQA;;KAGU;;EAEV;EACA;;EAEA;;EAEA;;;;;;;;EAQA;;KAGU;EACV;;;;;;;;EAQA;;KAGU;;EAEV;;;;;;;;;EAoBA;;EAEA;EACA;;EAEA;;EAEA;;;;;;;EAOA;;KAGU;EACV;;EAEA,MAAM,MAAM;EACZ,OAAO;EACP;IACE;IACA;IACA;;;KAIQ;;EAEV;EAYA;EACA;;EAEA;;EAEA;EAeA;EACA;EACA;;KAGU;EACV;;EAEA,MAAM,MAAM;EACZ,OAAO;EACP;IACE;IACA;IACA;;;KAIQ;EACV;;EAEA;EACA;;KAGU;EACV;EACA;;;;;;;;EAQA;;EAEA,MAAM,MAAM;;;;;EAKZ;EACA,OAAO;EACP;EACA;EACA;;KAGU;;;;;;;EAOV;;;;;;;;EAQA;EACA,kBAAkB;EAClB,WAAW;EACX;EACA,MAAM;EACN;EACA;;KAGU;EACV;;EAEA,MAAM,MAAM;EACZ,OAAO;;KAGG;EACV;EACA;EACA;EACA;EACA;;;;;;;;EAQA;;;;;;;;KASU;EACV;EACA;;EAEA,QAAQ,MAAM;EACd,OAAO;;EAEP;;;;;;;IAOE;;IAEA,SAAS,MAAM;;IAEf,QAAQ,MAAM;;EAEhB;IACE;;IAEA;IACA;IACA;IACA;;;EAGF;;;;;;;;IAQE;IACA,QAAQ,MAAM;;;;KAKN;KAEA;;EAEV,KAAK;;EAEL,KA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d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as GetOrganizationBillingResponses, $t as BrandOpportunities, A as ListPromptsResponses, An as PromptPerformance, At as UpdateCompetitorResponses, B as MentionEntry, Bn as WindowStart, Bt as ListBrandsResponses, C as DeletePromptResponse, Cn as ListBrandCitationURLsErrors, Ct as GetCompetitorErrors, D as ListPromptsErrors, Dn as ListBrandPromptPerformanceParams, Dt as ListCompetitorsResponses, E as GetPromptResponses, En as ListBrandPromptPerformanceErrors, Et as ListCompetitorsParams, F as CitedURLEntry, Fn as VisibilityPoint, Ft as CreateBrandResponses, G as ListPromptRunsParams, Gn as UnauthorizedError, Gt as Page, H as GetRunErrors, Hn as ForbiddenError, Ht as UpdateBrandParams, I as GetPromptSnapshotErrors, In as ValidationError, It as GetBrandErrors, J as RunCitation, Jt as PaymentRequiredError, K as ListPromptRunsResponses, Kt as Limit, L as GetPromptSnapshotParams, Ln as NotFoundError, Lt as GetBrandResponses, M as UpdatePromptErrors, Mn as ShareOfVoiceEntry, Mt as BrandsList, N as UpdatePromptParams, Nn as ShareOfVoicePoint, Nt as CreateBrandErrors, O as ListPromptsParams, On as ListBrandPromptPerformanceResponses, Ot as UpdateCompetitorErrors, P as UpdatePromptResponses, Pn as TagsFilter, Pt as CreateBrandParams, Q as GetOrganizationBillingErrors, Qt as TagList, R as GetPromptSnapshotResponses, Rn as ModelFilter, Rt as ListBrandsErrors, S as DeletePromptErrors, Sn as ListBrandCitationDomainsResponses, St as DeleteCompetitorResponses, T as GetPromptErrors, Tn as ListBrandCitationURLsResponses, Tt as ListCompetitorsErrors, U as GetRunResponses, Un as InternalServerError, Ut as UpdateBrandResponses, V as MentionsSummary, Vn as Error, Vt as UpdateBrandErrors, W as ListPromptRunsErrors, Wn as RateLimitError, Wt as Pagination, X as RunSummary, Xt as ListBrandTagsResponses, Y as RunList, Yt as ListBrandTagsErrors, Z as BillingPlan, Zt as Tag, _ as ReportPromptSnapshot, _n as GetBrandQueryFanoutErrors, _t as CompetitorsList, a as CreateReportErrors, an as BrandIdPath, at as Organization, b as CreatePromptParams, bn as ListBrandCitationDomainsErrors, bt as CreateCompetitorResponses, c as CreateReportResponses, cn as CitationDomain, ct as PlanLimits, d as GetReportResponse, dn as CitationURLList, dt as Model, en as CitedPage, et as GetOrganizationErrors, f as GetReportResponses, fn as DateRange, ft as ModelList, g as ListReportsResponses, gn as GetBrandAnalyticsResponses, gt as Competitor, h as ListReportsResponse, hn as GetBrandAnalyticsParams, ht as GetMeResponses, i as OnboardingSuggestion, in as OpportunityPrompt, it as ListOrganizationsResponses, j as Prompt, jn as PromptPerformanceList, jt as Brand, k as ListPromptsResponse, kn as ModelVisibility, kt as UpdateCompetitorParams, l as GetReportErrors, ln as CitationDomainList, lt as ListModelsErrors, m as ListReportsParams, mn as GetBrandAnalyticsErrors, mt as GetMeErrors, n as AnalyzeBrandParams, nn as GetBrandOpportunitiesResponses, nt as ListOrganizationsErrors, o as CreateReportParams, on as BrandAnalytics, ot as OrganizationBilling, p as ListReportsErrors, pn as FanoutQuery, pt as APIKeyIdentity, q as Run, qt as ConflictError, r as AnalyzeBrandResponses, rn as Opportunity, rt as ListOrganizationsParams, s as CreateReportResponse, sn as BrandQueryFanout, st as OrganizationList, t as AnalyzeBrandErrors, tn as GetBrandOpportunitiesErrors, tt as GetOrganizationResponses, u as GetReportParams, un as CitationURL, ut as ListModelsResponses, v as ReportSummary, vn as GetBrandQueryFanoutParams, vt as CreateCompetitorErrors, w as DeletePromptResponses, wn as ListBrandCitationURLsParams, wt as GetCompetitorResponses, x as CreatePromptResponses, xn as ListBrandCitationDomainsParams, xt as DeleteCompetitorErrors, y as CreatePromptErrors, yn as GetBrandQueryFanoutResponses, yt as CreateCompetitorParams, z as PromptSnapshot, zn as WindowEnd, zt as ListBrandsParams } from "../tools-
|
|
1
|
+
import { $ as GetOrganizationBillingResponses, $t as BrandOpportunities, A as ListPromptsResponses, An as PromptPerformance, At as UpdateCompetitorResponses, B as MentionEntry, Bn as WindowStart, Bt as ListBrandsResponses, C as DeletePromptResponse, Cn as ListBrandCitationURLsErrors, Ct as GetCompetitorErrors, D as ListPromptsErrors, Dn as ListBrandPromptPerformanceParams, Dt as ListCompetitorsResponses, E as GetPromptResponses, En as ListBrandPromptPerformanceErrors, Et as ListCompetitorsParams, F as CitedURLEntry, Fn as VisibilityPoint, Ft as CreateBrandResponses, G as ListPromptRunsParams, Gn as UnauthorizedError, Gt as Page, H as GetRunErrors, Hn as ForbiddenError, Ht as UpdateBrandParams, I as GetPromptSnapshotErrors, In as ValidationError, It as GetBrandErrors, J as RunCitation, Jt as PaymentRequiredError, K as ListPromptRunsResponses, Kt as Limit, L as GetPromptSnapshotParams, Ln as NotFoundError, Lt as GetBrandResponses, M as UpdatePromptErrors, Mn as ShareOfVoiceEntry, Mt as BrandsList, N as UpdatePromptParams, Nn as ShareOfVoicePoint, Nt as CreateBrandErrors, O as ListPromptsParams, On as ListBrandPromptPerformanceResponses, Ot as UpdateCompetitorErrors, P as UpdatePromptResponses, Pn as TagsFilter, Pt as CreateBrandParams, Q as GetOrganizationBillingErrors, Qt as TagList, R as GetPromptSnapshotResponses, Rn as ModelFilter, Rt as ListBrandsErrors, S as DeletePromptErrors, Sn as ListBrandCitationDomainsResponses, St as DeleteCompetitorResponses, T as GetPromptErrors, Tn as ListBrandCitationURLsResponses, Tt as ListCompetitorsErrors, U as GetRunResponses, Un as InternalServerError, Ut as UpdateBrandResponses, V as MentionsSummary, Vn as Error, Vt as UpdateBrandErrors, W as ListPromptRunsErrors, Wn as RateLimitError, Wt as Pagination, X as RunSummary, Xt as ListBrandTagsResponses, Y as RunList, Yt as ListBrandTagsErrors, Z as BillingPlan, Zt as Tag, _ as ReportPromptSnapshot, _n as GetBrandQueryFanoutErrors, _t as CompetitorsList, a as CreateReportErrors, an as BrandIdPath, at as Organization, b as CreatePromptParams, bn as ListBrandCitationDomainsErrors, bt as CreateCompetitorResponses, c as CreateReportResponses, cn as CitationDomain, ct as PlanLimits, d as GetReportResponse, dn as CitationURLList, dt as Model, en as CitedPage, et as GetOrganizationErrors, f as GetReportResponses, fn as DateRange, ft as ModelList, g as ListReportsResponses, gn as GetBrandAnalyticsResponses, gt as Competitor, h as ListReportsResponse, hn as GetBrandAnalyticsParams, ht as GetMeResponses, i as OnboardingSuggestion, in as OpportunityPrompt, it as ListOrganizationsResponses, j as Prompt, jn as PromptPerformanceList, jt as Brand, k as ListPromptsResponse, kn as ModelVisibility, kt as UpdateCompetitorParams, l as GetReportErrors, ln as CitationDomainList, lt as ListModelsErrors, m as ListReportsParams, mn as GetBrandAnalyticsErrors, mt as GetMeErrors, n as AnalyzeBrandParams, nn as GetBrandOpportunitiesResponses, nt as ListOrganizationsErrors, o as CreateReportParams, on as BrandAnalytics, ot as OrganizationBilling, p as ListReportsErrors, pn as FanoutQuery, pt as APIKeyIdentity, q as Run, qt as ConflictError, r as AnalyzeBrandResponses, rn as Opportunity, rt as ListOrganizationsParams, s as CreateReportResponse, sn as BrandQueryFanout, st as OrganizationList, t as AnalyzeBrandErrors, tn as GetBrandOpportunitiesErrors, tt as GetOrganizationResponses, u as GetReportParams, un as CitationURL, ut as ListModelsResponses, v as ReportSummary, vn as GetBrandQueryFanoutParams, vt as CreateCompetitorErrors, w as DeletePromptResponses, wn as ListBrandCitationURLsParams, wt as GetCompetitorResponses, x as CreatePromptResponses, xn as ListBrandCitationDomainsParams, xt as DeleteCompetitorErrors, y as CreatePromptErrors, yn as GetBrandQueryFanoutResponses, yt as CreateCompetitorParams, z as PromptSnapshot, zn as WindowEnd, zt as ListBrandsParams } from "../tools-DpxrXc33.mjs";
|
|
2
2
|
export type { APIKeyIdentity, AnalyzeBrandErrors, AnalyzeBrandParams, AnalyzeBrandResponses, BillingPlan, Brand, BrandAnalytics, BrandIdPath, BrandOpportunities, BrandQueryFanout, BrandsList, CitationDomain, CitationDomainList, CitationURL, CitationURLList, CitedPage, CitedURLEntry, Competitor, CompetitorsList, ConflictError, CreateBrandErrors, CreateBrandParams, CreateBrandResponses, CreateCompetitorErrors, CreateCompetitorParams, CreateCompetitorResponses, CreatePromptErrors, CreatePromptParams, CreatePromptResponses, CreateReportErrors, CreateReportParams, CreateReportResponse, CreateReportResponses, DateRange, DeleteCompetitorErrors, DeleteCompetitorResponses, DeletePromptErrors, DeletePromptResponse, DeletePromptResponses, Error, FanoutQuery, ForbiddenError, GetBrandAnalyticsErrors, GetBrandAnalyticsParams, GetBrandAnalyticsResponses, GetBrandErrors, GetBrandOpportunitiesErrors, GetBrandOpportunitiesResponses, GetBrandQueryFanoutErrors, GetBrandQueryFanoutParams, GetBrandQueryFanoutResponses, GetBrandResponses, GetCompetitorErrors, GetCompetitorResponses, GetMeErrors, GetMeResponses, GetOrganizationBillingErrors, GetOrganizationBillingResponses, GetOrganizationErrors, GetOrganizationResponses, GetPromptErrors, GetPromptResponses, GetPromptSnapshotErrors, GetPromptSnapshotParams, GetPromptSnapshotResponses, GetReportErrors, GetReportParams, GetReportResponse, GetReportResponses, GetRunErrors, GetRunResponses, InternalServerError, Limit, ListBrandCitationDomainsErrors, ListBrandCitationDomainsParams, ListBrandCitationDomainsResponses, ListBrandCitationURLsErrors, ListBrandCitationURLsParams, ListBrandCitationURLsResponses, ListBrandPromptPerformanceErrors, ListBrandPromptPerformanceParams, ListBrandPromptPerformanceResponses, ListBrandTagsErrors, ListBrandTagsResponses, ListBrandsErrors, ListBrandsParams, ListBrandsResponses, ListCompetitorsErrors, ListCompetitorsParams, ListCompetitorsResponses, ListModelsErrors, ListModelsResponses, ListOrganizationsErrors, ListOrganizationsParams, ListOrganizationsResponses, ListPromptRunsErrors, ListPromptRunsParams, ListPromptRunsResponses, ListPromptsErrors, ListPromptsParams, ListPromptsResponse, ListPromptsResponses, ListReportsErrors, ListReportsParams, ListReportsResponse, ListReportsResponses, MentionEntry, MentionsSummary, Model, ModelFilter, ModelList, ModelVisibility, NotFoundError, OnboardingSuggestion, Opportunity, OpportunityPrompt, Organization, OrganizationBilling, OrganizationList, Page, Pagination, PaymentRequiredError, PlanLimits, Prompt, PromptPerformance, PromptPerformanceList, PromptSnapshot, RateLimitError, ReportPromptSnapshot, ReportSummary, Run, RunCitation, RunList, RunSummary, ShareOfVoiceEntry, ShareOfVoicePoint, Tag, TagList, TagsFilter, UnauthorizedError, UpdateBrandErrors, UpdateBrandParams, UpdateBrandResponses, UpdateCompetitorErrors, UpdateCompetitorParams, UpdateCompetitorResponses, UpdatePromptErrors, UpdatePromptParams, UpdatePromptResponses, ValidationError, VisibilityPoint, WindowEnd, WindowStart };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elmohq/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "TypeScript SDK for the Elmo API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"sdk",
|
|
10
10
|
"typescript"
|
|
11
11
|
],
|
|
12
|
+
"homepage": "https://www.elmohq.com",
|
|
12
13
|
"bugs": {
|
|
13
14
|
"url": "https://github.com/elmohq/elmo-sdk-typescript/issues"
|
|
14
15
|
},
|
package/src/calls/brands-list.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from '../internal/core/client';
|
|
2
|
+
import { PagePromise, pages } from '../internal/core/page';
|
|
2
3
|
import { groupParams, mergeParams } from '../internal/core/params';
|
|
3
|
-
import { PagePromise, pages } from '../internal/page/page';
|
|
4
4
|
import { listBrandsDescriptor } from '../resources/brands';
|
|
5
5
|
import type { RequestOptions } from '../resources/shared/request-options';
|
|
6
6
|
import type { Brand, BrandsList, ListBrandsErrors, ListBrandsParams } from '../types/brands';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from '../internal/core/client';
|
|
2
|
+
import { PagePromise, pages } from '../internal/core/page';
|
|
2
3
|
import { groupParams, mergeParams } from '../internal/core/params';
|
|
3
|
-
import { PagePromise, pages } from '../internal/page/page';
|
|
4
4
|
import { listCompetitorsDescriptor } from '../resources/competitors';
|
|
5
5
|
import type { RequestOptions } from '../resources/shared/request-options';
|
|
6
6
|
import type {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from '../internal/core/client';
|
|
2
|
+
import { PagePromise, pages } from '../internal/core/page';
|
|
2
3
|
import { groupParams, mergeParams } from '../internal/core/params';
|
|
3
|
-
import { PagePromise, pages } from '../internal/page/page';
|
|
4
4
|
import { listOrganizationsDescriptor } from '../resources/organizations';
|
|
5
5
|
import type { RequestOptions } from '../resources/shared/request-options';
|
|
6
6
|
import type {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from '../internal/core/client';
|
|
2
|
+
import { PagePromise, pages } from '../internal/core/page';
|
|
2
3
|
import { groupParams, mergeParams } from '../internal/core/params';
|
|
3
|
-
import { PagePromise, pages } from '../internal/page/page';
|
|
4
4
|
import { listPromptsDescriptor } from '../resources/prompts';
|
|
5
5
|
import type { RequestOptions } from '../resources/shared/request-options';
|
|
6
6
|
import type {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from '../internal/core/client';
|
|
2
|
+
import { PagePromise, pages } from '../internal/core/page';
|
|
2
3
|
import { mergeParams, placeParams } from '../internal/core/params';
|
|
3
|
-
import { PagePromise, pages } from '../internal/page/page';
|
|
4
4
|
import { listPromptRunsDescriptor, listPromptRunsFields } from '../resources/runs';
|
|
5
5
|
import type { RequestOptions } from '../resources/shared/request-options';
|
|
6
6
|
import type {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client } from '../internal/core/client';
|
|
2
|
+
import { PagePromise, pages } from '../internal/core/page';
|
|
2
3
|
import { groupParams, mergeParams } from '../internal/core/params';
|
|
3
|
-
import { PagePromise, pages } from '../internal/page/page';
|
|
4
4
|
import { listReportsDescriptor } from '../resources/reports';
|
|
5
5
|
import type { RequestOptions } from '../resources/shared/request-options';
|
|
6
6
|
import type {
|
package/src/client.ts
CHANGED
|
@@ -29,6 +29,8 @@ import {
|
|
|
29
29
|
TimeoutError,
|
|
30
30
|
TransportError,
|
|
31
31
|
} from './internal/core/errors';
|
|
32
|
+
import type { Page } from './internal/core/page';
|
|
33
|
+
import { PagePromise } from './internal/core/page';
|
|
32
34
|
import type {
|
|
33
35
|
AuthResolver,
|
|
34
36
|
AuthScheme,
|
|
@@ -63,8 +65,6 @@ import { rulesFeature } from './internal/feature/rules';
|
|
|
63
65
|
import type { TimeoutPolicy, TimeoutValue } from './internal/feature/timeout';
|
|
64
66
|
import { timeoutFeature } from './internal/feature/timeout';
|
|
65
67
|
import { validateFeature } from './internal/feature/validate';
|
|
66
|
-
import type { Page } from './internal/page/page';
|
|
67
|
-
import { PagePromise } from './internal/page/page';
|
|
68
68
|
import type { Fetch, FetchOptions } from './internal/transport/fetch';
|
|
69
69
|
import { createFetchTransport } from './internal/transport/fetch';
|
|
70
70
|
import { Brands } from './resources/brands';
|
|
@@ -182,7 +182,7 @@ import type {
|
|
|
182
182
|
} from './types/tools';
|
|
183
183
|
|
|
184
184
|
/** The version of this package. */
|
|
185
|
-
export const VERSION = '0.1.
|
|
185
|
+
export const VERSION = '0.1.2';
|
|
186
186
|
|
|
187
187
|
/** The address calls are sent to: a URL with its scheme. */
|
|
188
188
|
export type BaseURL = `${string}://${string}/api/v1` | (string & {});
|
|
@@ -279,7 +279,7 @@ export type BehaviorOptions = {
|
|
|
279
279
|
export type ClientCredentials = {
|
|
280
280
|
/**
|
|
281
281
|
* An instance admin key from `ADMIN_API_KEYS`, or an organization key
|
|
282
|
-
* (`elmo_…`) issued from the dashboard.
|
|
282
|
+
* (`elmo_…`) issued from the dashboard. Its value starts with `elmo_`.
|
|
283
283
|
*
|
|
284
284
|
* Read from the `ELMO_API_KEY` environment variable when unset.
|
|
285
285
|
*/
|
|
@@ -293,7 +293,7 @@ export type ClientNarrowing = {
|
|
|
293
293
|
*
|
|
294
294
|
* Read from the `ELMO_BASE_URL` environment variable when unset.
|
|
295
295
|
*
|
|
296
|
-
* @default '/api/v1'
|
|
296
|
+
* @default 'https://app.elmohq.com/api/v1'
|
|
297
297
|
*/
|
|
298
298
|
baseURL?: BaseURL;
|
|
299
299
|
/**
|
|
@@ -344,7 +344,7 @@ export function client() {
|
|
|
344
344
|
codecs: [jsonCodec],
|
|
345
345
|
credentials: declaredCredentials,
|
|
346
346
|
defaults: createConfig({
|
|
347
|
-
baseURL: '/api/v1',
|
|
347
|
+
baseURL: 'https://app.elmohq.com/api/v1',
|
|
348
348
|
headers: { 'user-agent': `elmo-sdk/${VERSION} (typescript)` },
|
|
349
349
|
}),
|
|
350
350
|
env: { baseURL: 'ELMO_BASE_URL', logLevel: 'ELMO_LOG' },
|
|
@@ -353,20 +353,7 @@ export function client() {
|
|
|
353
353
|
authFeature({ schemes: declaredCredentials }),
|
|
354
354
|
retryFeature(),
|
|
355
355
|
loggerFeature(),
|
|
356
|
-
timeoutFeature(
|
|
357
|
-
ms: {
|
|
358
|
-
overrides: [
|
|
359
|
-
{
|
|
360
|
-
include: {
|
|
361
|
-
openapi: {
|
|
362
|
-
operations: ['GET /brands/{brandId}/opportunities', 'POST /tools/analyze'],
|
|
363
|
-
},
|
|
364
|
-
},
|
|
365
|
-
ms: 600000,
|
|
366
|
-
},
|
|
367
|
-
],
|
|
368
|
-
},
|
|
369
|
-
}),
|
|
356
|
+
timeoutFeature(),
|
|
370
357
|
interceptorsFeature(),
|
|
371
358
|
validateFeature(),
|
|
372
359
|
],
|
|
@@ -3,7 +3,7 @@ import { mergeConfigs } from './config';
|
|
|
3
3
|
import { applyAliases, applyCredentials } from './credentials';
|
|
4
4
|
import {
|
|
5
5
|
ElmoError,
|
|
6
|
-
|
|
6
|
+
sniffRequestId,
|
|
7
7
|
unansweredError,
|
|
8
8
|
unsendableHeader,
|
|
9
9
|
UnsupportedInteractionError,
|
|
@@ -70,8 +70,6 @@ async function readReply(
|
|
|
70
70
|
|
|
71
71
|
result = await runner.result(result, request, ctx);
|
|
72
72
|
|
|
73
|
-
if (request.options.unread) return result.response;
|
|
74
|
-
|
|
75
73
|
const failure = binding.readError?.(result, request) ?? result.error;
|
|
76
74
|
|
|
77
75
|
if (request.options.raw) {
|
|
@@ -221,7 +219,7 @@ export async function exchange(
|
|
|
221
219
|
let read: Promise<unknown> | undefined;
|
|
222
220
|
return {
|
|
223
221
|
read: (from) => (read ??= readReply(setup, sent, request, from)),
|
|
224
|
-
requestId: () => sent.result.response &&
|
|
222
|
+
requestId: () => sent.result.response && sniffRequestId(sent.result.response),
|
|
225
223
|
response: sent.result.response,
|
|
226
224
|
};
|
|
227
225
|
}
|
|
@@ -41,7 +41,7 @@ export class AbortError extends ElmoError {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
/** Which way a {@link TransportError} failed.
|
|
44
|
+
/** Which way a {@link TransportError} failed. */
|
|
45
45
|
export type TransportErrorKind = 'connect' | 'other' | 'timeout';
|
|
46
46
|
|
|
47
47
|
const TRANSPORT_MESSAGES: Readonly<Record<TransportErrorKind, string>> = {
|
|
@@ -224,7 +224,7 @@ function shorten(text: string): string {
|
|
|
224
224
|
const cut = line.slice(0, MAX_MESSAGE_BODY);
|
|
225
225
|
const space = cut.lastIndexOf(' ');
|
|
226
226
|
const kept = space > MAX_MESSAGE_BODY / 2 ? cut.slice(0, space) : cut;
|
|
227
|
-
return `${kept.trimEnd()}
|
|
227
|
+
return `${kept.trimEnd()}...`;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
const MESSAGE_KEYS: ReadonlyArray<string> = [
|
|
@@ -272,7 +272,7 @@ const REQUEST_ID_FALLBACKS: ReadonlyArray<string> = ['x-correlation-id', 'cf-ray
|
|
|
272
272
|
|
|
273
273
|
const REQUEST_ID_NAME = /(?:^|-)request-?id$/;
|
|
274
274
|
|
|
275
|
-
export function
|
|
275
|
+
export function sniffRequestId(response: Response): string | undefined {
|
|
276
276
|
let named: string | undefined;
|
|
277
277
|
response.headers.forEach((value, name) => {
|
|
278
278
|
if (!named && value && REQUEST_ID_NAME.test(name)) named = value;
|
|
@@ -313,7 +313,7 @@ export class APIError<TBody = FailureBody> extends ElmoError {
|
|
|
313
313
|
|
|
314
314
|
constructor(status: number, body: unknown, response: Response, note?: string) {
|
|
315
315
|
const reason = response.statusText ? `${status} ${response.statusText}` : `${status}`;
|
|
316
|
-
const requestId =
|
|
316
|
+
const requestId = sniffRequestId(response);
|
|
317
317
|
const url = response.url ? ` for "${safeAddress(response.url)}"` : '';
|
|
318
318
|
const where = requestId ? `${url} (request id "${requestId}")` : url;
|
|
319
319
|
const said = describeStatedFailure(body);
|
|
@@ -385,7 +385,7 @@ export class DecodeError extends ElmoError {
|
|
|
385
385
|
value?: unknown;
|
|
386
386
|
} = {},
|
|
387
387
|
) {
|
|
388
|
-
const requestId = options.response &&
|
|
388
|
+
const requestId = options.response && sniffRequestId(options.response);
|
|
389
389
|
super(requestId ? `${message} The request id is "${requestId}".` : message, {
|
|
390
390
|
cause: options.cause,
|
|
391
391
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { awaitedResult } from '
|
|
2
|
-
import type { Client } from '
|
|
3
|
-
import { APIError, ElmoError } from '
|
|
4
|
-
import { LazyPromise, unattended } from '
|
|
1
|
+
import { awaitedResult } from './call-promise';
|
|
2
|
+
import type { Client } from './client';
|
|
3
|
+
import { APIError, ElmoError } from './errors';
|
|
4
|
+
import { LazyPromise, unattended } from './lazy-promise';
|
|
5
5
|
import type {
|
|
6
6
|
CallableDescriptor,
|
|
7
7
|
ErrorMode,
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
PaginationStyle,
|
|
12
12
|
ResolvedOptions,
|
|
13
13
|
Result,
|
|
14
|
-
} from '
|
|
14
|
+
} from './types';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* One page of a paginated call. Iterating a page walks from it to the end of
|
|
@@ -110,7 +110,7 @@ export interface RetryRules extends BackoffOptions {
|
|
|
110
110
|
*/
|
|
111
111
|
maxRetryAfter?: number;
|
|
112
112
|
/**
|
|
113
|
-
* Methods that may be sent again. A
|
|
113
|
+
* Methods that may be sent again. A request that never reached the API,
|
|
114
114
|
* a call carrying its API's idempotency key, and 408, 425 and 429 are sent
|
|
115
115
|
* again whatever this says.
|
|
116
116
|
*
|
|
@@ -132,8 +132,9 @@ export interface RetryRules extends BackoffOptions {
|
|
|
132
132
|
*/
|
|
133
133
|
retryOnTimeout?: boolean;
|
|
134
134
|
/**
|
|
135
|
-
* Statuses worth another attempt.
|
|
136
|
-
* never retried
|
|
135
|
+
* Statuses worth another attempt. The API overrules them with
|
|
136
|
+
* `x-should-retry`: a reply answering `false` is never retried, and a
|
|
137
|
+
* failure answering `true` is, whatever its status and method.
|
|
137
138
|
*/
|
|
138
139
|
statuses?: ReadonlyArray<number>;
|
|
139
140
|
}
|
|
@@ -162,8 +163,7 @@ export interface CallableDescriptor {
|
|
|
162
163
|
readonly method?: string;
|
|
163
164
|
readonly pagination?: PaginationDescriptor;
|
|
164
165
|
readonly retry?: RetryRules | false;
|
|
165
|
-
|
|
166
|
-
readonly returns?: 'json';
|
|
166
|
+
readonly returns?: 'json' | 'response';
|
|
167
167
|
readonly rules?: ReadonlyArray<InputRule>;
|
|
168
168
|
readonly serialization?: SerializationDescriptor;
|
|
169
169
|
readonly timeout?: CallTimeout;
|
|
@@ -317,13 +317,12 @@ export interface PreparedRequest<TAddress = unknown> {
|
|
|
317
317
|
/** Each credential put on the request, with the scheme it answers. */
|
|
318
318
|
placed?: ReadonlyArray<PlacedCredential>;
|
|
319
319
|
/**
|
|
320
|
-
* Set to `manual`
|
|
320
|
+
* Set to `manual` where the client follows redirects itself. A transport
|
|
321
321
|
* that honors it hands back the redirect rather than following it.
|
|
322
322
|
*/
|
|
323
323
|
redirect?: 'manual';
|
|
324
324
|
/** Calls the request off when it aborts. */
|
|
325
325
|
signal?: AbortSignal | undefined;
|
|
326
|
-
/** What to tell the caller where the API refuses a call sent with no credential. */
|
|
327
326
|
unauthenticated?: () => string;
|
|
328
327
|
}
|
|
329
328
|
|
|
@@ -362,7 +361,6 @@ export type AnyTransport<TAddress = unknown> = {
|
|
|
362
361
|
} & Partial<TransportMethods<TAddress>>;
|
|
363
362
|
|
|
364
363
|
export interface Binding<TAddress = unknown> {
|
|
365
|
-
/** What a request asks for where neither its call nor its client says. */
|
|
366
364
|
readonly accept?: string;
|
|
367
365
|
applyAuth(credential: Credential, request: PreparedRequest<TAddress>): void;
|
|
368
366
|
readonly name: string;
|
|
@@ -127,7 +127,7 @@ function callLog(id: string, request: PreparedRequest, at: number, sink: Logger)
|
|
|
127
127
|
if (response?.redirected && at >= LEVELS.warn) {
|
|
128
128
|
sink.warn(line(`was redirected to ${safeAddress(response.url)}`));
|
|
129
129
|
}
|
|
130
|
-
if (at >= LEVELS.info) sink.info(line(
|
|
130
|
+
if (at >= LEVELS.info) sink.info(line(`-> ${response?.status ?? '?'} in ${ms} ms`));
|
|
131
131
|
if (at >= LEVELS.debug) {
|
|
132
132
|
sink.debug(`[${id}] received`, {
|
|
133
133
|
headers: safeHeaders(Object.fromEntries(response?.headers ?? []), request.callable),
|
|
@@ -140,7 +140,7 @@ function callLog(id: string, request: PreparedRequest, at: number, sink: Logger)
|
|
|
140
140
|
if (at < LEVELS.warn) return;
|
|
141
141
|
const again = `retrying in ${Math.round(wait)} ms (${retry} of ${retries})`;
|
|
142
142
|
if (after?.status !== undefined) {
|
|
143
|
-
sink.warn(line(
|
|
143
|
+
sink.warn(line(`-> ${after.status}, ${again}`));
|
|
144
144
|
} else if (after?.error !== undefined) {
|
|
145
145
|
sink.warn(line(`failed: ${failureText(after.error)}, ${again}`));
|
|
146
146
|
} else {
|