@wix/auto_sdk_pricing-plans_plans 1.0.91 → 1.0.93

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.
@@ -1,4 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  /** Information about the pricing plan. */
4
4
  interface Plan {
@@ -681,6 +681,23 @@ declare enum WebhookIdentityType {
681
681
  }
682
682
  /** @enumType */
683
683
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
684
+ interface AccountDetails {
685
+ /**
686
+ * ID of the account.
687
+ * @format GUID
688
+ */
689
+ accountId?: string | null;
690
+ /**
691
+ * ID of the parent account.
692
+ * @format GUID
693
+ */
694
+ parentAccountId?: string | null;
695
+ /**
696
+ * ID of the site, if applicable.
697
+ * @format GUID
698
+ */
699
+ siteId?: string | null;
700
+ }
684
701
  /** @docsIgnore */
685
702
  type ListPublicPlansApplicationErrors = {
686
703
  code?: 'PRICING_PLANS_NOT_INSTALLED';
@@ -1122,10 +1139,54 @@ interface PlansQueryBuilder {
1122
1139
  * @requiredField query
1123
1140
  * @returns Fulfilled - The query definition used to run the query using the [`find()`](#find) method.
1124
1141
  */
1125
- declare function typedQueryPublicPlans(query: QueryV2): Promise<NonNullablePaths<QueryPublicPlansResponse, `plans` | `plans.${number}._id` | `plans.${number}.pricing.singlePaymentForDuration.unit` | `plans.${number}.pricing.price.value` | `plans.${number}.pricing.price.currency` | `plans.${number}.primary`, 6> & {
1142
+ declare function typedQueryPublicPlans(query: PlanQuery): Promise<NonNullablePaths<QueryPublicPlansResponse, `plans` | `plans.${number}._id` | `plans.${number}.pricing.singlePaymentForDuration.unit` | `plans.${number}.pricing.price.value` | `plans.${number}.pricing.price.currency` | `plans.${number}.primary`, 6> & {
1126
1143
  __applicationErrorsType?: QueryPublicPlansApplicationErrors;
1127
1144
  __validationErrorsType?: QueryPublicPlansValidationErrors;
1128
1145
  }>;
1146
+ interface PlanQuerySpec extends QuerySpec {
1147
+ paging: 'offset';
1148
+ wql: [
1149
+ {
1150
+ fields: ['_createdDate', '_id', '_updatedDate', 'primary', 'slug'];
1151
+ operators: '*';
1152
+ sort: 'BOTH';
1153
+ }
1154
+ ];
1155
+ }
1156
+ type CommonQueryWithEntityContext = Query<Plan, PlanQuerySpec>;
1157
+ type PlanQuery = {
1158
+ /**
1159
+ A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans).
1160
+ */
1161
+ filter?: CommonQueryWithEntityContext['filter'] | null;
1162
+ /**
1163
+ Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}].
1164
+ */
1165
+ sort?: {
1166
+ /**
1167
+ Name of the field to sort by.
1168
+ @maxLength: 512
1169
+ */
1170
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
1171
+ /**
1172
+ Sort order.
1173
+ */
1174
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1175
+ }[];
1176
+ /**
1177
+ Pointer to page of results using offset. Can't be used together with 'cursorPaging'.
1178
+ */
1179
+ paging?: {
1180
+ /**
1181
+ Number of items to load.
1182
+ */
1183
+ limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;
1184
+ /**
1185
+ Number of items to skip in the current sort order.
1186
+ */
1187
+ offset?: NonNullable<CommonQueryWithEntityContext['paging']>['offset'] | null;
1188
+ };
1189
+ };
1129
1190
  /**
1130
1191
  * Retrieves a pricing plan by ID.
1131
1192
  * @param _id - Plan ID.
@@ -1392,4 +1453,4 @@ declare function archivePlan(_id: string): Promise<NonNullablePaths<ArchivePlanR
1392
1453
  __applicationErrorsType?: ArchivePlanApplicationErrors;
1393
1454
  }>;
1394
1455
 
1395
- export { type ActionEvent, type ApplicationError, AppliedAt, type AppliedAtWithLiterals, type ArchivePlanApplicationErrors, type ArchivePlanRequest, type ArchivePlanResponse, ArchivedFilter, type ArchivedFilterWithLiterals, type ArrangePlansRequest, type ArrangePlansResponse, type BaseEventMetadata, type BulkActionMetadata, type BulkArchivePlanRequest, type BulkArchivePlanResponse, type BulkPlanResult, type BuyerCanCancelUpdated, type ClearPrimaryApplicationErrors, type ClearPrimaryRequest, type ClearPrimaryResponse, type CountPlansRequest, type CountPlansResponse, type CreatePlanApplicationErrors, type CreatePlanRequest, type CreatePlanResponse, type CreatePlanValidationErrors, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type Duration, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fee, type FeeConfig, type GetPlanApplicationErrors, type GetPlanRequest, type GetPlanResponse, type GetPlanStatsApplicationErrors, type GetPlanStatsRequest, type GetPlanStatsResponse, type GetPlansPremiumStatusRequest, type GetPlansPremiumStatusResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListPlansApplicationErrors, type ListPlansOptions, type ListPlansRequest, type ListPlansResponse, type ListPlansValidationErrors, type ListPublicPlansApplicationErrors, type ListPublicPlansOptions, type ListPublicPlansRequest, type ListPublicPlansResponse, type MakePlanPrimaryApplicationErrors, type MakePlanPrimaryRequest, type MakePlanPrimaryResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadataV2, PeriodUnit, type PeriodUnitWithLiterals, type Plan, type PlanArchived, type PlanArchivedEnvelope, type PlanBuyerCanCancelUpdatedEnvelope, type PlanCreatedEnvelope, type PlanUpdatedEnvelope, type PlansQueryBuilder, type PlansQueryResult, type Pricing, type PricingPricingModelOneOf, PublicFilter, type PublicFilterWithLiterals, type PublicPlan, type QueryPublicPlansApplicationErrors, type QueryPublicPlansRequest, type QueryPublicPlansResponse, type QueryPublicPlansValidationErrors, type QueryV2, type Recurrence, type RestoreInfo, type SearchPlansRequest, type SearchPlansResponse, type SetPlanVisibilityApplicationErrors, type SetPlanVisibilityRequest, type SetPlanVisibilityResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type StringList, type UpdatePlan, type UpdatePlanApplicationErrors, type UpdatePlanRequest, type UpdatePlanResponse, type UpdatePlanValidationErrors, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, archivePlan, clearPrimary, createPlan, getPlan, getPlanStats, listPlans, listPublicPlans, makePlanPrimary, onPlanArchived, onPlanBuyerCanCancelUpdated, onPlanCreated, onPlanUpdated, queryPublicPlans, setPlanVisibility, typedQueryPublicPlans, updatePlan };
1456
+ export { type AccountDetails, type ActionEvent, type ApplicationError, AppliedAt, type AppliedAtWithLiterals, type ArchivePlanApplicationErrors, type ArchivePlanRequest, type ArchivePlanResponse, ArchivedFilter, type ArchivedFilterWithLiterals, type ArrangePlansRequest, type ArrangePlansResponse, type BaseEventMetadata, type BulkActionMetadata, type BulkArchivePlanRequest, type BulkArchivePlanResponse, type BulkPlanResult, type BuyerCanCancelUpdated, type ClearPrimaryApplicationErrors, type ClearPrimaryRequest, type ClearPrimaryResponse, type CommonQueryWithEntityContext, type CountPlansRequest, type CountPlansResponse, type CreatePlanApplicationErrors, type CreatePlanRequest, type CreatePlanResponse, type CreatePlanValidationErrors, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type Duration, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fee, type FeeConfig, type GetPlanApplicationErrors, type GetPlanRequest, type GetPlanResponse, type GetPlanStatsApplicationErrors, type GetPlanStatsRequest, type GetPlanStatsResponse, type GetPlansPremiumStatusRequest, type GetPlansPremiumStatusResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListPlansApplicationErrors, type ListPlansOptions, type ListPlansRequest, type ListPlansResponse, type ListPlansValidationErrors, type ListPublicPlansApplicationErrors, type ListPublicPlansOptions, type ListPublicPlansRequest, type ListPublicPlansResponse, type MakePlanPrimaryApplicationErrors, type MakePlanPrimaryRequest, type MakePlanPrimaryResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadataV2, PeriodUnit, type PeriodUnitWithLiterals, type Plan, type PlanArchived, type PlanArchivedEnvelope, type PlanBuyerCanCancelUpdatedEnvelope, type PlanCreatedEnvelope, type PlanQuery, type PlanQuerySpec, type PlanUpdatedEnvelope, type PlansQueryBuilder, type PlansQueryResult, type Pricing, type PricingPricingModelOneOf, PublicFilter, type PublicFilterWithLiterals, type PublicPlan, type QueryPublicPlansApplicationErrors, type QueryPublicPlansRequest, type QueryPublicPlansResponse, type QueryPublicPlansValidationErrors, type QueryV2, type Recurrence, type RestoreInfo, type SearchPlansRequest, type SearchPlansResponse, type SetPlanVisibilityApplicationErrors, type SetPlanVisibilityRequest, type SetPlanVisibilityResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type StringList, type UpdatePlan, type UpdatePlanApplicationErrors, type UpdatePlanRequest, type UpdatePlanResponse, type UpdatePlanValidationErrors, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, archivePlan, clearPrimary, createPlan, getPlan, getPlanStats, listPlans, listPublicPlans, makePlanPrimary, onPlanArchived, onPlanBuyerCanCancelUpdated, onPlanCreated, onPlanUpdated, queryPublicPlans, setPlanVisibility, typedQueryPublicPlans, updatePlan };