@getuserfeedback/react-native 3.0.95 → 3.0.97

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
@@ -32,7 +32,7 @@ function FeedbackActions() {
32
32
  <Button
33
33
  title="Send feedback"
34
34
  onPress={() => {
35
- void feedback.open("flow_123");
35
+ void feedback.flow("flow_123").open();
36
36
  }}
37
37
  />
38
38
  );
@@ -149,7 +149,7 @@ function SandboxActions() {
149
149
  <Button
150
150
  title="Open"
151
151
  onPress={() => {
152
- void feedback.open(manifest.commands.open.flowId);
152
+ void feedback.flow(manifest.commands.open.flowId).open();
153
153
  }}
154
154
  />
155
155
  </View>
package/dist/index.d.ts CHANGED
@@ -25,8 +25,6 @@ type IdentifyOptions = {
25
25
  type TrackOptions = {
26
26
  externalIds?: AppEventExternalId[];
27
27
  };
28
- type OpenOptions = Pick<OpenCommand, "hideCloseButton">;
29
- type PrerenderOptions = Pick<PrerenderCommand, "hideCloseButton">;
30
28
  export type OpenFlowOptions = Pick<OpenCommand, "hideCloseButton" | "metadata">;
31
29
  export type PrerenderFlowOptions = Pick<PrerenderCommand, "hideCloseButton">;
32
30
  type HostContext = Extract<PublicCommandPayload, {
@@ -59,11 +57,8 @@ export interface ReactNativeGetUserFeedbackClient {
59
57
  (traits: IdentifyTraits, options?: IdentifyOptions): Promise<ReactNativeCommandResult>;
60
58
  };
61
59
  track: (eventName: string, properties?: TrackProperties, options?: TrackOptions) => Promise<ReactNativeCommandResult>;
62
- open: (flowId: string, options?: OpenOptions, commandOptions?: ReactNativeCommandOptions) => Promise<ReactNativeCommandResult>;
63
- prefetch: (flowId: string, options?: ReactNativeCommandOptions) => Promise<ReactNativeCommandResult>;
64
- prerender: (flowId: string, options?: PrerenderOptions, commandOptions?: ReactNativeCommandOptions) => Promise<ReactNativeCommandResult>;
65
60
  flow: (flowId: string) => ReactNativeFlowRun;
66
- close: (flowHandleId?: string, options?: ReactNativeCommandOptions) => Promise<ReactNativeCommandResult>;
61
+ close: () => Promise<ReactNativeCommandResult>;
67
62
  reset: (options?: ReactNativeCommandOptions) => Promise<ReactNativeCommandResult>;
68
63
  updateHostContext: (context: HostContext, options?: ReactNativeCommandOptions) => Promise<ReactNativeCommandResult>;
69
64
  emitHostSignal: (name: string, data?: unknown, options?: ReactNativeCommandOptions) => Promise<ReactNativeCommandResult>;
package/dist/index.js CHANGED
@@ -526,9 +526,6 @@ export function GetUserFeedbackProvider({ autoInit = true, children, commandTime
526
526
  get nativeMessages() {
527
527
  return getNativeMessages();
528
528
  },
529
- open: client.open,
530
- prefetch: client.prefetch,
531
- prerender: client.prerender,
532
529
  reset: client.reset,
533
530
  track: client.track,
534
531
  updateHostContext: client.updateHostContext,
@@ -1,8 +1,8 @@
1
1
  import { type CoreCommandEnvelope } from "@getuserfeedback/protocol";
2
- import { type CommandSettledDetail } from "@getuserfeedback/protocol/host";
2
+ import { type CommandSettledSuccessDetail } from "@getuserfeedback/protocol/host";
3
3
  import type { NativeCoreCommandChannel } from "./native-core-command-channel.js";
4
4
  export type NativeCoreCommandSession = {
5
- dispatch: (envelope: CoreCommandEnvelope) => Promise<CommandSettledDetail>;
5
+ dispatch: (envelope: CoreCommandEnvelope) => Promise<CommandSettledSuccessDetail>;
6
6
  };
7
7
  type NativeCoreCommandSessionOwner = {
8
8
  dispose: () => void;
@@ -1,4 +1,4 @@
1
- import type { CommandEnvelopeWithInstanceId, CommandSettledDetail } from "@getuserfeedback/protocol/host";
1
+ import type { CommandEnvelopeWithInstanceId, CommandSettledSuccessDetail } from "@getuserfeedback/protocol/host";
2
2
  import { type CoreTranslatablePublicCommandPayload } from "@getuserfeedback/protocol/internal/public-core-command";
3
3
  import type { NativeCoreCommandSession } from "./native-core-command-session.js";
4
4
  type NativeFlowAllocationCommand = (Omit<Extract<CoreTranslatablePublicCommandPayload, {
@@ -17,7 +17,7 @@ export type NativeDirectCommandEnvelope = Omit<CommandEnvelopeWithInstanceId, "c
17
17
  command: NativeDirectCommandPayload;
18
18
  };
19
19
  export type NativeDirectCommandSession = {
20
- dispatch: (envelope: NativeDirectCommandEnvelope) => Promise<CommandSettledDetail>;
20
+ dispatch: (envelope: NativeDirectCommandEnvelope) => Promise<CommandSettledSuccessDetail>;
21
21
  };
22
22
  export declare function createNativeDirectCommandSession(input: {
23
23
  coreSession: NativeCoreCommandSession;
@@ -30,9 +30,6 @@ export function createNativeDirectCommandSession(input) {
30
30
  return {
31
31
  dispatch: async (envelope) => {
32
32
  const settlement = await dispatchToCore(envelope, envelope.command);
33
- if (!settlement.ok) {
34
- return settlement;
35
- }
36
33
  switch (envelope.command.kind) {
37
34
  case "open":
38
35
  case "prerender":
@@ -8,19 +8,15 @@ type OpenCommand = Extract<PublicCommandPayload, {
8
8
  type PrerenderCommand = Extract<PublicCommandPayload, {
9
9
  kind: "prerender";
10
10
  }>;
11
- type NativeProviderClientCommand = Exclude<Extract<PublicCommandPayload, {
12
- kind: "configure" | "identify" | "track" | "open" | "prefetch" | "prerender" | "close" | "reset" | "updateHostContext" | "emitHostSignal";
13
- }>, OpenCommand> | (Omit<OpenCommand, "container"> & {
14
- container?: never;
15
- });
11
+ type NativeProviderClientCommand = Extract<PublicCommandPayload, {
12
+ kind: "configure" | "identify" | "track" | "close" | "reset" | "updateHostContext" | "emitHostSignal";
13
+ }>;
16
14
  type IdentifyOptions = {
17
15
  externalIds?: AppEventExternalId[];
18
16
  };
19
17
  type TrackOptions = {
20
18
  externalIds?: AppEventExternalId[];
21
19
  };
22
- type OpenOptions = Pick<OpenCommand, "hideCloseButton">;
23
- type PrerenderOptions = Pick<PrerenderCommand, "hideCloseButton">;
24
20
  type OpenFlowOptions = Pick<OpenCommand, "hideCloseButton" | "metadata">;
25
21
  type PrerenderFlowOptions = Pick<PrerenderCommand, "hideCloseButton">;
26
22
  type HostContext = Extract<PublicCommandPayload, {
@@ -45,11 +41,8 @@ export interface NativeProviderClient<TResult> {
45
41
  (traits: IdentifyTraits, options?: IdentifyOptions): Promise<TResult>;
46
42
  };
47
43
  track: (eventName: string, properties?: TrackProperties, options?: TrackOptions) => Promise<TResult>;
48
- open: (flowId: string, options?: OpenOptions, commandOptions?: NativeProviderCommandOptions) => Promise<TResult>;
49
- prefetch: (flowId: string, options?: NativeProviderCommandOptions) => Promise<TResult>;
50
- prerender: (flowId: string, options?: PrerenderOptions, commandOptions?: NativeProviderCommandOptions) => Promise<TResult>;
51
44
  flow: (flowId: string) => ReactNativeFlowRun;
52
- close: (flowHandleId?: string, options?: NativeProviderCommandOptions) => Promise<TResult>;
45
+ close: () => Promise<TResult>;
53
46
  reset: (options?: NativeProviderCommandOptions) => Promise<TResult>;
54
47
  updateHostContext: (context: HostContext, options?: NativeProviderCommandOptions) => Promise<TResult>;
55
48
  emitHostSignal: (name: string, data?: unknown, options?: NativeProviderCommandOptions) => Promise<TResult>;
@@ -49,26 +49,8 @@ export function createNativeProviderClient({ dispatchCommand, flow, instanceId,
49
49
  ? {}
50
50
  : { context: { externalIds: options.externalIds } })));
51
51
  },
52
- open: (flowId, options, commandOptions) => dispatchCommand({
53
- kind: "open",
54
- flowId: parseRequiredString("flowId", flowId),
55
- hideCloseButton: options === null || options === void 0 ? void 0 : options.hideCloseButton,
56
- }, commandOptions),
57
- prefetch: (flowId, options) => dispatchCommand({
58
- kind: "prefetch",
59
- flowId: parseRequiredString("flowId", flowId),
60
- }, options),
61
- prerender: (flowId, options, commandOptions) => dispatchCommand({
62
- kind: "prerender",
63
- flowId: parseRequiredString("flowId", flowId),
64
- hideCloseButton: options === null || options === void 0 ? void 0 : options.hideCloseButton,
65
- }, commandOptions),
66
52
  flow,
67
- close: (flowHandleId, options) => dispatchCommand(Object.assign({ kind: "close" }, (flowHandleId === undefined
68
- ? {}
69
- : {
70
- flowHandleId: parseRequiredString("flowHandleId", flowHandleId),
71
- })), options),
53
+ close: () => dispatchCommand({ kind: "close" }),
72
54
  reset: (options) => dispatchCommand({ kind: "reset" }, options),
73
55
  updateHostContext: (context, options) => dispatchCommand({ kind: "updateHostContext", context }, options),
74
56
  emitHostSignal: (name, data, options) => dispatchCommand(Object.assign({ kind: "emitHostSignal", name: parseRequiredString("name", name) }, (data === undefined ? {} : { data })), options),
package/dist/version.js CHANGED
@@ -3,4 +3,4 @@ const reactNativeSdkVersion = typeof __GX_REACT_NATIVE_SDK_VERSION__ === "string
3
3
  : "";
4
4
  // Build scripts patch this fallback to the package version for published artifacts.
5
5
  // Source-linked workspace usage keeps the local fallback.
6
- export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "3.0.95";
6
+ export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "3.0.97";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getuserfeedback/react-native",
3
- "version": "3.0.95",
3
+ "version": "3.0.97",
4
4
  "description": "getuserfeedback React Native SDK",
5
5
  "keywords": [
6
6
  "getuserfeedback",
@@ -44,8 +44,8 @@
44
44
  "lint": "biome check ."
45
45
  },
46
46
  "dependencies": {
47
- "@getuserfeedback/protocol": "^3.23.0",
48
- "@getuserfeedback/sdk": "^0.12.9",
47
+ "@getuserfeedback/protocol": "^3.24.0",
48
+ "@getuserfeedback/sdk": "^0.12.10",
49
49
  "robot3": "^1.2.0"
50
50
  },
51
51
  "peerDependencies": {