@parra/parra-js-sdk 0.3.305 → 0.3.307
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 +11 -0
- package/dist/ParraAPI.js +21 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -813,6 +813,13 @@ export interface CreatorUpdate {
|
|
|
813
813
|
template?: CreatorUpdateSenderStub;
|
|
814
814
|
attachments?: Array<CreatorUpdateAttachmentStub>;
|
|
815
815
|
}
|
|
816
|
+
export interface CreatorUpdateCollectionResponse {
|
|
817
|
+
page: number;
|
|
818
|
+
page_count: number;
|
|
819
|
+
page_size: number;
|
|
820
|
+
total_count: number;
|
|
821
|
+
data: Array<CreatorUpdate>;
|
|
822
|
+
}
|
|
816
823
|
export declare enum FeedItemType {
|
|
817
824
|
youtubeVideo = "youtube_video",
|
|
818
825
|
contentCard = "content_card",
|
|
@@ -3485,6 +3492,7 @@ declare class ParraAPI {
|
|
|
3485
3492
|
uploadIconForTenantApplication: (tenant_id: string, application_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
|
3486
3493
|
uploadHeaderForTenantRelease: (tenant_id: string, release_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
|
3487
3494
|
uploadAttachmentForTicketById: (tenant_id: string, ticket_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
|
3495
|
+
uploadAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
|
3488
3496
|
uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
|
3489
3497
|
createCheckoutSession: (body: CreateCheckoutSessionRequestBody, options?: Options) => Promise<CheckoutSession>;
|
|
3490
3498
|
getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
|
|
@@ -3509,8 +3517,11 @@ declare class ParraAPI {
|
|
|
3509
3517
|
updateFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, body: UpdateFaqSectionRequestBody, options?: Options) => Promise<FaqSection>;
|
|
3510
3518
|
deleteFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<Response>;
|
|
3511
3519
|
createCreatorUpdateForTenant: (tenant_id: string, body: CreateCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
|
|
3520
|
+
paginateCreatorUpdatesForTenant: (tenant_id: string, options?: Options) => Promise<CreatorUpdateCollectionResponse>;
|
|
3512
3521
|
updateCreatorUpdate: (tenant_id: string, creator_update_id: string, body?: CreateCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
|
|
3522
|
+
deleteCreatorUpdate: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<Response>;
|
|
3513
3523
|
sendCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
|
|
3524
|
+
deleteAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, creator_update_attachment_id: string, options?: Options) => Promise<Response>;
|
|
3514
3525
|
paginateItemsForAppFeed: (tenant_id: string, application_id: string, feed_id_or_slug: string, query?: {
|
|
3515
3526
|
limit?: number;
|
|
3516
3527
|
offset?: number;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -438,6 +438,15 @@ var ParraAPI = /** @class */ (function () {
|
|
|
438
438
|
});
|
|
439
439
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tickets/").concat(ticket_id, "/attachments"), __assign({ method: "post", body: formData, headers: {} }, options));
|
|
440
440
|
};
|
|
441
|
+
this.uploadAttachmentForCreatorUpdateById = function (tenant_id, creator_update_id, body, options) {
|
|
442
|
+
if (options === void 0) { options = {}; }
|
|
443
|
+
var formData = new FormData();
|
|
444
|
+
Object.entries(body).forEach(function (_a) {
|
|
445
|
+
var key = _a[0], value = _a[1];
|
|
446
|
+
formData.append(key, value);
|
|
447
|
+
});
|
|
448
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id, "/attachments"), __assign({ method: "post", body: formData, headers: {} }, options));
|
|
449
|
+
};
|
|
441
450
|
this.uploadLogoForTenantById = function (tenant_id, body, options) {
|
|
442
451
|
if (options === void 0) { options = {}; }
|
|
443
452
|
var formData = new FormData();
|
|
@@ -549,16 +558,28 @@ var ParraAPI = /** @class */ (function () {
|
|
|
549
558
|
"content-type": "application/json",
|
|
550
559
|
} }, options));
|
|
551
560
|
};
|
|
561
|
+
this.paginateCreatorUpdatesForTenant = function (tenant_id, options) {
|
|
562
|
+
if (options === void 0) { options = {}; }
|
|
563
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates"), __assign({ method: "get" }, options));
|
|
564
|
+
};
|
|
552
565
|
this.updateCreatorUpdate = function (tenant_id, creator_update_id, body, options) {
|
|
553
566
|
if (options === void 0) { options = {}; }
|
|
554
567
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
555
568
|
"content-type": "application/json",
|
|
556
569
|
} }, options));
|
|
557
570
|
};
|
|
571
|
+
this.deleteCreatorUpdate = function (tenant_id, creator_update_id, options) {
|
|
572
|
+
if (options === void 0) { options = {}; }
|
|
573
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id), __assign({ method: "delete" }, options));
|
|
574
|
+
};
|
|
558
575
|
this.sendCreatorUpdateForTenant = function (tenant_id, creator_update_id, options) {
|
|
559
576
|
if (options === void 0) { options = {}; }
|
|
560
577
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id, "/send"), __assign({ method: "post" }, options));
|
|
561
578
|
};
|
|
579
|
+
this.deleteAttachmentForCreatorUpdateById = function (tenant_id, creator_update_id, creator_update_attachment_id, options) {
|
|
580
|
+
if (options === void 0) { options = {}; }
|
|
581
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id, "/attachments/").concat(creator_update_attachment_id), __assign({ method: "delete" }, options));
|
|
582
|
+
};
|
|
562
583
|
this.paginateItemsForAppFeed = function (tenant_id, application_id, feed_id_or_slug, query, options) {
|
|
563
584
|
if (options === void 0) { options = {}; }
|
|
564
585
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/feeds/").concat(feed_id_or_slug, "/items"), __assign({ method: "get", query: query }, options));
|