@compassdigital/sdk.typescript 4.897.0 → 4.899.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.
package/src/index.ts CHANGED
@@ -1721,10 +1721,22 @@ import {
1721
1721
  PatchCentricPosOrderReceiptEmailResponse,
1722
1722
  PostCentricPosOrderReceiptBody,
1723
1723
  PostCentricPosOrderReceiptResponse,
1724
+ GetCentricPosAdminDeviceResponse,
1725
+ PutCentricPosAdminDeviceSettingsBody,
1726
+ PutCentricPosAdminDeviceSettingsResponse,
1727
+ DeleteCentricPosAdminDeviceSettingsResponse,
1724
1728
  GetCentricPosDigitalSignageOrdersQuery,
1725
1729
  GetCentricPosDigitalSignageOrdersResponse,
1726
1730
  } from './interface/centric-pos';
1727
1731
 
1732
+ import {
1733
+ QueryAuditEventsBody,
1734
+ QueryAuditEventsResponse,
1735
+ GetAuditEventResponse,
1736
+ PostAuditEventBody,
1737
+ PostAuditEventResponse,
1738
+ } from './interface/audit';
1739
+
1728
1740
  import { BaseServiceClient, RequestOptions, ServiceClientOptions, ResponsePromise } from './base';
1729
1741
  export * from './base';
1730
1742
 
@@ -19856,6 +19868,68 @@ export class ServiceClient extends BaseServiceClient {
19856
19868
  );
19857
19869
  }
19858
19870
 
19871
+ /**
19872
+ * GET /centric-pos/v1/admin/device/{serialNumber} - Get a POS device with its settings
19873
+ *
19874
+ * @param serialNumber - Serial number of the device
19875
+ * @param options - additional request options
19876
+ */
19877
+ get_centric_pos_admin_device(
19878
+ serialNumber: string,
19879
+ options?: RequestOptions,
19880
+ ): ResponsePromise<GetCentricPosAdminDeviceResponse> {
19881
+ return this.request(
19882
+ 'centric-pos',
19883
+ '/centric-pos/v1/admin/device/{serialNumber}',
19884
+ 'GET',
19885
+ `/centric-pos/v1/admin/device/${serialNumber}`,
19886
+ null,
19887
+ options,
19888
+ );
19889
+ }
19890
+
19891
+ /**
19892
+ * PUT /centric-pos/v1/admin/device/{serialNumber}/settings - Save a POS device's location and hidden stations
19893
+ *
19894
+ * @param serialNumber - Serial number of the device
19895
+ * @param body
19896
+ * @param options - additional request options
19897
+ */
19898
+ put_centric_pos_admin_device_settings(
19899
+ serialNumber: string,
19900
+ body: PutCentricPosAdminDeviceSettingsBody,
19901
+ options?: RequestOptions,
19902
+ ): ResponsePromise<PutCentricPosAdminDeviceSettingsResponse> {
19903
+ return this.request(
19904
+ 'centric-pos',
19905
+ '/centric-pos/v1/admin/device/{serialNumber}/settings',
19906
+ 'PUT',
19907
+ `/centric-pos/v1/admin/device/${serialNumber}/settings`,
19908
+ body,
19909
+ options,
19910
+ );
19911
+ }
19912
+
19913
+ /**
19914
+ * DELETE /centric-pos/v1/admin/device/{serialNumber}/settings - Clear a POS device's settings without unregistering it
19915
+ *
19916
+ * @param serialNumber - Serial number of the device
19917
+ * @param options - additional request options
19918
+ */
19919
+ delete_centric_pos_admin_device_settings(
19920
+ serialNumber: string,
19921
+ options?: RequestOptions,
19922
+ ): ResponsePromise<DeleteCentricPosAdminDeviceSettingsResponse> {
19923
+ return this.request(
19924
+ 'centric-pos',
19925
+ '/centric-pos/v1/admin/device/{serialNumber}/settings',
19926
+ 'DELETE',
19927
+ `/centric-pos/v1/admin/device/${serialNumber}/settings`,
19928
+ null,
19929
+ options,
19930
+ );
19931
+ }
19932
+
19859
19933
  /**
19860
19934
  * GET /centric-pos/innovation/v1/digital-signage/orders/{stationId} - Get in-progress and ready orders for a station
19861
19935
  *
@@ -19877,4 +19951,54 @@ export class ServiceClient extends BaseServiceClient {
19877
19951
  options,
19878
19952
  );
19879
19953
  }
19954
+
19955
+ /**
19956
+ * POST /audit/events/query - Query audit events
19957
+ *
19958
+ * @param body
19959
+ * @param options - additional request options
19960
+ */
19961
+ query_audit_events(
19962
+ body: QueryAuditEventsBody,
19963
+ options?: RequestOptions,
19964
+ ): ResponsePromise<QueryAuditEventsResponse> {
19965
+ return this.request(
19966
+ 'audit',
19967
+ '/audit/events/query',
19968
+ 'POST',
19969
+ `/audit/events/query`,
19970
+ body,
19971
+ options,
19972
+ );
19973
+ }
19974
+
19975
+ /**
19976
+ * GET /audit/events/{id} - Get a single audit event by ID
19977
+ *
19978
+ * @param id - Audit event ID
19979
+ * @param options - additional request options
19980
+ */
19981
+ get_audit_event(id: string, options?: RequestOptions): ResponsePromise<GetAuditEventResponse> {
19982
+ return this.request(
19983
+ 'audit',
19984
+ '/audit/events/{id}',
19985
+ 'GET',
19986
+ `/audit/events/${id}`,
19987
+ null,
19988
+ options,
19989
+ );
19990
+ }
19991
+
19992
+ /**
19993
+ * POST /audit/ingest - Ingest an audit event
19994
+ *
19995
+ * @param body
19996
+ * @param options - additional request options
19997
+ */
19998
+ post_audit_event(
19999
+ body: PostAuditEventBody,
20000
+ options?: RequestOptions,
20001
+ ): ResponsePromise<PostAuditEventResponse> {
20002
+ return this.request('audit', '/audit/ingest', 'POST', `/audit/ingest`, body, options);
20003
+ }
19880
20004
  }
@@ -0,0 +1,165 @@
1
+ /* eslint-disable */
2
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
3
+
4
+ import { RequestQuery, BaseRequest } from './util';
5
+
6
+ export interface EntityRefFilterDTO {
7
+ // Entity type, e.g. location, brand, calendar
8
+ type: string;
9
+ // Entity ID
10
+ id: string;
11
+ }
12
+
13
+ export interface GetAuditEventsQueryDTO {
14
+ // Full-text search across action, source, resource name, and error message
15
+ q?: string;
16
+ // Filter by action, e.g. calendar_updated
17
+ action?: string;
18
+ // Filter by originating service, e.g. calendar-service
19
+ source?: string;
20
+ // Entity ref filters — each entry must match a nested entity_ref on the event. Multiple entries are AND-ed together. Use indexed notation: entity_refs[0][type]=location&entity_refs[0][id]=loc-123&entity_refs[1][type]=brand&entity_refs[1][id]=brand-456
21
+ entity_refs?: EntityRefFilterDTO[];
22
+ // Filter by actor user ID
23
+ actor_id?: string;
24
+ actor_type?: 'human' | 'service' | 'system';
25
+ outcome?: 'success' | 'failure';
26
+ // ISO 8601 start date (inclusive)
27
+ from?: string;
28
+ // ISO 8601 end date (inclusive)
29
+ to?: string;
30
+ // Dot-path that must exist in changes.old, e.g. timezone
31
+ old_path?: string;
32
+ // Value at old_path — use with old_path
33
+ old_value?: string;
34
+ // Dot-path that must exist in changes.new, e.g. timezone
35
+ new_path?: string;
36
+ // Value at new_path — use with new_path
37
+ new_value?: string;
38
+ // Page number (1-based)
39
+ page?: number;
40
+ // Items per page (max 100)
41
+ limit?: number;
42
+ }
43
+
44
+ export interface AuditActorDTO {
45
+ id: string;
46
+ type: 'human' | 'internal' | 'external';
47
+ }
48
+
49
+ export interface AuditResourceDTO {
50
+ type: string;
51
+ id: string;
52
+ name: string;
53
+ }
54
+
55
+ export interface AuditEntityRefDTO {
56
+ type: string;
57
+ id: string;
58
+ name?: string;
59
+ }
60
+
61
+ export interface AuditEventResponseDTO {
62
+ id: string;
63
+ action: string;
64
+ description?: string;
65
+ source: string;
66
+ timestamp: string;
67
+ ingested_at: string;
68
+ outcome: 'success' | 'failure';
69
+ correlation_id?: string;
70
+ actor: AuditActorDTO;
71
+ resource: AuditResourceDTO;
72
+ entity_refs: AuditEntityRefDTO[];
73
+ changes?: Record<string, any>;
74
+ error_message?: string;
75
+ }
76
+
77
+ export interface AuditEventsListResponseDTO {
78
+ events: AuditEventResponseDTO[];
79
+ total: number;
80
+ page: number;
81
+ limit: number;
82
+ }
83
+
84
+ export interface ErrorDisplayMessage {
85
+ // user message title
86
+ title: string;
87
+ // user message description
88
+ description: string;
89
+ }
90
+
91
+ export interface ErrorData {
92
+ // http status code
93
+ statusCode: number;
94
+ // http status text
95
+ statusText: string;
96
+ timestamp: string;
97
+ // user friendly error message
98
+ displayMessage: ErrorDisplayMessage;
99
+ }
100
+
101
+ export interface Error {
102
+ // business error code
103
+ code: number;
104
+ // business error description
105
+ message: string;
106
+ // additional error data
107
+ data: ErrorData;
108
+ }
109
+
110
+ export interface TraceContextDTO {
111
+ traceId?: string;
112
+ }
113
+
114
+ export interface AuditEventPayloadDTO {
115
+ action: string;
116
+ description?: string;
117
+ actor: AuditActorDTO;
118
+ outcome: 'success' | 'failure';
119
+ error_message?: string;
120
+ entity_refs: AuditEntityRefDTO[];
121
+ resource: AuditResourceDTO;
122
+ changes?: Record<string, any>;
123
+ correlation_id?: string;
124
+ }
125
+
126
+ export interface IngestAuditEventDTO {
127
+ id: string;
128
+ version: 'v1.0' | '0.0.1';
129
+ // Time of the action; ISO-8601 preferred; epoch ms string also accepted from MessageBus
130
+ timestamp: string;
131
+ traceContext?: TraceContextDTO;
132
+ payload: AuditEventPayloadDTO;
133
+ }
134
+
135
+ export interface EventBridgeEnvelopeDTO {
136
+ 'detail-type': 'AuditEvent';
137
+ source: string;
138
+ detail: IngestAuditEventDTO;
139
+ }
140
+
141
+ export interface IngestResponseDTO {
142
+ id: string;
143
+ status: 'indexed' | 'duplicate';
144
+ }
145
+
146
+ // POST /audit/events/query - Query audit events
147
+
148
+ export type QueryAuditEventsBody = GetAuditEventsQueryDTO;
149
+
150
+ export type QueryAuditEventsResponse = AuditEventsListResponseDTO;
151
+
152
+ // GET /audit/events/{id} - Get a single audit event by ID
153
+
154
+ export interface GetAuditEventPath {
155
+ // Audit event ID
156
+ id: string;
157
+ }
158
+
159
+ export type GetAuditEventResponse = AuditEventResponseDTO;
160
+
161
+ // POST /audit/ingest - Ingest an audit event
162
+
163
+ export type PostAuditEventBody = EventBridgeEnvelopeDTO;
164
+
165
+ export type PostAuditEventResponse = IngestResponseDTO;
@@ -256,6 +256,43 @@ export interface PostOrderReceiptRequest {
256
256
  receiptEmail: string;
257
257
  }
258
258
 
259
+ export interface CentricPOSDeviceStation {
260
+ // Station (brand) ID
261
+ id: string;
262
+ // Station name
263
+ name?: string;
264
+ // Whether the station is hidden on this device
265
+ hidden: boolean;
266
+ // Whether the station can take orders: it has payment credentials or is a no-payment station
267
+ orderable: boolean;
268
+ }
269
+
270
+ export interface CentricPOSDevice {
271
+ // Serial number of the device
272
+ serialNumber: string;
273
+ // Site the device is registered at
274
+ siteId: string;
275
+ // Whether the device holds a login
276
+ registered: boolean;
277
+ // Whether the device's location is at its site and it shows at least one orderable station
278
+ complete: boolean;
279
+ // Location saved for the device
280
+ locationId?: string;
281
+ // Name of the device's location
282
+ locationName?: string;
283
+ // Merchant name set on the device's location
284
+ merchantName?: string;
285
+ // Centric POS stations at the device's location, with whether each is hidden
286
+ stations: CentricPOSDeviceStation[];
287
+ }
288
+
289
+ export interface CentricPOSDeviceSettingsPutBody {
290
+ // Location at the device's site
291
+ locationId: string;
292
+ // Stations at the location to hide on the device
293
+ hiddenStationIds: string[];
294
+ }
295
+
259
296
  export interface DigitalSignageOrder {
260
297
  // Display ID for the order
261
298
  displayId: string;
@@ -337,6 +374,35 @@ export type PostCentricPosOrderReceiptBody = PostOrderReceiptRequest;
337
374
 
338
375
  export type PostCentricPosOrderReceiptResponse = {};
339
376
 
377
+ // GET /centric-pos/v1/admin/device/{serialNumber} - Get a POS device with its settings
378
+
379
+ export interface GetCentricPosAdminDevicePath {
380
+ // Serial number of the device
381
+ serialNumber: string;
382
+ }
383
+
384
+ export type GetCentricPosAdminDeviceResponse = CentricPOSDevice;
385
+
386
+ // PUT /centric-pos/v1/admin/device/{serialNumber}/settings - Save a POS device's location and hidden stations
387
+
388
+ export interface PutCentricPosAdminDeviceSettingsPath {
389
+ // Serial number of the device
390
+ serialNumber: string;
391
+ }
392
+
393
+ export type PutCentricPosAdminDeviceSettingsBody = CentricPOSDeviceSettingsPutBody;
394
+
395
+ export type PutCentricPosAdminDeviceSettingsResponse = CentricPOSDevice;
396
+
397
+ // DELETE /centric-pos/v1/admin/device/{serialNumber}/settings - Clear a POS device's settings without unregistering it
398
+
399
+ export interface DeleteCentricPosAdminDeviceSettingsPath {
400
+ // Serial number of the device
401
+ serialNumber: string;
402
+ }
403
+
404
+ export type DeleteCentricPosAdminDeviceSettingsResponse = {};
405
+
340
406
  // GET /centric-pos/innovation/v1/digital-signage/orders/{stationId} - Get in-progress and ready orders for a station
341
407
 
342
408
  export interface GetCentricPosDigitalSignageOrdersPath {
@@ -4897,7 +4897,7 @@ export interface PostConsumerUserAccessCodeValidateRequest {
4897
4897
 
4898
4898
  export interface PostConsumerUserAccessCodeValidateResponse {
4899
4899
  // The client the access code unlocks
4900
- client: 'amazon' | 'test-exclusive-company';
4900
+ client: string;
4901
4901
  }
4902
4902
 
4903
4903
  export interface PostConsumerUserAccessCodeRedeemRequest {
@@ -4907,7 +4907,7 @@ export interface PostConsumerUserAccessCodeRedeemRequest {
4907
4907
 
4908
4908
  export interface PostConsumerUserAccessCodeRedeemResponse {
4909
4909
  // The client the caller is now affiliated with
4910
- client: 'amazon' | 'test-exclusive-company';
4910
+ client: string;
4911
4911
  }
4912
4912
 
4913
4913
  // GET /consumer/v1/health-check