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

@dynatrace-sdk/client-app-settings

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynatrace-sdk/client-app-settings - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # App Settings

## 1.2.3
### Patch Changes
- Update http-client
- Sanitize links in the documentation
- Add API reference to the readme file
## 1.2.2

@@ -7,0 +15,0 @@

16

cjs/index.js

@@ -540,11 +540,21 @@ /**

};
var addArrayQueryParam = (query, key) => {
var addExplodedArrayQueryParam = (query, key) => {
const arrayValue = query[key];
return arrayValue.map((value) => encodeQueryParam(key, value)).join("&");
};
var addNonExplodedArrayQueryParams = (query, key) => {
const encodedKey = encodeURIComponent(key);
const encodedParamsList = query[key].map((value) => encodeURIComponent(typeof value === "number" ? value : String(value))).join(",");
return `${encodedKey}=${encodedParamsList}`;
};
var addQueryParam = (query, key) => encodeQueryParam(key, query[key]);
var toQueryString = (rawQuery) => {
var arrayQueryParams = (query, key, explode) => {
return explode ? addExplodedArrayQueryParam(query, key) : addNonExplodedArrayQueryParams(query, key);
};
var toQueryString = (rawQuery, flags = {}) => {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => typeof query[key] !== "undefined");
const queryString = keys.map((key) => Array.isArray(query[key]) ? addArrayQueryParam(query, key) : addQueryParam(query, key)).join("&");
const queryString = keys.map(
(key) => Array.isArray(query[key]) ? arrayQueryParams(query, key, flags.explode?.hasOwnProperty(key) ? flags.explode[key] : true) : addQueryParam(query, key)
).join("&");
return queryString ? `?${queryString}` : "";

@@ -551,0 +561,0 @@ };

351

docs/DOCS.md

@@ -10,15 +10,10 @@ ---

import NpmLogo from "@site/static/img/npm-logo.png";
import NpmLogo from '@site/static/img/npm-logo.png';
<div class="row margin-bottom--md">
<div class="col">
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-settings">
<span class="margin-right--xs">@dynatrace-sdk/client-app-settings</span>
<img className="no-zoom" width="20px" src={NpmLogo} />
</a>
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-settings" target="_blank" rel="noopener noreferrer"> <span class="margin-right--xs">@dynatrace-sdk/client-app-settings</span> <img className="no-zoom" width="20px" src={NpmLogo} /> </a>
</div>
<div class="col" style={{ textAlign: "right" }}>
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-settings/v/1.2.2">
v1.2.2
</a>
<div class="col" style={{textAlign: 'right'}}>
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-settings/v/1.2.3" target="_blank" rel="noopener noreferrer">v1.2.3</a>
</div>

@@ -34,5 +29,6 @@ </div>

```js
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
import { appSettingsObjectsClient } from '@dynatrace-sdk/client-app-settings';
```
### deleteAppSettingsObjectByObjectId

@@ -50,13 +46,18 @@

</div>
#### Parameters
| Name | Type | Description |
| ---------------------------------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config.objectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The ID of the required settings object. |
| config.optimisticLockingVersion<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
| Name | Type| Description|
|---|---|---|
|config.objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the required settings object. |
|config.optimisticLockingVersion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
{/* no returns */}
<details>

@@ -71,6 +72,6 @@ <summary>

const data = await appSettingsObjectsClient.deleteAppSettingsObjectByObjectId({
objectId: "...",
optimisticLockingVersion: "...",
});
const data =
await appSettingsObjectsClient.deleteAppSettingsObjectByObjectId(
{ objectId: "...", optimisticLockingVersion: "..." },
);
```

@@ -80,8 +81,11 @@

</div>
### getAppSettingsObjectByObjectId
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.getAppSettingsObjectByObjectId(config): Promise&lt;<a href="#appsettingsobject">AppSettingsObject</a>&gt;</strong>
<strong>appSettingsObjectsClient.getAppSettingsObjectByObjectId(config): Promise&lt;[AppSettingsObject](#appsettingsobject)&gt;</strong>

@@ -97,10 +101,16 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type | Description |
| ------------------------------------ | ----------------------------------------------------------------------------- | --------------------------------------- |
| config.objectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The ID of the required settings object. |
| Name | Type| Description|
|---|---|---|
|config.objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the required settings object. |
#### Returns

@@ -110,2 +120,3 @@

<details>

@@ -120,5 +131,6 @@ <summary>

const data = await appSettingsObjectsClient.getAppSettingsObjectByObjectId({
objectId: "...",
});
const data =
await appSettingsObjectsClient.getAppSettingsObjectByObjectId(
{ objectId: "..." },
);
```

@@ -128,8 +140,11 @@

</div>
### getAppSettingsObjects
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.getAppSettingsObjects(config): Promise&lt;<a href="#appsettingsobjectslist">AppSettingsObjectsList</a>&gt;</strong>
<strong>appSettingsObjectsClient.getAppSettingsObjects(config): Promise&lt;[AppSettingsObjectsList](#appsettingsobjectslist)&gt;</strong>

@@ -151,13 +166,19 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type | Description |
| ---------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config.addFields | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>A list of fields to be included to the response. The provided set of fields extends the default set.</p> <p>Specify the required top-level fields, separated by commas (for example, <strong>summary,value</strong>).</p> <p>Supported fields: <strong>objectId</strong>, <strong>version</strong>, <strong>summary</strong>, <strong>searchSummary</strong>, <strong>schemaId</strong>, <strong>schemaVersion</strong>, <strong>modificationInfo</strong>, <strong>value</strong>.</p> <p>Default fields: objectId, version.</p> <i>default:</i> <code>"objectId, version"</code> |
| config.pageKey | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The cursor for the next page of results. You can find it in the <strong>nextPageKey</strong> field of the previous response.</p> <p>The first page is always returned if you don't specify the <strong>page-key</strong> query parameter.</p> <p>When the <strong>page-key</strong> is set to obtain subsequent pages, you must omit all other query parameters.</p> |
| config.pageSize | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | <p>The amount of settings objects in a single response payload.</p> <p>The maximal allowed page size is 500.</p> <p>If not set, 100 is used.</p> |
| config.schemaIds | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>A list of comma-separated schema IDs to which the requested objects belong.</p> <p>To load the first page, when the <strong>nextPageKey</strong> is not set, this parameter is required.</p> |
| Name | Type| Description|
|---|---|---|
|config.addFields|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of fields to be included to the response. The provided set of fields extends the default set.</p> <p>Specify the required top-level fields, separated by commas (for example, <strong>summary,value</strong>).</p> <p>Supported fields: <strong>objectId</strong>, <strong>version</strong>, <strong>summary</strong>, <strong>searchSummary</strong>, <strong>schemaId</strong>, <strong>schemaVersion</strong>, <strong>modificationInfo</strong>, <strong>value</strong>.</p> <p>Default fields: objectId, version.</p> <i>default:</i> <code>"objectId, version"</code>|
|config.pageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. You can find it in the <strong>nextPageKey</strong> field of the previous response.</p> <p>The first page is always returned if you don't specify the <strong>page-key</strong> query parameter.</p> <p>When the <strong>page-key</strong> is set to obtain subsequent pages, you must omit all other query parameters.</p> |
|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|<p>The amount of settings objects in a single response payload.</p> <p>The maximal allowed page size is 500.</p> <p>If not set, 100 is used.</p> |
|config.schemaIds|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of comma-separated schema IDs to which the requested objects belong.</p> <p>To load the first page, when the <strong>nextPageKey</strong> is not set, this parameter is required.</p> |
#### Returns

@@ -167,2 +188,3 @@

<details>

@@ -177,3 +199,4 @@ <summary>

const data = await appSettingsObjectsClient.getAppSettingsObjects();
const data =
await appSettingsObjectsClient.getAppSettingsObjects();
```

@@ -183,8 +206,11 @@

</div>
### getEffectiveAppSettingsValues
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.getEffectiveAppSettingsValues(config): Promise&lt;<a href="#effectiveappsettingsvalueslist">EffectiveAppSettingsValuesList</a>&gt;</strong>
<strong>appSettingsObjectsClient.getEffectiveAppSettingsValues(config): Promise&lt;[EffectiveAppSettingsValuesList](#effectiveappsettingsvalueslist)&gt;</strong>

@@ -199,17 +225,23 @@ <div class="padding-left--md">

Lists effective settings values for selected schemas.
If no object is persisted for a schema with **"multiObject": false**, the default value as defined in the schema will be returned.
If no object is persisted for a schema with **&quot;multiObject&quot;: false**, the default value as defined in the schema will be returned.
Properties of type **secret** will be included in plain text if the call originates from a serverless function of your app; they will have irreversibly masked values otherwise. This protects these secrets from leaking to users of your app or other third parties.
</div>
#### Parameters
| Name | Type | Description |
| ---------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config.addFields | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>A list of fields to be included to the response. The provided set of fields extends the default set.</p> <p>Specify the required top-level fields, separated by commas (for example, <strong>summary,schemaId</strong>).</p> <p>Supported fields: <strong>summary</strong>, <strong>searchSummary</strong>, <strong>schemaId</strong>, <strong>schemaVersion</strong>, <strong>modificationInfo</strong>, <strong>value</strong>.</p> <p>Default fields: value.</p> <i>default:</i> <code>"value"</code> |
| config.pageKey | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The cursor for the next page of results. You can find it in the <strong>nextPageKey</strong> field of the previous response.</p> <p>The first page is always returned if you don't specify the <strong>page-key</strong> query parameter.</p> <p>When the <strong>page-key</strong> is set to obtain subsequent pages, you must omit all other query parameters.</p> |
| config.pageSize | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | <p>The amount of settings objects in a single response payload.</p> <p>The maximal allowed page size is 500.</p> <p>If not set, 100 is used.</p> |
| config.schemaIds | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>A list of comma-separated schema IDs to which the requested objects belong.</p> <p>Only considered on load of the first page, when the <strong>nextPageKey</strong> is not set.</p> |
| Name | Type| Description|
|---|---|---|
|config.addFields|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of fields to be included to the response. The provided set of fields extends the default set.</p> <p>Specify the required top-level fields, separated by commas (for example, <strong>summary,schemaId</strong>).</p> <p>Supported fields: <strong>summary</strong>, <strong>searchSummary</strong>, <strong>schemaId</strong>, <strong>schemaVersion</strong>, <strong>modificationInfo</strong>, <strong>value</strong>.</p> <p>Default fields: value.</p> <i>default:</i> <code>"value"</code>|
|config.pageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. You can find it in the <strong>nextPageKey</strong> field of the previous response.</p> <p>The first page is always returned if you don't specify the <strong>page-key</strong> query parameter.</p> <p>When the <strong>page-key</strong> is set to obtain subsequent pages, you must omit all other query parameters.</p> |
|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|<p>The amount of settings objects in a single response payload.</p> <p>The maximal allowed page size is 500.</p> <p>If not set, 100 is used.</p> |
|config.schemaIds|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of comma-separated schema IDs to which the requested objects belong.</p> <p>Only considered on load of the first page, when the <strong>nextPageKey</strong> is not set.</p> |
#### Returns

@@ -219,2 +251,3 @@

<details>

@@ -229,3 +262,4 @@ <summary>

const data = await appSettingsObjectsClient.getEffectiveAppSettingsValues();
const data =
await appSettingsObjectsClient.getEffectiveAppSettingsValues();
```

@@ -235,8 +269,11 @@

</div>
### postAppSettingsObject
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.postAppSettingsObject(config): Promise&lt;void &#124; <a href="#appsettingsobjectresponse">AppSettingsObjectResponse</a>&gt;</strong>
<strong>appSettingsObjectsClient.postAppSettingsObject(config): Promise&lt;void &#124; [AppSettingsObjectResponse](#appsettingsobjectresponse)&gt;</strong>

@@ -252,11 +289,17 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type | Description |
| -------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| config.body<sup>\*required</sup> | <a href="#appsettingsobjectcreate">AppSettingsObjectCreate</a> | |
| config.validateOnly | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Boolean">boolean</a> | If <code>true</code>, the request runs only validation of the submitted settings objects, without saving them. <i>default:</i> <code>false</code> |
| Name | Type| Description|
|---|---|---|
|config.body<sup>*required</sup>|[AppSettingsObjectCreate](#appsettingsobjectcreate)| |
|config.validateOnly|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If <code>true</code>, the request runs only validation of the submitted settings objects, without saving them. <i>default:</i> <code>false</code>|
#### Returns

@@ -266,2 +309,3 @@

<details>

@@ -276,5 +320,6 @@ <summary>

const data = await appSettingsObjectsClient.postAppSettingsObject({
body: { schemaId: "jira-connection" },
});
const data =
await appSettingsObjectsClient.postAppSettingsObject({
body: { schemaId: "jira-connection" },
});
```

@@ -284,4 +329,7 @@

</div>
### putAppSettingsObjectByObjectId

@@ -301,16 +349,21 @@

Some schemas don't allow passing of the masked secret. In that case you need to send the unmasked secret with every update of the object.
Some schemas don&apos;t allow passing of the masked secret. In that case you need to send the unmasked secret with every update of the object.
</div>
#### Parameters
| Name | Type | Description |
| ---------------------------------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config.body<sup>\*required</sup> | <a href="#appsettingsobjectupdate">AppSettingsObjectUpdate</a> | |
| config.objectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The ID of the required settings object. |
| config.optimisticLockingVersion<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
| Name | Type| Description|
|---|---|---|
|config.body<sup>*required</sup>|[AppSettingsObjectUpdate](#appsettingsobjectupdate)| |
|config.objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the required settings object. |
|config.optimisticLockingVersion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
{/* no returns */}
<details>

@@ -325,7 +378,10 @@ <summary>

const data = await appSettingsObjectsClient.putAppSettingsObjectByObjectId({
objectId: "...",
optimisticLockingVersion: "...",
body: {},
});
const data =
await appSettingsObjectsClient.putAppSettingsObjectByObjectId(
{
objectId: "...",
optimisticLockingVersion: "...",
body: {},
},
);
```

@@ -335,2 +391,4 @@

</div>

@@ -342,123 +400,151 @@

| Name | Type | Description |
| ---------------------------- | ----------------------------------------------------------------------------- | -------------------- |
| code | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The HTTP status code |
| details | <a href="#appsettingserrordetails">AppSettingsErrorDetails</a> | |
| message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The error message |
| Name | Type| Description|
|---|---|---|
|code|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The HTTP status code |
|details|[AppSettingsErrorDetails](#appsettingserrordetails)| |
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The error message |
### AppSettingsErrorDetails
The error details
| Name | Type | Description |
| -------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| constraintViolations | Array&lt;<a href="#constraintviolation">ConstraintViolation</a>&gt; | A list of constraint violations |
| missingScopes | Array&lt;<a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>&gt; | In case of a 403 - Forbidden response, a list of missing scopes necessary to successfully execute the request |
| Name | Type| Description|
|---|---|---|
|constraintViolations|Array&lt;[ConstraintViolation](#constraintviolation)&gt;|A list of constraint violations |
|missingScopes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|In case of a 403 - Forbidden response, a list of missing scopes necessary to successfully execute the request |
### AppSettingsErrorEnvelope
| Name | Type |
| -------------------------- | ------------------------------------------------ |
| error<sup>\*required</sup> | <a href="#appsettingserror">AppSettingsError</a> |
| Name | Type|
|---|---|
|error<sup>*required</sup>|[AppSettingsError](#appsettingserror)|
### AppSettingsModificationInfo
Modification information about the app setting.
| Name | Type | Description |
| ---------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| createdBy | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The unique identifier of the user who created the app setting. |
| createdTime | Date | Timestamp when the app settings was created in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
| lastModifiedBy | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The unique identifier of the user who performed the most recent modification. |
| lastModifiedTime | Date | Timestamp when the app setting was last modified in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
| Name | Type| Description|
|---|---|---|
|createdBy|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The unique identifier of the user who created the app setting. |
|createdTime|Date|Timestamp when the app settings was created in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
|lastModifiedBy|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The unique identifier of the user who performed the most recent modification. |
|lastModifiedTime|Date|Timestamp when the app setting was last modified in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
### AppSettingsObject
A settings object.
| Name | Type | Description |
| ----------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| modificationInfo | <a href="#appsettingsmodificationinfo">AppSettingsModificationInfo</a> | |
| objectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The ID of the settings object. |
| schemaId | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The schema on which the object is based. |
| schemaVersion | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The version of the schema on which the object is based. |
| searchSummary | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | A searchable summary string of the setting value. Plain text without Markdown. |
| summary | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | A short summary of settings. This can contain Markdown and will be escaped accordingly. |
| value | AppSettingsValue | |
| version<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
| Name | Type| Description|
|---|---|---|
|modificationInfo|[AppSettingsModificationInfo](#appsettingsmodificationinfo)| |
|objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the settings object. |
|schemaId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The schema on which the object is based. |
|schemaVersion|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of the schema on which the object is based. |
|searchSummary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A searchable summary string of the setting value. Plain text without Markdown. |
|summary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A short summary of settings. This can contain Markdown and will be escaped accordingly. |
|value|AppSettingsValue| |
|version<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
### AppSettingsObjectCreate
Configuration of a new settings object.
| Name | Type | Description |
| ----------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| insertAfter | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The position of the new object. The new object will be added after the specified one.</p> <p>If <code>null</code>, the new object will be placed in the last position.</p> <p>If set to empty string, the new object will be placed in the first position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <code>ordered</code> parameter is set to <code>true</code>).</p> |
| schemaId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The schema on which the object is based. |
| value<sup>\*required</sup> | AppSettingsValue | |
| Name | Type| Description|
|---|---|---|
|insertAfter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The position of the new object. The new object will be added after the specified one.</p> <p>If <code>null</code>, the new object will be placed in the last position.</p> <p>If set to empty string, the new object will be placed in the first position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <code>ordered</code> parameter is set to <code>true</code>).</p> |
|schemaId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The schema on which the object is based. |
|value<sup>*required</sup>|AppSettingsValue| |
### AppSettingsObjectResponse
The response to a creation request.
| Name | Type | Description |
| ----------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| objectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The ID of the created settings object. |
| version<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
| Name | Type| Description|
|---|---|---|
|objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the created settings object. |
|version<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
### AppSettingsObjectUpdate
An update of a settings object.
| Name | Type | Description |
| -------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| insertAfter | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The position of the updated object. The new object will be moved behind the specified one.</p> <p><strong>insertAfter</strong> and <strong>insertBefore</strong> are evaluated together and only one of both can be set.</p> <p>If <code>null</code> and <strong>insertBefore</strong> 'null', the existing object keeps the current position.</p> <p>If set to empty string, the updated object will be placed in the first position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <strong>ordered</strong> parameter is set to <code>true</code>).</p> |
| insertBefore | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The position of the updated object. The new object will be moved in front of the specified one.</p> <p><strong>insertAfter</strong> and <strong>insertBefore</strong> are evaluated together and only one of both can be set.</p> <p>If <code>null</code> and <strong>insertAfter</strong> 'null', the existing object keeps the current position.</p> <p>If set to empty string, the updated object will be placed in the last position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <strong>ordered</strong> parameter is set to <code>true</code>).</p> |
| value<sup>\*required</sup> | AppSettingsValue | |
| Name | Type| Description|
|---|---|---|
|insertAfter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The position of the updated object. The new object will be moved behind the specified one.</p> <p><strong>insertAfter</strong> and <strong>insertBefore</strong> are evaluated together and only one of both can be set.</p> <p>If <code>null</code> and <strong>insertBefore</strong> 'null', the existing object keeps the current position.</p> <p>If set to empty string, the updated object will be placed in the first position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <strong>ordered</strong> parameter is set to <code>true</code>).</p> |
|insertBefore|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The position of the updated object. The new object will be moved in front of the specified one.</p> <p><strong>insertAfter</strong> and <strong>insertBefore</strong> are evaluated together and only one of both can be set.</p> <p>If <code>null</code> and <strong>insertAfter</strong> 'null', the existing object keeps the current position.</p> <p>If set to empty string, the updated object will be placed in the last position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <strong>ordered</strong> parameter is set to <code>true</code>).</p> |
|value<sup>*required</sup>|AppSettingsValue| |
### AppSettingsObjectsList
A list of settings objects.
| Name | Type | Description |
| ------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| items<sup>\*required</sup> | Array&lt;<a href="#appsettingsobject">AppSettingsObject</a>&gt; | A list of settings objects. |
| nextPageKey | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>nextPageKey</strong> query parameter to obtain subsequent pages of the result.</p> |
| pageSize<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The number of entries per page. |
| totalCount<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The total number of entries in the result. |
| Name | Type| Description|
|---|---|---|
|items<sup>*required</sup>|Array&lt;[AppSettingsObject](#appsettingsobject)&gt;|A list of settings objects. |
|nextPageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>nextPageKey</strong> query parameter to obtain subsequent pages of the result.</p> |
|pageSize<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The number of entries per page. |
|totalCount<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The total number of entries in the result. |
### ConstraintViolation
A list of constraint violations
| Name | Type |
| ----------------- | ----------------------------------------------------------------------------- |
| location | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| message | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| parameterLocation | ConstraintViolationParameterLocation |
| path | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| Name | Type|
|---|---|
|location|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|message|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|parameterLocation|ConstraintViolationParameterLocation|
|path|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### EffectiveAppSettingsValue
An effective settings value.
| Name | Type | Description |
| ---------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| modificationInfo | <a href="#appsettingsmodificationinfo">AppSettingsModificationInfo</a> | |
| schemaId | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The schema on which the object is based. |
| schemaVersion | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The version of the schema on which the object is based. |
| searchSummary | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | A searchable summary string of the setting value. Plain text without Markdown. |
| summary | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | A short summary of settings. This can contain Markdown and will be escaped accordingly. |
| value | AppSettingsValue | |
| Name | Type| Description|
|---|---|---|
|modificationInfo|[AppSettingsModificationInfo](#appsettingsmodificationinfo)| |
|schemaId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The schema on which the object is based. |
|schemaVersion|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of the schema on which the object is based. |
|searchSummary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A searchable summary string of the setting value. Plain text without Markdown. |
|summary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A short summary of settings. This can contain Markdown and will be escaped accordingly. |
|value|AppSettingsValue| |
### EffectiveAppSettingsValuesList
A list of effective settings values.
| Name | Type | Description |
| ------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| items<sup>\*required</sup> | Array&lt;<a href="#effectiveappsettingsvalue">EffectiveAppSettingsValue</a>&gt; | A list of effective settings values. |
| nextPageKey | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>nextPageKey</strong> query parameter to obtain subsequent pages of the result.</p> |
| pageSize<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The number of entries per page. |
| totalCount<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The total number of entries in the result. |
| Name | Type| Description|
|---|---|---|
|items<sup>*required</sup>|Array&lt;[EffectiveAppSettingsValue](#effectiveappsettingsvalue)&gt;|A list of effective settings values. |
|nextPageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>nextPageKey</strong> query parameter to obtain subsequent pages of the result.</p> |
|pageSize<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The number of entries per page. |
|totalCount<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The total number of entries in the result. |

@@ -471,2 +557,4 @@ ## Enums

#### Enum keys

@@ -480,2 +568,3 @@

</div>
{
"dynagen": {
"version": "0.13.1",
"version": "0.13.3",
"generatedAt": "",
"template": {
"name": "@dynatrace-sdk/template-typescript-client",
"version": "0.18.10"
"version": "0.18.12"
}

@@ -9,0 +9,0 @@ },

@@ -508,11 +508,21 @@ /**

};
var addArrayQueryParam = (query, key) => {
var addExplodedArrayQueryParam = (query, key) => {
const arrayValue = query[key];
return arrayValue.map((value) => encodeQueryParam(key, value)).join("&");
};
var addNonExplodedArrayQueryParams = (query, key) => {
const encodedKey = encodeURIComponent(key);
const encodedParamsList = query[key].map((value) => encodeURIComponent(typeof value === "number" ? value : String(value))).join(",");
return `${encodedKey}=${encodedParamsList}`;
};
var addQueryParam = (query, key) => encodeQueryParam(key, query[key]);
var toQueryString = (rawQuery) => {
var arrayQueryParams = (query, key, explode) => {
return explode ? addExplodedArrayQueryParam(query, key) : addNonExplodedArrayQueryParams(query, key);
};
var toQueryString = (rawQuery, flags = {}) => {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => typeof query[key] !== "undefined");
const queryString = keys.map((key) => Array.isArray(query[key]) ? addArrayQueryParam(query, key) : addQueryParam(query, key)).join("&");
const queryString = keys.map(
(key) => Array.isArray(query[key]) ? arrayQueryParams(query, key, flags.explode?.hasOwnProperty(key) ? flags.explode[key] : true) : addQueryParam(query, key)
).join("&");
return queryString ? `?${queryString}` : "";

@@ -519,0 +529,0 @@ };

{
"name": "@dynatrace-sdk/client-app-settings",
"version": "1.2.2",
"version": "1.2.3",
"description": "Retrieve, update and manage app settings.",

@@ -8,3 +8,3 @@ "license": "Apache-2.0",

"@dynatrace-sdk/error-handlers": "^1.2.0",
"@dynatrace-sdk/http-client": "^1.0.9"
"@dynatrace-sdk/http-client": "^1.0.10"
},

@@ -11,0 +11,0 @@ "main": "./cjs/index.js",

# @dynatrace-sdk/client-app-settings
[![npm](https://img.shields.io/badge/npm-v1.2.2-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-settings/v/1.2.2)
[![npm](https://img.shields.io/badge/npm-v1.2.3-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-settings/v/1.2.3)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

@@ -8,2 +8,3 @@

## Installation

@@ -15,6 +16,3 @@

## API reference
Full API reference for this SDK is available at [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-app-settings/).
## Getting help

@@ -25,4 +23,530 @@

## License
This SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE for more information.
# API reference
Full API reference for the latest version of the SDK is also available at the [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-app-settings/).
## appSettingsObjectsClient
```js
import { appSettingsObjectsClient } from '@dynatrace-sdk/client-app-settings';
```
### deleteAppSettingsObjectByObjectId
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.deleteAppSettingsObjectByObjectId(config): Promise&lt;void&gt;</strong>
<div class="padding-left--md">
Deletes the specified settings object
**Required scope:** app-settings:objects:write
**Required permission:** app-settings:objects:write
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the required settings object. |
|config.optimisticLockingVersion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
<details>
<summary>
Code example
</summary>
```ts
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.deleteAppSettingsObjectByObjectId(
{ objectId: "...", optimisticLockingVersion: "..." },
);
```
</details>
</div>
### getAppSettingsObjectByObjectId
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.getAppSettingsObjectByObjectId(config): Promise&lt;[AppSettingsObject](#appsettingsobject)&gt;</strong>
<div class="padding-left--md">
Gets the specified settings object
**Required scope:** app-settings:objects:read
**Required permission:** app-settings:objects:read
Gets the specified settings object. Properties of type **secret** will be included in plain text if the call originates from a serverless function of your app; they will have irreversibly masked values otherwise. This protects these secrets from leaking to users of your app or other third parties.
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the required settings object. |
#### Returns
Success
<details>
<summary>
Code example
</summary>
```ts
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.getAppSettingsObjectByObjectId(
{ objectId: "..." },
);
```
</details>
</div>
### getAppSettingsObjects
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.getAppSettingsObjects(config): Promise&lt;[AppSettingsObjectsList](#appsettingsobjectslist)&gt;</strong>
<div class="padding-left--md">
Lists persisted settings objects
**Required scope:** app-settings:objects:read
**Required permission:** app-settings:objects:read
Lists persisted settings objects for selected schemas.
If nothing is persisted or if all persisted settings objects are not accessible due to missing permissions, no items will be returned.
To query the effective values (including schema defaults) please see getEffectiveAppSettingsValues.
Properties of type **secret** will be included in plain text if the call originates from a serverless function of your app; they will have irreversibly masked values otherwise. This protects these secrets from leaking to users of your app or other third parties.
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.addFields|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of fields to be included to the response. The provided set of fields extends the default set.</p> <p>Specify the required top-level fields, separated by commas (for example, <strong>summary,value</strong>).</p> <p>Supported fields: <strong>objectId</strong>, <strong>version</strong>, <strong>summary</strong>, <strong>searchSummary</strong>, <strong>schemaId</strong>, <strong>schemaVersion</strong>, <strong>modificationInfo</strong>, <strong>value</strong>.</p> <p>Default fields: objectId, version.</p> <i>default:</i> <code>"objectId, version"</code>|
|config.pageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. You can find it in the <strong>nextPageKey</strong> field of the previous response.</p> <p>The first page is always returned if you don't specify the <strong>page-key</strong> query parameter.</p> <p>When the <strong>page-key</strong> is set to obtain subsequent pages, you must omit all other query parameters.</p> |
|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|<p>The amount of settings objects in a single response payload.</p> <p>The maximal allowed page size is 500.</p> <p>If not set, 100 is used.</p> |
|config.schemaIds|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of comma-separated schema IDs to which the requested objects belong.</p> <p>To load the first page, when the <strong>nextPageKey</strong> is not set, this parameter is required.</p> |
#### Returns
Success. Accessible objects returned.
<details>
<summary>
Code example
</summary>
```ts
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.getAppSettingsObjects();
```
</details>
</div>
### getEffectiveAppSettingsValues
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.getEffectiveAppSettingsValues(config): Promise&lt;[EffectiveAppSettingsValuesList](#effectiveappsettingsvalueslist)&gt;</strong>
<div class="padding-left--md">
Lists effective settings values
**Required scope:** app-settings:objects:read
**Required permission:** app-settings:objects:read
Lists effective settings values for selected schemas.
If no object is persisted for a schema with **&quot;multiObject&quot;: false**, the default value as defined in the schema will be returned.
Properties of type **secret** will be included in plain text if the call originates from a serverless function of your app; they will have irreversibly masked values otherwise. This protects these secrets from leaking to users of your app or other third parties.
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.addFields|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of fields to be included to the response. The provided set of fields extends the default set.</p> <p>Specify the required top-level fields, separated by commas (for example, <strong>summary,schemaId</strong>).</p> <p>Supported fields: <strong>summary</strong>, <strong>searchSummary</strong>, <strong>schemaId</strong>, <strong>schemaVersion</strong>, <strong>modificationInfo</strong>, <strong>value</strong>.</p> <p>Default fields: value.</p> <i>default:</i> <code>"value"</code>|
|config.pageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. You can find it in the <strong>nextPageKey</strong> field of the previous response.</p> <p>The first page is always returned if you don't specify the <strong>page-key</strong> query parameter.</p> <p>When the <strong>page-key</strong> is set to obtain subsequent pages, you must omit all other query parameters.</p> |
|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|<p>The amount of settings objects in a single response payload.</p> <p>The maximal allowed page size is 500.</p> <p>If not set, 100 is used.</p> |
|config.schemaIds|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>A list of comma-separated schema IDs to which the requested objects belong.</p> <p>Only considered on load of the first page, when the <strong>nextPageKey</strong> is not set.</p> |
#### Returns
Success
<details>
<summary>
Code example
</summary>
```ts
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.getEffectiveAppSettingsValues();
```
</details>
</div>
### postAppSettingsObject
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.postAppSettingsObject(config): Promise&lt;void &#124; [AppSettingsObjectResponse](#appsettingsobjectresponse)&gt;</strong>
<div class="padding-left--md">
Creates a new settings object
**Required scope:** app-settings:objects:write
**Required permission:** app-settings:objects:write
Creates a new settings object.
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.body<sup>*required</sup>|[AppSettingsObjectCreate](#appsettingsobjectcreate)| |
|config.validateOnly|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If <code>true</code>, the request runs only validation of the submitted settings objects, without saving them. <i>default:</i> <code>false</code>|
#### Returns
Created
<details>
<summary>
Code example
</summary>
```ts
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.postAppSettingsObject({
body: { schemaId: "jira-connection" },
});
```
</details>
</div>
### putAppSettingsObjectByObjectId
<div class="padding-bottom--md">
<strong>appSettingsObjectsClient.putAppSettingsObjectByObjectId(config): Promise&lt;void&gt;</strong>
<div class="padding-left--md">
Updates an existing settings object
**Required scope:** app-settings:objects:write
**Required permission:** app-settings:objects:write
Updates an existing settings object with new values. To update a property of the `secret` type you need to pass the new value unmasked. To keep the current value, send the current masked secret. You can obtain it via [GET an object](https://dt-url.net/kj036oj) endpoint.
Some schemas don&apos;t allow passing of the masked secret. In that case you need to send the unmasked secret with every update of the object.
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.body<sup>*required</sup>|[AppSettingsObjectUpdate](#appsettingsobjectupdate)| |
|config.objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the required settings object. |
|config.optimisticLockingVersion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
<details>
<summary>
Code example
</summary>
```ts
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.putAppSettingsObjectByObjectId(
{
objectId: "...",
optimisticLockingVersion: "...",
body: {},
},
);
```
</details>
</div>
## Types
### AppSettingsError
| Name | Type| Description|
|---|---|---|
|code|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The HTTP status code |
|details|[AppSettingsErrorDetails](#appsettingserrordetails)| |
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The error message |
### AppSettingsErrorDetails
The error details
| Name | Type| Description|
|---|---|---|
|constraintViolations|Array&lt;[ConstraintViolation](#constraintviolation)&gt;|A list of constraint violations |
|missingScopes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|In case of a 403 - Forbidden response, a list of missing scopes necessary to successfully execute the request |
### AppSettingsErrorEnvelope
| Name | Type|
|---|---|
|error<sup>*required</sup>|[AppSettingsError](#appsettingserror)|
### AppSettingsModificationInfo
Modification information about the app setting.
| Name | Type| Description|
|---|---|---|
|createdBy|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The unique identifier of the user who created the app setting. |
|createdTime|Date|Timestamp when the app settings was created in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
|lastModifiedBy|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The unique identifier of the user who performed the most recent modification. |
|lastModifiedTime|Date|Timestamp when the app setting was last modified in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
### AppSettingsObject
A settings object.
| Name | Type| Description|
|---|---|---|
|modificationInfo|[AppSettingsModificationInfo](#appsettingsmodificationinfo)| |
|objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the settings object. |
|schemaId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The schema on which the object is based. |
|schemaVersion|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of the schema on which the object is based. |
|searchSummary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A searchable summary string of the setting value. Plain text without Markdown. |
|summary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A short summary of settings. This can contain Markdown and will be escaped accordingly. |
|value|AppSettingsValue| |
|version<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
### AppSettingsObjectCreate
Configuration of a new settings object.
| Name | Type| Description|
|---|---|---|
|insertAfter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The position of the new object. The new object will be added after the specified one.</p> <p>If <code>null</code>, the new object will be placed in the last position.</p> <p>If set to empty string, the new object will be placed in the first position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <code>ordered</code> parameter is set to <code>true</code>).</p> |
|schemaId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The schema on which the object is based. |
|value<sup>*required</sup>|AppSettingsValue| |
### AppSettingsObjectResponse
The response to a creation request.
| Name | Type| Description|
|---|---|---|
|objectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The ID of the created settings object. |
|version<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p> |
### AppSettingsObjectUpdate
An update of a settings object.
| Name | Type| Description|
|---|---|---|
|insertAfter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The position of the updated object. The new object will be moved behind the specified one.</p> <p><strong>insertAfter</strong> and <strong>insertBefore</strong> are evaluated together and only one of both can be set.</p> <p>If <code>null</code> and <strong>insertBefore</strong> 'null', the existing object keeps the current position.</p> <p>If set to empty string, the updated object will be placed in the first position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <strong>ordered</strong> parameter is set to <code>true</code>).</p> |
|insertBefore|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The position of the updated object. The new object will be moved in front of the specified one.</p> <p><strong>insertAfter</strong> and <strong>insertBefore</strong> are evaluated together and only one of both can be set.</p> <p>If <code>null</code> and <strong>insertAfter</strong> 'null', the existing object keeps the current position.</p> <p>If set to empty string, the updated object will be placed in the last position.</p> <p>Only applicable for objects based on schemas with ordered objects (schema's <strong>ordered</strong> parameter is set to <code>true</code>).</p> |
|value<sup>*required</sup>|AppSettingsValue| |
### AppSettingsObjectsList
A list of settings objects.
| Name | Type| Description|
|---|---|---|
|items<sup>*required</sup>|Array&lt;[AppSettingsObject](#appsettingsobject)&gt;|A list of settings objects. |
|nextPageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>nextPageKey</strong> query parameter to obtain subsequent pages of the result.</p> |
|pageSize<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The number of entries per page. |
|totalCount<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The total number of entries in the result. |
### ConstraintViolation
A list of constraint violations
| Name | Type|
|---|---|
|location|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|message|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|parameterLocation|ConstraintViolationParameterLocation|
|path|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### EffectiveAppSettingsValue
An effective settings value.
| Name | Type| Description|
|---|---|---|
|modificationInfo|[AppSettingsModificationInfo](#appsettingsmodificationinfo)| |
|schemaId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The schema on which the object is based. |
|schemaVersion|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of the schema on which the object is based. |
|searchSummary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A searchable summary string of the setting value. Plain text without Markdown. |
|summary|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A short summary of settings. This can contain Markdown and will be escaped accordingly. |
|value|AppSettingsValue| |
### EffectiveAppSettingsValuesList
A list of effective settings values.
| Name | Type| Description|
|---|---|---|
|items<sup>*required</sup>|Array&lt;[EffectiveAppSettingsValue](#effectiveappsettingsvalue)&gt;|A list of effective settings values. |
|nextPageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>nextPageKey</strong> query parameter to obtain subsequent pages of the result.</p> |
|pageSize<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The number of entries per page. |
|totalCount<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The total number of entries in the result. |
## Enums
### ConstraintViolationParameterLocation
<div class="padding-left--md">
#### Enum keys
<div class="padding-left--md">
`Header` | `Path` | `PayloadBody` | `Query`
</div>
</div>
declare type QueryParamsType = Record<string | number, any>;
export declare const toQueryString: (rawQuery?: QueryParamsType) => string;
interface ParametersFlags {
explode?: Record<string, boolean>;
}
export declare const toQueryString: (rawQuery?: QueryParamsType, flags?: ParametersFlags) => string;
export {};
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