@getclarify/nodejs-sdk 0.0.1

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 (131) hide show
  1. package/dist/cjs/client.d.ts +54 -0
  2. package/dist/cjs/client.d.ts.map +1 -0
  3. package/dist/cjs/client.js +88 -0
  4. package/dist/cjs/client.js.map +1 -0
  5. package/dist/cjs/errors/api-error.d.ts +59 -0
  6. package/dist/cjs/errors/api-error.d.ts.map +1 -0
  7. package/dist/cjs/errors/api-error.js +104 -0
  8. package/dist/cjs/errors/api-error.js.map +1 -0
  9. package/dist/cjs/errors/index.d.ts +3 -0
  10. package/dist/cjs/errors/index.d.ts.map +1 -0
  11. package/dist/cjs/errors/index.js +10 -0
  12. package/dist/cjs/errors/index.js.map +1 -0
  13. package/dist/cjs/http/http-client.d.ts +46 -0
  14. package/dist/cjs/http/http-client.d.ts.map +1 -0
  15. package/dist/cjs/http/http-client.js +145 -0
  16. package/dist/cjs/http/http-client.js.map +1 -0
  17. package/dist/cjs/index.d.ts +9 -0
  18. package/dist/cjs/index.d.ts.map +1 -0
  19. package/dist/cjs/index.js +25 -0
  20. package/dist/cjs/index.js.map +1 -0
  21. package/dist/cjs/resources/base-resource.d.ts +15 -0
  22. package/dist/cjs/resources/base-resource.d.ts.map +1 -0
  23. package/dist/cjs/resources/base-resource.js +22 -0
  24. package/dist/cjs/resources/base-resource.js.map +1 -0
  25. package/dist/cjs/resources/messages.d.ts +105 -0
  26. package/dist/cjs/resources/messages.d.ts.map +1 -0
  27. package/dist/cjs/resources/messages.js +166 -0
  28. package/dist/cjs/resources/messages.js.map +1 -0
  29. package/dist/cjs/resources/records.d.ts +157 -0
  30. package/dist/cjs/resources/records.d.ts.map +1 -0
  31. package/dist/cjs/resources/records.js +264 -0
  32. package/dist/cjs/resources/records.js.map +1 -0
  33. package/dist/cjs/resources/relationships.d.ts +96 -0
  34. package/dist/cjs/resources/relationships.d.ts.map +1 -0
  35. package/dist/cjs/resources/relationships.js +157 -0
  36. package/dist/cjs/resources/relationships.js.map +1 -0
  37. package/dist/cjs/resources/tasks.d.ts +141 -0
  38. package/dist/cjs/resources/tasks.d.ts.map +1 -0
  39. package/dist/cjs/resources/tasks.js +211 -0
  40. package/dist/cjs/resources/tasks.js.map +1 -0
  41. package/dist/cjs/types/common.d.ts +126 -0
  42. package/dist/cjs/types/common.d.ts.map +1 -0
  43. package/dist/cjs/types/common.js +3 -0
  44. package/dist/cjs/types/common.js.map +1 -0
  45. package/dist/cjs/types/config.d.ts +36 -0
  46. package/dist/cjs/types/config.d.ts.map +1 -0
  47. package/dist/cjs/types/config.js +11 -0
  48. package/dist/cjs/types/config.js.map +1 -0
  49. package/dist/cjs/types/index.d.ts +4 -0
  50. package/dist/cjs/types/index.d.ts.map +1 -0
  51. package/dist/cjs/types/index.js +6 -0
  52. package/dist/cjs/types/index.js.map +1 -0
  53. package/dist/esm/client.d.ts +54 -0
  54. package/dist/esm/client.d.ts.map +1 -0
  55. package/dist/esm/client.js +88 -0
  56. package/dist/esm/client.js.map +1 -0
  57. package/dist/esm/errors/api-error.d.ts +59 -0
  58. package/dist/esm/errors/api-error.d.ts.map +1 -0
  59. package/dist/esm/errors/api-error.js +104 -0
  60. package/dist/esm/errors/api-error.js.map +1 -0
  61. package/dist/esm/errors/index.d.ts +3 -0
  62. package/dist/esm/errors/index.d.ts.map +1 -0
  63. package/dist/esm/errors/index.js +10 -0
  64. package/dist/esm/errors/index.js.map +1 -0
  65. package/dist/esm/http/http-client.d.ts +46 -0
  66. package/dist/esm/http/http-client.d.ts.map +1 -0
  67. package/dist/esm/http/http-client.js +145 -0
  68. package/dist/esm/http/http-client.js.map +1 -0
  69. package/dist/esm/index.d.ts +9 -0
  70. package/dist/esm/index.d.ts.map +1 -0
  71. package/dist/esm/index.js +25 -0
  72. package/dist/esm/index.js.map +1 -0
  73. package/dist/esm/resources/base-resource.d.ts +15 -0
  74. package/dist/esm/resources/base-resource.d.ts.map +1 -0
  75. package/dist/esm/resources/base-resource.js +22 -0
  76. package/dist/esm/resources/base-resource.js.map +1 -0
  77. package/dist/esm/resources/messages.d.ts +105 -0
  78. package/dist/esm/resources/messages.d.ts.map +1 -0
  79. package/dist/esm/resources/messages.js +166 -0
  80. package/dist/esm/resources/messages.js.map +1 -0
  81. package/dist/esm/resources/records.d.ts +157 -0
  82. package/dist/esm/resources/records.d.ts.map +1 -0
  83. package/dist/esm/resources/records.js +264 -0
  84. package/dist/esm/resources/records.js.map +1 -0
  85. package/dist/esm/resources/relationships.d.ts +96 -0
  86. package/dist/esm/resources/relationships.d.ts.map +1 -0
  87. package/dist/esm/resources/relationships.js +157 -0
  88. package/dist/esm/resources/relationships.js.map +1 -0
  89. package/dist/esm/resources/tasks.d.ts +141 -0
  90. package/dist/esm/resources/tasks.d.ts.map +1 -0
  91. package/dist/esm/resources/tasks.js +211 -0
  92. package/dist/esm/resources/tasks.js.map +1 -0
  93. package/dist/esm/types/common.d.ts +126 -0
  94. package/dist/esm/types/common.d.ts.map +1 -0
  95. package/dist/esm/types/common.js +3 -0
  96. package/dist/esm/types/common.js.map +1 -0
  97. package/dist/esm/types/config.d.ts +36 -0
  98. package/dist/esm/types/config.d.ts.map +1 -0
  99. package/dist/esm/types/config.js +11 -0
  100. package/dist/esm/types/config.js.map +1 -0
  101. package/dist/esm/types/index.d.ts +4 -0
  102. package/dist/esm/types/index.d.ts.map +1 -0
  103. package/dist/esm/types/index.js +6 -0
  104. package/dist/esm/types/index.js.map +1 -0
  105. package/dist/types/client.d.ts +54 -0
  106. package/dist/types/client.d.ts.map +1 -0
  107. package/dist/types/errors/api-error.d.ts +59 -0
  108. package/dist/types/errors/api-error.d.ts.map +1 -0
  109. package/dist/types/errors/index.d.ts +3 -0
  110. package/dist/types/errors/index.d.ts.map +1 -0
  111. package/dist/types/http/http-client.d.ts +46 -0
  112. package/dist/types/http/http-client.d.ts.map +1 -0
  113. package/dist/types/index.d.ts +9 -0
  114. package/dist/types/index.d.ts.map +1 -0
  115. package/dist/types/resources/base-resource.d.ts +15 -0
  116. package/dist/types/resources/base-resource.d.ts.map +1 -0
  117. package/dist/types/resources/messages.d.ts +105 -0
  118. package/dist/types/resources/messages.d.ts.map +1 -0
  119. package/dist/types/resources/records.d.ts +157 -0
  120. package/dist/types/resources/records.d.ts.map +1 -0
  121. package/dist/types/resources/relationships.d.ts +96 -0
  122. package/dist/types/resources/relationships.d.ts.map +1 -0
  123. package/dist/types/resources/tasks.d.ts +141 -0
  124. package/dist/types/resources/tasks.d.ts.map +1 -0
  125. package/dist/types/types/common.d.ts +126 -0
  126. package/dist/types/types/common.d.ts.map +1 -0
  127. package/dist/types/types/config.d.ts +36 -0
  128. package/dist/types/types/config.d.ts.map +1 -0
  129. package/dist/types/types/index.d.ts +4 -0
  130. package/dist/types/types/index.d.ts.map +1 -0
  131. package/package.json +68 -0
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessagesResource = void 0;
4
+ const base_resource_js_1 = require("./base-resource.js");
5
+ /**
6
+ * Manages messages in the Clarify platform.
7
+ */
8
+ class MessagesResource extends base_resource_js_1.BaseResource {
9
+ constructor(httpClient, config) {
10
+ super(httpClient, config);
11
+ }
12
+ /**
13
+ * Lists messages.
14
+ *
15
+ * @param options - Pagination, filter, and sort options
16
+ * @returns Paginated list of messages
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * const messages = await clarify.messages.list({
21
+ * page: { limit: 20 },
22
+ * filter: { from: 'user@example.com' },
23
+ * });
24
+ * ```
25
+ */
26
+ async list(options) {
27
+ const query = this.buildListQuery(options);
28
+ return this.httpClient.request({
29
+ method: 'GET',
30
+ path: `${this.basePath}/messages`,
31
+ query,
32
+ });
33
+ }
34
+ /**
35
+ * Gets a single message by ID.
36
+ *
37
+ * @param id - The message ID
38
+ * @returns The message
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * const message = await clarify.messages.get('message-id');
43
+ * console.log(message.data.attributes.subject);
44
+ * ```
45
+ */
46
+ async get(id) {
47
+ return this.httpClient.request({
48
+ method: 'GET',
49
+ path: `${this.basePath}/messages/${id}`,
50
+ });
51
+ }
52
+ /**
53
+ * Creates a new message.
54
+ *
55
+ * @param data - The message data to create
56
+ * @returns The created message
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * const message = await clarify.messages.create({
61
+ * type: 'message',
62
+ * attributes: {
63
+ * subject: 'Hello',
64
+ * body: 'Message content',
65
+ * from: 'sender@example.com',
66
+ * to: ['recipient@example.com'],
67
+ * },
68
+ * });
69
+ * ```
70
+ */
71
+ async create(data) {
72
+ const body = { data };
73
+ return this.httpClient.request({
74
+ method: 'POST',
75
+ path: `${this.basePath}/messages`,
76
+ body,
77
+ });
78
+ }
79
+ /**
80
+ * Deletes a message.
81
+ *
82
+ * @param id - The message ID
83
+ *
84
+ * @example
85
+ * ```typescript
86
+ * await clarify.messages.delete('message-id');
87
+ * ```
88
+ */
89
+ async delete(id) {
90
+ await this.httpClient.request({
91
+ method: 'DELETE',
92
+ path: `${this.basePath}/messages/${id}`,
93
+ });
94
+ }
95
+ /**
96
+ * Async iterator for paginating through all messages.
97
+ *
98
+ * @param options - Filter and sort options (pagination is handled automatically)
99
+ * @yields Individual messages
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * for await (const message of clarify.messages.iterate()) {
104
+ * console.log(message.attributes.subject);
105
+ * }
106
+ * ```
107
+ */
108
+ async *iterate(options) {
109
+ let cursor;
110
+ do {
111
+ const response = await this.list({
112
+ ...options,
113
+ page: { cursor, limit: 100 },
114
+ });
115
+ for (const message of response.data) {
116
+ yield message;
117
+ }
118
+ cursor = this.extractCursor(response.links?.next);
119
+ } while (cursor);
120
+ }
121
+ /**
122
+ * Builds query parameters from list options.
123
+ */
124
+ buildListQuery(options) {
125
+ const query = {};
126
+ if (options?.page?.cursor) {
127
+ query['page[cursor]'] = options.page.cursor;
128
+ }
129
+ if (options?.page?.limit) {
130
+ query['page[limit]'] = options.page.limit;
131
+ }
132
+ if (options?.filter) {
133
+ for (const [key, value] of Object.entries(options.filter)) {
134
+ if (value !== undefined) {
135
+ query[`filter[${key}]`] = Array.isArray(value)
136
+ ? value.join(',')
137
+ : String(value);
138
+ }
139
+ }
140
+ }
141
+ if (options?.sort) {
142
+ const sorts = Array.isArray(options.sort) ? options.sort : [options.sort];
143
+ query['sort'] = sorts
144
+ .map((s) => (s.direction === 'desc' ? `-${s.field}` : s.field))
145
+ .join(',');
146
+ }
147
+ return query;
148
+ }
149
+ /**
150
+ * Extracts the cursor from a pagination URL.
151
+ */
152
+ extractCursor(url) {
153
+ if (!url) {
154
+ return undefined;
155
+ }
156
+ try {
157
+ const parsedUrl = new URL(url);
158
+ return parsedUrl.searchParams.get('page[cursor]') ?? undefined;
159
+ }
160
+ catch {
161
+ return undefined;
162
+ }
163
+ }
164
+ }
165
+ exports.MessagesResource = MessagesResource;
166
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/resources/messages.ts"],"names":[],"mappings":";;;AAUA,yDAAkD;AAiBlD;;GAEG;AACH,MAAa,gBAAiB,SAAQ,+BAAY;IAChD,YAAY,UAAsB,EAAE,MAAsB;QACxD,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,IAAI,CACR,OAAqB;QAErB,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAE3C,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAkB;YAC9C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,WAAW;YACjC,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,GAAG,CACP,EAAU;QAEV,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAoB;YAChD,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AO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;YAC/B,OAAO,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,SAAS,CAAC;QACjE,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF;AAtLD,4CAsLC"}
@@ -0,0 +1,157 @@
1
+ import type { HttpClient } from '../http/http-client.js';
2
+ import type { ListOptions, ListResponse, ResolvedConfig, Resource, ResourceCreate, ResourceUpdate, SingleResponse } from '../types/index.js';
3
+ import { BaseResource } from './base-resource.js';
4
+ import { RelationshipsResource } from './relationships.js';
5
+ /**
6
+ * Manages CRUD operations for records.
7
+ */
8
+ export declare class RecordsResource extends BaseResource {
9
+ /** Sub-resource for managing record relationships */
10
+ readonly relationships: RelationshipsResource;
11
+ constructor(httpClient: HttpClient, config: ResolvedConfig);
12
+ /**
13
+ * Lists records of a given entity type.
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
+ * ```
27
+ */
28
+ list<T = Record<string, unknown>>(entity: string, options?: ListOptions): Promise<ListResponse<T>>;
29
+ /**
30
+ * Gets a single record by ID.
31
+ *
32
+ * @param entity - The entity type
33
+ * @param id - The record ID
34
+ * @returns The record
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * const company = await clarify.records.get('company', 'company-id');
39
+ * console.log(company.data.attributes.name);
40
+ * ```
41
+ */
42
+ get<T = Record<string, unknown>>(entity: string, id: string): Promise<SingleResponse<T>>;
43
+ /**
44
+ * Creates a new record.
45
+ *
46
+ * @param entity - The entity type
47
+ * @param data - The resource data to create
48
+ * @returns The created record
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const company = await clarify.records.create('company', {
53
+ * type: 'company',
54
+ * attributes: { name: 'Acme Inc.', industry: 'technology' },
55
+ * });
56
+ * ```
57
+ */
58
+ create<T = Record<string, unknown>>(entity: string, data: ResourceCreate<T>): Promise<SingleResponse<T>>;
59
+ /**
60
+ * Updates an existing record.
61
+ *
62
+ * @param entity - The entity type
63
+ * @param id - The record ID
64
+ * @param data - The resource data to update
65
+ * @returns The updated record
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * const company = await clarify.records.update('company', 'company-id', {
70
+ * type: 'company',
71
+ * id: 'company-id',
72
+ * attributes: { industry: 'software' },
73
+ * });
74
+ * ```
75
+ */
76
+ update<T = Record<string, unknown>>(entity: string, id: string, data: ResourceUpdate<T>): Promise<SingleResponse<T>>;
77
+ /**
78
+ * Deletes a record.
79
+ *
80
+ * @param entity - The entity type
81
+ * @param id - The record ID
82
+ *
83
+ * @example
84
+ * ```typescript
85
+ * await clarify.records.delete('company', 'company-id');
86
+ * ```
87
+ */
88
+ delete(entity: string, id: string): Promise<void>;
89
+ /**
90
+ * Creates multiple records in bulk.
91
+ *
92
+ * @param entity - The entity type
93
+ * @param data - Array of resources to create
94
+ * @returns The created records
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * const companies = await clarify.records.createBulk('company', [
99
+ * { type: 'company', attributes: { name: 'Acme Inc.' } },
100
+ * { type: 'company', attributes: { name: 'Globex Corp.' } },
101
+ * ]);
102
+ * ```
103
+ */
104
+ createBulk<T = Record<string, unknown>>(entity: string, data: ResourceCreate<T>[]): Promise<ListResponse<T>>;
105
+ /**
106
+ * Updates multiple records in bulk.
107
+ *
108
+ * @param entity - The entity type
109
+ * @param data - Array of resources to update
110
+ * @returns The updated records
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * const companies = await clarify.records.updateBulk('company', [
115
+ * { type: 'company', id: 'id-1', attributes: { industry: 'tech' } },
116
+ * { type: 'company', id: 'id-2', attributes: { industry: 'finance' } },
117
+ * ]);
118
+ * ```
119
+ */
120
+ updateBulk<T = Record<string, unknown>>(entity: string, data: ResourceUpdate<T>[]): Promise<ListResponse<T>>;
121
+ /**
122
+ * Deletes multiple records in bulk.
123
+ *
124
+ * @param entity - The entity type
125
+ * @param ids - Array of record IDs to delete
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * await clarify.records.deleteBulk('company', ['id-1', 'id-2', 'id-3']);
130
+ * ```
131
+ */
132
+ 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
+ }
157
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +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,EAKV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,cAAc,EACd,cAAc,EACd,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IA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,CAAC,CAAC,CAAC,CAAC;IAU3B;;;;;;;;;;;;;;OAcG;IACG,UAAU,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1C,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,GACxB,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAU3B;;;;;;;;;;OAUG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9D;;;;;;;;;;;;;OAaG;IACI,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAClC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC;IAkB/C;;OAEG;IACH,OAAO,CAAC,cAAc;IAgCtB;;OAEG;IACH,OAAO,CAAC,aAAa;CAYtB"}
@@ -0,0 +1,264 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RecordsResource = void 0;
4
+ const base_resource_js_1 = require("./base-resource.js");
5
+ const relationships_js_1 = require("./relationships.js");
6
+ /**
7
+ * Manages CRUD operations for records.
8
+ */
9
+ class RecordsResource extends base_resource_js_1.BaseResource {
10
+ /** Sub-resource for managing record relationships */
11
+ relationships;
12
+ constructor(httpClient, config) {
13
+ super(httpClient, config);
14
+ this.relationships = new relationships_js_1.RelationshipsResource(httpClient, config);
15
+ }
16
+ /**
17
+ * Lists records of a given entity type.
18
+ *
19
+ * @param entity - The entity type (e.g., 'company', 'person', 'deal')
20
+ * @param options - Pagination, filter, and sort options
21
+ * @returns Paginated list of records
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * const companies = await clarify.records.list('company', {
26
+ * page: { limit: 20 },
27
+ * filter: { industry: 'technology' },
28
+ * sort: { field: 'name', direction: 'asc' },
29
+ * });
30
+ * ```
31
+ */
32
+ async list(entity, options) {
33
+ const query = this.buildListQuery(options);
34
+ return this.httpClient.request({
35
+ method: 'GET',
36
+ path: `${this.basePath}/records/${entity}`,
37
+ query,
38
+ });
39
+ }
40
+ /**
41
+ * Gets a single record by ID.
42
+ *
43
+ * @param entity - The entity type
44
+ * @param id - The record ID
45
+ * @returns The record
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * const company = await clarify.records.get('company', 'company-id');
50
+ * console.log(company.data.attributes.name);
51
+ * ```
52
+ */
53
+ async get(entity, id) {
54
+ return this.httpClient.request({
55
+ method: 'GET',
56
+ path: `${this.basePath}/records/${entity}/${id}`,
57
+ });
58
+ }
59
+ /**
60
+ * Creates a new record.
61
+ *
62
+ * @param entity - The entity type
63
+ * @param data - The resource data to create
64
+ * @returns The created record
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * const company = await clarify.records.create('company', {
69
+ * type: 'company',
70
+ * attributes: { name: 'Acme Inc.', industry: 'technology' },
71
+ * });
72
+ * ```
73
+ */
74
+ async create(entity, data) {
75
+ const body = { data };
76
+ return this.httpClient.request({
77
+ method: 'POST',
78
+ path: `${this.basePath}/records/${entity}`,
79
+ body,
80
+ });
81
+ }
82
+ /**
83
+ * Updates an existing record.
84
+ *
85
+ * @param entity - The entity type
86
+ * @param id - The record ID
87
+ * @param data - The resource data to update
88
+ * @returns The updated record
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * const company = await clarify.records.update('company', 'company-id', {
93
+ * type: 'company',
94
+ * id: 'company-id',
95
+ * attributes: { industry: 'software' },
96
+ * });
97
+ * ```
98
+ */
99
+ async update(entity, id, data) {
100
+ const body = { data };
101
+ return this.httpClient.request({
102
+ method: 'PATCH',
103
+ path: `${this.basePath}/records/${entity}/${id}`,
104
+ body,
105
+ });
106
+ }
107
+ /**
108
+ * Deletes a record.
109
+ *
110
+ * @param entity - The entity type
111
+ * @param id - The record ID
112
+ *
113
+ * @example
114
+ * ```typescript
115
+ * await clarify.records.delete('company', 'company-id');
116
+ * ```
117
+ */
118
+ async delete(entity, id) {
119
+ await this.httpClient.request({
120
+ method: 'DELETE',
121
+ path: `${this.basePath}/records/${entity}/${id}`,
122
+ });
123
+ }
124
+ /**
125
+ * Creates multiple records in bulk.
126
+ *
127
+ * @param entity - The entity type
128
+ * @param data - Array of resources to create
129
+ * @returns The created records
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * const companies = await clarify.records.createBulk('company', [
134
+ * { type: 'company', attributes: { name: 'Acme Inc.' } },
135
+ * { type: 'company', attributes: { name: 'Globex Corp.' } },
136
+ * ]);
137
+ * ```
138
+ */
139
+ async createBulk(entity, data) {
140
+ const body = { data };
141
+ return this.httpClient.request({
142
+ method: 'POST',
143
+ path: `${this.basePath}/records/${entity}/bulk`,
144
+ body,
145
+ });
146
+ }
147
+ /**
148
+ * Updates multiple records in bulk.
149
+ *
150
+ * @param entity - The entity type
151
+ * @param data - Array of resources to update
152
+ * @returns The updated records
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * const companies = await clarify.records.updateBulk('company', [
157
+ * { type: 'company', id: 'id-1', attributes: { industry: 'tech' } },
158
+ * { type: 'company', id: 'id-2', attributes: { industry: 'finance' } },
159
+ * ]);
160
+ * ```
161
+ */
162
+ async updateBulk(entity, data) {
163
+ const body = { data };
164
+ return this.httpClient.request({
165
+ method: 'PATCH',
166
+ path: `${this.basePath}/records/${entity}/bulk`,
167
+ body,
168
+ });
169
+ }
170
+ /**
171
+ * Deletes multiple records in bulk.
172
+ *
173
+ * @param entity - The entity type
174
+ * @param ids - Array of record IDs to delete
175
+ *
176
+ * @example
177
+ * ```typescript
178
+ * await clarify.records.deleteBulk('company', ['id-1', 'id-2', 'id-3']);
179
+ * ```
180
+ */
181
+ async deleteBulk(entity, ids) {
182
+ const body = {
183
+ data: ids.map((id) => ({ type: entity, id })),
184
+ };
185
+ await this.httpClient.request({
186
+ method: 'DELETE',
187
+ path: `${this.basePath}/records/${entity}/bulk`,
188
+ body,
189
+ });
190
+ }
191
+ /**
192
+ * Async iterator for paginating through all records.
193
+ *
194
+ * @param entity - The entity type
195
+ * @param options - Filter and sort options (pagination is handled automatically)
196
+ * @yields Individual records
197
+ *
198
+ * @example
199
+ * ```typescript
200
+ * for await (const company of clarify.records.iterate('company')) {
201
+ * console.log(company.attributes.name);
202
+ * }
203
+ * ```
204
+ */
205
+ async *iterate(entity, options) {
206
+ let cursor;
207
+ do {
208
+ const response = await this.list(entity, {
209
+ ...options,
210
+ page: { cursor, limit: 100 },
211
+ });
212
+ for (const record of response.data) {
213
+ yield record;
214
+ }
215
+ // Extract cursor from next link if available
216
+ cursor = this.extractCursor(response.links?.next);
217
+ } while (cursor);
218
+ }
219
+ /**
220
+ * Builds query parameters from list options.
221
+ */
222
+ buildListQuery(options) {
223
+ const query = {};
224
+ if (options?.page?.cursor) {
225
+ query['page[cursor]'] = options.page.cursor;
226
+ }
227
+ if (options?.page?.limit) {
228
+ query['page[limit]'] = options.page.limit;
229
+ }
230
+ if (options?.filter) {
231
+ for (const [key, value] of Object.entries(options.filter)) {
232
+ if (value !== undefined) {
233
+ query[`filter[${key}]`] = Array.isArray(value)
234
+ ? value.join(',')
235
+ : String(value);
236
+ }
237
+ }
238
+ }
239
+ if (options?.sort) {
240
+ const sorts = Array.isArray(options.sort) ? options.sort : [options.sort];
241
+ query['sort'] = sorts
242
+ .map((s) => (s.direction === 'desc' ? `-${s.field}` : s.field))
243
+ .join(',');
244
+ }
245
+ return query;
246
+ }
247
+ /**
248
+ * Extracts the cursor from a pagination URL.
249
+ */
250
+ extractCursor(url) {
251
+ if (!url) {
252
+ return undefined;
253
+ }
254
+ try {
255
+ const parsedUrl = new URL(url);
256
+ return parsedUrl.searchParams.get('page[cursor]') ?? undefined;
257
+ }
258
+ catch {
259
+ return undefined;
260
+ }
261
+ }
262
+ }
263
+ exports.RecordsResource = RecordsResource;
264
+ //# sourceMappingURL=records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.js","sourceRoot":"","sources":["../../../src/resources/records.ts"],"names":[],"mappings":";;;AAeA,yDAAkD;AAClD,yDAA2D;AAE3D;;GAEG;AACH,MAAa,eAAgB,SAAQ,+BAAY;IAC/C,qDAAqD;IAC5C,aAAa,CAAwB;IAE9C,YAAY,UAAsB,EAAE,MAAsB;QACxD,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,IAAI,wCAAqB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,IAAI,CACR,MAAc,EACd,OAAqB;QAErB,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAE3C,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAkB;YAC9C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,YAAY,MAAM,EAAE;YAC1C,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,GAAG,CACP,MAAc,EACd,EAAU;QAEV,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAoB;YAChD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,YAAY,MAAM,IAAI,EAAE,EAAE;SACjD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,MAAM,CACV,MAAc,EACd,IAAuB;QAEvB,MAAM,IAAI,GAAkB,EAAE,IAAI,EAAE,CAAC;QAErC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAoB;YAChD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,YAAY,MAAM,EAAE;YAC1C,IAAI;SACL,C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