arky-sdk 0.7.87 → 0.7.89
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.cjs +437 -369
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -21
- package/dist/index.d.ts +21 -21
- package/dist/index.js +437 -369
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +115 -87
- package/dist/types.d.ts +115 -87
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -27,7 +27,7 @@ interface AuthTokens {
|
|
|
27
27
|
interface HttpClientConfig {
|
|
28
28
|
baseUrl: string;
|
|
29
29
|
businessId: string;
|
|
30
|
-
refreshPath?: string;
|
|
30
|
+
refreshPath?: string | (() => string);
|
|
31
31
|
getToken?: () => Promise<AuthTokens> | AuthTokens;
|
|
32
32
|
setToken?: (tokens: AuthTokens) => void;
|
|
33
33
|
logout?: () => void;
|
|
@@ -109,7 +109,7 @@ interface Activity {
|
|
|
109
109
|
}
|
|
110
110
|
interface TimelineParams {
|
|
111
111
|
customer_id: string;
|
|
112
|
-
|
|
112
|
+
business_id?: string;
|
|
113
113
|
limit?: number;
|
|
114
114
|
cursor?: string;
|
|
115
115
|
}
|
|
@@ -172,7 +172,7 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
|
|
|
172
172
|
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
173
173
|
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
174
174
|
|
|
175
|
-
declare const SDK_VERSION = "0.7.
|
|
175
|
+
declare const SDK_VERSION = "0.7.89";
|
|
176
176
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
177
177
|
interface ApiConfig {
|
|
178
178
|
httpClient: any;
|
|
@@ -249,7 +249,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
249
249
|
updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions): Promise<any>;
|
|
250
250
|
deleteIntegration(params: DeleteIntegrationParams, options?: RequestOptions): Promise<any>;
|
|
251
251
|
getIntegrationConfig(params: {
|
|
252
|
-
|
|
252
|
+
business_id: string;
|
|
253
253
|
type: "payment" | "shipping";
|
|
254
254
|
}, options?: RequestOptions): Promise<any>;
|
|
255
255
|
listWebhooks(params: ListWebhooksParams, options?: RequestOptions): Promise<any>;
|
|
@@ -385,12 +385,12 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
385
385
|
merge: (params: MergeCustomersParams, options?: RequestOptions) => Promise<Customer>;
|
|
386
386
|
revokeToken: (params: {
|
|
387
387
|
id: string;
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
token_id: string;
|
|
389
|
+
business_id?: string;
|
|
390
390
|
}, options?: RequestOptions) => Promise<any>;
|
|
391
391
|
revokeAllTokens: (params: {
|
|
392
392
|
id: string;
|
|
393
|
-
|
|
393
|
+
business_id?: string;
|
|
394
394
|
}, options?: RequestOptions) => Promise<any>;
|
|
395
395
|
};
|
|
396
396
|
audience: {
|
|
@@ -439,7 +439,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
439
439
|
};
|
|
440
440
|
analytics: {
|
|
441
441
|
query: (spec: AnalyticsQuery, options?: RequestOptions & {
|
|
442
|
-
|
|
442
|
+
business_id?: string;
|
|
443
443
|
}) => Promise<AnalyticsQueryResponse>;
|
|
444
444
|
};
|
|
445
445
|
setBusinessId: (businessId: string) => void;
|
|
@@ -585,23 +585,23 @@ declare function createStorefront(config: HttpClientConfig & {
|
|
|
585
585
|
crm: {
|
|
586
586
|
customer: {
|
|
587
587
|
initialize(params?: {
|
|
588
|
-
|
|
588
|
+
business_id?: string;
|
|
589
589
|
market?: string;
|
|
590
|
-
}, options?: RequestOptions): any
|
|
591
|
-
connect(params: any, options?: RequestOptions): any
|
|
590
|
+
}, options?: RequestOptions): Promise<any>;
|
|
591
|
+
connect(params: any, options?: RequestOptions): Promise<any>;
|
|
592
592
|
requestCode(params: {
|
|
593
593
|
email: string;
|
|
594
|
-
|
|
594
|
+
business_id?: string;
|
|
595
595
|
}, options?: RequestOptions): any;
|
|
596
596
|
verify(params: {
|
|
597
597
|
email: string;
|
|
598
598
|
code: string;
|
|
599
|
-
|
|
600
|
-
}, options?: RequestOptions): any
|
|
599
|
+
business_id?: string;
|
|
600
|
+
}, options?: RequestOptions): Promise<any>;
|
|
601
601
|
refreshToken(params: {
|
|
602
602
|
refresh_token: string;
|
|
603
|
-
|
|
604
|
-
}, options?: RequestOptions): any
|
|
603
|
+
business_id?: string;
|
|
604
|
+
}, options?: RequestOptions): Promise<any>;
|
|
605
605
|
getMe(options?: RequestOptions): any;
|
|
606
606
|
};
|
|
607
607
|
audience: {
|
|
@@ -624,31 +624,31 @@ declare function createStorefront(config: HttpClientConfig & {
|
|
|
624
624
|
getAgents(params?: any, options?: RequestOptions): any;
|
|
625
625
|
getAgent(params: {
|
|
626
626
|
id: string;
|
|
627
|
-
|
|
627
|
+
business_id?: string;
|
|
628
628
|
}, options?: RequestOptions): any;
|
|
629
629
|
sendMessage(params: {
|
|
630
630
|
id: string;
|
|
631
631
|
message: string;
|
|
632
632
|
chat_id?: string;
|
|
633
|
-
|
|
633
|
+
business_id?: string;
|
|
634
634
|
}, options?: RequestOptions): any;
|
|
635
635
|
getChat(params: {
|
|
636
636
|
id: string;
|
|
637
637
|
chat_id: string;
|
|
638
|
-
|
|
638
|
+
business_id?: string;
|
|
639
639
|
}, options?: RequestOptions): any;
|
|
640
640
|
getChatMessages(params: {
|
|
641
641
|
id: string;
|
|
642
642
|
chat_id: string;
|
|
643
643
|
limit?: number;
|
|
644
|
-
|
|
644
|
+
business_id?: string;
|
|
645
645
|
}, options?: RequestOptions): any;
|
|
646
646
|
rateChat(params: {
|
|
647
647
|
id: string;
|
|
648
648
|
chat_id: string;
|
|
649
649
|
rating: number;
|
|
650
650
|
comment?: string;
|
|
651
|
-
|
|
651
|
+
business_id?: string;
|
|
652
652
|
}, options?: RequestOptions): any;
|
|
653
653
|
};
|
|
654
654
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ interface AuthTokens {
|
|
|
27
27
|
interface HttpClientConfig {
|
|
28
28
|
baseUrl: string;
|
|
29
29
|
businessId: string;
|
|
30
|
-
refreshPath?: string;
|
|
30
|
+
refreshPath?: string | (() => string);
|
|
31
31
|
getToken?: () => Promise<AuthTokens> | AuthTokens;
|
|
32
32
|
setToken?: (tokens: AuthTokens) => void;
|
|
33
33
|
logout?: () => void;
|
|
@@ -109,7 +109,7 @@ interface Activity {
|
|
|
109
109
|
}
|
|
110
110
|
interface TimelineParams {
|
|
111
111
|
customer_id: string;
|
|
112
|
-
|
|
112
|
+
business_id?: string;
|
|
113
113
|
limit?: number;
|
|
114
114
|
cursor?: string;
|
|
115
115
|
}
|
|
@@ -172,7 +172,7 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
|
|
|
172
172
|
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
173
173
|
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
174
174
|
|
|
175
|
-
declare const SDK_VERSION = "0.7.
|
|
175
|
+
declare const SDK_VERSION = "0.7.89";
|
|
176
176
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
177
177
|
interface ApiConfig {
|
|
178
178
|
httpClient: any;
|
|
@@ -249,7 +249,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
249
249
|
updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions): Promise<any>;
|
|
250
250
|
deleteIntegration(params: DeleteIntegrationParams, options?: RequestOptions): Promise<any>;
|
|
251
251
|
getIntegrationConfig(params: {
|
|
252
|
-
|
|
252
|
+
business_id: string;
|
|
253
253
|
type: "payment" | "shipping";
|
|
254
254
|
}, options?: RequestOptions): Promise<any>;
|
|
255
255
|
listWebhooks(params: ListWebhooksParams, options?: RequestOptions): Promise<any>;
|
|
@@ -385,12 +385,12 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
385
385
|
merge: (params: MergeCustomersParams, options?: RequestOptions) => Promise<Customer>;
|
|
386
386
|
revokeToken: (params: {
|
|
387
387
|
id: string;
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
token_id: string;
|
|
389
|
+
business_id?: string;
|
|
390
390
|
}, options?: RequestOptions) => Promise<any>;
|
|
391
391
|
revokeAllTokens: (params: {
|
|
392
392
|
id: string;
|
|
393
|
-
|
|
393
|
+
business_id?: string;
|
|
394
394
|
}, options?: RequestOptions) => Promise<any>;
|
|
395
395
|
};
|
|
396
396
|
audience: {
|
|
@@ -439,7 +439,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
439
439
|
};
|
|
440
440
|
analytics: {
|
|
441
441
|
query: (spec: AnalyticsQuery, options?: RequestOptions & {
|
|
442
|
-
|
|
442
|
+
business_id?: string;
|
|
443
443
|
}) => Promise<AnalyticsQueryResponse>;
|
|
444
444
|
};
|
|
445
445
|
setBusinessId: (businessId: string) => void;
|
|
@@ -585,23 +585,23 @@ declare function createStorefront(config: HttpClientConfig & {
|
|
|
585
585
|
crm: {
|
|
586
586
|
customer: {
|
|
587
587
|
initialize(params?: {
|
|
588
|
-
|
|
588
|
+
business_id?: string;
|
|
589
589
|
market?: string;
|
|
590
|
-
}, options?: RequestOptions): any
|
|
591
|
-
connect(params: any, options?: RequestOptions): any
|
|
590
|
+
}, options?: RequestOptions): Promise<any>;
|
|
591
|
+
connect(params: any, options?: RequestOptions): Promise<any>;
|
|
592
592
|
requestCode(params: {
|
|
593
593
|
email: string;
|
|
594
|
-
|
|
594
|
+
business_id?: string;
|
|
595
595
|
}, options?: RequestOptions): any;
|
|
596
596
|
verify(params: {
|
|
597
597
|
email: string;
|
|
598
598
|
code: string;
|
|
599
|
-
|
|
600
|
-
}, options?: RequestOptions): any
|
|
599
|
+
business_id?: string;
|
|
600
|
+
}, options?: RequestOptions): Promise<any>;
|
|
601
601
|
refreshToken(params: {
|
|
602
602
|
refresh_token: string;
|
|
603
|
-
|
|
604
|
-
}, options?: RequestOptions): any
|
|
603
|
+
business_id?: string;
|
|
604
|
+
}, options?: RequestOptions): Promise<any>;
|
|
605
605
|
getMe(options?: RequestOptions): any;
|
|
606
606
|
};
|
|
607
607
|
audience: {
|
|
@@ -624,31 +624,31 @@ declare function createStorefront(config: HttpClientConfig & {
|
|
|
624
624
|
getAgents(params?: any, options?: RequestOptions): any;
|
|
625
625
|
getAgent(params: {
|
|
626
626
|
id: string;
|
|
627
|
-
|
|
627
|
+
business_id?: string;
|
|
628
628
|
}, options?: RequestOptions): any;
|
|
629
629
|
sendMessage(params: {
|
|
630
630
|
id: string;
|
|
631
631
|
message: string;
|
|
632
632
|
chat_id?: string;
|
|
633
|
-
|
|
633
|
+
business_id?: string;
|
|
634
634
|
}, options?: RequestOptions): any;
|
|
635
635
|
getChat(params: {
|
|
636
636
|
id: string;
|
|
637
637
|
chat_id: string;
|
|
638
|
-
|
|
638
|
+
business_id?: string;
|
|
639
639
|
}, options?: RequestOptions): any;
|
|
640
640
|
getChatMessages(params: {
|
|
641
641
|
id: string;
|
|
642
642
|
chat_id: string;
|
|
643
643
|
limit?: number;
|
|
644
|
-
|
|
644
|
+
business_id?: string;
|
|
645
645
|
}, options?: RequestOptions): any;
|
|
646
646
|
rateChat(params: {
|
|
647
647
|
id: string;
|
|
648
648
|
chat_id: string;
|
|
649
649
|
rating: number;
|
|
650
650
|
comment?: string;
|
|
651
|
-
|
|
651
|
+
business_id?: string;
|
|
652
652
|
}, options?: RequestOptions): any;
|
|
653
653
|
};
|
|
654
654
|
};
|