@pexcode/dlis-sdk 1.0.0 → 1.0.1

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.
@@ -24,13 +24,15 @@ export declare class SdkPackagesControllerService {
24
24
  * @returns any Ok
25
25
  * @throws ApiError
26
26
  */
27
- static createNewPackage(requestBody: SdkPackagesCreationAttributes): CancelablePromise<packagesAttributes>;
27
+ static createNewPackage(requestBody: Array<SdkPackagesCreationAttributes>): CancelablePromise<Array<packagesAttributes>>;
28
28
  /**
29
- * @param id
29
+ * @param requestBody
30
30
  * @returns any Ok
31
31
  * @throws ApiError
32
32
  */
33
- static sendDataToCEnter(id: PackageId): CancelablePromise<HttpSuccess>;
33
+ static sendDataToCEnter(requestBody: {
34
+ packageIds: Array<PackageId>;
35
+ }): CancelablePromise<HttpSuccess>;
34
36
  /**
35
37
  * @param id
36
38
  * @returns any Ok
@@ -48,17 +48,16 @@ class SdkPackagesControllerService {
48
48
  });
49
49
  }
50
50
  /**
51
- * @param id
51
+ * @param requestBody
52
52
  * @returns any Ok
53
53
  * @throws ApiError
54
54
  */
55
- static sendDataToCEnter(id) {
55
+ static sendDataToCEnter(requestBody) {
56
56
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
57
- method: 'GET',
58
- url: '/sdk/v2/packages/sentDataToCenter/{id}',
59
- path: {
60
- 'id': id,
61
- },
57
+ method: 'POST',
58
+ url: '/sdk/v2/packages/sentDataToCenter',
59
+ body: requestBody,
60
+ mediaType: 'application/json',
62
61
  });
63
62
  }
64
63
  /**
package/dist/index.d.ts CHANGED
@@ -20,9 +20,9 @@ export declare class DLISystem {
20
20
  CheckBlackList(query: CheckBlackListAttribute): Promise<CheckBlackListAttribute>;
21
21
  CancelOne(id: string): Promise<HttpSuccess>;
22
22
  ReportOne(id: string, body: any): Promise<HttpSuccess>;
23
- CreatePackage(payload: SdkPackagesCreationAttributes): Promise<packagesAttributes>;
23
+ CreatePackage(payload: SdkPackagesCreationAttributes[]): Promise<packagesAttributes[]>;
24
24
  CalculateCost(params: CalculateCostAttributes): Promise<ShippingServiceData>;
25
- SendDataToCenter(id: string): Promise<HttpSuccess>;
25
+ SendDataToCenter(id: string[]): Promise<HttpSuccess>;
26
26
  GetRegionsList(countryId: number): Promise<regionsAttributes[]>;
27
27
  GetCitiesListInByRegion(regionId: number): Promise<citiesAttributes[]>;
28
28
  GetMyLedger(year?: number, month?: number): Promise<BranchLedgerAttributes[]>;
package/dist/index.js CHANGED
@@ -84,7 +84,7 @@ class DLISystem {
84
84
  throw error;
85
85
  }
86
86
  async SendDataToCenter(id) {
87
- const { result, error } = await (0, api_handler_1.ApiCall)(() => SdkPackagesControllerService_1.SdkPackagesControllerService.sendDataToCEnter(id));
87
+ const { result, error } = await (0, api_handler_1.ApiCall)(() => SdkPackagesControllerService_1.SdkPackagesControllerService.sendDataToCEnter({ packageIds: id }));
88
88
  if (result) {
89
89
  return result;
90
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pexcode/dlis-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "This is a library published under Pexcode to help users and developers to use dlis API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",