@wix/auto_sdk_pricing-plans_pricing-plans-settings 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +190 -0
- package/build/cjs/index.js +214 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +194 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +207 -0
- package/build/cjs/meta.js +180 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +190 -0
- package/build/es/index.mjs +187 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1 -0
- package/build/es/index.typings.mjs +167 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +207 -0
- package/build/es/meta.mjs +150 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +34 -0
- package/build/internal/cjs/index.js +214 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +217 -0
- package/build/internal/cjs/index.typings.js +194 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +208 -0
- package/build/internal/cjs/meta.js +180 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +34 -0
- package/build/internal/es/index.mjs +187 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +217 -0
- package/build/internal/es/index.typings.mjs +167 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +208 -0
- package/build/internal/es/meta.mjs +150 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
3
|
+
interface PricingPlansSettings {
|
|
4
|
+
/**
|
|
5
|
+
* Revision number, which increments by 1 each time the PricingPlans settings are updated. To prevent conflicting changes, the current revision must be passed when updating the PricingPlans settings.
|
|
6
|
+
* Ignored when creating a PricingPlans settings.
|
|
7
|
+
* @readonly
|
|
8
|
+
*/
|
|
9
|
+
revision?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Date and time the PricingPlansSettings was created.
|
|
12
|
+
* @readonly
|
|
13
|
+
*/
|
|
14
|
+
_createdDate?: Date | null;
|
|
15
|
+
/**
|
|
16
|
+
* Date and time the PricingPlansSettings was last updated.
|
|
17
|
+
* @readonly
|
|
18
|
+
*/
|
|
19
|
+
_updatedDate?: Date | null;
|
|
20
|
+
/** Site's taxable address, which determines how tax is calculated for pricing plans. */
|
|
21
|
+
taxableAddress?: TaxableAddressWithLiterals;
|
|
22
|
+
/** Data Extensions */
|
|
23
|
+
extendedFields?: ExtendedFields;
|
|
24
|
+
}
|
|
25
|
+
declare enum TaxableAddress {
|
|
26
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
27
|
+
BILLING = "BILLING",
|
|
28
|
+
BUSINESS = "BUSINESS"
|
|
29
|
+
}
|
|
30
|
+
/** @enumType */
|
|
31
|
+
type TaxableAddressWithLiterals = TaxableAddress | 'UNKNOWN_TYPE' | 'BILLING' | 'BUSINESS';
|
|
32
|
+
interface ExtendedFields {
|
|
33
|
+
/**
|
|
34
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
35
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
36
|
+
*
|
|
37
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
38
|
+
*
|
|
39
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
40
|
+
*/
|
|
41
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
42
|
+
}
|
|
43
|
+
interface GetPricingPlansSettingsRequest {
|
|
44
|
+
}
|
|
45
|
+
interface GetPricingPlansSettingsResponse {
|
|
46
|
+
/** Pricing Plans settings */
|
|
47
|
+
pricingPlansSettings?: PricingPlansSettings;
|
|
48
|
+
}
|
|
49
|
+
interface UpdatePricingPlansSettingsRequest {
|
|
50
|
+
/** PricingPlansSettings to be updated, may be partial. */
|
|
51
|
+
pricingPlansSettings: PricingPlansSettings;
|
|
52
|
+
}
|
|
53
|
+
interface UpdatePricingPlansSettingsResponse {
|
|
54
|
+
/** Updated PricingPlansSettings. */
|
|
55
|
+
pricingPlansSettings?: PricingPlansSettings;
|
|
56
|
+
}
|
|
57
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
58
|
+
createdEvent?: EntityCreatedEvent;
|
|
59
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
60
|
+
deletedEvent?: EntityDeletedEvent;
|
|
61
|
+
actionEvent?: ActionEvent;
|
|
62
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
63
|
+
_id?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
66
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
67
|
+
*/
|
|
68
|
+
entityFqdn?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
71
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
72
|
+
*/
|
|
73
|
+
slug?: string;
|
|
74
|
+
/** ID of the entity associated with the event. */
|
|
75
|
+
entityId?: string;
|
|
76
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
77
|
+
eventTime?: Date | null;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
80
|
+
* (for example, GDPR).
|
|
81
|
+
*/
|
|
82
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
83
|
+
/** If present, indicates the action that triggered the event. */
|
|
84
|
+
originatedFrom?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
87
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
88
|
+
*/
|
|
89
|
+
entityEventSequence?: string | null;
|
|
90
|
+
}
|
|
91
|
+
/** @oneof */
|
|
92
|
+
interface DomainEventBodyOneOf {
|
|
93
|
+
createdEvent?: EntityCreatedEvent;
|
|
94
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
95
|
+
deletedEvent?: EntityDeletedEvent;
|
|
96
|
+
actionEvent?: ActionEvent;
|
|
97
|
+
}
|
|
98
|
+
interface EntityCreatedEvent {
|
|
99
|
+
entity?: string;
|
|
100
|
+
}
|
|
101
|
+
interface RestoreInfo {
|
|
102
|
+
deletedDate?: Date | null;
|
|
103
|
+
}
|
|
104
|
+
interface EntityUpdatedEvent {
|
|
105
|
+
/**
|
|
106
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
107
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
108
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
109
|
+
*/
|
|
110
|
+
currentEntity?: string;
|
|
111
|
+
}
|
|
112
|
+
interface EntityDeletedEvent {
|
|
113
|
+
/** Entity that was deleted. */
|
|
114
|
+
deletedEntity?: string | null;
|
|
115
|
+
}
|
|
116
|
+
interface ActionEvent {
|
|
117
|
+
body?: string;
|
|
118
|
+
}
|
|
119
|
+
interface MessageEnvelope {
|
|
120
|
+
/**
|
|
121
|
+
* App instance ID.
|
|
122
|
+
* @format GUID
|
|
123
|
+
*/
|
|
124
|
+
instanceId?: string | null;
|
|
125
|
+
/**
|
|
126
|
+
* Event type.
|
|
127
|
+
* @maxLength 150
|
|
128
|
+
*/
|
|
129
|
+
eventType?: string;
|
|
130
|
+
/** The identification type and identity data. */
|
|
131
|
+
identity?: IdentificationData;
|
|
132
|
+
/** Stringify payload. */
|
|
133
|
+
data?: string;
|
|
134
|
+
}
|
|
135
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
136
|
+
/**
|
|
137
|
+
* ID of a site visitor that has not logged in to the site.
|
|
138
|
+
* @format GUID
|
|
139
|
+
*/
|
|
140
|
+
anonymousVisitorId?: string;
|
|
141
|
+
/**
|
|
142
|
+
* ID of a site visitor that has logged in to the site.
|
|
143
|
+
* @format GUID
|
|
144
|
+
*/
|
|
145
|
+
memberId?: string;
|
|
146
|
+
/**
|
|
147
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
148
|
+
* @format GUID
|
|
149
|
+
*/
|
|
150
|
+
wixUserId?: string;
|
|
151
|
+
/**
|
|
152
|
+
* ID of an app.
|
|
153
|
+
* @format GUID
|
|
154
|
+
*/
|
|
155
|
+
appId?: string;
|
|
156
|
+
/** @readonly */
|
|
157
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
158
|
+
}
|
|
159
|
+
/** @oneof */
|
|
160
|
+
interface IdentificationDataIdOneOf {
|
|
161
|
+
/**
|
|
162
|
+
* ID of a site visitor that has not logged in to the site.
|
|
163
|
+
* @format GUID
|
|
164
|
+
*/
|
|
165
|
+
anonymousVisitorId?: string;
|
|
166
|
+
/**
|
|
167
|
+
* ID of a site visitor that has logged in to the site.
|
|
168
|
+
* @format GUID
|
|
169
|
+
*/
|
|
170
|
+
memberId?: string;
|
|
171
|
+
/**
|
|
172
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
173
|
+
* @format GUID
|
|
174
|
+
*/
|
|
175
|
+
wixUserId?: string;
|
|
176
|
+
/**
|
|
177
|
+
* ID of an app.
|
|
178
|
+
* @format GUID
|
|
179
|
+
*/
|
|
180
|
+
appId?: string;
|
|
181
|
+
}
|
|
182
|
+
declare enum WebhookIdentityType {
|
|
183
|
+
UNKNOWN = "UNKNOWN",
|
|
184
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
185
|
+
MEMBER = "MEMBER",
|
|
186
|
+
WIX_USER = "WIX_USER",
|
|
187
|
+
APP = "APP"
|
|
188
|
+
}
|
|
189
|
+
/** @enumType */
|
|
190
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
191
|
+
/**
|
|
192
|
+
* Retrieves a site's Pricing Plans Settings.
|
|
193
|
+
* @internal
|
|
194
|
+
* @documentationMaturity preview
|
|
195
|
+
* @permissionId PRICING_PLANS.PRICING_PLANS_SETTINGS_READ
|
|
196
|
+
* @returns Pricing Plans settings
|
|
197
|
+
* @fqn wix.pricing_plans.settings.v1.PricingPlansSettingsService.GetPricingPlansSettings
|
|
198
|
+
*/
|
|
199
|
+
declare function getPricingPlansSettings(): Promise<NonNullablePaths<PricingPlansSettings, `taxableAddress`, 2>>;
|
|
200
|
+
/**
|
|
201
|
+
* Updates a site's Pricing Plans settings, or creates them if none exist.
|
|
202
|
+
*
|
|
203
|
+
* Each time the Pricing Plans settings are updated, `revision` increments by 1.
|
|
204
|
+
* The current `revision` must be passed when updating the Pricing Plans settings.
|
|
205
|
+
* This ensures you're working with the latest Pricing Plans settings and prevents unintended overwrites.
|
|
206
|
+
* @param pricingPlansSettings - PricingPlansSettings to be updated, may be partial.
|
|
207
|
+
* @internal
|
|
208
|
+
* @documentationMaturity preview
|
|
209
|
+
* @requiredField pricingPlansSettings
|
|
210
|
+
* @requiredField pricingPlansSettings.revision
|
|
211
|
+
* @permissionId PRICING_PLANS.PRICING_PLANS_SETTINGS_UPDATE
|
|
212
|
+
* @returns Updated PricingPlansSettings.
|
|
213
|
+
* @fqn wix.pricing_plans.settings.v1.PricingPlansSettingsService.UpdatePricingPlansSettings
|
|
214
|
+
*/
|
|
215
|
+
declare function updatePricingPlansSettings(pricingPlansSettings: NonNullablePaths<PricingPlansSettings, `revision`, 2>): Promise<NonNullablePaths<PricingPlansSettings, `taxableAddress`, 2>>;
|
|
216
|
+
|
|
217
|
+
export { type ActionEvent, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetPricingPlansSettingsRequest, type GetPricingPlansSettingsResponse, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type PricingPlansSettings, type RestoreInfo, TaxableAddress, type TaxableAddressWithLiterals, type UpdatePricingPlansSettingsRequest, type UpdatePricingPlansSettingsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getPricingPlansSettings, updatePricingPlansSettings };
|
|
@@ -0,0 +1,194 @@
|
|
|
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
|
+
// index.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_exports, {
|
|
23
|
+
TaxableAddress: () => TaxableAddress,
|
|
24
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
25
|
+
getPricingPlansSettings: () => getPricingPlansSettings2,
|
|
26
|
+
updatePricingPlansSettings: () => updatePricingPlansSettings2
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
29
|
+
|
|
30
|
+
// src/pricing-plans-settings-v1-pricing-plans-settings-pricing-plans-settings.universal.ts
|
|
31
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
32
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
33
|
+
|
|
34
|
+
// src/pricing-plans-settings-v1-pricing-plans-settings-pricing-plans-settings.http.ts
|
|
35
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
36
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
37
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
38
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
39
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
40
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
41
|
+
function resolveWixPricingPlansSettingsV1PricingPlansSettingsServiceUrl(opts) {
|
|
42
|
+
const domainToMappings = {};
|
|
43
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
44
|
+
}
|
|
45
|
+
var PACKAGE_NAME = "@wix/auto_sdk_pricing-plans_pricing-plans-settings";
|
|
46
|
+
function getPricingPlansSettings(payload) {
|
|
47
|
+
function __getPricingPlansSettings({ host }) {
|
|
48
|
+
const metadata = {
|
|
49
|
+
entityFqdn: "wix.pricing_plans.settings.v1.pricing_plans_settings",
|
|
50
|
+
method: "GET",
|
|
51
|
+
methodFqn: "wix.pricing_plans.settings.v1.PricingPlansSettingsService.GetPricingPlansSettings",
|
|
52
|
+
packageName: PACKAGE_NAME,
|
|
53
|
+
migrationOptions: {
|
|
54
|
+
optInTransformResponse: true
|
|
55
|
+
},
|
|
56
|
+
url: resolveWixPricingPlansSettingsV1PricingPlansSettingsServiceUrl({
|
|
57
|
+
protoPath: "/v1/pricing-plans-settings",
|
|
58
|
+
data: payload,
|
|
59
|
+
host
|
|
60
|
+
}),
|
|
61
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
62
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
63
|
+
{
|
|
64
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
65
|
+
paths: [
|
|
66
|
+
{ path: "pricingPlansSettings.createdDate" },
|
|
67
|
+
{ path: "pricingPlansSettings.updatedDate" }
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
])
|
|
71
|
+
};
|
|
72
|
+
return metadata;
|
|
73
|
+
}
|
|
74
|
+
return __getPricingPlansSettings;
|
|
75
|
+
}
|
|
76
|
+
function updatePricingPlansSettings(payload) {
|
|
77
|
+
function __updatePricingPlansSettings({ host }) {
|
|
78
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
79
|
+
{
|
|
80
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
81
|
+
paths: [{ path: "fieldMask" }]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
85
|
+
paths: [
|
|
86
|
+
{ path: "pricingPlansSettings.createdDate" },
|
|
87
|
+
{ path: "pricingPlansSettings.updatedDate" }
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]);
|
|
91
|
+
const metadata = {
|
|
92
|
+
entityFqdn: "wix.pricing_plans.settings.v1.pricing_plans_settings",
|
|
93
|
+
method: "PATCH",
|
|
94
|
+
methodFqn: "wix.pricing_plans.settings.v1.PricingPlansSettingsService.UpdatePricingPlansSettings",
|
|
95
|
+
packageName: PACKAGE_NAME,
|
|
96
|
+
migrationOptions: {
|
|
97
|
+
optInTransformResponse: true
|
|
98
|
+
},
|
|
99
|
+
url: resolveWixPricingPlansSettingsV1PricingPlansSettingsServiceUrl({
|
|
100
|
+
protoPath: "/v1/pricing-plans-settings",
|
|
101
|
+
data: serializedData,
|
|
102
|
+
host
|
|
103
|
+
}),
|
|
104
|
+
data: serializedData,
|
|
105
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
106
|
+
{
|
|
107
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
108
|
+
paths: [
|
|
109
|
+
{ path: "pricingPlansSettings.createdDate" },
|
|
110
|
+
{ path: "pricingPlansSettings.updatedDate" }
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
])
|
|
114
|
+
};
|
|
115
|
+
return metadata;
|
|
116
|
+
}
|
|
117
|
+
return __updatePricingPlansSettings;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// src/pricing-plans-settings-v1-pricing-plans-settings-pricing-plans-settings.universal.ts
|
|
121
|
+
var TaxableAddress = /* @__PURE__ */ ((TaxableAddress2) => {
|
|
122
|
+
TaxableAddress2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
123
|
+
TaxableAddress2["BILLING"] = "BILLING";
|
|
124
|
+
TaxableAddress2["BUSINESS"] = "BUSINESS";
|
|
125
|
+
return TaxableAddress2;
|
|
126
|
+
})(TaxableAddress || {});
|
|
127
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
128
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
129
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
130
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
131
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
132
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
133
|
+
return WebhookIdentityType2;
|
|
134
|
+
})(WebhookIdentityType || {});
|
|
135
|
+
async function getPricingPlansSettings2() {
|
|
136
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
137
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
138
|
+
const reqOpts = getPricingPlansSettings(
|
|
139
|
+
payload
|
|
140
|
+
);
|
|
141
|
+
sideEffects?.onSiteCall?.();
|
|
142
|
+
try {
|
|
143
|
+
const result = await httpClient.request(reqOpts);
|
|
144
|
+
sideEffects?.onSuccess?.(result);
|
|
145
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.pricingPlansSettings;
|
|
146
|
+
} catch (err) {
|
|
147
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
148
|
+
err,
|
|
149
|
+
{
|
|
150
|
+
spreadPathsToArguments: {},
|
|
151
|
+
explicitPathsToArguments: {},
|
|
152
|
+
singleArgumentUnchanged: false
|
|
153
|
+
},
|
|
154
|
+
[]
|
|
155
|
+
);
|
|
156
|
+
sideEffects?.onError?.(err);
|
|
157
|
+
throw transformedError;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
async function updatePricingPlansSettings2(pricingPlansSettings) {
|
|
161
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
162
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
163
|
+
pricingPlansSettings
|
|
164
|
+
});
|
|
165
|
+
const reqOpts = updatePricingPlansSettings(
|
|
166
|
+
payload
|
|
167
|
+
);
|
|
168
|
+
sideEffects?.onSiteCall?.();
|
|
169
|
+
try {
|
|
170
|
+
const result = await httpClient.request(reqOpts);
|
|
171
|
+
sideEffects?.onSuccess?.(result);
|
|
172
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.pricingPlansSettings;
|
|
173
|
+
} catch (err) {
|
|
174
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
175
|
+
err,
|
|
176
|
+
{
|
|
177
|
+
spreadPathsToArguments: {},
|
|
178
|
+
explicitPathsToArguments: { pricingPlansSettings: "$[0]" },
|
|
179
|
+
singleArgumentUnchanged: false
|
|
180
|
+
},
|
|
181
|
+
["pricingPlansSettings"]
|
|
182
|
+
);
|
|
183
|
+
sideEffects?.onError?.(err);
|
|
184
|
+
throw transformedError;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
188
|
+
0 && (module.exports = {
|
|
189
|
+
TaxableAddress,
|
|
190
|
+
WebhookIdentityType,
|
|
191
|
+
getPricingPlansSettings,
|
|
192
|
+
updatePricingPlansSettings
|
|
193
|
+
});
|
|
194
|
+
//# sourceMappingURL=index.typings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../index.typings.ts","../../../src/pricing-plans-settings-v1-pricing-plans-settings-pricing-plans-settings.universal.ts","../../../src/pricing-plans-settings-v1-pricing-plans-settings-pricing-plans-settings.http.ts"],"sourcesContent":["export * from './src/pricing-plans-settings-v1-pricing-plans-settings-pricing-plans-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPricingPlansSettingsV1PricingPlansSettings from './pricing-plans-settings-v1-pricing-plans-settings-pricing-plans-settings.http.js';\n\nexport interface PricingPlansSettings {\n /**\n * Revision number, which increments by 1 each time the PricingPlans settings are updated. To prevent conflicting changes, the current revision must be passed when updating the PricingPlans settings.\n * Ignored when creating a PricingPlans settings.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the PricingPlansSettings was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the PricingPlansSettings was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Site's taxable address, which determines how tax is calculated for pricing plans. */\n taxableAddress?: TaxableAddressWithLiterals;\n /** Data Extensions */\n extendedFields?: ExtendedFields;\n}\n\nexport enum TaxableAddress {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n BILLING = 'BILLING',\n BUSINESS = 'BUSINESS',\n}\n\n/** @enumType */\nexport type TaxableAddressWithLiterals =\n | TaxableAddress\n | 'UNKNOWN_TYPE'\n | 'BILLING'\n | 'BUSINESS';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetPricingPlansSettingsRequest {}\n\nexport interface GetPricingPlansSettingsResponse {\n /** Pricing Plans settings */\n pricingPlansSettings?: PricingPlansSettings;\n}\n\nexport interface UpdatePricingPlansSettingsRequest {\n /** PricingPlansSettings to be updated, may be partial. */\n pricingPlansSettings: PricingPlansSettings;\n}\n\nexport interface UpdatePricingPlansSettingsResponse {\n /** Updated PricingPlansSettings. */\n pricingPlansSettings?: PricingPlansSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\n/**\n * Retrieves a site's Pricing Plans Settings.\n * @internal\n * @documentationMaturity preview\n * @permissionId PRICING_PLANS.PRICING_PLANS_SETTINGS_READ\n * @returns Pricing Plans settings\n * @fqn wix.pricing_plans.settings.v1.PricingPlansSettingsService.GetPricingPlansSettings\n */\nexport async function getPricingPlansSettings(): Promise<\n NonNullablePaths<PricingPlansSettings, `taxableAddress`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixPricingPlansSettingsV1PricingPlansSettings.getPricingPlansSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.pricingPlansSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a site's Pricing Plans settings, or creates them if none exist.\n *\n * Each time the Pricing Plans settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the Pricing Plans settings.\n * This ensures you're working with the latest Pricing Plans settings and prevents unintended overwrites.\n * @param pricingPlansSettings - PricingPlansSettings to be updated, may be partial.\n * @internal\n * @documentationMaturity preview\n * @requiredField pricingPlansSettings\n * @requiredField pricingPlansSettings.revision\n * @permissionId PRICING_PLANS.PRICING_PLANS_SETTINGS_UPDATE\n * @returns Updated PricingPlansSettings.\n * @fqn wix.pricing_plans.settings.v1.PricingPlansSettingsService.UpdatePricingPlansSettings\n */\nexport async function updatePricingPlansSettings(\n pricingPlansSettings: NonNullablePaths<PricingPlansSettings, `revision`, 2>\n): Promise<NonNullablePaths<PricingPlansSettings, `taxableAddress`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pricingPlansSettings: pricingPlansSettings,\n });\n\n const reqOpts =\n ambassadorWixPricingPlansSettingsV1PricingPlansSettings.updatePricingPlansSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.pricingPlansSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { pricingPlansSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['pricingPlansSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveWixPricingPlansSettingsV1PricingPlansSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_pricing-plans_pricing-plans-settings';\n\n/** Retrieves a site's Pricing Plans Settings. */\nexport function getPricingPlansSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getPricingPlansSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.pricing_plans.settings.v1.pricing_plans_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.pricing_plans.settings.v1.PricingPlansSettingsService.GetPricingPlansSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPricingPlansSettingsV1PricingPlansSettingsServiceUrl({\n protoPath: '/v1/pricing-plans-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pricingPlansSettings.createdDate' },\n { path: 'pricingPlansSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPricingPlansSettings;\n}\n\n/**\n * Updates a site's Pricing Plans settings, or creates them if none exist.\n *\n * Each time the Pricing Plans settings are updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the Pricing Plans settings.\n * This ensures you're working with the latest Pricing Plans settings and prevents unintended overwrites.\n */\nexport function updatePricingPlansSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updatePricingPlansSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pricingPlansSettings.createdDate' },\n { path: 'pricingPlansSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.pricing_plans.settings.v1.pricing_plans_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.pricing_plans.settings.v1.PricingPlansSettingsService.UpdatePricingPlansSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPricingPlansSettingsV1PricingPlansSettingsServiceUrl({\n protoPath: '/v1/pricing-plans-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pricingPlansSettings.createdDate' },\n { path: 'pricingPlansSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePricingPlansSettings;\n}\n"],"mappings":"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","names":["getPricingPlansSettings","updatePricingPlansSettings","import_timestamp","import_rest_modules","payload","TaxableAddress","WebhookIdentityType","getPricingPlansSettings","sdkTransformError","updatePricingPlansSettings"]}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { GetPricingPlansSettingsRequest as GetPricingPlansSettingsRequest$1, GetPricingPlansSettingsResponse as GetPricingPlansSettingsResponse$1, UpdatePricingPlansSettingsRequest as UpdatePricingPlansSettingsRequest$1, UpdatePricingPlansSettingsResponse as UpdatePricingPlansSettingsResponse$1 } from './index.typings.js';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
interface PricingPlansSettings {
|
|
5
|
+
/**
|
|
6
|
+
* Revision number, which increments by 1 each time the PricingPlans settings are updated. To prevent conflicting changes, the current revision must be passed when updating the PricingPlans settings.
|
|
7
|
+
* Ignored when creating a PricingPlans settings.
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
revision?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Date and time the PricingPlansSettings was created.
|
|
13
|
+
* @readonly
|
|
14
|
+
*/
|
|
15
|
+
createdDate?: Date | null;
|
|
16
|
+
/**
|
|
17
|
+
* Date and time the PricingPlansSettings was last updated.
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
updatedDate?: Date | null;
|
|
21
|
+
/** Site's taxable address, which determines how tax is calculated for pricing plans. */
|
|
22
|
+
taxableAddress?: TaxableAddressWithLiterals;
|
|
23
|
+
/** Data Extensions */
|
|
24
|
+
extendedFields?: ExtendedFields;
|
|
25
|
+
}
|
|
26
|
+
declare enum TaxableAddress {
|
|
27
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
28
|
+
BILLING = "BILLING",
|
|
29
|
+
BUSINESS = "BUSINESS"
|
|
30
|
+
}
|
|
31
|
+
/** @enumType */
|
|
32
|
+
type TaxableAddressWithLiterals = TaxableAddress | 'UNKNOWN_TYPE' | 'BILLING' | 'BUSINESS';
|
|
33
|
+
interface ExtendedFields {
|
|
34
|
+
/**
|
|
35
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
36
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
37
|
+
*
|
|
38
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
39
|
+
*
|
|
40
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
41
|
+
*/
|
|
42
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
43
|
+
}
|
|
44
|
+
interface GetPricingPlansSettingsRequest {
|
|
45
|
+
}
|
|
46
|
+
interface GetPricingPlansSettingsResponse {
|
|
47
|
+
/** Pricing Plans settings */
|
|
48
|
+
pricingPlansSettings?: PricingPlansSettings;
|
|
49
|
+
}
|
|
50
|
+
interface UpdatePricingPlansSettingsRequest {
|
|
51
|
+
/** PricingPlansSettings to be updated, may be partial. */
|
|
52
|
+
pricingPlansSettings: PricingPlansSettings;
|
|
53
|
+
}
|
|
54
|
+
interface UpdatePricingPlansSettingsResponse {
|
|
55
|
+
/** Updated PricingPlansSettings. */
|
|
56
|
+
pricingPlansSettings?: PricingPlansSettings;
|
|
57
|
+
}
|
|
58
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
59
|
+
createdEvent?: EntityCreatedEvent;
|
|
60
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
61
|
+
deletedEvent?: EntityDeletedEvent;
|
|
62
|
+
actionEvent?: ActionEvent;
|
|
63
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
64
|
+
id?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
67
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
68
|
+
*/
|
|
69
|
+
entityFqdn?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
72
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
73
|
+
*/
|
|
74
|
+
slug?: string;
|
|
75
|
+
/** ID of the entity associated with the event. */
|
|
76
|
+
entityId?: string;
|
|
77
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
78
|
+
eventTime?: Date | null;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
81
|
+
* (for example, GDPR).
|
|
82
|
+
*/
|
|
83
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
84
|
+
/** If present, indicates the action that triggered the event. */
|
|
85
|
+
originatedFrom?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
88
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
89
|
+
*/
|
|
90
|
+
entityEventSequence?: string | null;
|
|
91
|
+
}
|
|
92
|
+
/** @oneof */
|
|
93
|
+
interface DomainEventBodyOneOf {
|
|
94
|
+
createdEvent?: EntityCreatedEvent;
|
|
95
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
96
|
+
deletedEvent?: EntityDeletedEvent;
|
|
97
|
+
actionEvent?: ActionEvent;
|
|
98
|
+
}
|
|
99
|
+
interface EntityCreatedEvent {
|
|
100
|
+
entityAsJson?: string;
|
|
101
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
102
|
+
restoreInfo?: RestoreInfo;
|
|
103
|
+
}
|
|
104
|
+
interface RestoreInfo {
|
|
105
|
+
deletedDate?: Date | null;
|
|
106
|
+
}
|
|
107
|
+
interface EntityUpdatedEvent {
|
|
108
|
+
/**
|
|
109
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
110
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
111
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
112
|
+
*/
|
|
113
|
+
currentEntityAsJson?: string;
|
|
114
|
+
}
|
|
115
|
+
interface EntityDeletedEvent {
|
|
116
|
+
/** Entity that was deleted. */
|
|
117
|
+
deletedEntityAsJson?: string | null;
|
|
118
|
+
}
|
|
119
|
+
interface ActionEvent {
|
|
120
|
+
bodyAsJson?: string;
|
|
121
|
+
}
|
|
122
|
+
interface MessageEnvelope {
|
|
123
|
+
/**
|
|
124
|
+
* App instance ID.
|
|
125
|
+
* @format GUID
|
|
126
|
+
*/
|
|
127
|
+
instanceId?: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* Event type.
|
|
130
|
+
* @maxLength 150
|
|
131
|
+
*/
|
|
132
|
+
eventType?: string;
|
|
133
|
+
/** The identification type and identity data. */
|
|
134
|
+
identity?: IdentificationData;
|
|
135
|
+
/** Stringify payload. */
|
|
136
|
+
data?: string;
|
|
137
|
+
}
|
|
138
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
139
|
+
/**
|
|
140
|
+
* ID of a site visitor that has not logged in to the site.
|
|
141
|
+
* @format GUID
|
|
142
|
+
*/
|
|
143
|
+
anonymousVisitorId?: string;
|
|
144
|
+
/**
|
|
145
|
+
* ID of a site visitor that has logged in to the site.
|
|
146
|
+
* @format GUID
|
|
147
|
+
*/
|
|
148
|
+
memberId?: string;
|
|
149
|
+
/**
|
|
150
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
151
|
+
* @format GUID
|
|
152
|
+
*/
|
|
153
|
+
wixUserId?: string;
|
|
154
|
+
/**
|
|
155
|
+
* ID of an app.
|
|
156
|
+
* @format GUID
|
|
157
|
+
*/
|
|
158
|
+
appId?: string;
|
|
159
|
+
/** @readonly */
|
|
160
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
161
|
+
}
|
|
162
|
+
/** @oneof */
|
|
163
|
+
interface IdentificationDataIdOneOf {
|
|
164
|
+
/**
|
|
165
|
+
* ID of a site visitor that has not logged in to the site.
|
|
166
|
+
* @format GUID
|
|
167
|
+
*/
|
|
168
|
+
anonymousVisitorId?: string;
|
|
169
|
+
/**
|
|
170
|
+
* ID of a site visitor that has logged in to the site.
|
|
171
|
+
* @format GUID
|
|
172
|
+
*/
|
|
173
|
+
memberId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
176
|
+
* @format GUID
|
|
177
|
+
*/
|
|
178
|
+
wixUserId?: string;
|
|
179
|
+
/**
|
|
180
|
+
* ID of an app.
|
|
181
|
+
* @format GUID
|
|
182
|
+
*/
|
|
183
|
+
appId?: string;
|
|
184
|
+
}
|
|
185
|
+
declare enum WebhookIdentityType {
|
|
186
|
+
UNKNOWN = "UNKNOWN",
|
|
187
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
188
|
+
MEMBER = "MEMBER",
|
|
189
|
+
WIX_USER = "WIX_USER",
|
|
190
|
+
APP = "APP"
|
|
191
|
+
}
|
|
192
|
+
/** @enumType */
|
|
193
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
194
|
+
|
|
195
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
196
|
+
getUrl: (context: any) => string;
|
|
197
|
+
httpMethod: K;
|
|
198
|
+
path: string;
|
|
199
|
+
pathParams: M;
|
|
200
|
+
__requestType: T;
|
|
201
|
+
__originalRequestType: S;
|
|
202
|
+
__responseType: Q;
|
|
203
|
+
__originalResponseType: R;
|
|
204
|
+
};
|
|
205
|
+
declare function getPricingPlansSettings(): __PublicMethodMetaInfo<'GET', {}, GetPricingPlansSettingsRequest$1, GetPricingPlansSettingsRequest, GetPricingPlansSettingsResponse$1, GetPricingPlansSettingsResponse>;
|
|
206
|
+
declare function updatePricingPlansSettings(): __PublicMethodMetaInfo<'PATCH', {}, UpdatePricingPlansSettingsRequest$1, UpdatePricingPlansSettingsRequest, UpdatePricingPlansSettingsResponse$1, UpdatePricingPlansSettingsResponse>;
|
|
207
|
+
|
|
208
|
+
export { type ActionEvent as ActionEventOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetPricingPlansSettingsRequest as GetPricingPlansSettingsRequestOriginal, type GetPricingPlansSettingsResponse as GetPricingPlansSettingsResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PricingPlansSettings as PricingPlansSettingsOriginal, type RestoreInfo as RestoreInfoOriginal, TaxableAddress as TaxableAddressOriginal, type TaxableAddressWithLiterals as TaxableAddressWithLiteralsOriginal, type UpdatePricingPlansSettingsRequest as UpdatePricingPlansSettingsRequestOriginal, type UpdatePricingPlansSettingsResponse as UpdatePricingPlansSettingsResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, getPricingPlansSettings, updatePricingPlansSettings };
|