reach-api-sdk 1.0.216 → 1.0.218

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/reach-sdk.d.ts +1995 -453
  2. package/dist/reach-sdk.js +878 -2
  3. package/package.json +1 -1
  4. package/src/apiClient.ts +6 -0
  5. package/src/definition/swagger.yaml +4508 -1212
  6. package/src/index.ts +6 -0
  7. package/src/models/ActivityType.ts +1 -0
  8. package/src/models/Course.ts +20 -0
  9. package/src/models/CoursePatch.ts +16 -0
  10. package/src/models/DealActivity.ts +4 -0
  11. package/src/models/DealActivityPost.ts +4 -0
  12. package/src/models/EmailSetting.ts +4 -0
  13. package/src/models/GenericActivity.ts +24 -0
  14. package/src/models/Image.ts +4 -0
  15. package/src/models/Offer.ts +4 -0
  16. package/src/models/OfferPatch.ts +4 -0
  17. package/src/models/OfferPost.ts +4 -0
  18. package/src/models/OpportunityType.ts +1 -0
  19. package/src/models/OrderItem.ts +6 -0
  20. package/src/models/OrderPatchItem.ts +4 -0
  21. package/src/models/OrderPostItem.ts +4 -0
  22. package/src/models/SellableItem.ts +194 -0
  23. package/src/models/SellableItemPage.ts +12 -0
  24. package/src/models/SellableItemPatch.ts +150 -0
  25. package/src/models/SellableItemPost.ts +145 -0
  26. package/src/models/Session.ts +20 -0
  27. package/src/models/SessionPatch.ts +16 -0
  28. package/src/services/CoursesService.ts +30 -0
  29. package/src/services/DealActivitiesService.ts +60 -0
  30. package/src/services/EmailSettingsService.ts +30 -0
  31. package/src/services/ImagesService.ts +30 -0
  32. package/src/services/OffersService.ts +60 -0
  33. package/src/services/OrderItemsService.ts +30 -0
  34. package/src/services/PublicCoursesService.ts +12 -0
  35. package/src/services/PublicOrderItemsService.ts +12 -0
  36. package/src/services/PublicSellableItemsService.ts +473 -0
  37. package/src/services/SellableItemsService.ts +962 -0
  38. package/src/services/SessionsService.ts +2 -2
package/src/index.ts CHANGED
@@ -327,6 +327,10 @@ export type { ScheduledSessionSchedulePost } from './models/ScheduledSessionSche
327
327
  export { ScheduledSessionSearchSortBy } from './models/ScheduledSessionSearchSortBy';
328
328
  export { ScheduleStatus } from './models/ScheduleStatus';
329
329
  export { SearchSortOrderDirection } from './models/SearchSortOrderDirection';
330
+ export type { SellableItem } from './models/SellableItem';
331
+ export type { SellableItemPage } from './models/SellableItemPage';
332
+ export type { SellableItemPatch } from './models/SellableItemPatch';
333
+ export type { SellableItemPost } from './models/SellableItemPost';
330
334
  export type { Session } from './models/Session';
331
335
  export type { SessionCreate } from './models/SessionCreate';
332
336
  export type { SessionPage } from './models/SessionPage';
@@ -598,6 +602,7 @@ export { PublicOrderTokensService } from './services/PublicOrderTokensService';
598
602
  export { PublicProgrammesService } from './services/PublicProgrammesService';
599
603
  export { PublicProvidersService } from './services/PublicProvidersService';
600
604
  export { PublicScheduledSessionsService } from './services/PublicScheduledSessionsService';
605
+ export { PublicSellableItemsService } from './services/PublicSellableItemsService';
601
606
  export { PublicSessionsService } from './services/PublicSessionsService';
602
607
  export { PublicSlotsService } from './services/PublicSlotsService';
603
608
  export { PublicStorefrontStaffPreviewService } from './services/PublicStorefrontStaffPreviewService';
@@ -615,6 +620,7 @@ export { RegisterReportService } from './services/RegisterReportService';
615
620
  export { RescheduleLogService } from './services/RescheduleLogService';
616
621
  export { ScheduledSessionsService } from './services/ScheduledSessionsService';
617
622
  export { ScheduledSessionsSchedulesService } from './services/ScheduledSessionsSchedulesService';
623
+ export { SellableItemsService } from './services/SellableItemsService';
618
624
  export { SessionsService } from './services/SessionsService';
619
625
  export { SlotOffersService } from './services/SlotOffersService';
620
626
  export { SlotsService } from './services/SlotsService';
@@ -10,4 +10,5 @@ export enum ActivityType {
10
10
  FACILITY = 'Facility',
11
11
  SESSION = 'Session',
12
12
  COURSE = 'Course',
13
+ SELLABLE_ITEM = 'SellableItem',
13
14
  }
@@ -189,6 +189,26 @@ export type Course = {
189
189
  * Gets or sets a value indicating whether the activity should be featured on the storefront.
190
190
  */
191
191
  featured?: boolean;
192
+ /**
193
+ * Gets or sets a value indicating whether customers may join the activity pre-registration / waitlist when there is nothing bookable yet.
194
+ */
195
+ preRegistrationEnabled?: boolean | null;
196
+ /**
197
+ * Gets or sets when pre-registration sign-up opens. When null, there is no start boundary (sign-up is allowed from whenever the activity is eligible, until Reach.Models.ActivityBase.PreRegistrationClosesAt if set).
198
+ */
199
+ preRegistrationOpensAt?: string | null;
200
+ /**
201
+ * Gets or sets when pre-registration sign-up closes. When null, there is no end boundary while Reach.Models.ActivityBase.PreRegistrationEnabled is true.
202
+ */
203
+ preRegistrationClosesAt?: string | null;
204
+ /**
205
+ * Gets or sets optional storefront copy for the pre-registration form.
206
+ */
207
+ preRegistrationMessage?: string | null;
208
+ /**
209
+ * Gets a value indicating whether pre-registration is configured and the current instant falls inside the optional window.
210
+ */
211
+ readonly isPreRegistrationAcceptingSignUps?: boolean;
192
212
  /**
193
213
  * Gets the computed image url.
194
214
  */
@@ -153,6 +153,22 @@ export type CoursePatch = {
153
153
  * Gets or sets a value indicating whether the course is deleted and should be ignored under normal operation.
154
154
  */
155
155
  deleted?: boolean | null;
156
+ /**
157
+ * Gets or sets a value indicating whether pre-registration / waitlist is enabled for this course.
158
+ */
159
+ preRegistrationEnabled?: boolean | null;
160
+ /**
161
+ * Gets or sets when pre-registration opens; null means no start boundary.
162
+ */
163
+ preRegistrationOpensAt?: string | null;
164
+ /**
165
+ * Gets or sets when pre-registration closes; null means no end boundary.
166
+ */
167
+ preRegistrationClosesAt?: string | null;
168
+ /**
169
+ * Gets or sets optional storefront message for pre-registration.
170
+ */
171
+ preRegistrationMessage?: string | null;
156
172
  emailSettings?: UpdateEmailSettings;
157
173
  /**
158
174
  * Gets or sets the course offers.
@@ -45,5 +45,9 @@ export type DealActivity = {
45
45
  * Gets or sets the session id.
46
46
  */
47
47
  sessionId?: string | null;
48
+ /**
49
+ * Gets or sets the sellable item id.
50
+ */
51
+ sellableItemId?: string | null;
48
52
  deal?: Deal;
49
53
  };
@@ -23,4 +23,8 @@ export type DealActivityPost = {
23
23
  * Gets or sets the session id.
24
24
  */
25
25
  sessionId?: string | null;
26
+ /**
27
+ * Gets or sets the sellable item id.
28
+ */
29
+ sellableItemId?: string | null;
26
30
  };
@@ -51,6 +51,10 @@ export type EmailSetting = {
51
51
  * Gets or sets the course Id.
52
52
  */
53
53
  courseId?: string | null;
54
+ /**
55
+ * Gets or sets the sellable item Id.
56
+ */
57
+ sellableItemId?: string | null;
54
58
  /**
55
59
  * Gets or sets the order confirmation text.
56
60
  */
@@ -126,6 +126,26 @@ export type GenericActivity = {
126
126
  * Gets or sets a value indicating whether the activity should be featured on the storefront.
127
127
  */
128
128
  featured?: boolean;
129
+ /**
130
+ * Gets or sets a value indicating whether customers may join pre-registration / waitlist for this activity when there is nothing bookable yet.
131
+ */
132
+ preRegistrationEnabled?: boolean | null;
133
+ /**
134
+ * Gets or sets when pre-registration opens. Null means no start date constraint.
135
+ */
136
+ preRegistrationOpensAt?: string | null;
137
+ /**
138
+ * Gets or sets when pre-registration closes. Null means no end date constraint.
139
+ */
140
+ preRegistrationClosesAt?: string | null;
141
+ /**
142
+ * Gets or sets optional storefront copy for the pre-registration form.
143
+ */
144
+ preRegistrationMessage?: string | null;
145
+ /**
146
+ * Gets a value indicating whether pre-registration is turned on and the current time is inside the optional window.
147
+ */
148
+ readonly isPreRegistrationAcceptingSignUps?: boolean;
129
149
  /**
130
150
  * Gets or sets the start date.
131
151
  */
@@ -159,4 +179,8 @@ export type GenericActivity = {
159
179
  * Gets or sets the courses sessions (only applicable to courses).
160
180
  */
161
181
  sessions?: Array<CourseSession> | null;
182
+ /**
183
+ * Gets or sets remaining inventory for Reach.Models.ActivityType.SellableItem (populated on list/detail when applicable).
184
+ */
185
+ stockQuantity?: number | null;
162
186
  };
@@ -52,6 +52,10 @@ export type Image = {
52
52
  * Gets or sets the images course id.
53
53
  */
54
54
  courseId?: string | null;
55
+ /**
56
+ * Gets or sets the sellable item id.
57
+ */
58
+ sellableItemId?: string | null;
55
59
  /**
56
60
  * Gets or sets the images programme id.
57
61
  */
@@ -53,6 +53,10 @@ export type Offer = {
53
53
  * Gets or sets the course id.
54
54
  */
55
55
  courseId?: string | null;
56
+ /**
57
+ * Gets or sets the sellable item id.
58
+ */
59
+ sellableItemId?: string | null;
56
60
  /**
57
61
  * Gets or sets the survey id.
58
62
  */
@@ -31,6 +31,10 @@ export type OfferPatch = {
31
31
  * Gets or sets the course id.
32
32
  */
33
33
  courseId?: string | null;
34
+ /**
35
+ * Gets or sets the sellable item id.
36
+ */
37
+ sellableItemId?: string | null;
34
38
  /**
35
39
  * Gets or sets the survey id.
36
40
  */
@@ -27,6 +27,10 @@ export type OfferPost = {
27
27
  * Gets or sets the course id.
28
28
  */
29
29
  courseId?: string | null;
30
+ /**
31
+ * Gets or sets the sellable item id.
32
+ */
33
+ sellableItemId?: string | null;
30
34
  /**
31
35
  * Gets or sets the survey id.
32
36
  */
@@ -10,4 +10,5 @@ export enum OpportunityType {
10
10
  SLOT = 'Slot',
11
11
  SCHEDULED_SESSION = 'ScheduledSession',
12
12
  COURSE = 'Course',
13
+ SELLABLE_ITEM = 'SellableItem',
13
14
  }
@@ -12,6 +12,7 @@ import type { Order } from './Order';
12
12
  import type { OrderItemDeal } from './OrderItemDeal';
13
13
  import type { OrderItemStatus } from './OrderItemStatus';
14
14
  import type { ScheduledSession } from './ScheduledSession';
15
+ import type { SellableItem } from './SellableItem';
15
16
  import type { Slot } from './Slot';
16
17
 
17
18
  /**
@@ -58,6 +59,10 @@ export type OrderItem = {
58
59
  * Gets or sets the course id.
59
60
  */
60
61
  courseId?: string | null;
62
+ /**
63
+ * Gets or sets the sellable item id.
64
+ */
65
+ sellableItemId?: string | null;
61
66
  /**
62
67
  * Gets or sets the offer id.
63
68
  */
@@ -111,6 +116,7 @@ export type OrderItem = {
111
116
  slot?: Slot;
112
117
  scheduledSession?: ScheduledSession;
113
118
  course?: Course;
119
+ sellableItem?: SellableItem;
114
120
  offer?: Offer;
115
121
  /**
116
122
  * Gets or sets the order item deals.
@@ -23,6 +23,10 @@ export type OrderPatchItem = {
23
23
  * Gets or sets the course id.
24
24
  */
25
25
  courseId?: string | null;
26
+ /**
27
+ * Gets or sets the sellable item id.
28
+ */
29
+ sellableItemId?: string | null;
26
30
  /**
27
31
  * Gets or sets the offer id.
28
32
  */
@@ -19,6 +19,10 @@ export type OrderPostItem = {
19
19
  * Gets or sets the course id.
20
20
  */
21
21
  courseId?: string | null;
22
+ /**
23
+ * Gets or sets the sellable item id.
24
+ */
25
+ sellableItemId?: string | null;
22
26
  /**
23
27
  * Gets or sets the offer id.
24
28
  */
@@ -0,0 +1,194 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { Activity } from './Activity';
7
+ import type { CancellationPolicy } from './CancellationPolicy';
8
+ import type { CheckoutPlatform } from './CheckoutPlatform';
9
+ import type { Deal } from './Deal';
10
+ import type { Gender } from './Gender';
11
+ import type { Image } from './Image';
12
+ import type { Offer } from './Offer';
13
+ import type { PaymentPolicy } from './PaymentPolicy';
14
+ import type { Venue } from './Venue';
15
+
16
+ /**
17
+ * A venue-scoped product with inventory (no scheduled session or course).
18
+ */
19
+ export type SellableItem = {
20
+ /**
21
+ * Gets or sets the entities Id.
22
+ */
23
+ id?: string;
24
+ /**
25
+ * Gets or sets the tenant Id.
26
+ */
27
+ tenantId: string;
28
+ /**
29
+ * Gets or sets the created date of this entity.
30
+ */
31
+ dateCreated: string;
32
+ /**
33
+ * Gets or sets the last modified date of this entity.
34
+ */
35
+ dateModified: string;
36
+ /**
37
+ * Gets or sets the modified by Id.
38
+ */
39
+ modifiedById?: string | null;
40
+ /**
41
+ * Gets or sets a value indicating whether the record is live and available for use within the application.
42
+ */
43
+ isLive: boolean;
44
+ /**
45
+ * Gets or sets the provider id.
46
+ */
47
+ providerId?: string | null;
48
+ /**
49
+ * Gets or sets the venue id.
50
+ */
51
+ venueId?: string | null;
52
+ /**
53
+ * Gets or sets the activity category id.
54
+ */
55
+ activityId?: number | null;
56
+ /**
57
+ * Gets or sets the name.
58
+ */
59
+ name?: string | null;
60
+ /**
61
+ * Gets or sets the description.
62
+ */
63
+ description?: string | null;
64
+ /**
65
+ * Gets or sets the image url.
66
+ */
67
+ imageUrl?: string | null;
68
+ /**
69
+ * Gets or sets a value indicating whether the item is bookable on the web.
70
+ */
71
+ online?: boolean | null;
72
+ /**
73
+ * Gets or sets a value indicating whether the item is archived.
74
+ */
75
+ archived?: boolean | null;
76
+ /**
77
+ * Gets or sets a value indicating whether the item is deleted.
78
+ */
79
+ deleted?: boolean | null;
80
+ /**
81
+ * Gets or sets remaining stock (decremented when orders are booked).
82
+ */
83
+ stockQuantity?: number;
84
+ /**
85
+ * Gets or sets a value indicating whether the item is featured on the storefront.
86
+ */
87
+ featured?: boolean;
88
+ /**
89
+ * Gets or sets a value indicating whether the item is private.
90
+ */
91
+ private?: boolean;
92
+ /**
93
+ * Gets or sets the checkout survey id.
94
+ */
95
+ surveyId?: string | null;
96
+ /**
97
+ * Gets or sets the post-completion survey id.
98
+ */
99
+ postCompletionSurveyId?: string | null;
100
+ /**
101
+ * Gets or sets the cancellation policy id.
102
+ */
103
+ cancellationPolicyId?: string;
104
+ /**
105
+ * Gets or sets the payment policy id.
106
+ */
107
+ paymentPolicyId?: string;
108
+ gender?: Gender;
109
+ /**
110
+ * Gets or sets the min age.
111
+ */
112
+ minAge?: number | null;
113
+ /**
114
+ * Gets or sets the max age.
115
+ */
116
+ maxAge?: number | null;
117
+ /**
118
+ * Gets or sets a value indicating whether there is no age restriction.
119
+ */
120
+ noAgeRestriction?: boolean;
121
+ /**
122
+ * Gets or sets additional support options.
123
+ */
124
+ additionalSupport?: Array<string> | null;
125
+ /**
126
+ * Gets or sets the contact name.
127
+ */
128
+ contactName?: string | null;
129
+ /**
130
+ * Gets or sets the contact phone.
131
+ */
132
+ contactPhone?: string | null;
133
+ /**
134
+ * Gets or sets the contact email.
135
+ */
136
+ contactEmail?: string | null;
137
+ /**
138
+ * Gets or sets the admin contact name.
139
+ */
140
+ adminContactName?: string | null;
141
+ /**
142
+ * Gets or sets the admin contact phone.
143
+ */
144
+ adminContactPhone?: string | null;
145
+ /**
146
+ * Gets or sets the admin contact email.
147
+ */
148
+ adminContactEmail?: string | null;
149
+ /**
150
+ * Gets or sets a value indicating whether to send reminder emails.
151
+ */
152
+ sendReminder?: boolean | null;
153
+ /**
154
+ * Gets or sets the reminder hours before start.
155
+ */
156
+ reminderHoursBeforeStart?: number | null;
157
+ checkoutPlatform?: CheckoutPlatform;
158
+ /**
159
+ * Gets or sets the booking link override when checkout is external.
160
+ */
161
+ bookingLinkOverride?: string | null;
162
+ /**
163
+ * Gets or sets a value indicating whether pre-registration is enabled.
164
+ */
165
+ preRegistrationEnabled?: boolean | null;
166
+ /**
167
+ * Gets or sets when pre-registration opens.
168
+ */
169
+ preRegistrationOpensAt?: string | null;
170
+ /**
171
+ * Gets or sets when pre-registration closes.
172
+ */
173
+ preRegistrationClosesAt?: string | null;
174
+ /**
175
+ * Gets or sets the pre-registration storefront message.
176
+ */
177
+ preRegistrationMessage?: string | null;
178
+ venue?: Venue;
179
+ cancellationPolicy?: CancellationPolicy;
180
+ paymentPolicy?: PaymentPolicy;
181
+ activity?: Activity;
182
+ /**
183
+ * Gets or sets offers for this item.
184
+ */
185
+ offers?: Array<Offer> | null;
186
+ /**
187
+ * Gets or sets images.
188
+ */
189
+ images?: Array<Image> | null;
190
+ /**
191
+ * Gets or sets deals applicable to this item.
192
+ */
193
+ deals?: Array<Deal> | null;
194
+ };
@@ -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 { Pagination } from './Pagination';
7
+ import type { SellableItem } from './SellableItem';
8
+
9
+ export type SellableItemPage = {
10
+ pagination: Pagination;
11
+ readonly items: Array<SellableItem>;
12
+ };
@@ -0,0 +1,150 @@
1
+ /* generated using openapi-typescript-codegen -- do no edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+
6
+ import type { CheckoutPlatform } from './CheckoutPlatform';
7
+ import type { Gender } from './Gender';
8
+ import type { UpdateEmailSettings } from './UpdateEmailSettings';
9
+ import type { UpdateOffer } from './UpdateOffer';
10
+
11
+ /**
12
+ * Patch model for sellable item updates.
13
+ */
14
+ export type SellableItemPatch = {
15
+ /**
16
+ * Gets or sets the tenant Id.
17
+ */
18
+ tenantId: string;
19
+ /**
20
+ * Gets or sets the Id.
21
+ */
22
+ id: string;
23
+ /**
24
+ * Gets or sets the venue id.
25
+ */
26
+ venueId?: string | null;
27
+ /**
28
+ * Gets or sets the activity category id.
29
+ */
30
+ activityId?: number | null;
31
+ /**
32
+ * Gets or sets the name.
33
+ */
34
+ name?: string | null;
35
+ /**
36
+ * Gets or sets the description.
37
+ */
38
+ description?: string | null;
39
+ /**
40
+ * Gets or sets the image url.
41
+ */
42
+ imageUrl?: string | null;
43
+ /**
44
+ * Gets or sets a value indicating whether the item is bookable on the web.
45
+ */
46
+ online?: boolean | null;
47
+ /**
48
+ * Gets or sets remaining stock.
49
+ */
50
+ stockQuantity?: number;
51
+ /**
52
+ * Gets or sets a value indicating whether the item is featured.
53
+ */
54
+ featured?: boolean | null;
55
+ /**
56
+ * Gets or sets a value indicating whether the item is private.
57
+ */
58
+ private?: boolean | null;
59
+ /**
60
+ * Gets or sets the checkout survey id.
61
+ */
62
+ surveyId?: string | null;
63
+ /**
64
+ * Gets or sets the post-completion survey id.
65
+ */
66
+ postCompletionSurveyId?: string | null;
67
+ /**
68
+ * Gets or sets the cancellation policy id.
69
+ */
70
+ cancellationPolicyId?: string | null;
71
+ /**
72
+ * Gets or sets the payment policy id.
73
+ */
74
+ paymentPolicyId?: string | null;
75
+ gender?: Gender;
76
+ /**
77
+ * Gets or sets the min age.
78
+ */
79
+ minAge?: number | null;
80
+ /**
81
+ * Gets or sets the max age.
82
+ */
83
+ maxAge?: number | null;
84
+ /**
85
+ * Gets or sets a value indicating whether there is no age restriction.
86
+ */
87
+ noAgeRestriction?: boolean | null;
88
+ /**
89
+ * Gets or sets additional support options.
90
+ */
91
+ additionalSupport?: Array<string> | null;
92
+ /**
93
+ * Gets or sets the contact name.
94
+ */
95
+ contactName?: string | null;
96
+ /**
97
+ * Gets or sets the contact phone.
98
+ */
99
+ contactPhone?: string | null;
100
+ /**
101
+ * Gets or sets the contact email.
102
+ */
103
+ contactEmail?: string | null;
104
+ /**
105
+ * Gets or sets the admin contact name.
106
+ */
107
+ adminContactName?: string | null;
108
+ /**
109
+ * Gets or sets the admin contact phone.
110
+ */
111
+ adminContactPhone?: string | null;
112
+ /**
113
+ * Gets or sets the admin contact email.
114
+ */
115
+ adminContactEmail?: string | null;
116
+ /**
117
+ * Gets or sets a value indicating whether to send reminder emails.
118
+ */
119
+ sendReminder?: boolean | null;
120
+ /**
121
+ * Gets or sets the reminder hours before start.
122
+ */
123
+ reminderHoursBeforeStart?: number | null;
124
+ checkoutPlatform?: CheckoutPlatform;
125
+ /**
126
+ * Gets or sets the booking link override.
127
+ */
128
+ bookingLinkOverride?: string | null;
129
+ /**
130
+ * Gets or sets a value indicating whether pre-registration is enabled.
131
+ */
132
+ preRegistrationEnabled?: boolean | null;
133
+ /**
134
+ * Gets or sets when pre-registration opens.
135
+ */
136
+ preRegistrationOpensAt?: string | null;
137
+ /**
138
+ * Gets or sets when pre-registration closes.
139
+ */
140
+ preRegistrationClosesAt?: string | null;
141
+ /**
142
+ * Gets or sets the pre-registration message.
143
+ */
144
+ preRegistrationMessage?: string | null;
145
+ emailSettings?: UpdateEmailSettings;
146
+ /**
147
+ * Gets or sets ticket types / offers for this item.
148
+ */
149
+ offers?: Array<UpdateOffer> | null;
150
+ };