@cirrobio/api-client 0.2.21 → 0.2.22

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.
package/README.md CHANGED
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @cirrobio/api-client@0.2.21 --save
39
+ npm install @cirrobio/api-client@0.2.22 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -43,6 +43,9 @@ export interface GetContactRequest {
43
43
  export interface GetRequirementRequest {
44
44
  requirementId: string;
45
45
  }
46
+ export interface GetRequirementsRequest {
47
+ projectId?: string;
48
+ }
46
49
  export interface GetRequirementsByProjectRequest {
47
50
  projectId: string;
48
51
  }
@@ -186,12 +189,12 @@ export declare class GovernanceApi extends runtime.BaseAPI {
186
189
  * Retrieve a list of governance requirements
187
190
  * Get requirements
188
191
  */
189
- getRequirementsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GovernanceRequirement>>>;
192
+ getRequirementsRaw(requestParameters: GetRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GovernanceRequirement>>>;
190
193
  /**
191
194
  * Retrieve a list of governance requirements
192
195
  * Get requirements
193
196
  */
194
- getRequirements(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GovernanceRequirement>>;
197
+ getRequirements(requestParameters?: GetRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GovernanceRequirement>>;
195
198
  /**
196
199
  * Retrieve governance requirements for a project with fulfillment information for the current user
197
200
  * Get project requirements
@@ -741,13 +741,16 @@ var GovernanceApi = /** @class */ (function (_super) {
741
741
  * Retrieve a list of governance requirements
742
742
  * Get requirements
743
743
  */
744
- GovernanceApi.prototype.getRequirementsRaw = function (initOverrides) {
744
+ GovernanceApi.prototype.getRequirementsRaw = function (requestParameters, initOverrides) {
745
745
  return __awaiter(this, void 0, void 0, function () {
746
746
  var queryParameters, headerParameters, token, tokenString, response;
747
747
  return __generator(this, function (_a) {
748
748
  switch (_a.label) {
749
749
  case 0:
750
750
  queryParameters = {};
751
+ if (requestParameters.projectId !== undefined) {
752
+ queryParameters['projectId'] = requestParameters.projectId;
753
+ }
751
754
  headerParameters = {};
752
755
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
753
756
  token = this.configuration.accessToken;
@@ -775,12 +778,13 @@ var GovernanceApi = /** @class */ (function (_super) {
775
778
  * Retrieve a list of governance requirements
776
779
  * Get requirements
777
780
  */
778
- GovernanceApi.prototype.getRequirements = function (initOverrides) {
781
+ GovernanceApi.prototype.getRequirements = function (requestParameters, initOverrides) {
782
+ if (requestParameters === void 0) { requestParameters = {}; }
779
783
  return __awaiter(this, void 0, void 0, function () {
780
784
  var response;
781
785
  return __generator(this, function (_a) {
782
786
  switch (_a.label) {
783
- case 0: return [4 /*yield*/, this.getRequirementsRaw(initOverrides)];
787
+ case 0: return [4 /*yield*/, this.getRequirementsRaw(requestParameters, initOverrides)];
784
788
  case 1:
785
789
  response = _a.sent();
786
790
  return [4 /*yield*/, response.value()];
@@ -56,6 +56,12 @@ export interface GovernanceRequirement {
56
56
  * @memberof GovernanceRequirement
57
57
  */
58
58
  scope: GovernanceScope;
59
+ /**
60
+ * The project ID if the requirement is project scope
61
+ * @type {string}
62
+ * @memberof GovernanceRequirement
63
+ */
64
+ projectId?: string;
59
65
  /**
60
66
  *
61
67
  * @type {GovernanceScope}
@@ -54,6 +54,7 @@ function GovernanceRequirementFromJSONTyped(json, ignoreDiscriminator) {
54
54
  'type': (0, GovernanceType_1.GovernanceTypeFromJSON)(json['type']),
55
55
  'path': json['path'],
56
56
  'scope': (0, GovernanceScope_1.GovernanceScopeFromJSON)(json['scope']),
57
+ 'projectId': !(0, runtime_1.exists)(json, 'projectId') ? undefined : json['projectId'],
57
58
  'acceptance': !(0, runtime_1.exists)(json, 'acceptance') ? undefined : (0, GovernanceScope_1.GovernanceScopeFromJSON)(json['acceptance']),
58
59
  'contactIds': json['contactIds'],
59
60
  'expiration': (0, GovernanceExpiry_1.GovernanceExpiryFromJSON)(json['expiration']),
@@ -82,6 +83,7 @@ function GovernanceRequirementToJSON(value) {
82
83
  'type': (0, GovernanceType_1.GovernanceTypeToJSON)(value.type),
83
84
  'path': value.path,
84
85
  'scope': (0, GovernanceScope_1.GovernanceScopeToJSON)(value.scope),
86
+ 'projectId': value.projectId,
85
87
  'acceptance': (0, GovernanceScope_1.GovernanceScopeToJSON)(value.acceptance),
86
88
  'contactIds': value.contactIds,
87
89
  'expiration': (0, GovernanceExpiry_1.GovernanceExpiryToJSON)(value.expiration),
@@ -44,6 +44,12 @@ export interface RequirementInput {
44
44
  * @memberof RequirementInput
45
45
  */
46
46
  scope: GovernanceScope;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof RequirementInput
51
+ */
52
+ projectId?: string | null;
47
53
  /**
48
54
  *
49
55
  * @type {GovernanceScope}
@@ -47,6 +47,7 @@ function RequirementInputFromJSONTyped(json, ignoreDiscriminator) {
47
47
  'description': json['description'],
48
48
  'type': (0, GovernanceType_1.GovernanceTypeFromJSON)(json['type']),
49
49
  'scope': (0, GovernanceScope_1.GovernanceScopeFromJSON)(json['scope']),
50
+ 'projectId': !(0, runtime_1.exists)(json, 'projectId') ? undefined : json['projectId'],
50
51
  'acceptance': !(0, runtime_1.exists)(json, 'acceptance') ? undefined : (0, GovernanceScope_1.GovernanceScopeFromJSON)(json['acceptance']),
51
52
  'contactIds': json['contactIds'],
52
53
  'expiration': (0, GovernanceExpiry_1.GovernanceExpiryFromJSON)(json['expiration']),
@@ -70,6 +71,7 @@ function RequirementInputToJSON(value) {
70
71
  'description': value.description,
71
72
  'type': (0, GovernanceType_1.GovernanceTypeToJSON)(value.type),
72
73
  'scope': (0, GovernanceScope_1.GovernanceScopeToJSON)(value.scope),
74
+ 'projectId': value.projectId,
73
75
  'acceptance': (0, GovernanceScope_1.GovernanceScopeToJSON)(value.acceptance),
74
76
  'contactIds': value.contactIds,
75
77
  'expiration': (0, GovernanceExpiry_1.GovernanceExpiryToJSON)(value.expiration),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -88,6 +88,10 @@ export interface GetRequirementRequest {
88
88
  requirementId: string;
89
89
  }
90
90
 
91
+ export interface GetRequirementsRequest {
92
+ projectId?: string;
93
+ }
94
+
91
95
  export interface GetRequirementsByProjectRequest {
92
96
  projectId: string;
93
97
  }
@@ -605,9 +609,13 @@ export class GovernanceApi extends runtime.BaseAPI {
605
609
  * Retrieve a list of governance requirements
606
610
  * Get requirements
607
611
  */
608
- async getRequirementsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GovernanceRequirement>>> {
612
+ async getRequirementsRaw(requestParameters: GetRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GovernanceRequirement>>> {
609
613
  const queryParameters: any = {};
610
614
 
615
+ if (requestParameters.projectId !== undefined) {
616
+ queryParameters['projectId'] = requestParameters.projectId;
617
+ }
618
+
611
619
  const headerParameters: runtime.HTTPHeaders = {};
612
620
 
613
621
  if (this.configuration && this.configuration.accessToken) {
@@ -632,8 +640,8 @@ export class GovernanceApi extends runtime.BaseAPI {
632
640
  * Retrieve a list of governance requirements
633
641
  * Get requirements
634
642
  */
635
- async getRequirements(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GovernanceRequirement>> {
636
- const response = await this.getRequirementsRaw(initOverrides);
643
+ async getRequirements(requestParameters: GetRequirementsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GovernanceRequirement>> {
644
+ const response = await this.getRequirementsRaw(requestParameters, initOverrides);
637
645
  return await response.value();
638
646
  }
639
647
 
@@ -86,6 +86,12 @@ export interface GovernanceRequirement {
86
86
  * @memberof GovernanceRequirement
87
87
  */
88
88
  scope: GovernanceScope;
89
+ /**
90
+ * The project ID if the requirement is project scope
91
+ * @type {string}
92
+ * @memberof GovernanceRequirement
93
+ */
94
+ projectId?: string;
89
95
  /**
90
96
  *
91
97
  * @type {GovernanceScope}
@@ -190,6 +196,7 @@ export function GovernanceRequirementFromJSONTyped(json: any, ignoreDiscriminato
190
196
  'type': GovernanceTypeFromJSON(json['type']),
191
197
  'path': json['path'],
192
198
  'scope': GovernanceScopeFromJSON(json['scope']),
199
+ 'projectId': !exists(json, 'projectId') ? undefined : json['projectId'],
193
200
  'acceptance': !exists(json, 'acceptance') ? undefined : GovernanceScopeFromJSON(json['acceptance']),
194
201
  'contactIds': json['contactIds'],
195
202
  'expiration': GovernanceExpiryFromJSON(json['expiration']),
@@ -219,6 +226,7 @@ export function GovernanceRequirementToJSON(value?: GovernanceRequirement | null
219
226
  'type': GovernanceTypeToJSON(value.type),
220
227
  'path': value.path,
221
228
  'scope': GovernanceScopeToJSON(value.scope),
229
+ 'projectId': value.projectId,
222
230
  'acceptance': GovernanceScopeToJSON(value.acceptance),
223
231
  'contactIds': value.contactIds,
224
232
  'expiration': GovernanceExpiryToJSON(value.expiration),
@@ -74,6 +74,12 @@ export interface RequirementInput {
74
74
  * @memberof RequirementInput
75
75
  */
76
76
  scope: GovernanceScope;
77
+ /**
78
+ *
79
+ * @type {string}
80
+ * @memberof RequirementInput
81
+ */
82
+ projectId?: string | null;
77
83
  /**
78
84
  *
79
85
  * @type {GovernanceScope}
@@ -153,6 +159,7 @@ export function RequirementInputFromJSONTyped(json: any, ignoreDiscriminator: bo
153
159
  'description': json['description'],
154
160
  'type': GovernanceTypeFromJSON(json['type']),
155
161
  'scope': GovernanceScopeFromJSON(json['scope']),
162
+ 'projectId': !exists(json, 'projectId') ? undefined : json['projectId'],
156
163
  'acceptance': !exists(json, 'acceptance') ? undefined : GovernanceScopeFromJSON(json['acceptance']),
157
164
  'contactIds': json['contactIds'],
158
165
  'expiration': GovernanceExpiryFromJSON(json['expiration']),
@@ -177,6 +184,7 @@ export function RequirementInputToJSON(value?: RequirementInput | null): any {
177
184
  'description': value.description,
178
185
  'type': GovernanceTypeToJSON(value.type),
179
186
  'scope': GovernanceScopeToJSON(value.scope),
187
+ 'projectId': value.projectId,
180
188
  'acceptance': GovernanceScopeToJSON(value.acceptance),
181
189
  'contactIds': value.contactIds,
182
190
  'expiration': GovernanceExpiryToJSON(value.expiration),