Skip to content

Commit 0a36833

Browse files
authored
Remove data api for extension intents (#4288)
* Remove data api * Add changeset * Fix test
1 parent 7372500 commit 0a36833

3 files changed

Lines changed: 1 addition & 23 deletions

File tree

packages/ui-extensions-tester/src/admin/factories.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ function createMockStandardRenderingApi<T extends ExtensionTarget>(target: T) {
107107
function createAppIntentRenderMock<T extends ExtensionTarget>(target: T) {
108108
return {
109109
...createMockStandardRenderingApi(target),
110-
data: {
111-
intent: {data: {}},
112-
},
113110
intents: {
114111
...createMockStandardApi(target).intents,
115112
response: createIntentResponseApi(),

packages/ui-extensions-tester/src/tests/admin-factories.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ describe('createMockAdminTargetApi', () => {
5050
expect(typeof api.intents.response?.ok).toBe('function');
5151
expect(typeof api.intents.response?.error).toBe('function');
5252
expect(typeof api.intents.response?.closed).toBe('function');
53-
expect(api).toHaveProperty('data');
54-
expect(api.data.intent).toStrictEqual({
55-
data: {},
56-
});
5753
expect(api).not.toHaveProperty('close');
5854
});
5955
});

packages/ui-extensions/src/surfaces/admin/api/intents/intent-render.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
import type {StandardRenderingExtensionApi} from '../standard/standard-rendering';
22
import type {ExtensionTarget as AnyExtensionTarget} from '../../extension-targets';
3-
import type {IntentQueryOptions, IntentResponseApi} from './intents';
4-
/**
5-
* The data provided to an intent render extension, containing the intent that triggered the extension.
6-
* @publicDocs
7-
*/
8-
export interface IntentRenderData {
9-
/**
10-
* The intent that triggered this extension, including the action, resource type, and any additional input data.
11-
*/
12-
intent: IntentQueryOptions;
13-
}
3+
import type {IntentResponseApi} from './intents';
144

155
/**
166
* The intents API available to intent render extensions. Unlike other targets where `response` is optional, intent render extensions always run inside an intent workflow so `response` is guaranteed.
@@ -29,11 +19,6 @@ export interface IntentRenderIntents {
2919
*/
3020
export interface IntentRenderApi<ExtensionTarget extends AnyExtensionTarget>
3121
extends StandardRenderingExtensionApi<ExtensionTarget> {
32-
/**
33-
* The data associated with the intent that triggered this extension.
34-
*/
35-
data: IntentRenderData;
36-
3722
/**
3823
* Provides methods for resolving the current intent. Always available for intent render extensions since they are always invoked inside an intent workflow.
3924
*/

0 commit comments

Comments
 (0)