@devopness/sdk-js 3.5.5 → 3.6.1

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.
Files changed (84) hide show
  1. package/dist/DevopnessApiClient.js +2 -2
  2. package/dist/api/generated/apis/actions-api.d.ts +3 -1
  3. package/dist/api/generated/apis/actions-api.js +18 -29
  4. package/dist/api/generated/apis/actions-logs-api.js +1 -2
  5. package/dist/api/generated/apis/applications-api.js +11 -20
  6. package/dist/api/generated/apis/applications-hooks-api.js +5 -8
  7. package/dist/api/generated/apis/applications-variables-api.js +6 -10
  8. package/dist/api/generated/apis/credentials-api.js +26 -46
  9. package/dist/api/generated/apis/credentials-repositories-api.js +6 -10
  10. package/dist/api/generated/apis/cron-jobs-api.js +10 -18
  11. package/dist/api/generated/apis/daemons-api.js +14 -26
  12. package/dist/api/generated/apis/environments-actions-api.d.ts +6 -2
  13. package/dist/api/generated/apis/environments-actions-api.js +15 -18
  14. package/dist/api/generated/apis/environments-api.js +5 -10
  15. package/dist/api/generated/apis/hook-requests-api.js +1 -2
  16. package/dist/api/generated/apis/hooks-api.js +4 -8
  17. package/dist/api/generated/apis/hooks-requests-api.js +5 -8
  18. package/dist/api/generated/apis/network-rules-api.js +10 -18
  19. package/dist/api/generated/apis/networks-api.js +13 -18
  20. package/dist/api/generated/apis/networks-subnets-api.js +8 -10
  21. package/dist/api/generated/apis/organizations-api.js +9 -16
  22. package/dist/api/generated/apis/pipelines-actions-api.js +6 -10
  23. package/dist/api/generated/apis/pipelines-api.js +9 -16
  24. package/dist/api/generated/apis/pipelines-hooks-api.js +6 -10
  25. package/dist/api/generated/apis/pipelines-steps-api.js +4 -8
  26. package/dist/api/generated/apis/projects-actions-api.js +5 -8
  27. package/dist/api/generated/apis/projects-api.js +11 -18
  28. package/dist/api/generated/apis/projects-apitokens-api.js +9 -16
  29. package/dist/api/generated/apis/projects-archived-environments-api.js +5 -8
  30. package/dist/api/generated/apis/projects-environments-api.js +6 -10
  31. package/dist/api/generated/apis/resource-events-api.js +6 -10
  32. package/dist/api/generated/apis/resource-links-api.js +12 -20
  33. package/dist/api/generated/apis/roles-api.js +9 -16
  34. package/dist/api/generated/apis/servers-api.js +19 -38
  35. package/dist/api/generated/apis/services-api.js +15 -28
  36. package/dist/api/generated/apis/services-variables-api.js +6 -10
  37. package/dist/api/generated/apis/social-accounts-api.js +9 -16
  38. package/dist/api/generated/apis/sshkeys-api.js +10 -18
  39. package/dist/api/generated/apis/sslcertificates-api.js +9 -16
  40. package/dist/api/generated/apis/static-data-api.js +27 -52
  41. package/dist/api/generated/apis/subnets-api.js +7 -12
  42. package/dist/api/generated/apis/team-invitations-api.js +6 -12
  43. package/dist/api/generated/apis/teams-api.js +32 -60
  44. package/dist/api/generated/apis/teams-invitations-api.js +6 -10
  45. package/dist/api/generated/apis/teams-members-api.js +7 -12
  46. package/dist/api/generated/apis/users-api.js +12 -24
  47. package/dist/api/generated/apis/users-environments-api.js +6 -8
  48. package/dist/api/generated/apis/users-passwords-api.js +2 -4
  49. package/dist/api/generated/apis/users-personal-access-tokens-api.js +9 -16
  50. package/dist/api/generated/apis/users-projects-api.js +6 -8
  51. package/dist/api/generated/apis/users-team-invitations-api.js +5 -8
  52. package/dist/api/generated/apis/variables-api.js +11 -16
  53. package/dist/api/generated/apis/virtual-hosts-api.js +11 -20
  54. package/dist/api/generated/models/application-apply-template-response.d.ts +1 -1
  55. package/dist/api/generated/models/application-environment-apply-template.d.ts +14 -2
  56. package/dist/api/generated/models/application-environment-create.d.ts +1 -1
  57. package/dist/api/generated/models/application-relation.d.ts +1 -1
  58. package/dist/api/generated/models/application-update.d.ts +1 -1
  59. package/dist/api/generated/models/application.d.ts +1 -1
  60. package/dist/api/generated/models/cloud-resource-instance-spec.d.ts +30 -0
  61. package/dist/api/generated/models/cloud-resource-instance-spec.js +14 -0
  62. package/dist/api/generated/models/cloud-service-settings-aws-ec2.d.ts +7 -0
  63. package/dist/api/generated/models/cloud-service-settings-azure-rm.d.ts +7 -0
  64. package/dist/api/generated/models/cloud-service-settings-digital-ocean-droplet.d.ts +7 -0
  65. package/dist/api/generated/models/cloud-service-settings-gcp-gce.d.ts +7 -0
  66. package/dist/api/generated/models/cloud-service-settings-hetzner-hcloud.d.ts +7 -0
  67. package/dist/api/generated/models/cloud-service-settings-self-hosted-custom.d.ts +7 -0
  68. package/dist/api/generated/models/index.d.ts +4 -0
  69. package/dist/api/generated/models/index.js +4 -0
  70. package/dist/api/generated/models/list-actions-filter-parameter.d.ts +60 -0
  71. package/dist/api/generated/models/list-actions-filter-parameter.js +14 -0
  72. package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.d.ts +36 -0
  73. package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.js +14 -0
  74. package/dist/api/generated/models/list-environment-actions-filter-parameter.d.ts +42 -0
  75. package/dist/api/generated/models/list-environment-actions-filter-parameter.js +14 -0
  76. package/dist/api/generated/models/server-provision-input.d.ts +1 -1
  77. package/dist/api/generated/models/virtual-host-environment-create.d.ts +2 -2
  78. package/dist/api/generated/models/virtual-host-relation.d.ts +1 -1
  79. package/dist/api/generated/models/virtual-host-update.d.ts +2 -2
  80. package/dist/api/generated/models/virtual-host.d.ts +1 -1
  81. package/dist/common/utils.d.ts +12 -0
  82. package/dist/common/utils.js +71 -0
  83. package/dist/services/ApiBaseService.d.ts +4 -4
  84. package/package.json +3 -3
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { CloudOsVersionCode } from './cloud-os-version-code';
13
+ import { CloudResourceInstanceSpec } from './cloud-resource-instance-spec';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -34,6 +35,12 @@ export interface CloudServiceSettingsDigitalOceanDroplet {
34
35
  * @memberof CloudServiceSettingsDigitalOceanDroplet
35
36
  */
36
37
  region_human_readable?: string;
38
+ /**
39
+ *
40
+ * @type {CloudResourceInstanceSpec}
41
+ * @memberof CloudServiceSettingsDigitalOceanDroplet
42
+ */
43
+ instance_spec?: CloudResourceInstanceSpec;
37
44
  /**
38
45
  *
39
46
  * @type {CloudOsVersionCode}
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { CloudOsVersionCode } from './cloud-os-version-code';
13
+ import { CloudResourceInstanceSpec } from './cloud-resource-instance-spec';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -34,6 +35,12 @@ export interface CloudServiceSettingsGcpGce {
34
35
  * @memberof CloudServiceSettingsGcpGce
35
36
  */
36
37
  region_human_readable?: string;
38
+ /**
39
+ *
40
+ * @type {CloudResourceInstanceSpec}
41
+ * @memberof CloudServiceSettingsGcpGce
42
+ */
43
+ instance_spec?: CloudResourceInstanceSpec;
37
44
  /**
38
45
  *
39
46
  * @type {CloudOsVersionCode}
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { CloudOsVersionCode } from './cloud-os-version-code';
13
+ import { CloudResourceInstanceSpec } from './cloud-resource-instance-spec';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -34,6 +35,12 @@ export interface CloudServiceSettingsHetznerHcloud {
34
35
  * @memberof CloudServiceSettingsHetznerHcloud
35
36
  */
36
37
  region_human_readable?: string;
38
+ /**
39
+ *
40
+ * @type {CloudResourceInstanceSpec}
41
+ * @memberof CloudServiceSettingsHetznerHcloud
42
+ */
43
+ instance_spec?: CloudResourceInstanceSpec;
37
44
  /**
38
45
  * The storage\'s size of the cloud instance
39
46
  * @type {number}
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { CloudOsVersionCode } from './cloud-os-version-code';
13
+ import { CloudResourceInstanceSpec } from './cloud-resource-instance-spec';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -22,4 +23,10 @@ export interface CloudServiceSettingsSelfHostedCustom {
22
23
  * @memberof CloudServiceSettingsSelfHostedCustom
23
24
  */
24
25
  os_version_code: CloudOsVersionCode | null;
26
+ /**
27
+ *
28
+ * @type {CloudResourceInstanceSpec}
29
+ * @memberof CloudServiceSettingsSelfHostedCustom
30
+ */
31
+ instance_spec?: CloudResourceInstanceSpec;
25
32
  }
@@ -62,6 +62,7 @@ export * from './cloud-provider-service-resource-type';
62
62
  export * from './cloud-provider-service-resource-type-scope';
63
63
  export * from './cloud-provider-settings';
64
64
  export * from './cloud-provider-settings-list';
65
+ export * from './cloud-resource-instance-spec';
65
66
  export * from './cloud-resource-type';
66
67
  export * from './cloud-service-settings-aws-ec2';
67
68
  export * from './cloud-service-settings-azure-rm';
@@ -139,6 +140,9 @@ export * from './language-runtime-framework-commands';
139
140
  export * from './language-runtime-framework-defaults';
140
141
  export * from './linked-resource-data';
141
142
  export * from './linked-resource-summary-field';
143
+ export * from './list-actions-filter-parameter';
144
+ export * from './list-environment-actions-by-resource-type-filter-parameter';
145
+ export * from './list-environment-actions-filter-parameter';
142
146
  export * from './log';
143
147
  export * from './member';
144
148
  export * from './member-relation';
@@ -78,6 +78,7 @@ __exportStar(require("./cloud-provider-service-resource-type"), exports);
78
78
  __exportStar(require("./cloud-provider-service-resource-type-scope"), exports);
79
79
  __exportStar(require("./cloud-provider-settings"), exports);
80
80
  __exportStar(require("./cloud-provider-settings-list"), exports);
81
+ __exportStar(require("./cloud-resource-instance-spec"), exports);
81
82
  __exportStar(require("./cloud-resource-type"), exports);
82
83
  __exportStar(require("./cloud-service-settings-aws-ec2"), exports);
83
84
  __exportStar(require("./cloud-service-settings-azure-rm"), exports);
@@ -155,6 +156,9 @@ __exportStar(require("./language-runtime-framework-commands"), exports);
155
156
  __exportStar(require("./language-runtime-framework-defaults"), exports);
156
157
  __exportStar(require("./linked-resource-data"), exports);
157
158
  __exportStar(require("./linked-resource-summary-field"), exports);
159
+ __exportStar(require("./list-actions-filter-parameter"), exports);
160
+ __exportStar(require("./list-environment-actions-by-resource-type-filter-parameter"), exports);
161
+ __exportStar(require("./list-environment-actions-filter-parameter"), exports);
158
162
  __exportStar(require("./log"), exports);
159
163
  __exportStar(require("./member"), exports);
160
164
  __exportStar(require("./member-relation"), exports);
@@ -0,0 +1,60 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ListActionsFilterParameter
16
+ */
17
+ export interface ListActionsFilterParameter {
18
+ /**
19
+ * Organization ID. Example: `?filter[organization_id]=123`
20
+ * @type {number}
21
+ * @memberof ListActionsFilterParameter
22
+ */
23
+ organization_id?: number;
24
+ /**
25
+ * Project ID. Example: `?filter[project_id]=456`
26
+ * @type {number}
27
+ * @memberof ListActionsFilterParameter
28
+ */
29
+ project_id?: number;
30
+ /**
31
+ * Environment ID. Example: `?filter[environment_id]=789`
32
+ * @type {number}
33
+ * @memberof ListActionsFilterParameter
34
+ */
35
+ environment_id?: number;
36
+ /**
37
+ * Resource type. Example: `?filter[resource_type]=application`
38
+ * @type {string}
39
+ * @memberof ListActionsFilterParameter
40
+ */
41
+ resource_type?: string;
42
+ /**
43
+ * Resource ID. Example: `?filter[resource_id]=321`
44
+ * @type {number}
45
+ * @memberof ListActionsFilterParameter
46
+ */
47
+ resource_id?: number;
48
+ /**
49
+ * Action status. Supported values: pending, waiting, skipped, queued, in-progress, completed, failed. Example: `?filter[status]=queued`
50
+ * @type {string}
51
+ * @memberof ListActionsFilterParameter
52
+ */
53
+ status?: string;
54
+ /**
55
+ * Action operation name. Example: `?filter[operation]=deploy`
56
+ * @type {string}
57
+ * @memberof ListActionsFilterParameter
58
+ */
59
+ operation?: string;
60
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,36 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ListEnvironmentActionsByResourceTypeFilterParameter
16
+ */
17
+ export interface ListEnvironmentActionsByResourceTypeFilterParameter {
18
+ /**
19
+ * Resource ID. Example: `?filter[resource_id]=321`
20
+ * @type {number}
21
+ * @memberof ListEnvironmentActionsByResourceTypeFilterParameter
22
+ */
23
+ resource_id?: number;
24
+ /**
25
+ * Action status. Supported values: pending, waiting, skipped, queued, in-progress, completed, failed. Example: `?filter[status]=queued`
26
+ * @type {string}
27
+ * @memberof ListEnvironmentActionsByResourceTypeFilterParameter
28
+ */
29
+ status?: string;
30
+ /**
31
+ * Action operation name. Example: `?filter[operation]=deploy`
32
+ * @type {string}
33
+ * @memberof ListEnvironmentActionsByResourceTypeFilterParameter
34
+ */
35
+ operation?: string;
36
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,42 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ListEnvironmentActionsFilterParameter
16
+ */
17
+ export interface ListEnvironmentActionsFilterParameter {
18
+ /**
19
+ * Resource type. Example: `?filter[resource_type]=application`
20
+ * @type {string}
21
+ * @memberof ListEnvironmentActionsFilterParameter
22
+ */
23
+ resource_type?: string;
24
+ /**
25
+ * Resource ID. Example: `?filter[resource_id]=321`
26
+ * @type {number}
27
+ * @memberof ListEnvironmentActionsFilterParameter
28
+ */
29
+ resource_id?: number;
30
+ /**
31
+ * Action status. Supported values: pending, waiting, skipped, queued, in-progress, completed, failed. Example: `?filter[status]=queued`
32
+ * @type {string}
33
+ * @memberof ListEnvironmentActionsFilterParameter
34
+ */
35
+ status?: string;
36
+ /**
37
+ * Action operation name. Example: `?filter[operation]=deploy`
38
+ * @type {string}
39
+ * @memberof ListEnvironmentActionsFilterParameter
40
+ */
41
+ operation?: string;
42
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -35,7 +35,7 @@ export interface ServerProvisionInput {
35
35
  */
36
36
  cloud_service_code: ServerCloudServiceCode;
37
37
  /**
38
- * The configurations used to cloud service
38
+ * Configuration used to provision the cloud resource.
39
39
  * @type {CloudServiceSettingsAwsEc2 | CloudServiceSettingsAzureRm | CloudServiceSettingsDigitalOceanDroplet | CloudServiceSettingsGcpGce | CloudServiceSettingsHetznerHcloud | CloudServiceSettingsSelfHostedCustom}
40
40
  * @memberof ServerProvisionInput
41
41
  */
@@ -35,7 +35,7 @@ export interface VirtualHostEnvironmentCreate {
35
35
  */
36
36
  name: string;
37
37
  /**
38
- * The document root location, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host. Must not be greater than 255 characters.
38
+ * The document root location to be served for this virtual host. When the virtual host is linked to an application, the value must be a relative path within that application directory. When no application is linked, the value must be an absolute path. Must start with one of <code>/</code> Must not be greater than 255 characters.
39
39
  * @type {string}
40
40
  * @memberof VirtualHostEnvironmentCreate
41
41
  */
@@ -47,7 +47,7 @@ export interface VirtualHostEnvironmentCreate {
47
47
  */
48
48
  application_listen_address?: string | null;
49
49
  /**
50
- * The ID of the application to be associated with the virtual host. The value of `root_directory` will be relative to this application directory.
50
+ * The ID of the application to be associated with the virtual host. When set, the value of `root_directory` will be relative to this application directory.
51
51
  * @type {number}
52
52
  * @memberof VirtualHostEnvironmentCreate
53
53
  */
@@ -51,7 +51,7 @@ export interface VirtualHostRelation {
51
51
  */
52
52
  application: ApplicationRelation | null;
53
53
  /**
54
- * The document root location, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host
54
+ * The document root location served by this virtual host. When the virtual host is linked to an application, the value is relative to that application directory. When no application is linked, the value is an absolute path
55
55
  * @type {string}
56
56
  * @memberof VirtualHostRelation
57
57
  */
@@ -28,7 +28,7 @@ export interface VirtualHostUpdate {
28
28
  */
29
29
  name: string;
30
30
  /**
31
- * The document root location, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host. Must not be greater than 255 characters.
31
+ * The document root location to be served for this virtual host. When the virtual host is linked to an application, the value must be a relative path within that application directory. When no application is linked, the value must be an absolute path. Must start with one of <code>/</code> Must not be greater than 255 characters.
32
32
  * @type {string}
33
33
  * @memberof VirtualHostUpdate
34
34
  */
@@ -40,7 +40,7 @@ export interface VirtualHostUpdate {
40
40
  */
41
41
  application_listen_address?: string | null;
42
42
  /**
43
- * The ID of the application to be associated with the virtual host. The value of `root_directory` will be relative to this application directory.
43
+ * The ID of the application to be associated with the virtual host. When set, the value of `root_directory` will be relative to this application directory.
44
44
  * @type {number}
45
45
  * @memberof VirtualHostUpdate
46
46
  */
@@ -51,7 +51,7 @@ export interface VirtualHost {
51
51
  */
52
52
  application: ApplicationRelation | null;
53
53
  /**
54
- * The document root location, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host
54
+ * The document root location served by this virtual host. When the virtual host is linked to an application, the value is relative to that application directory. When no application is linked, the value is an absolute path
55
55
  * @type {string}
56
56
  * @memberof VirtualHost
57
57
  */
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Devopness API TypeScript SDK - Painless essential DevOps to everyone
3
+ */
4
+ type QueryStringParam = unknown;
5
+ /**
6
+ * Returns the query string from the given query parameters.
7
+ *
8
+ * @param inParams The query parameters.
9
+ * @returns The query string.
10
+ */
11
+ export declare function parseQueryString(inParams?: Record<string, QueryStringParam>): string;
12
+ export {};
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /**
3
+ * Devopness API TypeScript SDK - Painless essential DevOps to everyone
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parseQueryString = parseQueryString;
7
+ /**
8
+ * Returns the query string from the given query parameters.
9
+ *
10
+ * @param inParams The query parameters.
11
+ * @returns The query string.
12
+ */
13
+ function parseQueryString(inParams = {}) {
14
+ const outParams = {};
15
+ for (const key of Object.keys(inParams)) {
16
+ const value = inParams[key];
17
+ if (isEmpty(value)) {
18
+ continue;
19
+ }
20
+ if (key === "filter") {
21
+ Object.assign(outParams, parseFilterQueryString(value));
22
+ continue;
23
+ }
24
+ outParams[key] = value;
25
+ }
26
+ const searchParams = new URLSearchParams();
27
+ for (const key of Object.keys(outParams)) {
28
+ searchParams.append(key, String(outParams[key]));
29
+ }
30
+ return searchParams.toString();
31
+ }
32
+ /**
33
+ * Returns the query string from the given filter parameters.
34
+ *
35
+ * @param filterParam The filter parameters.
36
+ * @returns The filter query string parameters.
37
+ */
38
+ function parseFilterQueryString(filterParam) {
39
+ const outParams = {};
40
+ if (typeof filterParam !== "object" || filterParam === null || Array.isArray(filterParam)) {
41
+ return outParams;
42
+ }
43
+ const params = filterParam;
44
+ for (const key of Object.keys(params)) {
45
+ const value = params[key];
46
+ if (isEmpty(value)) {
47
+ continue;
48
+ }
49
+ const filterKey = `filter[${key}]`;
50
+ const filterValue = String(value);
51
+ outParams[filterKey] = filterValue;
52
+ }
53
+ return outParams;
54
+ }
55
+ /**
56
+ * Return whether a query parameter value should be omitted.
57
+ *
58
+ * @param value The query parameter value.
59
+ * @returns Whether the query parameter value should be omitted.
60
+ */
61
+ function isEmpty(value) {
62
+ return (value === undefined ||
63
+ value === null ||
64
+ value === false ||
65
+ value === "" ||
66
+ (Array.isArray(value) && value.length === 0) ||
67
+ (typeof value === "object" &&
68
+ value !== null &&
69
+ !Array.isArray(value) &&
70
+ Object.keys(value).length === 0));
71
+ }
@@ -33,8 +33,8 @@ export declare class ApiBaseService {
33
33
  */
34
34
  private static decodeJwtPayload;
35
35
  baseURL(): string;
36
- protected post<T, B = undefined, R = AxiosResponse<T>>(endpoint: string, data?: B): Promise<R>;
37
- protected put<T, B = undefined, R = AxiosResponse<T>>(endpoint: string, data?: B): Promise<R>;
38
- protected delete<T, R = AxiosResponse<T>>(endpoint: string): Promise<R>;
39
- protected get<T, R = AxiosResponse<T>>(endpoint: string): Promise<R>;
36
+ protected post<T, B = undefined>(endpoint: string, data?: B): Promise<AxiosResponse<T>>;
37
+ protected put<T, B = undefined>(endpoint: string, data?: B): Promise<AxiosResponse<T>>;
38
+ protected delete<T>(endpoint: string): Promise<AxiosResponse<T>>;
39
+ protected get<T>(endpoint: string): Promise<AxiosResponse<T>>;
40
40
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@devopness/sdk-js",
4
- "version": "3.5.5",
4
+ "version": "3.6.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -64,13 +64,13 @@
64
64
  "@openapitools/openapi-generator-cli": "^2.40.1",
65
65
  "axios-mock-adapter": "^2.1.0",
66
66
  "husky": "9.1.7",
67
- "vite-plus": "0.2.6",
67
+ "vite-plus": "0.2.9",
68
68
  "typescript": "^7.0.2",
69
69
  "typedoc": "^0.28.20"
70
70
  },
71
71
  "dependencies": {
72
72
  "@types/parse-link-header": "^2.0.3",
73
- "axios": "^1.18.1",
73
+ "axios": "^1.19.0",
74
74
  "parse-link-header": "^2.0.0"
75
75
  }
76
76
  }