@webority/mobile-support 0.19.1 → 0.88.1
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/lib/typescript/commonjs/SupportProvider.d.ts +5 -5
- package/lib/typescript/commonjs/client.d.ts +3 -3
- package/lib/typescript/commonjs/components/Attachments.d.ts +2 -2
- package/lib/typescript/commonjs/components/NewSupportTicket.d.ts +2 -2
- package/lib/typescript/commonjs/components/PhotoTray.d.ts +2 -2
- package/lib/typescript/commonjs/components/SupportContact.d.ts +1 -1
- package/lib/typescript/commonjs/components/SupportTicketDetail.d.ts +1 -1
- package/lib/typescript/commonjs/components/SupportTicketList.d.ts +3 -3
- package/lib/typescript/commonjs/files.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +14 -14
- package/lib/typescript/commonjs/photos.d.ts +2 -2
- package/lib/typescript/commonjs/report/ReportIssueButton.d.ts +5 -5
- package/lib/typescript/commonjs/report/captureAndReport.d.ts +1 -1
- package/lib/typescript/commonjs/report/index.d.ts +4 -4
- package/lib/typescript/commonjs/share/index.d.ts +1 -1
- package/lib/typescript/commonjs/types.d.ts +6 -6
- package/lib/typescript/commonjs/validation.d.ts +2 -2
- package/lib/typescript/module/SupportProvider.d.ts +5 -5
- package/lib/typescript/module/client.d.ts +3 -3
- package/lib/typescript/module/components/Attachments.d.ts +2 -2
- package/lib/typescript/module/components/NewSupportTicket.d.ts +2 -2
- package/lib/typescript/module/components/PhotoTray.d.ts +2 -2
- package/lib/typescript/module/components/SupportContact.d.ts +1 -1
- package/lib/typescript/module/components/SupportTicketDetail.d.ts +1 -1
- package/lib/typescript/module/components/SupportTicketList.d.ts +3 -3
- package/lib/typescript/module/files.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +14 -14
- package/lib/typescript/module/photos.d.ts +2 -2
- package/lib/typescript/module/report/ReportIssueButton.d.ts +5 -5
- package/lib/typescript/module/report/captureAndReport.d.ts +1 -1
- package/lib/typescript/module/report/index.d.ts +4 -4
- package/lib/typescript/module/share/index.d.ts +1 -1
- package/lib/typescript/module/types.d.ts +6 -6
- package/lib/typescript/module/validation.d.ts +2 -2
- package/package.json +22 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ZoneOption } from
|
|
2
|
-
import type React from
|
|
3
|
-
import { type SupportApiError, type SupportClient } from
|
|
4
|
-
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketStatus, SupportTicketSummary } from
|
|
1
|
+
import type { ZoneOption } from "@webority/mobile-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { type SupportApiError, type SupportClient } from "./client";
|
|
4
|
+
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketStatus, SupportTicketSummary } from "./types";
|
|
5
5
|
/** A downloaded attachment, ready for the OS to open. */
|
|
6
6
|
export interface SupportFileToOpen {
|
|
7
7
|
/** A `file://` URI in the app's cache. */
|
|
@@ -11,7 +11,7 @@ export interface SupportFileToOpen {
|
|
|
11
11
|
}
|
|
12
12
|
/** Hands a downloaded file to the OS. `shareSupportFile` from the `/share` entry is one. */
|
|
13
13
|
export type SupportFileOpener = (file: SupportFileToOpen) => Promise<void>;
|
|
14
|
-
type AttachmentOpener = (attachment: Pick<SupportAttachmentView,
|
|
14
|
+
type AttachmentOpener = (attachment: Pick<SupportAttachmentView, "id" | "fileName" | "contentType">) => Promise<void>;
|
|
15
15
|
export interface SupportProviderProps {
|
|
16
16
|
client: SupportClient;
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportPage, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketQuery, SupportTicketSummary } from
|
|
1
|
+
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportPage, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketQuery, SupportTicketSummary } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* The slice of an HTTP client the support client needs. The app's signed-in
|
|
4
4
|
* axios instance (mobile-core's `userClient`, or its own) satisfies it as is, so
|
|
@@ -9,7 +9,7 @@ import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo,
|
|
|
9
9
|
export interface SupportHttpRequestConfig {
|
|
10
10
|
headers?: Record<string, string>;
|
|
11
11
|
timeout?: number;
|
|
12
|
-
responseType?:
|
|
12
|
+
responseType?: "arraybuffer" | "json";
|
|
13
13
|
}
|
|
14
14
|
export interface SupportHttpClient {
|
|
15
15
|
get<T = unknown>(url: string, config?: SupportHttpRequestConfig): Promise<{
|
|
@@ -50,7 +50,7 @@ export interface SupportClient {
|
|
|
50
50
|
* An attachment's bytes as a `data:` URI an `<Image>` can show. Fetched through
|
|
51
51
|
* the same authenticated client as every other call.
|
|
52
52
|
*/
|
|
53
|
-
getAttachmentDataUri(attachment: Pick<SupportAttachmentView,
|
|
53
|
+
getAttachmentDataUri(attachment: Pick<SupportAttachmentView, "id" | "contentType">): Promise<string>;
|
|
54
54
|
/**
|
|
55
55
|
* The person's yes to a support action an assistant prepared (raise a ticket, reply on
|
|
56
56
|
* one, reopen one). Only this call completes it. Resolves to the ticket it acted on; an
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type React from
|
|
2
|
-
import type { SupportAttachmentView } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { SupportAttachmentView } from "../types";
|
|
3
3
|
/** A message's files: images as tappable thumbnails, anything else as a file row. */
|
|
4
4
|
export declare const AttachmentList: React.FC<{
|
|
5
5
|
attachments: SupportAttachmentView[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type React from
|
|
2
|
-
import type { SupportTicketDetail, SupportTicketDraft } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { SupportTicketDetail, SupportTicketDraft } from "../types";
|
|
3
3
|
export interface NewSupportTicketProps {
|
|
4
4
|
/** Called with the created ticket; navigate to its detail from here. */
|
|
5
5
|
onCreated: (ticket: SupportTicketDetail) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type React from
|
|
2
|
-
import type { SupportFilePart } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { SupportFilePart } from "../types";
|
|
3
3
|
export interface PhotoTrayProps {
|
|
4
4
|
photos: SupportFilePart[];
|
|
5
5
|
onChange: (photos: SupportFilePart[]) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type StatusBadgeTone } from
|
|
2
|
-
import type React from
|
|
3
|
-
import type { SupportTicketCounts, SupportTicketStatus, SupportTicketSummary } from
|
|
1
|
+
import { type StatusBadgeTone } from "@webority/mobile-ui";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { SupportTicketCounts, SupportTicketStatus, SupportTicketSummary } from "../types";
|
|
4
4
|
export declare const STATUS_TONES: Record<SupportTicketStatus, StatusBadgeTone>;
|
|
5
5
|
declare const ALL = "all";
|
|
6
6
|
export interface StatusFilterOption {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SupportAttachmentView } from
|
|
1
|
+
import type { SupportAttachmentView } from "./types";
|
|
2
2
|
/** A server-supplied name reduced to one path segment, so it cannot leave the cache folder. */
|
|
3
3
|
export declare const safeFileName: (name: string) => string;
|
|
4
4
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export type { SupportClient, SupportHttpClient, SupportHttpRequestConfig } from
|
|
2
|
-
export { createSupportClient, SupportApiError, toSupportApiError } from
|
|
3
|
-
export type { NewSupportTicketProps } from
|
|
4
|
-
export { NewSupportTicket } from
|
|
5
|
-
export type { SupportContactProps } from
|
|
6
|
-
export { SupportContact } from
|
|
7
|
-
export type { SupportTicketDetailProps } from
|
|
8
|
-
export { SupportTicketDetail } from
|
|
9
|
-
export type { SupportTicketListProps } from
|
|
10
|
-
export { SupportTicketList } from
|
|
11
|
-
export { describeDevice } from
|
|
12
|
-
export type { SupportConfigState, SupportFileOpener, SupportFileToOpen, SupportProviderProps, SupportTicketState, SupportTicketsOptions, SupportTicketsState } from
|
|
13
|
-
export { SupportProvider, useCreateSupportTicket, useSupportClient, useSupportConfig, useSupportTicket, useSupportTickets } from
|
|
14
|
-
export type { NewSupportTicketInput, SupportAttachmentKind, SupportAttachmentView, SupportContactInfo, SupportFilePart, SupportMessageAuthorKind, SupportMessageView, SupportPage, SupportRatingInput, SupportReplyInput, SupportSatisfaction, SupportTicketCounts, SupportTicketDetail as SupportTicketDetailView, SupportTicketDraft, SupportTicketPriority, SupportTicketQuery, SupportTicketStatus, SupportTicketSummary } from
|
|
1
|
+
export type { SupportClient, SupportHttpClient, SupportHttpRequestConfig } from "./client";
|
|
2
|
+
export { createSupportClient, SupportApiError, toSupportApiError } from "./client";
|
|
3
|
+
export type { NewSupportTicketProps } from "./components/NewSupportTicket";
|
|
4
|
+
export { NewSupportTicket } from "./components/NewSupportTicket";
|
|
5
|
+
export type { SupportContactProps } from "./components/SupportContact";
|
|
6
|
+
export { SupportContact } from "./components/SupportContact";
|
|
7
|
+
export type { SupportTicketDetailProps } from "./components/SupportTicketDetail";
|
|
8
|
+
export { SupportTicketDetail } from "./components/SupportTicketDetail";
|
|
9
|
+
export type { SupportTicketListProps } from "./components/SupportTicketList";
|
|
10
|
+
export { SupportTicketList } from "./components/SupportTicketList";
|
|
11
|
+
export { describeDevice } from "./device";
|
|
12
|
+
export type { SupportConfigState, SupportFileOpener, SupportFileToOpen, SupportProviderProps, SupportTicketState, SupportTicketsOptions, SupportTicketsState, } from "./SupportProvider";
|
|
13
|
+
export { SupportProvider, useCreateSupportTicket, useSupportClient, useSupportConfig, useSupportTicket, useSupportTickets, } from "./SupportProvider";
|
|
14
|
+
export type { NewSupportTicketInput, SupportAttachmentKind, SupportAttachmentView, SupportContactInfo, SupportFilePart, SupportMessageAuthorKind, SupportMessageView, SupportPage, SupportRatingInput, SupportReplyInput, SupportSatisfaction, SupportTicketCounts, SupportTicketDetail as SupportTicketDetailView, SupportTicketDraft, SupportTicketPriority, SupportTicketQuery, SupportTicketStatus, SupportTicketSummary, } from "./types";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SupportFilePart } from
|
|
2
|
-
export type PhotoSource =
|
|
1
|
+
import type { SupportFilePart } from "./types";
|
|
2
|
+
export type PhotoSource = "library" | "camera";
|
|
3
3
|
export declare class PhotoPermissionError extends Error {
|
|
4
4
|
readonly source: PhotoSource;
|
|
5
5
|
constructor(source: PhotoSource);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ButtonProps } from
|
|
2
|
-
import type React from
|
|
3
|
-
import type { SupportTicketDraft } from
|
|
4
|
-
import { type CaptureAndReportOptions } from
|
|
5
|
-
export interface ReportIssueButtonProps extends CaptureAndReportOptions, Omit<ButtonProps,
|
|
1
|
+
import { type ButtonProps } from "@webority/mobile-ui";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { SupportTicketDraft } from "../types";
|
|
4
|
+
import { type CaptureAndReportOptions } from "./captureAndReport";
|
|
5
|
+
export interface ReportIssueButtonProps extends CaptureAndReportOptions, Omit<ButtonProps, "onPress" | "title" | "children" | "loading"> {
|
|
6
6
|
/** Open the new ticket screen with this draft, for example `navigation.navigate('NewTicket', { draft })`. */
|
|
7
7
|
onReport: (draft: SupportTicketDraft) => void;
|
|
8
8
|
/**
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* keeping it off the main barrel lets an app skip the package when it does not
|
|
5
5
|
* use this button.
|
|
6
6
|
*/
|
|
7
|
-
export type { CaptureAndReportOptions } from
|
|
8
|
-
export { captureAndReport } from
|
|
9
|
-
export type { ReportIssueButtonProps } from
|
|
10
|
-
export { ReportIssueButton } from
|
|
7
|
+
export type { CaptureAndReportOptions } from "./captureAndReport";
|
|
8
|
+
export { captureAndReport } from "./captureAndReport";
|
|
9
|
+
export type { ReportIssueButtonProps } from "./ReportIssueButton";
|
|
10
|
+
export { ReportIssueButton } from "./ReportIssueButton";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* of the backend's view records and enums travel as their member names, so these
|
|
4
4
|
* mirror `Webority.Support/SupportViews.cs` and `SupportEnums.cs` exactly.
|
|
5
5
|
*/
|
|
6
|
-
export type SupportTicketStatus =
|
|
7
|
-
export type SupportTicketPriority =
|
|
8
|
-
export type SupportMessageAuthorKind =
|
|
9
|
-
export type SupportAttachmentKind =
|
|
10
|
-
export type SupportSatisfaction =
|
|
6
|
+
export type SupportTicketStatus = "Open" | "InProgress" | "WaitingOnCustomer" | "Resolved" | "Closed";
|
|
7
|
+
export type SupportTicketPriority = "Low" | "Normal" | "High" | "Urgent";
|
|
8
|
+
export type SupportMessageAuthorKind = "Customer" | "Agent" | "System";
|
|
9
|
+
export type SupportAttachmentKind = "Screenshot" | "File";
|
|
10
|
+
export type SupportSatisfaction = "Satisfied" | "Unsatisfied";
|
|
11
11
|
export interface SupportContactInfo {
|
|
12
12
|
productName: string;
|
|
13
13
|
supportEmail: string;
|
|
@@ -34,7 +34,7 @@ export interface SupportTicketSummary {
|
|
|
34
34
|
createdDateTimeUtc: string;
|
|
35
35
|
updatedDateTimeUtc: string;
|
|
36
36
|
}
|
|
37
|
-
/** The
|
|
37
|
+
/** The standard pagination shape `GET {base}/tickets` returns. */
|
|
38
38
|
export interface SupportPage<T> {
|
|
39
39
|
items: T[];
|
|
40
40
|
page: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SupportContactInfo, SupportFilePart } from
|
|
1
|
+
import type { SupportContactInfo, SupportFilePart } from "./types";
|
|
2
2
|
export declare const validateCategory: (category: string, config: SupportContactInfo) => string | undefined;
|
|
3
3
|
/** Limits come from GET /settings, so the product's own values are the only copy. */
|
|
4
|
-
type Limits = Pick<SupportContactInfo,
|
|
4
|
+
type Limits = Pick<SupportContactInfo, "subjectMaxLength" | "bodyMaxLength">;
|
|
5
5
|
export declare const validateSubject: (subject: string, limits: Limits) => string | undefined;
|
|
6
6
|
export declare const validateBody: (body: string, limits: Limits) => string | undefined;
|
|
7
7
|
/** Checks every file on one message against the product's limits. The first problem wins. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ZoneOption } from
|
|
2
|
-
import type React from
|
|
3
|
-
import { type SupportApiError, type SupportClient } from
|
|
4
|
-
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketStatus, SupportTicketSummary } from
|
|
1
|
+
import type { ZoneOption } from "@webority/mobile-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { type SupportApiError, type SupportClient } from "./client.js";
|
|
4
|
+
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketStatus, SupportTicketSummary } from "./types.js";
|
|
5
5
|
/** A downloaded attachment, ready for the OS to open. */
|
|
6
6
|
export interface SupportFileToOpen {
|
|
7
7
|
/** A `file://` URI in the app's cache. */
|
|
@@ -11,7 +11,7 @@ export interface SupportFileToOpen {
|
|
|
11
11
|
}
|
|
12
12
|
/** Hands a downloaded file to the OS. `shareSupportFile` from the `/share` entry is one. */
|
|
13
13
|
export type SupportFileOpener = (file: SupportFileToOpen) => Promise<void>;
|
|
14
|
-
type AttachmentOpener = (attachment: Pick<SupportAttachmentView,
|
|
14
|
+
type AttachmentOpener = (attachment: Pick<SupportAttachmentView, "id" | "fileName" | "contentType">) => Promise<void>;
|
|
15
15
|
export interface SupportProviderProps {
|
|
16
16
|
client: SupportClient;
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportPage, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketQuery, SupportTicketSummary } from
|
|
1
|
+
import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo, SupportPage, SupportRatingInput, SupportReplyInput, SupportTicketCounts, SupportTicketDetail, SupportTicketQuery, SupportTicketSummary } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* The slice of an HTTP client the support client needs. The app's signed-in
|
|
4
4
|
* axios instance (mobile-core's `userClient`, or its own) satisfies it as is, so
|
|
@@ -9,7 +9,7 @@ import type { NewSupportTicketInput, SupportAttachmentView, SupportContactInfo,
|
|
|
9
9
|
export interface SupportHttpRequestConfig {
|
|
10
10
|
headers?: Record<string, string>;
|
|
11
11
|
timeout?: number;
|
|
12
|
-
responseType?:
|
|
12
|
+
responseType?: "arraybuffer" | "json";
|
|
13
13
|
}
|
|
14
14
|
export interface SupportHttpClient {
|
|
15
15
|
get<T = unknown>(url: string, config?: SupportHttpRequestConfig): Promise<{
|
|
@@ -50,7 +50,7 @@ export interface SupportClient {
|
|
|
50
50
|
* An attachment's bytes as a `data:` URI an `<Image>` can show. Fetched through
|
|
51
51
|
* the same authenticated client as every other call.
|
|
52
52
|
*/
|
|
53
|
-
getAttachmentDataUri(attachment: Pick<SupportAttachmentView,
|
|
53
|
+
getAttachmentDataUri(attachment: Pick<SupportAttachmentView, "id" | "contentType">): Promise<string>;
|
|
54
54
|
/**
|
|
55
55
|
* The person's yes to a support action an assistant prepared (raise a ticket, reply on
|
|
56
56
|
* one, reopen one). Only this call completes it. Resolves to the ticket it acted on; an
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type React from
|
|
2
|
-
import type { SupportAttachmentView } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { SupportAttachmentView } from "../types.js";
|
|
3
3
|
/** A message's files: images as tappable thumbnails, anything else as a file row. */
|
|
4
4
|
export declare const AttachmentList: React.FC<{
|
|
5
5
|
attachments: SupportAttachmentView[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type React from
|
|
2
|
-
import type { SupportTicketDetail, SupportTicketDraft } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { SupportTicketDetail, SupportTicketDraft } from "../types.js";
|
|
3
3
|
export interface NewSupportTicketProps {
|
|
4
4
|
/** Called with the created ticket; navigate to its detail from here. */
|
|
5
5
|
onCreated: (ticket: SupportTicketDetail) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type React from
|
|
2
|
-
import type { SupportFilePart } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { SupportFilePart } from "../types.js";
|
|
3
3
|
export interface PhotoTrayProps {
|
|
4
4
|
photos: SupportFilePart[];
|
|
5
5
|
onChange: (photos: SupportFilePart[]) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type StatusBadgeTone } from
|
|
2
|
-
import type React from
|
|
3
|
-
import type { SupportTicketCounts, SupportTicketStatus, SupportTicketSummary } from
|
|
1
|
+
import { type StatusBadgeTone } from "@webority/mobile-ui";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { SupportTicketCounts, SupportTicketStatus, SupportTicketSummary } from "../types.js";
|
|
4
4
|
export declare const STATUS_TONES: Record<SupportTicketStatus, StatusBadgeTone>;
|
|
5
5
|
declare const ALL = "all";
|
|
6
6
|
export interface StatusFilterOption {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SupportAttachmentView } from
|
|
1
|
+
import type { SupportAttachmentView } from "./types.js";
|
|
2
2
|
/** A server-supplied name reduced to one path segment, so it cannot leave the cache folder. */
|
|
3
3
|
export declare const safeFileName: (name: string) => string;
|
|
4
4
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export type { SupportClient, SupportHttpClient, SupportHttpRequestConfig } from
|
|
2
|
-
export { createSupportClient, SupportApiError, toSupportApiError } from
|
|
3
|
-
export type { NewSupportTicketProps } from
|
|
4
|
-
export { NewSupportTicket } from
|
|
5
|
-
export type { SupportContactProps } from
|
|
6
|
-
export { SupportContact } from
|
|
7
|
-
export type { SupportTicketDetailProps } from
|
|
8
|
-
export { SupportTicketDetail } from
|
|
9
|
-
export type { SupportTicketListProps } from
|
|
10
|
-
export { SupportTicketList } from
|
|
11
|
-
export { describeDevice } from
|
|
12
|
-
export type { SupportConfigState, SupportFileOpener, SupportFileToOpen, SupportProviderProps, SupportTicketState, SupportTicketsOptions, SupportTicketsState } from
|
|
13
|
-
export { SupportProvider, useCreateSupportTicket, useSupportClient, useSupportConfig, useSupportTicket, useSupportTickets } from
|
|
14
|
-
export type { NewSupportTicketInput, SupportAttachmentKind, SupportAttachmentView, SupportContactInfo, SupportFilePart, SupportMessageAuthorKind, SupportMessageView, SupportPage, SupportRatingInput, SupportReplyInput, SupportSatisfaction, SupportTicketCounts, SupportTicketDetail as SupportTicketDetailView, SupportTicketDraft, SupportTicketPriority, SupportTicketQuery, SupportTicketStatus, SupportTicketSummary } from
|
|
1
|
+
export type { SupportClient, SupportHttpClient, SupportHttpRequestConfig } from "./client.js";
|
|
2
|
+
export { createSupportClient, SupportApiError, toSupportApiError } from "./client.js";
|
|
3
|
+
export type { NewSupportTicketProps } from "./components/NewSupportTicket.js";
|
|
4
|
+
export { NewSupportTicket } from "./components/NewSupportTicket.js";
|
|
5
|
+
export type { SupportContactProps } from "./components/SupportContact.js";
|
|
6
|
+
export { SupportContact } from "./components/SupportContact.js";
|
|
7
|
+
export type { SupportTicketDetailProps } from "./components/SupportTicketDetail.js";
|
|
8
|
+
export { SupportTicketDetail } from "./components/SupportTicketDetail.js";
|
|
9
|
+
export type { SupportTicketListProps } from "./components/SupportTicketList.js";
|
|
10
|
+
export { SupportTicketList } from "./components/SupportTicketList.js";
|
|
11
|
+
export { describeDevice } from "./device.js";
|
|
12
|
+
export type { SupportConfigState, SupportFileOpener, SupportFileToOpen, SupportProviderProps, SupportTicketState, SupportTicketsOptions, SupportTicketsState, } from "./SupportProvider.js";
|
|
13
|
+
export { SupportProvider, useCreateSupportTicket, useSupportClient, useSupportConfig, useSupportTicket, useSupportTickets, } from "./SupportProvider.js";
|
|
14
|
+
export type { NewSupportTicketInput, SupportAttachmentKind, SupportAttachmentView, SupportContactInfo, SupportFilePart, SupportMessageAuthorKind, SupportMessageView, SupportPage, SupportRatingInput, SupportReplyInput, SupportSatisfaction, SupportTicketCounts, SupportTicketDetail as SupportTicketDetailView, SupportTicketDraft, SupportTicketPriority, SupportTicketQuery, SupportTicketStatus, SupportTicketSummary, } from "./types.js";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SupportFilePart } from
|
|
2
|
-
export type PhotoSource =
|
|
1
|
+
import type { SupportFilePart } from "./types.js";
|
|
2
|
+
export type PhotoSource = "library" | "camera";
|
|
3
3
|
export declare class PhotoPermissionError extends Error {
|
|
4
4
|
readonly source: PhotoSource;
|
|
5
5
|
constructor(source: PhotoSource);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ButtonProps } from
|
|
2
|
-
import type React from
|
|
3
|
-
import type { SupportTicketDraft } from
|
|
4
|
-
import { type CaptureAndReportOptions } from
|
|
5
|
-
export interface ReportIssueButtonProps extends CaptureAndReportOptions, Omit<ButtonProps,
|
|
1
|
+
import { type ButtonProps } from "@webority/mobile-ui";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { SupportTicketDraft } from "../types.js";
|
|
4
|
+
import { type CaptureAndReportOptions } from "./captureAndReport.js";
|
|
5
|
+
export interface ReportIssueButtonProps extends CaptureAndReportOptions, Omit<ButtonProps, "onPress" | "title" | "children" | "loading"> {
|
|
6
6
|
/** Open the new ticket screen with this draft, for example `navigation.navigate('NewTicket', { draft })`. */
|
|
7
7
|
onReport: (draft: SupportTicketDraft) => void;
|
|
8
8
|
/**
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* keeping it off the main barrel lets an app skip the package when it does not
|
|
5
5
|
* use this button.
|
|
6
6
|
*/
|
|
7
|
-
export type { CaptureAndReportOptions } from
|
|
8
|
-
export { captureAndReport } from
|
|
9
|
-
export type { ReportIssueButtonProps } from
|
|
10
|
-
export { ReportIssueButton } from
|
|
7
|
+
export type { CaptureAndReportOptions } from "./captureAndReport.js";
|
|
8
|
+
export { captureAndReport } from "./captureAndReport.js";
|
|
9
|
+
export type { ReportIssueButtonProps } from "./ReportIssueButton.js";
|
|
10
|
+
export { ReportIssueButton } from "./ReportIssueButton.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* of the backend's view records and enums travel as their member names, so these
|
|
4
4
|
* mirror `Webority.Support/SupportViews.cs` and `SupportEnums.cs` exactly.
|
|
5
5
|
*/
|
|
6
|
-
export type SupportTicketStatus =
|
|
7
|
-
export type SupportTicketPriority =
|
|
8
|
-
export type SupportMessageAuthorKind =
|
|
9
|
-
export type SupportAttachmentKind =
|
|
10
|
-
export type SupportSatisfaction =
|
|
6
|
+
export type SupportTicketStatus = "Open" | "InProgress" | "WaitingOnCustomer" | "Resolved" | "Closed";
|
|
7
|
+
export type SupportTicketPriority = "Low" | "Normal" | "High" | "Urgent";
|
|
8
|
+
export type SupportMessageAuthorKind = "Customer" | "Agent" | "System";
|
|
9
|
+
export type SupportAttachmentKind = "Screenshot" | "File";
|
|
10
|
+
export type SupportSatisfaction = "Satisfied" | "Unsatisfied";
|
|
11
11
|
export interface SupportContactInfo {
|
|
12
12
|
productName: string;
|
|
13
13
|
supportEmail: string;
|
|
@@ -34,7 +34,7 @@ export interface SupportTicketSummary {
|
|
|
34
34
|
createdDateTimeUtc: string;
|
|
35
35
|
updatedDateTimeUtc: string;
|
|
36
36
|
}
|
|
37
|
-
/** The
|
|
37
|
+
/** The standard pagination shape `GET {base}/tickets` returns. */
|
|
38
38
|
export interface SupportPage<T> {
|
|
39
39
|
items: T[];
|
|
40
40
|
page: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SupportContactInfo, SupportFilePart } from
|
|
1
|
+
import type { SupportContactInfo, SupportFilePart } from "./types.js";
|
|
2
2
|
export declare const validateCategory: (category: string, config: SupportContactInfo) => string | undefined;
|
|
3
3
|
/** Limits come from GET /settings, so the product's own values are the only copy. */
|
|
4
|
-
type Limits = Pick<SupportContactInfo,
|
|
4
|
+
type Limits = Pick<SupportContactInfo, "subjectMaxLength" | "bodyMaxLength">;
|
|
5
5
|
export declare const validateSubject: (subject: string, limits: Limits) => string | undefined;
|
|
6
6
|
export declare const validateBody: (body: string, limits: Limits) => string | undefined;
|
|
7
7
|
/** Checks every file on one message against the product's limits. The first problem wins. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-support",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.1",
|
|
4
4
|
"description": "Customer support tickets for Webority React Native apps: the support API client, hooks, ticket screens, contact card and a report-an-issue button that attaches a screenshot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"react-native": ">=0.81.0",
|
|
73
73
|
"react-native-gesture-handler": "^2.21.0 || ^3.0.0",
|
|
74
74
|
"react-native-view-shot": ">=4.0.0",
|
|
75
|
-
"@webority/mobile-core": "0.
|
|
76
|
-
"@webority/mobile-ui": "0.
|
|
75
|
+
"@webority/mobile-core": "0.88.1",
|
|
76
|
+
"@webority/mobile-ui": "0.88.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependenciesMeta": {
|
|
79
79
|
"expo-image-manipulator": {
|
|
@@ -120,11 +120,27 @@
|
|
|
120
120
|
]
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
|
-
"@
|
|
124
|
-
"@
|
|
123
|
+
"@react-native/metro-config": "0.86.3",
|
|
124
|
+
"@testing-library/react-native": "12.9.0",
|
|
125
|
+
"@types/react": "19.2.18",
|
|
126
|
+
"expo": "57.0.17",
|
|
127
|
+
"expo-clipboard": "57.0.2",
|
|
128
|
+
"expo-file-system": "57.0.6",
|
|
129
|
+
"expo-image-manipulator": "57.0.14",
|
|
130
|
+
"jest": "29.7.0",
|
|
131
|
+
"react": "19.2.8",
|
|
132
|
+
"react-native": "0.86.3",
|
|
133
|
+
"react-native-builder-bob": "0.43.0",
|
|
134
|
+
"react-native-gesture-handler": "3.2.1",
|
|
135
|
+
"react-test-renderer": "19.2.8",
|
|
136
|
+
"rimraf": "6.1.3",
|
|
137
|
+
"typescript": "5.9.3",
|
|
138
|
+
"@webority/mobile-dev": "0.0.0",
|
|
139
|
+
"@webority/mobile-core": "0.88.1",
|
|
140
|
+
"@webority/mobile-ui": "0.88.1"
|
|
125
141
|
},
|
|
126
142
|
"scripts": {
|
|
127
|
-
"build": "bob build && node
|
|
143
|
+
"build": "bob build && node ../mobile-dev/scripts/minify-lib.mjs",
|
|
128
144
|
"clean": "rimraf lib",
|
|
129
145
|
"lint": "biome lint ./src",
|
|
130
146
|
"lint:fix": "biome lint --write ./src",
|