reach-api-sdk 1.0.205 → 1.0.206

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/src/index.ts CHANGED
@@ -75,6 +75,18 @@ export type { CustomerPatch } from './models/CustomerPatch';
75
75
  export type { CustomerPost } from './models/CustomerPost';
76
76
  export type { CustomerStats } from './models/CustomerStats';
77
77
  export { CustomerType } from './models/CustomerType';
78
+ export { CustomFieldDataType } from './models/CustomFieldDataType';
79
+ export type { CustomFieldDefinition } from './models/CustomFieldDefinition';
80
+ export type { CustomFieldDefinitionPage } from './models/CustomFieldDefinitionPage';
81
+ export type { CustomFieldDefinitionPatch } from './models/CustomFieldDefinitionPatch';
82
+ export type { CustomFieldDefinitionPost } from './models/CustomFieldDefinitionPost';
83
+ export type { CustomFieldDefinitionWithValue } from './models/CustomFieldDefinitionWithValue';
84
+ export type { CustomFieldOption } from './models/CustomFieldOption';
85
+ export type { CustomFieldOptionDto } from './models/CustomFieldOptionDto';
86
+ export type { CustomFieldOptionPost } from './models/CustomFieldOptionPost';
87
+ export type { CustomFieldsBulkUpdate } from './models/CustomFieldsBulkUpdate';
88
+ export { CustomFieldValueEntityType } from './models/CustomFieldValueEntityType';
89
+ export type { CustomFieldValueUpdate } from './models/CustomFieldValueUpdate';
78
90
  export type { DatabaseState } from './models/DatabaseState';
79
91
  export { DayOfWeek } from './models/DayOfWeek';
80
92
  export type { Deal } from './models/Deal';
@@ -391,6 +403,7 @@ export type { TotalRevenueReportPatch } from './models/TotalRevenueReportPatch';
391
403
  export type { TotalRevenueReportPost } from './models/TotalRevenueReportPost';
392
404
  export type { UnsplashSearchResponse } from './models/UnsplashSearchResponse';
393
405
  export { UpcomingLayout } from './models/UpcomingLayout';
406
+ export type { UpdateCustomFieldOption } from './models/UpdateCustomFieldOption';
394
407
  export type { UpdateEmailSettings } from './models/UpdateEmailSettings';
395
408
  export type { UpdateOffer } from './models/UpdateOffer';
396
409
  export type { User } from './models/User';
@@ -470,6 +483,7 @@ export { CoursesService } from './services/CoursesService';
470
483
  export { CourseSessionsService } from './services/CourseSessionsService';
471
484
  export { CourseSessionSchedulesService } from './services/CourseSessionSchedulesService';
472
485
  export { CustomersService } from './services/CustomersService';
486
+ export { CustomFieldsService } from './services/CustomFieldsService';
473
487
  export { DealActivitiesService } from './services/DealActivitiesService';
474
488
  export { DealsService } from './services/DealsService';
475
489
  export { DiscountCodeUsesService } from './services/DiscountCodeUsesService';
@@ -0,0 +1,22 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * Controls the data type for custom field definitions.
8
+ */
9
+ export enum CustomFieldDataType {
10
+ TEXT = 'Text',
11
+ MULTI_LINE_TEXT = 'MultiLineText',
12
+ NUMBER = 'Number',
13
+ DECIMAL = 'Decimal',
14
+ BOOL = 'Bool',
15
+ DATE = 'Date',
16
+ DATE_TIME = 'DateTime',
17
+ URL = 'Url',
18
+ EMAIL = 'Email',
19
+ PHONE = 'Phone',
20
+ SINGLE_SELECT = 'SingleSelect',
21
+ MULTI_SELECT = 'MultiSelect',
22
+ }
@@ -0,0 +1,100 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { CustomFieldDataType } from './CustomFieldDataType';
7
+ import type { CustomFieldOption } from './CustomFieldOption';
8
+ import type { CustomFieldValueEntityType } from './CustomFieldValueEntityType';
9
+
10
+ /**
11
+ * Represents a custom field definition within the Reach application.
12
+ */
13
+ export type CustomFieldDefinition = {
14
+ /**
15
+ * Gets or sets the entities Id.
16
+ */
17
+ id?: string;
18
+ /**
19
+ * Gets or sets the tenant Id.
20
+ */
21
+ tenantId: string;
22
+ /**
23
+ * Gets or sets the created date of this entity.
24
+ */
25
+ dateCreated: string;
26
+ /**
27
+ * Gets or sets the last modified date of this entity.
28
+ */
29
+ dateModified: string;
30
+ /**
31
+ * Gets or sets the modified by Id.
32
+ */
33
+ modifiedById?: string | null;
34
+ /**
35
+ * Gets or sets a value indicating whether the record is live and available for use within the application.
36
+ */
37
+ isLive: boolean;
38
+ entityType?: CustomFieldValueEntityType;
39
+ /**
40
+ * Gets or sets the custom field label.
41
+ */
42
+ label?: string | null;
43
+ /**
44
+ * Gets or sets the custom field description.
45
+ */
46
+ description?: string | null;
47
+ dataType?: CustomFieldDataType;
48
+ /**
49
+ * Gets or sets a value indicating whether the field is required.
50
+ */
51
+ required?: boolean | null;
52
+ /**
53
+ * Gets or sets a value indicating whether the field has public visibility.
54
+ */
55
+ publicVisibility?: boolean | null;
56
+ /**
57
+ * Gets or sets the display order.
58
+ */
59
+ displayOrder?: number | null;
60
+ /**
61
+ * Gets or sets a value indicating whether the field is archived.
62
+ */
63
+ archived?: boolean | null;
64
+ /**
65
+ * Gets or sets the validation JSON (min/max/regex etc).
66
+ */
67
+ validationJson?: string | null;
68
+ /**
69
+ * Gets or sets the default text value.
70
+ */
71
+ defaultValueText?: string | null;
72
+ /**
73
+ * Gets or sets the default number value.
74
+ */
75
+ defaultValueNumber?: number | null;
76
+ /**
77
+ * Gets or sets the default decimal value.
78
+ */
79
+ defaultValueDecimal?: number | null;
80
+ /**
81
+ * Gets or sets the default bit value.
82
+ */
83
+ defaultValueBit?: boolean | null;
84
+ /**
85
+ * Gets or sets the default date value.
86
+ */
87
+ defaultValueDate?: string | null;
88
+ /**
89
+ * Gets or sets the default datetimeoffset value.
90
+ */
91
+ defaultValueDatetimeoffset?: string | null;
92
+ /**
93
+ * Gets or sets the default JSON value.
94
+ */
95
+ defaultValueJson?: string | null;
96
+ /**
97
+ * Gets or sets the options for this custom field definition.
98
+ */
99
+ options?: Array<CustomFieldOption> | null;
100
+ };
@@ -0,0 +1,12 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { CustomFieldDefinition } from './CustomFieldDefinition';
7
+ import type { Pagination } from './Pagination';
8
+
9
+ export type CustomFieldDefinitionPage = {
10
+ pagination: Pagination;
11
+ readonly items: Array<CustomFieldDefinition>;
12
+ };
@@ -0,0 +1,84 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { CustomFieldDataType } from './CustomFieldDataType';
7
+ import type { CustomFieldValueEntityType } from './CustomFieldValueEntityType';
8
+ import type { UpdateCustomFieldOption } from './UpdateCustomFieldOption';
9
+
10
+ /**
11
+ * Patch model for the custom field definition.
12
+ */
13
+ export type CustomFieldDefinitionPatch = {
14
+ /**
15
+ * Gets or sets the tenant Id.
16
+ */
17
+ tenantId: string;
18
+ /**
19
+ * Gets or sets the Id.
20
+ */
21
+ id: string;
22
+ entityType?: CustomFieldValueEntityType;
23
+ /**
24
+ * Gets or sets the custom field label.
25
+ */
26
+ label?: string | null;
27
+ /**
28
+ * Gets or sets the custom field description.
29
+ */
30
+ description?: string | null;
31
+ dataType?: CustomFieldDataType;
32
+ /**
33
+ * Gets or sets a value indicating whether the field is required.
34
+ */
35
+ required?: boolean | null;
36
+ /**
37
+ * Gets or sets a value indicating whether the field has public visibility.
38
+ */
39
+ publicVisibility?: boolean | null;
40
+ /**
41
+ * Gets or sets the display order.
42
+ */
43
+ displayOrder?: number | null;
44
+ /**
45
+ * Gets or sets the validation JSON.
46
+ */
47
+ validationJson?: string | null;
48
+ /**
49
+ * Gets or sets the default text value.
50
+ */
51
+ defaultValueText?: string | null;
52
+ /**
53
+ * Gets or sets the default number value.
54
+ */
55
+ defaultValueNumber?: number | null;
56
+ /**
57
+ * Gets or sets the default decimal value.
58
+ */
59
+ defaultValueDecimal?: number | null;
60
+ /**
61
+ * Gets or sets the default bit value.
62
+ */
63
+ defaultValueBit?: boolean | null;
64
+ /**
65
+ * Gets or sets the default date value.
66
+ */
67
+ defaultValueDate?: string | null;
68
+ /**
69
+ * Gets or sets the default datetimeoffset value.
70
+ */
71
+ defaultValueDatetimeoffset?: string | null;
72
+ /**
73
+ * Gets or sets the default JSON value.
74
+ */
75
+ defaultValueJson?: string | null;
76
+ /**
77
+ * Gets or sets a value indicating whether the field is archived.
78
+ */
79
+ archived?: boolean | null;
80
+ /**
81
+ * Gets or sets the custom field options.
82
+ */
83
+ options?: Array<UpdateCustomFieldOption> | null;
84
+ };
@@ -0,0 +1,80 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { CustomFieldDataType } from './CustomFieldDataType';
7
+ import type { CustomFieldOptionPost } from './CustomFieldOptionPost';
8
+ import type { CustomFieldValueEntityType } from './CustomFieldValueEntityType';
9
+
10
+ /**
11
+ * Post model for the custom field definition.
12
+ */
13
+ export type CustomFieldDefinitionPost = {
14
+ /**
15
+ * Gets or sets the tenant Id.
16
+ */
17
+ tenantId: string;
18
+ entityType?: CustomFieldValueEntityType;
19
+ /**
20
+ * Gets or sets the custom field label.
21
+ */
22
+ label?: string | null;
23
+ /**
24
+ * Gets or sets the custom field description.
25
+ */
26
+ description?: string | null;
27
+ dataType?: CustomFieldDataType;
28
+ /**
29
+ * Gets or sets a value indicating whether the field is required.
30
+ */
31
+ required?: boolean | null;
32
+ /**
33
+ * Gets or sets a value indicating whether the field has public visibility.
34
+ */
35
+ publicVisibility?: boolean | null;
36
+ /**
37
+ * Gets or sets the display order.
38
+ */
39
+ displayOrder?: number | null;
40
+ /**
41
+ * Gets or sets the validation JSON.
42
+ */
43
+ validationJson?: string | null;
44
+ /**
45
+ * Gets or sets the default text value.
46
+ */
47
+ defaultValueText?: string | null;
48
+ /**
49
+ * Gets or sets the default number value.
50
+ */
51
+ defaultValueNumber?: number | null;
52
+ /**
53
+ * Gets or sets the default decimal value.
54
+ */
55
+ defaultValueDecimal?: number | null;
56
+ /**
57
+ * Gets or sets the default bit value.
58
+ */
59
+ defaultValueBit?: boolean | null;
60
+ /**
61
+ * Gets or sets the default date value.
62
+ */
63
+ defaultValueDate?: string | null;
64
+ /**
65
+ * Gets or sets the default datetimeoffset value.
66
+ */
67
+ defaultValueDatetimeoffset?: string | null;
68
+ /**
69
+ * Gets or sets the default JSON value.
70
+ */
71
+ defaultValueJson?: string | null;
72
+ /**
73
+ * Gets or sets the options for select types.
74
+ */
75
+ options?: Array<CustomFieldOptionPost> | null;
76
+ /**
77
+ * Gets or sets a value indicating whether the field is archived.
78
+ */
79
+ archived?: boolean | null;
80
+ };
@@ -0,0 +1,82 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { CustomFieldDataType } from './CustomFieldDataType';
7
+ import type { CustomFieldOptionDto } from './CustomFieldOptionDto';
8
+
9
+ /**
10
+ * Represents a custom field definition with its current value for editing.
11
+ */
12
+ export type CustomFieldDefinitionWithValue = {
13
+ /**
14
+ * Gets or sets the tenant id.
15
+ */
16
+ tenantId?: string;
17
+ /**
18
+ * Gets or sets the definition id.
19
+ */
20
+ definitionId?: string | null;
21
+ /**
22
+ * Gets or sets the custom field label.
23
+ */
24
+ label?: string | null;
25
+ /**
26
+ * Gets or sets the custom field description.
27
+ */
28
+ description?: string | null;
29
+ dataType?: CustomFieldDataType;
30
+ /**
31
+ * Gets or sets a value indicating whether the field is required.
32
+ */
33
+ required?: boolean | null;
34
+ /**
35
+ * Gets or sets a value indicating whether the field has public visibility.
36
+ */
37
+ publicVisibility?: boolean | null;
38
+ /**
39
+ * Gets or sets the display order.
40
+ */
41
+ displayOrder?: number | null;
42
+ /**
43
+ * Gets or sets the validation JSON.
44
+ */
45
+ validationJson?: string | null;
46
+ /**
47
+ * Gets or sets the default text value.
48
+ */
49
+ defaultValueText?: string | null;
50
+ /**
51
+ * Gets or sets the default number value.
52
+ */
53
+ defaultValueNumber?: number | null;
54
+ /**
55
+ * Gets or sets the default decimal value.
56
+ */
57
+ defaultValueDecimal?: number | null;
58
+ /**
59
+ * Gets or sets the default bit value.
60
+ */
61
+ defaultValueBit?: boolean | null;
62
+ /**
63
+ * Gets or sets the default date value.
64
+ */
65
+ defaultValueDate?: string | null;
66
+ /**
67
+ * Gets or sets the default datetimeoffset value.
68
+ */
69
+ defaultValueDatetimeoffset?: string | null;
70
+ /**
71
+ * Gets or sets the default JSON value.
72
+ */
73
+ defaultValueJson?: string | null;
74
+ /**
75
+ * Gets or sets the options for select types.
76
+ */
77
+ options?: Array<CustomFieldOptionDto> | null;
78
+ /**
79
+ * Gets or sets the current value (can be text, number, decimal, bit, date, datetimeoffset, or json).
80
+ */
81
+ value?: any;
82
+ };
@@ -0,0 +1,50 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * Represents a custom field option within the Reach application.
8
+ */
9
+ export type CustomFieldOption = {
10
+ /**
11
+ * Gets or sets the entities Id.
12
+ */
13
+ id?: string;
14
+ /**
15
+ * Gets or sets the tenant Id.
16
+ */
17
+ tenantId: string;
18
+ /**
19
+ * Gets or sets the created date of this entity.
20
+ */
21
+ dateCreated: string;
22
+ /**
23
+ * Gets or sets the last modified date of this entity.
24
+ */
25
+ dateModified: string;
26
+ /**
27
+ * Gets or sets the modified by Id.
28
+ */
29
+ modifiedById?: string | null;
30
+ /**
31
+ * Gets or sets a value indicating whether the record is live and available for use within the application.
32
+ */
33
+ isLive: boolean;
34
+ /**
35
+ * Gets or sets the custom field definition id.
36
+ */
37
+ customFieldDefinitionId?: string | null;
38
+ /**
39
+ * Gets or sets the option label.
40
+ */
41
+ label?: string | null;
42
+ /**
43
+ * Gets or sets the display order.
44
+ */
45
+ displayOrder?: number | null;
46
+ /**
47
+ * Gets or sets a value indicating whether the option is archived.
48
+ */
49
+ archived?: boolean | null;
50
+ };
@@ -0,0 +1,14 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * Represents a custom field option DTO.
8
+ */
9
+ export type CustomFieldOptionDto = {
10
+ /**
11
+ * Gets or sets the option label.
12
+ */
13
+ label?: string | null;
14
+ };
@@ -0,0 +1,18 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * Post model for the custom field option.
8
+ */
9
+ export type CustomFieldOptionPost = {
10
+ /**
11
+ * Gets or sets the option label.
12
+ */
13
+ label?: string | null;
14
+ /**
15
+ * Gets or sets the display order.
16
+ */
17
+ displayOrder?: number | null;
18
+ };
@@ -0,0 +1,13 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * Controls the entity type for custom field values.
8
+ */
9
+ export enum CustomFieldValueEntityType {
10
+ VENUE = 'Venue',
11
+ COURSE = 'Course',
12
+ SESSION = 'Session',
13
+ }
@@ -0,0 +1,18 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * Represents a single custom field value update.
8
+ */
9
+ export type CustomFieldValueUpdate = {
10
+ /**
11
+ * Gets or sets the custom field definition id.
12
+ */
13
+ definitionId?: string;
14
+ /**
15
+ * Gets or sets the value to set.
16
+ */
17
+ value?: any;
18
+ };
@@ -0,0 +1,16 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { CustomFieldValueUpdate } from './CustomFieldValueUpdate';
7
+
8
+ /**
9
+ * Represents a bulk update request for custom fields.
10
+ */
11
+ export type CustomFieldsBulkUpdate = {
12
+ /**
13
+ * Gets or sets the list of custom field values to update.
14
+ */
15
+ values?: Array<CustomFieldValueUpdate> | null;
16
+ };
@@ -0,0 +1,26 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * Patch model for custom field options.
8
+ */
9
+ export type UpdateCustomFieldOption = {
10
+ /**
11
+ * Gets or sets the option id.
12
+ */
13
+ id?: string | null;
14
+ /**
15
+ * Gets or sets the option label.
16
+ */
17
+ label?: string | null;
18
+ /**
19
+ * Gets or sets the display order.
20
+ */
21
+ displayOrder?: number | null;
22
+ /**
23
+ * Gets or sets a value indicating whether the option is archived.
24
+ */
25
+ archived?: boolean | null;
26
+ };
@@ -11,6 +11,8 @@ import type { CoursePage } from '../models/CoursePage';
11
11
  import type { CoursePatch } from '../models/CoursePatch';
12
12
  import type { CoursePost } from '../models/CoursePost';
13
13
  import type { CourseSearchSortBy } from '../models/CourseSearchSortBy';
14
+ import type { CustomFieldDefinitionWithValue } from '../models/CustomFieldDefinitionWithValue';
15
+ import type { CustomFieldsBulkUpdate } from '../models/CustomFieldsBulkUpdate';
14
16
  import type { ScheduledSession } from '../models/ScheduledSession';
15
17
  import type { SearchSortOrderDirection } from '../models/SearchSortOrderDirection';
16
18
 
@@ -436,6 +438,67 @@ export class CoursesService {
436
438
  });
437
439
  }
438
440
 
441
+ /**
442
+ * Gets custom field definitions with their current values for a course.
443
+ * @returns CustomFieldDefinitionWithValue OK
444
+ * @throws ApiError
445
+ */
446
+ public getCustomFields({
447
+ courseId,
448
+ }: {
449
+ /**
450
+ * The course id.
451
+ */
452
+ courseId: string;
453
+ }): CancelablePromise<Array<CustomFieldDefinitionWithValue>> {
454
+ return this.httpRequest.request({
455
+ method: 'GET',
456
+ url: '/api/courses/{courseId}/custom-fields',
457
+ path: {
458
+ courseId: courseId,
459
+ },
460
+ errors: {
461
+ 400: `Bad Request`,
462
+ 422: `Unprocessable Content`,
463
+ 500: `Internal Server Error`,
464
+ },
465
+ });
466
+ }
467
+
468
+ /**
469
+ * Bulk updates custom field values for a course.
470
+ * @returns CustomFieldDefinitionWithValue OK
471
+ * @throws ApiError
472
+ */
473
+ public bulkUpdateCustomFields({
474
+ courseId,
475
+ requestBody,
476
+ }: {
477
+ /**
478
+ * The course id.
479
+ */
480
+ courseId: string;
481
+ /**
482
+ * The bulk update request containing all custom field values.
483
+ */
484
+ requestBody?: CustomFieldsBulkUpdate;
485
+ }): CancelablePromise<Array<CustomFieldDefinitionWithValue>> {
486
+ return this.httpRequest.request({
487
+ method: 'PUT',
488
+ url: '/api/courses/{courseId}/custom-fields',
489
+ path: {
490
+ courseId: courseId,
491
+ },
492
+ body: requestBody,
493
+ mediaType: 'application/json',
494
+ errors: {
495
+ 400: `Bad Request`,
496
+ 422: `Unprocessable Content`,
497
+ 500: `Internal Server Error`,
498
+ },
499
+ });
500
+ }
501
+
439
502
  /**
440
503
  * Inserts a new resource. The Id will be automatically generated and will be ignored if provided.
441
504
  * @returns Course OK