@scaleway/sdk-test 2.3.1 → 2.4.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.
@@ -1,3 +1,4 @@
1
+ //#region \0rolldown/runtime.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __exportAll = (all, no_symbols) => {
3
4
  let target = {};
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
8
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
10
  return target;
10
11
  };
12
+ //#endregion
11
13
  export { __exportAll };
@@ -1,13 +1,14 @@
1
1
  import { HUMAN_TRANSIENT_STATUSES } from "./content.gen.js";
2
2
  import { marshalCreateHumanRequest, marshalRegisterRequest, marshalUpdateHumanRequest, unmarshalHuman, unmarshalListHumansResponse, unmarshalRegisterResponse } from "./marshalling.gen.js";
3
- import { API, enrichForPagination, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
3
+ import { API as API$1, enrichForPagination, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
+ //#region src/v1/api.gen.ts
4
5
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
6
  /**
6
7
  * Fake API.
7
8
 
8
9
  No Auth Service for end-to-end testing.
9
10
  */
10
- var API$1 = class extends API {
11
+ var API = class extends API$1 {
11
12
  /**
12
13
  * Register a user. Register a human and return a access-key and a secret-key that must be used in all other commands.
13
14
 
@@ -112,4 +113,5 @@ var API$1 = class extends API {
112
113
  path: `/test/v1/humans/${validatePathParam("humanId", request.humanId)}/smoke`
113
114
  }, unmarshalHuman);
114
115
  };
115
- export { API$1 as API };
116
+ //#endregion
117
+ export { API };
@@ -1,3 +1,5 @@
1
+ //#region src/v1/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link HumanStatus}. */
2
- const HUMAN_TRANSIENT_STATUSES = ["running"];
3
+ var HUMAN_TRANSIENT_STATUSES = ["running"];
4
+ //#endregion
3
5
  export { HUMAN_TRANSIENT_STATUSES };
@@ -2,6 +2,7 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { HUMAN_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { marshalCreateHumanRequest, marshalRegisterRequest, marshalUpdateHumanRequest, unmarshalHuman, unmarshalListHumansResponse, unmarshalRegisterResponse } from "./marshalling.gen.js";
4
4
  import { API } from "./api.gen.js";
5
+ //#region src/v1/index.gen.ts
5
6
  var index_gen_exports = /* @__PURE__ */ __exportAll({
6
7
  API: () => API,
7
8
  HUMAN_TRANSIENT_STATUSES: () => HUMAN_TRANSIENT_STATUSES,
@@ -12,4 +13,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
12
13
  unmarshalListHumansResponse: () => unmarshalListHumansResponse,
13
14
  unmarshalRegisterResponse: () => unmarshalRegisterResponse
14
15
  });
15
- export { index_gen_exports };
16
+ //#endregion
17
+ export { API, HUMAN_TRANSIENT_STATUSES, index_gen_exports, marshalCreateHumanRequest, marshalRegisterRequest, marshalUpdateHumanRequest, unmarshalHuman, unmarshalListHumansResponse, unmarshalRegisterResponse };
@@ -1,5 +1,6 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
- const unmarshalHuman = (data) => {
2
+ //#region src/v1/marshalling.gen.ts
3
+ var unmarshalHuman = (data) => {
3
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Human' failed as data isn't a dictionary.`);
4
5
  return {
5
6
  altitudeInMeter: data.altitude_in_meter,
@@ -19,21 +20,21 @@ const unmarshalHuman = (data) => {
19
20
  updatedAt: unmarshalDate(data.updated_at)
20
21
  };
21
22
  };
22
- const unmarshalListHumansResponse = (data) => {
23
+ var unmarshalListHumansResponse = (data) => {
23
24
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListHumansResponse' failed as data isn't a dictionary.`);
24
25
  return {
25
26
  humans: unmarshalArrayOfObject(data.humans, unmarshalHuman),
26
27
  totalCount: data.total_count
27
28
  };
28
29
  };
29
- const unmarshalRegisterResponse = (data) => {
30
+ var unmarshalRegisterResponse = (data) => {
30
31
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RegisterResponse' failed as data isn't a dictionary.`);
31
32
  return {
32
33
  accessKey: data.access_key,
33
34
  secretKey: data.secret_key
34
35
  };
35
36
  };
36
- const marshalCreateHumanRequest = (request, defaults) => ({
37
+ var marshalCreateHumanRequest = (request, defaults) => ({
37
38
  altitude_in_meter: request.altitudeInMeter,
38
39
  altitude_in_millimeter: request.altitudeInMillimeter,
39
40
  eyes_color: request.eyesColor,
@@ -53,8 +54,8 @@ const marshalCreateHumanRequest = (request, defaults) => ({
53
54
  value: request.organizationId
54
55
  }])
55
56
  });
56
- const marshalRegisterRequest = (request, defaults) => ({ username: request.username });
57
- const marshalUpdateHumanRequest = (request, defaults) => ({
57
+ var marshalRegisterRequest = (request, defaults) => ({ username: request.username });
58
+ var marshalUpdateHumanRequest = (request, defaults) => ({
58
59
  altitude_in_meter: request.altitudeInMeter,
59
60
  altitude_in_millimeter: request.altitudeInMillimeter,
60
61
  eyes_color: request.eyesColor,
@@ -65,4 +66,5 @@ const marshalUpdateHumanRequest = (request, defaults) => ({
65
66
  name: request.name,
66
67
  shoe_size: request.shoeSize
67
68
  });
69
+ //#endregion
68
70
  export { marshalCreateHumanRequest, marshalRegisterRequest, marshalUpdateHumanRequest, unmarshalHuman, unmarshalListHumansResponse, unmarshalRegisterResponse };
@@ -0,0 +1,31 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "test";
3
+ readonly version: "v1";
4
+ readonly folderName: "testv1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "listHumans";
9
+ readonly protoName: "ListHumans";
10
+ readonly paramsType: "ListHumansRequest";
11
+ readonly returnType: "ListHumansResponse";
12
+ readonly isList: true;
13
+ readonly paginationType: "offset";
14
+ readonly pageParamKey: "page";
15
+ readonly listItemType: "Human";
16
+ readonly isPrivate: false;
17
+ readonly description: "\"";
18
+ }, {
19
+ readonly methodName: "getHuman";
20
+ readonly protoName: "GetHuman";
21
+ readonly paramsType: "GetHumanRequest";
22
+ readonly returnType: "Human";
23
+ readonly isList: false;
24
+ readonly paginationType: "none";
25
+ readonly isPrivate: false;
26
+ readonly description: "\"";
27
+ readonly hasWaiter: true;
28
+ }];
29
+ }];
30
+ };
31
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,33 @@
1
+ //#region src/v1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "test",
4
+ version: "v1",
5
+ folderName: "testv1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [{
9
+ methodName: "listHumans",
10
+ protoName: "ListHumans",
11
+ paramsType: "ListHumansRequest",
12
+ returnType: "ListHumansResponse",
13
+ isList: true,
14
+ paginationType: "offset",
15
+ pageParamKey: "page",
16
+ listItemType: "Human",
17
+ isPrivate: false,
18
+ description: "\""
19
+ }, {
20
+ methodName: "getHuman",
21
+ protoName: "GetHuman",
22
+ paramsType: "GetHumanRequest",
23
+ returnType: "Human",
24
+ isList: false,
25
+ paginationType: "none",
26
+ isPrivate: false,
27
+ description: "\"",
28
+ hasWaiter: true
29
+ }]
30
+ }]
31
+ };
32
+ //#endregion
33
+ export { queriesMetadata };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-test",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Scaleway SDK test",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.19.6"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.2.1"
29
+ "@scaleway/random-name": "5.1.4",
30
+ "@scaleway/sdk-std": "2.2.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",