Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cognite/sdk-core

Package Overview
Dependencies
Maintainers
107
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cognite/sdk-core - npm Package Compare versions

Comparing version 1.0.0-rc.0 to 1.0.0

CHANGELOG.md

30

dist/src/types.d.ts

@@ -48,2 +48,32 @@ export interface ListResponse<T> extends CursorResponse<T> {

}
/**
* A Promise to a response that can be awaited like normal,
* but at the risk of not getting all results due to API limits.
* In which case a nextCursor field is returned to request the next page.
* Helper methods are provided to abstract away the pagination.
*
* Example using `client.timeseries.list` with a per-request limit of 1000:
* ```js
* const response = client.timeseries.list({ filter: { assetIds: [ASSET_ID] }, limit: 1000 });
* ```
*
* You can get up to 1000 elements with normal await:
* ```js
* const { items, nextCursor } = await response;
* ```
*
* You can use `autoPagingToArray` to get more items than the per-request limit.
* E.g. an array of up to 5000 items:
* ```js
* const timeseries = await response.autoPagingToArray({ limit: 5000 });
* ```
* You may also specify `{ limit: Infinity }` to get all results.
*
* You can also iterate through all items (unless you break out of the loop) like so:
* ```js
* for await (const value of response) {
* // do something to value
* }
* ```
*/
export declare type CursorAndAsyncIterator<T> = Promise<ListResponse<T[]>> & CogniteAsyncIterator<T>;

@@ -50,0 +80,0 @@ export interface CogniteAsyncIterator<T> extends AsyncIterableIterator<T> {

5

package.json

@@ -9,3 +9,3 @@ {

"types": "dist/src/index.d.js",
"version": "1.0.0-rc.0",
"version": "1.0.0",
"scripts": {

@@ -29,3 +29,4 @@ "clean": "rm -rf dist",

"access": "public"
}
},
"gitHead": "e04804beedf85025df40d0e57519bbb103b66717"
}

4

README.md

@@ -1,3 +0,3 @@

A core library used by cognite Javascript SDKs, published as `@cognite/sdk-core`.
It can be used to create custom sdks and alphas, and is used in the official stable and beta SDK.
A core library used by Cognite Javascript SDKs, published as `@cognite/sdk-core`.
It is used in the official stable and beta SDK and can also be used to create custom SDKs and alpha builds.

@@ -4,0 +4,0 @@ See the repository README [here](https://github.com/cognitedata/cognite-sdk-js#readme).

@@ -45,3 +45,5 @@ // Copyright 2020 Cognite AS

spiedAppendChild.mockImplementation(iframe => {
// @ts-ignore-next-line
iframe.onload();
return iframe;
});

@@ -80,3 +82,3 @@ const spiedRemoveChild = jest.spyOn(document.body, 'removeChild');

},
};
} as HTMLIFrameElement;
}

@@ -83,0 +85,0 @@ test('silent login', async () => {

@@ -61,2 +61,32 @@ // Copyright 2020 Cognite AS

/**
* A Promise to a response that can be awaited like normal,
* but at the risk of not getting all results due to API limits.
* In which case a nextCursor field is returned to request the next page.
* Helper methods are provided to abstract away the pagination.
*
* Example using `client.timeseries.list` with a per-request limit of 1000:
* ```js
* const response = client.timeseries.list({ filter: { assetIds: [ASSET_ID] }, limit: 1000 });
* ```
*
* You can get up to 1000 elements with normal await:
* ```js
* const { items, nextCursor } = await response;
* ```
*
* You can use `autoPagingToArray` to get more items than the per-request limit.
* E.g. an array of up to 5000 items:
* ```js
* const timeseries = await response.autoPagingToArray({ limit: 5000 });
* ```
* You may also specify `{ limit: Infinity }` to get all results.
*
* You can also iterate through all items (unless you break out of the loop) like so:
* ```js
* for await (const value of response) {
* // do something to value
* }
* ```
*/
export type CursorAndAsyncIterator<T> = Promise<ListResponse<T[]>> &

@@ -63,0 +93,0 @@ CogniteAsyncIterator<T>;

@@ -6,3 +6,4 @@ {

"outDir": "dist"
}
},
"include": ["src/"]
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc