langsmith 0.7.9 → 0.7.11

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 (99) hide show
  1. package/README.md +46 -15
  2. package/dist/_openapi_client/client.cjs +0 -88
  3. package/dist/_openapi_client/client.d.ts +0 -33
  4. package/dist/_openapi_client/client.js +0 -88
  5. package/dist/_openapi_client/internal/headers.d.ts +13 -0
  6. package/dist/_openapi_client/internal/types.d.ts +1 -28
  7. package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
  8. package/dist/_openapi_client/resources/datasets/runs.d.ts +1 -2
  9. package/dist/_openapi_client/resources/index.cjs +1 -23
  10. package/dist/_openapi_client/resources/index.d.ts +0 -11
  11. package/dist/_openapi_client/resources/index.js +0 -11
  12. package/dist/anonymizer/index.cjs +142 -0
  13. package/dist/anonymizer/index.d.ts +45 -0
  14. package/dist/anonymizer/index.js +140 -0
  15. package/dist/client.cjs +26 -1
  16. package/dist/client.d.ts +4 -1
  17. package/dist/client.js +25 -1
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/sandbox/client.cjs +5 -8
  22. package/dist/sandbox/client.js +5 -8
  23. package/dist/sandbox/index.cjs +2 -1
  24. package/dist/sandbox/index.d.ts +2 -2
  25. package/dist/sandbox/index.js +1 -1
  26. package/dist/sandbox/mounts.cjs +157 -18
  27. package/dist/sandbox/mounts.d.ts +10 -2
  28. package/dist/sandbox/mounts.js +155 -18
  29. package/dist/sandbox/proxy_config.cjs +19 -44
  30. package/dist/sandbox/proxy_config.d.ts +2 -4
  31. package/dist/sandbox/proxy_config.js +19 -43
  32. package/dist/sandbox/types.d.ts +56 -15
  33. package/dist/utils/constants.cjs +4 -0
  34. package/dist/utils/constants.d.ts +1 -0
  35. package/dist/utils/constants.js +1 -0
  36. package/package.json +2 -2
  37. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
  38. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
  39. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
  40. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
  41. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
  42. package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
  43. package/dist/_openapi_client/resources/commits.cjs +0 -44
  44. package/dist/_openapi_client/resources/commits.d.ts +0 -204
  45. package/dist/_openapi_client/resources/commits.js +0 -40
  46. package/dist/_openapi_client/resources/evaluators.cjs +0 -15
  47. package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
  48. package/dist/_openapi_client/resources/evaluators.js +0 -11
  49. package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
  50. package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
  51. package/dist/_openapi_client/resources/examples/bulk.js +0 -20
  52. package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
  53. package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
  54. package/dist/_openapi_client/resources/examples/examples.js +0 -87
  55. package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
  56. package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
  57. package/dist/_openapi_client/resources/examples/validate.js +0 -17
  58. package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
  59. package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
  60. package/dist/_openapi_client/resources/feedback/configs.js +0 -20
  61. package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
  62. package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
  63. package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
  64. package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
  65. package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
  66. package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
  67. package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
  68. package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
  69. package/dist/_openapi_client/resources/public/datasets.js +0 -43
  70. package/dist/_openapi_client/resources/public/public.cjs +0 -62
  71. package/dist/_openapi_client/resources/public/public.d.ts +0 -32
  72. package/dist/_openapi_client/resources/public/public.js +0 -25
  73. package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
  74. package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
  75. package/dist/_openapi_client/resources/repos/directories.js +0 -36
  76. package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
  77. package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
  78. package/dist/_openapi_client/resources/repos/repos.js +0 -56
  79. package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
  80. package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
  81. package/dist/_openapi_client/resources/runs/rules.js +0 -5
  82. package/dist/_openapi_client/resources/runs/runs.cjs +0 -102
  83. package/dist/_openapi_client/resources/runs/runs.d.ts +0 -542
  84. package/dist/_openapi_client/resources/runs/runs.js +0 -65
  85. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
  86. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
  87. package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
  88. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
  89. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
  90. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
  91. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
  92. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
  93. package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
  94. package/dist/_openapi_client/resources/settings.cjs +0 -15
  95. package/dist/_openapi_client/resources/settings.d.ts +0 -18
  96. package/dist/_openapi_client/resources/settings.js +0 -11
  97. package/dist/_openapi_client/resources/workspaces.cjs +0 -35
  98. package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
  99. package/dist/_openapi_client/resources/workspaces.js +0 -31
@@ -1,182 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as BulkAPI from './bulk.js';
3
- import { Bulk, BulkCreateParams, BulkCreateResponse, BulkPatchAllParams, BulkPatchAllResponse } from './bulk.js';
4
- import * as ValidateAPI from './validate.js';
5
- import { ExampleValidationResult, Validate, ValidateBulkResponse } from './validate.js';
6
- import { APIPromise } from '../../core/api-promise.js';
7
- import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
8
- import { type Uploadable } from '../../core/uploads.js';
9
- import { RequestOptions } from '../../internal/request-options.js';
10
- export declare class Examples extends APIResource {
11
- bulk: BulkAPI.Bulk;
12
- validate: ValidateAPI.Validate;
13
- /**
14
- * Create a new example.
15
- */
16
- create(body: ExampleCreateParams, options?: RequestOptions): APIPromise<Example>;
17
- /**
18
- * Get a specific example.
19
- */
20
- retrieve(exampleID: string, query?: ExampleRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Example>;
21
- /**
22
- * Update a specific example.
23
- */
24
- update(exampleID: string, body: ExampleUpdateParams, options?: RequestOptions): APIPromise<unknown>;
25
- /**
26
- * Get all examples by query params
27
- */
28
- list(query?: ExampleListParams | null | undefined, options?: RequestOptions): PagePromise<ExamplesOffsetPaginationTopLevelArray, Example>;
29
- /**
30
- * Soft delete an example. Only deletes the example in the 'latest' version of the
31
- * dataset.
32
- */
33
- delete(exampleID: string, options?: RequestOptions): APIPromise<unknown>;
34
- /**
35
- * Soft delete examples. Only deletes the examples in the 'latest' version of the
36
- * dataset.
37
- */
38
- deleteAll(params: ExampleDeleteAllParams, options?: RequestOptions): APIPromise<unknown>;
39
- /**
40
- * Count all examples by query params
41
- */
42
- retrieveCount(query?: ExampleRetrieveCountParams | null | undefined, options?: RequestOptions): APIPromise<ExampleRetrieveCountResponse>;
43
- /**
44
- * Upload examples from a CSV file.
45
- *
46
- * Note: For non-csv upload, please use the POST
47
- * /v1/platform/datasets/{dataset_id}/examples endpoint which provides more
48
- * efficient upload.
49
- */
50
- uploadFromCsv(datasetID: string, body: ExampleUploadFromCsvParams, options?: RequestOptions): APIPromise<ExampleUploadFromCsvResponse>;
51
- }
52
- export type ExamplesOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<Example>;
53
- export interface AttachmentsOperations {
54
- /**
55
- * Mapping of old attachment names to new names
56
- */
57
- rename?: {
58
- [key: string]: string;
59
- };
60
- /**
61
- * List of attachment names to keep
62
- */
63
- retain?: Array<string>;
64
- }
65
- /**
66
- * Example schema.
67
- */
68
- export interface Example {
69
- id: string;
70
- dataset_id: string;
71
- inputs: {
72
- [key: string]: unknown;
73
- };
74
- name: string;
75
- attachment_urls?: {
76
- [key: string]: unknown;
77
- } | null;
78
- created_at?: string;
79
- metadata?: {
80
- [key: string]: unknown;
81
- } | null;
82
- modified_at?: string | null;
83
- outputs?: {
84
- [key: string]: unknown;
85
- } | null;
86
- source_run_id?: string | null;
87
- }
88
- export type ExampleSelect = 'id' | 'created_at' | 'modified_at' | 'name' | 'dataset_id' | 'source_run_id' | 'metadata' | 'inputs' | 'outputs' | 'attachment_urls';
89
- export type ExampleUpdateResponse = unknown;
90
- export type ExampleDeleteResponse = unknown;
91
- export type ExampleDeleteAllResponse = unknown;
92
- export type ExampleRetrieveCountResponse = number;
93
- export type ExampleUploadFromCsvResponse = Array<Example>;
94
- export interface ExampleCreateParams {
95
- dataset_id: string;
96
- id?: string | null;
97
- created_at?: string;
98
- inputs?: {
99
- [key: string]: unknown;
100
- } | null;
101
- metadata?: {
102
- [key: string]: unknown;
103
- } | null;
104
- outputs?: {
105
- [key: string]: unknown;
106
- } | null;
107
- source_run_id?: string | null;
108
- split?: Array<string> | string | null;
109
- /**
110
- * Use Legacy Message Format for LLM runs
111
- */
112
- use_legacy_message_format?: boolean;
113
- use_source_run_attachments?: Array<string>;
114
- use_source_run_io?: boolean;
115
- }
116
- export interface ExampleRetrieveParams {
117
- /**
118
- * Only modifications made on or before this time are included. If None, the latest
119
- * version of the dataset is used.
120
- */
121
- as_of?: (string & {}) | string;
122
- dataset?: string | null;
123
- }
124
- export interface ExampleUpdateParams {
125
- attachments_operations?: AttachmentsOperations | null;
126
- dataset_id?: string | null;
127
- inputs?: {
128
- [key: string]: unknown;
129
- } | null;
130
- metadata?: {
131
- [key: string]: unknown;
132
- } | null;
133
- outputs?: {
134
- [key: string]: unknown;
135
- } | null;
136
- overwrite?: boolean;
137
- split?: Array<string> | string | null;
138
- }
139
- export interface ExampleListParams extends OffsetPaginationTopLevelArrayParams {
140
- id?: Array<string> | null;
141
- /**
142
- * Only modifications made on or before this time are included. If None, the latest
143
- * version of the dataset is used.
144
- */
145
- as_of?: (string & {}) | string;
146
- dataset?: string | null;
147
- descending?: boolean | null;
148
- filter?: string | null;
149
- full_text_contains?: Array<string> | null;
150
- metadata?: string | null;
151
- order?: 'recent' | 'random' | 'recently_created' | 'id';
152
- random_seed?: number | null;
153
- select?: Array<ExampleSelect>;
154
- splits?: Array<string> | null;
155
- }
156
- export interface ExampleDeleteAllParams {
157
- example_ids: Array<string>;
158
- }
159
- export interface ExampleRetrieveCountParams {
160
- id?: Array<string> | null;
161
- /**
162
- * Only modifications made on or before this time are included. If None, the latest
163
- * version of the dataset is used.
164
- */
165
- as_of?: (string & {}) | string;
166
- dataset?: string | null;
167
- filter?: string | null;
168
- full_text_contains?: Array<string> | null;
169
- metadata?: string | null;
170
- splits?: Array<string> | null;
171
- }
172
- export interface ExampleUploadFromCsvParams {
173
- file: Uploadable;
174
- input_keys: Array<string>;
175
- metadata_keys?: Array<string>;
176
- output_keys?: Array<string>;
177
- }
178
- export declare namespace Examples {
179
- export { type AttachmentsOperations as AttachmentsOperations, type Example as Example, type ExampleSelect as ExampleSelect, type ExampleUpdateResponse as ExampleUpdateResponse, type ExampleDeleteResponse as ExampleDeleteResponse, type ExampleDeleteAllResponse as ExampleDeleteAllResponse, type ExampleRetrieveCountResponse as ExampleRetrieveCountResponse, type ExampleUploadFromCsvResponse as ExampleUploadFromCsvResponse, type ExamplesOffsetPaginationTopLevelArray as ExamplesOffsetPaginationTopLevelArray, type ExampleCreateParams as ExampleCreateParams, type ExampleRetrieveParams as ExampleRetrieveParams, type ExampleUpdateParams as ExampleUpdateParams, type ExampleListParams as ExampleListParams, type ExampleDeleteAllParams as ExampleDeleteAllParams, type ExampleRetrieveCountParams as ExampleRetrieveCountParams, type ExampleUploadFromCsvParams as ExampleUploadFromCsvParams, };
180
- export { Bulk as Bulk, type BulkCreateResponse as BulkCreateResponse, type BulkPatchAllResponse as BulkPatchAllResponse, type BulkCreateParams as BulkCreateParams, type BulkPatchAllParams as BulkPatchAllParams, };
181
- export { Validate as Validate, type ExampleValidationResult as ExampleValidationResult, type ValidateBulkResponse as ValidateBulkResponse, };
182
- }
@@ -1,87 +0,0 @@
1
- // @ts-nocheck
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- import { APIResource } from '../../core/resource.js';
4
- import * as BulkAPI from './bulk.js';
5
- import { Bulk } from './bulk.js';
6
- import * as ValidateAPI from './validate.js';
7
- import { Validate } from './validate.js';
8
- import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
9
- import { multipartFormRequestOptions } from '../../internal/uploads.js';
10
- import { path } from '../../internal/utils/path.js';
11
- export class Examples extends APIResource {
12
- constructor() {
13
- super(...arguments);
14
- Object.defineProperty(this, "bulk", {
15
- enumerable: true,
16
- configurable: true,
17
- writable: true,
18
- value: new BulkAPI.Bulk(this._client)
19
- });
20
- Object.defineProperty(this, "validate", {
21
- enumerable: true,
22
- configurable: true,
23
- writable: true,
24
- value: new ValidateAPI.Validate(this._client)
25
- });
26
- }
27
- /**
28
- * Create a new example.
29
- */
30
- create(body, options) {
31
- return this._client.post('/api/v1/examples', { body, ...options });
32
- }
33
- /**
34
- * Get a specific example.
35
- */
36
- retrieve(exampleID, query = {}, options) {
37
- return this._client.get(path `/api/v1/examples/${exampleID}`, { query, ...options });
38
- }
39
- /**
40
- * Update a specific example.
41
- */
42
- update(exampleID, body, options) {
43
- return this._client.patch(path `/api/v1/examples/${exampleID}`, { body, ...options });
44
- }
45
- /**
46
- * Get all examples by query params
47
- */
48
- list(query = {}, options) {
49
- return this._client.getAPIList('/api/v1/examples', (OffsetPaginationTopLevelArray), {
50
- query,
51
- ...options,
52
- });
53
- }
54
- /**
55
- * Soft delete an example. Only deletes the example in the 'latest' version of the
56
- * dataset.
57
- */
58
- delete(exampleID, options) {
59
- return this._client.delete(path `/api/v1/examples/${exampleID}`, options);
60
- }
61
- /**
62
- * Soft delete examples. Only deletes the examples in the 'latest' version of the
63
- * dataset.
64
- */
65
- deleteAll(params, options) {
66
- const { example_ids } = params;
67
- return this._client.delete('/api/v1/examples', { query: { example_ids }, ...options });
68
- }
69
- /**
70
- * Count all examples by query params
71
- */
72
- retrieveCount(query = {}, options) {
73
- return this._client.get('/api/v1/examples/count', { query, ...options });
74
- }
75
- /**
76
- * Upload examples from a CSV file.
77
- *
78
- * Note: For non-csv upload, please use the POST
79
- * /v1/platform/datasets/{dataset_id}/examples endpoint which provides more
80
- * efficient upload.
81
- */
82
- uploadFromCsv(datasetID, body, options) {
83
- return this._client.post(path `/api/v1/examples/upload/${datasetID}`, multipartFormRequestOptions({ body, ...options }, this._client));
84
- }
85
- }
86
- Examples.Bulk = Bulk;
87
- Examples.Validate = Validate;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Validate = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- class Validate extends resource_js_1.APIResource {
8
- /**
9
- * Validate an example.
10
- */
11
- create(options) {
12
- return this._client.post('/api/v1/examples/validate', options);
13
- }
14
- /**
15
- * Validate examples in bulk.
16
- */
17
- bulk(options) {
18
- return this._client.post('/api/v1/examples/validate/bulk', options);
19
- }
20
- }
21
- exports.Validate = Validate;
@@ -1,38 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import { APIPromise } from '../../core/api-promise.js';
3
- import { RequestOptions } from '../../internal/request-options.js';
4
- export declare class Validate extends APIResource {
5
- /**
6
- * Validate an example.
7
- */
8
- create(options?: RequestOptions): APIPromise<ExampleValidationResult>;
9
- /**
10
- * Validate examples in bulk.
11
- */
12
- bulk(options?: RequestOptions): APIPromise<ValidateBulkResponse>;
13
- }
14
- /**
15
- * Validation result for Example, combining fields from Create/Base/Update schemas.
16
- */
17
- export interface ExampleValidationResult {
18
- id?: string | null;
19
- created_at?: string | null;
20
- dataset_id?: string | null;
21
- inputs?: {
22
- [key: string]: unknown;
23
- } | null;
24
- metadata?: {
25
- [key: string]: unknown;
26
- } | null;
27
- outputs?: {
28
- [key: string]: unknown;
29
- } | null;
30
- overwrite?: boolean;
31
- source_run_id?: string | null;
32
- split?: Array<string> | string | null;
33
- use_source_run_io?: boolean;
34
- }
35
- export type ValidateBulkResponse = Array<ExampleValidationResult>;
36
- export declare namespace Validate {
37
- export { type ExampleValidationResult as ExampleValidationResult, type ValidateBulkResponse as ValidateBulkResponse, };
38
- }
@@ -1,17 +0,0 @@
1
- // @ts-nocheck
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- import { APIResource } from '../../core/resource.js';
4
- export class Validate extends APIResource {
5
- /**
6
- * Validate an example.
7
- */
8
- create(options) {
9
- return this._client.post('/api/v1/examples/validate', options);
10
- }
11
- /**
12
- * Validate examples in bulk.
13
- */
14
- bulk(options) {
15
- return this._client.post('/api/v1/examples/validate/bulk', options);
16
- }
17
- }
@@ -1,24 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Configs = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const headers_js_1 = require("../../internal/headers.cjs");
8
- class Configs extends resource_js_1.APIResource {
9
- /**
10
- * Soft delete a feedback config by marking it as deleted.
11
- *
12
- * The config can be recreated later with the same key (simple reuse pattern).
13
- * Existing feedback records with this key will remain unchanged.
14
- */
15
- delete(params, options) {
16
- const { feedback_key } = params;
17
- return this._client.delete('/api/v1/feedback-configs', {
18
- query: { feedback_key },
19
- ...options,
20
- headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
21
- });
22
- }
23
- }
24
- exports.Configs = Configs;
@@ -1,18 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import { APIPromise } from '../../core/api-promise.js';
3
- import { RequestOptions } from '../../internal/request-options.js';
4
- export declare class Configs extends APIResource {
5
- /**
6
- * Soft delete a feedback config by marking it as deleted.
7
- *
8
- * The config can be recreated later with the same key (simple reuse pattern).
9
- * Existing feedback records with this key will remain unchanged.
10
- */
11
- delete(params: ConfigDeleteParams, options?: RequestOptions): APIPromise<void>;
12
- }
13
- export interface ConfigDeleteParams {
14
- feedback_key: string;
15
- }
16
- export declare namespace Configs {
17
- export { type ConfigDeleteParams as ConfigDeleteParams };
18
- }
@@ -1,20 +0,0 @@
1
- // @ts-nocheck
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- import { APIResource } from '../../core/resource.js';
4
- import { buildHeaders } from '../../internal/headers.js';
5
- export class Configs extends APIResource {
6
- /**
7
- * Soft delete a feedback config by marking it as deleted.
8
- *
9
- * The config can be recreated later with the same key (simple reuse pattern).
10
- * Existing feedback records with this key will remain unchanged.
11
- */
12
- delete(params, options) {
13
- const { feedback_key } = params;
14
- return this._client.delete('/api/v1/feedback-configs', {
15
- query: { feedback_key },
16
- ...options,
17
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
18
- });
19
- }
20
- }
@@ -1,98 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- var desc = Object.getOwnPropertyDescriptor(m, k);
7
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
- desc = { enumerable: true, get: function() { return m[k]; } };
9
- }
10
- Object.defineProperty(o, k2, desc);
11
- }) : (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- o[k2] = m[k];
14
- }));
15
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
- Object.defineProperty(o, "default", { enumerable: true, value: v });
17
- }) : function(o, v) {
18
- o["default"] = v;
19
- });
20
- var __importStar = (this && this.__importStar) || (function () {
21
- var ownKeys = function(o) {
22
- ownKeys = Object.getOwnPropertyNames || function (o) {
23
- var ar = [];
24
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
- return ar;
26
- };
27
- return ownKeys(o);
28
- };
29
- return function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- })();
37
- Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.Feedback = void 0;
39
- const resource_js_1 = require("../../core/resource.cjs");
40
- const ConfigsAPI = __importStar(require("./configs.cjs"));
41
- const configs_js_1 = require("./configs.cjs");
42
- const TokensAPI = __importStar(require("./tokens.cjs"));
43
- const tokens_js_1 = require("./tokens.cjs");
44
- const pagination_js_1 = require("../../core/pagination.cjs");
45
- const path_js_1 = require("../../internal/utils/path.cjs");
46
- class Feedback extends resource_js_1.APIResource {
47
- constructor() {
48
- super(...arguments);
49
- Object.defineProperty(this, "tokens", {
50
- enumerable: true,
51
- configurable: true,
52
- writable: true,
53
- value: new TokensAPI.Tokens(this._client)
54
- });
55
- Object.defineProperty(this, "configs", {
56
- enumerable: true,
57
- configurable: true,
58
- writable: true,
59
- value: new ConfigsAPI.Configs(this._client)
60
- });
61
- }
62
- /**
63
- * Create a new feedback.
64
- */
65
- create(body, options) {
66
- return this._client.post('/api/v1/feedback', { body, ...options });
67
- }
68
- /**
69
- * Get a specific feedback.
70
- */
71
- retrieve(feedbackID, query = {}, options) {
72
- return this._client.get((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, { query, ...options });
73
- }
74
- /**
75
- * Replace an existing feedback entry with a new, modified entry.
76
- */
77
- update(feedbackID, body, options) {
78
- return this._client.patch((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, { body, ...options });
79
- }
80
- /**
81
- * List all Feedback by query params.
82
- */
83
- list(query = {}, options) {
84
- return this._client.getAPIList('/api/v1/feedback', (pagination_js_1.OffsetPaginationTopLevelArray), {
85
- query,
86
- ...options,
87
- });
88
- }
89
- /**
90
- * Delete a feedback.
91
- */
92
- delete(feedbackID, options) {
93
- return this._client.delete((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, options);
94
- }
95
- }
96
- exports.Feedback = Feedback;
97
- Feedback.Tokens = tokens_js_1.Tokens;
98
- Feedback.Configs = configs_js_1.Configs;