@livechat/developer-studio-api 3.4.10 → 3.4.11
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/dist/index.d.mts +204 -204
- package/dist/index.d.ts +204 -204
- package/dist/index.js +95 -95
- package/dist/index.mjs +95 -95
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ interface GitHubInstallation {
|
|
|
55
55
|
app_id: number;
|
|
56
56
|
app_slug: string;
|
|
57
57
|
repository_selection: string;
|
|
58
|
-
target_type:
|
|
58
|
+
target_type: 'User' | 'Organization';
|
|
59
59
|
account: {
|
|
60
60
|
login: string;
|
|
61
61
|
};
|
|
@@ -140,8 +140,8 @@ interface GitHubRepositoryIssue {
|
|
|
140
140
|
number: number;
|
|
141
141
|
performed_via_github_app: object | null;
|
|
142
142
|
reactions: {
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
'+1': number;
|
|
144
|
+
'-1': number;
|
|
145
145
|
confused: number;
|
|
146
146
|
eyes: number;
|
|
147
147
|
heart: number;
|
|
@@ -321,7 +321,7 @@ type AppMonitoringEventsReportDto = Record<string, Record<string, Record<string,
|
|
|
321
321
|
interface AppMonitoringReportParams {
|
|
322
322
|
from: string;
|
|
323
323
|
to: string;
|
|
324
|
-
resolution:
|
|
324
|
+
resolution: 'hourly' | 'daily' | 'monthly';
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
type GetAppMonitoringCustomReportDataPayload = AppMonitoringReportParams;
|
|
@@ -364,7 +364,7 @@ interface TextPlatformDashboardPaymentDto {
|
|
|
364
364
|
interface TextPlatformDashboardReportItemDto {
|
|
365
365
|
usage: number;
|
|
366
366
|
amount: number;
|
|
367
|
-
service?:
|
|
367
|
+
service?: 'agent-api' | 'customer-api' | 'configuration-api' | 'lc-webhooks' | 'reports-api' | 'lang-id-api' | 'chat-api';
|
|
368
368
|
action?: string;
|
|
369
369
|
source?: string;
|
|
370
370
|
}
|
|
@@ -380,11 +380,11 @@ interface TextPlatformDashboardCreditsDto {
|
|
|
380
380
|
interface GetTextPlatformDashboardReportParams {
|
|
381
381
|
from: string;
|
|
382
382
|
to: string;
|
|
383
|
-
service?:
|
|
383
|
+
service?: 'agent-api' | 'customer-api' | 'configuration-api' | 'lc-webhooks' | 'reports-api' | 'lang-id-api' | 'chat-api';
|
|
384
384
|
action?: string;
|
|
385
385
|
source?: string;
|
|
386
|
-
time_distribution:
|
|
387
|
-
group_by?: (
|
|
386
|
+
time_distribution: 'hour' | 'day';
|
|
387
|
+
group_by?: ('source' | 'service' | 'action')[];
|
|
388
388
|
is_source_private?: boolean;
|
|
389
389
|
}
|
|
390
390
|
|
|
@@ -434,17 +434,17 @@ interface WorkflowDto {
|
|
|
434
434
|
definition: WorkflowDefinitionDto;
|
|
435
435
|
trigger: WorkflowTriggerDto;
|
|
436
436
|
}
|
|
437
|
-
type WorkflowTriggerType =
|
|
437
|
+
type WorkflowTriggerType = 'manual_only' | 'recurring' | 'one_time' | 'webhook';
|
|
438
438
|
type WorkflowTriggerDto = Record<string, never> | {
|
|
439
|
-
type?:
|
|
439
|
+
type?: 'manual_only';
|
|
440
440
|
} | {
|
|
441
|
-
type:
|
|
441
|
+
type: 'recurring';
|
|
442
442
|
schedule: string;
|
|
443
443
|
} | {
|
|
444
|
-
type:
|
|
444
|
+
type: 'one_time';
|
|
445
445
|
at: string;
|
|
446
446
|
} | {
|
|
447
|
-
type:
|
|
447
|
+
type: 'webhook';
|
|
448
448
|
webhook: {
|
|
449
449
|
source: IntegrationEventProviderName;
|
|
450
450
|
event: IntegrationEvent;
|
|
@@ -498,7 +498,7 @@ type WorkflowDefinitionTaskCore<TType extends (typeof WorkflowDefinitionTaskType
|
|
|
498
498
|
} & {
|
|
499
499
|
[key in TInputKey]: TInput;
|
|
500
500
|
};
|
|
501
|
-
type WorkflowDefinitionHttpTask = WorkflowDefinitionTaskCore<
|
|
501
|
+
type WorkflowDefinitionHttpTask = WorkflowDefinitionTaskCore<'HTTP', 'inputParameters', {
|
|
502
502
|
asyncComplete: boolean;
|
|
503
503
|
http_request: {
|
|
504
504
|
method: string;
|
|
@@ -508,24 +508,24 @@ type WorkflowDefinitionHttpTask = WorkflowDefinitionTaskCore<"HTTP", "inputParam
|
|
|
508
508
|
};
|
|
509
509
|
}>;
|
|
510
510
|
type WorkflowDefinitionForkJoinTask = WorkflowDefinitionTaskBase & {
|
|
511
|
-
type:
|
|
511
|
+
type: 'FORK_JOIN';
|
|
512
512
|
forkTasks: WorkflowDefinitionTask[][];
|
|
513
513
|
};
|
|
514
514
|
type WorkflowDefinitionJoinTask = WorkflowDefinitionTaskBase & {
|
|
515
|
-
type:
|
|
515
|
+
type: 'JOIN';
|
|
516
516
|
joinOn: string[];
|
|
517
517
|
};
|
|
518
518
|
type WorkflowDefinitionSwitchTask = WorkflowDefinitionTaskBase & {
|
|
519
|
-
type:
|
|
519
|
+
type: 'SWITCH';
|
|
520
520
|
inputParameters: {
|
|
521
521
|
switchCaseValue: string;
|
|
522
522
|
};
|
|
523
|
-
evaluatorType:
|
|
523
|
+
evaluatorType: 'value-param' | 'javascript';
|
|
524
524
|
expression?: string;
|
|
525
525
|
defaultCase?: WorkflowDefinitionTask[];
|
|
526
526
|
decisionCases: Record<string, WorkflowDefinitionTask[]>;
|
|
527
527
|
};
|
|
528
|
-
type WorkflowDefinitionTerminateTask = WorkflowDefinitionTaskCore<
|
|
528
|
+
type WorkflowDefinitionTerminateTask = WorkflowDefinitionTaskCore<'TERMINATE', 'inputParameters', {
|
|
529
529
|
terminationStatus: string;
|
|
530
530
|
terminationReason: string;
|
|
531
531
|
}>;
|
|
@@ -564,18 +564,18 @@ type Credential = {
|
|
|
564
564
|
description: string;
|
|
565
565
|
provider: string;
|
|
566
566
|
} & ({
|
|
567
|
-
type:
|
|
567
|
+
type: 'api_key';
|
|
568
568
|
data: {
|
|
569
569
|
api_key: string;
|
|
570
570
|
};
|
|
571
571
|
} | {
|
|
572
|
-
type:
|
|
572
|
+
type: 'basic_auth';
|
|
573
573
|
data: {
|
|
574
574
|
username: string;
|
|
575
575
|
password: string;
|
|
576
576
|
};
|
|
577
577
|
} | {
|
|
578
|
-
type:
|
|
578
|
+
type: 'oauth2';
|
|
579
579
|
data: {
|
|
580
580
|
redirect_url: string;
|
|
581
581
|
authorization_url: string;
|
|
@@ -586,7 +586,7 @@ type Credential = {
|
|
|
586
586
|
connected?: boolean;
|
|
587
587
|
};
|
|
588
588
|
} | {
|
|
589
|
-
type:
|
|
589
|
+
type: 'text_auth';
|
|
590
590
|
data: Record<string, never>;
|
|
591
591
|
});
|
|
592
592
|
type CredentialDto = Credential & {
|
|
@@ -594,7 +594,7 @@ type CredentialDto = Credential & {
|
|
|
594
594
|
updated_at: string;
|
|
595
595
|
};
|
|
596
596
|
type OAuthCredential<TProviderFields extends Record<string, string> = Record<string, string>, TOptional extends boolean = true> = Extract<Credential, {
|
|
597
|
-
type:
|
|
597
|
+
type: 'oauth2';
|
|
598
598
|
}> & {
|
|
599
599
|
data: TOptional extends true ? {
|
|
600
600
|
provider_fields?: TProviderFields;
|
|
@@ -634,10 +634,10 @@ type HubSpotOauthCredential = OAuthCredential<{
|
|
|
634
634
|
appId: string;
|
|
635
635
|
}, false>;
|
|
636
636
|
type OpenaiCredential = Extract<Credential, {
|
|
637
|
-
type:
|
|
637
|
+
type: 'api_key';
|
|
638
638
|
}>;
|
|
639
639
|
type TextAuthCredential = Extract<Credential, {
|
|
640
|
-
type:
|
|
640
|
+
type: 'text_auth';
|
|
641
641
|
}>;
|
|
642
642
|
type TextOAuthCredential = OAuthCredential<{
|
|
643
643
|
appId: string;
|
|
@@ -670,7 +670,7 @@ interface GenerateResponsePayload {
|
|
|
670
670
|
account_id: string;
|
|
671
671
|
organization: string;
|
|
672
672
|
token: string;
|
|
673
|
-
executor:
|
|
673
|
+
executor: 'single-chain';
|
|
674
674
|
messages: {
|
|
675
675
|
value: string;
|
|
676
676
|
}[];
|
|
@@ -680,17 +680,17 @@ interface GenerateResponseResponse {
|
|
|
680
680
|
response: string;
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
-
type ApiErrorName =
|
|
684
|
-
type ApiErrorSource =
|
|
685
|
-
type ApiErrorKind =
|
|
683
|
+
type ApiErrorName = 'adapter' | 'accounts' | 'livechat' | 'helpdesk' | 'dps' | 'github' | 'vercel' | 'netlify' | 'planetscale' | 'neon' | 'mailchimp' | 'shopify' | 'hubspot' | 'bigcommerce' | 'text';
|
|
684
|
+
type ApiErrorSource = 'accounts' | 'github' | 'vercel' | 'netlify' | 'planetscale' | 'neon' | 'mailchimp' | 'shopify' | 'hubspot' | 'bigcommerce' | 'text';
|
|
685
|
+
type ApiErrorKind = 'unauthorized' | 'error';
|
|
686
686
|
type ApiError<TData = unknown> = {
|
|
687
687
|
code: number;
|
|
688
688
|
message: string;
|
|
689
689
|
} & ({
|
|
690
|
-
kind:
|
|
690
|
+
kind: 'error';
|
|
691
691
|
data?: TData;
|
|
692
692
|
} | {
|
|
693
|
-
kind:
|
|
693
|
+
kind: 'unauthorized';
|
|
694
694
|
source: ApiErrorSource;
|
|
695
695
|
});
|
|
696
696
|
declare abstract class ApiErrorBase<TErrorData> extends Error {
|
|
@@ -699,7 +699,7 @@ declare abstract class ApiErrorBase<TErrorData> extends Error {
|
|
|
699
699
|
code: number;
|
|
700
700
|
readonly kind: ApiErrorKind;
|
|
701
701
|
abstract name: ApiErrorName;
|
|
702
|
-
[
|
|
702
|
+
['constructor']: new (...args: ConstructorParameters<typeof ApiErrorBase>) => this;
|
|
703
703
|
constructor(message: string, data: TErrorData, code: number);
|
|
704
704
|
withCustomMessage(message: string): this;
|
|
705
705
|
}
|
|
@@ -719,7 +719,7 @@ interface ApiClientAuthorization {
|
|
|
719
719
|
token?: string;
|
|
720
720
|
tokenType?: string;
|
|
721
721
|
}
|
|
722
|
-
declare abstract class ApiClient<TError extends ApiErrorBase<TErrorData>, TErrorData = TError[
|
|
722
|
+
declare abstract class ApiClient<TError extends ApiErrorBase<TErrorData>, TErrorData = TError['data']> {
|
|
723
723
|
private config;
|
|
724
724
|
private authorization?;
|
|
725
725
|
protected options?: RequestInit;
|
|
@@ -738,31 +738,31 @@ declare abstract class ApiClient<TError extends ApiErrorBase<TErrorData>, TError
|
|
|
738
738
|
get<TResponseData>(url: string, config?: {
|
|
739
739
|
authorization?: ApiClientAuthorization;
|
|
740
740
|
customErrorMessage?: string;
|
|
741
|
-
}, options?: Omit<RequestInit,
|
|
741
|
+
}, options?: Omit<RequestInit, 'method' | 'body'>): Promise<Response & {
|
|
742
742
|
data: TResponseData;
|
|
743
743
|
}>;
|
|
744
744
|
post<TResponseData, TBody = unknown>(url: string, body: TBody, customConfig?: {
|
|
745
745
|
authorization?: ApiClientAuthorization;
|
|
746
746
|
customErrorMessage?: string;
|
|
747
|
-
}, customOptions?: Omit<RequestInit,
|
|
747
|
+
}, customOptions?: Omit<RequestInit, 'method' | 'body'>): Promise<Response & {
|
|
748
748
|
data: TResponseData;
|
|
749
749
|
}>;
|
|
750
750
|
patch<TResponseData, TBody = unknown>(url: string, body: TBody, customConfig?: {
|
|
751
751
|
authorization?: ApiClientAuthorization;
|
|
752
752
|
customErrorMessage?: string;
|
|
753
|
-
}, customOptions?: Omit<RequestInit,
|
|
753
|
+
}, customOptions?: Omit<RequestInit, 'method' | 'body'>): Promise<Response & {
|
|
754
754
|
data: TResponseData;
|
|
755
755
|
}>;
|
|
756
756
|
put<TResponseData, TBody = unknown>(url: string, body: TBody, customConfig?: {
|
|
757
757
|
authorization?: ApiClientAuthorization;
|
|
758
758
|
customErrorMessage?: string;
|
|
759
|
-
}, customOptions?: Omit<RequestInit,
|
|
759
|
+
}, customOptions?: Omit<RequestInit, 'method' | 'body'>): Promise<Response & {
|
|
760
760
|
data: TResponseData;
|
|
761
761
|
}>;
|
|
762
762
|
delete<TResponseData, TBody = unknown>(url: string, body: TBody, config?: {
|
|
763
763
|
authorization?: ApiClientAuthorization;
|
|
764
764
|
customErrorMessage?: string;
|
|
765
|
-
}, options?: Omit<RequestInit,
|
|
765
|
+
}, options?: Omit<RequestInit, 'method' | 'body'>): Promise<Response & {
|
|
766
766
|
data: TResponseData;
|
|
767
767
|
}>;
|
|
768
768
|
}
|
|
@@ -790,21 +790,21 @@ type SagaStepStatus<TData = NonNullable<unknown>> = {
|
|
|
790
790
|
} & TData;
|
|
791
791
|
interface Saga<TStepSchema extends SagaStepsSchema> {
|
|
792
792
|
data: {
|
|
793
|
-
[name in keyof TStepSchema]: TStepSchema[name] extends undefined ? undefined : NonNullable<TStepSchema[name]>[
|
|
793
|
+
[name in keyof TStepSchema]: TStepSchema[name] extends undefined ? undefined : NonNullable<TStepSchema[name]>['data'];
|
|
794
794
|
};
|
|
795
795
|
output: {
|
|
796
796
|
sagaId: string;
|
|
797
797
|
steps: {
|
|
798
|
-
[name in keyof TStepSchema]: TStepSchema[name] extends undefined ? undefined : NonNullable<TStepSchema[name]>[
|
|
798
|
+
[name in keyof TStepSchema]: TStepSchema[name] extends undefined ? undefined : NonNullable<TStepSchema[name]>['output'];
|
|
799
799
|
};
|
|
800
800
|
isDone?: boolean;
|
|
801
801
|
};
|
|
802
802
|
status: {
|
|
803
|
-
[name in keyof TStepSchema]: TStepSchema[name] extends undefined ? undefined : SagaStepStatus & NonNullable<TStepSchema[name]>[
|
|
803
|
+
[name in keyof TStepSchema]: TStepSchema[name] extends undefined ? undefined : SagaStepStatus & NonNullable<TStepSchema[name]>['status'];
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
|
-
type SagaInput<TSaga> = Omit<TSaga,
|
|
807
|
-
type SagaOutput<TSaga> = Omit<TSaga,
|
|
806
|
+
type SagaInput<TSaga> = Omit<TSaga, 'status'>;
|
|
807
|
+
type SagaOutput<TSaga> = Omit<TSaga, 'data'>;
|
|
808
808
|
|
|
809
809
|
type SagaStepPropertyCompareResult<T> = {
|
|
810
810
|
isChanged: false;
|
|
@@ -868,7 +868,7 @@ interface VercelNamespace {
|
|
|
868
868
|
provider: string;
|
|
869
869
|
installationId: number;
|
|
870
870
|
isAccessRestricted: boolean;
|
|
871
|
-
ownerType:
|
|
871
|
+
ownerType: 'user' | 'team';
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
interface VercelSearchRepositoryResponse {
|
|
@@ -893,8 +893,8 @@ interface VercelProjectEnv {
|
|
|
893
893
|
key: string;
|
|
894
894
|
value: string;
|
|
895
895
|
decrypted: boolean;
|
|
896
|
-
type:
|
|
897
|
-
target: [
|
|
896
|
+
type: 'encrypted' | 'plain';
|
|
897
|
+
target: ['production' | 'preview' | 'development'];
|
|
898
898
|
}
|
|
899
899
|
|
|
900
900
|
interface VercelProject {
|
|
@@ -914,7 +914,7 @@ interface VercelProject {
|
|
|
914
914
|
alias: string[];
|
|
915
915
|
url: string;
|
|
916
916
|
id?: string;
|
|
917
|
-
readyState?:
|
|
917
|
+
readyState?: 'READY' | 'BUILDING' | 'ERROR';
|
|
918
918
|
};
|
|
919
919
|
};
|
|
920
920
|
env: VercelProjectEnv[];
|
|
@@ -934,12 +934,12 @@ interface NeonProjectDto {
|
|
|
934
934
|
owner: {
|
|
935
935
|
email: string;
|
|
936
936
|
branches_limit: number;
|
|
937
|
-
subscription:
|
|
937
|
+
subscription: 'UNKNOWN' | 'free' | 'pro' | 'direct_sales' | 'aws_marketplace';
|
|
938
938
|
};
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
941
|
interface NeonProjectsDto {
|
|
942
|
-
projects: NeonProjectDto[
|
|
942
|
+
projects: NeonProjectDto['project'][];
|
|
943
943
|
}
|
|
944
944
|
interface NeonProjectWithConnectionUriDto extends NeonProjectDto {
|
|
945
945
|
connection_uris: {
|
|
@@ -953,7 +953,7 @@ interface NeonProjectBranchDto {
|
|
|
953
953
|
id: string;
|
|
954
954
|
project_id: string;
|
|
955
955
|
name: string;
|
|
956
|
-
current_state:
|
|
956
|
+
current_state: 'init' | 'ready';
|
|
957
957
|
creation_source: string;
|
|
958
958
|
primary: boolean;
|
|
959
959
|
created_at: string;
|
|
@@ -1024,7 +1024,7 @@ interface MailchimpListWebhook {
|
|
|
1024
1024
|
api: boolean;
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
|
-
type MailchimpWebhookEvents = keyof MailchimpListWebhook[
|
|
1027
|
+
type MailchimpWebhookEvents = keyof MailchimpListWebhook['events'];
|
|
1028
1028
|
|
|
1029
1029
|
interface MailchimpWebhookDataBase<TPayload = unknown> {
|
|
1030
1030
|
type: MailchimpWebhookEvents;
|
|
@@ -1039,8 +1039,8 @@ interface MailchimpWebhookDataBase<TPayload = unknown> {
|
|
|
1039
1039
|
type MailchimpWebhookConcreteData<TEvent extends MailchimpWebhookEvents, TPayload> = MailchimpWebhookDataBase<TPayload> & {
|
|
1040
1040
|
type: TEvent;
|
|
1041
1041
|
};
|
|
1042
|
-
type MailchimpSubscribeWebhookData = MailchimpWebhookConcreteData<
|
|
1043
|
-
type MailchimpUnsubscribeWebhookData = MailchimpWebhookConcreteData<
|
|
1042
|
+
type MailchimpSubscribeWebhookData = MailchimpWebhookConcreteData<'subscribe', Record<string, never>>;
|
|
1043
|
+
type MailchimpUnsubscribeWebhookData = MailchimpWebhookConcreteData<'unsubscribe', {
|
|
1044
1044
|
reason: string;
|
|
1045
1045
|
}>;
|
|
1046
1046
|
type MailchimpWebhookData = MailchimpSubscribeWebhookData | MailchimpUnsubscribeWebhookData;
|
|
@@ -1073,7 +1073,7 @@ interface ShopifyWebhookDataBase<TPayload = unknown> {
|
|
|
1073
1073
|
type ShopifyWebhookConcreteData<TTopic extends ShopifyWebhookTopics, TPayload> = ShopifyWebhookDataBase<TPayload> & {
|
|
1074
1074
|
topic: TTopic;
|
|
1075
1075
|
};
|
|
1076
|
-
type ShopifyOrderCreatedWebhookData = ShopifyWebhookConcreteData<
|
|
1076
|
+
type ShopifyOrderCreatedWebhookData = ShopifyWebhookConcreteData<'orders/create', IOrder>;
|
|
1077
1077
|
type ShopifyWebhookData = ShopifyOrderCreatedWebhookData;
|
|
1078
1078
|
|
|
1079
1079
|
interface ShopifyClientAuthorization {
|
|
@@ -1113,7 +1113,7 @@ interface HubSpotWebhookSubscription {
|
|
|
1113
1113
|
|
|
1114
1114
|
interface UpsertHubSpotWebhookSettingsPayload {
|
|
1115
1115
|
webhookUrl: string;
|
|
1116
|
-
period:
|
|
1116
|
+
period: 'SECONDLY' | 'ROLLING_MINUTE';
|
|
1117
1117
|
maxConcurrentRequests: number;
|
|
1118
1118
|
}
|
|
1119
1119
|
interface CreateHubSpotWebhookSubscriptionPayload {
|
|
@@ -1186,27 +1186,27 @@ type BigCommerceWebhookConcreteData<TScope extends BigCommerceWebhookScopes, TPa
|
|
|
1186
1186
|
scope: TScope;
|
|
1187
1187
|
};
|
|
1188
1188
|
type BigCommerceCartCreatedWebhookData = BigCommerceWebhookConcreteData<BigCommerceWebhookScopes.CartCreated, {
|
|
1189
|
-
type:
|
|
1189
|
+
type: 'cart';
|
|
1190
1190
|
id: string;
|
|
1191
1191
|
}>;
|
|
1192
1192
|
type BigCommerceCartUpdatedWebhookData = BigCommerceWebhookConcreteData<BigCommerceWebhookScopes.CartUpdated, {
|
|
1193
|
-
type:
|
|
1193
|
+
type: 'cart';
|
|
1194
1194
|
id: string;
|
|
1195
1195
|
}>;
|
|
1196
1196
|
type BigCommerceOrderCreatedWebhookData = BigCommerceWebhookConcreteData<BigCommerceWebhookScopes.OrderCreated, {
|
|
1197
|
-
type:
|
|
1197
|
+
type: 'order';
|
|
1198
1198
|
id: string;
|
|
1199
1199
|
}>;
|
|
1200
1200
|
type BigCommerceOrderUpdatedWebhookData = BigCommerceWebhookConcreteData<BigCommerceWebhookScopes.OrderUpdated, {
|
|
1201
|
-
type:
|
|
1201
|
+
type: 'order';
|
|
1202
1202
|
id: string;
|
|
1203
1203
|
}>;
|
|
1204
1204
|
type BigCommerceProductCreatedWebhookData = BigCommerceWebhookConcreteData<BigCommerceWebhookScopes.ProductCreated, {
|
|
1205
|
-
type:
|
|
1205
|
+
type: 'product';
|
|
1206
1206
|
id: string;
|
|
1207
1207
|
}>;
|
|
1208
1208
|
type BigCommerceProductUpdatedWebhookData = BigCommerceWebhookConcreteData<BigCommerceWebhookScopes.ProductUpdated, {
|
|
1209
|
-
type:
|
|
1209
|
+
type: 'product';
|
|
1210
1210
|
id: string;
|
|
1211
1211
|
}>;
|
|
1212
1212
|
type BigCommerceWebhookData = BigCommerceCartCreatedWebhookData | BigCommerceOrderCreatedWebhookData | BigCommerceOrderUpdatedWebhookData | BigCommerceProductCreatedWebhookData | BigCommerceProductUpdatedWebhookData;
|
|
@@ -1256,7 +1256,7 @@ interface AuthorizeData {
|
|
|
1256
1256
|
expires_in: number;
|
|
1257
1257
|
organization_id: string;
|
|
1258
1258
|
scope: string;
|
|
1259
|
-
token_type:
|
|
1259
|
+
token_type: 'Bearer';
|
|
1260
1260
|
refresh_token: string;
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
@@ -1301,13 +1301,13 @@ interface CreateClientPayload {
|
|
|
1301
1301
|
visibility: string;
|
|
1302
1302
|
redirect_uri: string;
|
|
1303
1303
|
scopes: string[];
|
|
1304
|
-
type:
|
|
1304
|
+
type: 'server_side_app' | 'javascript_app';
|
|
1305
1305
|
}
|
|
1306
1306
|
|
|
1307
1307
|
interface UpdateClientPayload {
|
|
1308
1308
|
redirect_uri: string;
|
|
1309
1309
|
secret?: string;
|
|
1310
|
-
type:
|
|
1310
|
+
type: 'server_side_app' | 'javascript_app';
|
|
1311
1311
|
}
|
|
1312
1312
|
|
|
1313
1313
|
interface PatScopeDto {
|
|
@@ -1335,7 +1335,7 @@ interface ScopeDto {
|
|
|
1335
1335
|
interface OrganizationDto {
|
|
1336
1336
|
organization_id: string;
|
|
1337
1337
|
name?: string;
|
|
1338
|
-
invitation_mode?:
|
|
1338
|
+
invitation_mode?: 'lax' | 'strict';
|
|
1339
1339
|
company?: {
|
|
1340
1340
|
phone: string;
|
|
1341
1341
|
website: string;
|
|
@@ -1348,7 +1348,7 @@ interface OrganizationDto {
|
|
|
1348
1348
|
|
|
1349
1349
|
interface GlobalAccountsClientAuthorization {
|
|
1350
1350
|
token?: string;
|
|
1351
|
-
tokenType?:
|
|
1351
|
+
tokenType?: 'Basic' | 'Bearer';
|
|
1352
1352
|
}
|
|
1353
1353
|
|
|
1354
1354
|
type AccountsClientAuthorization = GlobalAccountsClientAuthorization;
|
|
@@ -1417,7 +1417,7 @@ interface BillingAccountInfoDto {
|
|
|
1417
1417
|
last_four: string;
|
|
1418
1418
|
}
|
|
1419
1419
|
|
|
1420
|
-
type BillingProduct =
|
|
1420
|
+
type BillingProduct = 'livechat' | 'platform';
|
|
1421
1421
|
|
|
1422
1422
|
interface BillingInvoiceDto {
|
|
1423
1423
|
number: number;
|
|
@@ -1458,14 +1458,14 @@ type AppManifest = AppBaseData & {
|
|
|
1458
1458
|
widgets?: AppWidgetsData;
|
|
1459
1459
|
};
|
|
1460
1460
|
display?: AppDisplayData;
|
|
1461
|
-
stage?:
|
|
1461
|
+
stage?: 'labs';
|
|
1462
1462
|
};
|
|
1463
1463
|
|
|
1464
1464
|
type PushAppSagaBaseStep = SagaStep<{
|
|
1465
|
-
action:
|
|
1465
|
+
action: 'create';
|
|
1466
1466
|
data: AppBaseData;
|
|
1467
1467
|
} | {
|
|
1468
|
-
action:
|
|
1468
|
+
action: 'update';
|
|
1469
1469
|
data: AppBaseData;
|
|
1470
1470
|
changes: SagaStepChanges<AppBaseData>;
|
|
1471
1471
|
meta: {
|
|
@@ -1478,52 +1478,52 @@ type PushAppSagaBaseStep = SagaStep<{
|
|
|
1478
1478
|
}>;
|
|
1479
1479
|
|
|
1480
1480
|
type PushAppSagaAuthorizationStep = SagaStep<{
|
|
1481
|
-
action:
|
|
1481
|
+
action: 'add' | 'update';
|
|
1482
1482
|
data: AppAuthorizationData;
|
|
1483
1483
|
} | {
|
|
1484
|
-
action:
|
|
1484
|
+
action: 'remove';
|
|
1485
1485
|
}>;
|
|
1486
1486
|
|
|
1487
1487
|
type PushAppSagaMonetizationStep = SagaStep<{
|
|
1488
|
-
action:
|
|
1488
|
+
action: 'upsert';
|
|
1489
1489
|
data: AppMonetizationData;
|
|
1490
1490
|
} | {
|
|
1491
|
-
action:
|
|
1491
|
+
action: 'remove';
|
|
1492
1492
|
}>;
|
|
1493
1493
|
|
|
1494
1494
|
type PushAppSagaRepositoryStep = SagaStep<{
|
|
1495
|
-
action:
|
|
1495
|
+
action: 'link';
|
|
1496
1496
|
data: LinkAppRepositoryData;
|
|
1497
1497
|
} | {
|
|
1498
|
-
action:
|
|
1498
|
+
action: 'upsert';
|
|
1499
1499
|
data: AppRepositoryData;
|
|
1500
1500
|
} | {
|
|
1501
|
-
action:
|
|
1501
|
+
action: 'remove';
|
|
1502
1502
|
}, AppRepositoryData, {
|
|
1503
1503
|
needToBeInstalled?: boolean;
|
|
1504
1504
|
needToBeSeeded?: boolean;
|
|
1505
1505
|
}>;
|
|
1506
1506
|
|
|
1507
1507
|
type PushAppSagaDeploymentStep = SagaStep<{
|
|
1508
|
-
action:
|
|
1508
|
+
action: 'link';
|
|
1509
1509
|
data: LinkAppDeploymentData;
|
|
1510
1510
|
} | {
|
|
1511
|
-
action:
|
|
1511
|
+
action: 'upsert';
|
|
1512
1512
|
data: AppDeploymentData;
|
|
1513
1513
|
} | {
|
|
1514
|
-
action:
|
|
1514
|
+
action: 'remove';
|
|
1515
1515
|
}, AppDeploymentData, {
|
|
1516
1516
|
needToBeInstalled?: boolean;
|
|
1517
1517
|
}>;
|
|
1518
1518
|
|
|
1519
1519
|
type PushAppSagaStorageStep = SagaStep<{
|
|
1520
|
-
action:
|
|
1520
|
+
action: 'link';
|
|
1521
1521
|
data: LinkAppStorageData;
|
|
1522
1522
|
} | {
|
|
1523
|
-
action:
|
|
1523
|
+
action: 'upsert';
|
|
1524
1524
|
data: AppStorageData;
|
|
1525
1525
|
} | {
|
|
1526
|
-
action:
|
|
1526
|
+
action: 'remove';
|
|
1527
1527
|
}, AppStorageData>;
|
|
1528
1528
|
|
|
1529
1529
|
type PushAppSagaPropertiesStep = SagaStep<{
|
|
@@ -1551,14 +1551,14 @@ type PushAppSagaWidgetsStep = SagaStep<{
|
|
|
1551
1551
|
}>;
|
|
1552
1552
|
|
|
1553
1553
|
type PushAppSagaDisplayStep = SagaStep<{
|
|
1554
|
-
action:
|
|
1554
|
+
action: 'add';
|
|
1555
1555
|
data: AppDisplayData;
|
|
1556
1556
|
} | {
|
|
1557
|
-
action:
|
|
1557
|
+
action: 'update';
|
|
1558
1558
|
data: AppDisplayData;
|
|
1559
1559
|
changes: SagaStepChanges<AppDisplayData>;
|
|
1560
1560
|
} | {
|
|
1561
|
-
action:
|
|
1561
|
+
action: 'remove';
|
|
1562
1562
|
}>;
|
|
1563
1563
|
|
|
1564
1564
|
type PushAppSaga = Saga<{
|
|
@@ -1586,11 +1586,11 @@ interface VerifyAppPayload {
|
|
|
1586
1586
|
manifest: AppManifest;
|
|
1587
1587
|
}
|
|
1588
1588
|
interface VerifyAppResult {
|
|
1589
|
-
status:
|
|
1589
|
+
status: 'ok' | 'nok';
|
|
1590
1590
|
}
|
|
1591
1591
|
|
|
1592
1592
|
interface AppAuthorizationData {
|
|
1593
|
-
type:
|
|
1593
|
+
type: 'server_side_app' | 'javascript_app';
|
|
1594
1594
|
redirectUri: string;
|
|
1595
1595
|
scopes?: {
|
|
1596
1596
|
scope: string;
|
|
@@ -1602,7 +1602,7 @@ interface AppAuthorizationData {
|
|
|
1602
1602
|
type AddAppAuthorizationPayload = {
|
|
1603
1603
|
appId: string;
|
|
1604
1604
|
appName: string;
|
|
1605
|
-
} & Omit<AppAuthorizationData,
|
|
1605
|
+
} & Omit<AppAuthorizationData, 'clientId'>;
|
|
1606
1606
|
interface AddAppAuthorizationResult {
|
|
1607
1607
|
clientId: string;
|
|
1608
1608
|
clientSecret: string;
|
|
@@ -1617,31 +1617,31 @@ interface RemoveAppAuthorizationPayload {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
|
|
1619
1619
|
type LinkAppDeploymentNetlifySiteData = {
|
|
1620
|
-
type:
|
|
1620
|
+
type: 'new';
|
|
1621
1621
|
siteName?: string;
|
|
1622
1622
|
} | {
|
|
1623
|
-
type:
|
|
1623
|
+
type: 'existing';
|
|
1624
1624
|
siteId: string;
|
|
1625
1625
|
};
|
|
1626
1626
|
type LinkAppDeploymentNetlifyData = {
|
|
1627
1627
|
installationId?: string;
|
|
1628
1628
|
} & LinkAppDeploymentNetlifySiteData;
|
|
1629
1629
|
type LinkAppDeploymentVercelProjectData = {
|
|
1630
|
-
type:
|
|
1630
|
+
type: 'new';
|
|
1631
1631
|
projectName?: string;
|
|
1632
1632
|
} | {
|
|
1633
|
-
type:
|
|
1633
|
+
type: 'existing';
|
|
1634
1634
|
projectId: string;
|
|
1635
1635
|
};
|
|
1636
1636
|
type LinkAppDeploymentVercelData = {
|
|
1637
1637
|
installationId?: string;
|
|
1638
1638
|
} & LinkAppDeploymentVercelProjectData;
|
|
1639
1639
|
type LinkAppDeploymentData = (({
|
|
1640
|
-
provider:
|
|
1640
|
+
provider: 'netlify';
|
|
1641
1641
|
} & LinkAppDeploymentNetlifyData) | ({
|
|
1642
|
-
provider:
|
|
1642
|
+
provider: 'vercel';
|
|
1643
1643
|
} & LinkAppDeploymentVercelData) | {
|
|
1644
|
-
provider:
|
|
1644
|
+
provider: 'custom';
|
|
1645
1645
|
url: string;
|
|
1646
1646
|
}) & {
|
|
1647
1647
|
force?: boolean;
|
|
@@ -1664,11 +1664,11 @@ type UnlinkAppDeploymentPayload = {
|
|
|
1664
1664
|
type AppDeploymentData = {
|
|
1665
1665
|
provider: AppDeploymentProvider;
|
|
1666
1666
|
} & AppDeploymentBlockConfig & (({
|
|
1667
|
-
provider:
|
|
1667
|
+
provider: 'netlify';
|
|
1668
1668
|
} & Partial<AppNetlifyDeploymentConfig>) | ({
|
|
1669
|
-
provider:
|
|
1669
|
+
provider: 'vercel';
|
|
1670
1670
|
} & Partial<AppVercelDeploymentConfig>) | {
|
|
1671
|
-
provider:
|
|
1671
|
+
provider: 'custom';
|
|
1672
1672
|
});
|
|
1673
1673
|
|
|
1674
1674
|
interface AppVercelDeployment {
|
|
@@ -1680,7 +1680,7 @@ interface AppVercelDeployment {
|
|
|
1680
1680
|
};
|
|
1681
1681
|
deploy: {
|
|
1682
1682
|
id?: string;
|
|
1683
|
-
state?:
|
|
1683
|
+
state?: 'ERROR' | 'READY' | 'BUILDING';
|
|
1684
1684
|
};
|
|
1685
1685
|
repository: {
|
|
1686
1686
|
isAccessible: boolean;
|
|
@@ -1718,9 +1718,9 @@ interface AppNetlifyDeployment {
|
|
|
1718
1718
|
}[];
|
|
1719
1719
|
}
|
|
1720
1720
|
type AppDeployment = ({
|
|
1721
|
-
provider:
|
|
1721
|
+
provider: 'netlify';
|
|
1722
1722
|
} & AppNetlifyDeployment) | ({
|
|
1723
|
-
provider:
|
|
1723
|
+
provider: 'vercel';
|
|
1724
1724
|
} & AppVercelDeployment);
|
|
1725
1725
|
|
|
1726
1726
|
type UpsertAppDeploymentPayload = {
|
|
@@ -1739,7 +1739,7 @@ interface AppGitHubRepository {
|
|
|
1739
1739
|
description?: string;
|
|
1740
1740
|
}
|
|
1741
1741
|
type AppRepository = {
|
|
1742
|
-
provider:
|
|
1742
|
+
provider: 'github';
|
|
1743
1743
|
} & AppGitHubRepository;
|
|
1744
1744
|
|
|
1745
1745
|
type UpsertAppRepositoryPayload = {
|
|
@@ -1747,11 +1747,11 @@ type UpsertAppRepositoryPayload = {
|
|
|
1747
1747
|
} & AppRepositoryData;
|
|
1748
1748
|
|
|
1749
1749
|
type LinkAppRepositoryGitHubData = {
|
|
1750
|
-
type:
|
|
1750
|
+
type: 'new';
|
|
1751
1751
|
name?: string;
|
|
1752
1752
|
template?: string;
|
|
1753
1753
|
} | {
|
|
1754
|
-
type:
|
|
1754
|
+
type: 'existing';
|
|
1755
1755
|
fullName: string;
|
|
1756
1756
|
branch: string;
|
|
1757
1757
|
};
|
|
@@ -1759,7 +1759,7 @@ type LinkAppRepositoryData = {
|
|
|
1759
1759
|
target: AppRepositoryTarget | undefined;
|
|
1760
1760
|
force?: boolean;
|
|
1761
1761
|
} & ({
|
|
1762
|
-
provider:
|
|
1762
|
+
provider: 'github';
|
|
1763
1763
|
} & LinkAppRepositoryGitHubData);
|
|
1764
1764
|
type LinkAppRepositoryPayload = {
|
|
1765
1765
|
appId: string;
|
|
@@ -1788,9 +1788,9 @@ interface SeedAppRepositoryResult {
|
|
|
1788
1788
|
type AppStorageData = {
|
|
1789
1789
|
provider: AppStorageProvider;
|
|
1790
1790
|
} & AppStorageBlockConfig & (({
|
|
1791
|
-
provider:
|
|
1791
|
+
provider: 'planetscale';
|
|
1792
1792
|
} & Partial<AppPlanetScaleStorageConfig>) | ({
|
|
1793
|
-
provider:
|
|
1793
|
+
provider: 'neon';
|
|
1794
1794
|
} & Partial<AppNeonStorageConfig>));
|
|
1795
1795
|
|
|
1796
1796
|
interface AppPlanetScaleStorage {
|
|
@@ -1807,43 +1807,43 @@ interface AppNeonStorage {
|
|
|
1807
1807
|
databaseName: string;
|
|
1808
1808
|
}
|
|
1809
1809
|
type AppStorage = ({
|
|
1810
|
-
provider:
|
|
1810
|
+
provider: 'planetscale';
|
|
1811
1811
|
} & AppPlanetScaleStorage) | ({
|
|
1812
|
-
provider:
|
|
1812
|
+
provider: 'neon';
|
|
1813
1813
|
} & AppNeonStorage);
|
|
1814
1814
|
|
|
1815
1815
|
type LinkAppStoragePlanetScaleDatabaseData = {
|
|
1816
|
-
type:
|
|
1816
|
+
type: 'new';
|
|
1817
1817
|
databaseName?: string;
|
|
1818
1818
|
} | {
|
|
1819
|
-
type:
|
|
1819
|
+
type: 'existing';
|
|
1820
1820
|
databaseId: string;
|
|
1821
1821
|
};
|
|
1822
1822
|
type LinkAppStoragePlanetScaleData = {
|
|
1823
1823
|
organization: string;
|
|
1824
1824
|
} & LinkAppStoragePlanetScaleDatabaseData;
|
|
1825
1825
|
type LinkAppStorageNeonData = {
|
|
1826
|
-
type:
|
|
1826
|
+
type: 'new';
|
|
1827
1827
|
projectName?: string;
|
|
1828
1828
|
databaseName?: string;
|
|
1829
1829
|
} | ({
|
|
1830
|
-
type:
|
|
1830
|
+
type: 'existing';
|
|
1831
1831
|
projectId: string;
|
|
1832
1832
|
branchId: string;
|
|
1833
1833
|
} & ({
|
|
1834
|
-
databaseType:
|
|
1834
|
+
databaseType: 'new';
|
|
1835
1835
|
databaseName?: string;
|
|
1836
1836
|
} | {
|
|
1837
|
-
databaseType:
|
|
1837
|
+
databaseType: 'existing';
|
|
1838
1838
|
databaseName: string;
|
|
1839
1839
|
}));
|
|
1840
1840
|
type LinkAppStorageData = {
|
|
1841
1841
|
seedRepository: boolean;
|
|
1842
1842
|
force?: boolean;
|
|
1843
1843
|
} & (({
|
|
1844
|
-
provider:
|
|
1844
|
+
provider: 'planetscale';
|
|
1845
1845
|
} & LinkAppStoragePlanetScaleData) | ({
|
|
1846
|
-
provider:
|
|
1846
|
+
provider: 'neon';
|
|
1847
1847
|
} & LinkAppStorageNeonData));
|
|
1848
1848
|
type LinkAppStoragePayload = {
|
|
1849
1849
|
appId: string;
|
|
@@ -1863,16 +1863,16 @@ type UpsertAppStoragePayload = {
|
|
|
1863
1863
|
|
|
1864
1864
|
type AppMonetizationData = {
|
|
1865
1865
|
price: number;
|
|
1866
|
-
frequency:
|
|
1866
|
+
frequency: 'monthly' | 'once';
|
|
1867
1867
|
trialDays: number;
|
|
1868
1868
|
} & ({
|
|
1869
|
-
charge:
|
|
1869
|
+
charge: 'account';
|
|
1870
1870
|
tiers?: {
|
|
1871
1871
|
accountsFrom: number;
|
|
1872
1872
|
discount: number;
|
|
1873
1873
|
}[];
|
|
1874
1874
|
} | {
|
|
1875
|
-
charge:
|
|
1875
|
+
charge: 'organization';
|
|
1876
1876
|
});
|
|
1877
1877
|
|
|
1878
1878
|
type UpsertAppMonetizationPayload = {
|
|
@@ -1894,7 +1894,7 @@ type UpsertAppPropertiesPayload = {
|
|
|
1894
1894
|
} & AppPropertiesData;
|
|
1895
1895
|
|
|
1896
1896
|
interface AppPropertyData {
|
|
1897
|
-
type: PropertyDto[
|
|
1897
|
+
type: PropertyDto['type'];
|
|
1898
1898
|
description: string;
|
|
1899
1899
|
default_value: string;
|
|
1900
1900
|
access: PropertyAccessDto;
|
|
@@ -1936,10 +1936,10 @@ type UpsertAppWidgetPayload = {
|
|
|
1936
1936
|
widgetId: string;
|
|
1937
1937
|
} & AppWidgetData;
|
|
1938
1938
|
|
|
1939
|
-
type AppVariableType =
|
|
1940
|
-
type AppVariableStatus =
|
|
1941
|
-
type AppVariableLocalProvider =
|
|
1942
|
-
type AppVariableExternalProvider =
|
|
1939
|
+
type AppVariableType = 'custom' | 'auth' | 'storage';
|
|
1940
|
+
type AppVariableStatus = 'valid' | 'invalid' | 'warning' | 'unknown';
|
|
1941
|
+
type AppVariableLocalProvider = 'console';
|
|
1942
|
+
type AppVariableExternalProvider = 'vercel' | 'netlify';
|
|
1943
1943
|
type AppVariableProvider = AppVariableLocalProvider | AppVariableExternalProvider;
|
|
1944
1944
|
interface AppVariable {
|
|
1945
1945
|
key: string;
|
|
@@ -2037,13 +2037,13 @@ type IntegrationFlowContext = {
|
|
|
2037
2037
|
redirectUrl: string;
|
|
2038
2038
|
});
|
|
2039
2039
|
type IntegrationFlowOutput<TFlowResult> = {
|
|
2040
|
-
status:
|
|
2040
|
+
status: 'success';
|
|
2041
2041
|
result: TFlowResult;
|
|
2042
2042
|
} | {
|
|
2043
|
-
status:
|
|
2043
|
+
status: 'error';
|
|
2044
2044
|
message: string;
|
|
2045
2045
|
} | {
|
|
2046
|
-
status:
|
|
2046
|
+
status: 'cancel';
|
|
2047
2047
|
};
|
|
2048
2048
|
|
|
2049
2049
|
declare enum IntegrationNames {
|
|
@@ -2097,9 +2097,9 @@ interface BigCommerceAuthorizeFlowResult {
|
|
|
2097
2097
|
token: string;
|
|
2098
2098
|
}
|
|
2099
2099
|
|
|
2100
|
-
type BigCommerceFlows =
|
|
2101
|
-
type BigCommerceFlowContext<TAction extends BigCommerceFlows> = TAction extends
|
|
2102
|
-
type BigCommerceFlowResult<TAction extends BigCommerceFlows> = TAction extends
|
|
2100
|
+
type BigCommerceFlows = 'authorize';
|
|
2101
|
+
type BigCommerceFlowContext<TAction extends BigCommerceFlows> = TAction extends 'authorize' ? BigCommerceAuthorizeFlowCustomContext : never;
|
|
2102
|
+
type BigCommerceFlowResult<TAction extends BigCommerceFlows> = TAction extends 'authorize' ? BigCommerceAuthorizeFlowResult : never;
|
|
2103
2103
|
|
|
2104
2104
|
declare enum BigCommerceEventNames {
|
|
2105
2105
|
CartCreated = "cart_created",
|
|
@@ -2517,9 +2517,9 @@ interface HubspotAuthorizeFlowResult {
|
|
|
2517
2517
|
token: string;
|
|
2518
2518
|
}
|
|
2519
2519
|
|
|
2520
|
-
type HubSpotFlows =
|
|
2521
|
-
type HubSpotFlowContext<TAction extends HubSpotFlows> = TAction extends
|
|
2522
|
-
type HubSpotFlowResult<TAction extends HubSpotFlows> = TAction extends
|
|
2520
|
+
type HubSpotFlows = 'authorize';
|
|
2521
|
+
type HubSpotFlowContext<TAction extends HubSpotFlows> = TAction extends 'authorize' ? HubspotAuthorizeFlowCustomContext : never;
|
|
2522
|
+
type HubSpotFlowResult<TAction extends HubSpotFlows> = TAction extends 'authorize' ? HubspotAuthorizeFlowResult : never;
|
|
2523
2523
|
|
|
2524
2524
|
declare enum HubspotEventNames {
|
|
2525
2525
|
ContactCreated = "contact_created",
|
|
@@ -2723,9 +2723,9 @@ interface MailchimpAuthorizeFlowResult {
|
|
|
2723
2723
|
token: string;
|
|
2724
2724
|
}
|
|
2725
2725
|
|
|
2726
|
-
type MailchimpFlows =
|
|
2727
|
-
type MailchimpFlowContext<TAction extends MailchimpFlows> = TAction extends
|
|
2728
|
-
type MailchimpFlowResult<TAction extends MailchimpFlows> = TAction extends
|
|
2726
|
+
type MailchimpFlows = 'authorize';
|
|
2727
|
+
type MailchimpFlowContext<TAction extends MailchimpFlows> = TAction extends 'authorize' ? MailchimpAuthorizeFlowCustomContext : never;
|
|
2728
|
+
type MailchimpFlowResult<TAction extends MailchimpFlows> = TAction extends 'authorize' ? MailchimpAuthorizeFlowResult : never;
|
|
2729
2729
|
|
|
2730
2730
|
declare enum MailchimpEventNames {
|
|
2731
2731
|
Subscribed = "subscribed",
|
|
@@ -2986,9 +2986,9 @@ interface ShopifyAuthorizeFlowResult {
|
|
|
2986
2986
|
token: string;
|
|
2987
2987
|
}
|
|
2988
2988
|
|
|
2989
|
-
type ShopifyFlows =
|
|
2990
|
-
type ShopifyFlowContext<TAction extends ShopifyFlows> = TAction extends
|
|
2991
|
-
type ShopifyFlowResult<TAction extends ShopifyFlows> = TAction extends
|
|
2989
|
+
type ShopifyFlows = 'authorize';
|
|
2990
|
+
type ShopifyFlowContext<TAction extends ShopifyFlows> = TAction extends 'authorize' ? ShopifyAuthorizeFlowCustomContext : never;
|
|
2991
|
+
type ShopifyFlowResult<TAction extends ShopifyFlows> = TAction extends 'authorize' ? ShopifyAuthorizeFlowResult : never;
|
|
2992
2992
|
|
|
2993
2993
|
declare enum ShopifyEventNames {
|
|
2994
2994
|
OrderCreated = "order_created"
|
|
@@ -3136,9 +3136,9 @@ interface TextAuthorizeFlowResult {
|
|
|
3136
3136
|
token: string;
|
|
3137
3137
|
}
|
|
3138
3138
|
|
|
3139
|
-
type TextFlows =
|
|
3140
|
-
type TextFlowContext<TAction extends TextFlows> = TAction extends
|
|
3141
|
-
type TextFlowResult<TAction extends TextFlows> = TAction extends
|
|
3139
|
+
type TextFlows = 'authorize';
|
|
3140
|
+
type TextFlowContext<TAction extends TextFlows> = TAction extends 'authorize' ? TextAuthorizeFlowCustomContext : never;
|
|
3141
|
+
type TextFlowResult<TAction extends TextFlows> = TAction extends 'authorize' ? TextAuthorizeFlowResult : never;
|
|
3142
3142
|
|
|
3143
3143
|
declare enum TextLivechatEventNames {
|
|
3144
3144
|
ChatStarted = "chat_started",
|
|
@@ -5368,9 +5368,9 @@ type GitHubInstallFlowCustomContext = GitHubInstallActionContext & {
|
|
|
5368
5368
|
type GitHubInstallFlowContext = GitHubInstallFlowCustomContext & IntegrationFlowContext;
|
|
5369
5369
|
type GitHubInstallFlowResult = GitHubInstallActionResult;
|
|
5370
5370
|
|
|
5371
|
-
type GitHubFlows =
|
|
5372
|
-
type GitHubFlowContext<TAction extends GitHubFlows> = TAction extends
|
|
5373
|
-
type GitHubFlowResult<TAction extends GitHubFlows> = TAction extends
|
|
5371
|
+
type GitHubFlows = 'authorize' | 'install';
|
|
5372
|
+
type GitHubFlowContext<TAction extends GitHubFlows> = TAction extends 'authorize' ? GitHubAuthorizeFlowCustomContext : TAction extends 'install' ? GitHubInstallFlowCustomContext : never;
|
|
5373
|
+
type GitHubFlowResult<TAction extends GitHubFlows> = TAction extends 'authorize' ? GitHubAuthorizeFlowResult : TAction extends 'install' ? GitHubInstallFlowResult : never;
|
|
5374
5374
|
|
|
5375
5375
|
interface NetlifyAuthorizeActionResult {
|
|
5376
5376
|
token: string;
|
|
@@ -5398,9 +5398,9 @@ type NetlifyInstallFlowCustomContext = NetlifyInstallActionContext & {
|
|
|
5398
5398
|
type NetlifyInstallFlowContext = NetlifyInstallFlowCustomContext & IntegrationFlowContext;
|
|
5399
5399
|
type NetlifyInstallFlowResult = NetlifyInstallActionResult;
|
|
5400
5400
|
|
|
5401
|
-
type NetlifyFlows =
|
|
5402
|
-
type NetlifyFlowContext<TAction extends NetlifyFlows> = TAction extends
|
|
5403
|
-
type NetlifyFlowResult<TAction extends NetlifyFlows> = TAction extends
|
|
5401
|
+
type NetlifyFlows = 'authorize' | 'install';
|
|
5402
|
+
type NetlifyFlowContext<TAction extends NetlifyFlows> = TAction extends 'authorize' ? NetlifyAuthorizeFlowCustomContext : TAction extends 'install' ? NetlifyInstallFlowCustomContext : never;
|
|
5403
|
+
type NetlifyFlowResult<TAction extends NetlifyFlows> = TAction extends 'authorize' ? NetlifyAuthorizeFlowResult : TAction extends 'install' ? NetlifyInstallFlowResult : never;
|
|
5404
5404
|
|
|
5405
5405
|
interface VercelConnectActionContext {
|
|
5406
5406
|
token: string;
|
|
@@ -5436,9 +5436,9 @@ type VercelInstallFlowCustomContext = VercelInstallActionContext & {
|
|
|
5436
5436
|
type VercelInstallFlowContext = VercelInstallFlowCustomContext & IntegrationFlowContext;
|
|
5437
5437
|
type VercelInstallFlowResult = VercelInstallActionResult;
|
|
5438
5438
|
|
|
5439
|
-
type VercelFlows =
|
|
5440
|
-
type VercelFlowContext<TAction extends VercelFlows> = TAction extends
|
|
5441
|
-
type VercelFlowResult<TAction extends VercelFlows> = TAction extends
|
|
5439
|
+
type VercelFlows = 'authorize' | 'install';
|
|
5440
|
+
type VercelFlowContext<TAction extends VercelFlows> = TAction extends 'authorize' ? VercelAuthorizeFlowCustomContext : TAction extends 'install' ? VercelInstallFlowCustomContext : never;
|
|
5441
|
+
type VercelFlowResult<TAction extends VercelFlows> = TAction extends 'authorize' ? VercelAuthorizeFlowResult : TAction extends 'install' ? VercelInstallFlowResult : never;
|
|
5442
5442
|
|
|
5443
5443
|
interface AdapterClientAuthorization {
|
|
5444
5444
|
platform?: GlobalAccountsClientAuthorization;
|
|
@@ -5507,7 +5507,7 @@ declare function updateAdapterClient(tokens?: {
|
|
|
5507
5507
|
|
|
5508
5508
|
interface ApplicationPaymentDto {
|
|
5509
5509
|
creditCardRequired: boolean;
|
|
5510
|
-
frequency:
|
|
5510
|
+
frequency: 'monthly' | 'once';
|
|
5511
5511
|
perAccount: boolean;
|
|
5512
5512
|
price: number;
|
|
5513
5513
|
tiersPricingConfig: {
|
|
@@ -5844,10 +5844,10 @@ interface UpdateApplicationIconPayload {
|
|
|
5844
5844
|
dark?: string;
|
|
5845
5845
|
}
|
|
5846
5846
|
|
|
5847
|
-
type AppRepositoryProvider =
|
|
5848
|
-
type AppRepositoryTarget =
|
|
5849
|
-
type AppDeploymentProvider =
|
|
5850
|
-
type AppStorageProvider =
|
|
5847
|
+
type AppRepositoryProvider = 'github';
|
|
5848
|
+
type AppRepositoryTarget = 'browser' | 'nextjs';
|
|
5849
|
+
type AppDeploymentProvider = 'netlify' | 'vercel' | 'custom';
|
|
5850
|
+
type AppStorageProvider = 'planetscale' | 'neon';
|
|
5851
5851
|
interface AppRepositoryBlockConfig {
|
|
5852
5852
|
name: string;
|
|
5853
5853
|
branch: string;
|
|
@@ -6067,7 +6067,7 @@ declare function getDpsClientConfig(options?: DpsClientOptions): AxiosRequestCon
|
|
|
6067
6067
|
declare function initDpsClient(baseUrl?: string, token?: string): void;
|
|
6068
6068
|
|
|
6069
6069
|
interface ShortcutDto {
|
|
6070
|
-
type:
|
|
6070
|
+
type: 'link' | 'app';
|
|
6071
6071
|
url: string;
|
|
6072
6072
|
}
|
|
6073
6073
|
|
|
@@ -6164,7 +6164,7 @@ interface UserIntegrationsDto {
|
|
|
6164
6164
|
}
|
|
6165
6165
|
|
|
6166
6166
|
interface RegisterDeveloperPayload {
|
|
6167
|
-
origin?:
|
|
6167
|
+
origin?: 'workflows-ext';
|
|
6168
6168
|
}
|
|
6169
6169
|
|
|
6170
6170
|
type UpdateUserFeatures = Partial<UserFeaturesDto>;
|
|
@@ -6192,7 +6192,7 @@ interface WebhookDto {
|
|
|
6192
6192
|
licenseID: number;
|
|
6193
6193
|
createdAt: string;
|
|
6194
6194
|
createdBy: string;
|
|
6195
|
-
createdByType:
|
|
6195
|
+
createdByType: 'agent' | 'client' | 'system';
|
|
6196
6196
|
updatedAt: string;
|
|
6197
6197
|
updatedBy: string;
|
|
6198
6198
|
name: string;
|
|
@@ -6208,7 +6208,7 @@ interface CreateWebhookPayload {
|
|
|
6208
6208
|
url: string;
|
|
6209
6209
|
eventType: HelpDeskWebhookEventType;
|
|
6210
6210
|
}
|
|
6211
|
-
type UpdateWebhookPayload = Omit<CreateWebhookPayload,
|
|
6211
|
+
type UpdateWebhookPayload = Omit<CreateWebhookPayload, 'name'>;
|
|
6212
6212
|
interface HelpDeskWebhookBaseData<TEvent extends HelpDeskWebhookEventType, TPayload> {
|
|
6213
6213
|
eventType: TEvent;
|
|
6214
6214
|
createdAt: string;
|
|
@@ -6294,10 +6294,10 @@ interface AgentDto {
|
|
|
6294
6294
|
onboarding_completed: number;
|
|
6295
6295
|
timezone: string;
|
|
6296
6296
|
last_chat_start_timestamp: string;
|
|
6297
|
-
|
|
6297
|
+
'integration.botengine.inapp_status': string;
|
|
6298
6298
|
suspended: number;
|
|
6299
6299
|
avatar: string | null;
|
|
6300
|
-
|
|
6300
|
+
'email.bounce': number;
|
|
6301
6301
|
awaiting_approval: number;
|
|
6302
6302
|
ticket_notifications: number;
|
|
6303
6303
|
daily_summary: number;
|
|
@@ -6311,10 +6311,10 @@ interface AgentDto {
|
|
|
6311
6311
|
weekly_summary: number;
|
|
6312
6312
|
state: string;
|
|
6313
6313
|
mobile: string;
|
|
6314
|
-
|
|
6314
|
+
'email.bounce.type': number;
|
|
6315
6315
|
customers_enabled: number;
|
|
6316
6316
|
permission: string;
|
|
6317
|
-
|
|
6317
|
+
'email.bounce.date': number;
|
|
6318
6318
|
repeat_sound_notifications: number;
|
|
6319
6319
|
design_version: number;
|
|
6320
6320
|
status: string;
|
|
@@ -6335,7 +6335,7 @@ interface AgentConfigurationDto {
|
|
|
6335
6335
|
login_status: string;
|
|
6336
6336
|
}
|
|
6337
6337
|
|
|
6338
|
-
type AccessLevel =
|
|
6338
|
+
type AccessLevel = 'read' | 'write';
|
|
6339
6339
|
interface PropertyAccessItemDto {
|
|
6340
6340
|
agent?: [AccessLevel];
|
|
6341
6341
|
customer?: [AccessLevel];
|
|
@@ -6348,7 +6348,7 @@ interface PropertyAccessDto {
|
|
|
6348
6348
|
group?: PropertyAccessItemDto;
|
|
6349
6349
|
}
|
|
6350
6350
|
interface PropertyDto {
|
|
6351
|
-
type:
|
|
6351
|
+
type: 'int' | 'bool' | 'string' | 'tokenized_string';
|
|
6352
6352
|
description: string;
|
|
6353
6353
|
domain?: string[];
|
|
6354
6354
|
range?: {
|
|
@@ -6372,9 +6372,9 @@ interface LivechatWebhookDto {
|
|
|
6372
6372
|
action: string;
|
|
6373
6373
|
description: string;
|
|
6374
6374
|
owner_client_id: string;
|
|
6375
|
-
type:
|
|
6375
|
+
type: 'bot' | 'license';
|
|
6376
6376
|
filters?: {
|
|
6377
|
-
author_type?:
|
|
6377
|
+
author_type?: 'agent' | 'customer';
|
|
6378
6378
|
only_my_chats?: boolean;
|
|
6379
6379
|
chat_presence: {
|
|
6380
6380
|
user_ids?: {
|
|
@@ -6395,9 +6395,9 @@ interface LivechatWebhook {
|
|
|
6395
6395
|
description?: string;
|
|
6396
6396
|
secret_key: string;
|
|
6397
6397
|
owner_client_id?: string;
|
|
6398
|
-
type:
|
|
6398
|
+
type: 'bot' | 'license';
|
|
6399
6399
|
filters?: {
|
|
6400
|
-
author_type?:
|
|
6400
|
+
author_type?: 'agent' | 'customer';
|
|
6401
6401
|
only_my_chats?: boolean;
|
|
6402
6402
|
chat_presence: {
|
|
6403
6403
|
user_ids?: {
|
|
@@ -6425,29 +6425,29 @@ declare enum LivechatWebhookActions {
|
|
|
6425
6425
|
type LivechatWebhookUser = {
|
|
6426
6426
|
id: string;
|
|
6427
6427
|
name: string;
|
|
6428
|
-
events_seen_up_to:
|
|
6429
|
-
type:
|
|
6428
|
+
events_seen_up_to: '2020-05-12T12:31:46.463000Z';
|
|
6429
|
+
type: 'customer';
|
|
6430
6430
|
present: boolean;
|
|
6431
6431
|
created_at: string;
|
|
6432
6432
|
last_visit: {
|
|
6433
|
-
started_at:
|
|
6434
|
-
ended_at:
|
|
6435
|
-
ip:
|
|
6436
|
-
user_agent:
|
|
6433
|
+
started_at: '2020-05-12T11:32:03.497479Z';
|
|
6434
|
+
ended_at: '2020-05-12T11:33:33.497000Z';
|
|
6435
|
+
ip: '<customer_ip>';
|
|
6436
|
+
user_agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36';
|
|
6437
6437
|
geolocation: {
|
|
6438
|
-
country:
|
|
6439
|
-
country_code:
|
|
6440
|
-
region:
|
|
6441
|
-
city:
|
|
6442
|
-
timezone:
|
|
6443
|
-
latitude:
|
|
6444
|
-
longitude:
|
|
6438
|
+
country: 'Poland';
|
|
6439
|
+
country_code: 'PL';
|
|
6440
|
+
region: 'Dolnoslaskie';
|
|
6441
|
+
city: 'Wroclaw';
|
|
6442
|
+
timezone: 'Europe/Warsaw';
|
|
6443
|
+
latitude: '51.1043015';
|
|
6444
|
+
longitude: '17.0335007';
|
|
6445
6445
|
};
|
|
6446
6446
|
last_pages: [
|
|
6447
6447
|
{
|
|
6448
|
-
opened_at:
|
|
6449
|
-
url:
|
|
6450
|
-
title:
|
|
6448
|
+
opened_at: '2020-05-12T11:32:03.497479Z';
|
|
6449
|
+
url: 'https://cdn.livechatinc.com/preview/11442778';
|
|
6450
|
+
title: 'Sample Page | Preview your chat window';
|
|
6451
6451
|
}
|
|
6452
6452
|
];
|
|
6453
6453
|
};
|
|
@@ -6459,17 +6459,17 @@ type LivechatWebhookUser = {
|
|
|
6459
6459
|
greetings_shown_count: 2;
|
|
6460
6460
|
greetings_accepted_count: 1;
|
|
6461
6461
|
};
|
|
6462
|
-
agent_last_event_created_at:
|
|
6463
|
-
customer_last_event_created_at:
|
|
6462
|
+
agent_last_event_created_at: '2020-05-12T11:42:47.393002Z';
|
|
6463
|
+
customer_last_event_created_at: '2020-05-12T12:31:46.463000Z';
|
|
6464
6464
|
} | {
|
|
6465
6465
|
id: string;
|
|
6466
6466
|
name: string;
|
|
6467
6467
|
email: string;
|
|
6468
6468
|
events_seen_up_to: string;
|
|
6469
|
-
type:
|
|
6469
|
+
type: 'agent';
|
|
6470
6470
|
present: boolean;
|
|
6471
6471
|
avatar: string;
|
|
6472
|
-
visibility:
|
|
6472
|
+
visibility: 'all';
|
|
6473
6473
|
};
|
|
6474
6474
|
interface LivechatWebhookChat {
|
|
6475
6475
|
id: string;
|
|
@@ -6521,13 +6521,13 @@ interface LivechatWebhookSystemMessageEvent {
|
|
|
6521
6521
|
custom_id: string;
|
|
6522
6522
|
text: string;
|
|
6523
6523
|
system_message_type: LivechatWebhookSystemMessages;
|
|
6524
|
-
visibility:
|
|
6524
|
+
visibility: 'all' | 'agents';
|
|
6525
6525
|
text_vars: Record<string, string>;
|
|
6526
6526
|
}
|
|
6527
6527
|
interface LivechatWebhookMessageEvent {
|
|
6528
6528
|
custom_id: string;
|
|
6529
6529
|
text: string;
|
|
6530
|
-
visibility:
|
|
6530
|
+
visibility: 'all' | 'agents';
|
|
6531
6531
|
properties: Record<string, Record<string, string>>;
|
|
6532
6532
|
postback: {
|
|
6533
6533
|
id: string;
|
|
@@ -6608,7 +6608,7 @@ type ThreadUntaggedLivechatWebhookData = LivechatWebhookDataBase<LivechatWebhook
|
|
|
6608
6608
|
}>;
|
|
6609
6609
|
type LivechatWebhookData = IncomingChatLivechatWebhookData | ChatDeactivatedLivechatWebhookData | ThreadTaggedLivechatWebhookData | ThreadUntaggedLivechatWebhookData | ChatTransferredLivechatWebhookData | UserAddedToChatLivechatWebhookData | UserRemovedFromChatWebhookData | IncomingEventLivechatWebhookData;
|
|
6610
6610
|
|
|
6611
|
-
type LivechatBotDefaultGroupPriority =
|
|
6611
|
+
type LivechatBotDefaultGroupPriority = 'first' | 'normal' | 'last' | 'supervisor';
|
|
6612
6612
|
interface CreateLivechatBotTemplateDto {
|
|
6613
6613
|
name: string;
|
|
6614
6614
|
avatar?: string;
|
|
@@ -7054,7 +7054,7 @@ declare const api: {
|
|
|
7054
7054
|
getApps({ filter }?: {
|
|
7055
7055
|
filter?: string | undefined;
|
|
7056
7056
|
}): Promise<ApplicationDto[] | null>;
|
|
7057
|
-
getAppsInstallations({ filter
|
|
7057
|
+
getAppsInstallations({ filter }?: {
|
|
7058
7058
|
filter?: "my" | "organization";
|
|
7059
7059
|
}): Promise<{
|
|
7060
7060
|
id: string;
|
|
@@ -7081,7 +7081,7 @@ declare const api: {
|
|
|
7081
7081
|
developers: {
|
|
7082
7082
|
developer: {
|
|
7083
7083
|
getLedger(userId: string, options: DeveloperLedgerParams, authorization?: DpsClientAuthorization): Promise<unknown>;
|
|
7084
|
-
requestWithdrawal({ amount, note, userId
|
|
7084
|
+
requestWithdrawal({ amount, note, userId }: {
|
|
7085
7085
|
amount: string;
|
|
7086
7086
|
note: string;
|
|
7087
7087
|
userId: string;
|
|
@@ -7562,17 +7562,17 @@ declare function initApi(config: {
|
|
|
7562
7562
|
}): void;
|
|
7563
7563
|
|
|
7564
7564
|
declare const appRepositoryTemplatesMap: {
|
|
7565
|
-
readonly
|
|
7566
|
-
readonly
|
|
7567
|
-
readonly
|
|
7565
|
+
readonly 'livechat/developer-app-template-nextjs': "nextjs";
|
|
7566
|
+
readonly 'livechat/developer-app-template-vite': "vite";
|
|
7567
|
+
readonly 'livechat/developer-app-template-saas': "saas";
|
|
7568
7568
|
};
|
|
7569
7569
|
declare const appRepositoryTemplates: AppRepositoryTemplates;
|
|
7570
7570
|
|
|
7571
7571
|
declare const appTemplatesMap: {
|
|
7572
|
-
readonly
|
|
7572
|
+
readonly 'livechat/developer-app-template-saas': "saas";
|
|
7573
7573
|
};
|
|
7574
7574
|
declare const appBaseTemplates: {
|
|
7575
|
-
|
|
7575
|
+
'tag-master': AppBaseTemplate;
|
|
7576
7576
|
progress: AppBaseTemplate;
|
|
7577
7577
|
supervisor: AppBaseTemplate;
|
|
7578
7578
|
popup: AppBaseTemplate;
|
|
@@ -7598,7 +7598,7 @@ declare const API_NOTIFICATIONS: {
|
|
|
7598
7598
|
|
|
7599
7599
|
declare function getIntegrationFlowUrlForRedirection<TContext extends Extract<IntegrationFlowContext, {
|
|
7600
7600
|
mode: IntegrationModes.Redirect;
|
|
7601
|
-
}>, TState>(provider: string, flow: string, state: TState | string, context: Omit<TContext,
|
|
7601
|
+
}>, TState>(provider: string, flow: string, state: TState | string, context: Omit<TContext, 'state'>, config: {
|
|
7602
7602
|
adapterUrl: string;
|
|
7603
7603
|
}): string;
|
|
7604
7604
|
declare function getIntegrationFlowUrl<TFlowContext, TFlowResult, TState>(name: IntegrationNames, flow: string, trigger: {
|