@compassdigital/sdk.typescript 4.6.0 → 4.7.0

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.
@@ -11,31 +11,102 @@ export interface StandardCognitionEvent {
11
11
  order_id: string;
12
12
  }
13
13
 
14
+ export interface AmazonJWOAuthEventDTO {
15
+ id: string;
16
+ timestamp: string;
17
+ location: "ENTRY" | "EXIT";
18
+ }
19
+
20
+ export interface AmazonJWOIdentityKeysRequestDTO {
21
+ authEvent: AmazonJWOAuthEventDTO;
22
+ identityKey: string;
23
+ requestId: string;
24
+ storeId: string;
25
+ }
26
+
27
+ export interface VisitDetailsDTO {
28
+ id: string;
29
+ type: "SHOPPER" | "ASSOCIATE" | "CASH_SHOPPER";
30
+ }
31
+
32
+ export interface AmazonJWOIdentityKeysResponseDTO {
33
+ visitDetails: VisitDetailsDTO;
34
+ }
35
+
36
+ export interface BadRequestErrorDTO {
37
+ message: string;
38
+ code: number;
39
+ data: Record<string, any>;
40
+ }
41
+
42
+ export interface UnauthorizedErrorDTO {
43
+ message: string;
44
+ code: number;
45
+ data: Record<string, any>;
46
+ }
47
+
48
+ export interface ShoppingTrip {
49
+ startTime: string;
50
+ endTime: string;
51
+ authEvents: AmazonJWOAuthEventDTO[];
52
+ }
53
+
54
+ export interface Quantity {
55
+ value: string;
56
+ unit: string;
57
+ }
58
+
59
+ export interface CartItem {
60
+ id: string;
61
+ type: string;
62
+ quantity: Quantity;
63
+ }
64
+
65
+ export interface ShopperIdentity {
66
+ id: string;
67
+ }
68
+
69
+ export interface AmazonJWOOrderingRequestDTO {
70
+ requestId: string;
71
+ idempotentShoppingTripId: string;
72
+ storeId: string;
73
+ shoppingTrip: ShoppingTrip;
74
+ cartItems: CartItem[];
75
+ shopperIdentity: ShopperIdentity;
76
+ }
77
+
78
+ export interface AmazonJWOOrderingResponseDTO {
79
+ purchaseId: string;
80
+ }
81
+
14
82
  export interface FrictionlessSupportResponse {
15
83
  supported: boolean;
16
84
  version?: "NFC" | "QR";
17
85
  }
18
86
 
19
87
  export interface ForbiddenErrorDTO {
20
- statusCode: number;
21
- timestamp: string;
22
88
  message: string;
89
+ code: number;
90
+ data: Record<string, any>;
23
91
  }
24
92
 
25
93
  export interface NotFoundErrorDTO {
26
- statusCode: number;
27
- timestamp: string;
28
94
  message: string;
95
+ code: number;
96
+ data: Record<string, any>;
29
97
  }
30
98
 
31
- export type MealplanDTO = Record<string, any>;
99
+ export interface MealplanDTO {
100
+ tenderID: string;
101
+ name: string;
102
+ }
32
103
 
33
104
  export interface CreditCardDTO {
34
105
  cardType: string;
35
106
  last4: string;
36
107
  }
37
108
 
38
- export interface PaymentMethod {
109
+ export interface PaymentMethodDTO {
39
110
  mealplan?: MealplanDTO;
40
111
  creditCard?: CreditCardDTO;
41
112
  token: string;
@@ -44,7 +115,7 @@ export interface PaymentMethod {
44
115
  export interface CreateFrictionlessQRCodeCommand {
45
116
  brandID: string;
46
117
  userID: string;
47
- paymentMethod: PaymentMethod;
118
+ paymentMethod: PaymentMethodDTO;
48
119
  }
49
120
 
50
121
  export interface QRCodeCreationResponse {
@@ -53,10 +124,22 @@ export interface QRCodeCreationResponse {
53
124
  id: string;
54
125
  }
55
126
 
56
- export interface UnprocessableEntityErrorDTO {
57
- statusCode: number;
127
+ export interface DisplayMessageDTO {
128
+ title: string;
129
+ description: string;
130
+ }
131
+
132
+ export interface ErrorDataDTO {
133
+ description: string;
58
134
  timestamp: string;
135
+ statusCode: number;
136
+ displayMessage: DisplayMessageDTO;
137
+ }
138
+
139
+ export interface UnprocessableEntityErrorDTO {
140
+ code: number;
59
141
  message: string;
142
+ data: ErrorDataDTO;
60
143
  }
61
144
 
62
145
  export interface FailedCheckInDTO {
@@ -66,90 +149,157 @@ export interface FailedCheckInDTO {
66
149
  reason: string;
67
150
  }
68
151
 
69
- export interface CheckCheckInStatusResponseDTO {
70
- status: "CREATING" | "ACTIVE" | "ERROR" | "CANCELED" | "PROCESSING" | "COMPLETED";
152
+ export interface GetCheckInStatusResponseDTO {
153
+ status:
154
+ | "CREATING"
155
+ | "ACTIVE"
156
+ | "ERROR"
157
+ | "CANCELED"
158
+ | "PROCESSING"
159
+ | "UPDATE_PAYMENT_REQUIRED"
160
+ | "COMPLETED";
161
+ }
162
+
163
+ export interface CheckInPaymentRequiredDTO {
164
+ id: string;
71
165
  }
72
166
 
73
167
  // POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
74
168
 
75
- export type StandardCognitionEventWebhookControllerExecuteBody = StandardCognitionEvent;
169
+ export type PostFrictionlessWebhookStandardcognitionBody = StandardCognitionEvent;
170
+
171
+ export type PostFrictionlessWebhookStandardcognitionResponse = {};
172
+
173
+ export interface PostFrictionlessWebhookStandardcognitionRequest extends BaseRequest {
174
+ body: PostFrictionlessWebhookStandardcognitionBody;
175
+ }
176
+
177
+ // POST /frictionless/amazon-jwo-connector/v1/identity/identity-keys - Amazon JWO Identity Key Connector
178
+
179
+ export type PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody =
180
+ AmazonJWOIdentityKeysRequestDTO;
181
+
182
+ export type PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysResponse =
183
+ AmazonJWOIdentityKeysResponseDTO;
184
+
185
+ export interface PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysRequest
186
+ extends BaseRequest {
187
+ body: PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody;
188
+ }
189
+
190
+ // POST /frictionless/amazon-jwo-connector/v1/order/purchases - Amazon JWO Ordering Connector
191
+
192
+ export type PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody = AmazonJWOOrderingRequestDTO;
76
193
 
77
- export type StandardCognitionEventWebhookControllerExecuteResponse = {};
194
+ export type PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse =
195
+ AmazonJWOOrderingResponseDTO;
78
196
 
79
- export interface StandardCognitionEventWebhookControllerExecuteRequest extends BaseRequest {
80
- body: StandardCognitionEventWebhookControllerExecuteBody;
197
+ export interface PostFrictionlessAmazonJwoConnectorV1OrderPurchasesRequest extends BaseRequest {
198
+ body: PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody;
81
199
  }
82
200
 
83
201
  // GET /frictionless/brand/{id_brand}/frictionless-status - Check frictionless support of a given brand
84
202
 
85
- export interface CheckFrictionlessSupportControllerExecutePath {
203
+ export interface GetFrictionlessBrandFrictionlessStatusPath {
86
204
  // Brand ID as Encoded CDL ID
87
205
  id_brand: string;
88
206
  }
89
207
 
90
- export interface CheckFrictionlessSupportControllerExecuteQuery {
208
+ export interface GetFrictionlessBrandFrictionlessStatusQuery {
91
209
  // Graphql query string
92
210
  _query?: string;
93
211
  }
94
212
 
95
- export type CheckFrictionlessSupportControllerExecuteResponse = FrictionlessSupportResponse;
213
+ export type GetFrictionlessBrandFrictionlessStatusResponse = FrictionlessSupportResponse;
96
214
 
97
- export interface CheckFrictionlessSupportControllerExecuteRequest
215
+ export interface GetFrictionlessBrandFrictionlessStatusRequest
98
216
  extends BaseRequest,
99
- RequestQuery<CheckFrictionlessSupportControllerExecuteQuery>,
100
- CheckFrictionlessSupportControllerExecutePath {}
217
+ RequestQuery<GetFrictionlessBrandFrictionlessStatusQuery>,
218
+ GetFrictionlessBrandFrictionlessStatusPath {}
101
219
 
102
220
  // POST /frictionless/qrcode - Create Frictionless QR Code to make user able to check in
103
221
 
104
- export type CreateQRCodeUserCheckInControllerExecuteBody = CreateFrictionlessQRCodeCommand;
222
+ export type PostFrictionlessQrCodeBody = CreateFrictionlessQRCodeCommand;
105
223
 
106
- export type CreateQRCodeUserCheckInControllerExecuteResponse = {};
224
+ export type PostFrictionlessQrCodeResponse = {};
107
225
 
108
- export interface CreateQRCodeUserCheckInControllerExecuteRequest extends BaseRequest {
109
- body: CreateQRCodeUserCheckInControllerExecuteBody;
226
+ export interface PostFrictionlessQrCodeRequest extends BaseRequest {
227
+ body: PostFrictionlessQrCodeBody;
110
228
  }
111
229
 
112
230
  // GET /frictionless/failed-checkins - List check-ins on error
113
231
 
114
- export interface ListFailedCheckinsControllerExecuteQuery {
232
+ export interface GetFrictionlessFailedCheckinsQuery {
115
233
  // Graphql query string
116
234
  _query?: string;
117
235
  }
118
236
 
119
- export type ListFailedCheckinsControllerExecuteResponse = FailedCheckInDTO[];
237
+ export type GetFrictionlessFailedCheckinsResponse = FailedCheckInDTO[];
120
238
 
121
- export interface ListFailedCheckinsControllerExecuteRequest
239
+ export interface GetFrictionlessFailedCheckinsRequest
122
240
  extends BaseRequest,
123
- RequestQuery<ListFailedCheckinsControllerExecuteQuery> {}
241
+ RequestQuery<GetFrictionlessFailedCheckinsQuery> {}
124
242
 
125
- // POST /frictionless/checkin/{id_checkin}/reprocess - Reprocess checkin on error
243
+ // POST /frictionless/checkins/{id_checkin}/reprocess - Reprocess checkin on error
126
244
 
127
- export interface ReprocessCheckinOnErrorControllerExecutePath {
128
- // TODO: add parameter to swagger.json
245
+ export interface PostFrictionlessCheckinsReprocessPath {
129
246
  id_checkin: string;
130
247
  }
131
248
 
132
- export type ReprocessCheckinOnErrorControllerExecuteResponse = {};
249
+ export type PostFrictionlessCheckinsReprocessResponse = {};
133
250
 
134
- export interface ReprocessCheckinOnErrorControllerExecuteRequest
251
+ export interface PostFrictionlessCheckinsReprocessRequest
135
252
  extends BaseRequest,
136
- ReprocessCheckinOnErrorControllerExecutePath {}
253
+ PostFrictionlessCheckinsReprocessPath {}
137
254
 
138
- // GET /frictionless/checkin/{id_checkin}/status - Fetch CheckIn status
255
+ // GET /frictionless/checkin/{id_checkin}/status - Fetch CheckIn Status
139
256
 
140
- export interface CheckCheckinStatusControllerExecutePath {
141
- // TODO: add parameter to swagger.json
257
+ export interface GetFrictionlessCheckinStatusPath {
142
258
  id_checkin: string;
143
259
  }
144
260
 
145
- export interface CheckCheckinStatusControllerExecuteQuery {
261
+ export interface GetFrictionlessCheckinStatusQuery {
146
262
  // Graphql query string
147
263
  _query?: string;
148
264
  }
149
265
 
150
- export type CheckCheckinStatusControllerExecuteResponse = CheckCheckInStatusResponseDTO;
266
+ export type GetFrictionlessCheckinStatusResponse = GetCheckInStatusResponseDTO;
151
267
 
152
- export interface CheckCheckinStatusControllerExecuteRequest
268
+ export interface GetFrictionlessCheckinStatusRequest
153
269
  extends BaseRequest,
154
- RequestQuery<CheckCheckinStatusControllerExecuteQuery>,
155
- CheckCheckinStatusControllerExecutePath {}
270
+ RequestQuery<GetFrictionlessCheckinStatusQuery>,
271
+ GetFrictionlessCheckinStatusPath {}
272
+
273
+ // GET /frictionless/users/{user_id}/checkins/payment-issues - List check-ins with update payment required per user
274
+
275
+ export interface GetFrictionlessUsersPaymentIssuesPath {
276
+ user_id: string;
277
+ }
278
+
279
+ export interface GetFrictionlessUsersPaymentIssuesQuery {
280
+ // Graphql query string
281
+ _query?: string;
282
+ }
283
+
284
+ export type GetFrictionlessUsersPaymentIssuesResponse = CheckInPaymentRequiredDTO[];
285
+
286
+ export interface GetFrictionlessUsersPaymentIssuesRequest
287
+ extends BaseRequest,
288
+ RequestQuery<GetFrictionlessUsersPaymentIssuesQuery>,
289
+ GetFrictionlessUsersPaymentIssuesPath {}
290
+
291
+ // POST /frictionless/checkins/{checkin_id}/reprocess-payment - Update payment at checkin and trigger reprocessing
292
+
293
+ export interface PostFrictionlessCheckinReprocessPaymentPath {
294
+ checkin_id: string;
295
+ }
296
+
297
+ export type PostFrictionlessCheckinReprocessPaymentBody = PaymentMethodDTO;
298
+
299
+ export type PostFrictionlessCheckinReprocessPaymentResponse = {};
300
+
301
+ export interface PostFrictionlessCheckinReprocessPaymentRequest
302
+ extends BaseRequest,
303
+ PostFrictionlessCheckinReprocessPaymentPath {
304
+ body: PostFrictionlessCheckinReprocessPaymentBody;
305
+ }
@@ -81,6 +81,7 @@ export interface PostMealplanBody {
81
81
  password?: string;
82
82
  // Used for email domain validation, if enabled for current mealplan.
83
83
  email?: string;
84
+ lang?: string;
84
85
  }
85
86
 
86
87
  export interface PostMealplanResponse {