@sinequa/atomic 2.1.0 → 2.3.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 +28 -1
- package/dist/atomic.cjs +1 -1
- package/dist/atomic.js +2 -2
- package/dist/authentication/constants.d.ts +20 -0
- package/dist/authentication/constants.d.ts.map +1 -1
- package/dist/authentication/events/auth-events.d.ts +71 -0
- package/dist/authentication/events/auth-events.d.ts.map +1 -0
- package/dist/authentication/events/emit-authenticated-event.d.ts +9 -0
- package/dist/authentication/events/emit-authenticated-event.d.ts.map +1 -1
- package/dist/authentication/events/index.d.ts +1 -0
- package/dist/authentication/events/index.d.ts.map +1 -1
- package/dist/authentication/index.d.ts +3 -3
- package/dist/authentication/index.d.ts.map +1 -1
- package/dist/authentication/providers/oauth-authentication.d.ts +10 -1
- package/dist/authentication/providers/oauth-authentication.d.ts.map +1 -1
- package/dist/authentication/providers/redirect-to-identity-provider.d.ts +34 -0
- package/dist/authentication/providers/redirect-to-identity-provider.d.ts.map +1 -0
- package/dist/authentication/providers/saml-authentication.d.ts +10 -1
- package/dist/authentication/providers/saml-authentication.d.ts.map +1 -1
- package/dist/authentication/session/auth-mode-marker.d.ts +7 -0
- package/dist/authentication/session/auth-mode-marker.d.ts.map +1 -1
- package/dist/authentication/session/auth-state.d.ts +6 -1
- package/dist/authentication/session/auth-state.d.ts.map +1 -1
- package/dist/authentication/session/detect-auth-mode.d.ts +2 -1
- package/dist/authentication/session/detect-auth-mode.d.ts.map +1 -1
- package/dist/authentication/session/has-session.d.ts +26 -0
- package/dist/authentication/session/has-session.d.ts.map +1 -0
- package/dist/authentication/session/index.d.ts +2 -0
- package/dist/authentication/session/index.d.ts.map +1 -1
- package/dist/authentication/session/login.d.ts +12 -7
- package/dist/authentication/session/login.d.ts.map +1 -1
- package/dist/authentication/session/logout.d.ts +13 -2
- package/dist/authentication/session/logout.d.ts.map +1 -1
- package/dist/authentication/session/redirect-guard.d.ts +18 -0
- package/dist/authentication/session/redirect-guard.d.ts.map +1 -0
- package/dist/authentication/session/try-auto-authentication.d.ts +5 -2
- package/dist/authentication/session/try-auto-authentication.d.ts.map +1 -1
- package/dist/authentication/session/user-authentication.d.ts +7 -2
- package/dist/authentication/session/user-authentication.d.ts.map +1 -1
- package/dist/authentication/tokens/delete-web-token-cookie.d.ts +10 -5
- package/dist/authentication/tokens/delete-web-token-cookie.d.ts.map +1 -1
- package/dist/authentication/tokens/get-csrf-token.d.ts +4 -1
- package/dist/authentication/tokens/get-csrf-token.d.ts.map +1 -1
- package/dist/authentication/tokens/get-jwt-token.d.ts +29 -5
- package/dist/authentication/tokens/get-jwt-token.d.ts.map +1 -1
- package/dist/authentication/tokens/get-token.d.ts +7 -1
- package/dist/authentication/tokens/get-token.d.ts.map +1 -1
- package/dist/authentication/tokens/index.d.ts +1 -1
- package/dist/authentication/tokens/index.d.ts.map +1 -1
- package/dist/authentication/tokens/set-token.d.ts +7 -1
- package/dist/authentication/tokens/set-token.d.ts.map +1 -1
- package/dist/client/atomic-context.d.ts +61 -0
- package/dist/client/atomic-context.d.ts.map +1 -0
- package/dist/client/create-api.d.ts +109 -0
- package/dist/client/create-api.d.ts.map +1 -0
- package/dist/client/create-atomic-client.d.ts +138 -0
- package/dist/client/create-atomic-client.d.ts.map +1 -0
- package/dist/client/http-adapter.d.ts +30 -0
- package/dist/client/http-adapter.d.ts.map +1 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/configurations/auth-mode.d.ts +51 -1
- package/dist/configurations/auth-mode.d.ts.map +1 -1
- package/dist/configurations/auth-options.d.ts +78 -0
- package/dist/configurations/auth-options.d.ts.map +1 -0
- package/dist/configurations/global.config.d.ts +23 -3
- package/dist/configurations/global.config.d.ts.map +1 -1
- package/dist/configurations/index.d.ts +1 -0
- package/dist/configurations/index.d.ts.map +1 -1
- package/dist/helpers/filters.d.ts +24 -0
- package/dist/helpers/filters.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/pagination.d.ts +23 -0
- package/dist/helpers/pagination.d.ts.map +1 -0
- package/dist/helpers/ts-helper.d.ts +6 -0
- package/dist/helpers/ts-helper.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/polyfills/storage.d.ts +12 -3
- package/dist/polyfills/storage.d.ts.map +1 -1
- package/dist/spfx/index.cjs +1 -1
- package/dist/spfx/index.d.ts +1 -0
- package/dist/spfx/index.d.ts.map +1 -1
- package/dist/spfx/index.js +2 -2
- package/dist/src-1RUu1uXc.cjs +1 -0
- package/dist/src-DFuZeDvd.js +2198 -0
- package/dist/types/api-endpoints.d.ts +1 -1
- package/dist/types/api-endpoints.d.ts.map +1 -1
- package/dist/types/document-upload/container-document.d.ts +22 -0
- package/dist/types/document-upload/container-document.d.ts.map +1 -0
- package/dist/types/document-upload/container.d.ts +31 -0
- package/dist/types/document-upload/container.d.ts.map +1 -0
- package/dist/types/document-upload/index.d.ts +3 -0
- package/dist/types/document-upload/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/search/Result.d.ts +36 -2
- package/dist/types/search/Result.d.ts.map +1 -1
- package/dist/types/search/index.d.ts +1 -1
- package/dist/types/search/index.d.ts.map +1 -1
- package/dist/types/security-principal/index.d.ts +2 -0
- package/dist/types/security-principal/index.d.ts.map +1 -0
- package/dist/types/security-principal/security-principal.d.ts +25 -0
- package/dist/types/security-principal/security-principal.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +27 -16
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/web-api/helpers/aad-http-client-manager.d.ts +8 -0
- package/dist/web-api/helpers/aad-http-client-manager.d.ts.map +1 -1
- package/dist/web-api/helpers/create-headers.d.ts +9 -0
- package/dist/web-api/helpers/create-headers.d.ts.map +1 -1
- package/dist/web-api/helpers/errors/api-error.d.ts.map +1 -1
- package/dist/web-api/helpers/handle-response.d.ts +17 -1
- package/dist/web-api/helpers/handle-response.d.ts.map +1 -1
- package/dist/web-api/helpers/index.d.ts +1 -1
- package/dist/web-api/helpers/index.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/del.d.ts +13 -11
- package/dist/web-api/helpers/methods/del.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/get.d.ts +6 -12
- package/dist/web-api/helpers/methods/get.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/patch.d.ts +6 -7
- package/dist/web-api/helpers/methods/patch.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/post.d.ts +6 -8
- package/dist/web-api/helpers/methods/post.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/put.d.ts +6 -7
- package/dist/web-api/helpers/methods/put.d.ts.map +1 -1
- package/dist/web-api/helpers/methods/send-request.d.ts +24 -0
- package/dist/web-api/helpers/methods/send-request.d.ts.map +1 -0
- package/dist/web-api/helpers/request-options.d.ts +35 -12
- package/dist/web-api/helpers/request-options.d.ts.map +1 -1
- package/dist/web-api/helpers/utils/build-request-url.d.ts +12 -0
- package/dist/web-api/helpers/utils/build-request-url.d.ts.map +1 -0
- package/dist/web-api/helpers/utils/{date-utils..d.ts → date-utils.d.ts} +1 -1
- package/dist/web-api/helpers/utils/date-utils.d.ts.map +1 -0
- package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts +9 -0
- package/dist/web-api/helpers/utils/resolve-no-auto-authentication.d.ts.map +1 -1
- package/dist/web-api/helpers/utils/with-retry.d.ts +10 -5
- package/dist/web-api/helpers/utils/with-retry.d.ts.map +1 -1
- package/dist/web-api/index.d.ts +2 -0
- package/dist/web-api/index.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-aggregation.d.ts +2 -1
- package/dist/web-api/v1/fetch-aggregation.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-app.d.ts +12 -5
- package/dist/web-api/v1/fetch-app.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-audit.d.ts +2 -1
- package/dist/web-api/v1/fetch-audit.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-dataset.d.ts +4 -3
- package/dist/web-api/v1/fetch-dataset.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-labels.d.ts +9 -8
- package/dist/web-api/v1/fetch-labels.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-preview.d.ts +2 -1
- package/dist/web-api/v1/fetch-preview.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-principal.d.ts +8 -4
- package/dist/web-api/v1/fetch-principal.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-query-export.d.ts +2 -1
- package/dist/web-api/v1/fetch-query-export.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-query-intent.d.ts +2 -1
- package/dist/web-api/v1/fetch-query-intent.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-query.d.ts +3 -2
- package/dist/web-api/v1/fetch-query.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-security-principal.d.ts +23 -0
- package/dist/web-api/v1/fetch-security-principal.d.ts.map +1 -0
- package/dist/web-api/v1/fetch-similar-documents.d.ts +2 -1
- package/dist/web-api/v1/fetch-similar-documents.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-sponsored-links.d.ts +2 -1
- package/dist/web-api/v1/fetch-sponsored-links.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-suggest.d.ts +4 -3
- package/dist/web-api/v1/fetch-suggest.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-text-chunk.d.ts +2 -1
- package/dist/web-api/v1/fetch-text-chunk.d.ts.map +1 -1
- package/dist/web-api/v1/fetch-user-settings.d.ts +5 -4
- package/dist/web-api/v1/fetch-user-settings.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-change-password.d.ts +2 -1
- package/dist/web-api/v2/fetch-change-password.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-document-upload-container.d.ts +83 -0
- package/dist/web-api/v2/fetch-document-upload-container.d.ts.map +1 -0
- package/dist/web-api/v2/fetch-forgot-password.d.ts +2 -1
- package/dist/web-api/v2/fetch-forgot-password.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-user-profile.d.ts +5 -4
- package/dist/web-api/v2/fetch-user-profile.d.ts.map +1 -1
- package/dist/web-api/v2/fetch-version.d.ts +2 -1
- package/dist/web-api/v2/fetch-version.d.ts.map +1 -1
- package/package.json +10 -7
- package/dist/src-C3yJArxW.js +0 -1886
- package/dist/src-CGNARSYI.cjs +0 -1
- package/dist/web-api/helpers/utils/date-utils..d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
type StringWithAutocomplete<T> = T | (string & Record<never, never>);
|
|
2
|
-
export type API_ENDPOINTS = StringWithAutocomplete<"api/v1/app" | "api/v1/audit.notify" | "api/v1/challenge" | "api/v1/doc.textchunks" | "api/v1/labels" | "api/v1/multi" | "api/v1/OriginalDocMerge" | "api/v1/plugin" | "api/v1/preview" | "api/v1/principal" | "api/v1/principal/list" | "api/v1/principal/userids" | "api/v1/query" | "api/v1/query.export" | "api/v1/query.links" | "api/v1/queryintent" | "api/v1/ratings" | "api/v1/recentqueries" | "api/v1/search.dataset" | "api/v1/search.rfm" | "api/v1/search.suggest" | "api/v1/search.queryexport" | "api/v1/similardocuments" | "api/v1/suggestfield" | "api/v1/suggestquery" | "api/v1/usersettings" | "api/v1/security.webtoken" | "api/v1/security.oauth" | "api/v1/security.saml">;
|
|
2
|
+
export type API_ENDPOINTS = StringWithAutocomplete<"api/v1/app" | "api/v1/audit.notify" | "api/v1/challenge" | "api/v1/doc.textchunks" | "api/v1/labels" | "api/v1/multi" | "api/v1/OriginalDocMerge" | "api/v1/plugin" | "api/v1/preview" | "api/v1/principal" | "api/v1/principal/list" | "api/v1/principal/userids" | "api/v1/query" | "api/v1/query.export" | "api/v1/query.links" | "api/v1/queryintent" | "api/v1/ratings" | "api/v1/recentqueries" | "api/v1/search.dataset" | "api/v1/search.rfm" | "api/v1/search.suggest" | "api/v1/search.queryexport" | "api/v1/similardocuments" | "api/v1/suggestfield" | "api/v1/suggestquery" | "api/v1/usersettings" | "api/v1/security.webtoken" | "api/v1/security.oauth" | "api/v1/security.saml" | "api/v1/security.principal" | "api/v2/document-upload/container" | "api/v2/document-upload/containers">;
|
|
3
3
|
export {};
|
|
4
4
|
//# sourceMappingURL=api-endpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-endpoints.d.ts","sourceRoot":"","sources":["../../src/types/api-endpoints.ts"],"names":[],"mappings":"AAAA,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAC9C,YAAY,GACZ,qBAAqB,GACrB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,cAAc,GACd,yBAAyB,GACzB,eAAe,GACf,gBAAgB,GAChB,kBAAkB,GAClB,uBAAuB,GACvB,0BAA0B,GAC1B,cAAc,GACd,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,gBAAgB,GAChB,sBAAsB,GACtB,uBAAuB,GACvB,mBAAmB,GACnB,uBAAuB,GACvB,2BAA2B,GAC3B,yBAAyB,GACzB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,0BAA0B,GAC1B,uBAAuB,GACvB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"api-endpoints.d.ts","sourceRoot":"","sources":["../../src/types/api-endpoints.ts"],"names":[],"mappings":"AAAA,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAC9C,YAAY,GACZ,qBAAqB,GACrB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,cAAc,GACd,yBAAyB,GACzB,eAAe,GACf,gBAAgB,GAChB,kBAAkB,GAClB,uBAAuB,GACvB,0BAA0B,GAC1B,cAAc,GACd,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,gBAAgB,GAChB,sBAAsB,GACtB,uBAAuB,GACvB,mBAAmB,GACnB,uBAAuB,GACvB,2BAA2B,GAC3B,yBAAyB,GACzB,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,0BAA0B,GAC1B,uBAAuB,GACvB,sBAAsB,GACtB,2BAA2B,GAC3B,kCAAkC,GAClC,mCAAmC,CACtC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire shape of a document stored inside a document-upload container, per the
|
|
3
|
+
* "Container management" API (ES-32400, Confluence space SNQARND). Only
|
|
4
|
+
* carries what the API returns — no `size`/`source`/`uploadedBy`, unlike a
|
|
5
|
+
* fully-featured upload-tracker document; callers deriving a richer view
|
|
6
|
+
* model must fill those in separately (e.g. `size` from a HEAD request,
|
|
7
|
+
* `type` from the file extension).
|
|
8
|
+
*/
|
|
9
|
+
export interface ContainerDocument {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
containerId: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
}
|
|
15
|
+
/** Paginated response of `GET .../document-upload/container/{id}/documents`. */
|
|
16
|
+
export interface ContainerDocumentListResponse {
|
|
17
|
+
page: number;
|
|
18
|
+
pageSize: number;
|
|
19
|
+
total: number;
|
|
20
|
+
documents: ContainerDocument[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=container-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-document.d.ts","sourceRoot":"","sources":["../../../src/types/document-upload/container-document.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,gFAAgF;AAChF,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The current user's role on a container, as returned by the API — drives
|
|
3
|
+
* which mutations a caller is allowed to attempt (only `owner`/`creator` can
|
|
4
|
+
* edit or share; only `creator` is fixed and never assignable).
|
|
5
|
+
*/
|
|
6
|
+
export type ContainerRole = "creator" | "owner" | "reader";
|
|
7
|
+
/**
|
|
8
|
+
* Wire shape of a document-upload container, per the "Container management"
|
|
9
|
+
* API (ES-32400, Confluence space SNQARND). Consumed by
|
|
10
|
+
* `fetchContainers`/`fetchContainer`/`createContainer`/`updateContainer` in
|
|
11
|
+
* `../../web-api/v2/fetch-document-upload-container`.
|
|
12
|
+
*/
|
|
13
|
+
export interface Container {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
creator: string;
|
|
19
|
+
owners: string[];
|
|
20
|
+
readers: string[];
|
|
21
|
+
documentCount: number;
|
|
22
|
+
currentUserRole: ContainerRole;
|
|
23
|
+
}
|
|
24
|
+
/** Paginated response of `GET .../document-upload/container`. */
|
|
25
|
+
export interface ContainerListResponse {
|
|
26
|
+
page: number;
|
|
27
|
+
pageSize: number;
|
|
28
|
+
total: number;
|
|
29
|
+
containers: Container[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../src/types/document-upload/container.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,aAAa,CAAC;CAChC;AAED,iEAAiE;AACjE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/document-upload/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./audit";
|
|
|
4
4
|
export * from "./chunks";
|
|
5
5
|
export * from "./config";
|
|
6
6
|
export * from "./credentials";
|
|
7
|
+
export * from "./document-upload";
|
|
7
8
|
export * from "./export/types";
|
|
8
9
|
export * from "./filters";
|
|
9
10
|
export * from "./interfaces";
|
|
@@ -12,6 +13,7 @@ export * from "./link-results";
|
|
|
12
13
|
export * from "./preview";
|
|
13
14
|
export * from "./principal";
|
|
14
15
|
export * from "./search";
|
|
16
|
+
export * from "./security-principal";
|
|
15
17
|
export * from "./suggest/suggestion";
|
|
16
18
|
export * from "./user-profile/user-profile";
|
|
17
19
|
export * from "./user-settings/user-settings";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ApiError } from "../../web-api/helpers/errors/api-error";
|
|
1
2
|
import { Aggregation, TreeAggregation } from "../aggregations";
|
|
2
3
|
import { Answer } from "./Answer";
|
|
3
4
|
import { Article } from "./Article";
|
|
@@ -8,7 +9,13 @@ import { QueryIntent } from "./QueryIntent";
|
|
|
8
9
|
import { Tab } from "./Tab";
|
|
9
10
|
import { TopPassage } from "./TopPassage";
|
|
10
11
|
/**
|
|
11
|
-
* Describes the results of a call to the query web service
|
|
12
|
+
* Describes the results of a **search** call to the query web service.
|
|
13
|
+
*
|
|
14
|
+
* Only a search response has this shape. A query sent with `action: "aggregate"` — the one that pages
|
|
15
|
+
* through a single aggregation's items — comes back with `aggregations` and little else: no `records`,
|
|
16
|
+
* no `rowCount`, no `page`/`pageSize`, no `tab`. Type those responses as {@link AggregateResult}
|
|
17
|
+
* instead; casting one to `Result` makes twelve absent fields look present, and arithmetic on them
|
|
18
|
+
* silently yields `NaN` rather than failing.
|
|
12
19
|
*/
|
|
13
20
|
export type Result = {
|
|
14
21
|
id: string;
|
|
@@ -26,7 +33,8 @@ export type Result = {
|
|
|
26
33
|
didYouMean?: DidYouMean;
|
|
27
34
|
aggregations: (Aggregation | TreeAggregation)[];
|
|
28
35
|
attributes: Attributes;
|
|
29
|
-
|
|
36
|
+
/** Absent unless the query carried a query-intent configuration — the server omits the key entirely. */
|
|
37
|
+
queryIntents?: QueryIntent[];
|
|
30
38
|
queryAnalysis?: QueryAnalysis;
|
|
31
39
|
records: Article[];
|
|
32
40
|
rfmQueryHash?: string;
|
|
@@ -39,5 +47,31 @@ export type Result = {
|
|
|
39
47
|
topPassages?: {
|
|
40
48
|
passages?: TopPassage[];
|
|
41
49
|
} | null;
|
|
50
|
+
/**
|
|
51
|
+
* Set by the client, never by the server: the request failed, and none of the fields above were
|
|
52
|
+
* received.
|
|
53
|
+
*
|
|
54
|
+
* It exists so a failure can be told apart from a corpus that legitimately matched nothing. Both
|
|
55
|
+
* arrive as a result with no records, and a caller that only looks at `records` or `rowCount` reports
|
|
56
|
+
* "no results" for a backend that is in fact broken — a 500 on a malformed filter, typically. Check
|
|
57
|
+
* this field **before** concluding anything from an empty result.
|
|
58
|
+
*
|
|
59
|
+
* Prefixed with `$` like the other client-side additions (`$hasMore`, `$selected`).
|
|
60
|
+
*/
|
|
61
|
+
$error?: ApiError;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Describes the response to a query sent with `action: "aggregate"` — paging through one
|
|
65
|
+
* aggregation's items, as a "load more" does.
|
|
66
|
+
*
|
|
67
|
+
* A deliberately narrow type: the server answers with these four keys and nothing else of use. It is
|
|
68
|
+
* **not** a {@link Result}, and typing it as one is how `rowCount`, `records` and `page` came to be read
|
|
69
|
+
* from a response that never carries them.
|
|
70
|
+
*/
|
|
71
|
+
export type AggregateResult = {
|
|
72
|
+
id: string;
|
|
73
|
+
queryName: string;
|
|
74
|
+
aggregations: (Aggregation | TreeAggregation)[];
|
|
75
|
+
attributes: Attributes;
|
|
42
76
|
};
|
|
43
77
|
//# sourceMappingURL=Result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Result.d.ts","sourceRoot":"","sources":["../../../src/types/search/Result.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Result.d.ts","sourceRoot":"","sources":["../../../src/types/search/Result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,EAAE,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE,CAAC;IAChD,UAAU,EAAE,UAAU,CAAC;IACvB,wGAAwG;IACxG,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE;QACR,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,GAAG,IAAI,CAAC;IACT,WAAW,CAAC,EAAE;QACZ,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC;IACT;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,CAAC,WAAW,GAAG,eAAe,CAAC,EAAE,CAAC;IAChD,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
|
|
@@ -24,7 +24,7 @@ export type { QueryIntentMatch } from "./QueryIntentMatch";
|
|
|
24
24
|
export type { QueryIntentResponse } from "./QueryIntentResponse";
|
|
25
25
|
export type { QueryIntentWord } from "./QueryIntentWord";
|
|
26
26
|
export type { RelevantExtract } from "./RelevantExtract";
|
|
27
|
-
export type { Result } from "./Result";
|
|
27
|
+
export type { AggregateResult, Result } from "./Result";
|
|
28
28
|
export type { RFMActionDisplay } from "./RFMActionDisplay";
|
|
29
29
|
export type { RFMData } from "./RFMData";
|
|
30
30
|
export { RFMDisplay } from "./RFMDisplay";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/search/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/search/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/security-principal/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Sinequa principal (user or group), as returned by the `security.principal`
|
|
3
|
+
* search endpoint. A lighter-weight shape than {@link Principal} (from
|
|
4
|
+
* `api/v1/principal`) — just enough to render and identify a search result
|
|
5
|
+
* when assigning access (e.g. owners/readers) to a resource.
|
|
6
|
+
*/
|
|
7
|
+
export interface SecurityPrincipal {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
longName: string;
|
|
11
|
+
userId: string;
|
|
12
|
+
isGroup: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Paginated response of `POST api/v1/security.principal`. */
|
|
15
|
+
export interface SecurityPrincipalSearchResponse {
|
|
16
|
+
pagination: {
|
|
17
|
+
offset: number;
|
|
18
|
+
limit: number;
|
|
19
|
+
total: number;
|
|
20
|
+
};
|
|
21
|
+
principals: SecurityPrincipal[];
|
|
22
|
+
groups: string[];
|
|
23
|
+
methodresult: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=security-principal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-principal.d.ts","sourceRoot":"","sources":["../../../src/types/security-principal/security-principal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,8DAA8D;AAC9D,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/utils/logger.d.ts
CHANGED
|
@@ -15,26 +15,37 @@ interface LoggerConfig {
|
|
|
15
15
|
level: LogLevel;
|
|
16
16
|
enableConsoleOutput: boolean;
|
|
17
17
|
}
|
|
18
|
+
/** Signature of the exported log functions. */
|
|
19
|
+
type LogFn = (message: string, data?: unknown) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Log a debug message.
|
|
22
|
+
*
|
|
23
|
+
* Reassigned by {@link configureLogger} rather than implemented as a wrapper, and that is the whole
|
|
24
|
+
* point: the browser attributes a console entry to the frame that **called** `console.*`, so routing
|
|
25
|
+
* every level through one internal `logMessage()` helper made DevTools blame this file — every line
|
|
26
|
+
* of the application linked to `logger.ts` instead of its caller. Exporting the *bound* console
|
|
27
|
+
* method makes the caller the invoking frame, so the source link is the code that logged.
|
|
28
|
+
*
|
|
29
|
+
* Two consequences to know about:
|
|
30
|
+
* - These are live ESM bindings. `import { debug }` follows a later `configureLogger()`, but
|
|
31
|
+
* capturing the value first (`const { debug } = await import(…)`) freezes the level it was
|
|
32
|
+
* configured with.
|
|
33
|
+
* - The `console` method is captured when the binding is built, so anything that replaces
|
|
34
|
+
* `console.*` afterwards — a test spy, an error-reporting SDK, a log shipper — is bypassed.
|
|
35
|
+
* Install such a wrapper before importing this module, or call `configureLogger({})` after
|
|
36
|
+
* installing it to rebuild the bindings against it.
|
|
37
|
+
*/
|
|
38
|
+
export declare let debug: LogFn;
|
|
39
|
+
/** Log an info message. @see debug for why this is a binding rather than a function. */
|
|
40
|
+
export declare let info: LogFn;
|
|
41
|
+
/** Log a warning message. @see debug for why this is a binding rather than a function. */
|
|
42
|
+
export declare let warn: LogFn;
|
|
43
|
+
/** Log an error message. @see debug for why this is a binding rather than a function. */
|
|
44
|
+
export declare let error: LogFn;
|
|
18
45
|
/**
|
|
19
46
|
* Configure the logger system
|
|
20
47
|
* @param config - Logger configuration options
|
|
21
48
|
*/
|
|
22
49
|
export declare function configureLogger(config: Partial<LoggerConfig>): void;
|
|
23
|
-
/**
|
|
24
|
-
* Log a debug message
|
|
25
|
-
*/
|
|
26
|
-
export declare function debug(message: string, data?: unknown): void;
|
|
27
|
-
/**
|
|
28
|
-
* Log an info message
|
|
29
|
-
*/
|
|
30
|
-
export declare function info(message: string, data?: unknown): void;
|
|
31
|
-
/**
|
|
32
|
-
* Log a warning message
|
|
33
|
-
*/
|
|
34
|
-
export declare function warn(message: string, data?: unknown): void;
|
|
35
|
-
/**
|
|
36
|
-
* Log an error message
|
|
37
|
-
*/
|
|
38
|
-
export declare function error(message: string, error?: unknown): void;
|
|
39
50
|
export {};
|
|
40
51
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACT;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,QAAQ,CAAC;IAChB,mBAAmB,EAAE,OAAO,CAAC;CAE9B;AAQD
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACT;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,QAAQ,CAAC;IAChB,mBAAmB,EAAE,OAAO,CAAC;CAE9B;AAQD,+CAA+C;AAC/C,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AAIvD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,IAAI,KAAK,EAAE,KAAY,CAAC;AAE/B,wFAAwF;AACxF,eAAO,IAAI,IAAI,EAAE,KAAY,CAAC;AAE9B,0FAA0F;AAC1F,eAAO,IAAI,IAAI,EAAE,KAAY,CAAC;AAE9B,yFAAyF;AACzF,eAAO,IAAI,KAAK,EAAE,KAAY,CAAC;AA0B/B;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAGnE"}
|
|
@@ -41,6 +41,14 @@ declare class AadHttpClientManager {
|
|
|
41
41
|
initialize(client: AadHttpClientLike | null): void;
|
|
42
42
|
/** @throws if no client has been initialized. */
|
|
43
43
|
getClient(): AadHttpClientLike;
|
|
44
|
+
/**
|
|
45
|
+
* The v1 request configuration every `AadHttpClient` call needs. The SPFx SDK exposes it as a
|
|
46
|
+
* static member of the client's class, which is not describable on the instance type — so the
|
|
47
|
+
* single cast needed lives here rather than being repeated at each call site.
|
|
48
|
+
*
|
|
49
|
+
* @throws if no client has been initialized.
|
|
50
|
+
*/
|
|
51
|
+
getConfiguration(): unknown;
|
|
44
52
|
isInitialized(): boolean;
|
|
45
53
|
}
|
|
46
54
|
export declare const aadHttpClientManager: AadHttpClientManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aad-http-client-manager.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/aad-http-client-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,IAAI,mBAAmB,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,CACD,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,OAAO,EACtB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC,IAAI,CACF,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,OAAO,EACtB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC,KAAK,CACH,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,OAAO,EACtB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,cAAM,oBAAoB;IACxB,OAAO,CAAC,MAAM,CAAkC;IAEhD,0DAA0D;IAC1D,UAAU,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI;IAIlD,iDAAiD;IACjD,SAAS,IAAI,iBAAiB;IAS9B,aAAa,IAAI,OAAO;CAGzB;AAGD,eAAO,MAAM,oBAAoB,sBAA6B,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAC/B,IAAI,CAEN"}
|
|
1
|
+
{"version":3,"file":"aad-http-client-manager.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/aad-http-client-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,IAAI,mBAAmB,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,CACD,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,OAAO,EACtB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC,IAAI,CACF,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,OAAO,EACtB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC,KAAK,CACH,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,OAAO,EACtB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,cAAM,oBAAoB;IACxB,OAAO,CAAC,MAAM,CAAkC;IAEhD,0DAA0D;IAC1D,UAAU,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI;IAIlD,iDAAiD;IACjD,SAAS,IAAI,iBAAiB;IAS9B;;;;;;OAMG;IACH,gBAAgB,IAAI,OAAO;IAO3B,aAAa,IAAI,OAAO;CAGzB;AAGD,eAAO,MAAM,oBAAoB,sBAA6B,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAC/B,IAAI,CAEN"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
2
|
+
/**
|
|
3
|
+
* Builds the headers of a request for a context: CSRF token, bearer token and impersonation.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createHeadersWithContext(ctx: AtomicContext, headers?: Headers): Headers;
|
|
1
6
|
/**
|
|
2
7
|
* Creates headers for a web API request.
|
|
3
8
|
* @returns {Headers} The headers object.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Implementation detail of the HTTP helpers, which already call it on every request.
|
|
11
|
+
* Pass your own `headers` in the request options instead. It will stop being exported in the next
|
|
12
|
+
* major.
|
|
4
13
|
*/
|
|
5
14
|
export declare function createHeaders(headers?: Headers): Headers;
|
|
6
15
|
//# sourceMappingURL=create-headers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-headers.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/create-headers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-headers.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/create-headers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAGrC;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,aAAa,EAClB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAyBT;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAExD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-error.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/errors/api-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,MAAM,EAAE,MAAM,CAAC;gBAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"api-error.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/errors/api-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,MAAM,EAAE,MAAM,CAAC;gBAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAO5C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../client/atomic-context";
|
|
1
2
|
import type { AadHttpResponseLike } from "./aad-http-client-manager";
|
|
2
3
|
type ResponseLike = Response | AadHttpResponseLike;
|
|
3
4
|
/**
|
|
@@ -6,7 +7,22 @@ type ResponseLike = Response | AadHttpResponseLike;
|
|
|
6
7
|
* @param response - The response from the web API (standard Response or SPFx HttpClientResponse).
|
|
7
8
|
* @param responseType - The type of response expected ('arraybuffer', 'blob', 'json', or 'text')
|
|
8
9
|
* @returns A promise that resolves to the response data of type T.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Implementation detail of the HTTP helpers, which already apply it to every response.
|
|
12
|
+
* Use `get`/`post`/`put`/`patch`/`del`, or subscribe to `onAuthEvent("unauthorized", …)` to react to
|
|
13
|
+
* a 401. It will stop being exported in the next major.
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleResponse<T>(response: ResponseLike, responseType?: "arraybuffer" | "blob" | "json" | "text" | "response"): Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Handles the response of a request made on a context: sliding token refresh, body parsing, and
|
|
18
|
+
* typed errors (with the `unauthorized` event raised on the context's own subscribers).
|
|
19
|
+
*/
|
|
20
|
+
export declare function handleResponseWithContext<T>(ctx: AtomicContext, response: ResponseLike, responseType?: "arraybuffer" | "blob" | "json" | "text" | "response",
|
|
21
|
+
/**
|
|
22
|
+
* URL the request was sent to. Passed explicitly because `response.url` is empty on a synthetic
|
|
23
|
+
* Response (an injected `fetch`, an SPFx transport), which would leave the error events without
|
|
24
|
+
* an endpoint.
|
|
9
25
|
*/
|
|
10
|
-
|
|
26
|
+
endpoint?: string): Promise<T>;
|
|
11
27
|
export {};
|
|
12
28
|
//# sourceMappingURL=handle-response.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-response.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/handle-response.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAMrE,KAAK,YAAY,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAEnD
|
|
1
|
+
{"version":3,"file":"handle-response.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/handle-response.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAMrE,KAAK,YAAY,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,QAAQ,EAAE,YAAY,EACtB,YAAY,GAAE,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAmB,GAC3E,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;;GAGG;AACH,wBAAsB,yBAAyB,CAAC,CAAC,EAC/C,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,YAAY,EACtB,YAAY,GAAE,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAmB;AAC5E;;;;GAIG;AACH,QAAQ,SAAqB,GAC5B,OAAO,CAAC,CAAC,CAAC,CAkEZ"}
|
|
@@ -11,7 +11,7 @@ export * from "./methods/post";
|
|
|
11
11
|
export * from "./methods/put";
|
|
12
12
|
export * from "./request-options";
|
|
13
13
|
export * from "./utils/create-timeout-controller";
|
|
14
|
-
export * from "./utils/date-utils
|
|
14
|
+
export * from "./utils/date-utils";
|
|
15
15
|
export * from "./utils/resolve-no-auto-authentication";
|
|
16
16
|
export * from "./utils/with-retry";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web-api/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,CAAC;AACvD,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../../client/atomic-context";
|
|
1
2
|
import type { API_ENDPOINTS } from "../../../types";
|
|
3
|
+
import type { RequestOptions } from "../request-options";
|
|
4
|
+
/** Options of a DELETE request: the shared ones, plus an optional JSON payload. */
|
|
5
|
+
export type DeleteOptions = RequestOptions & {
|
|
6
|
+
body?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
/** Makes a DELETE request on the given context. */
|
|
9
|
+
export declare function delWithContext<T>(ctx: AtomicContext, endpoint: API_ENDPOINTS, params?: URLSearchParams, options?: DeleteOptions): Promise<T>;
|
|
2
10
|
/**
|
|
3
11
|
* Makes a DELETE request to the specified API endpoint.
|
|
4
12
|
*
|
|
5
13
|
* @param endpoint - The API endpoint to send the request to.
|
|
6
14
|
* @param params - The URL parameters to include in the request.
|
|
7
|
-
* @param options - Additional options for the request
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* alongside the DELETE method). `app`/`locale`/`noUserOverride`/`noAutoAuthentication` are
|
|
12
|
-
* merged in automatically, same as `post`/`put`.
|
|
15
|
+
* @param options - Additional options for the request (see {@link RequestOptions}), plus an
|
|
16
|
+
* optional JSON `body` (e.g. bulk-delete endpoints that need a payload alongside the DELETE
|
|
17
|
+
* method). `app`/`locale`/`noUserOverride`/`noAutoAuthentication` are merged into that body
|
|
18
|
+
* automatically, same as `post`/`put`.
|
|
13
19
|
* @returns A promise that resolves to the response data of type T.
|
|
14
20
|
*/
|
|
15
|
-
export declare function del<T>(endpoint: API_ENDPOINTS, params?: URLSearchParams, options?:
|
|
16
|
-
headers?: Headers;
|
|
17
|
-
responseType?: "arraybuffer" | "blob" | "json" | "text";
|
|
18
|
-
body?: Record<string, unknown>;
|
|
19
|
-
}): Promise<T>;
|
|
21
|
+
export declare function del<T>(endpoint: API_ENDPOINTS, params?: URLSearchParams, options?: DeleteOptions): Promise<T>;
|
|
20
22
|
//# sourceMappingURL=del.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"del.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/del.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"del.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/del.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC;AAEhF,mDAAmD;AACnD,wBAAsB,cAAc,CAAC,CAAC,EACpC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,aAAa,EACvB,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,CAAC,CAAC,CAyBZ;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,GAAG,CAAC,CAAC,EACzB,QAAQ,EAAE,aAAa,EACvB,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../../client/atomic-context";
|
|
1
2
|
import type { API_ENDPOINTS } from "../../../types";
|
|
3
|
+
import type { RequestOptions } from "../request-options";
|
|
4
|
+
/** Makes a GET request on the given context. */
|
|
5
|
+
export declare function getWithContext<T>(ctx: AtomicContext, endpoint: API_ENDPOINTS, params?: URLSearchParams, options?: RequestOptions): Promise<T>;
|
|
2
6
|
/**
|
|
3
7
|
* Makes a GET request to the specified API endpoint with the given parameters.
|
|
4
8
|
*
|
|
5
9
|
* @param endpoint - The API endpoint to send the GET request to.
|
|
6
10
|
* @param params - The URL parameters to include in the request.
|
|
7
|
-
* @param options - Additional options for the request.
|
|
8
|
-
* @param options.headers - Custom headers to include in the request.
|
|
9
|
-
* @param options.responseType - The expected type of response data.
|
|
10
|
-
* @param options.redirect - How to handle a redirect response (defaults to the browser's `follow`).
|
|
11
|
-
* Pass `"manual"` to avoid following a cross-origin redirect (e.g. an auth challenge to an IdP),
|
|
12
|
-
* which would otherwise surface as a CORS network error.
|
|
11
|
+
* @param options - Additional options for the request (see {@link RequestOptions}).
|
|
13
12
|
* @returns A Promise that resolves to the response data of type T.
|
|
14
13
|
*/
|
|
15
|
-
export declare function get<T>(endpoint: API_ENDPOINTS, params?: URLSearchParams, options?:
|
|
16
|
-
headers?: Headers;
|
|
17
|
-
responseType?: "arraybuffer" | "blob" | "json" | "text";
|
|
18
|
-
signal?: AbortSignal;
|
|
19
|
-
redirect?: RequestRedirect;
|
|
20
|
-
}): Promise<T>;
|
|
14
|
+
export declare function get<T>(endpoint: API_ENDPOINTS, params?: URLSearchParams, options?: RequestOptions): Promise<T>;
|
|
21
15
|
//# sourceMappingURL=get.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/get.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/get.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,gDAAgD;AAChD,wBAAsB,cAAc,CAAC,CAAC,EACpC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,aAAa,EACvB,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAuBZ;AAED;;;;;;;GAOG;AACH,wBAAsB,GAAG,CAAC,CAAC,EACzB,QAAQ,EAAE,aAAa,EACvB,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../../client/atomic-context";
|
|
1
2
|
import type { API_ENDPOINTS } from "../../../types";
|
|
3
|
+
import type { RequestOptions } from "../request-options";
|
|
4
|
+
/** Makes a PATCH request on the given context. */
|
|
5
|
+
export declare function patchWithContext<T>(ctx: AtomicContext, endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: RequestOptions): Promise<T>;
|
|
2
6
|
/**
|
|
3
7
|
* Makes a PATCH request to the specified API endpoint.
|
|
4
8
|
*
|
|
5
9
|
* @param endpoint - The API endpoint to send the request to.
|
|
6
10
|
* @param body - The request body as a record of key-value pairs.
|
|
7
|
-
* @param options - Additional options for the request.
|
|
8
|
-
* @param options.headers - Custom headers to include in the request.
|
|
9
|
-
* @param options.responseType - The expected type of response data.
|
|
11
|
+
* @param options - Additional options for the request (see {@link RequestOptions}).
|
|
10
12
|
* @returns A promise that resolves to the response data of type T.
|
|
11
13
|
*/
|
|
12
|
-
export declare function patch<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?:
|
|
13
|
-
headers?: Headers;
|
|
14
|
-
responseType?: "arraybuffer" | "blob" | "json" | "text";
|
|
15
|
-
}): Promise<T>;
|
|
14
|
+
export declare function patch<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: RequestOptions): Promise<T>;
|
|
16
15
|
//# sourceMappingURL=patch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/patch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/patch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,kDAAkD;AAClD,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAkBZ;AAED;;;;;;;GAOG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAC3B,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../../client/atomic-context";
|
|
1
2
|
import type { API_ENDPOINTS } from "../../../types";
|
|
3
|
+
import type { RequestOptions } from "../request-options";
|
|
4
|
+
/** Makes a POST request on the given context. */
|
|
5
|
+
export declare function postWithContext<T>(ctx: AtomicContext, endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: RequestOptions): Promise<T>;
|
|
2
6
|
/**
|
|
3
7
|
* Makes a POST request to the specified API endpoint.
|
|
4
8
|
* `app` and `locale` are added automatically to the request body.
|
|
5
9
|
*
|
|
6
10
|
* @param endpoint - The API endpoint to send the request to.
|
|
7
11
|
* @param body - The request body as a record of key-value pairs.
|
|
8
|
-
* @param options - Additional options for the request.
|
|
9
|
-
* @param options.headers - Custom headers to include in the request.
|
|
10
|
-
* @param options.responseType - The expected type of response data.
|
|
12
|
+
* @param options - Additional options for the request (see {@link RequestOptions}).
|
|
11
13
|
* @returns A promise that resolves to the response data of type T.
|
|
12
14
|
*/
|
|
13
|
-
export declare function post<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?:
|
|
14
|
-
headers?: Headers;
|
|
15
|
-
responseType?: "arraybuffer" | "blob" | "json" | "text";
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
}): Promise<T>;
|
|
15
|
+
export declare function post<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: RequestOptions): Promise<T>;
|
|
18
16
|
//# sourceMappingURL=post.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/post.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/post.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,iDAAiD;AACjD,wBAAsB,eAAe,CAAC,CAAC,EACrC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAoBZ;AAED;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CAAC,CAAC,EAC1B,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import { type AtomicContext } from "../../../client/atomic-context";
|
|
1
2
|
import type { API_ENDPOINTS } from "../../../types";
|
|
3
|
+
import type { RequestOptions } from "../request-options";
|
|
4
|
+
/** Makes a PUT request on the given context. */
|
|
5
|
+
export declare function putWithContext<T>(ctx: AtomicContext, endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: RequestOptions): Promise<T>;
|
|
2
6
|
/**
|
|
3
7
|
* Makes a PUT request to the specified API endpoint.
|
|
4
8
|
*
|
|
5
9
|
* @param endpoint - The API endpoint to send the request to.
|
|
6
10
|
* @param body - The request body as a record of key-value pairs.
|
|
7
|
-
* @param options - Additional options for the request.
|
|
8
|
-
* @param options.headers - Custom headers to include in the request.
|
|
9
|
-
* @param options.responseType - The expected type of response data.
|
|
11
|
+
* @param options - Additional options for the request (see {@link RequestOptions}).
|
|
10
12
|
* @returns A promise that resolves to the response data of type T.
|
|
11
13
|
*/
|
|
12
|
-
export declare function put<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?:
|
|
13
|
-
headers?: Headers;
|
|
14
|
-
responseType?: "arraybuffer" | "blob" | "json" | "text";
|
|
15
|
-
}): Promise<T>;
|
|
14
|
+
export declare function put<T>(endpoint: API_ENDPOINTS, body: Record<string, unknown>, options?: RequestOptions): Promise<T>;
|
|
16
15
|
//# sourceMappingURL=put.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"put.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/put.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"put.d.ts","sourceRoot":"","sources":["../../../../src/web-api/helpers/methods/put.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,gDAAgD;AAChD,wBAAsB,cAAc,CAAC,CAAC,EACpC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAoBZ;AAED;;;;;;;GAOG;AACH,wBAAsB,GAAG,CAAC,CAAC,EACzB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|