@compassdigital/sdk.typescript 4.27.0 → 4.29.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.
Files changed (42) hide show
  1. package/lib/index.d.ts +53 -36
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +52 -36
  4. package/lib/index.js.map +1 -1
  5. package/lib/interface/consumer.d.ts +76 -0
  6. package/lib/interface/consumer.d.ts.map +1 -0
  7. package/lib/interface/consumer.js +5 -0
  8. package/lib/interface/consumer.js.map +1 -0
  9. package/lib/interface/frictionless.d.ts +107 -107
  10. package/lib/interface/frictionless.d.ts.map +1 -1
  11. package/lib/interface/location.d.ts +0 -1
  12. package/lib/interface/location.d.ts.map +1 -1
  13. package/lib/interface/mealplan.d.ts +0 -4
  14. package/lib/interface/mealplan.d.ts.map +1 -1
  15. package/lib/interface/menu.d.ts +16 -15
  16. package/lib/interface/menu.d.ts.map +1 -1
  17. package/lib/interface/order.d.ts +3 -1
  18. package/lib/interface/order.d.ts.map +1 -1
  19. package/lib/interface/partner.d.ts +5 -3
  20. package/lib/interface/partner.d.ts.map +1 -1
  21. package/lib/interface/promo.d.ts +10 -3
  22. package/lib/interface/promo.d.ts.map +1 -1
  23. package/lib/interface/task.d.ts +3 -0
  24. package/lib/interface/task.d.ts.map +1 -1
  25. package/lib/interface/user.d.ts +14 -12
  26. package/lib/interface/user.d.ts.map +1 -1
  27. package/lib/interface/vendor.d.ts.map +1 -1
  28. package/manifest.json +5 -1
  29. package/package.json +3 -3
  30. package/pipeline.yml +1 -1
  31. package/src/index.ts +144 -97
  32. package/src/interface/consumer.ts +105 -0
  33. package/src/interface/frictionless.ts +200 -158
  34. package/src/interface/location.ts +4 -2
  35. package/src/interface/mealplan.ts +1 -9
  36. package/src/interface/menu.ts +21 -15
  37. package/src/interface/order.ts +12 -1
  38. package/src/interface/partner.ts +14 -3
  39. package/src/interface/promo.ts +10 -3
  40. package/src/interface/task.ts +4 -0
  41. package/src/interface/user.ts +20 -14
  42. package/src/interface/vendor.ts +0 -1
package/src/index.ts CHANGED
@@ -876,29 +876,36 @@ import {
876
876
  } from "./interface/delivery";
877
877
 
878
878
  import {
879
- PostFrictionlessWebhookStandardcognitionBody,
880
- PostFrictionlessWebhookStandardcognitionResponse,
881
- PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody,
882
- PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysResponse,
883
- PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody,
884
- PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse,
885
879
  GetFrictionlessBrandFrictionlessStatusQuery,
886
880
  GetFrictionlessBrandFrictionlessStatusResponse,
887
881
  PostFrictionlessQrCodeBody,
888
882
  PostFrictionlessQrCodeResponse,
889
- GetFrictionlessFailedCheckinsQuery,
890
- GetFrictionlessFailedCheckinsResponse,
891
- PostFrictionlessCheckinsReprocessResponse,
892
883
  GetFrictionlessCheckinStatusQuery,
893
884
  GetFrictionlessCheckinStatusResponse,
885
+ GetFrictionlessCheckinQuery,
886
+ GetFrictionlessCheckinResponse,
894
887
  GetFrictionlessUsersPaymentIssuesQuery,
895
888
  GetFrictionlessUsersPaymentIssuesResponse,
889
+ GetFrictionlessFailedCheckinsQuery,
890
+ GetFrictionlessFailedCheckinsResponse,
891
+ PostFrictionlessCheckinsReprocessResponse,
896
892
  PostFrictionlessCheckinReprocessPaymentBody,
897
893
  PostFrictionlessCheckinReprocessPaymentResponse,
898
- GetFrictionlessCheckinQuery,
899
- GetFrictionlessCheckinResponse,
894
+ PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody,
895
+ PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysResponse,
896
+ PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody,
897
+ PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse,
898
+ PostFrictionlessWebhookStandardcognitionBody,
899
+ PostFrictionlessWebhookStandardcognitionResponse,
900
900
  } from "./interface/frictionless";
901
901
 
902
+ import {
903
+ HealthCheckControllerExecuteQuery,
904
+ HealthCheckControllerExecuteResponse,
905
+ GetPaymentListByBrandQuery,
906
+ GetPaymentListByBrandResponse,
907
+ } from "./interface/consumer";
908
+
902
909
  import {
903
910
  PostAiLanguageGenerateBody,
904
911
  PostAiLanguageGenerateResponse,
@@ -8722,7 +8729,7 @@ export class ServiceClient extends BaseServiceClient {
8722
8729
  /**
8723
8730
  * PATCH /vendor/application/{id} - Update an application (or update status)
8724
8731
  *
8725
- * @param id - TODO: add parameter to swagger.json
8732
+ * @param id
8726
8733
  * @param body
8727
8734
  * @param options - additional request options
8728
8735
  */
@@ -9028,103 +9035,109 @@ export class ServiceClient extends BaseServiceClient {
9028
9035
  }
9029
9036
 
9030
9037
  /**
9031
- * POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
9038
+ * GET /frictionless/brand/{id_brand}/frictionless-status - Check frictionless support of a given brand
9032
9039
  *
9033
- * @param body
9040
+ * @param id_brand - Brand ID as Encoded CDL ID
9034
9041
  * @param options - additional request options
9035
9042
  */
9036
- post_frictionless_webhook_standardcognition(
9037
- body: PostFrictionlessWebhookStandardcognitionBody,
9038
- options?: RequestOptions,
9039
- ): ResponsePromise<PostFrictionlessWebhookStandardcognitionResponse> {
9043
+ get_frictionless_brand_frictionless_status(
9044
+ id_brand: string,
9045
+ options?: {
9046
+ query?: GetFrictionlessBrandFrictionlessStatusQuery;
9047
+ } & RequestOptions,
9048
+ ): ResponsePromise<GetFrictionlessBrandFrictionlessStatusResponse> {
9040
9049
  return this.request(
9041
9050
  "frictionless",
9042
- "post_frictionless_webhook_standardcognition",
9043
- "post",
9044
- `/frictionless/webhook/standardcognition`,
9045
- body,
9051
+ "get_frictionless_brand_frictionless_status",
9052
+ "get",
9053
+ `/frictionless/brand/${id_brand}/frictionless-status`,
9054
+ null,
9046
9055
  options,
9047
9056
  );
9048
9057
  }
9049
9058
 
9050
9059
  /**
9051
- * POST /frictionless/amazon-jwo-connector/v1/identity/identity-keys - Amazon JWO Identity Key Connector
9060
+ * POST /frictionless/qrcode - Create Frictionless QR Code to make user able to check in
9052
9061
  *
9053
9062
  * @param body
9054
9063
  * @param options - additional request options
9055
9064
  */
9056
- post_frictionless_amazon_jwo_connector_v1_identity_identity_keys(
9057
- body: PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody,
9065
+ post_frictionless_qr_code(
9066
+ body: PostFrictionlessQrCodeBody,
9058
9067
  options?: RequestOptions,
9059
- ): ResponsePromise<PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysResponse> {
9068
+ ): ResponsePromise<PostFrictionlessQrCodeResponse> {
9060
9069
  return this.request(
9061
9070
  "frictionless",
9062
- "post_frictionless_amazon_jwo_connector_v1_identity_identity_keys",
9071
+ "post_frictionless_qr_code",
9063
9072
  "post",
9064
- `/frictionless/amazon-jwo-connector/v1/identity/identity-keys`,
9073
+ `/frictionless/qrcode`,
9065
9074
  body,
9066
9075
  options,
9067
9076
  );
9068
9077
  }
9069
9078
 
9070
9079
  /**
9071
- * POST /frictionless/amazon-jwo-connector/v1/order/purchases - Amazon JWO Ordering Connector
9080
+ * GET /frictionless/checkin/{id_checkin}/status - Fetch CheckIn Status
9072
9081
  *
9073
- * @param body
9082
+ * @param id_checkin
9074
9083
  * @param options - additional request options
9075
9084
  */
9076
- post_frictionless_amazon_jwo_connector_v1_order_purchases(
9077
- body: PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody,
9078
- options?: RequestOptions,
9079
- ): ResponsePromise<PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse> {
9085
+ get_frictionless_checkin_status(
9086
+ id_checkin: string,
9087
+ options?: {
9088
+ query?: GetFrictionlessCheckinStatusQuery;
9089
+ } & RequestOptions,
9090
+ ): ResponsePromise<GetFrictionlessCheckinStatusResponse> {
9080
9091
  return this.request(
9081
9092
  "frictionless",
9082
- "post_frictionless_amazon_jwo_connector_v1_order_purchases",
9083
- "post",
9084
- `/frictionless/amazon-jwo-connector/v1/order/purchases`,
9085
- body,
9093
+ "get_frictionless_checkin_status",
9094
+ "get",
9095
+ `/frictionless/checkin/${id_checkin}/status`,
9096
+ null,
9086
9097
  options,
9087
9098
  );
9088
9099
  }
9089
9100
 
9090
9101
  /**
9091
- * GET /frictionless/brand/{id_brand}/frictionless-status - Check frictionless support of a given brand
9102
+ * GET /frictionless/checkin/{id_checkin} - Fetch CheckIn
9092
9103
  *
9093
- * @param id_brand - Brand ID as Encoded CDL ID
9104
+ * @param id_checkin
9094
9105
  * @param options - additional request options
9095
9106
  */
9096
- get_frictionless_brand_frictionless_status(
9097
- id_brand: string,
9107
+ get_frictionless_checkin(
9108
+ id_checkin: string,
9098
9109
  options?: {
9099
- query?: GetFrictionlessBrandFrictionlessStatusQuery;
9110
+ query?: GetFrictionlessCheckinQuery;
9100
9111
  } & RequestOptions,
9101
- ): ResponsePromise<GetFrictionlessBrandFrictionlessStatusResponse> {
9112
+ ): ResponsePromise<GetFrictionlessCheckinResponse> {
9102
9113
  return this.request(
9103
9114
  "frictionless",
9104
- "get_frictionless_brand_frictionless_status",
9115
+ "get_frictionless_checkin",
9105
9116
  "get",
9106
- `/frictionless/brand/${id_brand}/frictionless-status`,
9117
+ `/frictionless/checkin/${id_checkin}`,
9107
9118
  null,
9108
9119
  options,
9109
9120
  );
9110
9121
  }
9111
9122
 
9112
9123
  /**
9113
- * POST /frictionless/qrcode - Create Frictionless QR Code to make user able to check in
9124
+ * GET /frictionless/users/{user_id}/checkins/payment-issues - List check-ins with update payment required per user
9114
9125
  *
9115
- * @param body
9126
+ * @param user_id
9116
9127
  * @param options - additional request options
9117
9128
  */
9118
- post_frictionless_qr_code(
9119
- body: PostFrictionlessQrCodeBody,
9120
- options?: RequestOptions,
9121
- ): ResponsePromise<PostFrictionlessQrCodeResponse> {
9129
+ get_frictionless_users_payment_issues(
9130
+ user_id: string,
9131
+ options?: {
9132
+ query?: GetFrictionlessUsersPaymentIssuesQuery;
9133
+ } & RequestOptions,
9134
+ ): ResponsePromise<GetFrictionlessUsersPaymentIssuesResponse> {
9122
9135
  return this.request(
9123
9136
  "frictionless",
9124
- "post_frictionless_qr_code",
9125
- "post",
9126
- `/frictionless/qrcode`,
9127
- body,
9137
+ "get_frictionless_users_payment_issues",
9138
+ "get",
9139
+ `/frictionless/users/${user_id}/checkins/payment-issues`,
9140
+ null,
9128
9141
  options,
9129
9142
  );
9130
9143
  }
@@ -9170,88 +9183,122 @@ export class ServiceClient extends BaseServiceClient {
9170
9183
  }
9171
9184
 
9172
9185
  /**
9173
- * GET /frictionless/checkin/{id_checkin}/status - Fetch CheckIn Status
9186
+ * POST /frictionless/checkins/{checkin_id}/reprocess-payment - Update payment at checkin and trigger reprocessing
9174
9187
  *
9175
- * @param id_checkin
9188
+ * @param checkin_id
9189
+ * @param body
9176
9190
  * @param options - additional request options
9177
9191
  */
9178
- get_frictionless_checkin_status(
9179
- id_checkin: string,
9180
- options?: {
9181
- query?: GetFrictionlessCheckinStatusQuery;
9182
- } & RequestOptions,
9183
- ): ResponsePromise<GetFrictionlessCheckinStatusResponse> {
9192
+ post_frictionless_checkin_reprocess_payment(
9193
+ checkin_id: string,
9194
+ body: PostFrictionlessCheckinReprocessPaymentBody,
9195
+ options?: RequestOptions,
9196
+ ): ResponsePromise<PostFrictionlessCheckinReprocessPaymentResponse> {
9184
9197
  return this.request(
9185
9198
  "frictionless",
9186
- "get_frictionless_checkin_status",
9187
- "get",
9188
- `/frictionless/checkin/${id_checkin}/status`,
9189
- null,
9199
+ "post_frictionless_checkin_reprocess_payment",
9200
+ "post",
9201
+ `/frictionless/checkins/${checkin_id}/reprocess-payment`,
9202
+ body,
9190
9203
  options,
9191
9204
  );
9192
9205
  }
9193
9206
 
9194
9207
  /**
9195
- * GET /frictionless/users/{user_id}/checkins/payment-issues - List check-ins with update payment required per user
9208
+ * POST /frictionless/amazon-jwo-connector/v1/identity/identity-keys - Amazon JWO Identity Key Connector
9196
9209
  *
9197
- * @param user_id
9210
+ * @param body
9198
9211
  * @param options - additional request options
9199
9212
  */
9200
- get_frictionless_users_payment_issues(
9201
- user_id: string,
9202
- options?: {
9203
- query?: GetFrictionlessUsersPaymentIssuesQuery;
9204
- } & RequestOptions,
9205
- ): ResponsePromise<GetFrictionlessUsersPaymentIssuesResponse> {
9213
+ post_frictionless_amazon_jwo_connector_v1_identity_identity_keys(
9214
+ body: PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysBody,
9215
+ options?: RequestOptions,
9216
+ ): ResponsePromise<PostFrictionlessAmazonJwoConnectorV1IdentityIdentityKeysResponse> {
9206
9217
  return this.request(
9207
9218
  "frictionless",
9208
- "get_frictionless_users_payment_issues",
9209
- "get",
9210
- `/frictionless/users/${user_id}/checkins/payment-issues`,
9211
- null,
9219
+ "post_frictionless_amazon_jwo_connector_v1_identity_identity_keys",
9220
+ "post",
9221
+ `/frictionless/amazon-jwo-connector/v1/identity/identity-keys`,
9222
+ body,
9212
9223
  options,
9213
9224
  );
9214
9225
  }
9215
9226
 
9216
9227
  /**
9217
- * POST /frictionless/checkins/{checkin_id}/reprocess-payment - Update payment at checkin and trigger reprocessing
9228
+ * POST /frictionless/amazon-jwo-connector/v1/order/purchases - Amazon JWO Ordering Connector
9218
9229
  *
9219
- * @param checkin_id
9220
9230
  * @param body
9221
9231
  * @param options - additional request options
9222
9232
  */
9223
- post_frictionless_checkin_reprocess_payment(
9224
- checkin_id: string,
9225
- body: PostFrictionlessCheckinReprocessPaymentBody,
9233
+ post_frictionless_amazon_jwo_connector_v1_order_purchases(
9234
+ body: PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody,
9226
9235
  options?: RequestOptions,
9227
- ): ResponsePromise<PostFrictionlessCheckinReprocessPaymentResponse> {
9236
+ ): ResponsePromise<PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse> {
9228
9237
  return this.request(
9229
9238
  "frictionless",
9230
- "post_frictionless_checkin_reprocess_payment",
9239
+ "post_frictionless_amazon_jwo_connector_v1_order_purchases",
9231
9240
  "post",
9232
- `/frictionless/checkins/${checkin_id}/reprocess-payment`,
9241
+ `/frictionless/amazon-jwo-connector/v1/order/purchases`,
9233
9242
  body,
9234
9243
  options,
9235
9244
  );
9236
9245
  }
9237
9246
 
9238
9247
  /**
9239
- * GET /frictionless/checkin/{id_checkin} - Fetch CheckIn
9248
+ * POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
9240
9249
  *
9241
- * @param id_checkin
9250
+ * @param body
9242
9251
  * @param options - additional request options
9243
9252
  */
9244
- get_frictionless_checkin(
9245
- id_checkin: string,
9253
+ post_frictionless_webhook_standardcognition(
9254
+ body: PostFrictionlessWebhookStandardcognitionBody,
9255
+ options?: RequestOptions,
9256
+ ): ResponsePromise<PostFrictionlessWebhookStandardcognitionResponse> {
9257
+ return this.request(
9258
+ "frictionless",
9259
+ "post_frictionless_webhook_standardcognition",
9260
+ "post",
9261
+ `/frictionless/webhook/standardcognition`,
9262
+ body,
9263
+ options,
9264
+ );
9265
+ }
9266
+
9267
+ /**
9268
+ * GET /dev/consumer/v1/health-check
9269
+ *
9270
+ * @param options - additional request options
9271
+ */
9272
+ HealthCheckController_execute(
9246
9273
  options?: {
9247
- query?: GetFrictionlessCheckinQuery;
9274
+ query?: HealthCheckControllerExecuteQuery;
9248
9275
  } & RequestOptions,
9249
- ): ResponsePromise<GetFrictionlessCheckinResponse> {
9276
+ ): ResponsePromise<HealthCheckControllerExecuteResponse> {
9250
9277
  return this.request(
9251
- "frictionless",
9252
- "get_frictionless_checkin",
9278
+ "consumer",
9279
+ "HealthCheckController_execute",
9253
9280
  "get",
9254
- `/frictionless/checkin/${id_checkin}`,
9281
+ `/consumer/v1/health-check`,
9282
+ null,
9283
+ options,
9284
+ );
9285
+ }
9286
+
9287
+ /**
9288
+ * GET /dev/consumer/v1/payment-methods - List payment methods available in a given brand
9289
+ *
9290
+ * @param options - additional request options
9291
+ */
9292
+ get_payment_list_by_brand(
9293
+ options: {
9294
+ query: GetPaymentListByBrandQuery;
9295
+ } & RequestOptions,
9296
+ ): ResponsePromise<GetPaymentListByBrandResponse> {
9297
+ return this.request(
9298
+ "consumer",
9299
+ "get_payment_list_by_brand",
9300
+ "get",
9301
+ `/consumer/v1/payment-methods`,
9255
9302
  null,
9256
9303
  options,
9257
9304
  );
@@ -0,0 +1,105 @@
1
+ /* eslint-disable */
2
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
3
+
4
+ import { RequestQuery, BaseRequest } from "./util";
5
+
6
+ export interface IsStatus {
7
+ eligible: boolean;
8
+ validated?: boolean;
9
+ preferred?: boolean;
10
+ }
11
+
12
+ export interface Tender {
13
+ id: string;
14
+ name?: string;
15
+ balance?: number;
16
+ type?: string;
17
+ currency?: string;
18
+ tender_number?: string;
19
+ is: IsStatus;
20
+ }
21
+
22
+ export interface TenderList {
23
+ tenders: Tender[];
24
+ }
25
+
26
+ export interface BillingAddress {
27
+ postal_code?: string;
28
+ }
29
+
30
+ export interface ExpiryDate {
31
+ month: number;
32
+ year: number;
33
+ }
34
+
35
+ export interface CreditCard {
36
+ billing_address?: BillingAddress;
37
+ card_type?: string;
38
+ expiry?: ExpiryDate;
39
+ is: IsStatus;
40
+ masked_card_number?: string;
41
+ name_on_card?: string;
42
+ nickname?: string;
43
+ token: string;
44
+ token_expiration_date?: string;
45
+ }
46
+
47
+ export interface CreditCardData {
48
+ data: CreditCard[];
49
+ }
50
+
51
+ export interface DigitalWalletFlavor {
52
+ is: IsStatus;
53
+ }
54
+
55
+ export interface DigitalWallet {
56
+ applewallet: DigitalWalletFlavor;
57
+ googlewallet: DigitalWalletFlavor;
58
+ }
59
+
60
+ export interface ListAvailablePaymentsResponseDTO {
61
+ mealplan: TenderList;
62
+ cashless: TenderList;
63
+ credit_cards: CreditCardData;
64
+ digital_wallet_pay: DigitalWallet;
65
+ }
66
+
67
+ export interface UnauthorizedErrorDTO {
68
+ message: string;
69
+ code: number;
70
+ data: Record<string, any>;
71
+ }
72
+
73
+ export interface NotFoundErrorDTO {
74
+ message: string;
75
+ code: number;
76
+ data: Record<string, any>;
77
+ }
78
+
79
+ // GET /dev/consumer/v1/health-check
80
+
81
+ export interface HealthCheckControllerExecuteQuery {
82
+ // Graphql query string
83
+ _query?: string;
84
+ }
85
+
86
+ export type HealthCheckControllerExecuteResponse = {};
87
+
88
+ export interface HealthCheckControllerExecuteRequest
89
+ extends BaseRequest,
90
+ RequestQuery<HealthCheckControllerExecuteQuery> {}
91
+
92
+ // GET /dev/consumer/v1/payment-methods - List payment methods available in a given brand
93
+
94
+ export interface GetPaymentListByBrandQuery {
95
+ // Brand ID as Encoded CDL ID
96
+ brandID: string;
97
+ // Graphql query string
98
+ _query?: string;
99
+ }
100
+
101
+ export type GetPaymentListByBrandResponse = ListAvailablePaymentsResponseDTO;
102
+
103
+ export interface GetPaymentListByBrandRequest
104
+ extends BaseRequest,
105
+ RequestQuery<GetPaymentListByBrandQuery> {}