@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.
Files changed (46) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +3 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +3 -2
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.js +3 -2
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/es/index.d.mts +1 -1
  10. package/build/es/index.mjs +3 -2
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/index.typings.d.mts +1 -1
  13. package/build/es/index.typings.mjs +3 -2
  14. package/build/es/index.typings.mjs.map +1 -1
  15. package/build/es/meta.mjs +3 -2
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/internal/cjs/index.d.ts +1 -1
  18. package/build/internal/cjs/index.typings.d.ts +1 -1
  19. package/build/internal/es/index.d.mts +1 -1
  20. package/build/internal/es/index.typings.d.mts +1 -1
  21. package/package.json +5 -12
  22. package/build/cjs/schemas.d.ts +0 -36
  23. package/build/cjs/schemas.js +0 -103
  24. package/build/cjs/schemas.js.map +0 -1
  25. package/build/es/schemas.d.mts +0 -36
  26. package/build/es/schemas.mjs +0 -65
  27. package/build/es/schemas.mjs.map +0 -1
  28. package/build/internal/cjs/index.js +0 -243
  29. package/build/internal/cjs/index.js.map +0 -1
  30. package/build/internal/cjs/index.typings.js +0 -230
  31. package/build/internal/cjs/index.typings.js.map +0 -1
  32. package/build/internal/cjs/meta.js +0 -221
  33. package/build/internal/cjs/meta.js.map +0 -1
  34. package/build/internal/cjs/schemas.d.ts +0 -36
  35. package/build/internal/cjs/schemas.js +0 -103
  36. package/build/internal/cjs/schemas.js.map +0 -1
  37. package/build/internal/es/index.mjs +0 -218
  38. package/build/internal/es/index.mjs.map +0 -1
  39. package/build/internal/es/index.typings.mjs +0 -205
  40. package/build/internal/es/index.typings.mjs.map +0 -1
  41. package/build/internal/es/meta.mjs +0 -193
  42. package/build/internal/es/meta.mjs.map +0 -1
  43. package/build/internal/es/schemas.d.mts +0 -36
  44. package/build/internal/es/schemas.mjs +0 -65
  45. package/build/internal/es/schemas.mjs.map +0 -1
  46. package/schemas/package.json +0 -3
@@ -1,221 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // meta.ts
21
- var meta_exports = {};
22
- __export(meta_exports, {
23
- BillingTypeOriginal: () => BillingType,
24
- reportExternalBillingEvent: () => reportExternalBillingEvent2
25
- });
26
- module.exports = __toCommonJS(meta_exports);
27
-
28
- // src/market-aim-v1-external-billing-event-external-billing.http.ts
29
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
30
- var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
31
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
32
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
33
- function resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(opts) {
34
- const domainToMappings = {
35
- "api._api_base_domain_": [
36
- {
37
- srcPath: "/app-instance-manager-webapp",
38
- destPath: ""
39
- }
40
- ],
41
- "www.wixapis.com": [
42
- {
43
- srcPath: "/apps",
44
- destPath: ""
45
- }
46
- ],
47
- "wixapis.com": [
48
- {
49
- srcPath: "/apps",
50
- destPath: ""
51
- }
52
- ],
53
- "dev._base_domain_": [
54
- {
55
- srcPath: "/_api/app-instance-manager",
56
- destPath: ""
57
- },
58
- {
59
- srcPath: "/api/v1/instance",
60
- destPath: "/v1/instance"
61
- },
62
- {
63
- srcPath: "/api/v1/scripts",
64
- destPath: "/v1/scripts"
65
- }
66
- ],
67
- "manage._base_domain_": [
68
- {
69
- srcPath: "/_api/app-instance-manager",
70
- destPath: ""
71
- }
72
- ],
73
- "www._base_domain_": [
74
- {
75
- srcPath: "/_api/app-instance-manager",
76
- destPath: ""
77
- }
78
- ],
79
- "editor._base_domain_": [
80
- {
81
- srcPath: "/_api/app-instance-manager",
82
- destPath: ""
83
- }
84
- ],
85
- "blocks._base_domain_": [
86
- {
87
- srcPath: "/_api/app-instance-manager",
88
- destPath: ""
89
- }
90
- ],
91
- "create.editorx": [
92
- {
93
- srcPath: "/_api/app-instance-manager",
94
- destPath: ""
95
- }
96
- ],
97
- "*.dev.wix-code.com": [
98
- {
99
- srcPath: "/devcenter/app-instance/v1/instance",
100
- destPath: "/v1/instance"
101
- },
102
- {
103
- srcPath: "/devcenter/checkout/v1/checkout",
104
- destPath: "/v1/checkout"
105
- },
106
- {
107
- srcPath: "/devcenter/checkout/v1/metered-billing-charges",
108
- destPath: "/v1/metered-billing-charges"
109
- },
110
- {
111
- srcPath: "/devcenter/scripts/v1/scripts",
112
- destPath: "/v1/scripts"
113
- },
114
- {
115
- srcPath: "/market/aim/v1/billing-event",
116
- destPath: "/v1/billing-event"
117
- },
118
- {
119
- srcPath: "/devcenter/bi-events/v1/bi-event",
120
- destPath: "/v1/bi-event"
121
- }
122
- ],
123
- _: [
124
- {
125
- srcPath: "/devcenter/app-instance/v1/instance",
126
- destPath: "/v1/instance"
127
- },
128
- {
129
- srcPath: "/devcenter/checkout/v1/checkout",
130
- destPath: "/v1/checkout"
131
- },
132
- {
133
- srcPath: "/devcenter/checkout/v1/metered-billing-charges",
134
- destPath: "/v1/metered-billing-charges"
135
- },
136
- {
137
- srcPath: "/devcenter/scripts/v1/scripts",
138
- destPath: "/v1/scripts"
139
- },
140
- {
141
- srcPath: "/market/aim/v1/billing-event",
142
- destPath: "/v1/billing-event"
143
- },
144
- {
145
- srcPath: "/devcenter/bi-events/v1/bi-event",
146
- destPath: "/v1/bi-event"
147
- }
148
- ]
149
- };
150
- return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
151
- }
152
- var PACKAGE_NAME = "@wix/auto_sdk_app-management_external-billing";
153
- function reportExternalBillingEvent(payload) {
154
- function __reportExternalBillingEvent({ host }) {
155
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
156
- {
157
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
158
- paths: [{ path: "event.createdDate" }]
159
- }
160
- ]);
161
- const metadata = {
162
- entityFqdn: "wix.market.aim.v1.external_billing_event",
163
- method: "POST",
164
- methodFqn: "com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent",
165
- packageName: PACKAGE_NAME,
166
- migrationOptions: {
167
- optInTransformResponse: true
168
- },
169
- url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({
170
- protoPath: "/v1/billing-event",
171
- data: serializedData,
172
- host
173
- }),
174
- data: serializedData,
175
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
176
- {
177
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
178
- paths: [{ path: "event.createdDate" }]
179
- }
180
- ])
181
- };
182
- return metadata;
183
- }
184
- return __reportExternalBillingEvent;
185
- }
186
-
187
- // src/market-aim-v1-external-billing-event-external-billing.types.ts
188
- var BillingType = /* @__PURE__ */ ((BillingType2) => {
189
- BillingType2["UNKNOWN"] = "UNKNOWN";
190
- BillingType2["CHARGE"] = "CHARGE";
191
- BillingType2["REFUND"] = "REFUND";
192
- return BillingType2;
193
- })(BillingType || {});
194
-
195
- // src/market-aim-v1-external-billing-event-external-billing.meta.ts
196
- function reportExternalBillingEvent2() {
197
- const payload = {};
198
- const getRequestOptions = reportExternalBillingEvent(
199
- payload
200
- );
201
- const getUrl = (context) => {
202
- const { url } = getRequestOptions(context);
203
- return url;
204
- };
205
- return {
206
- getUrl,
207
- httpMethod: "POST",
208
- path: "/v1/billing-event",
209
- pathParams: {},
210
- __requestType: null,
211
- __originalRequestType: null,
212
- __responseType: null,
213
- __originalResponseType: null
214
- };
215
- }
216
- // Annotate the CommonJS export names for ESM import in node:
217
- 0 && (module.exports = {
218
- BillingTypeOriginal,
219
- reportExternalBillingEvent
220
- });
221
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
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 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":["reportExternalBillingEvent","import_timestamp","payload","BillingType","reportExternalBillingEvent"]}
@@ -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 };
@@ -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
@@ -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":[]}
@@ -1,218 +0,0 @@
1
- // src/market-aim-v1-external-billing-event-external-billing.universal.ts
2
- import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
- import {
4
- renameKeysFromSDKRequestToRESTRequest,
5
- renameKeysFromRESTResponseToSDKResponse
6
- } from "@wix/sdk-runtime/rename-all-nested-keys";
7
-
8
- // src/market-aim-v1-external-billing-event-external-billing.http.ts
9
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
10
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
11
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
12
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
13
- function resolveComWixpressMarketAimApiExternalBillingBiServiceUrl(opts) {
14
- const domainToMappings = {
15
- "api._api_base_domain_": [
16
- {
17
- srcPath: "/app-instance-manager-webapp",
18
- destPath: ""
19
- }
20
- ],
21
- "www.wixapis.com": [
22
- {
23
- srcPath: "/apps",
24
- destPath: ""
25
- }
26
- ],
27
- "wixapis.com": [
28
- {
29
- srcPath: "/apps",
30
- destPath: ""
31
- }
32
- ],
33
- "dev._base_domain_": [
34
- {
35
- srcPath: "/_api/app-instance-manager",
36
- destPath: ""
37
- },
38
- {
39
- srcPath: "/api/v1/instance",
40
- destPath: "/v1/instance"
41
- },
42
- {
43
- srcPath: "/api/v1/scripts",
44
- destPath: "/v1/scripts"
45
- }
46
- ],
47
- "manage._base_domain_": [
48
- {
49
- srcPath: "/_api/app-instance-manager",
50
- destPath: ""
51
- }
52
- ],
53
- "www._base_domain_": [
54
- {
55
- srcPath: "/_api/app-instance-manager",
56
- destPath: ""
57
- }
58
- ],
59
- "editor._base_domain_": [
60
- {
61
- srcPath: "/_api/app-instance-manager",
62
- destPath: ""
63
- }
64
- ],
65
- "blocks._base_domain_": [
66
- {
67
- srcPath: "/_api/app-instance-manager",
68
- destPath: ""
69
- }
70
- ],
71
- "create.editorx": [
72
- {
73
- srcPath: "/_api/app-instance-manager",
74
- destPath: ""
75
- }
76
- ],
77
- "*.dev.wix-code.com": [
78
- {
79
- srcPath: "/devcenter/app-instance/v1/instance",
80
- destPath: "/v1/instance"
81
- },
82
- {
83
- srcPath: "/devcenter/checkout/v1/checkout",
84
- destPath: "/v1/checkout"
85
- },
86
- {
87
- srcPath: "/devcenter/checkout/v1/metered-billing-charges",
88
- destPath: "/v1/metered-billing-charges"
89
- },
90
- {
91
- srcPath: "/devcenter/scripts/v1/scripts",
92
- destPath: "/v1/scripts"
93
- },
94
- {
95
- srcPath: "/market/aim/v1/billing-event",
96
- destPath: "/v1/billing-event"
97
- },
98
- {
99
- srcPath: "/devcenter/bi-events/v1/bi-event",
100
- destPath: "/v1/bi-event"
101
- }
102
- ],
103
- _: [
104
- {
105
- srcPath: "/devcenter/app-instance/v1/instance",
106
- destPath: "/v1/instance"
107
- },
108
- {
109
- srcPath: "/devcenter/checkout/v1/checkout",
110
- destPath: "/v1/checkout"
111
- },
112
- {
113
- srcPath: "/devcenter/checkout/v1/metered-billing-charges",
114
- destPath: "/v1/metered-billing-charges"
115
- },
116
- {
117
- srcPath: "/devcenter/scripts/v1/scripts",
118
- destPath: "/v1/scripts"
119
- },
120
- {
121
- srcPath: "/market/aim/v1/billing-event",
122
- destPath: "/v1/billing-event"
123
- },
124
- {
125
- srcPath: "/devcenter/bi-events/v1/bi-event",
126
- destPath: "/v1/bi-event"
127
- }
128
- ]
129
- };
130
- return resolveUrl(Object.assign(opts, { domainToMappings }));
131
- }
132
- var PACKAGE_NAME = "@wix/auto_sdk_app-management_external-billing";
133
- function reportExternalBillingEvent(payload) {
134
- function __reportExternalBillingEvent({ host }) {
135
- const serializedData = transformPaths(payload, [
136
- {
137
- transformFn: transformSDKTimestampToRESTTimestamp,
138
- paths: [{ path: "event.createdDate" }]
139
- }
140
- ]);
141
- const metadata = {
142
- entityFqdn: "wix.market.aim.v1.external_billing_event",
143
- method: "POST",
144
- methodFqn: "com.wixpress.market.aim.api.ExternalBillingBIService.ReportExternalBillingEvent",
145
- packageName: PACKAGE_NAME,
146
- migrationOptions: {
147
- optInTransformResponse: true
148
- },
149
- url: resolveComWixpressMarketAimApiExternalBillingBiServiceUrl({
150
- protoPath: "/v1/billing-event",
151
- data: serializedData,
152
- host
153
- }),
154
- data: serializedData,
155
- transformResponse: (payload2) => transformPaths(payload2, [
156
- {
157
- transformFn: transformRESTTimestampToSDKTimestamp,
158
- paths: [{ path: "event.createdDate" }]
159
- }
160
- ])
161
- };
162
- return metadata;
163
- }
164
- return __reportExternalBillingEvent;
165
- }
166
-
167
- // src/market-aim-v1-external-billing-event-external-billing.universal.ts
168
- var BillingType = /* @__PURE__ */ ((BillingType2) => {
169
- BillingType2["UNKNOWN"] = "UNKNOWN";
170
- BillingType2["CHARGE"] = "CHARGE";
171
- BillingType2["REFUND"] = "REFUND";
172
- return BillingType2;
173
- })(BillingType || {});
174
- async function reportExternalBillingEvent2(options) {
175
- const { httpClient, sideEffects } = arguments[1];
176
- const payload = renameKeysFromSDKRequestToRESTRequest({
177
- event: options?.event
178
- });
179
- const reqOpts = reportExternalBillingEvent(
180
- payload
181
- );
182
- sideEffects?.onSiteCall?.();
183
- try {
184
- const result = await httpClient.request(reqOpts);
185
- sideEffects?.onSuccess?.(result);
186
- return renameKeysFromRESTResponseToSDKResponse(result.data);
187
- } catch (err) {
188
- const transformedError = sdkTransformError(
189
- err,
190
- {
191
- spreadPathsToArguments: {},
192
- explicitPathsToArguments: { event: "$[0].event" },
193
- singleArgumentUnchanged: false
194
- },
195
- ["options"]
196
- );
197
- sideEffects?.onError?.(err);
198
- throw transformedError;
199
- }
200
- }
201
-
202
- // src/market-aim-v1-external-billing-event-external-billing.public.ts
203
- function reportExternalBillingEvent3(httpClient) {
204
- return (options) => reportExternalBillingEvent2(
205
- options,
206
- // @ts-ignore
207
- { httpClient }
208
- );
209
- }
210
-
211
- // src/market-aim-v1-external-billing-event-external-billing.context.ts
212
- import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
213
- var reportExternalBillingEvent4 = /* @__PURE__ */ createRESTModule(reportExternalBillingEvent3);
214
- export {
215
- BillingType,
216
- reportExternalBillingEvent4 as reportExternalBillingEvent
217
- };
218
- //# sourceMappingURL=index.mjs.map