@parra/parra-js-sdk 0.3.613 → 0.3.615
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/dist/ParraAPI.d.ts +21 -3
- package/dist/ParraAPI.js +10 -5
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -1035,6 +1035,10 @@ export interface AppArticleCollectionResponse {
|
|
1035
1035
|
total_count: number;
|
1036
1036
|
data: Array<AppArticleStub>;
|
1037
1037
|
}
|
1038
|
+
export declare enum ProductType {
|
1039
|
+
digital = "digital",
|
1040
|
+
external = "external"
|
1041
|
+
}
|
1038
1042
|
export declare enum Currency {
|
1039
1043
|
usd = "usd"
|
1040
1044
|
}
|
@@ -1072,6 +1076,7 @@ export interface AppProductStub {
|
|
1072
1076
|
tenant_id: string;
|
1073
1077
|
title: string;
|
1074
1078
|
key: string;
|
1079
|
+
type: ProductType;
|
1075
1080
|
description?: string | null;
|
1076
1081
|
image?: ImageAssetStub | null;
|
1077
1082
|
icon?: ImageAssetStub | null;
|
@@ -1408,7 +1413,8 @@ export interface ProductStub {
|
|
1408
1413
|
deleted_at?: string | null;
|
1409
1414
|
tenant_id: string;
|
1410
1415
|
title: string;
|
1411
|
-
key: string
|
1416
|
+
key: string;
|
1417
|
+
type: ProductType;
|
1412
1418
|
description?: string | null;
|
1413
1419
|
disabled: boolean;
|
1414
1420
|
image?: ImageAssetStub | null;
|
@@ -1723,7 +1729,8 @@ export interface Product {
|
|
1723
1729
|
deleted_at?: string | null;
|
1724
1730
|
tenant_id: string;
|
1725
1731
|
title: string;
|
1726
|
-
key: string
|
1732
|
+
key: string;
|
1733
|
+
type: ProductType;
|
1727
1734
|
description?: string | null;
|
1728
1735
|
disabled: boolean;
|
1729
1736
|
image?: ImageAssetStub | null;
|
@@ -1733,6 +1740,13 @@ export interface Product {
|
|
1733
1740
|
sort_order?: number;
|
1734
1741
|
entitlements?: Array<ProductEntitlement> | null;
|
1735
1742
|
}
|
1743
|
+
export interface ProductCollectionResponse {
|
1744
|
+
page: number;
|
1745
|
+
page_count: number;
|
1746
|
+
page_size: number;
|
1747
|
+
total_count: number;
|
1748
|
+
data: Array<Product>;
|
1749
|
+
}
|
1736
1750
|
export interface UpdateProductRequestBody {
|
1737
1751
|
title?: string;
|
1738
1752
|
key?: string;
|
@@ -7048,7 +7062,11 @@ declare class ParraAPI {
|
|
7048
7062
|
updateEntitlementById: (tenant_id: string, entitlement_id: string, body?: UpdateEntitlementRequestBody, options?: Options) => Promise<Entitlement>;
|
7049
7063
|
deleteEntitlementById: (tenant_id: string, entitlement_id: string, options?: Options) => Promise<Response>;
|
7050
7064
|
createProduct: (tenant_id: string, body?: CreateProductRequestBody, options?: Options) => Promise<Product>;
|
7051
|
-
|
7065
|
+
paginateProducts: (tenant_id: string, query?: {
|
7066
|
+
limit?: number;
|
7067
|
+
offset?: number;
|
7068
|
+
type?: string | null;
|
7069
|
+
}, options?: Options) => Promise<ProductCollectionResponse>;
|
7052
7070
|
getProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Product>;
|
7053
7071
|
updateProductById: (tenant_id: string, product_id: string, body?: UpdateProductRequestBody, options?: Options) => Promise<Product>;
|
7054
7072
|
deleteProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Response>;
|
package/dist/ParraAPI.js
CHANGED
@@ -11,9 +11,9 @@ var __assign = (this && this.__assign) || function () {
|
|
11
11
|
return __assign.apply(this, arguments);
|
12
12
|
};
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
-
exports.
|
15
|
-
exports.
|
16
|
-
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = void 0;
|
14
|
+
exports.QrCodeStyle = exports.QrCodeLogoPaddingStyle = exports.TextTransform = exports.BorderRadiusType = exports.BorderStyle = exports.FontFamilyType = exports.FontWeightType = exports.FontSizeType = exports.ParraTemplateType = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseStatus = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = exports.ShareAssetType = exports.DesignTokenType = exports.ThemeCornerRadiusStyle = exports.ContentType = exports.CtaType = exports.Interval = exports.Currency = exports.ProductType = exports.ReactionType = exports.ArticleStatus = exports.TagPool = exports.FeedbackFormFieldType = exports.ContentCardActionType = exports.IdentityType = exports.PolicyDocumentType = exports.AppleSsoScope = exports.TenantBrand = exports.TenantArchetype = exports.DomainStatus = exports.DomainType = exports.ApplicationType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
|
15
|
+
exports.MailTemplateType = exports.TenantUserMetricType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApiKeyType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.ClientType = exports.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.SubscriptionStatus = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.BoardType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.FeedChannelType = exports.FeedItemType = exports.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.LessonType = exports.TextAlign = exports.HeadingTag = exports.QrCodeEcLevel = void 0;
|
16
|
+
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = void 0;
|
17
17
|
var TicketType;
|
18
18
|
(function (TicketType) {
|
19
19
|
TicketType["bug"] = "bug";
|
@@ -139,6 +139,11 @@ var ReactionType;
|
|
139
139
|
ReactionType["emoji"] = "emoji";
|
140
140
|
ReactionType["custom"] = "custom";
|
141
141
|
})(ReactionType || (exports.ReactionType = ReactionType = {}));
|
142
|
+
var ProductType;
|
143
|
+
(function (ProductType) {
|
144
|
+
ProductType["digital"] = "digital";
|
145
|
+
ProductType["external"] = "external";
|
146
|
+
})(ProductType || (exports.ProductType = ProductType = {}));
|
142
147
|
var Currency;
|
143
148
|
(function (Currency) {
|
144
149
|
Currency["usd"] = "usd";
|
@@ -1163,9 +1168,9 @@ var ParraAPI = /** @class */ (function () {
|
|
1163
1168
|
"content-type": "application/json",
|
1164
1169
|
} }, options));
|
1165
1170
|
};
|
1166
|
-
this.
|
1171
|
+
this.paginateProducts = function (tenant_id, query, options) {
|
1167
1172
|
if (options === void 0) { options = {}; }
|
1168
|
-
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products"), method: "get" }, options));
|
1173
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products"), method: "get", query: query }, options));
|
1169
1174
|
};
|
1170
1175
|
this.getProductById = function (tenant_id, product_id, options) {
|
1171
1176
|
if (options === void 0) { options = {}; }
|