@etsoo/appscript 1.3.4 → 1.3.5

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.
@@ -21,14 +21,14 @@ export declare class PublicApi extends BaseApi {
21
21
  * @param currency Currency
22
22
  * @returns Result
23
23
  */
24
- exchangeRate(currency: Currency): Promise<ExchangeRateDto | undefined>;
24
+ exchangeRate(currency: Currency | string): Promise<ExchangeRateDto | undefined>;
25
25
  /**
26
26
  * Get exchange rate history
27
27
  * @param currencies Currencies
28
28
  * @param months Max months
29
29
  * @returns Result
30
30
  */
31
- exchangeRateHistory(currencies: Currency[], months?: number): Promise<ExchangeRateHistoryDto[] | undefined>;
31
+ exchangeRateHistory(currencies: (Currency | string)[], months?: number): Promise<ExchangeRateHistoryDto[] | undefined>;
32
32
  /**
33
33
  * Get product unit's label
34
34
  * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
@@ -19,6 +19,10 @@ export * from './def/ListItem';
19
19
  export * from './dto/IdLabelDto';
20
20
  export * from './dto/IdLabelPrimaryDto';
21
21
  export * from './dto/InitCallDto';
22
+ export * from './erp/dto/CurrencyDto';
23
+ export * from './erp/dto/ExchangeRateDto';
24
+ export * from './erp/dto/ExchangeRateHistoryDto';
25
+ export * from './erp/dto/PublicProductDto';
22
26
  export * from './erp/AddressApi';
23
27
  export * from './erp/BaseApi';
24
28
  export * from './erp/OrgApi';
package/lib/cjs/index.js CHANGED
@@ -43,6 +43,10 @@ __exportStar(require("./dto/IdLabelDto"), exports);
43
43
  __exportStar(require("./dto/IdLabelPrimaryDto"), exports);
44
44
  __exportStar(require("./dto/InitCallDto"), exports);
45
45
  // erp
46
+ __exportStar(require("./erp/dto/CurrencyDto"), exports);
47
+ __exportStar(require("./erp/dto/ExchangeRateDto"), exports);
48
+ __exportStar(require("./erp/dto/ExchangeRateHistoryDto"), exports);
49
+ __exportStar(require("./erp/dto/PublicProductDto"), exports);
46
50
  __exportStar(require("./erp/AddressApi"), exports);
47
51
  __exportStar(require("./erp/BaseApi"), exports);
48
52
  __exportStar(require("./erp/OrgApi"), exports);
@@ -21,14 +21,14 @@ export declare class PublicApi extends BaseApi {
21
21
  * @param currency Currency
22
22
  * @returns Result
23
23
  */
24
- exchangeRate(currency: Currency): Promise<ExchangeRateDto | undefined>;
24
+ exchangeRate(currency: Currency | string): Promise<ExchangeRateDto | undefined>;
25
25
  /**
26
26
  * Get exchange rate history
27
27
  * @param currencies Currencies
28
28
  * @param months Max months
29
29
  * @returns Result
30
30
  */
31
- exchangeRateHistory(currencies: Currency[], months?: number): Promise<ExchangeRateHistoryDto[] | undefined>;
31
+ exchangeRateHistory(currencies: (Currency | string)[], months?: number): Promise<ExchangeRateHistoryDto[] | undefined>;
32
32
  /**
33
33
  * Get product unit's label
34
34
  * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
@@ -19,6 +19,10 @@ export * from './def/ListItem';
19
19
  export * from './dto/IdLabelDto';
20
20
  export * from './dto/IdLabelPrimaryDto';
21
21
  export * from './dto/InitCallDto';
22
+ export * from './erp/dto/CurrencyDto';
23
+ export * from './erp/dto/ExchangeRateDto';
24
+ export * from './erp/dto/ExchangeRateHistoryDto';
25
+ export * from './erp/dto/PublicProductDto';
22
26
  export * from './erp/AddressApi';
23
27
  export * from './erp/BaseApi';
24
28
  export * from './erp/OrgApi';
package/lib/mjs/index.js CHANGED
@@ -26,6 +26,10 @@ export * from './dto/IdLabelDto';
26
26
  export * from './dto/IdLabelPrimaryDto';
27
27
  export * from './dto/InitCallDto';
28
28
  // erp
29
+ export * from './erp/dto/CurrencyDto';
30
+ export * from './erp/dto/ExchangeRateDto';
31
+ export * from './erp/dto/ExchangeRateHistoryDto';
32
+ export * from './erp/dto/PublicProductDto';
29
33
  export * from './erp/AddressApi';
30
34
  export * from './erp/BaseApi';
31
35
  export * from './erp/OrgApi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -36,7 +36,7 @@ export class PublicApi extends BaseApi {
36
36
  * @param currency Currency
37
37
  * @returns Result
38
38
  */
39
- exchangeRate(currency: Currency) {
39
+ exchangeRate(currency: Currency | string) {
40
40
  return this.app.api.get<ExchangeRateDto>(
41
41
  `Public/ExchangeRate/${currency}`
42
42
  );
@@ -48,7 +48,7 @@ export class PublicApi extends BaseApi {
48
48
  * @param months Max months
49
49
  * @returns Result
50
50
  */
51
- exchangeRateHistory(currencies: Currency[], months?: number) {
51
+ exchangeRateHistory(currencies: (Currency | string)[], months?: number) {
52
52
  return this.app.api.post<ExchangeRateHistoryDto[]>(
53
53
  'Public/ExchangeRateHistory',
54
54
  { currencies, months },
package/src/index.ts CHANGED
@@ -32,6 +32,11 @@ export * from './dto/IdLabelPrimaryDto';
32
32
  export * from './dto/InitCallDto';
33
33
 
34
34
  // erp
35
+ export * from './erp/dto/CurrencyDto';
36
+ export * from './erp/dto/ExchangeRateDto';
37
+ export * from './erp/dto/ExchangeRateHistoryDto';
38
+ export * from './erp/dto/PublicProductDto';
39
+
35
40
  export * from './erp/AddressApi';
36
41
  export * from './erp/BaseApi';
37
42
  export * from './erp/OrgApi';