@v3finance/core-sdk 0.15.0 → 0.17.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 (41) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/cjs/generated/operations.js +1 -1
  3. package/dist/cjs/generated/types.d.ts +18 -3
  4. package/dist/cjs/generated/types.d.ts.map +1 -1
  5. package/dist/cjs/index.d.ts +1 -1
  6. package/dist/cjs/index.d.ts.map +1 -1
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/resources/exports.d.ts +19 -10
  9. package/dist/cjs/resources/exports.d.ts.map +1 -1
  10. package/dist/cjs/resources/exports.js +17 -10
  11. package/dist/cjs/resources/exports.js.map +1 -1
  12. package/dist/cjs/resources/reports.d.ts +3 -2
  13. package/dist/cjs/resources/reports.d.ts.map +1 -1
  14. package/dist/cjs/resources/reports.js +3 -2
  15. package/dist/cjs/resources/reports.js.map +1 -1
  16. package/dist/cjs/version.d.ts +1 -1
  17. package/dist/cjs/version.js +1 -1
  18. package/dist/esm/generated/operations.js +1 -1
  19. package/dist/esm/generated/types.d.ts +18 -3
  20. package/dist/esm/generated/types.d.ts.map +1 -1
  21. package/dist/esm/index.d.ts +1 -1
  22. package/dist/esm/index.d.ts.map +1 -1
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/resources/exports.d.ts +19 -10
  25. package/dist/esm/resources/exports.d.ts.map +1 -1
  26. package/dist/esm/resources/exports.js +17 -10
  27. package/dist/esm/resources/exports.js.map +1 -1
  28. package/dist/esm/resources/reports.d.ts +3 -2
  29. package/dist/esm/resources/reports.d.ts.map +1 -1
  30. package/dist/esm/resources/reports.js +3 -2
  31. package/dist/esm/resources/reports.js.map +1 -1
  32. package/dist/esm/version.d.ts +1 -1
  33. package/dist/esm/version.js +1 -1
  34. package/docs/errors.md +16 -3
  35. package/package.json +1 -1
  36. package/src/generated/operations.ts +1 -1
  37. package/src/generated/types.ts +18 -3
  38. package/src/index.ts +7 -1
  39. package/src/resources/exports.ts +30 -12
  40. package/src/resources/reports.ts +3 -2
  41. package/src/version.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,46 @@
3
3
  All notable changes to this package are documented in this file. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
5
5
 
6
+ ## 0.17.0 — 2026-11-29
7
+
8
+ Push tokens know their provider, for the native iPhone app. Spec snapshot from the live API (commit `13cb7bf`,
9
+ [v3-finance/policy-engine#65](https://github.com/v3-finance/policy-engine/pull/65)). No operations added or
10
+ removed (250).
11
+
12
+ ### Added
13
+
14
+ - `RegisterPushTokenBody.provider` (`expo` | `apns`, default `expo`), `environment` (`sandbox` | `production`, required
15
+ for `apns`) and `topic` (only `finance.v3.ios` today, the default). The server sends `apns` tokens straight to Apple.
16
+ - `PushToken.provider`, `environment` and `topic` (both `null` for `expo`).
17
+ - Error codes `INVALID_PUSH_TOKEN`, `APNS_ENVIRONMENT_REQUIRED`, `APNS_TOPIC_NOT_ALLOWED`, `PUSH_PROVIDER_MISMATCH`
18
+ (docs/errors.md, «Push tokens»).
19
+ - docs/errors.md: `WEB_SESSION_CANNOT_BIND_EMAIL` (since 0.14.2 the server refuses binding an email from a web session; the
20
+ code was missing from the reference).
21
+
22
+ ### Changed
23
+
24
+ - **The token is now checked against its provider.** An Expo token must look like `ExponentPushToken[…]`; any other string
25
+ without `provider: 'apns'` is 400 `INVALID_PUSH_TOKEN` (it used to be stored and silently never delivered). An APNs token
26
+ is stored in lower case, and `me.removePushToken` matches it in any case.
27
+
28
+ ## 0.16.0 — 2026-11-25
29
+
30
+ Files in the reader's language and for accounting systems. Spec snapshot from the live API (commit `975e281`,
31
+ [v3-finance/policy-engine#63](https://github.com/v3-finance/policy-engine/pull/63)). No operations added or
32
+ removed (250).
33
+
34
+ ### Added
35
+
36
+ - `ExportOptions.lang` (`en` | `ru`) and `ExportOptions.format` (`xlsx` | `csv`); `reports.createExport` takes `lang`.
37
+ - A workbook now holds a printable document, a register, `Data` (stable English columns, codes, signed amounts) and, for
38
+ a report, `Figures` — every figure as a row. `csv` is the `Data` sheet.
39
+
40
+ ### Changed
41
+
42
+ - **The default language of a file is English** (it was Russian): pass `lang: 'ru'` for Russian. An unknown one is 400
43
+ `INVALID_LANGUAGE`.
44
+ - `exports.report(type, params, options)` takes the same options as the others.
45
+
6
46
  ## 0.15.0 — 2026-11-25
7
47
 
8
48
  Excel files of lists and reports. Spec snapshot from the live API (commit `9a81462`,
@@ -10,7 +10,7 @@
10
10
  // the API does not slip in unclassified.
11
11
  //
12
12
  // Operations: 250 · admin: 45 · both: 1 · member: 201 · service: 3
13
- // Spec sha256: 6c7cf2559b70547ee366c0ee5de98375099d054ee0792eb08c93a5685be2e070
13
+ // Spec sha256: 585b254ed09a4e675ae6713e5929b2edcc258bb25691604ecde6bf29ef728022
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.OPERATIONS = void 0;
16
16
  exports.isAdminOperation = isAdminOperation;
@@ -3739,8 +3739,15 @@ export interface PolicyWithRules {
3739
3739
  export interface PushToken {
3740
3740
  /** cuid */
3741
3741
  id: string;
3742
+ /** Как хранится: hex APNs — в нижнем регистре */
3742
3743
  token: string;
3743
3744
  platform: string;
3745
+ /** Кто доставляет пуш. `expo` — приложение на Expo (iOS и Android), через exp.host; `apns` — нативное приложение для iPhone, сервер шлёт напрямую в Apple */
3746
+ provider: "expo" | "apns";
3747
+ /** Окружение APNs: `sandbox` (сборки из Xcode) или `production`; у `expo` — null */
3748
+ environment: "sandbox" | "production" | null;
3749
+ /** bundle id (`apns-topic`); у `expo` — null */
3750
+ topic: string | null;
3744
3751
  /** format: date-time */
3745
3752
  createdAt: string;
3746
3753
  /** format: date-time */
@@ -3823,13 +3830,19 @@ export interface ReconcileTransferResult {
3823
3830
  }
3824
3831
  export interface RegisterPushTokenBody {
3825
3832
  /**
3826
- * Expo push token
3833
+ * Токен устройства. Для `expo` — `ExponentPushToken[…]` (или `ExpoPushToken[…]`); для `apns` — токен устройства APNs в hex (не короче 64 символов), регистр не важен: хранится в нижнем
3827
3834
  *
3828
3835
  * length: 1..∞
3829
3836
  */
3830
3837
  token: string;
3831
3838
  /** default ios */
3832
3839
  platform?: "ios" | "android";
3840
+ /** По умолчанию `expo` — так регистрируются клиенты, которые поля не шлют */
3841
+ provider?: "expo" | "apns";
3842
+ /** Только для `apns`, и там обязателен (`APNS_ENVIRONMENT_REQUIRED`). Для `expo` — 400 `PUSH_PROVIDER_MISMATCH` */
3843
+ environment?: "sandbox" | "production";
3844
+ /** Только для `apns`: bundle id приложения (`apns-topic`). Допустимые: finance.v3.ios; по умолчанию `finance.v3.ios`. Другой — 400 `APNS_TOPIC_NOT_ALLOWED`. Для `expo` — 400 `PUSH_PROVIDER_MISMATCH` */
3845
+ topic?: string;
3833
3846
  }
3834
3847
  export interface RegistryNetwork {
3835
3848
  /** cuid */
@@ -5763,9 +5776,11 @@ export interface BalancesAsOfTotal {
5763
5776
  ownedTotal: string;
5764
5777
  }
5765
5778
  export interface CreateReportExportBody {
5766
- /** json — canonical JSON результата; csv — плоский реестр операций; xlsx — книга Excel: сводка, разбивки и операции. pdf схема принимает, а хендлер отклоняет: 400 REPORT_UNSUPPORTED_FORMAT */
5779
+ /** json — canonical JSON результата; csv — плоский реестр операций; xlsx — книга Excel: отчёт, операции, листы Data и Figures. pdf схема принимает, а хендлер отклоняет: 400 REPORT_UNSUPPORTED_FORMAT */
5767
5780
  format: "json" | "csv" | "xlsx" | "pdf";
5768
- /** Зарезервировано: сейчас не влияет на файл */
5781
+ /** Язык файла xlsx; по умолчанию en. На json и csv не влияет */
5782
+ lang?: "en" | "ru";
5783
+ /** Зарезервировано: сейчас не влияет на файл; язык задаёт lang */
5769
5784
  locale?: string;
5770
5785
  /** IANA-пояс дат в файле xlsx; по умолчанию — пояс отчёта. На json и csv не влияет */
5771
5786
  timezone?: string;