spitch 1.24.0 → 1.26.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/LICENSE +1 -1
  3. package/README.md +43 -9
  4. package/client.d.mts +7 -7
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +7 -7
  7. package/client.d.ts.map +1 -1
  8. package/client.js +6 -2
  9. package/client.js.map +1 -1
  10. package/client.mjs +7 -3
  11. package/client.mjs.map +1 -1
  12. package/package.json +2 -2
  13. package/resources/files.d.mts +34 -89
  14. package/resources/files.d.mts.map +1 -1
  15. package/resources/files.d.ts +34 -89
  16. package/resources/files.d.ts.map +1 -1
  17. package/resources/files.js +6 -53
  18. package/resources/files.js.map +1 -1
  19. package/resources/files.mjs +6 -53
  20. package/resources/files.mjs.map +1 -1
  21. package/resources/index.d.mts +1 -2
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +1 -2
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js +1 -3
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +1 -2
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/speech.d.mts +51 -17
  30. package/resources/speech.d.mts.map +1 -1
  31. package/resources/speech.d.ts +51 -17
  32. package/resources/speech.d.ts.map +1 -1
  33. package/resources/speech.js +5 -3
  34. package/resources/speech.js.map +1 -1
  35. package/resources/speech.mjs +5 -3
  36. package/resources/speech.mjs.map +1 -1
  37. package/resources/text.d.mts +7 -25
  38. package/resources/text.d.mts.map +1 -1
  39. package/resources/text.d.ts +7 -25
  40. package/resources/text.d.ts.map +1 -1
  41. package/resources/text.js +3 -2
  42. package/resources/text.js.map +1 -1
  43. package/resources/text.mjs +3 -2
  44. package/resources/text.mjs.map +1 -1
  45. package/src/client.ts +18 -11
  46. package/src/resources/files.ts +36 -96
  47. package/src/resources/index.ts +7 -2
  48. package/src/resources/speech.ts +55 -19
  49. package/src/resources/text.ts +7 -29
  50. package/src/version.ts +1 -1
  51. package/version.d.mts +1 -1
  52. package/version.d.ts +1 -1
  53. package/version.js +1 -1
  54. package/version.mjs +1 -1
  55. package/resources/jobs.d.mts +0 -42
  56. package/resources/jobs.d.mts.map +0 -1
  57. package/resources/jobs.d.ts +0 -42
  58. package/resources/jobs.d.ts.map +0 -1
  59. package/resources/jobs.js +0 -23
  60. package/resources/jobs.js.map +0 -1
  61. package/resources/jobs.mjs +0 -19
  62. package/resources/jobs.mjs.map +0 -1
  63. package/src/resources/jobs.ts +0 -68
@@ -10,16 +10,7 @@ import { path } from '../internal/utils/path';
10
10
 
11
11
  export class Files extends APIResource {
12
12
  /**
13
- * Get a paginated list of files for the authenticated organization.
14
- *
15
- * Args: identity: Authentication identity containing org_id and user_id limit:
16
- * Maximum number of files to return (max 100) status: Optional filter by file
17
- * status (processing, ready, etc.) cursor: Optional pagination cursor for getting
18
- * next page db: Database session
19
- *
20
- * Returns: ListFilesResponse: Paginated list of files with metadata
21
- *
22
- * Raises: HTTPException: 400 if cursor is invalid
13
+ * Get Files
23
14
  */
24
15
  list(
25
16
  query: FileListParams | null | undefined = {},
@@ -29,77 +20,39 @@ export class Files extends APIResource {
29
20
  }
30
21
 
31
22
  /**
32
- * Delete a file and its associated S3 object.
33
- *
34
- * Args: file_id: UUID of the file to delete identity: Authentication identity
35
- * containing org_id db: Database session s3: S3 session for deleting objects
36
- *
37
- * Returns: dict: Success confirmation
38
- *
39
- * Raises: HTTPException: 404 if file not found or doesn't belong to org
23
+ * Delete File
40
24
  */
41
- delete(fileID: string, options?: RequestOptions): APIPromise<unknown> {
25
+ delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleteResponse> {
42
26
  return this._client.delete(path`/v1/files/${fileID}`, options);
43
27
  }
44
28
 
45
29
  /**
46
- * Generate a pre-signed download URL for a file.
47
- *
48
- * Args: file_id: UUID of the file to download identity: Authentication identity
49
- * containing org_id ttl: Time-to-live for the download URL in seconds (60-3600)
50
- * db: Database session s3: S3 session for generating pre-signed URLs
51
- *
52
- * Returns: FileDownloadResponse: Contains file_id, download URL, and expiration
53
- * time
54
- *
55
- * Raises: HTTPException: 404 if file not found, doesn't belong to org, or not
56
- * ready
30
+ * Download File
57
31
  */
58
32
  download(
59
33
  fileID: string,
60
34
  query: FileDownloadParams | null | undefined = {},
61
35
  options?: RequestOptions,
62
- ): APIPromise<FileDownloadResponse> {
36
+ ): APIPromise<unknown> {
63
37
  return this._client.get(path`/v1/files/${fileID}/url`, { query, ...options });
64
38
  }
65
39
 
66
40
  /**
67
- * Get metadata for a specific file.
68
- *
69
- * Args: file_id: UUID of the file to retrieve identity: Authentication identity
70
- * containing org_id db: Database session
71
- *
72
- * Returns: FileMetaResponse: File metadata including upload information
73
- *
74
- * Raises: HTTPException: 404 if file not found or doesn't belong to org
75
- * HTTPException: 500 if uploader information is corrupted
41
+ * Get File
76
42
  */
77
43
  get(fileID: string, options?: RequestOptions): APIPromise<File> {
78
44
  return this._client.get(path`/v1/files/${fileID}`, options);
79
45
  }
80
46
 
81
47
  /**
82
- * Upload a file to the Spitch server.
83
- *
84
- * Args: file: The file to upload from the request identity: Authentication
85
- * identity containing org_id and user_id db: Database session
86
- *
87
- * Returns: FileMetaResponse: Metadata for the uploaded file
88
- *
89
- * Raises: HTTPException: 500 if upload fails
48
+ * Upload a file to your storage.
90
49
  */
91
50
  upload(body: FileUploadParams, options?: RequestOptions): APIPromise<File> {
92
51
  return this._client.post('/v1/files', multipartFormRequestOptions({ body, ...options }, this._client));
93
52
  }
94
53
 
95
54
  /**
96
- * Get storage usage statistics for the authenticated organization.
97
- *
98
- * Args: identity: Authentication identity containing org_id db: Database session
99
- *
100
- * Returns: FileUsage: Usage statistics including total/used bytes and file count
101
- *
102
- * Raises: HTTPException: 500 if unable to calculate usage
55
+ * Get Usage
103
56
  */
104
57
  usage(options?: RequestOptions): APIPromise<FileUsage> {
105
58
  return this._client.get('/v1/files:usage', options);
@@ -109,15 +62,9 @@ export class Files extends APIResource {
109
62
  export type FilesFilesCursor = FilesCursor<File>;
110
63
 
111
64
  /**
112
- * description of a file. Attributes: file_id: unique identifier for the file.
113
- * status: status of the file, `processing` or `ready` original_name: original name
114
- * of the file. If the file was uploaded via API
65
+ * Metadata info for this file.
115
66
  */
116
67
  export interface File {
117
- category: string | null;
118
-
119
- content_type: string | null;
120
-
121
68
  created_at: string;
122
69
 
123
70
  file_id: string;
@@ -126,35 +73,40 @@ export interface File {
126
73
 
127
74
  size_bytes: number | null;
128
75
 
129
- status: 'uploading' | 'ready';
76
+ status: string;
130
77
 
131
78
  uploaded_by?: string | null;
132
79
  }
133
80
 
134
- /**
135
- * Storage usage information for an organization.
136
- *
137
- * Attributes: total: Human-readable total storage limit used: Human-readable used
138
- * storage amount total_bytes: Total storage limit in bytes used_bytes: Used
139
- * storage amount in bytes num_files: Number of files stored
140
- */
141
81
  export interface FileUsage {
142
- num_files: number;
82
+ /**
83
+ * number of files available.
84
+ */
85
+ num_files?: number;
143
86
 
144
- total: string;
87
+ /**
88
+ * total storage available in human-readable format
89
+ */
90
+ total?: string;
145
91
 
146
- total_bytes: number;
92
+ /**
93
+ * storage used in bytes
94
+ */
95
+ total_bytes?: number;
147
96
 
148
- used: string;
97
+ /**
98
+ * storage used in human-readable format
99
+ */
100
+ used?: string;
149
101
 
150
- used_bytes: number;
102
+ /**
103
+ * total storage available in bytes
104
+ */
105
+ used_bytes?: number;
151
106
  }
152
107
 
153
108
  /**
154
- * Response model for listing files.
155
- *
156
- * Attributes: items: List of file metadata responses next_cursor: Optional cursor
157
- * for pagination to get next page of results
109
+ * an array of file information.
158
110
  */
159
111
  export interface Files {
160
112
  items: Array<File>;
@@ -162,25 +114,13 @@ export interface Files {
162
114
  next_cursor?: string | null;
163
115
  }
164
116
 
165
- export type FileDeleteResponse = unknown;
166
-
167
- /**
168
- * Response model for file download URLs.
169
- *
170
- * Attributes: file_id: Unique identifier for the file url: Pre-signed download URL
171
- * expires_at: When the download URL expires
172
- */
173
- export interface FileDownloadResponse {
174
- expires_at: string;
175
-
176
- file_id: string;
177
-
178
- url: string;
117
+ export interface FileDeleteResponse {
118
+ status?: boolean;
179
119
  }
180
120
 
181
- export interface FileListParams extends FilesCursorParams {
182
- status?: 'uploading' | 'ready' | null;
183
- }
121
+ export type FileDownloadResponse = unknown;
122
+
123
+ export interface FileListParams extends FilesCursorParams {}
184
124
 
185
125
  export interface FileDownloadParams {
186
126
  ttl?: number;
@@ -11,8 +11,13 @@ export {
11
11
  type FileUploadParams,
12
12
  type FilesFilesCursor,
13
13
  } from './files';
14
- export { Jobs, type Job, type JobListParams, type JobsFilesCursor } from './jobs';
15
- export { Speech, type Transcription, type SpeechGenerateParams, type SpeechTranscribeParams } from './speech';
14
+ export {
15
+ Speech,
16
+ type Segment,
17
+ type Transcription,
18
+ type SpeechGenerateParams,
19
+ type SpeechTranscribeParams,
20
+ } from './speech';
16
21
  export {
17
22
  Text,
18
23
  type Diacritics,
@@ -12,19 +12,21 @@ import { multipartFormRequestOptions } from '../internal/uploads';
12
12
  */
13
13
  export class Speech extends APIResource {
14
14
  /**
15
- * Synthesize
15
+ * Convert text to speech. Select a voice and use that to generate audio in any
16
+ * format. Audio is retured in chunks.
16
17
  */
17
18
  generate(body: SpeechGenerateParams, options?: RequestOptions): APIPromise<Response> {
18
19
  return this._client.post('/v1/speech', {
19
20
  body,
20
21
  ...options,
21
- headers: buildHeaders([{ Accept: 'audio/*' }, options?.headers]),
22
+ headers: buildHeaders([{ Accept: 'audio/wav' }, options?.headers]),
22
23
  __binaryResponse: true,
23
24
  });
24
25
  }
25
26
 
26
27
  /**
27
- * Transcribe
28
+ * Convert speech to text. Upload audio file containing speech and get back text
29
+ * that represents the content of the audio file.
28
30
  */
29
31
  transcribe(body: SpeechTranscribeParams, options?: RequestOptions): APIPromise<Transcription> {
30
32
  return this._client.post(
@@ -34,26 +36,53 @@ export class Speech extends APIResource {
34
36
  }
35
37
  }
36
38
 
37
- export interface Transcription {
38
- request_id: string;
39
+ /**
40
+ * a segment (sentence or word-level) of the transcript. It contains a start and
41
+ * end time.
42
+ */
43
+ export interface Segment {
44
+ /**
45
+ * the exact time when this segment ended.
46
+ */
47
+ end: number;
39
48
 
40
- text: string;
49
+ /**
50
+ * the exact time when this segment started.
51
+ */
52
+ start: number;
41
53
 
42
- timestamps?: Array<Transcription.Timestamp> | null;
54
+ /**
55
+ * the text that belongs in this timeframe.
56
+ */
57
+ text: string;
43
58
  }
44
59
 
45
- export namespace Transcription {
46
- export interface Timestamp {
47
- end: number;
60
+ /**
61
+ * Response from speech-to-text.
62
+ */
63
+ export interface Transcription {
64
+ /**
65
+ * for audit purposes.
66
+ */
67
+ request_id: string;
48
68
 
49
- start: number;
69
+ text: string;
50
70
 
51
- text: string;
52
- }
71
+ /**
72
+ * sentence-level or word-level groupings of your transcript. Each sentence (or
73
+ * word) will fall within a time range.
74
+ */
75
+ segments?: Array<Segment> | null;
76
+
77
+ /**
78
+ * @deprecated sentence-level or word-level groupings of your transcript. Each
79
+ * sentence (or word) will fall within a time range.
80
+ */
81
+ timestamps?: Array<Segment> | null;
53
82
  }
54
83
 
55
84
  export interface SpeechGenerateParams {
56
- language: 'yo' | 'en' | 'ha' | 'ig' | 'am';
85
+ language: 'yo' | 'en' | 'ha' | 'ig' | 'am' | 'pcm';
57
86
 
58
87
  text: string;
59
88
 
@@ -81,27 +110,34 @@ export interface SpeechGenerateParams {
81
110
  | 'tena'
82
111
  | 'tesfaye';
83
112
 
84
- format?: 'wav' | 'mp3' | 'ogg_opus' | 'webm_opus' | 'flac' | 'pcm_s16le' | 'mulaw' | 'alaw';
113
+ /**
114
+ * the audio format for the returned audio bytes.
115
+ */
116
+ format?: 'mp3' | 'wav' | 'ogg_opus' | 'webm_opus' | 'mulaw' | 'alaw' | 'flac' | 'pcm_s16le';
85
117
 
86
- model?: 'legacy' | null;
118
+ model?: string | null;
87
119
  }
88
120
 
89
121
  export interface SpeechTranscribeParams {
90
- language: 'yo' | 'en' | 'ha' | 'ig' | 'am';
122
+ language: 'yo' | 'en' | 'ha' | 'ig' | 'am' | 'pcm';
91
123
 
92
- content?: Uploadable | null;
124
+ content?: Uploadable | string | null;
93
125
 
94
- model?: 'mansa_v1' | 'legacy' | 'human' | null;
126
+ model?: 'mansa_v1' | 'legacy' | null;
95
127
 
96
128
  special_words?: string | null;
97
129
 
98
130
  timestamp?: 'sentence' | 'word' | 'none' | null;
99
131
 
132
+ /**
133
+ * @deprecated
134
+ */
100
135
  url?: string | null;
101
136
  }
102
137
 
103
138
  export declare namespace Speech {
104
139
  export {
140
+ type Segment as Segment,
105
141
  type Transcription as Transcription,
106
142
  type SpeechGenerateParams as SpeechGenerateParams,
107
143
  type SpeechTranscribeParams as SpeechTranscribeParams,
@@ -6,67 +6,45 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Text extends APIResource {
8
8
  /**
9
- * Tone Mark
9
+ * Add appopriate tone marks to text.
10
10
  */
11
11
  toneMark(body: TextToneMarkParams, options?: RequestOptions): APIPromise<Diacritics> {
12
12
  return this._client.post('/v1/diacritics', { body, ...options });
13
13
  }
14
14
 
15
15
  /**
16
- * Translate
16
+ * Translate text from one language to another. Select the source and target
17
+ * languages, and get text in new language.
17
18
  */
18
19
  translate(body: TextTranslateParams, options?: RequestOptions): APIPromise<Translation> {
19
20
  return this._client.post('/v1/translate', { body, ...options });
20
21
  }
21
22
  }
22
23
 
23
- /**
24
- * Response model for text diacritization requests.
25
- *
26
- * Attributes:
27
- * request_id: Unique identifier for the diacritization request
28
- * text: Text with added diacritical marks for proper pronunciation
29
- * language: Language code for the diacritized text
30
- */
31
24
  export interface Diacritics {
32
25
  request_id: string;
33
26
 
34
27
  text: string;
35
28
  }
36
29
 
37
- /**
38
- * Translation result model.
39
- *
40
- * Attributes: request_id (UUID): Unique ID for this request. text: translated
41
- * text. due_date: used when model is `human`. the date you can expect the
42
- * translation to be delivered
43
- */
44
30
  export interface Translation {
45
31
  request_id: string;
46
32
 
47
33
  text: string;
48
-
49
- due_date?: string | null;
50
34
  }
51
35
 
52
36
  export interface TextToneMarkParams {
53
- language: 'yo' | 'en' | 'ha' | 'ig' | 'am';
37
+ language: 'yo' | 'en' | 'ha' | 'ig' | 'am' | 'pcm';
54
38
 
55
39
  text: string;
56
40
  }
57
41
 
58
42
  export interface TextTranslateParams {
59
- source: 'yo' | 'en' | 'ha' | 'ig' | 'am';
60
-
61
- target: 'yo' | 'en' | 'ha' | 'ig' | 'am';
62
-
63
- file_id?: string | null;
43
+ source: 'yo' | 'en' | 'ha' | 'ig' | 'am' | 'pcm';
64
44
 
65
- instructions?: string | null;
45
+ target: 'yo' | 'en' | 'ha' | 'ig' | 'am' | 'pcm';
66
46
 
67
- model?: 'human' | 'auto';
68
-
69
- text?: string | null;
47
+ text: string;
70
48
  }
71
49
 
72
50
  export declare namespace Text {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.24.0'; // x-release-please-version
1
+ export const VERSION = '1.26.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.24.0";
1
+ export declare const VERSION = "1.26.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.24.0";
1
+ export declare const VERSION = "1.26.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.24.0'; // x-release-please-version
4
+ exports.VERSION = '1.26.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.24.0'; // x-release-please-version
1
+ export const VERSION = '1.26.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,42 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { FilesCursor, type FilesCursorParams, PagePromise } from "../core/pagination.mjs";
4
- import { RequestOptions } from "../internal/request-options.mjs";
5
- export declare class Jobs extends APIResource {
6
- /**
7
- * Get Jobs
8
- */
9
- list(query?: JobListParams | null | undefined, options?: RequestOptions): PagePromise<JobsFilesCursor, Job>;
10
- /**
11
- * Get Job
12
- */
13
- get(jobID: string, options?: RequestOptions): APIPromise<Job>;
14
- }
15
- export type JobsFilesCursor = FilesCursor<Job>;
16
- /**
17
- * Metadata model for job metadata.
18
- */
19
- export interface Job {
20
- created_by: string;
21
- due_date: string;
22
- job_id: string;
23
- org_id: string;
24
- status: string;
25
- }
26
- /**
27
- * Response model for listing jobs.
28
- *
29
- * Attributes: items: list of job metadata responses next_cursor: Optional cursor
30
- * for pagination to get next page of results
31
- */
32
- export interface Jobs {
33
- items: Array<Job>;
34
- next_cursor?: string | null;
35
- }
36
- export interface JobListParams extends FilesCursorParams {
37
- status?: 'queued' | 'in_progress' | 'finished' | null;
38
- }
39
- export declare namespace Jobs {
40
- export { type Job as Job, type Jobs as Jobs, type JobsFilesCursor as JobsFilesCursor, type JobListParams as JobListParams, };
41
- }
42
- //# sourceMappingURL=jobs.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobs.d.mts","sourceRoot":"","sources":["../src/resources/jobs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,WAAW,EAAE;OACpD,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,GAAG,CAAC;IAIpC;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;CAG9D;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAElB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,MAAM,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC;CACvD;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,GAAG,IAAI,GAAG,EACf,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
@@ -1,42 +0,0 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { FilesCursor, type FilesCursorParams, PagePromise } from "../core/pagination.js";
4
- import { RequestOptions } from "../internal/request-options.js";
5
- export declare class Jobs extends APIResource {
6
- /**
7
- * Get Jobs
8
- */
9
- list(query?: JobListParams | null | undefined, options?: RequestOptions): PagePromise<JobsFilesCursor, Job>;
10
- /**
11
- * Get Job
12
- */
13
- get(jobID: string, options?: RequestOptions): APIPromise<Job>;
14
- }
15
- export type JobsFilesCursor = FilesCursor<Job>;
16
- /**
17
- * Metadata model for job metadata.
18
- */
19
- export interface Job {
20
- created_by: string;
21
- due_date: string;
22
- job_id: string;
23
- org_id: string;
24
- status: string;
25
- }
26
- /**
27
- * Response model for listing jobs.
28
- *
29
- * Attributes: items: list of job metadata responses next_cursor: Optional cursor
30
- * for pagination to get next page of results
31
- */
32
- export interface Jobs {
33
- items: Array<Job>;
34
- next_cursor?: string | null;
35
- }
36
- export interface JobListParams extends FilesCursorParams {
37
- status?: 'queued' | 'in_progress' | 'finished' | null;
38
- }
39
- export declare namespace Jobs {
40
- export { type Job as Job, type Jobs as Jobs, type JobsFilesCursor as JobsFilesCursor, type JobListParams as JobListParams, };
41
- }
42
- //# sourceMappingURL=jobs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../src/resources/jobs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,WAAW,EAAE;OACpD,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,GAAG,CAAC;IAIpC;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;CAG9D;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAElB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,MAAM,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC;CACvD;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,GAAG,IAAI,GAAG,EACf,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
package/resources/jobs.js DELETED
@@ -1,23 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Jobs = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- const pagination_1 = require("../core/pagination.js");
7
- const path_1 = require("../internal/utils/path.js");
8
- class Jobs extends resource_1.APIResource {
9
- /**
10
- * Get Jobs
11
- */
12
- list(query = {}, options) {
13
- return this._client.getAPIList('/v1/jobs', (pagination_1.FilesCursor), { query, ...options });
14
- }
15
- /**
16
- * Get Job
17
- */
18
- get(jobID, options) {
19
- return this._client.get((0, path_1.path) `/v1/jobs/${jobID}`, options);
20
- }
21
- }
22
- exports.Jobs = Jobs;
23
- //# sourceMappingURL=jobs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../src/resources/jobs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAsF;AAEtF,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,IAAI,CACF,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,wBAAgB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,KAAa,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF;AAjBD,oBAiBC"}
@@ -1,19 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- import { FilesCursor } from "../core/pagination.mjs";
4
- import { path } from "../internal/utils/path.mjs";
5
- export class Jobs extends APIResource {
6
- /**
7
- * Get Jobs
8
- */
9
- list(query = {}, options) {
10
- return this._client.getAPIList('/v1/jobs', (FilesCursor), { query, ...options });
11
- }
12
- /**
13
- * Get Job
14
- */
15
- get(jobID, options) {
16
- return this._client.get(path `/v1/jobs/${jobID}`, options);
17
- }
18
- }
19
- //# sourceMappingURL=jobs.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jobs.mjs","sourceRoot":"","sources":["../src/resources/jobs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,WAAW,EAAuC;OAEpD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,IAAI,CACF,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,WAAgB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,KAAa,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -1,68 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { FilesCursor, type FilesCursorParams, PagePromise } from '../core/pagination';
6
- import { RequestOptions } from '../internal/request-options';
7
- import { path } from '../internal/utils/path';
8
-
9
- export class Jobs extends APIResource {
10
- /**
11
- * Get Jobs
12
- */
13
- list(
14
- query: JobListParams | null | undefined = {},
15
- options?: RequestOptions,
16
- ): PagePromise<JobsFilesCursor, Job> {
17
- return this._client.getAPIList('/v1/jobs', FilesCursor<Job>, { query, ...options });
18
- }
19
-
20
- /**
21
- * Get Job
22
- */
23
- get(jobID: string, options?: RequestOptions): APIPromise<Job> {
24
- return this._client.get(path`/v1/jobs/${jobID}`, options);
25
- }
26
- }
27
-
28
- export type JobsFilesCursor = FilesCursor<Job>;
29
-
30
- /**
31
- * Metadata model for job metadata.
32
- */
33
- export interface Job {
34
- created_by: string;
35
-
36
- due_date: string;
37
-
38
- job_id: string;
39
-
40
- org_id: string;
41
-
42
- status: string;
43
- }
44
-
45
- /**
46
- * Response model for listing jobs.
47
- *
48
- * Attributes: items: list of job metadata responses next_cursor: Optional cursor
49
- * for pagination to get next page of results
50
- */
51
- export interface Jobs {
52
- items: Array<Job>;
53
-
54
- next_cursor?: string | null;
55
- }
56
-
57
- export interface JobListParams extends FilesCursorParams {
58
- status?: 'queued' | 'in_progress' | 'finished' | null;
59
- }
60
-
61
- export declare namespace Jobs {
62
- export {
63
- type Job as Job,
64
- type Jobs as Jobs,
65
- type JobsFilesCursor as JobsFilesCursor,
66
- type JobListParams as JobListParams,
67
- };
68
- }