airborne-server-sdk 0.14.1 → 0.15.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.
@@ -222,8 +222,10 @@ const se_ListPackagesCommand = async (input, context) => {
222
222
  });
223
223
  b.bp("/api/packages/list");
224
224
  const query = (0, smithy_client_1.map)({
225
- [_of]: [() => input.offset !== void 0, () => (input[_of].toString())],
226
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
225
+ [_p]: [() => input.page !== void 0, () => (input[_p].toString())],
226
+ [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
227
+ [_s]: [, input[_s]],
228
+ [_al]: [() => input.all !== void 0, () => (input[_al].toString())],
227
229
  });
228
230
  let body;
229
231
  b.m("GET")
@@ -241,9 +243,16 @@ const se_ListReleasesCommand = async (input, context) => {
241
243
  [_xa]: input[_a],
242
244
  });
243
245
  b.bp("/api/releases/list");
246
+ const query = (0, smithy_client_1.map)({
247
+ [_p]: [() => input.page !== void 0, () => (input[_p].toString())],
248
+ [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
249
+ [_al]: [() => input.all !== void 0, () => (input[_al].toString())],
250
+ [_st]: [, input[_st]],
251
+ });
244
252
  let body;
245
253
  b.m("GET")
246
254
  .h(headers)
255
+ .q(query)
247
256
  .b(body);
248
257
  return b.build();
249
258
  };
@@ -581,10 +590,8 @@ const de_ListPackagesCommand = async (output, context) => {
581
590
  });
582
591
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
583
592
  const doc = (0, smithy_client_1.take)(data, {
584
- 'next_offset': smithy_client_1.expectInt32,
585
- 'packages': smithy_client_1._json,
586
- 'page_number': smithy_client_1.expectInt32,
587
- 'prev_offset': smithy_client_1.expectInt32,
593
+ 'data': smithy_client_1._json,
594
+ 'total_items': smithy_client_1.expectInt32,
588
595
  'total_pages': smithy_client_1.expectInt32,
589
596
  });
590
597
  Object.assign(contents, doc);
@@ -600,7 +607,9 @@ const de_ListReleasesCommand = async (output, context) => {
600
607
  });
601
608
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
602
609
  const doc = (0, smithy_client_1.take)(data, {
603
- 'releases': _ => de_GetReleaseResponseList(_, context),
610
+ 'data': _ => de_GetReleaseResponseList(_, context),
611
+ 'total_items': smithy_client_1.expectInt32,
612
+ 'total_pages': smithy_client_1.expectInt32,
604
613
  });
605
614
  Object.assign(contents, doc);
606
615
  return contents;
@@ -936,16 +945,16 @@ const deserializeMetadata = (output) => ({
936
945
  });
937
946
  const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
938
947
  const _a = "application";
948
+ const _al = "all";
939
949
  const _c = "count";
940
950
  const _ch = "checksum";
941
951
  const _d = "dimension";
942
952
  const _fp = "file_path";
943
- const _l = "limit";
944
953
  const _o = "organisation";
945
- const _of = "offset";
946
954
  const _p = "page";
947
955
  const _pp = "per_page";
948
956
  const _s = "search";
957
+ const _st = "status";
949
958
  const _t = "tag";
950
959
  const _xa = "x-application";
951
960
  const _xc = "x-checksum";
@@ -207,8 +207,10 @@ export const se_ListPackagesCommand = async (input, context) => {
207
207
  });
208
208
  b.bp("/api/packages/list");
209
209
  const query = map({
210
- [_of]: [() => input.offset !== void 0, () => (input[_of].toString())],
211
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
210
+ [_p]: [() => input.page !== void 0, () => (input[_p].toString())],
211
+ [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
212
+ [_s]: [, input[_s]],
213
+ [_al]: [() => input.all !== void 0, () => (input[_al].toString())],
212
214
  });
213
215
  let body;
214
216
  b.m("GET")
@@ -225,9 +227,16 @@ export const se_ListReleasesCommand = async (input, context) => {
225
227
  [_xa]: input[_a],
226
228
  });
227
229
  b.bp("/api/releases/list");
230
+ const query = map({
231
+ [_p]: [() => input.page !== void 0, () => (input[_p].toString())],
232
+ [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
233
+ [_al]: [() => input.all !== void 0, () => (input[_al].toString())],
234
+ [_st]: [, input[_st]],
235
+ });
228
236
  let body;
229
237
  b.m("GET")
230
238
  .h(headers)
239
+ .q(query)
231
240
  .b(body);
232
241
  return b.build();
233
242
  };
@@ -546,10 +555,8 @@ export const de_ListPackagesCommand = async (output, context) => {
546
555
  });
547
556
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
548
557
  const doc = take(data, {
549
- 'next_offset': __expectInt32,
550
- 'packages': _json,
551
- 'page_number': __expectInt32,
552
- 'prev_offset': __expectInt32,
558
+ 'data': _json,
559
+ 'total_items': __expectInt32,
553
560
  'total_pages': __expectInt32,
554
561
  });
555
562
  Object.assign(contents, doc);
@@ -564,7 +571,9 @@ export const de_ListReleasesCommand = async (output, context) => {
564
571
  });
565
572
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
566
573
  const doc = take(data, {
567
- 'releases': _ => de_GetReleaseResponseList(_, context),
574
+ 'data': _ => de_GetReleaseResponseList(_, context),
575
+ 'total_items': __expectInt32,
576
+ 'total_pages': __expectInt32,
568
577
  });
569
578
  Object.assign(contents, doc);
570
579
  return contents;
@@ -893,16 +902,16 @@ const deserializeMetadata = (output) => ({
893
902
  });
894
903
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
895
904
  const _a = "application";
905
+ const _al = "all";
896
906
  const _c = "count";
897
907
  const _ch = "checksum";
898
908
  const _d = "dimension";
899
909
  const _fp = "file_path";
900
- const _l = "limit";
901
910
  const _o = "organisation";
902
- const _of = "offset";
903
911
  const _p = "page";
904
912
  const _pp = "per_page";
905
913
  const _s = "search";
914
+ const _st = "status";
906
915
  const _t = "tag";
907
916
  const _xa = "x-application";
908
917
  const _xc = "x-checksum";
@@ -35,15 +35,17 @@ declare const ListPackagesCommand_base: {
35
35
  * // const { AirborneClient, ListPackagesCommand } = require("airborne-server-sdk"); // CommonJS import
36
36
  * const client = new AirborneClient(config);
37
37
  * const input = { // ListPackagesRequest
38
- * offset: Number("int"),
39
- * limit: Number("int"),
38
+ * page: Number("int"),
39
+ * count: Number("int"),
40
+ * search: "STRING_VALUE",
41
+ * all: true || false,
40
42
  * organisation: "STRING_VALUE", // required
41
43
  * application: "STRING_VALUE", // required
42
44
  * };
43
45
  * const command = new ListPackagesCommand(input);
44
46
  * const response = await client.send(command);
45
47
  * // { // ListPackagesResponse
46
- * // packages: [ // PackageList // required
48
+ * // data: [ // PackageList // required
47
49
  * // { // Package
48
50
  * // tag: "STRING_VALUE",
49
51
  * // version: Number("int"), // required
@@ -53,10 +55,8 @@ declare const ListPackagesCommand_base: {
53
55
  * // ],
54
56
  * // },
55
57
  * // ],
56
- * // page_number: Number("int"), // required
57
- * // next_offset: Number("int"),
58
- * // prev_offset: Number("int"),
59
58
  * // total_pages: Number("int"), // required
59
+ * // total_items: Number("int"), // required
60
60
  * // };
61
61
  *
62
62
  * ```
@@ -36,13 +36,17 @@ declare const ListReleasesCommand_base: {
36
36
  * const client = new AirborneClient(config);
37
37
  * const input = { // ListReleasesRequest
38
38
  * dimension: "STRING_VALUE",
39
+ * page: Number("int"),
40
+ * count: Number("int"),
41
+ * all: true || false,
42
+ * status: "STRING_VALUE",
39
43
  * organisation: "STRING_VALUE", // required
40
44
  * application: "STRING_VALUE", // required
41
45
  * };
42
46
  * const command = new ListReleasesCommand(input);
43
47
  * const response = await client.send(command);
44
48
  * // { // ListReleasesResponse
45
- * // releases: [ // GetReleaseResponseList // required
49
+ * // data: [ // GetReleaseResponseList // required
46
50
  * // { // GetReleaseResponse
47
51
  * // id: "STRING_VALUE",
48
52
  * // created_at: "STRING_VALUE",
@@ -98,6 +102,8 @@ declare const ListReleasesCommand_base: {
98
102
  * // },
99
103
  * // },
100
104
  * // ],
105
+ * // total_pages: Number("int"), // required
106
+ * // total_items: Number("int"), // required
101
107
  * // };
102
108
  *
103
109
  * ```
@@ -723,15 +723,25 @@ export interface ListOrganisationsResponse {
723
723
  */
724
724
  export interface ListPackagesRequest {
725
725
  /**
726
- * Offset for pagination
726
+ * Offset for pagination (default: 1)
727
727
  * @public
728
728
  */
729
- offset?: number | undefined;
729
+ page?: number | undefined;
730
+ /**
731
+ * Limit for pagination (default: 50)
732
+ * @public
733
+ */
734
+ count?: number | undefined;
730
735
  /**
731
- * Limit for pagination
736
+ * Search term for filtering packages using index file path
732
737
  * @public
733
738
  */
734
- limit?: number | undefined;
739
+ search?: string | undefined;
740
+ /**
741
+ * If true, fetch all packages without pagination
742
+ * @public
743
+ */
744
+ all?: boolean | undefined;
735
745
  /**
736
746
  * Name of the organisation
737
747
  * @public
@@ -752,27 +762,17 @@ export interface ListPackagesResponse {
752
762
  * List of packages
753
763
  * @public
754
764
  */
755
- packages: (Package)[] | undefined;
765
+ data: (Package)[] | undefined;
756
766
  /**
757
- * Number of page
758
- * @public
759
- */
760
- page_number: number | undefined;
761
- /**
762
- * Next offset for pagination
763
- * @public
764
- */
765
- next_offset?: number | undefined;
766
- /**
767
- * Previous offset for pagination
767
+ * Total number of pages
768
768
  * @public
769
769
  */
770
- prev_offset?: number | undefined;
770
+ total_pages: number | undefined;
771
771
  /**
772
- * Total number of pages
772
+ * Total number of items
773
773
  * @public
774
774
  */
775
- total_pages: number | undefined;
775
+ total_items: number | undefined;
776
776
  }
777
777
  /**
778
778
  * @public
@@ -783,6 +783,26 @@ export interface ListReleasesRequest {
783
783
  * @public
784
784
  */
785
785
  dimension?: string | undefined;
786
+ /**
787
+ * Page number for pagination (default: 1)
788
+ * @public
789
+ */
790
+ page?: number | undefined;
791
+ /**
792
+ * Count of releases per page for pagination (default: 50)
793
+ * @public
794
+ */
795
+ count?: number | undefined;
796
+ /**
797
+ * If true, fetch all releases without pagination
798
+ * @public
799
+ */
800
+ all?: boolean | undefined;
801
+ /**
802
+ * Status to filter releases
803
+ * @public
804
+ */
805
+ status?: string | undefined;
786
806
  /**
787
807
  * Name of the organisation
788
808
  * @public
@@ -802,7 +822,17 @@ export interface ListReleasesResponse {
802
822
  * List of releases
803
823
  * @public
804
824
  */
805
- releases: (GetReleaseResponse)[] | undefined;
825
+ data: (GetReleaseResponse)[] | undefined;
826
+ /**
827
+ * Total number of pages
828
+ * @public
829
+ */
830
+ total_pages: number | undefined;
831
+ /**
832
+ * Total number of items
833
+ * @public
834
+ */
835
+ total_items: number | undefined;
806
836
  }
807
837
  /**
808
838
  * User credentials for login
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "airborne-server-sdk",
3
3
  "description": "airborne-server-sdk client",
4
- "version": "0.14.1",
4
+ "version": "0.15.0",
5
5
  "scripts": {
6
6
  "build": "npm run build:types && npm run build:cjs && npm run build:es",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",