@wix/auto_sdk_app-management_external-billing 1.0.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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.context.d.ts +5 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.context.js +9 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.context.js.map +1 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.http.d.ts +7 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.http.js +105 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.http.js.map +1 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.meta.d.ts +13 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.meta.js +47 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.meta.js.map +1 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.public.d.ts +15 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.public.js +14 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.public.js.map +1 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.types.d.ts +54 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.types.js +10 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.types.js.map +1 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.universal.d.ts +80 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.universal.js +76 -0
- package/build/cjs/src/market-aim-v1-external-billing-event-external-billing.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.context.d.ts +5 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.context.js +5 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.context.js.map +1 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.http.d.ts +7 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.http.js +101 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.http.js.map +1 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.meta.d.ts +13 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.meta.js +20 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.meta.js.map +1 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.public.d.ts +15 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.public.js +9 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.public.js.map +1 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.types.d.ts +54 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.types.js +7 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.types.js.map +1 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.universal.d.ts +80 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.universal.js +49 -0
- package/build/es/src/market-aim-v1-external-billing-event-external-billing.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.context.d.ts +5 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.context.js +9 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.context.js.map +1 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.http.d.ts +7 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.http.js +105 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.http.js.map +1 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.meta.d.ts +13 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.meta.js +47 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.meta.js.map +1 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.public.d.ts +15 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.public.js +14 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.public.js.map +1 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.types.d.ts +54 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.types.js +10 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.types.js.map +1 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.universal.d.ts +80 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.universal.js +76 -0
- package/build/internal/cjs/src/market-aim-v1-external-billing-event-external-billing.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.context.d.ts +5 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.context.js +5 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.context.js.map +1 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.http.d.ts +7 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.http.js +101 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.http.js.map +1 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.meta.d.ts +13 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.meta.js +20 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.meta.js.map +1 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.public.d.ts +15 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.public.js +9 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.public.js.map +1 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.types.d.ts +54 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.types.js +7 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.types.js.map +1 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.universal.d.ts +80 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.universal.js +49 -0
- package/build/internal/es/src/market-aim-v1-external-billing-event-external-billing.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/market-aim-v1-external-billing-event-external-billing.context.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/market-aim-v1-external-billing-event-external-billing.context.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yGAAuF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/market-aim-v1-external-billing-event-external-billing.universal.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.typings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2GAAyF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/market-aim-v1-external-billing-event-external-billing.meta.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/market-aim-v1-external-billing-event-external-billing.meta.js"), exports);
|
|
18
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sGAAoF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { reportExternalBillingEvent as publicReportExternalBillingEvent } from './market-aim-v1-external-billing-event-external-billing.public.js';
|
|
2
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
+
export declare const reportExternalBillingEvent: MaybeContext<BuildRESTFunction<typeof publicReportExternalBillingEvent> & typeof publicReportExternalBillingEvent>;
|
|
4
|
+
export { BillingType } from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
5
|
+
export { ExternalBillingEvent, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse, ReportExternalBillingEventOptions, } from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingType = exports.reportExternalBillingEvent = void 0;
|
|
4
|
+
const market_aim_v1_external_billing_event_external_billing_public_js_1 = require("./market-aim-v1-external-billing-event-external-billing.public.js");
|
|
5
|
+
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
6
|
+
exports.reportExternalBillingEvent = (0, rest_modules_1.createRESTModule)(market_aim_v1_external_billing_event_external_billing_public_js_1.reportExternalBillingEvent);
|
|
7
|
+
var market_aim_v1_external_billing_event_external_billing_universal_js_1 = require("./market-aim-v1-external-billing-event-external-billing.universal.js");
|
|
8
|
+
Object.defineProperty(exports, "BillingType", { enumerable: true, get: function () { return market_aim_v1_external_billing_event_external_billing_universal_js_1.BillingType; } });
|
|
9
|
+
//# sourceMappingURL=market-aim-v1-external-billing-event-external-billing.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market-aim-v1-external-billing-event-external-billing.context.js","sourceRoot":"","sources":["../../../src/market-aim-v1-external-billing-event-external-billing.context.ts"],"names":[],"mappings":";;;AAAA,uJAAmJ;AACnJ,gEAAiE;AAGpD,QAAA,0BAA0B,GAGrB,IAAA,+BAAgB,EAAC,4FAAgC,CAAC,CAAC;AAErE,2JAAmG;AAA1F,iKAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* Sends an external billing event to Wix.
|
|
4
|
+
* Use this to report charges or refunds for your [Partner Billed App](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/partner-billed-apps-reporting).
|
|
5
|
+
* The reported event enables Wix to track revenue, deductions, and shares related to third-party billing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function reportExternalBillingEvent(payload: object): RequestOptionsFactory<any>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reportExternalBillingEvent = void 0;
|
|
4
|
+
const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
5
|
+
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
6
|
+
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
7
|
+
function resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(opts) {
|
|
8
|
+
const domainToMappings = {
|
|
9
|
+
'api._api_base_domain_': [
|
|
10
|
+
{
|
|
11
|
+
srcPath: '/app-instance-manager-webapp',
|
|
12
|
+
destPath: '',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
'www.wixapis.com': [
|
|
16
|
+
{
|
|
17
|
+
srcPath: '/apps',
|
|
18
|
+
destPath: '',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
'wixapis.com': [
|
|
22
|
+
{
|
|
23
|
+
srcPath: '/apps',
|
|
24
|
+
destPath: '',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
'dev._base_domain_': [
|
|
28
|
+
{
|
|
29
|
+
srcPath: '/_api/app-instance-manager',
|
|
30
|
+
destPath: '',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
srcPath: '/api/v1/instance',
|
|
34
|
+
destPath: '/v1/instance',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
srcPath: '/api/v1/scripts',
|
|
38
|
+
destPath: '/v1/scripts',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
'manage._base_domain_': [
|
|
42
|
+
{
|
|
43
|
+
srcPath: '/_api/app-instance-manager',
|
|
44
|
+
destPath: '',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
'www._base_domain_': [
|
|
48
|
+
{
|
|
49
|
+
srcPath: '/_api/app-instance-manager',
|
|
50
|
+
destPath: '',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
'editor._base_domain_': [
|
|
54
|
+
{
|
|
55
|
+
srcPath: '/_api/app-instance-manager',
|
|
56
|
+
destPath: '',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
'blocks._base_domain_': [
|
|
60
|
+
{
|
|
61
|
+
srcPath: '/_api/app-instance-manager',
|
|
62
|
+
destPath: '',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
'create.editorx': [
|
|
66
|
+
{
|
|
67
|
+
srcPath: '/_api/app-instance-manager',
|
|
68
|
+
destPath: '',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
return (0, rest_modules_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
73
|
+
}
|
|
74
|
+
const PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';
|
|
75
|
+
/**
|
|
76
|
+
* Sends an external billing event to Wix.
|
|
77
|
+
* Use this to report charges or refunds for your [Partner Billed App](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/partner-billed-apps-reporting).
|
|
78
|
+
* The reported event enables Wix to track revenue, deductions, and shares related to third-party billing.
|
|
79
|
+
*/
|
|
80
|
+
function reportExternalBillingEvent(payload) {
|
|
81
|
+
function __reportExternalBillingEvent({ host }) {
|
|
82
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
83
|
+
{
|
|
84
|
+
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
|
85
|
+
paths: [{ path: 'event.createdDate' }],
|
|
86
|
+
},
|
|
87
|
+
]);
|
|
88
|
+
const metadata = {
|
|
89
|
+
entityFqdn: 'wix.market.aim.v1.external_billing_event',
|
|
90
|
+
method: 'POST',
|
|
91
|
+
methodFqn: 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',
|
|
92
|
+
packageName: PACKAGE_NAME,
|
|
93
|
+
url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({
|
|
94
|
+
protoPath: '/v1/billing-event',
|
|
95
|
+
data: serializedData,
|
|
96
|
+
host,
|
|
97
|
+
}),
|
|
98
|
+
data: serializedData,
|
|
99
|
+
};
|
|
100
|
+
return metadata;
|
|
101
|
+
}
|
|
102
|
+
return __reportExternalBillingEvent;
|
|
103
|
+
}
|
|
104
|
+
exports.reportExternalBillingEvent = reportExternalBillingEvent;
|
|
105
|
+
//# sourceMappingURL=market-aim-v1-external-billing-event-external-billing.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market-aim-v1-external-billing-event-external-billing.http.js","sourceRoot":"","sources":["../../../src/market-aim-v1-external-billing-event-external-billing.http.ts"],"names":[],"mappings":";;;AAAA,0EAAkG;AAClG,sFAAkF;AAClF,gEAA2D;AAI3D,SAAS,yDAAyD,CAChE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,8BAA8B;gBACvC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,EAAE;aACb;SACF;QACD,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,QAAQ,EAAE,cAAc;aACzB;YACD;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,QAAQ,EAAE,aAAa;aACxB;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,gBAAgB,EAAE;YAChB;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,IAAA,yBAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,+CAA+C,CAAC;AAErE;;;;GAIG;AACH,SAAgB,0BAA0B,CACxC,OAAe;IAEf,SAAS,4BAA4B,CAAC,EAAE,IAAI,EAAO;QACjD,MAAM,cAAc,GAAG,IAAA,gCAAc,EAAC,OAAO,EAAE;YAC7C;gBACE,WAAW,EAAE,gDAAoC;gBACjD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;aACvC;SACF,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,0CAA0C;YACtD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,iFAAiF;YACnF,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,yDAAyD,CAAC;gBAC7D,SAAS,EAAE,mBAAmB;gBAC9B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;SACrB,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,4BAA4B,CAAC;AACtC,CAAC;AA5BD,gEA4BC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';
|
|
2
|
+
import * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
3
|
+
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
+
getUrl: (context: any) => string;
|
|
5
|
+
httpMethod: K;
|
|
6
|
+
path: string;
|
|
7
|
+
pathParams: M;
|
|
8
|
+
__requestType: T;
|
|
9
|
+
__originalRequestType: S;
|
|
10
|
+
__responseType: Q;
|
|
11
|
+
__originalResponseType: R;
|
|
12
|
+
};
|
|
13
|
+
export declare function reportExternalBillingEvent(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest, ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest, ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse, ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.reportExternalBillingEvent = void 0;
|
|
27
|
+
const ambassadorWixMarketAimV1ExternalBillingEvent = __importStar(require("./market-aim-v1-external-billing-event-external-billing.http.js"));
|
|
28
|
+
function reportExternalBillingEvent() {
|
|
29
|
+
const payload = {};
|
|
30
|
+
const getRequestOptions = ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(payload);
|
|
31
|
+
const getUrl = (context) => {
|
|
32
|
+
const { url } = getRequestOptions(context);
|
|
33
|
+
return url;
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
getUrl,
|
|
37
|
+
httpMethod: 'POST',
|
|
38
|
+
path: '/v1/billing-event',
|
|
39
|
+
pathParams: {},
|
|
40
|
+
__requestType: null,
|
|
41
|
+
__originalRequestType: null,
|
|
42
|
+
__responseType: null,
|
|
43
|
+
__originalResponseType: null,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.reportExternalBillingEvent = reportExternalBillingEvent;
|
|
47
|
+
//# sourceMappingURL=market-aim-v1-external-billing-event-external-billing.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market-aim-v1-external-billing-event-external-billing.meta.js","sourceRoot":"","sources":["../../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8IAAgI;AAsBhI,SAAgB,0BAA0B;IAQxC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,4CAA4C,CAAC,0BAA0B,CACrE,OAAO,CACR,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA9BD,gEA8BC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { ReportExternalBillingEventOptions } from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function reportExternalBillingEvent(httpClient: HttpClient): ReportExternalBillingEventSignature;
|
|
7
|
+
interface ReportExternalBillingEventSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Sends an external billing event to Wix.
|
|
10
|
+
* Use this to report charges or refunds for your [Partner Billed App](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/partner-billed-apps-reporting).
|
|
11
|
+
* The reported event enables Wix to track revenue, deductions, and shares related to third-party billing.
|
|
12
|
+
*/
|
|
13
|
+
(options?: ReportExternalBillingEventOptions | undefined): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export { BillingType, ExternalBillingEvent, ReportExternalBillingEventOptions, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse, } from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingType = exports.reportExternalBillingEvent = exports.__metadata = void 0;
|
|
4
|
+
const market_aim_v1_external_billing_event_external_billing_universal_js_1 = require("./market-aim-v1-external-billing-event-external-billing.universal.js");
|
|
5
|
+
exports.__metadata = { PACKAGE_NAME: '@wix/app-management' };
|
|
6
|
+
function reportExternalBillingEvent(httpClient) {
|
|
7
|
+
return (options) => (0, market_aim_v1_external_billing_event_external_billing_universal_js_1.reportExternalBillingEvent)(options,
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
{ httpClient });
|
|
10
|
+
}
|
|
11
|
+
exports.reportExternalBillingEvent = reportExternalBillingEvent;
|
|
12
|
+
var market_aim_v1_external_billing_event_external_billing_universal_js_2 = require("./market-aim-v1-external-billing-event-external-billing.universal.js");
|
|
13
|
+
Object.defineProperty(exports, "BillingType", { enumerable: true, get: function () { return market_aim_v1_external_billing_event_external_billing_universal_js_2.BillingType; } });
|
|
14
|
+
//# sourceMappingURL=market-aim-v1-external-billing-event-external-billing.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market-aim-v1-external-billing-event-external-billing.public.js","sourceRoot":"","sources":["../../../src/market-aim-v1-external-billing-event-external-billing.public.ts"],"names":[],"mappings":";;;AACA,6JAG8E;AAEjE,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAElE,SAAgB,0BAA0B,CACxC,UAAsB;IAEtB,OAAO,CACL,OAGC,EACD,EAAE,CACF,IAAA,+FAAmC,EACjC,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAdD,gEAcC;AAWD,2JAM8E;AAL5E,iKAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface ExternalBillingEvent {
|
|
2
|
+
/**
|
|
3
|
+
* The app ID linked to this transaction.
|
|
4
|
+
* @format GUID
|
|
5
|
+
*/
|
|
6
|
+
appId?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* The app instance ID linked to this transaction.
|
|
9
|
+
*
|
|
10
|
+
* This connects the transaction to a specific instance of your app installed on a Wix site.
|
|
11
|
+
* Learn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).
|
|
12
|
+
* @format GUID
|
|
13
|
+
*/
|
|
14
|
+
instanceId?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* The total amount of the transaction in USD, not including tax.
|
|
17
|
+
* This value can be negative, such as for adjustments or refunds.
|
|
18
|
+
* @format DECIMAL_VALUE
|
|
19
|
+
* @decimalValue options { maxScale:10 }
|
|
20
|
+
*/
|
|
21
|
+
grossRevenue?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The amount charged minus agreed-upon expenses, such as shipping fees.
|
|
24
|
+
* This value can be negative.
|
|
25
|
+
* @format DECIMAL_VALUE
|
|
26
|
+
* @decimalValue options { maxScale:10 }
|
|
27
|
+
*/
|
|
28
|
+
netRevenue?: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Wix's share of the transaction in USD.
|
|
31
|
+
* This value can be negative, such as for adjustments or refunds.
|
|
32
|
+
* @format DECIMAL_VALUE
|
|
33
|
+
* @decimalValue options { maxScale:10 }
|
|
34
|
+
*/
|
|
35
|
+
wixShare?: string;
|
|
36
|
+
/** The date and time of the transaction. */
|
|
37
|
+
createdDate?: Date | null;
|
|
38
|
+
/** The type of billing event, either charge or refund. */
|
|
39
|
+
billingType?: BillingType;
|
|
40
|
+
}
|
|
41
|
+
export declare enum BillingType {
|
|
42
|
+
UNKNOWN = "UNKNOWN",
|
|
43
|
+
CHARGE = "CHARGE",
|
|
44
|
+
REFUND = "REFUND"
|
|
45
|
+
}
|
|
46
|
+
export interface ReportExternalBillingEventRequest {
|
|
47
|
+
/**
|
|
48
|
+
* The billing event with details of the external transaction, including the gross revenue,
|
|
49
|
+
* net revenue, and billing type (charge or refund).
|
|
50
|
+
*/
|
|
51
|
+
event?: ExternalBillingEvent;
|
|
52
|
+
}
|
|
53
|
+
export interface ReportExternalBillingEventResponse {
|
|
54
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingType = void 0;
|
|
4
|
+
var BillingType;
|
|
5
|
+
(function (BillingType) {
|
|
6
|
+
BillingType["UNKNOWN"] = "UNKNOWN";
|
|
7
|
+
BillingType["CHARGE"] = "CHARGE";
|
|
8
|
+
BillingType["REFUND"] = "REFUND";
|
|
9
|
+
})(BillingType || (exports.BillingType = BillingType = {}));
|
|
10
|
+
//# sourceMappingURL=market-aim-v1-external-billing-event-external-billing.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market-aim-v1-external-billing-event-external-billing.types.js","sourceRoot":"","sources":["../../../src/market-aim-v1-external-billing-event-external-billing.types.ts"],"names":[],"mappings":";;;AAyCA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
export interface ExternalBillingEvent {
|
|
3
|
+
/**
|
|
4
|
+
* The app ID linked to this transaction.
|
|
5
|
+
* @format GUID
|
|
6
|
+
*/
|
|
7
|
+
appId?: string | null;
|
|
8
|
+
/**
|
|
9
|
+
* The app instance ID linked to this transaction.
|
|
10
|
+
*
|
|
11
|
+
* This connects the transaction to a specific instance of your app installed on a Wix site.
|
|
12
|
+
* Learn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).
|
|
13
|
+
* @format GUID
|
|
14
|
+
*/
|
|
15
|
+
instanceId?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The total amount of the transaction in USD, not including tax.
|
|
18
|
+
* This value can be negative, such as for adjustments or refunds.
|
|
19
|
+
* @format DECIMAL_VALUE
|
|
20
|
+
* @decimalValue options { maxScale:10 }
|
|
21
|
+
*/
|
|
22
|
+
grossRevenue?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The amount charged minus agreed-upon expenses, such as shipping fees.
|
|
25
|
+
* This value can be negative.
|
|
26
|
+
* @format DECIMAL_VALUE
|
|
27
|
+
* @decimalValue options { maxScale:10 }
|
|
28
|
+
*/
|
|
29
|
+
netRevenue?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Wix's share of the transaction in USD.
|
|
32
|
+
* This value can be negative, such as for adjustments or refunds.
|
|
33
|
+
* @format DECIMAL_VALUE
|
|
34
|
+
* @decimalValue options { maxScale:10 }
|
|
35
|
+
*/
|
|
36
|
+
wixShare?: string;
|
|
37
|
+
/** The date and time of the transaction. */
|
|
38
|
+
_createdDate?: Date | null;
|
|
39
|
+
/** The type of billing event, either charge or refund. */
|
|
40
|
+
billingType?: BillingType;
|
|
41
|
+
}
|
|
42
|
+
export declare enum BillingType {
|
|
43
|
+
UNKNOWN = "UNKNOWN",
|
|
44
|
+
CHARGE = "CHARGE",
|
|
45
|
+
REFUND = "REFUND"
|
|
46
|
+
}
|
|
47
|
+
export interface ReportExternalBillingEventRequest {
|
|
48
|
+
/**
|
|
49
|
+
* The billing event with details of the external transaction, including the gross revenue,
|
|
50
|
+
* net revenue, and billing type (charge or refund).
|
|
51
|
+
*/
|
|
52
|
+
event?: ExternalBillingEvent;
|
|
53
|
+
}
|
|
54
|
+
export interface ReportExternalBillingEventResponse {
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Sends an external billing event to Wix.
|
|
58
|
+
* Use this to report charges or refunds for your [Partner Billed App](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/partner-billed-apps-reporting).
|
|
59
|
+
* The reported event enables Wix to track revenue, deductions, and shares related to third-party billing.
|
|
60
|
+
* @public
|
|
61
|
+
* @documentationMaturity preview
|
|
62
|
+
* @requiredField options.event.billingType
|
|
63
|
+
* @requiredField options.event.grossRevenue
|
|
64
|
+
* @requiredField options.event.wixShare
|
|
65
|
+
* @permissionId WIX_DEVELOPERS.SEND_BI_EVENTS
|
|
66
|
+
* @permissionScope Manage Your App
|
|
67
|
+
* @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
|
|
68
|
+
* @permissionScope Read site, business, and email details
|
|
69
|
+
* @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
|
|
70
|
+
* @applicableIdentity APP
|
|
71
|
+
* @fqn com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent
|
|
72
|
+
*/
|
|
73
|
+
export declare function reportExternalBillingEvent(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`>): Promise<void>;
|
|
74
|
+
export interface ReportExternalBillingEventOptions {
|
|
75
|
+
/**
|
|
76
|
+
* The billing event with details of the external transaction, including the gross revenue,
|
|
77
|
+
* net revenue, and billing type (charge or refund).
|
|
78
|
+
*/
|
|
79
|
+
event?: ExternalBillingEvent;
|
|
80
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.reportExternalBillingEvent = exports.BillingType = void 0;
|
|
27
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
+
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
29
|
+
const ambassadorWixMarketAimV1ExternalBillingEvent = __importStar(require("./market-aim-v1-external-billing-event-external-billing.http.js"));
|
|
30
|
+
var BillingType;
|
|
31
|
+
(function (BillingType) {
|
|
32
|
+
BillingType["UNKNOWN"] = "UNKNOWN";
|
|
33
|
+
BillingType["CHARGE"] = "CHARGE";
|
|
34
|
+
BillingType["REFUND"] = "REFUND";
|
|
35
|
+
})(BillingType || (exports.BillingType = BillingType = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Sends an external billing event to Wix.
|
|
38
|
+
* Use this to report charges or refunds for your [Partner Billed App](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/partner-billed-apps-reporting).
|
|
39
|
+
* The reported event enables Wix to track revenue, deductions, and shares related to third-party billing.
|
|
40
|
+
* @public
|
|
41
|
+
* @documentationMaturity preview
|
|
42
|
+
* @requiredField options.event.billingType
|
|
43
|
+
* @requiredField options.event.grossRevenue
|
|
44
|
+
* @requiredField options.event.wixShare
|
|
45
|
+
* @permissionId WIX_DEVELOPERS.SEND_BI_EVENTS
|
|
46
|
+
* @permissionScope Manage Your App
|
|
47
|
+
* @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
|
|
48
|
+
* @permissionScope Read site, business, and email details
|
|
49
|
+
* @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
|
|
50
|
+
* @applicableIdentity APP
|
|
51
|
+
* @fqn com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent
|
|
52
|
+
*/
|
|
53
|
+
async function reportExternalBillingEvent(options) {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
56
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
57
|
+
event: options?.event,
|
|
58
|
+
});
|
|
59
|
+
const reqOpts = ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(payload);
|
|
60
|
+
sideEffects?.onSiteCall?.();
|
|
61
|
+
try {
|
|
62
|
+
const result = await httpClient.request(reqOpts);
|
|
63
|
+
sideEffects?.onSuccess?.(result);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
67
|
+
spreadPathsToArguments: {},
|
|
68
|
+
explicitPathsToArguments: { event: '$[0].event' },
|
|
69
|
+
singleArgumentUnchanged: false,
|
|
70
|
+
}, ['options']);
|
|
71
|
+
sideEffects?.onError?.(err);
|
|
72
|
+
throw transformedError;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.reportExternalBillingEvent = reportExternalBillingEvent;
|
|
76
|
+
//# sourceMappingURL=market-aim-v1-external-billing-event-external-billing.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market-aim-v1-external-billing-event-external-billing.universal.js","sourceRoot":"","sources":["../../../src/market-aim-v1-external-billing-event-external-billing.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAAgG;AAEhG,8IAAgI;AA2ChI,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAYD;;;;;;;;;;;;;;;;GAgBG;AACI,KAAK,UAAU,0BAA0B,CAC9C,OAGC;IAED,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC;QACpD,KAAK,EAAE,OAAO,EAAE,KAAK;KACtB,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,4CAA4C,CAAC,0BAA0B,CACrE,OAAO,CACR,CAAC;IAEJ,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE;YACjD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAvCD,gEAuCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/market-aim-v1-external-billing-event-external-billing.context.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,wEAAwE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,0EAA0E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/market-aim-v1-external-billing-event-external-billing.meta.js';
|
package/build/es/meta.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,qEAAqE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { reportExternalBillingEvent as publicReportExternalBillingEvent } from './market-aim-v1-external-billing-event-external-billing.public.js';
|
|
2
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
+
export declare const reportExternalBillingEvent: MaybeContext<BuildRESTFunction<typeof publicReportExternalBillingEvent> & typeof publicReportExternalBillingEvent>;
|
|
4
|
+
export { BillingType } from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
5
|
+
export { ExternalBillingEvent, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse, ReportExternalBillingEventOptions, } from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { reportExternalBillingEvent as publicReportExternalBillingEvent } from './market-aim-v1-external-billing-event-external-billing.public.js';
|
|
2
|
+
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
+
export const reportExternalBillingEvent = /*#__PURE__*/ createRESTModule(publicReportExternalBillingEvent);
|
|
4
|
+
export { BillingType } from './market-aim-v1-external-billing-event-external-billing.universal.js';
|
|
5
|
+
//# sourceMappingURL=market-aim-v1-external-billing-event-external-billing.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market-aim-v1-external-billing-event-external-billing.context.js","sourceRoot":"","sources":["../../../src/market-aim-v1-external-billing-event-external-billing.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,mEAAmE,CAAC;AACnJ,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,0BAA0B,GAGnC,aAAa,CAAC,gBAAgB,CAAC,gCAAgC,CAAC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,sEAAsE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* Sends an external billing event to Wix.
|
|
4
|
+
* Use this to report charges or refunds for your [Partner Billed App](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/partner-billed-apps-reporting).
|
|
5
|
+
* The reported event enables Wix to track revenue, deductions, and shares related to third-party billing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function reportExternalBillingEvent(payload: object): RequestOptionsFactory<any>;
|