@wix/auto_sdk_pricing-plans_plans 1.0.84 → 1.0.85
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 +8 -27
- package/build/cjs/index.js +43 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +16 -6
- package/build/cjs/index.typings.js +25 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +3 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -27
- package/build/es/index.mjs +43 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +16 -6
- package/build/es/index.typings.mjs +24 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +3 -3
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -27
- package/build/internal/cjs/index.js +43 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +16 -6
- package/build/internal/cjs/index.typings.js +25 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +3 -3
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -27
- package/build/internal/es/index.mjs +43 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +16 -6
- package/build/internal/es/index.typings.mjs +24 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +3 -3
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -197,12 +197,12 @@ declare enum AppliedAt {
|
|
|
197
197
|
type AppliedAtWithLiterals = AppliedAt | 'UNKNOWN_CHARGE_EVENT' | 'FIRST_PAYMENT';
|
|
198
198
|
interface ListPublicPlansRequest {
|
|
199
199
|
/**
|
|
200
|
-
* Number of items to list. Defaults to `75`. See limits
|
|
200
|
+
* Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).
|
|
201
201
|
* @min 1
|
|
202
202
|
* @max 100
|
|
203
203
|
*/
|
|
204
204
|
limit?: number | null;
|
|
205
|
-
/** Number of items to skip. Defaults to `0`. See paging
|
|
205
|
+
/** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */
|
|
206
206
|
offset?: number | null;
|
|
207
207
|
/**
|
|
208
208
|
* IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.
|
|
@@ -295,7 +295,7 @@ interface QueryPublicPlansRequest {
|
|
|
295
295
|
query?: QueryV2;
|
|
296
296
|
}
|
|
297
297
|
interface QueryV2 {
|
|
298
|
-
/** A filter object. See supported fields and operators
|
|
298
|
+
/** 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). */
|
|
299
299
|
filter?: Record<string, any> | null;
|
|
300
300
|
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]. */
|
|
301
301
|
sort?: Sorting[];
|
|
@@ -1016,12 +1016,12 @@ declare function listPublicPlans(options?: ListPublicPlansOptions): Promise<NonN
|
|
|
1016
1016
|
}>;
|
|
1017
1017
|
interface ListPublicPlansOptions {
|
|
1018
1018
|
/**
|
|
1019
|
-
* Number of items to list. Defaults to `75`. See limits
|
|
1019
|
+
* Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).
|
|
1020
1020
|
* @min 1
|
|
1021
1021
|
* @max 100
|
|
1022
1022
|
*/
|
|
1023
1023
|
limit?: number | null;
|
|
1024
|
-
/** Number of items to skip. Defaults to `0`. See paging
|
|
1024
|
+
/** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */
|
|
1025
1025
|
offset?: number | null;
|
|
1026
1026
|
/**
|
|
1027
1027
|
* IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.
|
|
@@ -1116,6 +1116,16 @@ interface PlansQueryBuilder {
|
|
|
1116
1116
|
skip: (skip: number) => PlansQueryBuilder;
|
|
1117
1117
|
find: () => Promise<PlansQueryResult>;
|
|
1118
1118
|
}
|
|
1119
|
+
/**
|
|
1120
|
+
* @hidden
|
|
1121
|
+
* @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans
|
|
1122
|
+
* @requiredField query
|
|
1123
|
+
* @returns Fulfilled - The query definition used to run the query using the [`find()`](#find) method.
|
|
1124
|
+
*/
|
|
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> & {
|
|
1126
|
+
__applicationErrorsType?: QueryPublicPlansApplicationErrors;
|
|
1127
|
+
__validationErrorsType?: QueryPublicPlansValidationErrors;
|
|
1128
|
+
}>;
|
|
1119
1129
|
/**
|
|
1120
1130
|
* Retrieves a pricing plan by ID.
|
|
1121
1131
|
* @param _id - Plan ID.
|
|
@@ -1382,4 +1392,4 @@ declare function archivePlan(_id: string): Promise<NonNullablePaths<ArchivePlanR
|
|
|
1382
1392
|
__applicationErrorsType?: ArchivePlanApplicationErrors;
|
|
1383
1393
|
}>;
|
|
1384
1394
|
|
|
1385
|
-
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, updatePlan };
|
|
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 };
|
|
@@ -36,6 +36,7 @@ __export(index_typings_exports, {
|
|
|
36
36
|
makePlanPrimary: () => makePlanPrimary2,
|
|
37
37
|
queryPublicPlans: () => queryPublicPlans2,
|
|
38
38
|
setPlanVisibility: () => setPlanVisibility2,
|
|
39
|
+
typedQueryPublicPlans: () => typedQueryPublicPlans,
|
|
39
40
|
updatePlan: () => updatePlan2
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -577,6 +578,29 @@ function queryPublicPlans2() {
|
|
|
577
578
|
transformationPaths: {}
|
|
578
579
|
});
|
|
579
580
|
}
|
|
581
|
+
async function typedQueryPublicPlans(query) {
|
|
582
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
583
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
584
|
+
const reqOpts = queryPublicPlans(payload);
|
|
585
|
+
sideEffects?.onSiteCall?.();
|
|
586
|
+
try {
|
|
587
|
+
const result = await httpClient.request(reqOpts);
|
|
588
|
+
sideEffects?.onSuccess?.(result);
|
|
589
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
590
|
+
} catch (err) {
|
|
591
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
592
|
+
err,
|
|
593
|
+
{
|
|
594
|
+
spreadPathsToArguments: {},
|
|
595
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
596
|
+
singleArgumentUnchanged: false
|
|
597
|
+
},
|
|
598
|
+
["query"]
|
|
599
|
+
);
|
|
600
|
+
sideEffects?.onError?.(err);
|
|
601
|
+
throw transformedError;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
580
604
|
async function getPlan2(_id) {
|
|
581
605
|
const { httpClient, sideEffects } = arguments[1];
|
|
582
606
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
@@ -819,6 +843,7 @@ async function archivePlan2(_id) {
|
|
|
819
843
|
makePlanPrimary,
|
|
820
844
|
queryPublicPlans,
|
|
821
845
|
setPlanVisibility,
|
|
846
|
+
typedQueryPublicPlans,
|
|
822
847
|
updatePlan
|
|
823
848
|
});
|
|
824
849
|
//# sourceMappingURL=index.typings.js.map
|