merchi_sdk_ts 1.18.0 → 1.20.0
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/entities/category.js +8 -0
- package/dist/entities/domain.js +32 -0
- package/package.json +1 -1
- package/src/entities/category.ts +6 -0
- package/src/entities/domain.ts +107 -0
|
@@ -48,6 +48,14 @@ var Category = /** @class */ (function (_super) {
|
|
|
48
48
|
Category.property(),
|
|
49
49
|
__metadata("design:type", Number)
|
|
50
50
|
], Category.prototype, "position", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
Category.property({ type: String }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], Category.prototype, "description", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
Category.property({ type: String }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], Category.prototype, "descriptionShort", void 0);
|
|
51
59
|
__decorate([
|
|
52
60
|
Category.property(),
|
|
53
61
|
__metadata("design:type", Boolean)
|
package/dist/entities/domain.js
CHANGED
|
@@ -125,6 +125,38 @@ var Domain = /** @class */ (function (_super) {
|
|
|
125
125
|
_this.resetStorefrontV2 = function () {
|
|
126
126
|
return _this.storefrontV2Request(_this.storefrontV2DomainResource('reset/'), 'POST');
|
|
127
127
|
};
|
|
128
|
+
_this.getStorefrontV2GoogleIntegrations = function () {
|
|
129
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('google_integrations/'), 'GET');
|
|
130
|
+
};
|
|
131
|
+
_this.saveStorefrontV2GoogleIntegrations = function (payload) {
|
|
132
|
+
var body = payload &&
|
|
133
|
+
typeof payload === 'object' &&
|
|
134
|
+
('googleIntegrations' in payload || 'google_integrations' in payload)
|
|
135
|
+
? payload
|
|
136
|
+
: { googleIntegrations: payload };
|
|
137
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('google_integrations/'), 'POST', body);
|
|
138
|
+
};
|
|
139
|
+
_this.getStorefrontV2GaStatus = function () {
|
|
140
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('ga/status/'), 'GET');
|
|
141
|
+
};
|
|
142
|
+
_this.verifyStorefrontV2GaInstallation = function () {
|
|
143
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('ga/verify/'), 'POST');
|
|
144
|
+
};
|
|
145
|
+
_this.analyzeStorefrontV2Ga = function (payload) {
|
|
146
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('ga/analyze/'), 'POST', payload);
|
|
147
|
+
};
|
|
148
|
+
_this.applyStorefrontV2GaRecommendations = function (payload) {
|
|
149
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('ga/apply/'), 'POST', payload);
|
|
150
|
+
};
|
|
151
|
+
_this.getStorefrontV2GscStatus = function () {
|
|
152
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('gsc/status/'), 'GET');
|
|
153
|
+
};
|
|
154
|
+
_this.analyzeStorefrontV2Gsc = function (payload) {
|
|
155
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('gsc/analyze/'), 'POST', payload);
|
|
156
|
+
};
|
|
157
|
+
_this.applyStorefrontV2GscRecommendations = function (payload) {
|
|
158
|
+
return _this.storefrontV2Request(_this.storefrontV2DomainResource('gsc/apply/'), 'POST', payload);
|
|
159
|
+
};
|
|
128
160
|
_this.createStorefrontChangeRequest = function (payload) {
|
|
129
161
|
return _this.storefrontV2Request(_this.storefrontV2DomainResource('requests/'), 'POST', payload);
|
|
130
162
|
};
|
package/package.json
CHANGED
package/src/entities/category.ts
CHANGED
|
@@ -21,6 +21,12 @@ export class Category extends Entity {
|
|
|
21
21
|
@Category.property()
|
|
22
22
|
public position?: number;
|
|
23
23
|
|
|
24
|
+
@Category.property({type: String})
|
|
25
|
+
public description?: string | null;
|
|
26
|
+
|
|
27
|
+
@Category.property({type: String})
|
|
28
|
+
public descriptionShort?: string | null;
|
|
29
|
+
|
|
24
30
|
@Category.property()
|
|
25
31
|
public showDashboard?: boolean;
|
|
26
32
|
|
package/src/entities/domain.ts
CHANGED
|
@@ -109,6 +109,14 @@ export interface StorefrontV2ChangeRequest {
|
|
|
109
109
|
updatedAt?: string | null;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
export interface StorefrontGoogleIntegrations {
|
|
113
|
+
ga4MeasurementId?: string;
|
|
114
|
+
ga4PropertyId?: string;
|
|
115
|
+
googleAdsId?: string;
|
|
116
|
+
googleAdsConversionLabel?: string;
|
|
117
|
+
googleAdsQuoteConversionLabel?: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
112
120
|
export interface StorefrontV2Config {
|
|
113
121
|
id?: number;
|
|
114
122
|
domainId?: number;
|
|
@@ -124,6 +132,7 @@ export interface StorefrontV2Config {
|
|
|
124
132
|
repoName?: string | null;
|
|
125
133
|
vercelProjectId?: string | null;
|
|
126
134
|
lastSuccessfulCommitSha?: string | null;
|
|
135
|
+
googleIntegrations?: StorefrontGoogleIntegrations | null;
|
|
127
136
|
approvedStarterTemplates?: string[];
|
|
128
137
|
providerMode?: 'real' | 'deterministic' | 'unknown' | string;
|
|
129
138
|
isProvisioned?: boolean;
|
|
@@ -755,6 +764,104 @@ export class Domain extends Entity {
|
|
|
755
764
|
) as Promise<StorefrontV2ResetResult>;
|
|
756
765
|
};
|
|
757
766
|
|
|
767
|
+
public getStorefrontV2GoogleIntegrations = (): Promise<{
|
|
768
|
+
googleIntegrations: StorefrontGoogleIntegrations;
|
|
769
|
+
}> => {
|
|
770
|
+
return this.storefrontV2Request(
|
|
771
|
+
this.storefrontV2DomainResource('google_integrations/'),
|
|
772
|
+
'GET'
|
|
773
|
+
) as Promise<{googleIntegrations: StorefrontGoogleIntegrations}>;
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
public saveStorefrontV2GoogleIntegrations = (
|
|
777
|
+
payload: StorefrontGoogleIntegrations | {googleIntegrations: StorefrontGoogleIntegrations}
|
|
778
|
+
): Promise<{googleIntegrations: StorefrontGoogleIntegrations}> => {
|
|
779
|
+
const body =
|
|
780
|
+
payload &&
|
|
781
|
+
typeof payload === 'object' &&
|
|
782
|
+
('googleIntegrations' in payload || 'google_integrations' in payload)
|
|
783
|
+
? payload
|
|
784
|
+
: {googleIntegrations: payload};
|
|
785
|
+
return this.storefrontV2Request(
|
|
786
|
+
this.storefrontV2DomainResource('google_integrations/'),
|
|
787
|
+
'POST',
|
|
788
|
+
body
|
|
789
|
+
) as Promise<{googleIntegrations: StorefrontGoogleIntegrations}>;
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
public getStorefrontV2GaStatus = (): Promise<{gaStatus: Record<string, any>}> => {
|
|
793
|
+
return this.storefrontV2Request(
|
|
794
|
+
this.storefrontV2DomainResource('ga/status/'),
|
|
795
|
+
'GET'
|
|
796
|
+
) as Promise<{gaStatus: Record<string, any>}>;
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
public verifyStorefrontV2GaInstallation = (): Promise<{
|
|
800
|
+
gaVerification: Record<string, any>;
|
|
801
|
+
}> => {
|
|
802
|
+
return this.storefrontV2Request(
|
|
803
|
+
this.storefrontV2DomainResource('ga/verify/'),
|
|
804
|
+
'POST'
|
|
805
|
+
) as Promise<{gaVerification: Record<string, any>}>;
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
public analyzeStorefrontV2Ga = (
|
|
809
|
+
payload?: {days?: number}
|
|
810
|
+
): Promise<{gaAnalysis: Record<string, any>}> => {
|
|
811
|
+
return this.storefrontV2Request(
|
|
812
|
+
this.storefrontV2DomainResource('ga/analyze/'),
|
|
813
|
+
'POST',
|
|
814
|
+
payload
|
|
815
|
+
) as Promise<{gaAnalysis: Record<string, any>}>;
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
public applyStorefrontV2GaRecommendations = (payload: {
|
|
819
|
+
recommendationIds: string[];
|
|
820
|
+
recommendations?: Array<Record<string, any>>;
|
|
821
|
+
narrative?: string;
|
|
822
|
+
days?: number;
|
|
823
|
+
startNewBranch?: boolean;
|
|
824
|
+
branchName?: string;
|
|
825
|
+
}): Promise<{storefrontChangeRequest: StorefrontV2ChangeRequest}> => {
|
|
826
|
+
return this.storefrontV2Request(
|
|
827
|
+
this.storefrontV2DomainResource('ga/apply/'),
|
|
828
|
+
'POST',
|
|
829
|
+
payload
|
|
830
|
+
) as Promise<{storefrontChangeRequest: StorefrontV2ChangeRequest}>;
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
public getStorefrontV2GscStatus = (): Promise<{gscStatus: Record<string, any>}> => {
|
|
834
|
+
return this.storefrontV2Request(
|
|
835
|
+
this.storefrontV2DomainResource('gsc/status/'),
|
|
836
|
+
'GET'
|
|
837
|
+
) as Promise<{gscStatus: Record<string, any>}>;
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
public analyzeStorefrontV2Gsc = (
|
|
841
|
+
payload?: {days?: number}
|
|
842
|
+
): Promise<{gscAnalysis: Record<string, any>}> => {
|
|
843
|
+
return this.storefrontV2Request(
|
|
844
|
+
this.storefrontV2DomainResource('gsc/analyze/'),
|
|
845
|
+
'POST',
|
|
846
|
+
payload
|
|
847
|
+
) as Promise<{gscAnalysis: Record<string, any>}>;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
public applyStorefrontV2GscRecommendations = (payload: {
|
|
851
|
+
recommendationIds: string[];
|
|
852
|
+
recommendations?: Array<Record<string, any>>;
|
|
853
|
+
narrative?: string;
|
|
854
|
+
days?: number;
|
|
855
|
+
startNewBranch?: boolean;
|
|
856
|
+
branchName?: string;
|
|
857
|
+
}): Promise<{storefrontChangeRequest: StorefrontV2ChangeRequest}> => {
|
|
858
|
+
return this.storefrontV2Request(
|
|
859
|
+
this.storefrontV2DomainResource('gsc/apply/'),
|
|
860
|
+
'POST',
|
|
861
|
+
payload
|
|
862
|
+
) as Promise<{storefrontChangeRequest: StorefrontV2ChangeRequest}>;
|
|
863
|
+
};
|
|
864
|
+
|
|
758
865
|
public createStorefrontChangeRequest = (
|
|
759
866
|
payload?: StorefrontV2ChangeRequestPayload
|
|
760
867
|
): Promise<{storefrontChangeRequest: StorefrontV2ChangeRequest}> => {
|