@incomy/platform-sdk 0.4.0-172 → 0.4.0-176

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.
@@ -19,6 +19,7 @@ export type { Company } from './models/Company';
19
19
  export type { CompanyEdit } from './models/CompanyEdit';
20
20
  export type { CompanyInsert } from './models/CompanyInsert';
21
21
  export type { CompanyPaginatedList } from './models/CompanyPaginatedList';
22
+ export type { CurrencyInfo } from './models/CurrencyInfo';
22
23
  export type { Icon } from './models/Icon';
23
24
  export type { InputFieldDefinition } from './models/InputFieldDefinition';
24
25
  export type { Label } from './models/Label';
@@ -82,6 +83,7 @@ export { AccrualsService } from './services/AccrualsService';
82
83
  export { AuthService } from './services/AuthService';
83
84
  export { BucketsService } from './services/BucketsService';
84
85
  export { CompaniesService } from './services/CompaniesService';
86
+ export { CurrenciesService } from './services/CurrenciesService';
85
87
  export { LabelsService } from './services/LabelsService';
86
88
  export { MembersService } from './services/MembersService';
87
89
  export { MultiEventsService } from './services/MultiEventsService';
@@ -9,6 +9,7 @@ export { AccrualsService } from './services/AccrualsService';
9
9
  export { AuthService } from './services/AuthService';
10
10
  export { BucketsService } from './services/BucketsService';
11
11
  export { CompaniesService } from './services/CompaniesService';
12
+ export { CurrenciesService } from './services/CurrenciesService';
12
13
  export { LabelsService } from './services/LabelsService';
13
14
  export { MembersService } from './services/MembersService';
14
15
  export { MultiEventsService } from './services/MultiEventsService';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Display metadata for a single platform currency. The set of codes is the curated
3
+ * platform catalog (see Incomy.Platform.Hub.Models.CurrencyCode); a project enables a subset of it
4
+ * via Incomy.Platform.Hub.Models.ProjectSettings.EnabledCurrencies.
5
+ */
6
+ export type CurrencyInfo = {
7
+ code: 'PLN' | 'EUR' | 'USD' | 'GBP' | 'CHF';
8
+ symbol: string;
9
+ name: string;
10
+ /**
11
+ * Number of fractional digits commonly used when displaying amounts in this currency.
12
+ */
13
+ decimalDigits?: number;
14
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
1
  export type Money = {
2
2
  amount: number;
3
- currencyCode: 'PLN' | 'EUR' | 'USD';
3
+ currencyCode: 'PLN' | 'EUR' | 'USD' | 'GBP' | 'CHF';
4
4
  };
@@ -1,3 +1,12 @@
1
1
  export type ProjectSettings = {
2
2
  bucketingEnabled?: boolean;
3
+ /**
4
+ * Currencies enabled for this project — a subset of the platform Incomy.Platform.Hub.Models.CurrencyCatalog.
5
+ * Operations, accruals and wallet defaults are restricted to this set.
6
+ */
7
+ enabledCurrencies?: Array<'PLN' | 'EUR' | 'USD' | 'GBP' | 'CHF'> | null;
8
+ /**
9
+ * Default currency for the project. When set, must be one of Incomy.Platform.Hub.Models.ProjectSettings.EnabledCurrencies.
10
+ */
11
+ defaultCurrency?: 'PLN' | 'EUR' | 'USD' | 'GBP' | 'CHF' | null;
3
12
  };
@@ -3,7 +3,7 @@ export type ProjectWallet = {
3
3
  id: string;
4
4
  name: string;
5
5
  ownerId?: string | null;
6
- defaultCurrency?: string | null;
6
+ defaultCurrency?: 'PLN' | 'EUR' | 'USD' | 'GBP' | 'CHF' | null;
7
7
  defaultCompanyId?: string | null;
8
8
  balance?: Array<Money> | null;
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  export type ProjectWalletEdit = {
2
2
  name?: string | null;
3
3
  /**
4
- * Pass empty string in order to clear the default currency.
4
+ * Pass null in order to clear the default currency. Must be one of the project's enabled currencies.
5
5
  */
6
- defaultCurrency?: string | null;
6
+ defaultCurrency?: 'PLN' | 'EUR' | 'USD' | 'GBP' | 'CHF' | null;
7
7
  /**
8
8
  * Pass empty string in order to clear the owner.
9
9
  */
@@ -1,6 +1,6 @@
1
1
  export type ProjectWalletInsert = {
2
2
  name: string;
3
- defaultCurrency?: string | null;
3
+ defaultCurrency?: 'PLN' | 'EUR' | 'USD' | 'GBP' | 'CHF' | null;
4
4
  ownerId?: string | null;
5
5
  defaultCompanyId?: string | null;
6
6
  };
@@ -0,0 +1,12 @@
1
+ import type { CurrencyInfo } from '../models/CurrencyInfo';
2
+ import type { CancelablePromise } from '../core/CancelablePromise';
3
+ export declare class CurrenciesService {
4
+ /**
5
+ * The platform-wide currency catalog (code, symbol, name, decimal digits). A project enables a
6
+ * subset of these via its settings; this endpoint is the single source the frontend uses for
7
+ * currency metadata instead of hardcoding lists.
8
+ * @returns CurrencyInfo OK
9
+ * @throws ApiError
10
+ */
11
+ static getCurrencies(): CancelablePromise<Array<CurrencyInfo>>;
12
+ }
@@ -0,0 +1,17 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class CurrenciesService {
4
+ /**
5
+ * The platform-wide currency catalog (code, symbol, name, decimal digits). A project enables a
6
+ * subset of these via its settings; this endpoint is the single source the frontend uses for
7
+ * currency metadata instead of hardcoding lists.
8
+ * @returns CurrencyInfo OK
9
+ * @throws ApiError
10
+ */
11
+ static getCurrencies() {
12
+ return __request(OpenAPI, {
13
+ method: 'GET',
14
+ url: '/currencies',
15
+ });
16
+ }
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incomy/platform-sdk",
3
- "version": "0.4.0-172",
3
+ "version": "0.4.0-176",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [