Compare commits

...

6 Commits
0.0.3 ... 0.0.5

Author SHA1 Message Date
LukeHagar
f75d22cf6a Bump version to 0.0.5 2023-04-12 02:27:11 +00:00
GitHub Action Bot
705cd5f26b Automated build '' typescript-axios sdk: 4673951944 2023-04-12 02:25:36 +00:00
Luke Hagar
5162542903 removed paginator 2023-04-10 09:34:19 -05:00
LukeHagar
f412ddd4d5 Bump version to 0.0.4 2023-04-07 15:04:24 +00:00
Luke Hagar
3f4ea2071e Update package.json 2023-04-07 09:58:58 -05:00
Luke Hagar
76726427e2 Update bump_version.yml 2023-04-07 09:58:37 -05:00
16 changed files with 6965 additions and 208 deletions

View File

@@ -62,7 +62,6 @@ jobs:
if: steps.updateVersion.outcome == 'success'
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
cd sdk-output
jq '.version = "${{ github.event.inputs.version }}"' package.json > package.json.tmp && mv package.json.tmp package.json
- name: Build TS SDK
@@ -84,4 +83,4 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Bump version to ${{ github.event.inputs.version }}
tagging_message: ${{ github.event.inputs.version }}
tagging_message: ${{ github.event.inputs.version }}

Submodule api-specs updated: fd49ee9e54...462e131304

View File

@@ -5,5 +5,5 @@ files:
destinationFilename: package.json
npmName: plexjs
npmRepository: lukehagar
npmVersion: 0.0.3
npmVersion: 0.0.5
useSingleRequestParameter: true

1
dist/index.d.ts vendored
View File

@@ -1,4 +1,3 @@
export * from "./sdk-output/api";
export { Configuration, ConfigurationParameters } from "./sdk-output/configuration";
export * from "./paginator";
export * as axiosRetry from "axios-retry";

1
dist/index.js vendored
View File

@@ -18,6 +18,5 @@ exports.axiosRetry = exports.Configuration = void 0;
__exportStar(require("./sdk-output/api"), exports);
var configuration_1 = require("./sdk-output/configuration");
Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return configuration_1.Configuration; } });
__exportStar(require("./paginator"), exports);
exports.axiosRetry = require("axios-retry");
//# sourceMappingURL=index.js.map

2
dist/index.js.map vendored
View File

@@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AAEjC,4DAAkF;AAA1E,8GAAA,aAAa,OAAA;AAErB,8CAA4B;AAE5B,4CAAyC"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AAEjC,4DAAkF;AAA1E,8GAAA,aAAa,OAAA;AAErB,4CAAyC"}

1674
dist/sdk-output/api.d.ts vendored

File diff suppressed because it is too large Load Diff

2567
dist/sdk-output/api.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -2,6 +2,4 @@ export * from "./sdk-output/api";
export {Configuration, ConfigurationParameters} from "./sdk-output/configuration";
export * from "./paginator";
export * as axiosRetry from "axios-retry"

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.1",
"version": "0.0.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lukehagar/plexjs",
"version": "0.0.1",
"version": "0.0.5",
"license": "MIT",
"dependencies": {
"axios": "^0.26.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.1",
"version": "0.0.5",
"description": "Community Made Plex JS/TS Module",
"author": "Luke Hagar",
"repository": {

View File

@@ -1,63 +0,0 @@
export interface PaginationParams {
/**
* Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
* @type {number}
* @memberof AccountsApiListAccounts
*/
limit?: number;
/**
* Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
* @type {number}
* @memberof AccountsApiListAccounts
*/
offset?: number;
/**
* If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
* @type {boolean}
* @memberof AccountsApiListAccounts
*/
count?: boolean;
/**
* Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **identityId**: *eq* **name**: *eq, in* **nativeIdentity**: *eq, in* **sourceId**: *eq, in* **uncorrelated**: *eq*
* @type {string}
* @memberof AccountsApiListAccounts
*/
filters?: string;
}
export interface AxiosResponse<T = any, D = any> {
data: T;
status: number;
statusText: string;
request?: any;
headers: AxiosResponseHeaders;
}
export type AxiosResponseHeaders = Record<string, string> & {
"set-cookie"?: string[]
};
export class Paginator {
public static async paginate<T, TResult, A extends PaginationParams>(thisArg: T, callbackFn: (this: T, args: A) => Promise<AxiosResponse<TResult[], any>>, args?: A, increment?: number): Promise<AxiosResponse<TResult[], any>> {
let params: PaginationParams = args ? args : {limit: 0, offset: 0}
const maxLimit = params && params.limit ? params.limit : 0
if (!params.offset) {
params.offset = 0
}
if (!increment) {
increment = 250
}
params.limit = increment
let modified: TResult[] = []
while (true) {
console.log(`Paginating call, offset = ${params.offset}`)
let results = await callbackFn.call(thisArg, params)
modified.push.apply(modified, results.data)
if (results.data.length < increment || (params.offset >= maxLimit && maxLimit > 0)) {
results.data = modified
return results
}
params.offset += increment
}
}
}

View File

@@ -1,4 +1,4 @@
## plexjs@0.0.3
## plexjs@0.0.5
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
_published:_
```
npm install plexjs@0.0.3 --save
npm install plexjs@0.0.5 --save
```
_unPublished (not recommended):_

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "plexjs",
"version": "0.0.3",
"version": "0.0.5",
"description": "OpenAPI client for plexjs",
"author": "OpenAPI-Generator Contributors",
"repository": {