@scaleway/sdk-jobs 1.0.3 → 1.1.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.
@@ -6,12 +6,13 @@ const jsonContentHeaders = {
6
6
  "Content-Type": "application/json; charset=utf-8"
7
7
  };
8
8
  class API extends sdkClient.API {
9
- /** Lists the available regions of the API. */
10
- static LOCALITIES = [
11
- "fr-par",
12
- "nl-ams",
13
- "pl-waw"
14
- ];
9
+ /**
10
+ * Locality of this API.
11
+ * type ∈ {'zone','region','global','unspecified'}
12
+ */
13
+ static LOCALITY = sdkClient.toApiLocality({
14
+ regions: ["fr-par", "nl-ams", "pl-waw"]
15
+ });
15
16
  /**
16
17
  * Create a new job definition in a specified Project.
17
18
  *
@@ -230,7 +231,8 @@ class API extends sdkClient.API {
230
231
  request.pageSize ?? this.client.settings.defaultPageSize
231
232
  ],
232
233
  ["project_id", request.projectId],
233
- ["state", request.state]
234
+ ["state", request.state],
235
+ ["states", request.states]
234
236
  )
235
237
  },
236
238
  marshalling_gen.unmarshalListJobRunsResponse
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
+ import type { ApiLocality } from '@scaleway/sdk-client';
3
3
  import type { CreateJobDefinitionRequest, CreateJobDefinitionSecretsRequest, CreateJobDefinitionSecretsResponse, DeleteJobDefinitionRequest, DeleteJobDefinitionSecretRequest, GetJobDefinitionRequest, GetJobDefinitionSecretRequest, GetJobRunRequest, GetJobsLimitsRequest, JobDefinition, JobRun, JobsLimits, ListJobDefinitionSecretsRequest, ListJobDefinitionSecretsResponse, ListJobDefinitionsRequest, ListJobDefinitionsResponse, ListJobRunsRequest, ListJobRunsResponse, ListJobsResourcesRequest, ListJobsResourcesResponse, Secret, StartJobDefinitionRequest, StartJobDefinitionResponse, StopJobRunRequest, UpdateJobDefinitionRequest, UpdateJobDefinitionSecretRequest } from './types.gen';
4
4
  /**
5
5
  * Serverless Jobs API.
@@ -7,8 +7,11 @@ import type { CreateJobDefinitionRequest, CreateJobDefinitionSecretsRequest, Cre
7
7
  This API allows you to manage your Serverless Jobs.
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
- /** Lists the available regions of the API. */
11
- static readonly LOCALITIES: ScwRegion[];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static readonly LOCALITY: ApiLocality;
12
15
  /**
13
16
  * Create a new job definition in a specified Project.
14
17
  *
@@ -1,15 +1,16 @@
1
- import { API as API$1, validatePathParam, urlParams, enrichForPagination } from "@scaleway/sdk-client";
1
+ import { API as API$1, toApiLocality, validatePathParam, urlParams, enrichForPagination } from "@scaleway/sdk-client";
2
2
  import { marshalCreateJobDefinitionRequest, unmarshalJobDefinition, unmarshalListJobDefinitionsResponse, marshalUpdateJobDefinitionRequest, marshalStartJobDefinitionRequest, unmarshalStartJobDefinitionResponse, marshalCreateJobDefinitionSecretsRequest, unmarshalCreateJobDefinitionSecretsResponse, unmarshalSecret, unmarshalListJobDefinitionSecretsResponse, marshalUpdateJobDefinitionSecretRequest, unmarshalJobRun, unmarshalListJobRunsResponse, unmarshalListJobsResourcesResponse, unmarshalJobsLimits } from "./marshalling.gen.js";
3
3
  const jsonContentHeaders = {
4
4
  "Content-Type": "application/json; charset=utf-8"
5
5
  };
6
6
  class API extends API$1 {
7
- /** Lists the available regions of the API. */
8
- static LOCALITIES = [
9
- "fr-par",
10
- "nl-ams",
11
- "pl-waw"
12
- ];
7
+ /**
8
+ * Locality of this API.
9
+ * type ∈ {'zone','region','global','unspecified'}
10
+ */
11
+ static LOCALITY = toApiLocality({
12
+ regions: ["fr-par", "nl-ams", "pl-waw"]
13
+ });
13
14
  /**
14
15
  * Create a new job definition in a specified Project.
15
16
  *
@@ -228,7 +229,8 @@ class API extends API$1 {
228
229
  request.pageSize ?? this.client.settings.defaultPageSize
229
230
  ],
230
231
  ["project_id", request.projectId],
231
- ["state", request.state]
232
+ ["state", request.state],
233
+ ["states", request.states]
232
234
  )
233
235
  },
234
236
  unmarshalListJobRunsResponse
@@ -295,6 +295,7 @@ export type ListJobRunsRequest = {
295
295
  projectId?: string;
296
296
  organizationId?: string;
297
297
  state?: JobRunState;
298
+ states?: JobRunState[];
298
299
  };
299
300
  export interface ListJobRunsResponse {
300
301
  jobRuns: JobRun[];
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-jobs",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "Scaleway SDK jobs",
5
- "types": "dist/index.d.ts",
5
+ "license": "Apache-2.0",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.3"
33
+ "@scaleway/sdk-std": "1.0.5"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.2"
36
+ "@scaleway/sdk-client": "^1.3.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.2"
39
+ "@scaleway/sdk-client": "^1.3.0"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",