@wix/auto_sdk_app-management_external-billing 1.0.32 → 1.0.34
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 -1
- package/build/cjs/index.js +3 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +3 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +3 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +3 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +3 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +3 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.typings.d.mts +1 -1
- package/package.json +5 -12
- package/build/cjs/schemas.d.ts +0 -36
- package/build/cjs/schemas.js +0 -103
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -36
- package/build/es/schemas.mjs +0 -65
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/index.js +0 -243
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -230
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -221
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -36
- package/build/internal/cjs/schemas.js +0 -103
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -218
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -205
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -193
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.d.mts +0 -36
- package/build/internal/es/schemas.mjs +0 -65
- package/build/internal/es/schemas.mjs.map +0 -1
- package/schemas/package.json +0 -3
package/build/es/meta.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transform
|
|
|
3
3
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
4
4
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
5
5
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
6
|
+
var TRANSFORM_PATHS_0 = [{ path: "event.createdDate" }];
|
|
6
7
|
function resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(opts) {
|
|
7
8
|
const domainToMappings = {
|
|
8
9
|
"api._api_base_domain_": [
|
|
@@ -128,7 +129,7 @@ function reportExternalBillingEvent(payload) {
|
|
|
128
129
|
const serializedData = transformPaths(payload, [
|
|
129
130
|
{
|
|
130
131
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
131
|
-
paths:
|
|
132
|
+
paths: TRANSFORM_PATHS_0
|
|
132
133
|
}
|
|
133
134
|
]);
|
|
134
135
|
const metadata = {
|
|
@@ -148,7 +149,7 @@ function reportExternalBillingEvent(payload) {
|
|
|
148
149
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
149
150
|
{
|
|
150
151
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
151
|
-
paths:
|
|
152
|
+
paths: TRANSFORM_PATHS_0
|
|
152
153
|
}
|
|
153
154
|
])
|
|
154
155
|
};
|
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.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 srcPath: '/devcenter/checkout/v1/checkout',\n destPath: '/v1/checkout',\n },\n {\n srcPath: '/devcenter/checkout/v1/metered-billing-charges',\n destPath: '/v1/metered-billing-charges',\n },\n {\n srcPath: '/devcenter/scripts/v1/scripts',\n destPath: '/v1/scripts',\n },\n {\n srcPath: '/market/aim/v1/billing-event',\n destPath: '/v1/billing-event',\n },\n {\n srcPath: '/devcenter/bi-events/v1/bi-event',\n destPath: '/v1/bi-event',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/devcenter/checkout/v1/checkout',\n destPath: '/v1/checkout',\n },\n {\n srcPath: '/devcenter/checkout/v1/metered-billing-charges',\n destPath: '/v1/metered-billing-charges',\n },\n {\n srcPath: '/devcenter/scripts/v1/scripts',\n destPath: '/v1/scripts',\n },\n {\n srcPath: '/market/aim/v1/billing-event',\n destPath: '/v1/billing-event',\n },\n {\n srcPath: '/devcenter/bi-events/v1/bi-event',\n destPath: '/v1/bi-event',\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 for refunds or adjustments.\n *\n * Example: \"120.50\" for a $120.50 charge, or \"-120.50\" for a $120.50 refund.\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 or\n * payment processing fees. Wix subtracts its share from this amount.\n * The value can be negative for refunds.\n *\n * Example calculation:\n * - Gross revenue: $120.50\n * - Minus expenses: $20.00 (shipping)\n * - Net revenue: $100.50\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 * Calculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\n * - Net revenue: $100.50\n * - Wix share (20%): $20.10\n *\n * Important: Update this value if your revenue share percentage changes.\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":"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","names":["payload","BillingType","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\nconst TRANSFORM_PATHS_0 = [{ path: 'event.createdDate' }];\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 srcPath: '/devcenter/checkout/v1/checkout',\n destPath: '/v1/checkout',\n },\n {\n srcPath: '/devcenter/checkout/v1/metered-billing-charges',\n destPath: '/v1/metered-billing-charges',\n },\n {\n srcPath: '/devcenter/scripts/v1/scripts',\n destPath: '/v1/scripts',\n },\n {\n srcPath: '/market/aim/v1/billing-event',\n destPath: '/v1/billing-event',\n },\n {\n srcPath: '/devcenter/bi-events/v1/bi-event',\n destPath: '/v1/bi-event',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/devcenter/checkout/v1/checkout',\n destPath: '/v1/checkout',\n },\n {\n srcPath: '/devcenter/checkout/v1/metered-billing-charges',\n destPath: '/v1/metered-billing-charges',\n },\n {\n srcPath: '/devcenter/scripts/v1/scripts',\n destPath: '/v1/scripts',\n },\n {\n srcPath: '/market/aim/v1/billing-event',\n destPath: '/v1/billing-event',\n },\n {\n srcPath: '/devcenter/bi-events/v1/bi-event',\n destPath: '/v1/bi-event',\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: TRANSFORM_PATHS_0,\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: TRANSFORM_PATHS_0,\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 for refunds or adjustments.\n *\n * Example: \"120.50\" for a $120.50 charge, or \"-120.50\" for a $120.50 refund.\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 or\n * payment processing fees. Wix subtracts its share from this amount.\n * The value can be negative for refunds.\n *\n * Example calculation:\n * - Gross revenue: $120.50\n * - Minus expenses: $20.00 (shipping)\n * - Net revenue: $100.50\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 * Calculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\n * - Net revenue: $100.50\n * - Wix share (20%): $20.10\n *\n * Important: Update this value if your revenue share percentage changes.\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":"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","names":["payload","BillingType","reportExternalBillingEvent"]}
|
|
@@ -9,7 +9,7 @@ interface ReportExternalBillingEventSignature {
|
|
|
9
9
|
* 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).
|
|
10
10
|
* The reported event enables Wix to track revenue, deductions, and Wix's share related to Partner Billed App charges.
|
|
11
11
|
*/
|
|
12
|
-
(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`,
|
|
12
|
+
(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`, 1>): Promise<NonNullablePaths<ReportExternalBillingEventResponse, `event.grossRevenue` | `event.wixShare` | `event.billingType`, 1> & {
|
|
13
13
|
__applicationErrorsType?: ReportExternalBillingEventApplicationErrors;
|
|
14
14
|
}>;
|
|
15
15
|
}
|
|
@@ -92,7 +92,7 @@ type ReportExternalBillingEventApplicationErrors = {
|
|
|
92
92
|
* @applicableIdentity APP
|
|
93
93
|
* @fqn com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent
|
|
94
94
|
*/
|
|
95
|
-
declare function reportExternalBillingEvent(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`,
|
|
95
|
+
declare function reportExternalBillingEvent(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`, 1>): Promise<NonNullablePaths<ReportExternalBillingEventResponse, `event.grossRevenue` | `event.wixShare` | `event.billingType`, 1> & {
|
|
96
96
|
__applicationErrorsType?: ReportExternalBillingEventApplicationErrors;
|
|
97
97
|
}>;
|
|
98
98
|
interface ReportExternalBillingEventOptions {
|
|
@@ -9,7 +9,7 @@ interface ReportExternalBillingEventSignature {
|
|
|
9
9
|
* 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).
|
|
10
10
|
* The reported event enables Wix to track revenue, deductions, and Wix's share related to Partner Billed App charges.
|
|
11
11
|
*/
|
|
12
|
-
(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`,
|
|
12
|
+
(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`, 1>): Promise<NonNullablePaths<ReportExternalBillingEventResponse, `event.grossRevenue` | `event.wixShare` | `event.billingType`, 1> & {
|
|
13
13
|
__applicationErrorsType?: ReportExternalBillingEventApplicationErrors;
|
|
14
14
|
}>;
|
|
15
15
|
}
|
|
@@ -92,7 +92,7 @@ type ReportExternalBillingEventApplicationErrors = {
|
|
|
92
92
|
* @applicableIdentity APP
|
|
93
93
|
* @fqn com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent
|
|
94
94
|
*/
|
|
95
|
-
declare function reportExternalBillingEvent(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`,
|
|
95
|
+
declare function reportExternalBillingEvent(options?: NonNullablePaths<ReportExternalBillingEventOptions, `event.billingType` | `event.grossRevenue` | `event.wixShare`, 1>): Promise<NonNullablePaths<ReportExternalBillingEventResponse, `event.grossRevenue` | `event.wixShare` | `event.billingType`, 1> & {
|
|
96
96
|
__applicationErrorsType?: ReportExternalBillingEventApplicationErrors;
|
|
97
97
|
}>;
|
|
98
98
|
interface ReportExternalBillingEventOptions {
|
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.34",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -21,23 +21,16 @@
|
|
|
21
21
|
"import": "./build/es/meta.mjs",
|
|
22
22
|
"require": "./build/cjs/meta.js",
|
|
23
23
|
"types": "./build/es/meta.d.mts"
|
|
24
|
-
},
|
|
25
|
-
"./schemas": {
|
|
26
|
-
"import": "./build/es/schemas.mjs",
|
|
27
|
-
"require": "./build/cjs/schemas.js",
|
|
28
|
-
"types": "./build/es/schemas.d.mts"
|
|
29
24
|
}
|
|
30
25
|
},
|
|
31
26
|
"files": [
|
|
32
27
|
"build",
|
|
33
28
|
"meta",
|
|
34
|
-
"service-plugins"
|
|
35
|
-
"schemas"
|
|
29
|
+
"service-plugins"
|
|
36
30
|
],
|
|
37
31
|
"dependencies": {
|
|
38
|
-
"@wix/sdk-runtime": "^1.0.
|
|
39
|
-
"@wix/sdk-types": "^1.17.
|
|
40
|
-
"zod": "^4.3.6"
|
|
32
|
+
"@wix/sdk-runtime": "^1.0.24",
|
|
33
|
+
"@wix/sdk-types": "^1.17.11"
|
|
41
34
|
},
|
|
42
35
|
"devDependencies": {
|
|
43
36
|
"tsup": "^8.4.0",
|
|
@@ -57,5 +50,5 @@
|
|
|
57
50
|
"fqdn": "wix.market.aim.v1.external_billing_event"
|
|
58
51
|
}
|
|
59
52
|
},
|
|
60
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "1726699a49729eaec68571238b86f301628e1a8ca17f6d0e6945431f"
|
|
61
54
|
}
|
package/build/cjs/schemas.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as z from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const ReportExternalBillingEventRequest: z.ZodObject<{
|
|
4
|
-
options: z.ZodOptional<z.ZodObject<{
|
|
5
|
-
event: z.ZodOptional<z.ZodObject<{
|
|
6
|
-
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
|
-
instanceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8
|
-
grossRevenue: z.ZodString;
|
|
9
|
-
netRevenue: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
-
wixShare: z.ZodString;
|
|
11
|
-
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
12
|
-
billingType: z.ZodEnum<{
|
|
13
|
-
UNKNOWN: "UNKNOWN";
|
|
14
|
-
CHARGE: "CHARGE";
|
|
15
|
-
REFUND: "REFUND";
|
|
16
|
-
}>;
|
|
17
|
-
}, z.core.$strip>>;
|
|
18
|
-
}, z.core.$strip>>;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
declare const ReportExternalBillingEventResponse: z.ZodObject<{
|
|
21
|
-
event: z.ZodOptional<z.ZodObject<{
|
|
22
|
-
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
-
instanceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
24
|
-
grossRevenue: z.ZodOptional<z.ZodString>;
|
|
25
|
-
netRevenue: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
26
|
-
wixShare: z.ZodOptional<z.ZodString>;
|
|
27
|
-
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
28
|
-
billingType: z.ZodOptional<z.ZodEnum<{
|
|
29
|
-
UNKNOWN: "UNKNOWN";
|
|
30
|
-
CHARGE: "CHARGE";
|
|
31
|
-
REFUND: "REFUND";
|
|
32
|
-
}>>;
|
|
33
|
-
}, z.core.$strip>>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
|
|
36
|
-
export { ReportExternalBillingEventRequest, ReportExternalBillingEventResponse };
|
package/build/cjs/schemas.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// schemas.ts
|
|
31
|
-
var schemas_exports = {};
|
|
32
|
-
__export(schemas_exports, {
|
|
33
|
-
ReportExternalBillingEventRequest: () => ReportExternalBillingEventRequest,
|
|
34
|
-
ReportExternalBillingEventResponse: () => ReportExternalBillingEventResponse
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(schemas_exports);
|
|
37
|
-
|
|
38
|
-
// src/market-aim-v1-external-billing-event-external-billing.schemas.ts
|
|
39
|
-
var z = __toESM(require("zod"));
|
|
40
|
-
var ReportExternalBillingEventRequest = z.object({
|
|
41
|
-
options: z.object({
|
|
42
|
-
event: z.object({
|
|
43
|
-
appId: z.string().describe(
|
|
44
|
-
"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you're required to pass the app ID."
|
|
45
|
-
).regex(
|
|
46
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
47
|
-
"Must be a valid GUID"
|
|
48
|
-
).optional().nullable(),
|
|
49
|
-
instanceId: z.string().describe(
|
|
50
|
-
"The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you can optionally pass the instance ID.\n\nThis connects the transaction to a specific instance of your app installed on a Wix site.\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances)."
|
|
51
|
-
).regex(
|
|
52
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
53
|
-
"Must be a valid GUID"
|
|
54
|
-
).optional().nullable(),
|
|
55
|
-
grossRevenue: z.string().describe(
|
|
56
|
-
'The total amount of the transaction in USD, not including tax.\nThis value can be negative for refunds or adjustments.\n\nExample: "120.50" for a $120.50 charge, or "-120.50" for a $120.50 refund.'
|
|
57
|
-
),
|
|
58
|
-
netRevenue: z.string().describe(
|
|
59
|
-
"The amount charged in USD minus agreed-upon expenses, such as shipping fees or\npayment processing fees. Wix subtracts its share from this amount.\nThe value can be negative for refunds.\n\nExample calculation:\n- Gross revenue: $120.50\n- Minus expenses: $20.00 (shipping)\n- Net revenue: $100.50"
|
|
60
|
-
).optional().nullable(),
|
|
61
|
-
wixShare: z.string().describe(
|
|
62
|
-
"Wix's share of the transaction in USD, taken from the net revenue.\nThis value can be negative, such as for adjustments or refunds.\n\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\n- Net revenue: $100.50\n- Wix share (20%): $20.10\n\nImportant: Update this value if your revenue share percentage changes."
|
|
63
|
-
),
|
|
64
|
-
_createdDate: z.date().describe("The date and time of the transaction.").optional().nullable(),
|
|
65
|
-
billingType: z.enum(["UNKNOWN", "CHARGE", "REFUND"])
|
|
66
|
-
}).describe(
|
|
67
|
-
"The billing event with details of the external transaction, including the gross revenue,\nnet revenue, and billing type (charge or refund)."
|
|
68
|
-
).optional()
|
|
69
|
-
}).optional()
|
|
70
|
-
});
|
|
71
|
-
var ReportExternalBillingEventResponse = z.object({
|
|
72
|
-
event: z.object({
|
|
73
|
-
appId: z.string().describe(
|
|
74
|
-
"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you're required to pass the app ID."
|
|
75
|
-
).regex(
|
|
76
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
77
|
-
"Must be a valid GUID"
|
|
78
|
-
).optional().nullable(),
|
|
79
|
-
instanceId: z.string().describe(
|
|
80
|
-
"The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you can optionally pass the instance ID.\n\nThis connects the transaction to a specific instance of your app installed on a Wix site.\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances)."
|
|
81
|
-
).regex(
|
|
82
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
83
|
-
"Must be a valid GUID"
|
|
84
|
-
).optional().nullable(),
|
|
85
|
-
grossRevenue: z.string().describe(
|
|
86
|
-
'The total amount of the transaction in USD, not including tax.\nThis value can be negative for refunds or adjustments.\n\nExample: "120.50" for a $120.50 charge, or "-120.50" for a $120.50 refund.'
|
|
87
|
-
).optional(),
|
|
88
|
-
netRevenue: z.string().describe(
|
|
89
|
-
"The amount charged in USD minus agreed-upon expenses, such as shipping fees or\npayment processing fees. Wix subtracts its share from this amount.\nThe value can be negative for refunds.\n\nExample calculation:\n- Gross revenue: $120.50\n- Minus expenses: $20.00 (shipping)\n- Net revenue: $100.50"
|
|
90
|
-
).optional().nullable(),
|
|
91
|
-
wixShare: z.string().describe(
|
|
92
|
-
"Wix's share of the transaction in USD, taken from the net revenue.\nThis value can be negative, such as for adjustments or refunds.\n\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\n- Net revenue: $100.50\n- Wix share (20%): $20.10\n\nImportant: Update this value if your revenue share percentage changes."
|
|
93
|
-
).optional(),
|
|
94
|
-
_createdDate: z.date().describe("The date and time of the transaction.").optional().nullable(),
|
|
95
|
-
billingType: z.enum(["UNKNOWN", "CHARGE", "REFUND"]).describe("The type of billing event, either charge or refund.").optional()
|
|
96
|
-
}).describe("The billing event that was processed.").optional()
|
|
97
|
-
});
|
|
98
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
-
0 && (module.exports = {
|
|
100
|
-
ReportExternalBillingEventRequest,
|
|
101
|
-
ReportExternalBillingEventResponse
|
|
102
|
-
});
|
|
103
|
-
//# sourceMappingURL=schemas.js.map
|
package/build/cjs/schemas.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../schemas.ts","../../src/market-aim-v1-external-billing-event-external-billing.schemas.ts"],"sourcesContent":["export * from './src/market-aim-v1-external-billing-event-external-billing.schemas.js';\n","import * as z from 'zod';\n\nexport const ReportExternalBillingEventRequest = z.object({\n options: z\n .object({\n event: z\n .object({\n appId: z\n .string()\n .describe(\n \"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you're required to pass the app ID.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n instanceId: z\n .string()\n .describe(\n 'The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you can optionally pass the instance ID.\\n\\nThis connects the transaction to a specific instance of your app installed on a Wix site.\\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n grossRevenue: z\n .string()\n .describe(\n 'The total amount of the transaction in USD, not including tax.\\nThis value can be negative for refunds or adjustments.\\n\\nExample: \"120.50\" for a $120.50 charge, or \"-120.50\" for a $120.50 refund.'\n ),\n netRevenue: z\n .string()\n .describe(\n 'The amount charged in USD minus agreed-upon expenses, such as shipping fees or\\npayment processing fees. Wix subtracts its share from this amount.\\nThe value can be negative for refunds.\\n\\nExample calculation:\\n- Gross revenue: $120.50\\n- Minus expenses: $20.00 (shipping)\\n- Net revenue: $100.50'\n )\n .optional()\n .nullable(),\n wixShare: z\n .string()\n .describe(\n \"Wix's share of the transaction in USD, taken from the net revenue.\\nThis value can be negative, such as for adjustments or refunds.\\n\\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\\n- Net revenue: $100.50\\n- Wix share (20%): $20.10\\n\\nImportant: Update this value if your revenue share percentage changes.\"\n ),\n _createdDate: z\n .date()\n .describe('The date and time of the transaction.')\n .optional()\n .nullable(),\n billingType: z.enum(['UNKNOWN', 'CHARGE', 'REFUND']),\n })\n .describe(\n 'The billing event with details of the external transaction, including the gross revenue,\\nnet revenue, and billing type (charge or refund).'\n )\n .optional(),\n })\n .optional(),\n});\nexport const ReportExternalBillingEventResponse = z.object({\n event: z\n .object({\n appId: z\n .string()\n .describe(\n \"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you're required to pass the app ID.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n instanceId: z\n .string()\n .describe(\n 'The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you can optionally pass the instance ID.\\n\\nThis connects the transaction to a specific instance of your app installed on a Wix site.\\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n grossRevenue: z\n .string()\n .describe(\n 'The total amount of the transaction in USD, not including tax.\\nThis value can be negative for refunds or adjustments.\\n\\nExample: \"120.50\" for a $120.50 charge, or \"-120.50\" for a $120.50 refund.'\n )\n .optional(),\n netRevenue: z\n .string()\n .describe(\n 'The amount charged in USD minus agreed-upon expenses, such as shipping fees or\\npayment processing fees. Wix subtracts its share from this amount.\\nThe value can be negative for refunds.\\n\\nExample calculation:\\n- Gross revenue: $120.50\\n- Minus expenses: $20.00 (shipping)\\n- Net revenue: $100.50'\n )\n .optional()\n .nullable(),\n wixShare: z\n .string()\n .describe(\n \"Wix's share of the transaction in USD, taken from the net revenue.\\nThis value can be negative, such as for adjustments or refunds.\\n\\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\\n- Net revenue: $100.50\\n- Wix share (20%): $20.10\\n\\nImportant: Update this value if your revenue share percentage changes.\"\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('The date and time of the transaction.')\n .optional()\n .nullable(),\n billingType: z\n .enum(['UNKNOWN', 'CHARGE', 'REFUND'])\n .describe('The type of billing event, either charge or refund.')\n .optional(),\n })\n .describe('The billing event that was processed.')\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,oCAAsC,SAAO;AAAA,EACxD,SACG,SAAO;AAAA,IACN,OACG,SAAO;AAAA,MACN,OACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,YACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,cACG,SAAO,EACP;AAAA,QACC;AAAA,MACF;AAAA,MACF,YACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,UACG,SAAO,EACP;AAAA,QACC;AAAA,MACF;AAAA,MACF,cACG,OAAK,EACL,SAAS,uCAAuC,EAChD,SAAS,EACT,SAAS;AAAA,MACZ,aAAe,OAAK,CAAC,WAAW,UAAU,QAAQ,CAAC;AAAA,IACrD,CAAC,EACA;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,qCAAuC,SAAO;AAAA,EACzD,OACG,SAAO;AAAA,IACN,OACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,MACA;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,YACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,MACA;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,cACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,YACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,UACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,cACG,OAAK,EACL,SAAS,uCAAuC,EAChD,SAAS,EACT,SAAS;AAAA,IACZ,aACG,OAAK,CAAC,WAAW,UAAU,QAAQ,CAAC,EACpC,SAAS,qDAAqD,EAC9D,SAAS;AAAA,EACd,CAAC,EACA,SAAS,uCAAuC,EAChD,SAAS;AACd,CAAC;","names":[]}
|
package/build/es/schemas.d.mts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as z from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const ReportExternalBillingEventRequest: z.ZodObject<{
|
|
4
|
-
options: z.ZodOptional<z.ZodObject<{
|
|
5
|
-
event: z.ZodOptional<z.ZodObject<{
|
|
6
|
-
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
|
-
instanceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8
|
-
grossRevenue: z.ZodString;
|
|
9
|
-
netRevenue: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
-
wixShare: z.ZodString;
|
|
11
|
-
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
12
|
-
billingType: z.ZodEnum<{
|
|
13
|
-
UNKNOWN: "UNKNOWN";
|
|
14
|
-
CHARGE: "CHARGE";
|
|
15
|
-
REFUND: "REFUND";
|
|
16
|
-
}>;
|
|
17
|
-
}, z.core.$strip>>;
|
|
18
|
-
}, z.core.$strip>>;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
declare const ReportExternalBillingEventResponse: z.ZodObject<{
|
|
21
|
-
event: z.ZodOptional<z.ZodObject<{
|
|
22
|
-
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
-
instanceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
24
|
-
grossRevenue: z.ZodOptional<z.ZodString>;
|
|
25
|
-
netRevenue: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
26
|
-
wixShare: z.ZodOptional<z.ZodString>;
|
|
27
|
-
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
28
|
-
billingType: z.ZodOptional<z.ZodEnum<{
|
|
29
|
-
UNKNOWN: "UNKNOWN";
|
|
30
|
-
CHARGE: "CHARGE";
|
|
31
|
-
REFUND: "REFUND";
|
|
32
|
-
}>>;
|
|
33
|
-
}, z.core.$strip>>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
|
|
36
|
-
export { ReportExternalBillingEventRequest, ReportExternalBillingEventResponse };
|
package/build/es/schemas.mjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// src/market-aim-v1-external-billing-event-external-billing.schemas.ts
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
var ReportExternalBillingEventRequest = z.object({
|
|
4
|
-
options: z.object({
|
|
5
|
-
event: z.object({
|
|
6
|
-
appId: z.string().describe(
|
|
7
|
-
"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you're required to pass the app ID."
|
|
8
|
-
).regex(
|
|
9
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
10
|
-
"Must be a valid GUID"
|
|
11
|
-
).optional().nullable(),
|
|
12
|
-
instanceId: z.string().describe(
|
|
13
|
-
"The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you can optionally pass the instance ID.\n\nThis connects the transaction to a specific instance of your app installed on a Wix site.\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances)."
|
|
14
|
-
).regex(
|
|
15
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
16
|
-
"Must be a valid GUID"
|
|
17
|
-
).optional().nullable(),
|
|
18
|
-
grossRevenue: z.string().describe(
|
|
19
|
-
'The total amount of the transaction in USD, not including tax.\nThis value can be negative for refunds or adjustments.\n\nExample: "120.50" for a $120.50 charge, or "-120.50" for a $120.50 refund.'
|
|
20
|
-
),
|
|
21
|
-
netRevenue: z.string().describe(
|
|
22
|
-
"The amount charged in USD minus agreed-upon expenses, such as shipping fees or\npayment processing fees. Wix subtracts its share from this amount.\nThe value can be negative for refunds.\n\nExample calculation:\n- Gross revenue: $120.50\n- Minus expenses: $20.00 (shipping)\n- Net revenue: $100.50"
|
|
23
|
-
).optional().nullable(),
|
|
24
|
-
wixShare: z.string().describe(
|
|
25
|
-
"Wix's share of the transaction in USD, taken from the net revenue.\nThis value can be negative, such as for adjustments or refunds.\n\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\n- Net revenue: $100.50\n- Wix share (20%): $20.10\n\nImportant: Update this value if your revenue share percentage changes."
|
|
26
|
-
),
|
|
27
|
-
_createdDate: z.date().describe("The date and time of the transaction.").optional().nullable(),
|
|
28
|
-
billingType: z.enum(["UNKNOWN", "CHARGE", "REFUND"])
|
|
29
|
-
}).describe(
|
|
30
|
-
"The billing event with details of the external transaction, including the gross revenue,\nnet revenue, and billing type (charge or refund)."
|
|
31
|
-
).optional()
|
|
32
|
-
}).optional()
|
|
33
|
-
});
|
|
34
|
-
var ReportExternalBillingEventResponse = z.object({
|
|
35
|
-
event: z.object({
|
|
36
|
-
appId: z.string().describe(
|
|
37
|
-
"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you're required to pass the app ID."
|
|
38
|
-
).regex(
|
|
39
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
40
|
-
"Must be a valid GUID"
|
|
41
|
-
).optional().nullable(),
|
|
42
|
-
instanceId: z.string().describe(
|
|
43
|
-
"The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\nin which case you can optionally pass the instance ID.\n\nThis connects the transaction to a specific instance of your app installed on a Wix site.\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances)."
|
|
44
|
-
).regex(
|
|
45
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
46
|
-
"Must be a valid GUID"
|
|
47
|
-
).optional().nullable(),
|
|
48
|
-
grossRevenue: z.string().describe(
|
|
49
|
-
'The total amount of the transaction in USD, not including tax.\nThis value can be negative for refunds or adjustments.\n\nExample: "120.50" for a $120.50 charge, or "-120.50" for a $120.50 refund.'
|
|
50
|
-
).optional(),
|
|
51
|
-
netRevenue: z.string().describe(
|
|
52
|
-
"The amount charged in USD minus agreed-upon expenses, such as shipping fees or\npayment processing fees. Wix subtracts its share from this amount.\nThe value can be negative for refunds.\n\nExample calculation:\n- Gross revenue: $120.50\n- Minus expenses: $20.00 (shipping)\n- Net revenue: $100.50"
|
|
53
|
-
).optional().nullable(),
|
|
54
|
-
wixShare: z.string().describe(
|
|
55
|
-
"Wix's share of the transaction in USD, taken from the net revenue.\nThis value can be negative, such as for adjustments or refunds.\n\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\n- Net revenue: $100.50\n- Wix share (20%): $20.10\n\nImportant: Update this value if your revenue share percentage changes."
|
|
56
|
-
).optional(),
|
|
57
|
-
_createdDate: z.date().describe("The date and time of the transaction.").optional().nullable(),
|
|
58
|
-
billingType: z.enum(["UNKNOWN", "CHARGE", "REFUND"]).describe("The type of billing event, either charge or refund.").optional()
|
|
59
|
-
}).describe("The billing event that was processed.").optional()
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
ReportExternalBillingEventRequest,
|
|
63
|
-
ReportExternalBillingEventResponse
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=schemas.mjs.map
|
package/build/es/schemas.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/market-aim-v1-external-billing-event-external-billing.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const ReportExternalBillingEventRequest = z.object({\n options: z\n .object({\n event: z\n .object({\n appId: z\n .string()\n .describe(\n \"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you're required to pass the app ID.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n instanceId: z\n .string()\n .describe(\n 'The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you can optionally pass the instance ID.\\n\\nThis connects the transaction to a specific instance of your app installed on a Wix site.\\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n grossRevenue: z\n .string()\n .describe(\n 'The total amount of the transaction in USD, not including tax.\\nThis value can be negative for refunds or adjustments.\\n\\nExample: \"120.50\" for a $120.50 charge, or \"-120.50\" for a $120.50 refund.'\n ),\n netRevenue: z\n .string()\n .describe(\n 'The amount charged in USD minus agreed-upon expenses, such as shipping fees or\\npayment processing fees. Wix subtracts its share from this amount.\\nThe value can be negative for refunds.\\n\\nExample calculation:\\n- Gross revenue: $120.50\\n- Minus expenses: $20.00 (shipping)\\n- Net revenue: $100.50'\n )\n .optional()\n .nullable(),\n wixShare: z\n .string()\n .describe(\n \"Wix's share of the transaction in USD, taken from the net revenue.\\nThis value can be negative, such as for adjustments or refunds.\\n\\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\\n- Net revenue: $100.50\\n- Wix share (20%): $20.10\\n\\nImportant: Update this value if your revenue share percentage changes.\"\n ),\n _createdDate: z\n .date()\n .describe('The date and time of the transaction.')\n .optional()\n .nullable(),\n billingType: z.enum(['UNKNOWN', 'CHARGE', 'REFUND']),\n })\n .describe(\n 'The billing event with details of the external transaction, including the gross revenue,\\nnet revenue, and billing type (charge or refund).'\n )\n .optional(),\n })\n .optional(),\n});\nexport const ReportExternalBillingEventResponse = z.object({\n event: z\n .object({\n appId: z\n .string()\n .describe(\n \"The app ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you're required to pass the app ID.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n instanceId: z\n .string()\n .describe(\n 'The app instance ID linked to this transaction. This field is only relevant if using an API key for authorization,\\nin which case you can optionally pass the instance ID.\\n\\nThis connects the transaction to a specific instance of your app installed on a Wix site.\\nLearn more [about app instances](https://dev.wix.com/docs/build-apps/develop-your-app/access/app-instances/about-app-instances).'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n grossRevenue: z\n .string()\n .describe(\n 'The total amount of the transaction in USD, not including tax.\\nThis value can be negative for refunds or adjustments.\\n\\nExample: \"120.50\" for a $120.50 charge, or \"-120.50\" for a $120.50 refund.'\n )\n .optional(),\n netRevenue: z\n .string()\n .describe(\n 'The amount charged in USD minus agreed-upon expenses, such as shipping fees or\\npayment processing fees. Wix subtracts its share from this amount.\\nThe value can be negative for refunds.\\n\\nExample calculation:\\n- Gross revenue: $120.50\\n- Minus expenses: $20.00 (shipping)\\n- Net revenue: $100.50'\n )\n .optional()\n .nullable(),\n wixShare: z\n .string()\n .describe(\n \"Wix's share of the transaction in USD, taken from the net revenue.\\nThis value can be negative, such as for adjustments or refunds.\\n\\nCalculate based on your Partner Agreement terms. For example, if Wix's share is 20%:\\n- Net revenue: $100.50\\n- Wix share (20%): $20.10\\n\\nImportant: Update this value if your revenue share percentage changes.\"\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('The date and time of the transaction.')\n .optional()\n .nullable(),\n billingType: z\n .enum(['UNKNOWN', 'CHARGE', 'REFUND'])\n .describe('The type of billing event, either charge or refund.')\n .optional(),\n })\n .describe('The billing event that was processed.')\n .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,oCAAsC,SAAO;AAAA,EACxD,SACG,SAAO;AAAA,IACN,OACG,SAAO;AAAA,MACN,OACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,YACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,cACG,SAAO,EACP;AAAA,QACC;AAAA,MACF;AAAA,MACF,YACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,UACG,SAAO,EACP;AAAA,QACC;AAAA,MACF;AAAA,MACF,cACG,OAAK,EACL,SAAS,uCAAuC,EAChD,SAAS,EACT,SAAS;AAAA,MACZ,aAAe,OAAK,CAAC,WAAW,UAAU,QAAQ,CAAC;AAAA,IACrD,CAAC,EACA;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,qCAAuC,SAAO;AAAA,EACzD,OACG,SAAO;AAAA,IACN,OACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,MACA;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,YACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,MACA;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,cACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,YACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,UACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,cACG,OAAK,EACL,SAAS,uCAAuC,EAChD,SAAS,EACT,SAAS;AAAA,IACZ,aACG,OAAK,CAAC,WAAW,UAAU,QAAQ,CAAC,EACpC,SAAS,qDAAqD,EAC9D,SAAS;AAAA,EACd,CAAC,EACA,SAAS,uCAAuC,EAChD,SAAS;AACd,CAAC;","names":[]}
|