reach-api-sdk 1.0.130 → 1.0.132

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.
@@ -6330,6 +6330,23 @@ type CancellationPolicyPost = {
6330
6330
  declare class CancellationPoliciesService {
6331
6331
  readonly httpRequest: BaseHttpRequest;
6332
6332
  constructor(httpRequest: BaseHttpRequest);
6333
+ /**
6334
+ * Gets the system cancellation policy.
6335
+ * @returns CancellationPolicy Success
6336
+ * @throws ApiError
6337
+ */
6338
+ getSystemCancellationPolicy(): CancelablePromise<CancellationPolicy>;
6339
+ /**
6340
+ * Sets the cancellation policy as the default policy. />.
6341
+ * @returns CancellationPolicy Success
6342
+ * @throws ApiError
6343
+ */
6344
+ setAsDefault({ cancellationPolicyId, }: {
6345
+ /**
6346
+ * The cancellation policy Id.
6347
+ */
6348
+ cancellationPolicyId: string;
6349
+ }): CancelablePromise<CancellationPolicy>;
6333
6350
  /**
6334
6351
  * Inserts a new resource. The Id will be automatically generated and will be ignored if provided.
6335
6352
  * @returns CancellationPolicy Success
@@ -7145,6 +7162,10 @@ type CoursePatch = {
7145
7162
  * Gets or sets the post completion survey Id.
7146
7163
  */
7147
7164
  postCompletionSurveyId?: string | null;
7165
+ /**
7166
+ * Gets or sets the cancellation policy id.
7167
+ */
7168
+ cancellationPolicyId?: string;
7148
7169
  /**
7149
7170
  * Gets or sets the survey Id.
7150
7171
  */
@@ -26536,6 +26557,10 @@ type SessionPatch = {
26536
26557
  * Gets or sets the survey Id.
26537
26558
  */
26538
26559
  surveyId?: string | null;
26560
+ /**
26561
+ * Gets or sets the cancellation policy id.
26562
+ */
26563
+ cancellationPolicyId?: string;
26539
26564
  /**
26540
26565
  * Gets or sets the session name.
26541
26566
  */
package/dist/reach-sdk.js CHANGED
@@ -2347,6 +2347,43 @@ const request = (config, options, axiosClient = axios) => {
2347
2347
  constructor(httpRequest) {
2348
2348
  this.httpRequest = httpRequest;
2349
2349
  }
2350
+ /**
2351
+ * Gets the system cancellation policy.
2352
+ * @returns CancellationPolicy Success
2353
+ * @throws ApiError
2354
+ */
2355
+ getSystemCancellationPolicy() {
2356
+ return this.httpRequest.request({
2357
+ method: "GET",
2358
+ url: "/api/cancellation-policies/system",
2359
+ errors: {
2360
+ 400: `Bad Request`,
2361
+ 422: `Client Error`,
2362
+ 500: `Server Error`
2363
+ }
2364
+ });
2365
+ }
2366
+ /**
2367
+ * Sets the cancellation policy as the default policy. />.
2368
+ * @returns CancellationPolicy Success
2369
+ * @throws ApiError
2370
+ */
2371
+ setAsDefault({
2372
+ cancellationPolicyId
2373
+ }) {
2374
+ return this.httpRequest.request({
2375
+ method: "PATCH",
2376
+ url: "/api/cancellation-policies/{cancellationPolicyId}/set-as-default",
2377
+ path: {
2378
+ cancellationPolicyId
2379
+ },
2380
+ errors: {
2381
+ 400: `Bad Request`,
2382
+ 422: `Client Error`,
2383
+ 500: `Server Error`
2384
+ }
2385
+ });
2386
+ }
2350
2387
  /**
2351
2388
  * Inserts a new resource. The Id will be automatically generated and will be ignored if provided.
2352
2389
  * @returns CancellationPolicy Success
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reach-api-sdk",
3
- "version": "1.0.130",
3
+ "version": "1.0.132",
4
4
  "description": "sdk for reach api",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -5931,6 +5931,124 @@ paths:
5931
5931
  text/json:
5932
5932
  schema:
5933
5933
  $ref: '#/components/schemas/ValidationResultModel'
5934
+ /api/cancellation-policies/system:
5935
+ get:
5936
+ tags:
5937
+ - CancellationPolicies
5938
+ summary: Gets the system cancellation policy.
5939
+ operationId: GetSystemCancellationPolicy
5940
+ responses:
5941
+ '200':
5942
+ description: Success
5943
+ content:
5944
+ text/plain:
5945
+ schema:
5946
+ $ref: '#/components/schemas/CancellationPolicy'
5947
+ application/json:
5948
+ schema:
5949
+ $ref: '#/components/schemas/CancellationPolicy'
5950
+ text/json:
5951
+ schema:
5952
+ $ref: '#/components/schemas/CancellationPolicy'
5953
+ '400':
5954
+ description: Bad Request
5955
+ content:
5956
+ text/plain:
5957
+ schema:
5958
+ $ref: '#/components/schemas/ReachError'
5959
+ application/json:
5960
+ schema:
5961
+ $ref: '#/components/schemas/ReachError'
5962
+ text/json:
5963
+ schema:
5964
+ $ref: '#/components/schemas/ReachError'
5965
+ '500':
5966
+ description: Server Error
5967
+ content:
5968
+ text/plain:
5969
+ schema:
5970
+ $ref: '#/components/schemas/ReachError'
5971
+ application/json:
5972
+ schema:
5973
+ $ref: '#/components/schemas/ReachError'
5974
+ text/json:
5975
+ schema:
5976
+ $ref: '#/components/schemas/ReachError'
5977
+ '422':
5978
+ description: Client Error
5979
+ content:
5980
+ text/plain:
5981
+ schema:
5982
+ $ref: '#/components/schemas/ValidationResultModel'
5983
+ application/json:
5984
+ schema:
5985
+ $ref: '#/components/schemas/ValidationResultModel'
5986
+ text/json:
5987
+ schema:
5988
+ $ref: '#/components/schemas/ValidationResultModel'
5989
+ '/api/cancellation-policies/{cancellationPolicyId}/set-as-default':
5990
+ patch:
5991
+ tags:
5992
+ - CancellationPolicies
5993
+ summary: Sets the cancellation policy as the default policy. />.
5994
+ operationId: SetAsDefault
5995
+ parameters:
5996
+ - name: cancellationPolicyId
5997
+ in: path
5998
+ description: The cancellation policy Id.
5999
+ required: true
6000
+ schema:
6001
+ type: string
6002
+ format: uuid
6003
+ responses:
6004
+ '200':
6005
+ description: Success
6006
+ content:
6007
+ text/plain:
6008
+ schema:
6009
+ $ref: '#/components/schemas/CancellationPolicy'
6010
+ application/json:
6011
+ schema:
6012
+ $ref: '#/components/schemas/CancellationPolicy'
6013
+ text/json:
6014
+ schema:
6015
+ $ref: '#/components/schemas/CancellationPolicy'
6016
+ '400':
6017
+ description: Bad Request
6018
+ content:
6019
+ text/plain:
6020
+ schema:
6021
+ $ref: '#/components/schemas/ReachError'
6022
+ application/json:
6023
+ schema:
6024
+ $ref: '#/components/schemas/ReachError'
6025
+ text/json:
6026
+ schema:
6027
+ $ref: '#/components/schemas/ReachError'
6028
+ '500':
6029
+ description: Server Error
6030
+ content:
6031
+ text/plain:
6032
+ schema:
6033
+ $ref: '#/components/schemas/ReachError'
6034
+ application/json:
6035
+ schema:
6036
+ $ref: '#/components/schemas/ReachError'
6037
+ text/json:
6038
+ schema:
6039
+ $ref: '#/components/schemas/ReachError'
6040
+ '422':
6041
+ description: Client Error
6042
+ content:
6043
+ text/plain:
6044
+ schema:
6045
+ $ref: '#/components/schemas/ValidationResultModel'
6046
+ application/json:
6047
+ schema:
6048
+ $ref: '#/components/schemas/ValidationResultModel'
6049
+ text/json:
6050
+ schema:
6051
+ $ref: '#/components/schemas/ValidationResultModel'
5934
6052
  /api/cancellation-policies/v2-temporary-route:
5935
6053
  post:
5936
6054
  tags:
@@ -103127,6 +103245,10 @@ components:
103127
103245
  description: Gets or sets the post completion survey Id.
103128
103246
  format: uuid
103129
103247
  nullable: true
103248
+ cancellationPolicyId:
103249
+ type: string
103250
+ description: Gets or sets the cancellation policy id.
103251
+ format: uuid
103130
103252
  surveyId:
103131
103253
  type: string
103132
103254
  description: Gets or sets the survey Id.
@@ -110123,6 +110245,10 @@ components:
110123
110245
  description: Gets or sets the survey Id.
110124
110246
  format: uuid
110125
110247
  nullable: true
110248
+ cancellationPolicyId:
110249
+ type: string
110250
+ description: Gets or sets the cancellation policy id.
110251
+ format: uuid
110126
110252
  name:
110127
110253
  minLength: 1
110128
110254
  type: string
@@ -36,6 +36,10 @@ export type CoursePatch = {
36
36
  * Gets or sets the post completion survey Id.
37
37
  */
38
38
  postCompletionSurveyId?: string | null;
39
+ /**
40
+ * Gets or sets the cancellation policy id.
41
+ */
42
+ cancellationPolicyId?: string;
39
43
  /**
40
44
  * Gets or sets the survey Id.
41
45
  */
@@ -39,6 +39,10 @@ export type SessionPatch = {
39
39
  * Gets or sets the survey Id.
40
40
  */
41
41
  surveyId?: string | null;
42
+ /**
43
+ * Gets or sets the cancellation policy id.
44
+ */
45
+ cancellationPolicyId?: string;
42
46
  /**
43
47
  * Gets or sets the session name.
44
48
  */
@@ -14,6 +14,50 @@ import type { BaseHttpRequest } from '../core/BaseHttpRequest';
14
14
  export class CancellationPoliciesService {
15
15
  constructor(public readonly httpRequest: BaseHttpRequest) {}
16
16
 
17
+ /**
18
+ * Gets the system cancellation policy.
19
+ * @returns CancellationPolicy Success
20
+ * @throws ApiError
21
+ */
22
+ public getSystemCancellationPolicy(): CancelablePromise<CancellationPolicy> {
23
+ return this.httpRequest.request({
24
+ method: 'GET',
25
+ url: '/api/cancellation-policies/system',
26
+ errors: {
27
+ 400: `Bad Request`,
28
+ 422: `Client Error`,
29
+ 500: `Server Error`,
30
+ },
31
+ });
32
+ }
33
+
34
+ /**
35
+ * Sets the cancellation policy as the default policy. />.
36
+ * @returns CancellationPolicy Success
37
+ * @throws ApiError
38
+ */
39
+ public setAsDefault({
40
+ cancellationPolicyId,
41
+ }: {
42
+ /**
43
+ * The cancellation policy Id.
44
+ */
45
+ cancellationPolicyId: string;
46
+ }): CancelablePromise<CancellationPolicy> {
47
+ return this.httpRequest.request({
48
+ method: 'PATCH',
49
+ url: '/api/cancellation-policies/{cancellationPolicyId}/set-as-default',
50
+ path: {
51
+ cancellationPolicyId: cancellationPolicyId,
52
+ },
53
+ errors: {
54
+ 400: `Bad Request`,
55
+ 422: `Client Error`,
56
+ 500: `Server Error`,
57
+ },
58
+ });
59
+ }
60
+
17
61
  /**
18
62
  * Inserts a new resource. The Id will be automatically generated and will be ignored if provided.
19
63
  * @returns CancellationPolicy Success