@parra/parra-js-sdk 0.3.484 → 0.3.486
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 +70 -17
- package/dist/ParraAPI.js +54 -11
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -835,18 +835,11 @@ export interface DesignSystem {
|
|
835
835
|
export interface ColorValue {
|
836
836
|
hex_value?: string;
|
837
837
|
}
|
838
|
-
export
|
839
|
-
|
838
|
+
export interface TokenRef {
|
839
|
+
ref: string;
|
840
840
|
}
|
841
|
-
export
|
842
|
-
|
843
|
-
unit: ValueUnit;
|
844
|
-
}
|
845
|
-
export interface RadiusValue {
|
846
|
-
value: string;
|
847
|
-
unit: ValueUnit;
|
848
|
-
}
|
849
|
-
export type DesignTokenValue = ColorValue | SpacingValue | RadiusValue;
|
841
|
+
export type ColorToken = ColorValue | TokenRef;
|
842
|
+
export type DesignTokenValue = ColorToken;
|
850
843
|
export interface UpdateDesignTokenRequestBody {
|
851
844
|
name?: string;
|
852
845
|
key?: string;
|
@@ -862,6 +855,7 @@ export interface CreateDesignTokenRequestBody {
|
|
862
855
|
value?: DesignTokenValue;
|
863
856
|
is_deprecated?: boolean;
|
864
857
|
is_active?: boolean;
|
858
|
+
theme_id: string;
|
865
859
|
type: string;
|
866
860
|
}
|
867
861
|
export interface DesignToken {
|
@@ -875,6 +869,7 @@ export interface DesignToken {
|
|
875
869
|
value?: DesignTokenValue;
|
876
870
|
is_deprecated?: boolean;
|
877
871
|
is_active?: boolean;
|
872
|
+
theme_id: string;
|
878
873
|
type: string;
|
879
874
|
tenant_id: string;
|
880
875
|
}
|
@@ -1237,18 +1232,62 @@ export interface UpdateProductEntitlementRequestBody {
|
|
1237
1232
|
consumable_quantity?: number | null;
|
1238
1233
|
update_for_all_existing_entitlements?: boolean | null;
|
1239
1234
|
}
|
1235
|
+
export interface UpdateOfferingRequestBody {
|
1236
|
+
title: string;
|
1237
|
+
option: string;
|
1238
|
+
description?: string | null;
|
1239
|
+
}
|
1240
|
+
export interface CreateOfferingRequestBody {
|
1241
|
+
title: string;
|
1242
|
+
option: string;
|
1243
|
+
description?: string | null;
|
1244
|
+
}
|
1245
|
+
export interface Offering {
|
1246
|
+
id: string;
|
1247
|
+
created_at: string;
|
1248
|
+
updated_at: string;
|
1249
|
+
deleted_at?: string | null;
|
1250
|
+
tenant_id: string;
|
1251
|
+
title: string;
|
1252
|
+
option: string;
|
1253
|
+
description?: string | null;
|
1254
|
+
}
|
1255
|
+
export interface UpdatePaywallRequestBody {
|
1256
|
+
title?: string;
|
1257
|
+
key?: string;
|
1258
|
+
description?: string | null;
|
1259
|
+
disabled?: boolean;
|
1260
|
+
}
|
1261
|
+
export interface CreatePaywallRequestBody {
|
1262
|
+
title?: string;
|
1263
|
+
key?: string;
|
1264
|
+
description?: string | null;
|
1265
|
+
disabled?: boolean;
|
1266
|
+
}
|
1267
|
+
export interface Paywall {
|
1268
|
+
id: string;
|
1269
|
+
created_at: string;
|
1270
|
+
updated_at: string;
|
1271
|
+
deleted_at?: string | null;
|
1272
|
+
tenant_id: string;
|
1273
|
+
title: string;
|
1274
|
+
key: string;
|
1275
|
+
description?: string | null;
|
1276
|
+
disabled: boolean;
|
1277
|
+
}
|
1240
1278
|
export interface CreatePaidDmChannelRequestBody {
|
1241
1279
|
type: string;
|
1242
1280
|
key: string;
|
1243
1281
|
}
|
1244
|
-
export
|
1282
|
+
export interface CreateCommunityChannelRequestBody {
|
1283
|
+
type: string;
|
1284
|
+
key: string;
|
1285
|
+
}
|
1286
|
+
export type CreateChatChannelRequestBody = CreatePaidDmChannelRequestBody | CreateCommunityChannelRequestBody;
|
1245
1287
|
export declare enum ChatChannelType {
|
1246
1288
|
paidDm = "paid_dm",
|
1247
|
-
|
1248
|
-
|
1249
|
-
app = "app",
|
1250
|
-
group = "group",
|
1251
|
-
user = "user"
|
1289
|
+
community = "community",
|
1290
|
+
paidCommunity = "paid_community"
|
1252
1291
|
}
|
1253
1292
|
export declare enum ChatChannelStatus {
|
1254
1293
|
active = "active",
|
@@ -1308,6 +1347,10 @@ export interface Channel {
|
|
1308
1347
|
apns?: CreateApnsChannelRequestBody;
|
1309
1348
|
inbox?: CreateInboxChannelRequestBody;
|
1310
1349
|
}
|
1350
|
+
export interface CreateChatChannelMemberRequestBody {
|
1351
|
+
user_id?: string | null;
|
1352
|
+
member_id?: string | null;
|
1353
|
+
}
|
1311
1354
|
export interface MessageCollectionStub {
|
1312
1355
|
id: string;
|
1313
1356
|
created_at: string;
|
@@ -4906,6 +4949,15 @@ declare class ParraAPI {
|
|
4906
4949
|
addEntitlementToProduct: (tenant_id: string, product_id: string, body: CreateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
|
4907
4950
|
updateProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, body?: UpdateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
|
4908
4951
|
deleteProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, options?: Options) => Promise<Response>;
|
4952
|
+
createOffering: (tenant_id: string, body?: CreateOfferingRequestBody, options?: Options) => Promise<Offering>;
|
4953
|
+
listOfferings: (tenant_id: string, options?: Options) => Promise<Array<Offering>>;
|
4954
|
+
updateOfferingById: (tenant_id: string, offering_id: string, body: UpdateOfferingRequestBody, options?: Options) => Promise<Offering>;
|
4955
|
+
deleteOfferingById: (tenant_id: string, offering_id: string, options?: Options) => Promise<Response>;
|
4956
|
+
createPaywall: (tenant_id: string, body: CreatePaywallRequestBody, options?: Options) => Promise<Paywall>;
|
4957
|
+
listPaywalls: (tenant_id: string, options?: Options) => Promise<Array<Paywall>>;
|
4958
|
+
getPaywallById: (tenant_id: string, paywall_id: string, options?: Options) => Promise<Paywall>;
|
4959
|
+
updatePaywallById: (tenant_id: string, paywall_id: string, body?: UpdatePaywallRequestBody, options?: Options) => Promise<Paywall>;
|
4960
|
+
deletePaywallById: (tenant_id: string, paywall_id: string, options?: Options) => Promise<Response>;
|
4909
4961
|
createChatChannel: (tenant_id: string, body?: CreateChatChannelRequestBody, options?: Options) => Promise<Channel>;
|
4910
4962
|
listChatChannels: (tenant_id: string, query?: {
|
4911
4963
|
type?: string;
|
@@ -4914,6 +4966,7 @@ declare class ParraAPI {
|
|
4914
4966
|
last_message_id?: string;
|
4915
4967
|
}, options?: Options) => Promise<Channel>;
|
4916
4968
|
deleteChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Response>;
|
4969
|
+
addMemberToChatChannel: (tenant_id: string, channel_id: string, body?: CreateChatChannelMemberRequestBody, options?: Options) => Promise<ChannelMember>;
|
4917
4970
|
listMembersForChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Array<ChannelMember>>;
|
4918
4971
|
lockChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Channel>;
|
4919
4972
|
unlockChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Channel>;
|
package/dist/ParraAPI.js
CHANGED
@@ -11,8 +11,8 @@ 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.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.ReactionType = exports.FeedItemType = exports.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = exports.ShareAssetType = exports.
|
15
|
-
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = exports.MailTemplateType = exports.TenantUserMetricType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType =
|
14
|
+
exports.BoardType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.ReactionType = exports.FeedItemType = exports.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = exports.ShareAssetType = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.FeedbackFormFieldType = exports.ContentCardActionType = exports.IdentityType = exports.PolicyDocumentType = exports.AppleSsoScope = exports.DomainStatus = exports.DomainType = exports.ApplicationType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
|
15
|
+
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = exports.MailTemplateType = exports.TenantUserMetricType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = void 0;
|
16
16
|
var TicketType;
|
17
17
|
(function (TicketType) {
|
18
18
|
TicketType["bug"] = "bug";
|
@@ -130,10 +130,6 @@ var SubscriptionStatus;
|
|
130
130
|
SubscriptionStatus["canceled"] = "canceled";
|
131
131
|
SubscriptionStatus["unpaid"] = "unpaid";
|
132
132
|
})(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
|
133
|
-
var ValueUnit;
|
134
|
-
(function (ValueUnit) {
|
135
|
-
ValueUnit["px"] = "px";
|
136
|
-
})(ValueUnit || (exports.ValueUnit = ValueUnit = {}));
|
137
133
|
var ShareAssetType;
|
138
134
|
(function (ShareAssetType) {
|
139
135
|
ShareAssetType["creatorUpdate"] = "creator_update";
|
@@ -187,11 +183,8 @@ var BillingSourceType;
|
|
187
183
|
var ChatChannelType;
|
188
184
|
(function (ChatChannelType) {
|
189
185
|
ChatChannelType["paidDm"] = "paid_dm";
|
190
|
-
ChatChannelType["
|
191
|
-
ChatChannelType["
|
192
|
-
ChatChannelType["app"] = "app";
|
193
|
-
ChatChannelType["group"] = "group";
|
194
|
-
ChatChannelType["user"] = "user";
|
186
|
+
ChatChannelType["community"] = "community";
|
187
|
+
ChatChannelType["paidCommunity"] = "paid_community";
|
195
188
|
})(ChatChannelType || (exports.ChatChannelType = ChatChannelType = {}));
|
196
189
|
var ChatChannelStatus;
|
197
190
|
(function (ChatChannelStatus) {
|
@@ -897,6 +890,50 @@ var ParraAPI = /** @class */ (function () {
|
|
897
890
|
if (options === void 0) { options = {}; }
|
898
891
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products/").concat(product_id, "/entitlements/").concat(product_entitlement_id), __assign({ method: "delete" }, options));
|
899
892
|
};
|
893
|
+
this.createOffering = function (tenant_id, body, options) {
|
894
|
+
if (options === void 0) { options = {}; }
|
895
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/offerings"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
896
|
+
"content-type": "application/json",
|
897
|
+
} }, options));
|
898
|
+
};
|
899
|
+
this.listOfferings = function (tenant_id, options) {
|
900
|
+
if (options === void 0) { options = {}; }
|
901
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/offerings"), __assign({ method: "get" }, options));
|
902
|
+
};
|
903
|
+
this.updateOfferingById = function (tenant_id, offering_id, body, options) {
|
904
|
+
if (options === void 0) { options = {}; }
|
905
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/offerings/").concat(offering_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
906
|
+
"content-type": "application/json",
|
907
|
+
} }, options));
|
908
|
+
};
|
909
|
+
this.deleteOfferingById = function (tenant_id, offering_id, options) {
|
910
|
+
if (options === void 0) { options = {}; }
|
911
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/offerings/").concat(offering_id), __assign({ method: "delete" }, options));
|
912
|
+
};
|
913
|
+
this.createPaywall = function (tenant_id, body, options) {
|
914
|
+
if (options === void 0) { options = {}; }
|
915
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/paywalls"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
916
|
+
"content-type": "application/json",
|
917
|
+
} }, options));
|
918
|
+
};
|
919
|
+
this.listPaywalls = function (tenant_id, options) {
|
920
|
+
if (options === void 0) { options = {}; }
|
921
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/paywalls"), __assign({ method: "get" }, options));
|
922
|
+
};
|
923
|
+
this.getPaywallById = function (tenant_id, paywall_id, options) {
|
924
|
+
if (options === void 0) { options = {}; }
|
925
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/paywalls/").concat(paywall_id), __assign({ method: "get" }, options));
|
926
|
+
};
|
927
|
+
this.updatePaywallById = function (tenant_id, paywall_id, body, options) {
|
928
|
+
if (options === void 0) { options = {}; }
|
929
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/paywalls/").concat(paywall_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
930
|
+
"content-type": "application/json",
|
931
|
+
} }, options));
|
932
|
+
};
|
933
|
+
this.deletePaywallById = function (tenant_id, paywall_id, options) {
|
934
|
+
if (options === void 0) { options = {}; }
|
935
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/paywalls/").concat(paywall_id), __assign({ method: "delete" }, options));
|
936
|
+
};
|
900
937
|
this.createChatChannel = function (tenant_id, body, options) {
|
901
938
|
if (options === void 0) { options = {}; }
|
902
939
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
@@ -915,6 +952,12 @@ var ParraAPI = /** @class */ (function () {
|
|
915
952
|
if (options === void 0) { options = {}; }
|
916
953
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "delete" }, options));
|
917
954
|
};
|
955
|
+
this.addMemberToChatChannel = function (tenant_id, channel_id, body, options) {
|
956
|
+
if (options === void 0) { options = {}; }
|
957
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/members"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
958
|
+
"content-type": "application/json",
|
959
|
+
} }, options));
|
960
|
+
};
|
918
961
|
this.listMembersForChatChannel = function (tenant_id, channel_id, options) {
|
919
962
|
if (options === void 0) { options = {}; }
|
920
963
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/members"), __assign({ method: "get" }, options));
|