@embedworkflow/sdk 1.1.0 → 1.2.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/.github/workflows/push-tag.yaml +34 -0
- package/.openapi-generator/FILES +87 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +2 -2
- package/api/accounts-api.ts +540 -0
- package/api/action-types-api.ts +697 -0
- package/api/actions-api.ts +786 -0
- package/api/app-connections-api.ts +556 -0
- package/api/available-apps-api.ts +239 -0
- package/api/data-fields-api.ts +404 -0
- package/api/events-api.ts +172 -0
- package/api/executions-api.ts +361 -0
- package/api/installed-apps-api.ts +410 -0
- package/api/payments-api.ts +172 -0
- package/api/triggers-api.ts +437 -0
- package/api/users-api.ts +531 -0
- package/api/workflows-api.ts +1302 -0
- package/api.ts +30 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api/accounts-api.d.ts +124 -3
- package/dist/api/accounts-api.js +182 -1
- package/dist/api/action-types-api.d.ts +16 -11
- package/dist/api/action-types-api.js +14 -7
- package/dist/api/actions-api.d.ts +6 -6
- package/dist/api/app-connections-api.d.ts +5 -5
- package/dist/api/available-apps-api.d.ts +2 -2
- package/dist/api/data-fields-api.d.ts +46 -2
- package/dist/api/data-fields-api.js +68 -0
- package/dist/api/events-api.d.ts +1 -1
- package/dist/api/executions-api.d.ts +3 -3
- package/dist/api/installed-apps-api.d.ts +4 -4
- package/dist/api/payments-api.d.ts +1 -1
- package/dist/api/triggers-api.d.ts +14 -14
- package/dist/api/triggers-api.js +12 -12
- package/dist/api/users-api.d.ts +14 -9
- package/dist/api/users-api.js +14 -7
- package/dist/api/workflows-api.d.ts +96 -15
- package/dist/api/workflows-api.js +125 -8
- package/dist/common.d.ts +1 -1
- package/dist/esm/api/accounts-api.d.ts +124 -3
- package/dist/esm/api/accounts-api.js +181 -0
- package/dist/esm/api/action-types-api.d.ts +16 -11
- package/dist/esm/api/action-types-api.js +14 -7
- package/dist/esm/api/actions-api.d.ts +6 -6
- package/dist/esm/api/app-connections-api.d.ts +5 -5
- package/dist/esm/api/available-apps-api.d.ts +2 -2
- package/dist/esm/api/data-fields-api.d.ts +46 -2
- package/dist/esm/api/data-fields-api.js +69 -1
- package/dist/esm/api/events-api.d.ts +1 -1
- package/dist/esm/api/executions-api.d.ts +3 -3
- package/dist/esm/api/installed-apps-api.d.ts +4 -4
- package/dist/esm/api/payments-api.d.ts +1 -1
- package/dist/esm/api/triggers-api.d.ts +14 -14
- package/dist/esm/api/triggers-api.js +12 -12
- package/dist/esm/api/users-api.d.ts +14 -9
- package/dist/esm/api/users-api.js +14 -7
- package/dist/esm/api/workflows-api.d.ts +96 -15
- package/dist/esm/api/workflows-api.js +124 -7
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/models/catch-hook-request.d.ts +25 -0
- package/dist/esm/models/create-action-type-request-form-draft-inner.d.ts +6 -0
- package/dist/esm/models/create-action-type-request.d.ts +12 -0
- package/dist/esm/models/create-workflow201-response.d.ts +58 -11
- package/dist/esm/models/create-workflow201-response.js +4 -0
- package/dist/esm/models/evaluate-expression-request.d.ts +32 -0
- package/dist/esm/models/evaluate-expression200-response.d.ts +24 -0
- package/dist/esm/models/export-configuration200-response-configuration.d.ts +16 -0
- package/dist/esm/models/export-configuration200-response.d.ts +25 -0
- package/dist/esm/models/index.d.ts +9 -0
- package/dist/esm/models/index.js +9 -0
- package/dist/esm/models/list-action-types200-response-collection-inner.d.ts +58 -0
- package/dist/esm/models/list-action-types200-response-collection-inner.js +9 -0
- package/dist/esm/models/list-data-fields200-response-collection-inner.d.ts +18 -0
- package/dist/esm/models/list-triggers200-response-collection-inner.d.ts +18 -0
- package/dist/esm/models/list-users200-response-collection-inner.d.ts +6 -6
- package/dist/esm/models/list-workflows200-response-collection-inner.d.ts +29 -5
- package/dist/esm/models/retrieve-account-usage200-response.d.ts +60 -0
- package/dist/esm/models/retrieve-account-usage200-response.js +14 -0
- package/dist/esm/models/retrieve-account200-response.d.ts +19 -1
- package/dist/esm/models/{api-v1-action-types-post-request-icon-draft.d.ts → update-account-request-action-type-categories-inner-icon.d.ts} +10 -10
- package/dist/esm/models/update-account-request-action-type-categories-inner-icon.js +14 -0
- package/dist/esm/models/update-account-request-action-type-categories-inner.d.ts +43 -0
- package/dist/esm/models/update-account-request-action-type-categories-inner.js +14 -0
- package/dist/esm/models/update-account-request.d.ts +13 -0
- package/dist/esm/models/update-action-type-request.d.ts +12 -0
- package/dist/esm/models/update-trigger-request.d.ts +30 -0
- package/dist/esm/models/update-trigger-request.js +14 -0
- package/dist/esm/models/update-workflow-request.d.ts +7 -1
- package/dist/esm/models/upsert-user-request.d.ts +6 -0
- package/dist/models/catch-hook-request.d.ts +25 -0
- package/dist/models/create-action-type-request-form-draft-inner.d.ts +6 -0
- package/dist/models/create-action-type-request.d.ts +12 -0
- package/dist/models/create-workflow201-response.d.ts +58 -11
- package/dist/models/create-workflow201-response.js +5 -1
- package/dist/models/evaluate-expression-request.d.ts +32 -0
- package/dist/models/evaluate-expression200-response.d.ts +24 -0
- package/dist/models/export-configuration200-response-configuration.d.ts +16 -0
- package/dist/models/export-configuration200-response.d.ts +25 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/dist/models/list-action-types200-response-collection-inner.d.ts +58 -0
- package/dist/models/list-action-types200-response-collection-inner.js +10 -1
- package/dist/models/list-data-fields200-response-collection-inner.d.ts +18 -0
- package/dist/models/list-triggers200-response-collection-inner.d.ts +18 -0
- package/dist/models/list-users200-response-collection-inner.d.ts +6 -6
- package/dist/models/list-workflows200-response-collection-inner.d.ts +29 -5
- package/dist/models/retrieve-account-usage200-response.d.ts +60 -0
- package/dist/models/retrieve-account-usage200-response.js +15 -0
- package/dist/models/retrieve-account200-response.d.ts +19 -1
- package/dist/{esm/models/retrieve-action-type404-response.d.ts → models/update-account-request-action-type-categories-inner-icon.d.ts} +12 -12
- package/dist/models/update-account-request-action-type-categories-inner-icon.js +15 -0
- package/dist/models/update-account-request-action-type-categories-inner.d.ts +43 -0
- package/dist/models/update-account-request-action-type-categories-inner.js +15 -0
- package/dist/models/update-account-request.d.ts +13 -0
- package/dist/models/update-action-type-request.d.ts +12 -0
- package/dist/models/update-trigger-request.d.ts +30 -0
- package/dist/models/update-trigger-request.js +15 -0
- package/dist/models/update-workflow-request.d.ts +7 -1
- package/dist/models/upsert-user-request.d.ts +6 -0
- package/git_push.sh +57 -0
- package/index.ts +111 -0
- package/models/catch-hook-request.ts +32 -0
- package/models/create-action-type-request-form-draft-inner.ts +88 -0
- package/{dist/models/api-v1-action-types-post-request-icon-draft.d.ts → models/create-action-type-request-icon-draft.ts} +12 -6
- package/{dist/models/api-v1-action-types-post-request.d.ts → models/create-action-type-request.ts} +49 -25
- package/{dist/models/retrieve-action-type404-response.d.ts → models/create-action-type422-response.ts} +13 -7
- package/{dist/esm/models/api-v1-app-connections-post-request.d.ts → models/create-app-connection-request.ts} +14 -8
- package/models/create-user-token-request.ts +38 -0
- package/models/create-user-token200-response.ts +30 -0
- package/models/create-workflow-request-template-draft-nodes-inner.ts +138 -0
- package/models/create-workflow-request-template-draft.ts +39 -0
- package/models/create-workflow-request.ts +75 -0
- package/{dist/esm/models/retrieve-workflow200-response.d.ts → models/create-workflow201-response.ts} +111 -60
- package/models/delete-action-type200-response.ts +30 -0
- package/{dist/esm/models/api-v1-action-types-post-request-form-draft-inner.js → models/delete-workflow200-response-one-of.ts} +18 -13
- package/models/delete-workflow200-response-one-of1.ts +30 -0
- package/models/delete-workflow200-response.ts +30 -0
- package/models/discard-workflow-draft-request.ts +36 -0
- package/models/evaluate-expression-request.ts +36 -0
- package/models/evaluate-expression200-response.ts +30 -0
- package/models/execute-workflow-request.ts +50 -0
- package/models/execute-workflow201-response.ts +126 -0
- package/models/export-configuration200-response-configuration.ts +23 -0
- package/models/export-configuration200-response.ts +33 -0
- package/models/import-configuration-request-schema.ts +24 -0
- package/models/import-configuration-request.ts +50 -0
- package/models/import-configuration201-response.ts +60 -0
- package/models/index.ts +70 -0
- package/models/install-app-request.ts +36 -0
- package/{dist/models/retrieve-installed-app200-response.d.ts → models/install-app201-response.ts} +28 -24
- package/models/list-action-types200-response-collection-inner.ts +325 -0
- package/models/list-action-types200-response-meta.ts +42 -0
- package/models/list-action-types200-response.ts +42 -0
- package/models/list-actions200-response-collection-inner.ts +150 -0
- package/models/list-actions200-response.ts +42 -0
- package/models/list-app-connections200-response-collection-inner.ts +72 -0
- package/models/list-app-connections200-response.ts +42 -0
- package/models/list-available-apps200-response-collection-inner.ts +72 -0
- package/models/list-available-apps200-response.ts +42 -0
- package/{dist/esm/models/clone-workflow201-response.js → models/list-data-fields-type-parameter.ts} +11 -5
- package/models/list-data-fields200-response-collection-inner.ts +108 -0
- package/models/list-data-fields200-response.ts +42 -0
- package/models/list-events200-response-collection-inner.ts +84 -0
- package/models/list-events200-response.ts +42 -0
- package/{dist/esm/models/retrieve-installed-app200-response.d.ts → models/list-installed-apps200-response-collection-inner.ts} +26 -28
- package/models/list-installed-apps200-response.ts +42 -0
- package/models/list-triggers200-response-collection-inner.ts +126 -0
- package/models/list-triggers200-response.ts +42 -0
- package/models/list-users200-response-collection-inner.ts +90 -0
- package/models/list-users200-response.ts +42 -0
- package/models/list-workflow-executions200-response.ts +42 -0
- package/models/list-workflow-versions200-response-collection-inner.ts +66 -0
- package/models/list-workflow-versions200-response.ts +42 -0
- package/{dist/models/retrieve-workflow200-response.d.ts → models/list-workflows200-response-collection-inner.ts} +76 -79
- package/models/list-workflows200-response.ts +42 -0
- package/models/publish-workflow-request.ts +30 -0
- package/models/retrieve-account-usage200-response.ts +66 -0
- package/models/retrieve-account200-response.ts +114 -0
- package/models/retrieve-available-app200-response.ts +78 -0
- package/models/retrieve-execution200-response.ts +138 -0
- package/models/retry-action-request.ts +38 -0
- package/models/stop-executions-request.ts +38 -0
- package/models/trigger-workflow-request.ts +54 -0
- package/models/update-account-request-action-type-categories-inner-icon.ts +42 -0
- package/models/update-account-request-action-type-categories-inner.ts +51 -0
- package/models/update-account-request-user-data-schema-inner.ts +54 -0
- package/models/update-account-request.ts +96 -0
- package/models/update-action-type-request.ts +48 -0
- package/models/update-installed-app-request.ts +30 -0
- package/models/update-trigger-request.ts +36 -0
- package/models/update-workflow-request.ts +93 -0
- package/models/upsert-user-request.ts +54 -0
- package/package.json +4 -6
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
- package/dist/esm/models/api-v1-action-types-post-request-form-draft-inner.d.ts +0 -75
- package/dist/esm/models/api-v1-action-types-post-request.d.ts +0 -105
- package/dist/esm/models/clone-workflow201-response.d.ts +0 -183
- package/dist/esm/models/retrieve-workflow200-response.js +0 -17
- package/dist/models/api-v1-action-types-post-request-form-draft-inner.d.ts +0 -75
- package/dist/models/api-v1-action-types-post-request-form-draft-inner.js +0 -28
- package/dist/models/api-v1-app-connections-post-request.d.ts +0 -42
- package/dist/models/clone-workflow201-response.d.ts +0 -183
- package/dist/models/clone-workflow201-response.js +0 -20
- package/dist/models/retrieve-workflow200-response.js +0 -20
- /package/dist/esm/models/{api-v1-action-types-post-request-icon-draft.js → catch-hook-request.js} +0 -0
- /package/dist/esm/models/{api-v1-action-types-post-request.js → evaluate-expression-request.js} +0 -0
- /package/dist/esm/models/{api-v1-app-connections-post-request.js → evaluate-expression200-response.js} +0 -0
- /package/dist/esm/models/{retrieve-action-type404-response.js → export-configuration200-response-configuration.js} +0 -0
- /package/dist/esm/models/{retrieve-installed-app200-response.js → export-configuration200-response.js} +0 -0
- /package/dist/models/{api-v1-action-types-post-request-icon-draft.js → catch-hook-request.js} +0 -0
- /package/dist/models/{api-v1-action-types-post-request.js → evaluate-expression-request.js} +0 -0
- /package/dist/models/{api-v1-app-connections-post-request.js → evaluate-expression200-response.js} +0 -0
- /package/dist/models/{retrieve-action-type404-response.js → export-configuration200-response-configuration.js} +0 -0
- /package/dist/models/{retrieve-installed-app200-response.js → export-configuration200-response.js} +0 -0
package/api.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* API V1
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export * from './api/accounts-api';
|
|
18
|
+
export * from './api/action-types-api';
|
|
19
|
+
export * from './api/actions-api';
|
|
20
|
+
export * from './api/app-connections-api';
|
|
21
|
+
export * from './api/available-apps-api';
|
|
22
|
+
export * from './api/data-fields-api';
|
|
23
|
+
export * from './api/events-api';
|
|
24
|
+
export * from './api/executions-api';
|
|
25
|
+
export * from './api/installed-apps-api';
|
|
26
|
+
export * from './api/payments-api';
|
|
27
|
+
export * from './api/triggers-api';
|
|
28
|
+
export * from './api/users-api';
|
|
29
|
+
export * from './api/workflows-api';
|
|
30
|
+
|
package/base.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* API V1
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from './configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
20
|
+
import globalAxios from 'axios';
|
|
21
|
+
|
|
22
|
+
export const BASE_PATH = "https://www.embedworkflow.com".replace(/\/+$/, "");
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export const COLLECTION_FORMATS = {
|
|
29
|
+
csv: ",",
|
|
30
|
+
ssv: " ",
|
|
31
|
+
tsv: "\t",
|
|
32
|
+
pipes: "|",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @interface RequestArgs
|
|
39
|
+
*/
|
|
40
|
+
export interface RequestArgs {
|
|
41
|
+
url: string;
|
|
42
|
+
options: RawAxiosRequestConfig;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class BaseAPI
|
|
49
|
+
*/
|
|
50
|
+
export class BaseAPI {
|
|
51
|
+
protected configuration: Configuration | undefined;
|
|
52
|
+
|
|
53
|
+
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
54
|
+
if (configuration) {
|
|
55
|
+
this.configuration = configuration;
|
|
56
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
* @class RequiredError
|
|
65
|
+
* @extends {Error}
|
|
66
|
+
*/
|
|
67
|
+
export class RequiredError extends Error {
|
|
68
|
+
constructor(public field: string, msg?: string) {
|
|
69
|
+
super(msg);
|
|
70
|
+
this.name = "RequiredError"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface ServerMap {
|
|
75
|
+
[key: string]: {
|
|
76
|
+
url: string,
|
|
77
|
+
description: string,
|
|
78
|
+
}[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @export
|
|
84
|
+
*/
|
|
85
|
+
export const operationServerMap: ServerMap = {
|
|
86
|
+
}
|
package/common.ts
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* API V1
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from "./configuration";
|
|
17
|
+
import type { RequestArgs } from "./base";
|
|
18
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
|
+
import { RequiredError } from "./base";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const DUMMY_BASE_URL = 'https://example.com'
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
33
|
+
if (paramValue === null || paramValue === undefined) {
|
|
34
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
*/
|
|
42
|
+
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
43
|
+
if (configuration && configuration.apiKey) {
|
|
44
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
45
|
+
? await configuration.apiKey(keyParamName)
|
|
46
|
+
: await configuration.apiKey;
|
|
47
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
56
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
57
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
66
|
+
if (configuration && configuration.accessToken) {
|
|
67
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
68
|
+
? await configuration.accessToken()
|
|
69
|
+
: await configuration.accessToken;
|
|
70
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
79
|
+
if (configuration && configuration.accessToken) {
|
|
80
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
81
|
+
? await configuration.accessToken(name, scopes)
|
|
82
|
+
: await configuration.accessToken;
|
|
83
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
88
|
+
if (parameter == null) return;
|
|
89
|
+
if (typeof parameter === "object") {
|
|
90
|
+
if (Array.isArray(parameter)) {
|
|
91
|
+
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
Object.keys(parameter).forEach(currentKey =>
|
|
95
|
+
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
if (urlSearchParams.has(key)) {
|
|
101
|
+
urlSearchParams.append(key, parameter);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
urlSearchParams.set(key, parameter);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @export
|
|
112
|
+
*/
|
|
113
|
+
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
114
|
+
const searchParams = new URLSearchParams(url.search);
|
|
115
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
116
|
+
url.search = searchParams.toString();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @export
|
|
122
|
+
*/
|
|
123
|
+
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
124
|
+
const nonString = typeof value !== 'string';
|
|
125
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
|
+
: nonString;
|
|
128
|
+
return needsSerialization
|
|
129
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
130
|
+
: (value || "");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @export
|
|
136
|
+
*/
|
|
137
|
+
export const toPathString = function (url: URL) {
|
|
138
|
+
return url.pathname + url.search + url.hash
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @export
|
|
144
|
+
*/
|
|
145
|
+
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
146
|
+
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
147
|
+
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
|
148
|
+
return axios.request<T, R>(axiosRequestArgs);
|
|
149
|
+
};
|
|
150
|
+
}
|
package/configuration.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* API V1
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export interface ConfigurationParameters {
|
|
17
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
21
|
+
basePath?: string;
|
|
22
|
+
serverIndex?: number;
|
|
23
|
+
baseOptions?: any;
|
|
24
|
+
formDataCtor?: new () => any;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class Configuration {
|
|
28
|
+
/**
|
|
29
|
+
* parameter for apiKey security
|
|
30
|
+
* @param name security name
|
|
31
|
+
* @memberof Configuration
|
|
32
|
+
*/
|
|
33
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
34
|
+
/**
|
|
35
|
+
* parameter for basic security
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof Configuration
|
|
39
|
+
*/
|
|
40
|
+
username?: string;
|
|
41
|
+
/**
|
|
42
|
+
* parameter for basic security
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Configuration
|
|
46
|
+
*/
|
|
47
|
+
password?: string;
|
|
48
|
+
/**
|
|
49
|
+
* parameter for oauth2 security
|
|
50
|
+
* @param name security name
|
|
51
|
+
* @param scopes oauth2 scope
|
|
52
|
+
* @memberof Configuration
|
|
53
|
+
*/
|
|
54
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
55
|
+
/**
|
|
56
|
+
* override base path
|
|
57
|
+
*
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof Configuration
|
|
60
|
+
*/
|
|
61
|
+
basePath?: string;
|
|
62
|
+
/**
|
|
63
|
+
* override server index
|
|
64
|
+
*
|
|
65
|
+
* @type {number}
|
|
66
|
+
* @memberof Configuration
|
|
67
|
+
*/
|
|
68
|
+
serverIndex?: number;
|
|
69
|
+
/**
|
|
70
|
+
* base options for axios calls
|
|
71
|
+
*
|
|
72
|
+
* @type {any}
|
|
73
|
+
* @memberof Configuration
|
|
74
|
+
*/
|
|
75
|
+
baseOptions?: any;
|
|
76
|
+
/**
|
|
77
|
+
* The FormData constructor that will be used to create multipart form data
|
|
78
|
+
* requests. You can inject this here so that execution environments that
|
|
79
|
+
* do not support the FormData class can still run the generated client.
|
|
80
|
+
*
|
|
81
|
+
* @type {new () => FormData}
|
|
82
|
+
*/
|
|
83
|
+
formDataCtor?: new () => any;
|
|
84
|
+
|
|
85
|
+
constructor(param: ConfigurationParameters = {}) {
|
|
86
|
+
this.apiKey = param.apiKey;
|
|
87
|
+
this.username = param.username;
|
|
88
|
+
this.password = param.password;
|
|
89
|
+
this.accessToken = param.accessToken;
|
|
90
|
+
this.basePath = param.basePath;
|
|
91
|
+
this.serverIndex = param.serverIndex;
|
|
92
|
+
this.baseOptions = param.baseOptions;
|
|
93
|
+
this.formDataCtor = param.formDataCtor;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check if the given MIME is a JSON MIME.
|
|
98
|
+
* JSON MIME examples:
|
|
99
|
+
* application/json
|
|
100
|
+
* application/json; charset=UTF8
|
|
101
|
+
* APPLICATION/JSON
|
|
102
|
+
* application/vnd.company+json
|
|
103
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
104
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
105
|
+
*/
|
|
106
|
+
public isJsonMime(mime: string): boolean {
|
|
107
|
+
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
108
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -12,15 +12,26 @@
|
|
|
12
12
|
import type { Configuration } from '../configuration';
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { ExportConfiguration200Response } from '../models';
|
|
15
16
|
import { ImportConfiguration201Response } from '../models';
|
|
16
17
|
import { ImportConfigurationRequest } from '../models';
|
|
17
18
|
import { RetrieveAccount200Response } from '../models';
|
|
19
|
+
import { RetrieveAccountUsage200Response } from '../models';
|
|
18
20
|
import { UpdateAccountRequest } from '../models';
|
|
19
21
|
/**
|
|
20
22
|
* AccountsApi - axios parameter creator
|
|
21
23
|
* @export
|
|
22
24
|
*/
|
|
23
25
|
export declare const AccountsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @summary Export configuration
|
|
29
|
+
* @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
|
|
30
|
+
* @param {Array<ExportConfigurationSectionsEnum>} [sections]
|
|
31
|
+
* @param {*} [options] Override http request option.
|
|
32
|
+
* @throws {RequiredError}
|
|
33
|
+
*/
|
|
34
|
+
exportConfiguration: (schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24
35
|
/**
|
|
25
36
|
*
|
|
26
37
|
* @summary Import configuration
|
|
@@ -36,6 +47,16 @@ export declare const AccountsApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
36
47
|
* @throws {RequiredError}
|
|
37
48
|
*/
|
|
38
49
|
retrieveAccount: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @summary Retrieve account usage
|
|
53
|
+
* @param {string} [startTime]
|
|
54
|
+
* @param {string} [endTime]
|
|
55
|
+
* @param {string} [userKey] User key to filter usage for a specific user
|
|
56
|
+
* @param {*} [options] Override http request option.
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
*/
|
|
59
|
+
retrieveAccountUsage: (startTime?: string, endTime?: string, userKey?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
39
60
|
/**
|
|
40
61
|
*
|
|
41
62
|
* @summary Update account
|
|
@@ -50,6 +71,15 @@ export declare const AccountsApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
50
71
|
* @export
|
|
51
72
|
*/
|
|
52
73
|
export declare const AccountsApiFp: (configuration?: Configuration) => {
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @summary Export configuration
|
|
77
|
+
* @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
|
|
78
|
+
* @param {Array<ExportConfigurationSectionsEnum>} [sections]
|
|
79
|
+
* @param {*} [options] Override http request option.
|
|
80
|
+
* @throws {RequiredError}
|
|
81
|
+
*/
|
|
82
|
+
exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExportConfiguration200Response>>;
|
|
53
83
|
/**
|
|
54
84
|
*
|
|
55
85
|
* @summary Import configuration
|
|
@@ -65,6 +95,16 @@ export declare const AccountsApiFp: (configuration?: Configuration) => {
|
|
|
65
95
|
* @throws {RequiredError}
|
|
66
96
|
*/
|
|
67
97
|
retrieveAccount(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RetrieveAccount200Response>>;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @summary Retrieve account usage
|
|
101
|
+
* @param {string} [startTime]
|
|
102
|
+
* @param {string} [endTime]
|
|
103
|
+
* @param {string} [userKey] User key to filter usage for a specific user
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RetrieveAccountUsage200Response>>;
|
|
68
108
|
/**
|
|
69
109
|
*
|
|
70
110
|
* @summary Update account
|
|
@@ -79,6 +119,15 @@ export declare const AccountsApiFp: (configuration?: Configuration) => {
|
|
|
79
119
|
* @export
|
|
80
120
|
*/
|
|
81
121
|
export declare const AccountsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* @summary Export configuration
|
|
125
|
+
* @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
|
|
126
|
+
* @param {Array<ExportConfigurationSectionsEnum>} [sections]
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: any): AxiosPromise<ExportConfiguration200Response>;
|
|
82
131
|
/**
|
|
83
132
|
*
|
|
84
133
|
* @summary Import configuration
|
|
@@ -94,6 +143,16 @@ export declare const AccountsApiFactory: (configuration?: Configuration, basePat
|
|
|
94
143
|
* @throws {RequiredError}
|
|
95
144
|
*/
|
|
96
145
|
retrieveAccount(options?: any): AxiosPromise<RetrieveAccount200Response>;
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @summary Retrieve account usage
|
|
149
|
+
* @param {string} [startTime]
|
|
150
|
+
* @param {string} [endTime]
|
|
151
|
+
* @param {string} [userKey] User key to filter usage for a specific user
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: any): AxiosPromise<RetrieveAccountUsage200Response>;
|
|
97
156
|
/**
|
|
98
157
|
*
|
|
99
158
|
* @summary Update account
|
|
@@ -109,6 +168,16 @@ export declare const AccountsApiFactory: (configuration?: Configuration, basePat
|
|
|
109
168
|
* @interface AccountsApi
|
|
110
169
|
*/
|
|
111
170
|
export interface AccountsApiInterface {
|
|
171
|
+
/**
|
|
172
|
+
*
|
|
173
|
+
* @summary Export configuration
|
|
174
|
+
* @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
|
|
175
|
+
* @param {Array<ExportConfigurationSectionsEnum>} [sections]
|
|
176
|
+
* @param {*} [options] Override http request option.
|
|
177
|
+
* @throws {RequiredError}
|
|
178
|
+
* @memberof AccountsApiInterface
|
|
179
|
+
*/
|
|
180
|
+
exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: RawAxiosRequestConfig): AxiosPromise<ExportConfiguration200Response>;
|
|
112
181
|
/**
|
|
113
182
|
*
|
|
114
183
|
* @summary Import configuration
|
|
@@ -126,6 +195,17 @@ export interface AccountsApiInterface {
|
|
|
126
195
|
* @memberof AccountsApiInterface
|
|
127
196
|
*/
|
|
128
197
|
retrieveAccount(options?: RawAxiosRequestConfig): AxiosPromise<RetrieveAccount200Response>;
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @summary Retrieve account usage
|
|
201
|
+
* @param {string} [startTime]
|
|
202
|
+
* @param {string} [endTime]
|
|
203
|
+
* @param {string} [userKey] User key to filter usage for a specific user
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
* @memberof AccountsApiInterface
|
|
207
|
+
*/
|
|
208
|
+
retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<RetrieveAccountUsage200Response>;
|
|
129
209
|
/**
|
|
130
210
|
*
|
|
131
211
|
* @summary Update account
|
|
@@ -143,6 +223,16 @@ export interface AccountsApiInterface {
|
|
|
143
223
|
* @extends {BaseAPI}
|
|
144
224
|
*/
|
|
145
225
|
export declare class AccountsApi extends BaseAPI implements AccountsApiInterface {
|
|
226
|
+
/**
|
|
227
|
+
*
|
|
228
|
+
* @summary Export configuration
|
|
229
|
+
* @param {ExportConfigurationSchemaFormatEnum} [schemaFormat]
|
|
230
|
+
* @param {Array<ExportConfigurationSectionsEnum>} [sections]
|
|
231
|
+
* @param {*} [options] Override http request option.
|
|
232
|
+
* @throws {RequiredError}
|
|
233
|
+
* @memberof AccountsApi
|
|
234
|
+
*/
|
|
235
|
+
exportConfiguration(schemaFormat?: ExportConfigurationSchemaFormatEnum, sections?: Array<ExportConfigurationSectionsEnum>, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ExportConfiguration200Response, any, {}>>;
|
|
146
236
|
/**
|
|
147
237
|
*
|
|
148
238
|
* @summary Import configuration
|
|
@@ -151,7 +241,7 @@ export declare class AccountsApi extends BaseAPI implements AccountsApiInterface
|
|
|
151
241
|
* @throws {RequiredError}
|
|
152
242
|
* @memberof AccountsApi
|
|
153
243
|
*/
|
|
154
|
-
importConfiguration(importConfigurationRequest?: ImportConfigurationRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ImportConfiguration201Response, any>>;
|
|
244
|
+
importConfiguration(importConfigurationRequest?: ImportConfigurationRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ImportConfiguration201Response, any, {}>>;
|
|
155
245
|
/**
|
|
156
246
|
*
|
|
157
247
|
* @summary Retrieve account
|
|
@@ -159,7 +249,18 @@ export declare class AccountsApi extends BaseAPI implements AccountsApiInterface
|
|
|
159
249
|
* @throws {RequiredError}
|
|
160
250
|
* @memberof AccountsApi
|
|
161
251
|
*/
|
|
162
|
-
retrieveAccount(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RetrieveAccount200Response, any>>;
|
|
252
|
+
retrieveAccount(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RetrieveAccount200Response, any, {}>>;
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @summary Retrieve account usage
|
|
256
|
+
* @param {string} [startTime]
|
|
257
|
+
* @param {string} [endTime]
|
|
258
|
+
* @param {string} [userKey] User key to filter usage for a specific user
|
|
259
|
+
* @param {*} [options] Override http request option.
|
|
260
|
+
* @throws {RequiredError}
|
|
261
|
+
* @memberof AccountsApi
|
|
262
|
+
*/
|
|
263
|
+
retrieveAccountUsage(startTime?: string, endTime?: string, userKey?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RetrieveAccountUsage200Response, any, {}>>;
|
|
163
264
|
/**
|
|
164
265
|
*
|
|
165
266
|
* @summary Update account
|
|
@@ -168,5 +269,25 @@ export declare class AccountsApi extends BaseAPI implements AccountsApiInterface
|
|
|
168
269
|
* @throws {RequiredError}
|
|
169
270
|
* @memberof AccountsApi
|
|
170
271
|
*/
|
|
171
|
-
updateAccount(updateAccountRequest?: UpdateAccountRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RetrieveAccount200Response, any>>;
|
|
272
|
+
updateAccount(updateAccountRequest?: UpdateAccountRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RetrieveAccount200Response, any, {}>>;
|
|
172
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* @export
|
|
276
|
+
*/
|
|
277
|
+
export declare const ExportConfigurationSchemaFormatEnum: {
|
|
278
|
+
readonly Yaml: "yaml";
|
|
279
|
+
readonly Json: "json";
|
|
280
|
+
};
|
|
281
|
+
export type ExportConfigurationSchemaFormatEnum = typeof ExportConfigurationSchemaFormatEnum[keyof typeof ExportConfigurationSchemaFormatEnum];
|
|
282
|
+
/**
|
|
283
|
+
* @export
|
|
284
|
+
*/
|
|
285
|
+
export declare const ExportConfigurationSectionsEnum: {
|
|
286
|
+
readonly ActionTypes: "action_types";
|
|
287
|
+
readonly Triggers: "triggers";
|
|
288
|
+
readonly Workflows: "workflows";
|
|
289
|
+
readonly Apps: "apps";
|
|
290
|
+
readonly UserDataSchema: "user_data_schema";
|
|
291
|
+
readonly AccountDataSchema: "account_data_schema";
|
|
292
|
+
};
|
|
293
|
+
export type ExportConfigurationSectionsEnum = typeof ExportConfigurationSectionsEnum[keyof typeof ExportConfigurationSectionsEnum];
|