@atlaskit/util-service-support
Advanced tools
Comparing version 6.1.2 to 6.1.3
# @atlaskit/util-service-support | ||
## 6.1.3 | ||
### Patch Changes | ||
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5` | ||
## 6.1.2 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@atlaskit/util-service-support", | ||
"version": "6.1.2" | ||
"version": "6.1.3" | ||
} |
{ | ||
"name": "@atlaskit/util-service-support", | ||
"version": "6.1.2" | ||
"version": "6.1.3" | ||
} |
{ | ||
"name": "@atlaskit/util-service-support", | ||
"version": "6.1.2" | ||
"version": "6.1.3" | ||
} |
{ | ||
"name": "@atlaskit/util-service-support", | ||
"version": "6.1.2", | ||
"version": "6.1.3", | ||
"description": "A library of support classes for integrating React components with REST HTTP services", | ||
@@ -15,2 +15,9 @@ "publishConfig": { | ||
"types": "dist/types/index.d.ts", | ||
"typesVersions": { | ||
">=4.0 <4.5": { | ||
"*": [ | ||
"dist/types-ts4.0/*" | ||
] | ||
} | ||
}, | ||
"atlaskit:src": "src/index.ts", | ||
@@ -34,3 +41,3 @@ "atlassian": { | ||
"sinon": "^2.2.0", | ||
"typescript": "4.3.5" | ||
"typescript": "4.5.5" | ||
}, | ||
@@ -37,0 +44,0 @@ "keywords": [ |
@@ -1,90 +0,67 @@ | ||
## API Report File for "@atlaskit/util-service-support". | ||
## API Report File for "@atlaskit/util-service-support" | ||
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/). | ||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
<!-- | ||
Generated API Report version: 2.0 | ||
--> | ||
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports) | ||
```ts | ||
export declare abstract class AbstractResource<Q, R, E, I, O> | ||
// @public (undocumented) | ||
export abstract class AbstractResource<Q, R, E, I, O> | ||
implements Provider<Q, R, E, I, O> { | ||
private lastResult; | ||
private listeners; | ||
// (undocumented) | ||
abstract filter(query?: Q, options?: O): void; | ||
subscribe(onChange: OnProviderChange<R, E, I>): void; | ||
unsubscribe(onChange: OnProviderChange<R, E, I>): void; | ||
protected notifyResult(result: R): void; | ||
// (undocumented) | ||
protected notifyError(error: E): void; | ||
// (undocumented) | ||
protected notifyInfo(info: I): void; | ||
// (undocumented) | ||
protected notifyNotReady(): void; | ||
// (undocumented) | ||
protected notifyResult(result: R): void; | ||
// (undocumented) | ||
subscribe(onChange: OnProviderChange<R, E, I>): void; | ||
// (undocumented) | ||
unsubscribe(onChange: OnProviderChange<R, E, I>): void; | ||
} | ||
export declare const buildCredentials: ( | ||
// @public (undocumented) | ||
export const buildCredentials: ( | ||
secOptions?: SecurityOptions | undefined, | ||
) => 'omit' | 'include'; | ||
export declare interface KeyValues { | ||
// @public (undocumented) | ||
export interface KeyValues { | ||
// (undocumented) | ||
[index: string]: any; | ||
} | ||
export declare interface OnProviderChange<R, E, I> { | ||
/** | ||
* Normal callback on a search result, or updated search result. | ||
*/ | ||
result(result: R): void; | ||
/** | ||
* When something goes wrong, e.g. underlying service is not available. | ||
*/ | ||
// @public (undocumented) | ||
export interface OnProviderChange<R, E, I> { | ||
error?(error: E): void; | ||
/** | ||
* Information to display, e.g. due to slow searches, initial message, etc. | ||
*/ | ||
info?(info: I): void; | ||
/** | ||
* Notifies if the Resource is not ready and won't respond to searches | ||
* in a timely manner. Note searches that occur while not ready Will | ||
* eventually be fulfilled. | ||
*/ | ||
notReady?(): void; | ||
result(result: R): void; | ||
} | ||
/** | ||
* Defines a typical Resource. | ||
* | ||
* Q = query type | ||
* R = result type | ||
* E = error type | ||
* I = info type | ||
* O = options that filter can accept | ||
*/ | ||
export declare interface Provider<Q, R, E, I, O> { | ||
/** | ||
* Results are returned to the OnSearchResult | ||
* in the subscriber. | ||
* | ||
* There may not be a 1-on-1 relationship between a search | ||
* and a callback. | ||
* | ||
* For example, multiple queries may result in one callback if the | ||
* responses are out of order (i.e. old responses are dropped). Or | ||
* multiple callbacks may be fired, for example if the underlying data | ||
* set to search has changed, the last search may be executed again | ||
* with updated results. | ||
*/ | ||
// @public | ||
export interface Provider<Q, R, E, I, O> { | ||
filter(query?: Q, options?: O): void; | ||
// (undocumented) | ||
subscribe(onChange: OnProviderChange<R, E, I>): void; | ||
// (undocumented) | ||
unsubscribe(onChange: OnProviderChange<R, E, I>): void; | ||
} | ||
/** | ||
* Returns a promise to a SecurityOptions that has just been forcibly refreshed with a | ||
* new token. Will be used for single retry per request if a 401 is returned. | ||
*/ | ||
export declare interface RefreshSecurityProvider { | ||
// @public | ||
export interface RefreshSecurityProvider { | ||
// (undocumented) | ||
(): Promise<SecurityOptions>; | ||
} | ||
/** | ||
* @returns Promise containing the json response | ||
*/ | ||
declare const requestService: <T>( | ||
// @public (undocumented) | ||
const requestService: <T>( | ||
serviceConfig: ServiceConfig, | ||
@@ -94,26 +71,38 @@ options?: RequestServiceOptions | undefined, | ||
export declare interface RequestServiceOptions { | ||
// @public (undocumented) | ||
export interface RequestServiceOptions { | ||
// (undocumented) | ||
ignoreResponsePayload?: boolean; | ||
// (undocumented) | ||
path?: string; | ||
// (undocumented) | ||
queryParams?: KeyValues; | ||
// (undocumented) | ||
requestInit?: RequestInit; | ||
ignoreResponsePayload?: boolean; | ||
} | ||
export declare interface SecurityOptions { | ||
params?: KeyValues; | ||
// @public (undocumented) | ||
export interface SecurityOptions { | ||
// (undocumented) | ||
headers?: KeyValues; | ||
// (undocumented) | ||
omitCredentials?: boolean; | ||
// (undocumented) | ||
params?: KeyValues; | ||
} | ||
/** | ||
* Returns the current SecurityOptions for the mentions service. | ||
*/ | ||
export declare interface SecurityProvider { | ||
// @public | ||
export interface SecurityProvider { | ||
// (undocumented) | ||
(): SecurityOptions; | ||
} | ||
export declare interface ServiceConfig { | ||
// @public (undocumented) | ||
export interface ServiceConfig { | ||
// (undocumented) | ||
refreshedSecurityProvider?: RefreshSecurityProvider; | ||
// (undocumented) | ||
securityProvider?: SecurityProvider; | ||
// (undocumented) | ||
url: string; | ||
securityProvider?: SecurityProvider; | ||
refreshedSecurityProvider?: RefreshSecurityProvider; | ||
} | ||
@@ -125,5 +114,6 @@ | ||
export declare const utils: typeof serviceUtils; | ||
// @public (undocumented) | ||
export const utils: typeof serviceUtils; | ||
export {}; | ||
// (No @packageDocumentation comment for this package) | ||
``` |
@@ -6,3 +6,10 @@ { | ||
"module:es2019": "../dist/es2019/serviceResources.js", | ||
"types": "../dist/types/serviceResources.d.ts" | ||
"types": "../dist/types/serviceResources.d.ts", | ||
"typesVersions": { | ||
">=4.0 <4.5": { | ||
"*": [ | ||
"../dist/types-ts4.0/serviceResources.d.ts" | ||
] | ||
} | ||
} | ||
} |
@@ -6,3 +6,10 @@ { | ||
"module:es2019": "../dist/es2019/serviceUtils.js", | ||
"types": "../dist/types/serviceUtils.d.ts" | ||
"types": "../dist/types/serviceUtils.d.ts", | ||
"typesVersions": { | ||
">=4.0 <4.5": { | ||
"*": [ | ||
"../dist/types-ts4.0/serviceUtils.d.ts" | ||
] | ||
} | ||
} | ||
} |
@@ -6,3 +6,10 @@ { | ||
"module:es2019": "../dist/es2019/types.js", | ||
"types": "../dist/types/types.d.ts" | ||
"types": "../dist/types/types.d.ts", | ||
"typesVersions": { | ||
">=4.0 <4.5": { | ||
"*": [ | ||
"../dist/types-ts4.0/types.d.ts" | ||
] | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48816
33
853