dochub-sdk 0.1.264 → 0.1.266

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.
@@ -328,8 +328,9 @@ export interface IDocHubDataLake {
328
328
  /**
329
329
  * Отправляет транзакцию в DataLake
330
330
  * @param transaction - Объект транзакции
331
+ * @param comment - Комментарий к фиксируемой транзакции
331
332
  */
332
- commitTransaction(transaction: IDocHubTransaction): Promise<IDocHubTransaction>;
333
+ commitTransaction(transaction: IDocHubTransaction, comment?: string): Promise<IDocHubTransaction>;
333
334
 
334
335
  /**
335
336
  * Отменяет транзакцию
@@ -1,5 +1,6 @@
1
1
  import { AxiosResponse, AxiosRequestConfig, ResponseType, Method } from 'axios';
2
2
  import { IDocHubContext } from './contexts';
3
+ import { IDocHubTransactionFileHeaders } from './datalake';
3
4
 
4
5
  export enum ProtocolOptionsResponseTypes {
5
6
  arraybuffer = 'arraybuffer',
@@ -91,14 +92,16 @@ export interface IDocHubResourceVersion {
91
92
  */
92
93
  export interface IDocHubCommitFile {
93
94
  uri: string;
95
+ headers?: IDocHubTransactionFileHeaders;
94
96
  content: string | ArrayBuffer | (() => string | ArrayBuffer);
95
- encoded?: 'plain' | 'base64' | 'ArrayBuffer';
97
+ encoded?: 'plain' | 'base64' | 'ArrayBuffer'; // default: plain
96
98
  }
97
99
 
98
100
  /**
99
101
  * Данные для создания коммита
100
102
  */
101
- export interface IDocHubCommitBatch extends AxiosRequestConfig {
103
+ export interface IDocHubCommitBatch extends IDocHubProtocolRequestConfig {
104
+ method: DocHubProtocolMethods.COMMIT,
102
105
  comment: string;
103
106
  data: IDocHubCommitFile[];
104
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.264",
3
+ "version": "0.1.266",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",