@backstage/backend-plugin-api 0.0.0-nightly-20240715022028 → 0.0.0-nightly-20240716021845

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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # @backstage/backend-plugin-api
2
2
 
3
- ## 0.0.0-nightly-20240715022028
3
+ ## 0.0.0-nightly-20240716021845
4
+
5
+ ### Minor Changes
6
+
7
+ - 36f91e8: **BREAKING**: The `PermissionsService` no longer supports passing the deprecated `token` option, and the request options are now required.
4
8
 
5
9
  ### Patch Changes
6
10
 
@@ -13,12 +17,12 @@
13
17
  - The `PluginServiceFactoryConfig` type was renamed to `PluginServiceFactoryOptions`
14
18
 
15
19
  - Updated dependencies
16
- - @backstage/plugin-auth-node@0.0.0-nightly-20240715022028
20
+ - @backstage/plugin-permission-common@0.0.0-nightly-20240716021845
21
+ - @backstage/plugin-auth-node@0.0.0-nightly-20240716021845
17
22
  - @backstage/cli-common@0.1.14
18
23
  - @backstage/config@1.2.0
19
24
  - @backstage/errors@1.2.4
20
25
  - @backstage/types@1.1.1
21
- - @backstage/plugin-permission-common@0.7.14
22
26
 
23
27
  ## 0.6.22-next.1
24
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-plugin-api__alpha",
3
- "version": "0.0.0-nightly-20240715022028",
3
+ "version": "0.0.0-nightly-20240716021845",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Config } from '@backstage/config';
5
5
  import { JsonObject, HumanDuration, JsonValue } from '@backstage/types';
6
6
  import { Duration } from 'luxon';
7
7
  import { Handler, Request, Response } from 'express';
8
- import { PermissionAttributes, PermissionEvaluator, AuthorizePermissionRequest, AuthorizePermissionResponse, QueryPermissionRequest, QueryPermissionResponse } from '@backstage/plugin-permission-common';
8
+ import { PermissionAttributes, EvaluatorRequestOptions, PermissionEvaluator, AuthorizePermissionRequest, AuthorizePermissionResponse, QueryPermissionRequest, QueryPermissionResponse } from '@backstage/plugin-permission-common';
9
9
  import { Knex } from 'knex';
10
10
  export { isChildPath } from '@backstage/cli-common';
11
11
 
@@ -1047,16 +1047,13 @@ interface AuthService {
1047
1047
  }
1048
1048
 
1049
1049
  /**
1050
- * Options for {@link @backstage/plugin-permission-common#PermissionEvaluator} requests.
1050
+ * Options for {@link PermissionsService} requests.
1051
1051
  *
1052
1052
  * @public
1053
1053
  */
1054
- type PermissionsServiceRequestOptions = {
1055
- /** @deprecated use the `credentials` option instead. */
1056
- token?: string;
1057
- } | {
1054
+ interface PermissionsServiceRequestOptions extends EvaluatorRequestOptions {
1058
1055
  credentials: BackstageCredentials;
1059
- };
1056
+ }
1060
1057
  /**
1061
1058
  * Permission system integration for authorization of user/service actions.
1062
1059
  *
@@ -1077,7 +1074,7 @@ interface PermissionsService extends PermissionEvaluator {
1077
1074
  * The returned array has the same number of items, in the same order, as the
1078
1075
  * given requests.
1079
1076
  */
1080
- authorize(requests: AuthorizePermissionRequest[], options?: PermissionsServiceRequestOptions): Promise<AuthorizePermissionResponse[]>;
1077
+ authorize(requests: AuthorizePermissionRequest[], options: PermissionsServiceRequestOptions): Promise<AuthorizePermissionResponse[]>;
1081
1078
  /**
1082
1079
  * Evaluates {@link @backstage/plugin-permission-common#ResourcePermission | ResourcePermissions} and returns both definitive and
1083
1080
  * conditional decisions, depending on the configured
@@ -1093,7 +1090,7 @@ interface PermissionsService extends PermissionEvaluator {
1093
1090
  * The returned array has the same number of items, in the same order, as the
1094
1091
  * given requests.
1095
1092
  */
1096
- authorizeConditional(requests: QueryPermissionRequest[], options?: PermissionsServiceRequestOptions): Promise<QueryPermissionResponse[]>;
1093
+ authorizeConditional(requests: QueryPermissionRequest[], options: PermissionsServiceRequestOptions): Promise<QueryPermissionResponse[]>;
1097
1094
  }
1098
1095
 
1099
1096
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-plugin-api",
3
- "version": "0.0.0-nightly-20240715022028",
3
+ "version": "0.0.0-nightly-20240716021845",
4
4
  "description": "Core API used by Backstage backend plugins",
5
5
  "backstage": {
6
6
  "role": "node-library"
@@ -56,8 +56,8 @@
56
56
  "@backstage/cli-common": "^0.1.14",
57
57
  "@backstage/config": "^1.2.0",
58
58
  "@backstage/errors": "^1.2.4",
59
- "@backstage/plugin-auth-node": "^0.0.0-nightly-20240715022028",
60
- "@backstage/plugin-permission-common": "^0.7.14",
59
+ "@backstage/plugin-auth-node": "^0.0.0-nightly-20240716021845",
60
+ "@backstage/plugin-permission-common": "^0.0.0-nightly-20240716021845",
61
61
  "@backstage/types": "^1.1.1",
62
62
  "@types/express": "^4.17.6",
63
63
  "@types/luxon": "^3.0.0",
@@ -66,7 +66,7 @@
66
66
  "luxon": "^3.0.0"
67
67
  },
68
68
  "devDependencies": {
69
- "@backstage/backend-test-utils": "^0.0.0-nightly-20240715022028",
70
- "@backstage/cli": "^0.0.0-nightly-20240715022028"
69
+ "@backstage/backend-test-utils": "^0.0.0-nightly-20240716021845",
70
+ "@backstage/cli": "^0.0.0-nightly-20240716021845"
71
71
  }
72
72
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-plugin-api__testutils",
3
- "version": "0.0.0-nightly-20240715022028",
3
+ "version": "0.0.0-nightly-20240716021845",
4
4
  "main": "../dist/testUtils.cjs.js",
5
5
  "types": "../dist/testUtils.d.ts"
6
6
  }