@microsoft/ocsdk 0.6.0-main.7948c3f → 0.6.0-main.7b9626a
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/README.md +22 -0
- package/dist/SDK.min.js +1 -1
- package/lib/Common/Enums.d.ts +4 -1
- package/lib/Common/Enums.js +4 -1
- package/lib/Common/Enums.js.map +1 -1
- package/lib/Common/OmnichannelEndpoints.d.ts +2 -0
- package/lib/Common/OmnichannelEndpoints.js +3 -1
- package/lib/Common/OmnichannelEndpoints.js.map +1 -1
- package/lib/Common/RequestTimeoutConfig.d.ts +1 -0
- package/lib/Common/RequestTimeoutConfig.js +1 -1
- package/lib/Interfaces/IRenewChatTokenOptionalParams.d.ts +11 -0
- package/lib/Interfaces/IRenewChatTokenOptionalParams.js +2 -0
- package/lib/Interfaces/IRenewChatTokenOptionalParams.js.map +1 -0
- package/lib/Interfaces/ISDK.d.ts +3 -0
- package/lib/Interfaces/ISDK.js +1 -1
- package/lib/Model/RenewChatTokenResponse.d.ts +10 -0
- package/lib/Model/RenewChatTokenResponse.js +22 -0
- package/lib/Model/RenewChatTokenResponse.js.map +1 -0
- package/lib/SDK.d.ts +10 -0
- package/lib/SDK.js +773 -636
- package/lib/SDK.js.map +1 -1
- package/lib/Utils/LoggingSanitizer.d.ts +1 -0
- package/lib/Utils/LoggingSanitizer.js +24 -5
- package/lib/Utils/LoggingSanitizer.js.map +1 -1
- package/lib/Utils/waitTimeBetweenRetriesConfigs.js +3 -2
- package/lib/Utils/waitTimeBetweenRetriesConfigs.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,6 +123,28 @@ try {
|
|
|
123
123
|
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
+
### Renew Chat Token
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
// Disable retries for this renewal only; existing authentication options still apply.
|
|
130
|
+
const renewedToken = await ocsdk.renewChatToken(requestId, {
|
|
131
|
+
maxRetries: 0,
|
|
132
|
+
authenticatedUserToken: authToken // Omit for an unauthenticated conversation.
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`maxRetries` counts retries after the first request. A nonnegative integer overrides
|
|
137
|
+
`maxRequestRetriesOnFailure` for this call only; omitted or invalid values (such as
|
|
138
|
+
`-1`, `1.5`, or `NaN`) keep the configured retry count. With `0`, a failed renewal
|
|
139
|
+
sends one request. Non-timeout failures retain their original axios error, including
|
|
140
|
+
`response.status` and `response.headers`; timeouts keep the existing SDK timeout error.
|
|
141
|
+
|
|
142
|
+
The configured renewal timeout (15 seconds by default) is shared by the request,
|
|
143
|
+
retry delays and retries, not restarted for each attempt. A custom timeout uses
|
|
144
|
+
the same budget; `0` disables the timeout. The retry limit does not override this
|
|
145
|
+
budget or change which failures are retryable. Higher-level SDK callers must pass
|
|
146
|
+
this option explicitly; this API does not change consumer retry behavior.
|
|
147
|
+
|
|
126
148
|
### Session Init
|
|
127
149
|
|
|
128
150
|
```js
|