Skip to content

Commit 9e42614

Browse files
fix(methods): define methods with parameters and binary body correctly
1 parent 0c8dfe1 commit 9e42614

File tree

8 files changed

+24
-7
lines changed

8 files changed

+24
-7
lines changed

src/resources/zero-trust/dlp/datasets/datasets.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { APIResource } from '../../../../resource';
44
import * as Core from '../../../../core';
55
import * as UploadAPI from './upload';
6-
import { NewVersion, Upload as UploadAPIUpload, UploadCreateParams } from './upload';
6+
import { NewVersion, Upload as UploadAPIUpload, UploadCreateParams, UploadEditParams } from './upload';
77
import * as VersionsAPI from './versions/versions';
88
import {
99
VersionCreateParams,
@@ -309,6 +309,7 @@ export declare namespace Datasets {
309309
UploadAPIUpload as Upload,
310310
type NewVersion as NewVersion,
311311
type UploadCreateParams as UploadCreateParams,
312+
type UploadEditParams as UploadEditParams,
312313
};
313314

314315
export {

src/resources/zero-trust/dlp/datasets/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export {
1212
type DatasetDeleteParams,
1313
type DatasetGetParams,
1414
} from './datasets';
15-
export { Upload, type NewVersion, type UploadCreateParams } from './upload';
15+
export { Upload, type NewVersion, type UploadCreateParams, type UploadEditParams } from './upload';
1616
export {
1717
VersionCreateResponsesSinglePage,
1818
Versions,

src/resources/zero-trust/dlp/datasets/upload.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class Upload extends APIResource {
5353
datasetId: string,
5454
version: number,
5555
dataset: string | ArrayBufferView | ArrayBuffer | BlobLike,
56+
params: UploadEditParams,
5657
options?: Core.RequestOptions,
5758
): Core.APIPromise<DatasetsAPI.Dataset> {
5859
const { account_id } = params;
@@ -97,6 +98,12 @@ export interface UploadCreateParams {
9798
account_id: string;
9899
}
99100

101+
export type UploadEditParams = string | ArrayBufferView | ArrayBuffer | BlobLike;
102+
100103
export declare namespace Upload {
101-
export { type NewVersion as NewVersion, type UploadCreateParams as UploadCreateParams };
104+
export {
105+
type NewVersion as NewVersion,
106+
type UploadCreateParams as UploadCreateParams,
107+
type UploadEditParams as UploadEditParams,
108+
};
102109
}

src/resources/zero-trust/dlp/datasets/versions/entries.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class Entries extends APIResource {
2626
version: number,
2727
entryId: string,
2828
datasetVersionEntry: string | ArrayBufferView | ArrayBuffer | BlobLike,
29+
params: EntryCreateParams,
2930
options?: Core.RequestOptions,
3031
): Core.APIPromise<EntryCreateResponse> {
3132
const { account_id } = params;
@@ -53,6 +54,8 @@ export interface EntryCreateResponse {
5354
upload_status: 'empty' | 'uploading' | 'pending' | 'processing' | 'failed' | 'complete';
5455
}
5556

57+
export type EntryCreateParams = string | ArrayBufferView | ArrayBuffer | BlobLike;
58+
5659
export declare namespace Entries {
57-
export { type EntryCreateResponse as EntryCreateResponse };
60+
export { type EntryCreateResponse as EntryCreateResponse, type EntryCreateParams as EntryCreateParams };
5861
}

src/resources/zero-trust/dlp/datasets/versions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { Entries, type EntryCreateResponse } from './entries';
3+
export { Entries, type EntryCreateResponse, type EntryCreateParams } from './entries';
44
export {
55
VersionCreateResponsesSinglePage,
66
Versions,

src/resources/zero-trust/dlp/datasets/versions/versions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { APIResource } from '../../../../../resource';
44
import * as Core from '../../../../../core';
55
import * as EntriesAPI from './entries';
6-
import { Entries, EntryCreateResponse } from './entries';
6+
import { Entries, EntryCreateParams, EntryCreateResponse } from './entries';
77
import { SinglePage } from '../../../../../pagination';
88

99
export class Versions extends APIResource {
@@ -98,5 +98,9 @@ export declare namespace Versions {
9898
type VersionCreateParams as VersionCreateParams,
9999
};
100100

101-
export { Entries as Entries, type EntryCreateResponse as EntryCreateResponse };
101+
export {
102+
Entries as Entries,
103+
type EntryCreateResponse as EntryCreateResponse,
104+
type EntryCreateParams as EntryCreateParams,
105+
};
102106
}

tests/api-resources/zero-trust/dlp/datasets/upload.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe('resource upload', () => {
3737
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
3838
0,
3939
await toFile(Buffer.from('# my file contents'), 'README.md'),
40+
await toFile(Buffer.from('# my file contents'), 'README.md'),
4041
);
4142
const rawResponse = await responsePromise.asResponse();
4243
expect(rawResponse).toBeInstanceOf(Response);

tests/api-resources/zero-trust/dlp/datasets/versions/entries.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ describe('resource entries', () => {
1717
0,
1818
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
1919
await toFile(Buffer.from('# my file contents'), 'README.md'),
20+
await toFile(Buffer.from('# my file contents'), 'README.md'),
2021
);
2122
const rawResponse = await responsePromise.asResponse();
2223
expect(rawResponse).toBeInstanceOf(Response);

0 commit comments

Comments
 (0)