@getclarify/nodejs-sdk 0.0.1 → 0.0.3
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.
- package/README.md +104 -0
- package/dist/cjs/client.d.ts +0 -11
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +0 -13
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/http/http-client.d.ts.map +1 -1
- package/dist/cjs/http/http-client.js +2 -2
- package/dist/cjs/http/http-client.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -4
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/base-resource.js +1 -1
- package/dist/cjs/resources/base-resource.js.map +1 -1
- package/dist/cjs/resources/records.d.ts +65 -90
- package/dist/cjs/resources/records.d.ts.map +1 -1
- package/dist/cjs/resources/records.js +111 -165
- package/dist/cjs/resources/records.js.map +1 -1
- package/dist/cjs/types/common.d.ts +28 -0
- package/dist/cjs/types/common.d.ts.map +1 -1
- package/dist/cjs/types/config.d.ts +4 -4
- package/dist/cjs/types/config.d.ts.map +1 -1
- package/dist/cjs/types/config.js +2 -2
- package/dist/cjs/types/config.js.map +1 -1
- package/dist/cjs/types/index.d.ts +2 -2
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/esm/client.d.ts +0 -11
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +0 -13
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/http/http-client.d.ts.map +1 -1
- package/dist/esm/http/http-client.js +2 -2
- package/dist/esm/http/http-client.js.map +1 -1
- package/dist/esm/index.d.ts +1 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/base-resource.js +1 -1
- package/dist/esm/resources/base-resource.js.map +1 -1
- package/dist/esm/resources/records.d.ts +65 -90
- package/dist/esm/resources/records.d.ts.map +1 -1
- package/dist/esm/resources/records.js +111 -165
- package/dist/esm/resources/records.js.map +1 -1
- package/dist/esm/types/common.d.ts +28 -0
- package/dist/esm/types/common.d.ts.map +1 -1
- package/dist/esm/types/config.d.ts +4 -4
- package/dist/esm/types/config.d.ts.map +1 -1
- package/dist/esm/types/config.js +2 -2
- package/dist/esm/types/config.js.map +1 -1
- package/dist/esm/types/index.d.ts +2 -2
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/index.js.map +1 -1
- package/dist/types/client.d.ts +0 -11
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/http/http-client.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/records.d.ts +65 -90
- package/dist/types/resources/records.d.ts.map +1 -1
- package/dist/types/types/common.d.ts +28 -0
- package/dist/types/types/common.d.ts.map +1 -1
- package/dist/types/types/config.d.ts +4 -4
- package/dist/types/types/config.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +2 -2
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +37 -37
- package/dist/cjs/resources/messages.d.ts +0 -105
- package/dist/cjs/resources/messages.d.ts.map +0 -1
- package/dist/cjs/resources/messages.js +0 -166
- package/dist/cjs/resources/messages.js.map +0 -1
- package/dist/cjs/resources/relationships.d.ts +0 -96
- package/dist/cjs/resources/relationships.d.ts.map +0 -1
- package/dist/cjs/resources/relationships.js +0 -157
- package/dist/cjs/resources/relationships.js.map +0 -1
- package/dist/cjs/resources/tasks.d.ts +0 -141
- package/dist/cjs/resources/tasks.d.ts.map +0 -1
- package/dist/cjs/resources/tasks.js +0 -211
- package/dist/cjs/resources/tasks.js.map +0 -1
- package/dist/esm/resources/messages.d.ts +0 -105
- package/dist/esm/resources/messages.d.ts.map +0 -1
- package/dist/esm/resources/messages.js +0 -166
- package/dist/esm/resources/messages.js.map +0 -1
- package/dist/esm/resources/relationships.d.ts +0 -96
- package/dist/esm/resources/relationships.d.ts.map +0 -1
- package/dist/esm/resources/relationships.js +0 -157
- package/dist/esm/resources/relationships.js.map +0 -1
- package/dist/esm/resources/tasks.d.ts +0 -141
- package/dist/esm/resources/tasks.d.ts.map +0 -1
- package/dist/esm/resources/tasks.js +0 -211
- package/dist/esm/resources/tasks.js.map +0 -1
- package/dist/types/resources/messages.d.ts +0 -105
- package/dist/types/resources/messages.d.ts.map +0 -1
- package/dist/types/resources/relationships.d.ts +0 -96
- package/dist/types/resources/relationships.d.ts.map +0 -1
- package/dist/types/resources/tasks.d.ts +0 -141
- package/dist/types/resources/tasks.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../src/http/http-client.ts"],"names":[],"mappings":";;;AAAA,iDAI4B;AAa5B;;GAEG;AACH,MAAa,UAAU;IACJ,MAAM,CAAiB;IAExC,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CAAI,OAA2B;QAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACvD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACpC,MAAM,WAAW,GAAgB;YAC/B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO;SACR,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAI,GAAG,EAAE,WAAW,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACK,QAAQ,CACd,IAAY,EACZ,KAAwE;QAExE,MA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,gBAAgB,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QAC1D,kCAAkC;QAClC,MAAM,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,EAAU;QACtB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF;AA1KD,gCA0KC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export { ClarifyClient } from './client.js';
|
|
2
2
|
export { ClarifyError, ClarifyApiError, ClarifyValidationError, ClarifyTimeoutError, ClarifyNetworkError, } from './errors/index.js';
|
|
3
3
|
export type { ApiErrorDetail } from './errors/index.js';
|
|
4
|
-
export type { ClarifyClientConfig, ResourceIdentifier, Resource, ResourceCreate, ResourceUpdate, SingleResponse, ListResponse, PaginationLinks, PaginationMeta, PaginationOptions, FilterOptions, SortOptions, ListOptions, } from './types/index.js';
|
|
4
|
+
export type { ClarifyClientConfig, ResourceIdentifier, Resource, ResourceCreate, ResourceUpdate, SingleResponse, ListResponse, PaginationLinks, PaginationMeta, PaginationOptions, FilterOptions, SortOptions, ListOptions, GetRecordOptions, FieldOperationRules, UpdateRecordOptions, } from './types/index.js';
|
|
5
5
|
export { RecordsResource } from './resources/records.js';
|
|
6
|
-
export { RelationshipsResource } from './resources/relationships.js';
|
|
7
|
-
export { MessagesResource, type MessageAttributes } from './resources/messages.js';
|
|
8
|
-
export { TasksResource, TaskStatus, TaskPriority, type TaskAttributes, } from './resources/tasks.js';
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RecordsResource = exports.ClarifyNetworkError = exports.ClarifyTimeoutError = exports.ClarifyValidationError = exports.ClarifyApiError = exports.ClarifyError = exports.ClarifyClient = void 0;
|
|
4
4
|
// Main client export
|
|
5
5
|
var client_js_1 = require("./client.js");
|
|
6
6
|
Object.defineProperty(exports, "ClarifyClient", { enumerable: true, get: function () { return client_js_1.ClarifyClient; } });
|
|
@@ -14,12 +14,4 @@ Object.defineProperty(exports, "ClarifyNetworkError", { enumerable: true, get: f
|
|
|
14
14
|
// Resource exports for advanced usage
|
|
15
15
|
var records_js_1 = require("./resources/records.js");
|
|
16
16
|
Object.defineProperty(exports, "RecordsResource", { enumerable: true, get: function () { return records_js_1.RecordsResource; } });
|
|
17
|
-
var relationships_js_1 = require("./resources/relationships.js");
|
|
18
|
-
Object.defineProperty(exports, "RelationshipsResource", { enumerable: true, get: function () { return relationships_js_1.RelationshipsResource; } });
|
|
19
|
-
var messages_js_1 = require("./resources/messages.js");
|
|
20
|
-
Object.defineProperty(exports, "MessagesResource", { enumerable: true, get: function () { return messages_js_1.MessagesResource; } });
|
|
21
|
-
var tasks_js_1 = require("./resources/tasks.js");
|
|
22
|
-
Object.defineProperty(exports, "TasksResource", { enumerable: true, get: function () { return tasks_js_1.TasksResource; } });
|
|
23
|
-
Object.defineProperty(exports, "TaskStatus", { enumerable: true, get: function () { return tasks_js_1.TaskStatus; } });
|
|
24
|
-
Object.defineProperty(exports, "TaskPriority", { enumerable: true, get: function () { return tasks_js_1.TaskPriority; } });
|
|
25
17
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qBAAqB;AACrB,yCAA4C;AAAnC,0GAAA,aAAa,OAAA;AAEtB,gBAAgB;AAChB,8CAM2B;AALzB,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qBAAqB;AACrB,yCAA4C;AAAnC,0GAAA,aAAa,OAAA;AAEtB,gBAAgB;AAChB,8CAM2B;AALzB,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;AAwBrB,sCAAsC;AACtC,qDAAyD;AAAhD,6GAAA,eAAe,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-resource.js","sourceRoot":"","sources":["../../../src/resources/base-resource.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAsB,YAAY;IACb,UAAU,CAAa;IACvB,MAAM,CAAiB;IAE1C,YAAY,UAAsB,EAAE,MAAsB;QACxD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,IAAc,QAAQ;QACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"base-resource.js","sourceRoot":"","sources":["../../../src/resources/base-resource.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,MAAsB,YAAY;IACb,UAAU,CAAa;IACvB,MAAM,CAAiB;IAE1C,YAAY,UAAsB,EAAE,MAAsB;QACxD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,IAAc,QAAQ;QACpB,OAAO,kBAAkB,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;IACnD,CAAC;CACF;AAfD,oCAeC"}
|
|
@@ -1,157 +1,132 @@
|
|
|
1
1
|
import type { HttpClient } from '../http/http-client.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GetRecordOptions, ListResponse, ResolvedConfig, ResourceCreate, ResourceUpdate, SingleResponse, UpdateRecordOptions } from '../types/index.js';
|
|
3
3
|
import { BaseResource } from './base-resource.js';
|
|
4
|
-
import { RelationshipsResource } from './relationships.js';
|
|
5
4
|
/**
|
|
6
5
|
* Manages CRUD operations for records.
|
|
7
6
|
*/
|
|
8
7
|
export declare class RecordsResource extends BaseResource {
|
|
9
|
-
/** Sub-resource for managing record relationships */
|
|
10
|
-
readonly relationships: RelationshipsResource;
|
|
11
8
|
constructor(httpClient: HttpClient, config: ResolvedConfig);
|
|
12
9
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
16
|
-
* @param options - Pagination, filter, and sort options
|
|
17
|
-
* @returns Paginated list of records
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* const companies = await clarify.records.list('company', {
|
|
22
|
-
* page: { limit: 20 },
|
|
23
|
-
* filter: { industry: 'technology' },
|
|
24
|
-
* sort: { field: 'name', direction: 'asc' },
|
|
25
|
-
* });
|
|
26
|
-
* ```
|
|
10
|
+
* Gets the base path for record operations on a specific entity.
|
|
27
11
|
*/
|
|
28
|
-
|
|
12
|
+
private getEntityPath;
|
|
29
13
|
/**
|
|
30
|
-
*
|
|
14
|
+
* Retrieves a single record by ID.
|
|
31
15
|
*
|
|
32
|
-
* @param entity - The entity type
|
|
16
|
+
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
33
17
|
* @param id - The record ID
|
|
34
|
-
* @
|
|
18
|
+
* @param options - Optional parameters including relationships to include
|
|
19
|
+
* @returns The record wrapped in a JSON:API response
|
|
35
20
|
*
|
|
36
21
|
* @example
|
|
37
22
|
* ```typescript
|
|
38
|
-
* const
|
|
39
|
-
* console.log(
|
|
23
|
+
* const response = await client.records.get('company', 'abc123');
|
|
24
|
+
* console.log(response.data.attributes.name);
|
|
25
|
+
*
|
|
26
|
+
* // With included relationships
|
|
27
|
+
* const response = await client.records.get('deal', 'xyz789', {
|
|
28
|
+
* include: ['company', 'person']
|
|
29
|
+
* });
|
|
40
30
|
* ```
|
|
41
31
|
*/
|
|
42
|
-
get<T = Record<string, unknown>>(entity: string, id: string): Promise<SingleResponse<T>>;
|
|
32
|
+
get<T = Record<string, unknown>>(entity: string, id: string, options?: GetRecordOptions): Promise<SingleResponse<T>>;
|
|
43
33
|
/**
|
|
44
|
-
* Creates a
|
|
34
|
+
* Creates a single record.
|
|
45
35
|
*
|
|
46
|
-
* @param entity - The entity type
|
|
47
|
-
* @param
|
|
48
|
-
* @returns The created record
|
|
36
|
+
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
37
|
+
* @param attributes - The record attributes to create
|
|
38
|
+
* @returns The created record wrapped in a JSON:API response
|
|
49
39
|
*
|
|
50
40
|
* @example
|
|
51
41
|
* ```typescript
|
|
52
|
-
* const
|
|
53
|
-
*
|
|
54
|
-
*
|
|
42
|
+
* const response = await client.records.create('company', {
|
|
43
|
+
* name: 'Acme Corp',
|
|
44
|
+
* website: 'https://acme.com'
|
|
55
45
|
* });
|
|
46
|
+
* console.log(response.data.id);
|
|
56
47
|
* ```
|
|
57
48
|
*/
|
|
58
|
-
create<T = Record<string, unknown>>(entity: string,
|
|
49
|
+
create<T = Record<string, unknown>>(entity: string, attributes: T): Promise<SingleResponse<T>>;
|
|
59
50
|
/**
|
|
60
|
-
*
|
|
51
|
+
* Creates multiple records in bulk.
|
|
61
52
|
*
|
|
62
|
-
* @param entity - The entity type
|
|
63
|
-
* @param
|
|
64
|
-
* @
|
|
65
|
-
* @returns The updated record
|
|
53
|
+
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
54
|
+
* @param records - Array of record create objects with type and attributes
|
|
55
|
+
* @returns The created records wrapped in a JSON:API list response
|
|
66
56
|
*
|
|
67
57
|
* @example
|
|
68
58
|
* ```typescript
|
|
69
|
-
* const
|
|
70
|
-
* type: 'company',
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
59
|
+
* const response = await client.records.createBulk('company', [
|
|
60
|
+
* { type: 'company', attributes: { name: 'Acme Corp' } },
|
|
61
|
+
* { type: 'company', attributes: { name: 'Widget Inc' } }
|
|
62
|
+
* ]);
|
|
63
|
+
* console.log(response.data.length);
|
|
74
64
|
* ```
|
|
75
65
|
*/
|
|
76
|
-
|
|
66
|
+
createBulk<T = Record<string, unknown>>(entity: string, records: ResourceCreate<T>[]): Promise<ListResponse<T>>;
|
|
77
67
|
/**
|
|
78
|
-
*
|
|
68
|
+
* Updates a single record.
|
|
79
69
|
*
|
|
80
|
-
* @param entity - The entity type
|
|
70
|
+
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
81
71
|
* @param id - The record ID
|
|
72
|
+
* @param attributes - The attributes to update
|
|
73
|
+
* @param options - Optional update options including field operation rules
|
|
74
|
+
* @returns The updated record wrapped in a JSON:API response
|
|
82
75
|
*
|
|
83
76
|
* @example
|
|
84
77
|
* ```typescript
|
|
85
|
-
* await
|
|
78
|
+
* const response = await client.records.update('company', 'abc123', {
|
|
79
|
+
* name: 'Acme Corporation'
|
|
80
|
+
* });
|
|
81
|
+
*
|
|
82
|
+
* // With field operation rules (e.g., append to array field)
|
|
83
|
+
* const response = await client.records.update('deal', 'xyz789',
|
|
84
|
+
* { tags: ['new-tag'] },
|
|
85
|
+
* { meta: { tags: { array: 'append' } } }
|
|
86
|
+
* );
|
|
86
87
|
* ```
|
|
87
88
|
*/
|
|
88
|
-
|
|
89
|
+
update<T = Record<string, unknown>>(entity: string, id: string, attributes: Partial<T>, options?: UpdateRecordOptions): Promise<SingleResponse<T>>;
|
|
89
90
|
/**
|
|
90
|
-
*
|
|
91
|
+
* Updates multiple records in bulk.
|
|
91
92
|
*
|
|
92
|
-
* @param entity - The entity type
|
|
93
|
-
* @param
|
|
94
|
-
* @
|
|
93
|
+
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
94
|
+
* @param records - Array of record update objects with type, id, and attributes
|
|
95
|
+
* @param options - Optional update options including field operation rules
|
|
96
|
+
* @returns The updated records wrapped in a JSON:API list response
|
|
95
97
|
*
|
|
96
98
|
* @example
|
|
97
99
|
* ```typescript
|
|
98
|
-
* const
|
|
99
|
-
* { type: 'company', attributes: {
|
|
100
|
-
* { type: 'company', attributes: {
|
|
100
|
+
* const response = await client.records.updateBulk('company', [
|
|
101
|
+
* { type: 'company', id: 'abc123', attributes: { status: 'active' } },
|
|
102
|
+
* { type: 'company', id: 'def456', attributes: { status: 'active' } }
|
|
101
103
|
* ]);
|
|
102
104
|
* ```
|
|
103
105
|
*/
|
|
104
|
-
|
|
106
|
+
updateBulk<T = Record<string, unknown>>(entity: string, records: ResourceUpdate<T>[], options?: UpdateRecordOptions): Promise<ListResponse<T>>;
|
|
105
107
|
/**
|
|
106
|
-
*
|
|
108
|
+
* Deletes a single record.
|
|
107
109
|
*
|
|
108
|
-
* @param entity - The entity type
|
|
109
|
-
* @param
|
|
110
|
-
* @returns The updated records
|
|
110
|
+
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
111
|
+
* @param id - The record ID to delete
|
|
111
112
|
*
|
|
112
113
|
* @example
|
|
113
114
|
* ```typescript
|
|
114
|
-
*
|
|
115
|
-
* { type: 'company', id: 'id-1', attributes: { industry: 'tech' } },
|
|
116
|
-
* { type: 'company', id: 'id-2', attributes: { industry: 'finance' } },
|
|
117
|
-
* ]);
|
|
115
|
+
* await client.records.delete('company', 'abc123');
|
|
118
116
|
* ```
|
|
119
117
|
*/
|
|
120
|
-
|
|
118
|
+
delete(entity: string, id: string): Promise<void>;
|
|
121
119
|
/**
|
|
122
120
|
* Deletes multiple records in bulk.
|
|
123
121
|
*
|
|
124
|
-
* @param entity - The entity type
|
|
122
|
+
* @param entity - The entity type (e.g., 'company', 'person', 'deal')
|
|
125
123
|
* @param ids - Array of record IDs to delete
|
|
126
124
|
*
|
|
127
125
|
* @example
|
|
128
126
|
* ```typescript
|
|
129
|
-
* await
|
|
127
|
+
* await client.records.deleteBulk('company', ['abc123', 'def456']);
|
|
130
128
|
* ```
|
|
131
129
|
*/
|
|
132
130
|
deleteBulk(entity: string, ids: string[]): Promise<void>;
|
|
133
|
-
/**
|
|
134
|
-
* Async iterator for paginating through all records.
|
|
135
|
-
*
|
|
136
|
-
* @param entity - The entity type
|
|
137
|
-
* @param options - Filter and sort options (pagination is handled automatically)
|
|
138
|
-
* @yields Individual records
|
|
139
|
-
*
|
|
140
|
-
* @example
|
|
141
|
-
* ```typescript
|
|
142
|
-
* for await (const company of clarify.records.iterate('company')) {
|
|
143
|
-
* console.log(company.attributes.name);
|
|
144
|
-
* }
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
iterate<T = Record<string, unknown>>(entity: string, options?: Omit<ListOptions, 'page'>): AsyncGenerator<Resource<T>, void, undefined>;
|
|
148
|
-
/**
|
|
149
|
-
* Builds query parameters from list options.
|
|
150
|
-
*/
|
|
151
|
-
private buildListQuery;
|
|
152
|
-
/**
|
|
153
|
-
* Extracts the cursor from a pagination URL.
|
|
154
|
-
*/
|
|
155
|
-
private extractCursor;
|
|
156
131
|
}
|
|
157
132
|
//# sourceMappingURL=records.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../src/resources/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../src/resources/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAGV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,oB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