@amp-labs/react 1.5.2 → 1.5.3

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.
@@ -70,6 +70,18 @@ export interface ProjectApiInterface {
70
70
  * Get a project
71
71
  */
72
72
  getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Project>;
73
+ /**
74
+ *
75
+ * @summary List all projects that the API key or user credential has access to
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
78
+ * @memberof ProjectApiInterface
79
+ */
80
+ listProjectsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Project>>>;
81
+ /**
82
+ * List all projects that the API key or user credential has access to
83
+ */
84
+ listProjects(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Project>>;
73
85
  /**
74
86
  *
75
87
  * @summary Update a project
@@ -113,6 +125,14 @@ export declare class ProjectApi extends runtime.BaseAPI implements ProjectApiInt
113
125
  * Get a project
114
126
  */
115
127
  getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Project>;
128
+ /**
129
+ * List all projects that the API key or user credential has access to
130
+ */
131
+ listProjectsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Project>>>;
132
+ /**
133
+ * List all projects that the API key or user credential has access to
134
+ */
135
+ listProjects(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Project>>;
116
136
  /**
117
137
  * Update a project
118
138
  */
@@ -116,6 +116,27 @@ class ProjectApi extends runtime.BaseAPI {
116
116
  const response = await this.getProjectRaw(requestParameters, initOverrides);
117
117
  return await response.value();
118
118
  }
119
+ /**
120
+ * List all projects that the API key or user credential has access to
121
+ */
122
+ async listProjectsRaw(initOverrides) {
123
+ const queryParameters = {};
124
+ const headerParameters = {};
125
+ const response = await this.request({
126
+ path: `/projects`,
127
+ method: 'GET',
128
+ headers: headerParameters,
129
+ query: queryParameters,
130
+ }, initOverrides);
131
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(models_1.ProjectFromJSON));
132
+ }
133
+ /**
134
+ * List all projects that the API key or user credential has access to
135
+ */
136
+ async listProjects(initOverrides) {
137
+ const response = await this.listProjectsRaw(initOverrides);
138
+ return await response.value();
139
+ }
119
140
  /**
120
141
  * Update a project
121
142
  */
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Ampersand public API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ApiKeyOpts
16
+ */
17
+ export interface ApiKeyOpts {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ApiKeyOpts
22
+ */
23
+ type: ApiKeyOptsTypeEnum;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ApiKeyOpts
28
+ */
29
+ queryParamName?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ApiKeyOpts
34
+ */
35
+ headerName?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ApiKeyOpts
40
+ */
41
+ valuePrefix?: string;
42
+ /**
43
+ * URL with more information about how to get or use an API key.
44
+ * @type {string}
45
+ * @memberof ApiKeyOpts
46
+ */
47
+ docsURL?: string;
48
+ }
49
+ /**
50
+ * @export
51
+ */
52
+ export declare const ApiKeyOptsTypeEnum: {
53
+ readonly Query: "in-query";
54
+ readonly Header: "in-header";
55
+ };
56
+ export type ApiKeyOptsTypeEnum = typeof ApiKeyOptsTypeEnum[keyof typeof ApiKeyOptsTypeEnum];
57
+ /**
58
+ * Check if a given object implements the ApiKeyOpts interface.
59
+ */
60
+ export declare function instanceOfApiKeyOpts(value: object): boolean;
61
+ export declare function ApiKeyOptsFromJSON(json: any): ApiKeyOpts;
62
+ export declare function ApiKeyOptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyOpts;
63
+ export declare function ApiKeyOptsToJSON(value?: ApiKeyOpts | null): any;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Ampersand public API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ApiKeyOptsToJSON = exports.ApiKeyOptsFromJSONTyped = exports.ApiKeyOptsFromJSON = exports.instanceOfApiKeyOpts = exports.ApiKeyOptsTypeEnum = void 0;
17
+ const runtime_1 = require("../runtime");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.ApiKeyOptsTypeEnum = {
22
+ Query: 'in-query',
23
+ Header: 'in-header'
24
+ };
25
+ /**
26
+ * Check if a given object implements the ApiKeyOpts interface.
27
+ */
28
+ function instanceOfApiKeyOpts(value) {
29
+ let isInstance = true;
30
+ isInstance = isInstance && "type" in value;
31
+ return isInstance;
32
+ }
33
+ exports.instanceOfApiKeyOpts = instanceOfApiKeyOpts;
34
+ function ApiKeyOptsFromJSON(json) {
35
+ return ApiKeyOptsFromJSONTyped(json, false);
36
+ }
37
+ exports.ApiKeyOptsFromJSON = ApiKeyOptsFromJSON;
38
+ function ApiKeyOptsFromJSONTyped(json, ignoreDiscriminator) {
39
+ if ((json === undefined) || (json === null)) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'type': json['type'],
44
+ 'queryParamName': !(0, runtime_1.exists)(json, 'queryParamName') ? undefined : json['queryParamName'],
45
+ 'headerName': !(0, runtime_1.exists)(json, 'headerName') ? undefined : json['headerName'],
46
+ 'valuePrefix': !(0, runtime_1.exists)(json, 'valuePrefix') ? undefined : json['valuePrefix'],
47
+ 'docsURL': !(0, runtime_1.exists)(json, 'docsURL') ? undefined : json['docsURL'],
48
+ };
49
+ }
50
+ exports.ApiKeyOptsFromJSONTyped = ApiKeyOptsFromJSONTyped;
51
+ function ApiKeyOptsToJSON(value) {
52
+ if (value === undefined) {
53
+ return undefined;
54
+ }
55
+ if (value === null) {
56
+ return null;
57
+ }
58
+ return {
59
+ 'type': value.type,
60
+ 'queryParamName': value.queryParamName,
61
+ 'headerName': value.headerName,
62
+ 'valuePrefix': value.valuePrefix,
63
+ 'docsURL': value.docsURL,
64
+ };
65
+ }
66
+ exports.ApiKeyOptsToJSON = ApiKeyOptsToJSON;
@@ -15,6 +15,8 @@
15
15
  */
16
16
  export declare const AuthType: {
17
17
  readonly Oauth2: "oauth2";
18
+ readonly ApiKey: "api_key";
19
+ readonly Basic: "basic";
18
20
  readonly None: "none";
19
21
  };
20
22
  export type AuthType = typeof AuthType[keyof typeof AuthType];
@@ -20,6 +20,8 @@ exports.AuthTypeToJSON = exports.AuthTypeFromJSONTyped = exports.AuthTypeFromJSO
20
20
  */
21
21
  exports.AuthType = {
22
22
  Oauth2: 'oauth2',
23
+ ApiKey: 'api_key',
24
+ Basic: 'basic',
23
25
  None: 'none'
24
26
  };
25
27
  function AuthTypeFromJSON(json) {
@@ -49,6 +49,12 @@ export interface BaseReadConfigObject {
49
49
  selectedFieldMappings?: {
50
50
  [key: string]: string;
51
51
  };
52
+ /**
53
+ * The history configuration for the object.
54
+ * @type {string}
55
+ * @memberof BaseReadConfigObject
56
+ */
57
+ history?: string;
52
58
  }
53
59
  /**
54
60
  * Check if a given object implements the BaseReadConfigObject interface.
@@ -37,6 +37,7 @@ function BaseReadConfigObjectFromJSONTyped(json, ignoreDiscriminator) {
37
37
  'destination': !(0, runtime_1.exists)(json, 'destination') ? undefined : json['destination'],
38
38
  'selectedFields': !(0, runtime_1.exists)(json, 'selectedFields') ? undefined : json['selectedFields'],
39
39
  'selectedFieldMappings': !(0, runtime_1.exists)(json, 'selectedFieldMappings') ? undefined : json['selectedFieldMappings'],
40
+ 'history': !(0, runtime_1.exists)(json, 'history') ? undefined : json['history'],
40
41
  };
41
42
  }
42
43
  exports.BaseReadConfigObjectFromJSONTyped = BaseReadConfigObjectFromJSONTyped;
@@ -53,6 +54,7 @@ function BaseReadConfigObjectToJSON(value) {
53
54
  'destination': value.destination,
54
55
  'selectedFields': value.selectedFields,
55
56
  'selectedFieldMappings': value.selectedFieldMappings,
57
+ 'history': value.history,
56
58
  };
57
59
  }
58
60
  exports.BaseReadConfigObjectToJSON = BaseReadConfigObjectToJSON;
@@ -13,59 +13,65 @@ import type { TokenMetadataFields } from './TokenMetadataFields';
13
13
  /**
14
14
  *
15
15
  * @export
16
- * @interface OauthOpts
16
+ * @interface Oauth2Opts
17
17
  */
18
- export interface OauthOpts {
18
+ export interface Oauth2Opts {
19
19
  /**
20
20
  *
21
21
  * @type {string}
22
- * @memberof OauthOpts
22
+ * @memberof Oauth2Opts
23
23
  */
24
- grantType: OauthOptsGrantTypeEnum;
24
+ grantType: Oauth2OptsGrantTypeEnum;
25
25
  /**
26
26
  *
27
27
  * @type {string}
28
- * @memberof OauthOpts
28
+ * @memberof Oauth2Opts
29
29
  */
30
- authURL: string;
30
+ authURL?: string;
31
31
  /**
32
32
  *
33
33
  * @type {string}
34
- * @memberof OauthOpts
34
+ * @memberof Oauth2Opts
35
35
  */
36
36
  tokenURL: string;
37
37
  /**
38
38
  *
39
39
  * @type {boolean}
40
- * @memberof OauthOpts
40
+ * @memberof Oauth2Opts
41
41
  */
42
42
  explicitScopesRequired: boolean;
43
43
  /**
44
44
  *
45
45
  * @type {boolean}
46
- * @memberof OauthOpts
46
+ * @memberof Oauth2Opts
47
47
  */
48
48
  explicitWorkspaceRequired: boolean;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof Oauth2Opts
53
+ */
54
+ audience?: string;
49
55
  /**
50
56
  *
51
57
  * @type {TokenMetadataFields}
52
- * @memberof OauthOpts
58
+ * @memberof Oauth2Opts
53
59
  */
54
60
  tokenMetadataFields: TokenMetadataFields;
55
61
  }
56
62
  /**
57
63
  * @export
58
64
  */
59
- export declare const OauthOptsGrantTypeEnum: {
65
+ export declare const Oauth2OptsGrantTypeEnum: {
60
66
  readonly AuthorizationCode: "authorizationCode";
61
67
  readonly ClientCredentials: "clientCredentials";
62
68
  readonly Pkce: "PKCE";
63
69
  };
64
- export type OauthOptsGrantTypeEnum = typeof OauthOptsGrantTypeEnum[keyof typeof OauthOptsGrantTypeEnum];
70
+ export type Oauth2OptsGrantTypeEnum = typeof Oauth2OptsGrantTypeEnum[keyof typeof Oauth2OptsGrantTypeEnum];
65
71
  /**
66
- * Check if a given object implements the OauthOpts interface.
72
+ * Check if a given object implements the Oauth2Opts interface.
67
73
  */
68
- export declare function instanceOfOauthOpts(value: object): boolean;
69
- export declare function OauthOptsFromJSON(json: any): OauthOpts;
70
- export declare function OauthOptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OauthOpts;
71
- export declare function OauthOptsToJSON(value?: OauthOpts | null): any;
74
+ export declare function instanceOfOauth2Opts(value: object): boolean;
75
+ export declare function Oauth2OptsFromJSON(json: any): Oauth2Opts;
76
+ export declare function Oauth2OptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Oauth2Opts;
77
+ export declare function Oauth2OptsToJSON(value?: Oauth2Opts | null): any;
@@ -13,49 +13,50 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.OauthOptsToJSON = exports.OauthOptsFromJSONTyped = exports.OauthOptsFromJSON = exports.instanceOfOauthOpts = exports.OauthOptsGrantTypeEnum = void 0;
16
+ exports.Oauth2OptsToJSON = exports.Oauth2OptsFromJSONTyped = exports.Oauth2OptsFromJSON = exports.instanceOfOauth2Opts = exports.Oauth2OptsGrantTypeEnum = void 0;
17
+ const runtime_1 = require("../runtime");
17
18
  const TokenMetadataFields_1 = require("./TokenMetadataFields");
18
19
  /**
19
20
  * @export
20
21
  */
21
- exports.OauthOptsGrantTypeEnum = {
22
+ exports.Oauth2OptsGrantTypeEnum = {
22
23
  AuthorizationCode: 'authorizationCode',
23
24
  ClientCredentials: 'clientCredentials',
24
25
  Pkce: 'PKCE'
25
26
  };
26
27
  /**
27
- * Check if a given object implements the OauthOpts interface.
28
+ * Check if a given object implements the Oauth2Opts interface.
28
29
  */
29
- function instanceOfOauthOpts(value) {
30
+ function instanceOfOauth2Opts(value) {
30
31
  let isInstance = true;
31
32
  isInstance = isInstance && "grantType" in value;
32
- isInstance = isInstance && "authURL" in value;
33
33
  isInstance = isInstance && "tokenURL" in value;
34
34
  isInstance = isInstance && "explicitScopesRequired" in value;
35
35
  isInstance = isInstance && "explicitWorkspaceRequired" in value;
36
36
  isInstance = isInstance && "tokenMetadataFields" in value;
37
37
  return isInstance;
38
38
  }
39
- exports.instanceOfOauthOpts = instanceOfOauthOpts;
40
- function OauthOptsFromJSON(json) {
41
- return OauthOptsFromJSONTyped(json, false);
39
+ exports.instanceOfOauth2Opts = instanceOfOauth2Opts;
40
+ function Oauth2OptsFromJSON(json) {
41
+ return Oauth2OptsFromJSONTyped(json, false);
42
42
  }
43
- exports.OauthOptsFromJSON = OauthOptsFromJSON;
44
- function OauthOptsFromJSONTyped(json, ignoreDiscriminator) {
43
+ exports.Oauth2OptsFromJSON = Oauth2OptsFromJSON;
44
+ function Oauth2OptsFromJSONTyped(json, ignoreDiscriminator) {
45
45
  if ((json === undefined) || (json === null)) {
46
46
  return json;
47
47
  }
48
48
  return {
49
49
  'grantType': json['grantType'],
50
- 'authURL': json['authURL'],
50
+ 'authURL': !(0, runtime_1.exists)(json, 'authURL') ? undefined : json['authURL'],
51
51
  'tokenURL': json['tokenURL'],
52
52
  'explicitScopesRequired': json['explicitScopesRequired'],
53
53
  'explicitWorkspaceRequired': json['explicitWorkspaceRequired'],
54
+ 'audience': !(0, runtime_1.exists)(json, 'audience') ? undefined : json['audience'],
54
55
  'tokenMetadataFields': (0, TokenMetadataFields_1.TokenMetadataFieldsFromJSON)(json['tokenMetadataFields']),
55
56
  };
56
57
  }
57
- exports.OauthOptsFromJSONTyped = OauthOptsFromJSONTyped;
58
- function OauthOptsToJSON(value) {
58
+ exports.Oauth2OptsFromJSONTyped = Oauth2OptsFromJSONTyped;
59
+ function Oauth2OptsToJSON(value) {
59
60
  if (value === undefined) {
60
61
  return undefined;
61
62
  }
@@ -68,7 +69,8 @@ function OauthOptsToJSON(value) {
68
69
  'tokenURL': value.tokenURL,
69
70
  'explicitScopesRequired': value.explicitScopesRequired,
70
71
  'explicitWorkspaceRequired': value.explicitWorkspaceRequired,
72
+ 'audience': value.audience,
71
73
  'tokenMetadataFields': (0, TokenMetadataFields_1.TokenMetadataFieldsToJSON)(value.tokenMetadataFields),
72
74
  };
73
75
  }
74
- exports.OauthOptsToJSON = OauthOptsToJSON;
76
+ exports.Oauth2OptsToJSON = Oauth2OptsToJSON;
@@ -9,8 +9,9 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ApiKeyOpts } from './ApiKeyOpts';
12
13
  import type { AuthType } from './AuthType';
13
- import type { OauthOpts } from './OauthOpts';
14
+ import type { Oauth2Opts } from './Oauth2Opts';
14
15
  import type { Support } from './Support';
15
16
  /**
16
17
  *
@@ -18,6 +19,12 @@ import type { Support } from './Support';
18
19
  * @interface ProviderInfo
19
20
  */
20
21
  export interface ProviderInfo {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ProviderInfo
26
+ */
27
+ name: string;
21
28
  /**
22
29
  *
23
30
  * @type {AuthType}
@@ -32,10 +39,16 @@ export interface ProviderInfo {
32
39
  baseURL: string;
33
40
  /**
34
41
  *
35
- * @type {OauthOpts}
42
+ * @type {Oauth2Opts}
43
+ * @memberof ProviderInfo
44
+ */
45
+ oauth2Opts?: Oauth2Opts;
46
+ /**
47
+ *
48
+ * @type {ApiKeyOpts}
36
49
  * @memberof ProviderInfo
37
50
  */
38
- oauthOpts: OauthOpts;
51
+ apiKeyOpts?: ApiKeyOpts;
39
52
  /**
40
53
  *
41
54
  * @type {Support}
@@ -15,17 +15,18 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ProviderInfoToJSON = exports.ProviderInfoFromJSONTyped = exports.ProviderInfoFromJSON = exports.instanceOfProviderInfo = void 0;
17
17
  const runtime_1 = require("../runtime");
18
+ const ApiKeyOpts_1 = require("./ApiKeyOpts");
18
19
  const AuthType_1 = require("./AuthType");
19
- const OauthOpts_1 = require("./OauthOpts");
20
+ const Oauth2Opts_1 = require("./Oauth2Opts");
20
21
  const Support_1 = require("./Support");
21
22
  /**
22
23
  * Check if a given object implements the ProviderInfo interface.
23
24
  */
24
25
  function instanceOfProviderInfo(value) {
25
26
  let isInstance = true;
27
+ isInstance = isInstance && "name" in value;
26
28
  isInstance = isInstance && "authType" in value;
27
29
  isInstance = isInstance && "baseURL" in value;
28
- isInstance = isInstance && "oauthOpts" in value;
29
30
  isInstance = isInstance && "support" in value;
30
31
  isInstance = isInstance && "providerOpts" in value;
31
32
  return isInstance;
@@ -40,9 +41,11 @@ function ProviderInfoFromJSONTyped(json, ignoreDiscriminator) {
40
41
  return json;
41
42
  }
42
43
  return {
44
+ 'name': json['name'],
43
45
  'authType': (0, AuthType_1.AuthTypeFromJSON)(json['authType']),
44
46
  'baseURL': json['baseURL'],
45
- 'oauthOpts': (0, OauthOpts_1.OauthOptsFromJSON)(json['oauthOpts']),
47
+ 'oauth2Opts': !(0, runtime_1.exists)(json, 'oauth2Opts') ? undefined : (0, Oauth2Opts_1.Oauth2OptsFromJSON)(json['oauth2Opts']),
48
+ 'apiKeyOpts': !(0, runtime_1.exists)(json, 'apiKeyOpts') ? undefined : (0, ApiKeyOpts_1.ApiKeyOptsFromJSON)(json['apiKeyOpts']),
46
49
  'support': (0, Support_1.SupportFromJSON)(json['support']),
47
50
  'providerOpts': json['providerOpts'],
48
51
  'displayName': !(0, runtime_1.exists)(json, 'displayName') ? undefined : json['displayName'],
@@ -58,9 +61,11 @@ function ProviderInfoToJSON(value) {
58
61
  return null;
59
62
  }
60
63
  return {
64
+ 'name': value.name,
61
65
  'authType': (0, AuthType_1.AuthTypeToJSON)(value.authType),
62
66
  'baseURL': value.baseURL,
63
- 'oauthOpts': (0, OauthOpts_1.OauthOptsToJSON)(value.oauthOpts),
67
+ 'oauth2Opts': (0, Oauth2Opts_1.Oauth2OptsToJSON)(value.oauth2Opts),
68
+ 'apiKeyOpts': (0, ApiKeyOpts_1.ApiKeyOptsToJSON)(value.apiKeyOpts),
64
69
  'support': (0, Support_1.SupportToJSON)(value.support),
65
70
  'providerOpts': value.providerOpts,
66
71
  'displayName': value.displayName,
@@ -1,5 +1,6 @@
1
1
  export * from './AcceptInviteRequest';
2
2
  export * from './ApiKey';
3
+ export * from './ApiKeyOpts';
3
4
  export * from './ApiKeyRequest';
4
5
  export * from './ApiProblem';
5
6
  export * from './AuthType';
@@ -62,8 +63,8 @@ export * from './IntegrationWriteObject';
62
63
  export * from './Invite';
63
64
  export * from './Log';
64
65
  export * from './LogMessage';
66
+ export * from './Oauth2Opts';
65
67
  export * from './OauthConnectRequest';
66
- export * from './OauthOpts';
67
68
  export * from './Operation';
68
69
  export * from './OperationEvent';
69
70
  export * from './OptionalFieldsAutoOption';
@@ -72,7 +73,6 @@ export * from './PatchApiKeyRequest';
72
73
  export * from './PatchApiKeyRequestApiKey';
73
74
  export * from './Problem';
74
75
  export * from './Project';
75
- export * from './ProjectMembership';
76
76
  export * from './ProviderApp';
77
77
  export * from './ProviderInfo';
78
78
  export * from './Revision';
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./AcceptInviteRequest"), exports);
20
20
  __exportStar(require("./ApiKey"), exports);
21
+ __exportStar(require("./ApiKeyOpts"), exports);
21
22
  __exportStar(require("./ApiKeyRequest"), exports);
22
23
  __exportStar(require("./ApiProblem"), exports);
23
24
  __exportStar(require("./AuthType"), exports);
@@ -80,8 +81,8 @@ __exportStar(require("./IntegrationWriteObject"), exports);
80
81
  __exportStar(require("./Invite"), exports);
81
82
  __exportStar(require("./Log"), exports);
82
83
  __exportStar(require("./LogMessage"), exports);
84
+ __exportStar(require("./Oauth2Opts"), exports);
83
85
  __exportStar(require("./OauthConnectRequest"), exports);
84
- __exportStar(require("./OauthOpts"), exports);
85
86
  __exportStar(require("./Operation"), exports);
86
87
  __exportStar(require("./OperationEvent"), exports);
87
88
  __exportStar(require("./OptionalFieldsAutoOption"), exports);
@@ -90,7 +91,6 @@ __exportStar(require("./PatchApiKeyRequest"), exports);
90
91
  __exportStar(require("./PatchApiKeyRequestApiKey"), exports);
91
92
  __exportStar(require("./Problem"), exports);
92
93
  __exportStar(require("./Project"), exports);
93
- __exportStar(require("./ProjectMembership"), exports);
94
94
  __exportStar(require("./ProviderApp"), exports);
95
95
  __exportStar(require("./ProviderInfo"), exports);
96
96
  __exportStar(require("./Revision"), exports);
@@ -22,7 +22,7 @@ function OauthFlow({ provider, consumerRef, consumerName, groupRef, groupName, }
22
22
  });
23
23
  }
24
24
  }, [apiKey, provider]);
25
- const workspaceRequired = (_b = (_a = providerInfo === null || providerInfo === void 0 ? void 0 : providerInfo.oauthOpts) === null || _a === void 0 ? void 0 : _a.explicitWorkspaceRequired) !== null && _b !== void 0 ? _b : false;
25
+ const workspaceRequired = (_b = (_a = providerInfo === null || providerInfo === void 0 ? void 0 : providerInfo.oauth2Opts) === null || _a === void 0 ? void 0 : _a.explicitWorkspaceRequired) !== null && _b !== void 0 ? _b : false;
26
26
  // required workspace
27
27
  if (workspaceRequired) {
28
28
  return ((0, jsx_runtime_1.jsx)(WorkspaceOauthFlow_1.WorkspaceOauthFlow, { provider: provider, consumerRef: consumerRef, consumerName: consumerName, groupRef: groupRef, groupName: groupName }));
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "1.5.2";
1
+ export declare const LIB_VERSION = "1.5.3";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LIB_VERSION = void 0;
4
- exports.LIB_VERSION = '1.5.2';
4
+ exports.LIB_VERSION = '1.5.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amp-labs/react",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Ampersand React library.",
5
5
  "author": {
6
6
  "name": "Ampersand Labs",
@@ -1,56 +0,0 @@
1
- /**
2
- * Ampersand public API
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Project } from './Project';
13
- /**
14
- *
15
- * @export
16
- * @interface ProjectMembership
17
- */
18
- export interface ProjectMembership {
19
- /**
20
- *
21
- * @type {Project}
22
- * @memberof ProjectMembership
23
- */
24
- project: Project;
25
- /**
26
- * The builder ID.
27
- * @type {string}
28
- * @memberof ProjectMembership
29
- */
30
- builderId: string;
31
- /**
32
- * The builder's role in the project.
33
- * @type {string}
34
- * @memberof ProjectMembership
35
- */
36
- role: string;
37
- /**
38
- * The time the membership was created.
39
- * @type {Date}
40
- * @memberof ProjectMembership
41
- */
42
- createTime: Date;
43
- /**
44
- * The time the membership was updated.
45
- * @type {Date}
46
- * @memberof ProjectMembership
47
- */
48
- updateTime?: Date;
49
- }
50
- /**
51
- * Check if a given object implements the ProjectMembership interface.
52
- */
53
- export declare function instanceOfProjectMembership(value: object): boolean;
54
- export declare function ProjectMembershipFromJSON(json: any): ProjectMembership;
55
- export declare function ProjectMembershipFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectMembership;
56
- export declare function ProjectMembershipToJSON(value?: ProjectMembership | null): any;
@@ -1,63 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Ampersand public API
6
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
- *
8
- * The version of the OpenAPI document: 1.0.0
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProjectMembershipToJSON = exports.ProjectMembershipFromJSONTyped = exports.ProjectMembershipFromJSON = exports.instanceOfProjectMembership = void 0;
17
- const runtime_1 = require("../runtime");
18
- const Project_1 = require("./Project");
19
- /**
20
- * Check if a given object implements the ProjectMembership interface.
21
- */
22
- function instanceOfProjectMembership(value) {
23
- let isInstance = true;
24
- isInstance = isInstance && "project" in value;
25
- isInstance = isInstance && "builderId" in value;
26
- isInstance = isInstance && "role" in value;
27
- isInstance = isInstance && "createTime" in value;
28
- return isInstance;
29
- }
30
- exports.instanceOfProjectMembership = instanceOfProjectMembership;
31
- function ProjectMembershipFromJSON(json) {
32
- return ProjectMembershipFromJSONTyped(json, false);
33
- }
34
- exports.ProjectMembershipFromJSON = ProjectMembershipFromJSON;
35
- function ProjectMembershipFromJSONTyped(json, ignoreDiscriminator) {
36
- if ((json === undefined) || (json === null)) {
37
- return json;
38
- }
39
- return {
40
- 'project': (0, Project_1.ProjectFromJSON)(json['project']),
41
- 'builderId': json['builderId'],
42
- 'role': json['role'],
43
- 'createTime': (new Date(json['createTime'])),
44
- 'updateTime': !(0, runtime_1.exists)(json, 'updateTime') ? undefined : (new Date(json['updateTime'])),
45
- };
46
- }
47
- exports.ProjectMembershipFromJSONTyped = ProjectMembershipFromJSONTyped;
48
- function ProjectMembershipToJSON(value) {
49
- if (value === undefined) {
50
- return undefined;
51
- }
52
- if (value === null) {
53
- return null;
54
- }
55
- return {
56
- 'project': (0, Project_1.ProjectToJSON)(value.project),
57
- 'builderId': value.builderId,
58
- 'role': value.role,
59
- 'createTime': (value.createTime.toISOString()),
60
- 'updateTime': value.updateTime === undefined ? undefined : (value.updateTime.toISOString()),
61
- };
62
- }
63
- exports.ProjectMembershipToJSON = ProjectMembershipToJSON;