@wix/auto_sdk_app-management_external-billing 1.0.18 → 1.0.20
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/meta.d.ts +7 -1
- package/build/cjs/meta.js +10 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/meta.d.mts +7 -1
- package/build/es/meta.mjs +9 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/meta.d.ts +7 -1
- package/build/internal/cjs/meta.js +10 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/meta.d.mts +7 -1
- package/build/internal/es/meta.mjs +9 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/meta.d.ts
CHANGED
|
@@ -63,6 +63,12 @@ interface ReportExternalBillingEventResponse {
|
|
|
63
63
|
/** The billing event that was processed. */
|
|
64
64
|
event?: ExternalBillingEvent;
|
|
65
65
|
}
|
|
66
|
+
/** @docsIgnore */
|
|
67
|
+
type ReportExternalBillingEventApplicationErrors = {
|
|
68
|
+
code?: 'FAILED_PRECONDITION';
|
|
69
|
+
description?: string;
|
|
70
|
+
data?: Record<string, any>;
|
|
71
|
+
};
|
|
66
72
|
|
|
67
73
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
68
74
|
getUrl: (context: any) => string;
|
|
@@ -76,4 +82,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
76
82
|
};
|
|
77
83
|
declare function reportExternalBillingEvent(): __PublicMethodMetaInfo<'POST', {}, ReportExternalBillingEventRequest$1, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse$1, ReportExternalBillingEventResponse>;
|
|
78
84
|
|
|
79
|
-
export { type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
|
85
|
+
export { BillingType as BillingTypeOriginal, type BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal, type ExternalBillingEvent as ExternalBillingEventOriginal, type ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal, type ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal, type ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal, type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
package/build/cjs/meta.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
+
BillingTypeOriginal: () => BillingType,
|
|
23
24
|
reportExternalBillingEvent: () => reportExternalBillingEvent2
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(meta_exports);
|
|
@@ -143,6 +144,14 @@ function reportExternalBillingEvent(payload) {
|
|
|
143
144
|
return __reportExternalBillingEvent;
|
|
144
145
|
}
|
|
145
146
|
|
|
147
|
+
// src/market-aim-v1-external-billing-event-external-billing.types.ts
|
|
148
|
+
var BillingType = /* @__PURE__ */ ((BillingType2) => {
|
|
149
|
+
BillingType2["UNKNOWN"] = "UNKNOWN";
|
|
150
|
+
BillingType2["CHARGE"] = "CHARGE";
|
|
151
|
+
BillingType2["REFUND"] = "REFUND";
|
|
152
|
+
return BillingType2;
|
|
153
|
+
})(BillingType || {});
|
|
154
|
+
|
|
146
155
|
// src/market-aim-v1-external-billing-event-external-billing.meta.ts
|
|
147
156
|
function reportExternalBillingEvent2() {
|
|
148
157
|
const payload = {};
|
|
@@ -166,6 +175,7 @@ function reportExternalBillingEvent2() {
|
|
|
166
175
|
}
|
|
167
176
|
// Annotate the CommonJS export names for ESM import in node:
|
|
168
177
|
0 && (module.exports = {
|
|
178
|
+
BillingTypeOriginal,
|
|
169
179
|
reportExternalBillingEvent
|
|
170
180
|
});
|
|
171
181
|
//# sourceMappingURL=meta.js.map
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["export * from './src/market-aim-v1-external-billing-event-external-billing.meta.js';\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oCAAAA;AAAA;AAAA;;;ACAA,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,Q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AeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACjHO,SAASC,8BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["reportExternalBillingEvent","import_timestamp","payload","reportExternalBillingEvent"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../src/market-aim-v1-external-billing-event-external-billing.types.ts","../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["export * from './src/market-aim-v1-external-billing-event-external-billing.meta.js';\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","export interface ExternalBillingEvent {\n /**\n * The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you're required to pass the app ID.\n * @format GUID\n */\n appId?: string | null;\n /**\n * The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you can optionally pass the instance ID.\n *\n * This connects the transaction to a specific instance of your app installed on a Wix site.\n * Learn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * The total amount of the transaction in USD, not including tax.\n * This value can be negative, such as for adjustments or refunds.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n grossRevenue?: string;\n /**\n * The amount charged in USD minus agreed-upon expenses, such as shipping fees. Wix subtracts its share from this amount.\n * The value can be negative.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n netRevenue?: string | null;\n /**\n * Wix's share of the transaction in USD, taken from the net revenue.\n * This value can be negative, such as for adjustments or refunds.\n *\n * Make sure to adjust the Wix share if it changes, for example after the first year of your partner agreement.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n wixShare?: string;\n /** The date and time of the transaction. */\n createdDate?: Date | null;\n /** The type of billing event, either charge or refund. */\n billingType?: BillingTypeWithLiterals;\n}\n\nexport enum BillingType {\n UNKNOWN = 'UNKNOWN',\n CHARGE = 'CHARGE',\n REFUND = 'REFUND',\n}\n\n/** @enumType */\nexport type BillingTypeWithLiterals =\n | BillingType\n | 'UNKNOWN'\n | 'CHARGE'\n | 'REFUND';\n\nexport interface ReportExternalBillingEventRequest {\n /**\n * The billing event with details of the external transaction, including the gross revenue,\n * net revenue, and billing type (charge or refund).\n */\n event?: ExternalBillingEvent;\n}\n\nexport interface ReportExternalBillingEventResponse {\n /** The billing event that was processed. */\n event?: ExternalBillingEvent;\n}\n\n/** @docsIgnore */\nexport type ReportExternalBillingEventApplicationErrors = {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n ExternalBillingEvent as ExternalBillingEventOriginal,\n BillingType as BillingTypeOriginal,\n BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal,\n ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal,\n ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal,\n ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal,\n} from './market-aim-v1-external-billing-event-external-billing.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,oCAAAA;AAAA;AAAA;;;ACAA,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACt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;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["reportExternalBillingEvent","import_timestamp","payload","BillingType","reportExternalBillingEvent"]}
|
package/build/es/meta.d.mts
CHANGED
|
@@ -63,6 +63,12 @@ interface ReportExternalBillingEventResponse {
|
|
|
63
63
|
/** The billing event that was processed. */
|
|
64
64
|
event?: ExternalBillingEvent;
|
|
65
65
|
}
|
|
66
|
+
/** @docsIgnore */
|
|
67
|
+
type ReportExternalBillingEventApplicationErrors = {
|
|
68
|
+
code?: 'FAILED_PRECONDITION';
|
|
69
|
+
description?: string;
|
|
70
|
+
data?: Record<string, any>;
|
|
71
|
+
};
|
|
66
72
|
|
|
67
73
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
68
74
|
getUrl: (context: any) => string;
|
|
@@ -76,4 +82,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
76
82
|
};
|
|
77
83
|
declare function reportExternalBillingEvent(): __PublicMethodMetaInfo<'POST', {}, ReportExternalBillingEventRequest$1, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse$1, ReportExternalBillingEventResponse>;
|
|
78
84
|
|
|
79
|
-
export { type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
|
85
|
+
export { BillingType as BillingTypeOriginal, type BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal, type ExternalBillingEvent as ExternalBillingEventOriginal, type ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal, type ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal, type ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal, type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
package/build/es/meta.mjs
CHANGED
|
@@ -117,6 +117,14 @@ function reportExternalBillingEvent(payload) {
|
|
|
117
117
|
return __reportExternalBillingEvent;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
// src/market-aim-v1-external-billing-event-external-billing.types.ts
|
|
121
|
+
var BillingType = /* @__PURE__ */ ((BillingType2) => {
|
|
122
|
+
BillingType2["UNKNOWN"] = "UNKNOWN";
|
|
123
|
+
BillingType2["CHARGE"] = "CHARGE";
|
|
124
|
+
BillingType2["REFUND"] = "REFUND";
|
|
125
|
+
return BillingType2;
|
|
126
|
+
})(BillingType || {});
|
|
127
|
+
|
|
120
128
|
// src/market-aim-v1-external-billing-event-external-billing.meta.ts
|
|
121
129
|
function reportExternalBillingEvent2() {
|
|
122
130
|
const payload = {};
|
|
@@ -139,6 +147,7 @@ function reportExternalBillingEvent2() {
|
|
|
139
147
|
};
|
|
140
148
|
}
|
|
141
149
|
export {
|
|
150
|
+
BillingType as BillingTypeOriginal,
|
|
142
151
|
reportExternalBillingEvent2 as reportExternalBillingEvent
|
|
143
152
|
};
|
|
144
153
|
//# sourceMappingURL=meta.mjs.map
|
package/build/es/meta.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AA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AAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","reportExternalBillingEvent"]}
|
|
1
|
+
{"version":3,"sources":["../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../src/market-aim-v1-external-billing-event-external-billing.types.ts","../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","export interface ExternalBillingEvent {\n /**\n * The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you're required to pass the app ID.\n * @format GUID\n */\n appId?: string | null;\n /**\n * The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you can optionally pass the instance ID.\n *\n * This connects the transaction to a specific instance of your app installed on a Wix site.\n * Learn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * The total amount of the transaction in USD, not including tax.\n * This value can be negative, such as for adjustments or refunds.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n grossRevenue?: string;\n /**\n * The amount charged in USD minus agreed-upon expenses, such as shipping fees. Wix subtracts its share from this amount.\n * The value can be negative.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n netRevenue?: string | null;\n /**\n * Wix's share of the transaction in USD, taken from the net revenue.\n * This value can be negative, such as for adjustments or refunds.\n *\n * Make sure to adjust the Wix share if it changes, for example after the first year of your partner agreement.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n wixShare?: string;\n /** The date and time of the transaction. */\n createdDate?: Date | null;\n /** The type of billing event, either charge or refund. */\n billingType?: BillingTypeWithLiterals;\n}\n\nexport enum BillingType {\n UNKNOWN = 'UNKNOWN',\n CHARGE = 'CHARGE',\n REFUND = 'REFUND',\n}\n\n/** @enumType */\nexport type BillingTypeWithLiterals =\n | BillingType\n | 'UNKNOWN'\n | 'CHARGE'\n | 'REFUND';\n\nexport interface ReportExternalBillingEventRequest {\n /**\n * The billing event with details of the external transaction, including the gross revenue,\n * net revenue, and billing type (charge or refund).\n */\n event?: ExternalBillingEvent;\n}\n\nexport interface ReportExternalBillingEventResponse {\n /** The billing event that was processed. */\n event?: ExternalBillingEvent;\n}\n\n/** @docsIgnore */\nexport type ReportExternalBillingEventApplicationErrors = {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n ExternalBillingEvent as ExternalBillingEventOriginal,\n BillingType as BillingTypeOriginal,\n BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal,\n ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal,\n ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal,\n ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal,\n} from './market-aim-v1-external-billing-event-external-billing.types.js';\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF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AC,EAAE,MAAM,oBAAoB,CAAC;AAAA,MACvC;AAAA,IACF,CAAC;AACD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,0DAA0D;AAAA,QAC7D,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,MACN,mBAAmB,CAACA,aAClB,eAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AC1FO,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,YAAS;AACT,EAAAA,aAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;;;ACvBL,SAASC,8BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","BillingType","reportExternalBillingEvent"]}
|
|
@@ -63,6 +63,12 @@ interface ReportExternalBillingEventResponse {
|
|
|
63
63
|
/** The billing event that was processed. */
|
|
64
64
|
event?: ExternalBillingEvent;
|
|
65
65
|
}
|
|
66
|
+
/** @docsIgnore */
|
|
67
|
+
type ReportExternalBillingEventApplicationErrors = {
|
|
68
|
+
code?: 'FAILED_PRECONDITION';
|
|
69
|
+
description?: string;
|
|
70
|
+
data?: Record<string, any>;
|
|
71
|
+
};
|
|
66
72
|
|
|
67
73
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
68
74
|
getUrl: (context: any) => string;
|
|
@@ -76,4 +82,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
76
82
|
};
|
|
77
83
|
declare function reportExternalBillingEvent(): __PublicMethodMetaInfo<'POST', {}, ReportExternalBillingEventRequest$1, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse$1, ReportExternalBillingEventResponse>;
|
|
78
84
|
|
|
79
|
-
export { type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
|
85
|
+
export { BillingType as BillingTypeOriginal, type BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal, type ExternalBillingEvent as ExternalBillingEventOriginal, type ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal, type ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal, type ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal, type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
+
BillingTypeOriginal: () => BillingType,
|
|
23
24
|
reportExternalBillingEvent: () => reportExternalBillingEvent2
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(meta_exports);
|
|
@@ -143,6 +144,14 @@ function reportExternalBillingEvent(payload) {
|
|
|
143
144
|
return __reportExternalBillingEvent;
|
|
144
145
|
}
|
|
145
146
|
|
|
147
|
+
// src/market-aim-v1-external-billing-event-external-billing.types.ts
|
|
148
|
+
var BillingType = /* @__PURE__ */ ((BillingType2) => {
|
|
149
|
+
BillingType2["UNKNOWN"] = "UNKNOWN";
|
|
150
|
+
BillingType2["CHARGE"] = "CHARGE";
|
|
151
|
+
BillingType2["REFUND"] = "REFUND";
|
|
152
|
+
return BillingType2;
|
|
153
|
+
})(BillingType || {});
|
|
154
|
+
|
|
146
155
|
// src/market-aim-v1-external-billing-event-external-billing.meta.ts
|
|
147
156
|
function reportExternalBillingEvent2() {
|
|
148
157
|
const payload = {};
|
|
@@ -166,6 +175,7 @@ function reportExternalBillingEvent2() {
|
|
|
166
175
|
}
|
|
167
176
|
// Annotate the CommonJS export names for ESM import in node:
|
|
168
177
|
0 && (module.exports = {
|
|
178
|
+
BillingTypeOriginal,
|
|
169
179
|
reportExternalBillingEvent
|
|
170
180
|
});
|
|
171
181
|
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../meta.ts","../../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["export * from './src/market-aim-v1-external-billing-event-external-billing.meta.js';\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oCAAAA;AAAA;AAAA;;;ACAA,uBAAqD;AACrD,IAA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;AAC7D;AAEA,IAAM,eAAe;AAOd,SAAS,2BACd,SAC4B;AAC5B,WAAS,6BAA6B,EAAE,KAAK,GAAQ;AACnD,UAAM,qBAAiB,uCAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAAA,MACvC;AAAA,IACF,CAAC;AACD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,0DAA0D;AAAA,QAC7D,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,MACN,mBAAmB,CAACC,iBAClB,uCAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACjHO,SAASC,8BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["reportExternalBillingEvent","import_timestamp","payload","reportExternalBillingEvent"]}
|
|
1
|
+
{"version":3,"sources":["../../../meta.ts","../../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../../src/market-aim-v1-external-billing-event-external-billing.types.ts","../../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["export * from './src/market-aim-v1-external-billing-event-external-billing.meta.js';\n","import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","export interface ExternalBillingEvent {\n /**\n * The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you're required to pass the app ID.\n * @format GUID\n */\n appId?: string | null;\n /**\n * The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you can optionally pass the instance ID.\n *\n * This connects the transaction to a specific instance of your app installed on a Wix site.\n * Learn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * The total amount of the transaction in USD, not including tax.\n * This value can be negative, such as for adjustments or refunds.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n grossRevenue?: string;\n /**\n * The amount charged in USD minus agreed-upon expenses, such as shipping fees. Wix subtracts its share from this amount.\n * The value can be negative.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n netRevenue?: string | null;\n /**\n * Wix's share of the transaction in USD, taken from the net revenue.\n * This value can be negative, such as for adjustments or refunds.\n *\n * Make sure to adjust the Wix share if it changes, for example after the first year of your partner agreement.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n wixShare?: string;\n /** The date and time of the transaction. */\n createdDate?: Date | null;\n /** The type of billing event, either charge or refund. */\n billingType?: BillingTypeWithLiterals;\n}\n\nexport enum BillingType {\n UNKNOWN = 'UNKNOWN',\n CHARGE = 'CHARGE',\n REFUND = 'REFUND',\n}\n\n/** @enumType */\nexport type BillingTypeWithLiterals =\n | BillingType\n | 'UNKNOWN'\n | 'CHARGE'\n | 'REFUND';\n\nexport interface ReportExternalBillingEventRequest {\n /**\n * The billing event with details of the external transaction, including the gross revenue,\n * net revenue, and billing type (charge or refund).\n */\n event?: ExternalBillingEvent;\n}\n\nexport interface ReportExternalBillingEventResponse {\n /** The billing event that was processed. */\n event?: ExternalBillingEvent;\n}\n\n/** @docsIgnore */\nexport type ReportExternalBillingEventApplicationErrors = {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n ExternalBillingEvent as ExternalBillingEventOriginal,\n BillingType as BillingTypeOriginal,\n BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal,\n ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal,\n ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal,\n ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal,\n} from './market-aim-v1-external-billing-event-external-billing.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,oCAAAA;AAAA;AAAA;;;ACAA,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UA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AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,0DAA0D;AAAA,QAC7D,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,MACN,mBAAmB,CAACC,iBAClB,uCAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AC1FO,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,YAAS;AACT,EAAAA,aAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;;;ACvBL,SAASC,8BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["reportExternalBillingEvent","import_timestamp","payload","BillingType","reportExternalBillingEvent"]}
|
|
@@ -63,6 +63,12 @@ interface ReportExternalBillingEventResponse {
|
|
|
63
63
|
/** The billing event that was processed. */
|
|
64
64
|
event?: ExternalBillingEvent;
|
|
65
65
|
}
|
|
66
|
+
/** @docsIgnore */
|
|
67
|
+
type ReportExternalBillingEventApplicationErrors = {
|
|
68
|
+
code?: 'FAILED_PRECONDITION';
|
|
69
|
+
description?: string;
|
|
70
|
+
data?: Record<string, any>;
|
|
71
|
+
};
|
|
66
72
|
|
|
67
73
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
68
74
|
getUrl: (context: any) => string;
|
|
@@ -76,4 +82,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
76
82
|
};
|
|
77
83
|
declare function reportExternalBillingEvent(): __PublicMethodMetaInfo<'POST', {}, ReportExternalBillingEventRequest$1, ReportExternalBillingEventRequest, ReportExternalBillingEventResponse$1, ReportExternalBillingEventResponse>;
|
|
78
84
|
|
|
79
|
-
export { type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
|
85
|
+
export { BillingType as BillingTypeOriginal, type BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal, type ExternalBillingEvent as ExternalBillingEventOriginal, type ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal, type ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal, type ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal, type __PublicMethodMetaInfo, reportExternalBillingEvent };
|
|
@@ -117,6 +117,14 @@ function reportExternalBillingEvent(payload) {
|
|
|
117
117
|
return __reportExternalBillingEvent;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
// src/market-aim-v1-external-billing-event-external-billing.types.ts
|
|
121
|
+
var BillingType = /* @__PURE__ */ ((BillingType2) => {
|
|
122
|
+
BillingType2["UNKNOWN"] = "UNKNOWN";
|
|
123
|
+
BillingType2["CHARGE"] = "CHARGE";
|
|
124
|
+
BillingType2["REFUND"] = "REFUND";
|
|
125
|
+
return BillingType2;
|
|
126
|
+
})(BillingType || {});
|
|
127
|
+
|
|
120
128
|
// src/market-aim-v1-external-billing-event-external-billing.meta.ts
|
|
121
129
|
function reportExternalBillingEvent2() {
|
|
122
130
|
const payload = {};
|
|
@@ -139,6 +147,7 @@ function reportExternalBillingEvent2() {
|
|
|
139
147
|
};
|
|
140
148
|
}
|
|
141
149
|
export {
|
|
150
|
+
BillingType as BillingTypeOriginal,
|
|
142
151
|
reportExternalBillingEvent2 as reportExternalBillingEvent
|
|
143
152
|
};
|
|
144
153
|
//# sourceMappingURL=meta.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QAC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A,aAClB,eAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACjHO,SAASC,8BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","reportExternalBillingEvent"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/market-aim-v1-external-billing-event-external-billing.http.ts","../../../src/market-aim-v1-external-billing-event-external-billing.types.ts","../../../src/market-aim-v1-external-billing-event-external-billing.meta.ts"],"sourcesContent":["import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_external-billing';\n\n/**\n * Sends an external billing event to Wix.\n * 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).\n * The reported event enables Wix to track revenue, deductions, and Wix's share related to partner billed app charges.\n */\nexport function reportExternalBillingEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportExternalBillingEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.market.aim.v1.external_billing_event',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({\n protoPath: '/v1/billing-event',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'event.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reportExternalBillingEvent;\n}\n","export interface ExternalBillingEvent {\n /**\n * The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you're required to pass the app ID.\n * @format GUID\n */\n appId?: string | null;\n /**\n * The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\n * in which case you can optionally pass the instance ID.\n *\n * This connects the transaction to a specific instance of your app installed on a Wix site.\n * Learn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * The total amount of the transaction in USD, not including tax.\n * This value can be negative, such as for adjustments or refunds.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n grossRevenue?: string;\n /**\n * The amount charged in USD minus agreed-upon expenses, such as shipping fees. Wix subtracts its share from this amount.\n * The value can be negative.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n netRevenue?: string | null;\n /**\n * Wix's share of the transaction in USD, taken from the net revenue.\n * This value can be negative, such as for adjustments or refunds.\n *\n * Make sure to adjust the Wix share if it changes, for example after the first year of your partner agreement.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:10 }\n */\n wixShare?: string;\n /** The date and time of the transaction. */\n createdDate?: Date | null;\n /** The type of billing event, either charge or refund. */\n billingType?: BillingTypeWithLiterals;\n}\n\nexport enum BillingType {\n UNKNOWN = 'UNKNOWN',\n CHARGE = 'CHARGE',\n REFUND = 'REFUND',\n}\n\n/** @enumType */\nexport type BillingTypeWithLiterals =\n | BillingType\n | 'UNKNOWN'\n | 'CHARGE'\n | 'REFUND';\n\nexport interface ReportExternalBillingEventRequest {\n /**\n * The billing event with details of the external transaction, including the gross revenue,\n * net revenue, and billing type (charge or refund).\n */\n event?: ExternalBillingEvent;\n}\n\nexport interface ReportExternalBillingEventResponse {\n /** The billing event that was processed. */\n event?: ExternalBillingEvent;\n}\n\n/** @docsIgnore */\nexport type ReportExternalBillingEventApplicationErrors = {\n code?: 'FAILED_PRECONDITION';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixMarketAimV1ExternalBillingEvent from './market-aim-v1-external-billing-event-external-billing.http.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventTypes from './market-aim-v1-external-billing-event-external-billing.types.js';\nimport * as ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes from './market-aim-v1-external-billing-event-external-billing.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function reportExternalBillingEvent(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventRequest,\n ambassadorWixMarketAimV1ExternalBillingEventUniversalTypes.ReportExternalBillingEventResponse,\n ambassadorWixMarketAimV1ExternalBillingEventTypes.ReportExternalBillingEventResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixMarketAimV1ExternalBillingEvent.reportExternalBillingEvent(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing-event',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n ExternalBillingEvent as ExternalBillingEventOriginal,\n BillingType as BillingTypeOriginal,\n BillingTypeWithLiterals as BillingTypeWithLiteralsOriginal,\n ReportExternalBillingEventRequest as ReportExternalBillingEventRequestOriginal,\n ReportExternalBillingEventResponse as ReportExternalBillingEventResponseOriginal,\n ReportExternalBillingEventApplicationErrors as ReportExternalBillingEventApplicationErrorsOriginal,\n} from './market-aim-v1-external-billing-event-external-billing.types.js';\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA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,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","BillingType","reportExternalBillingEvent"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_app-management_external-billing",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"service-plugins"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@wix/sdk-runtime": "^0.
|
|
32
|
+
"@wix/sdk-runtime": "^1.0.0",
|
|
33
33
|
"@wix/sdk-types": "^1.13.35"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fqdn": "wix.market.aim.v1.external_billing_event"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "7560fc0e2c235cedb8770e6a6e493b8a80101d1a28e9c4a0437c0e42"
|
|
54
54
|
}
|