ob-parking-sdk 0.0.45 → 0.0.47

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/api/api.ts CHANGED
@@ -2143,6 +2143,122 @@ export interface ReceiptContentMatchedStore {
2143
2143
  */
2144
2144
  'id': string;
2145
2145
  }
2146
+ /**
2147
+ *
2148
+ * @export
2149
+ * @interface ReceiptData
2150
+ */
2151
+ export interface ReceiptData {
2152
+ /**
2153
+ *
2154
+ * @type {string}
2155
+ * @memberof ReceiptData
2156
+ */
2157
+ 'merchant_name': string | null;
2158
+ /**
2159
+ *
2160
+ * @type {string}
2161
+ * @memberof ReceiptData
2162
+ */
2163
+ 'transaction_date': string | null;
2164
+ /**
2165
+ *
2166
+ * @type {string}
2167
+ * @memberof ReceiptData
2168
+ */
2169
+ 'transaction_time': string | null;
2170
+ /**
2171
+ *
2172
+ * @type {Array<ReceiptItem>}
2173
+ * @memberof ReceiptData
2174
+ */
2175
+ 'items': Array<ReceiptItem>;
2176
+ /**
2177
+ *
2178
+ * @type {string}
2179
+ * @memberof ReceiptData
2180
+ */
2181
+ 'total': string;
2182
+ /**
2183
+ *
2184
+ * @type {string}
2185
+ * @memberof ReceiptData
2186
+ */
2187
+ 'tax_id': string | null;
2188
+ /**
2189
+ *
2190
+ * @type {string}
2191
+ * @memberof ReceiptData
2192
+ */
2193
+ 'receipt_no': string;
2194
+ /**
2195
+ *
2196
+ * @type {string}
2197
+ * @memberof ReceiptData
2198
+ */
2199
+ 'status': string;
2200
+ /**
2201
+ *
2202
+ * @type {string}
2203
+ * @memberof ReceiptData
2204
+ */
2205
+ 'address': string | null;
2206
+ /**
2207
+ *
2208
+ * @type {string}
2209
+ * @memberof ReceiptData
2210
+ */
2211
+ 'unit_no': string | null;
2212
+ /**
2213
+ *
2214
+ * @type {string}
2215
+ * @memberof ReceiptData
2216
+ */
2217
+ 'mall_name': string | null;
2218
+ /**
2219
+ *
2220
+ * @type {Array<string>}
2221
+ * @memberof ReceiptData
2222
+ */
2223
+ 'remarks': Array<string>;
2224
+ /**
2225
+ *
2226
+ * @type {string}
2227
+ * @memberof ReceiptData
2228
+ */
2229
+ 'hashed_receipt': string;
2230
+ /**
2231
+ *
2232
+ * @type {string}
2233
+ * @memberof ReceiptData
2234
+ */
2235
+ 'message': string;
2236
+ }
2237
+ /**
2238
+ *
2239
+ * @export
2240
+ * @interface ReceiptItem
2241
+ */
2242
+ export interface ReceiptItem {
2243
+ /**
2244
+ *
2245
+ * @type {string}
2246
+ * @memberof ReceiptItem
2247
+ */
2248
+ 'description': string;
2249
+ /**
2250
+ *
2251
+ * @type {number}
2252
+ * @memberof ReceiptItem
2253
+ */
2254
+ 'quantity': number | null;
2255
+ /**
2256
+ *
2257
+ * @type {string}
2258
+ * @memberof ReceiptItem
2259
+ */
2260
+ 'total_price': string | null;
2261
+ }
2146
2262
  /**
2147
2263
  *
2148
2264
  * @export
@@ -2663,6 +2779,19 @@ export interface UpsertCampaignBody {
2663
2779
  */
2664
2780
  '4': FinalCampaignBody;
2665
2781
  }
2782
+ /**
2783
+ *
2784
+ * @export
2785
+ * @interface ValidateReceiptImageBody
2786
+ */
2787
+ export interface ValidateReceiptImageBody {
2788
+ /**
2789
+ *
2790
+ * @type {string}
2791
+ * @memberof ValidateReceiptImageBody
2792
+ */
2793
+ 'source': string;
2794
+ }
2666
2795
 
2667
2796
  /**
2668
2797
  * DefaultApi - axios parameter creator
@@ -4064,6 +4193,46 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4064
4193
  options: localVarRequestOptions,
4065
4194
  };
4066
4195
  },
4196
+ /**
4197
+ *
4198
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
4199
+ * @param {string} [xAccountId]
4200
+ * @param {*} [options] Override http request option.
4201
+ * @throws {RequiredError}
4202
+ */
4203
+ receiptValidateOcrReceiptImage: async (validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4204
+ // verify required parameter 'validateReceiptImageBody' is not null or undefined
4205
+ assertParamExists('receiptValidateOcrReceiptImage', 'validateReceiptImageBody', validateReceiptImageBody)
4206
+ const localVarPath = `/receipt/validate-ocr-receipt-image`;
4207
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4208
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4209
+ let baseOptions;
4210
+ if (configuration) {
4211
+ baseOptions = configuration.baseOptions;
4212
+ }
4213
+
4214
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
4215
+ const localVarHeaderParameter = {} as any;
4216
+ const localVarQueryParameter = {} as any;
4217
+
4218
+ if (xAccountId != null) {
4219
+ localVarHeaderParameter['x-account-id'] = String(xAccountId);
4220
+ }
4221
+
4222
+
4223
+
4224
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4225
+
4226
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4227
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4228
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4229
+ localVarRequestOptions.data = serializeDataIfNeeded(validateReceiptImageBody, localVarRequestOptions, configuration)
4230
+
4231
+ return {
4232
+ url: toPathString(localVarUrlObj),
4233
+ options: localVarRequestOptions,
4234
+ };
4235
+ },
4067
4236
  /**
4068
4237
  *
4069
4238
  * @param {*} [options] Override http request option.
@@ -4486,6 +4655,17 @@ export const DefaultApiFp = function(configuration?: Configuration) {
4486
4655
  const localVarAxiosArgs = await localVarAxiosParamCreator.receiptUpdateReceipt(updateReceiptBody, options);
4487
4656
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4488
4657
  },
4658
+ /**
4659
+ *
4660
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
4661
+ * @param {string} [xAccountId]
4662
+ * @param {*} [options] Override http request option.
4663
+ * @throws {RequiredError}
4664
+ */
4665
+ async receiptValidateOcrReceiptImage(validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReceiptData>> {
4666
+ const localVarAxiosArgs = await localVarAxiosParamCreator.receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options);
4667
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4668
+ },
4489
4669
  /**
4490
4670
  *
4491
4671
  * @param {*} [options] Override http request option.
@@ -4855,6 +5035,16 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
4855
5035
  receiptUpdateReceipt(updateReceiptBody: UpdateReceiptBody, options?: any): AxiosPromise<boolean> {
4856
5036
  return localVarFp.receiptUpdateReceipt(updateReceiptBody, options).then((request) => request(axios, basePath));
4857
5037
  },
5038
+ /**
5039
+ *
5040
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
5041
+ * @param {string} [xAccountId]
5042
+ * @param {*} [options] Override http request option.
5043
+ * @throws {RequiredError}
5044
+ */
5045
+ receiptValidateOcrReceiptImage(validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options?: any): AxiosPromise<ReceiptData> {
5046
+ return localVarFp.receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options).then((request) => request(axios, basePath));
5047
+ },
4858
5048
  /**
4859
5049
  *
4860
5050
  * @param {*} [options] Override http request option.
@@ -5289,6 +5479,18 @@ export class DefaultApi extends BaseAPI {
5289
5479
  return DefaultApiFp(this.configuration).receiptUpdateReceipt(updateReceiptBody, options).then((request) => request(this.axios, this.basePath));
5290
5480
  }
5291
5481
 
5482
+ /**
5483
+ *
5484
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
5485
+ * @param {string} [xAccountId]
5486
+ * @param {*} [options] Override http request option.
5487
+ * @throws {RequiredError}
5488
+ * @memberof DefaultApi
5489
+ */
5490
+ public receiptValidateOcrReceiptImage(validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options?: AxiosRequestConfig) {
5491
+ return DefaultApiFp(this.configuration).receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options).then((request) => request(this.axios, this.basePath));
5492
+ }
5493
+
5292
5494
  /**
5293
5495
  *
5294
5496
  * @param {*} [options] Override http request option.
package/dist/api/api.d.ts CHANGED
@@ -2103,6 +2103,122 @@ export interface ReceiptContentMatchedStore {
2103
2103
  */
2104
2104
  'id': string;
2105
2105
  }
2106
+ /**
2107
+ *
2108
+ * @export
2109
+ * @interface ReceiptData
2110
+ */
2111
+ export interface ReceiptData {
2112
+ /**
2113
+ *
2114
+ * @type {string}
2115
+ * @memberof ReceiptData
2116
+ */
2117
+ 'merchant_name': string | null;
2118
+ /**
2119
+ *
2120
+ * @type {string}
2121
+ * @memberof ReceiptData
2122
+ */
2123
+ 'transaction_date': string | null;
2124
+ /**
2125
+ *
2126
+ * @type {string}
2127
+ * @memberof ReceiptData
2128
+ */
2129
+ 'transaction_time': string | null;
2130
+ /**
2131
+ *
2132
+ * @type {Array<ReceiptItem>}
2133
+ * @memberof ReceiptData
2134
+ */
2135
+ 'items': Array<ReceiptItem>;
2136
+ /**
2137
+ *
2138
+ * @type {string}
2139
+ * @memberof ReceiptData
2140
+ */
2141
+ 'total': string;
2142
+ /**
2143
+ *
2144
+ * @type {string}
2145
+ * @memberof ReceiptData
2146
+ */
2147
+ 'tax_id': string | null;
2148
+ /**
2149
+ *
2150
+ * @type {string}
2151
+ * @memberof ReceiptData
2152
+ */
2153
+ 'receipt_no': string;
2154
+ /**
2155
+ *
2156
+ * @type {string}
2157
+ * @memberof ReceiptData
2158
+ */
2159
+ 'status': string;
2160
+ /**
2161
+ *
2162
+ * @type {string}
2163
+ * @memberof ReceiptData
2164
+ */
2165
+ 'address': string | null;
2166
+ /**
2167
+ *
2168
+ * @type {string}
2169
+ * @memberof ReceiptData
2170
+ */
2171
+ 'unit_no': string | null;
2172
+ /**
2173
+ *
2174
+ * @type {string}
2175
+ * @memberof ReceiptData
2176
+ */
2177
+ 'mall_name': string | null;
2178
+ /**
2179
+ *
2180
+ * @type {Array<string>}
2181
+ * @memberof ReceiptData
2182
+ */
2183
+ 'remarks': Array<string>;
2184
+ /**
2185
+ *
2186
+ * @type {string}
2187
+ * @memberof ReceiptData
2188
+ */
2189
+ 'hashed_receipt': string;
2190
+ /**
2191
+ *
2192
+ * @type {string}
2193
+ * @memberof ReceiptData
2194
+ */
2195
+ 'message': string;
2196
+ }
2197
+ /**
2198
+ *
2199
+ * @export
2200
+ * @interface ReceiptItem
2201
+ */
2202
+ export interface ReceiptItem {
2203
+ /**
2204
+ *
2205
+ * @type {string}
2206
+ * @memberof ReceiptItem
2207
+ */
2208
+ 'description': string;
2209
+ /**
2210
+ *
2211
+ * @type {number}
2212
+ * @memberof ReceiptItem
2213
+ */
2214
+ 'quantity': number | null;
2215
+ /**
2216
+ *
2217
+ * @type {string}
2218
+ * @memberof ReceiptItem
2219
+ */
2220
+ 'total_price': string | null;
2221
+ }
2106
2222
  /**
2107
2223
  *
2108
2224
  * @export
@@ -2613,6 +2729,19 @@ export interface UpsertCampaignBody {
2613
2729
  */
2614
2730
  '4': FinalCampaignBody;
2615
2731
  }
2732
+ /**
2733
+ *
2734
+ * @export
2735
+ * @interface ValidateReceiptImageBody
2736
+ */
2737
+ export interface ValidateReceiptImageBody {
2738
+ /**
2739
+ *
2740
+ * @type {string}
2741
+ * @memberof ValidateReceiptImageBody
2742
+ */
2743
+ 'source': string;
2744
+ }
2616
2745
  /**
2617
2746
  * DefaultApi - axios parameter creator
2618
2747
  * @export
@@ -2902,6 +3031,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
2902
3031
  * @throws {RequiredError}
2903
3032
  */
2904
3033
  receiptUpdateReceipt: (updateReceiptBody: UpdateReceiptBody, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3034
+ /**
3035
+ *
3036
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
3037
+ * @param {string} [xAccountId]
3038
+ * @param {*} [options] Override http request option.
3039
+ * @throws {RequiredError}
3040
+ */
3041
+ receiptValidateOcrReceiptImage: (validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2905
3042
  /**
2906
3043
  *
2907
3044
  * @param {*} [options] Override http request option.
@@ -3198,6 +3335,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
3198
3335
  * @throws {RequiredError}
3199
3336
  */
3200
3337
  receiptUpdateReceipt(updateReceiptBody: UpdateReceiptBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
3338
+ /**
3339
+ *
3340
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
3341
+ * @param {string} [xAccountId]
3342
+ * @param {*} [options] Override http request option.
3343
+ * @throws {RequiredError}
3344
+ */
3345
+ receiptValidateOcrReceiptImage(validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReceiptData>>;
3201
3346
  /**
3202
3347
  *
3203
3348
  * @param {*} [options] Override http request option.
@@ -3494,6 +3639,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
3494
3639
  * @throws {RequiredError}
3495
3640
  */
3496
3641
  receiptUpdateReceipt(updateReceiptBody: UpdateReceiptBody, options?: any): AxiosPromise<boolean>;
3642
+ /**
3643
+ *
3644
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
3645
+ * @param {string} [xAccountId]
3646
+ * @param {*} [options] Override http request option.
3647
+ * @throws {RequiredError}
3648
+ */
3649
+ receiptValidateOcrReceiptImage(validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options?: any): AxiosPromise<ReceiptData>;
3497
3650
  /**
3498
3651
  *
3499
3652
  * @param {*} [options] Override http request option.
@@ -3825,6 +3978,15 @@ export declare class DefaultApi extends BaseAPI {
3825
3978
  * @memberof DefaultApi
3826
3979
  */
3827
3980
  receiptUpdateReceipt(updateReceiptBody: UpdateReceiptBody, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
3981
+ /**
3982
+ *
3983
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
3984
+ * @param {string} [xAccountId]
3985
+ * @param {*} [options] Override http request option.
3986
+ * @throws {RequiredError}
3987
+ * @memberof DefaultApi
3988
+ */
3989
+ receiptValidateOcrReceiptImage(validateReceiptImageBody: ValidateReceiptImageBody, xAccountId?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ReceiptData, any>>;
3828
3990
  /**
3829
3991
  *
3830
3992
  * @param {*} [options] Override http request option.
package/dist/api/api.js CHANGED
@@ -1248,6 +1248,39 @@ const DefaultApiAxiosParamCreator = function (configuration) {
1248
1248
  options: localVarRequestOptions,
1249
1249
  };
1250
1250
  }),
1251
+ /**
1252
+ *
1253
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
1254
+ * @param {string} [xAccountId]
1255
+ * @param {*} [options] Override http request option.
1256
+ * @throws {RequiredError}
1257
+ */
1258
+ receiptValidateOcrReceiptImage: (validateReceiptImageBody, xAccountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
1259
+ // verify required parameter 'validateReceiptImageBody' is not null or undefined
1260
+ (0, common_1.assertParamExists)('receiptValidateOcrReceiptImage', 'validateReceiptImageBody', validateReceiptImageBody);
1261
+ const localVarPath = `/receipt/validate-ocr-receipt-image`;
1262
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1263
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1264
+ let baseOptions;
1265
+ if (configuration) {
1266
+ baseOptions = configuration.baseOptions;
1267
+ }
1268
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1269
+ const localVarHeaderParameter = {};
1270
+ const localVarQueryParameter = {};
1271
+ if (xAccountId != null) {
1272
+ localVarHeaderParameter['x-account-id'] = String(xAccountId);
1273
+ }
1274
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1275
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1276
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1277
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1278
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(validateReceiptImageBody, localVarRequestOptions, configuration);
1279
+ return {
1280
+ url: (0, common_1.toPathString)(localVarUrlObj),
1281
+ options: localVarRequestOptions,
1282
+ };
1283
+ }),
1251
1284
  /**
1252
1285
  *
1253
1286
  * @param {*} [options] Override http request option.
@@ -1731,6 +1764,19 @@ const DefaultApiFp = function (configuration) {
1731
1764
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1732
1765
  });
1733
1766
  },
1767
+ /**
1768
+ *
1769
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
1770
+ * @param {string} [xAccountId]
1771
+ * @param {*} [options] Override http request option.
1772
+ * @throws {RequiredError}
1773
+ */
1774
+ receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options) {
1775
+ return __awaiter(this, void 0, void 0, function* () {
1776
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options);
1777
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1778
+ });
1779
+ },
1734
1780
  /**
1735
1781
  *
1736
1782
  * @param {*} [options] Override http request option.
@@ -2102,6 +2148,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
2102
2148
  receiptUpdateReceipt(updateReceiptBody, options) {
2103
2149
  return localVarFp.receiptUpdateReceipt(updateReceiptBody, options).then((request) => request(axios, basePath));
2104
2150
  },
2151
+ /**
2152
+ *
2153
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
2154
+ * @param {string} [xAccountId]
2155
+ * @param {*} [options] Override http request option.
2156
+ * @throws {RequiredError}
2157
+ */
2158
+ receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options) {
2159
+ return localVarFp.receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options).then((request) => request(axios, basePath));
2160
+ },
2105
2161
  /**
2106
2162
  *
2107
2163
  * @param {*} [options] Override http request option.
@@ -2503,6 +2559,17 @@ class DefaultApi extends base_1.BaseAPI {
2503
2559
  receiptUpdateReceipt(updateReceiptBody, options) {
2504
2560
  return (0, exports.DefaultApiFp)(this.configuration).receiptUpdateReceipt(updateReceiptBody, options).then((request) => request(this.axios, this.basePath));
2505
2561
  }
2562
+ /**
2563
+ *
2564
+ * @param {ValidateReceiptImageBody} validateReceiptImageBody
2565
+ * @param {string} [xAccountId]
2566
+ * @param {*} [options] Override http request option.
2567
+ * @throws {RequiredError}
2568
+ * @memberof DefaultApi
2569
+ */
2570
+ receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options) {
2571
+ return (0, exports.DefaultApiFp)(this.configuration).receiptValidateOcrReceiptImage(validateReceiptImageBody, xAccountId, options).then((request) => request(this.axios, this.basePath));
2572
+ }
2506
2573
  /**
2507
2574
  *
2508
2575
  * @param {*} [options] Override http request option.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ob-parking-sdk",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "description": "API interfaces for OB PARKING",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT"