@korala/api-client 1.7.0 → 1.9.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CatalogFormSummaryDto, CreateTemplateFromCatalogDto, TemplateDto } from '@korala/public-dtos';
|
|
1
|
+
import type { CatalogFormFieldsDto, CatalogFormSummaryDto, CreateTemplateFromCatalogDto, TemplateDto } from '@korala/public-dtos';
|
|
2
2
|
import type { HttpClient } from '../http.js';
|
|
3
3
|
/** Korala-curated standard forms (IRS W-9/W-8 family) you can clone. */
|
|
4
4
|
export declare class CatalogResource {
|
|
@@ -6,6 +6,17 @@ export declare class CatalogResource {
|
|
|
6
6
|
constructor(http: HttpClient);
|
|
7
7
|
/** List standard forms available to clone into your organization. */
|
|
8
8
|
listForms(): Promise<CatalogFormSummaryDto[]>;
|
|
9
|
+
/**
|
|
10
|
+
* The signer roles and fields a clone of this version will have, without
|
|
11
|
+
* creating anything. Use it to map your data to a form while you are still
|
|
12
|
+
* deciding whether to use it, rather than cloning each candidate and
|
|
13
|
+
* leaving templates behind.
|
|
14
|
+
*
|
|
15
|
+
* Fields are identified by `canonicalName`, the name you set values against
|
|
16
|
+
* on the cloned template. Positions and the PDF's internal AcroForm names
|
|
17
|
+
* are not returned.
|
|
18
|
+
*/
|
|
19
|
+
getFormFields(versionId: string): Promise<CatalogFormFieldsDto>;
|
|
9
20
|
/**
|
|
10
21
|
* Clone a catalog form version into an org template (seed PDF copied,
|
|
11
22
|
* mapped fields + signer roles created). Use the returned template with the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/resources/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,wEAAwE;AACxE,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,qEAAqE;IACrE,SAAS,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAI7C;;;;OAIG;IACH,cAAc,CACZ,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,4BAAiC,GACtC,OAAO,CAAC,WAAW,CAAC;CAMxB"}
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/resources/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,wEAAwE;AACxE,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,qEAAqE;IACrE,SAAS,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAI7C;;;;;;;;;OASG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAM/D;;;;OAIG;IACH,cAAc,CACZ,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,4BAAiC,GACtC,OAAO,CAAC,WAAW,CAAC;CAMxB"}
|
|
@@ -11,6 +11,19 @@ class CatalogResource {
|
|
|
11
11
|
listForms() {
|
|
12
12
|
return this.http.get('/catalog/forms');
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The signer roles and fields a clone of this version will have, without
|
|
16
|
+
* creating anything. Use it to map your data to a form while you are still
|
|
17
|
+
* deciding whether to use it, rather than cloning each candidate and
|
|
18
|
+
* leaving templates behind.
|
|
19
|
+
*
|
|
20
|
+
* Fields are identified by `canonicalName`, the name you set values against
|
|
21
|
+
* on the cloned template. Positions and the PDF's internal AcroForm names
|
|
22
|
+
* are not returned.
|
|
23
|
+
*/
|
|
24
|
+
getFormFields(versionId) {
|
|
25
|
+
return this.http.get(`/catalog/forms/${versionId}/fields`);
|
|
26
|
+
}
|
|
14
27
|
/**
|
|
15
28
|
* Clone a catalog form version into an org template (seed PDF copied,
|
|
16
29
|
* mapped fields + signer roles created). Use the returned template with the
|
|
@@ -11,6 +11,7 @@ export declare class TemplatesResource {
|
|
|
11
11
|
page?: number;
|
|
12
12
|
limit?: number;
|
|
13
13
|
sandbox?: boolean;
|
|
14
|
+
search?: string;
|
|
14
15
|
}): Promise<PaginatedTemplatesDto>;
|
|
15
16
|
get(templateId: string): Promise<TemplateWithDetailsDto>;
|
|
16
17
|
duplicate(templateId: string, data?: DuplicateTemplateDto): Promise<TemplateDto>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/resources/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC9B,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAI7C,eAAe,CACb,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,4BAA4B,CAAC;IAOxC,aAAa,CACX,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,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EAClB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,gBAAgB,CAAC;IAO5B,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/D;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQ9D,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAQpE,cAAc,CACZ,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,WAAW,CAAC;IASvB,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,oBAAoB,CAAC;CAMjC"}
|
|
@@ -27,6 +27,8 @@ class TemplatesResource {
|
|
|
27
27
|
query.set('limit', String(params.limit));
|
|
28
28
|
if (params?.sandbox !== undefined)
|
|
29
29
|
query.set('sandbox', String(params.sandbox));
|
|
30
|
+
if (params?.search)
|
|
31
|
+
query.set('search', params.search);
|
|
30
32
|
const qs = query.toString();
|
|
31
33
|
return this.http.get(`/templates${qs ? `?${qs}` : ''}`);
|
|
32
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@korala/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "TypeScript API client for Korala document signing API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.korala.ai",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@korala/auth": "^1.1.0",
|
|
33
|
-
"@korala/public-dtos": "^1.
|
|
33
|
+
"@korala/public-dtos": "^1.9.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"typescript": "^5.9.3"
|