shred-api-client 2.6.6 → 2.8.0
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/index.d.ts +278 -148
- package/dist/index.js +196 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
@@ -40,6 +40,7 @@ __export(index_exports, {
|
|
|
40
40
|
Notification: () => notification_exports,
|
|
41
41
|
Project: () => project_exports,
|
|
42
42
|
Prompt: () => prompt_exports,
|
|
43
|
+
RBAC: () => rbac_exports,
|
|
43
44
|
ShredAPI: () => ShredAPI,
|
|
44
45
|
SpecialOffer: () => special_offer_exports,
|
|
45
46
|
Subscription: () => subscription_exports,
|
|
@@ -4785,6 +4786,18 @@ var TenantAPI = class {
|
|
|
4785
4786
|
);
|
|
4786
4787
|
return data;
|
|
4787
4788
|
}
|
|
4789
|
+
async updateMembers(tenantId, memberUpdate, context) {
|
|
4790
|
+
const endpointInfo = tenant_exports.Endpoints.UpdateMembers;
|
|
4791
|
+
const endpoint = endpointInfo.uri.replace(":tenantId", tenantId);
|
|
4792
|
+
const data = await this.clientHTTP.makeRequest(
|
|
4793
|
+
this.env,
|
|
4794
|
+
`${endpoint}`,
|
|
4795
|
+
endpointInfo.method,
|
|
4796
|
+
memberUpdate,
|
|
4797
|
+
context
|
|
4798
|
+
);
|
|
4799
|
+
return data;
|
|
4800
|
+
}
|
|
4788
4801
|
};
|
|
4789
4802
|
var Tenant_api_default = TenantAPI;
|
|
4790
4803
|
|
|
@@ -6099,6 +6112,7 @@ __export(tenant_exports, {
|
|
|
6099
6112
|
Action: () => Action,
|
|
6100
6113
|
Endpoints: () => Endpoints10,
|
|
6101
6114
|
MemberSchema: () => MemberSchema,
|
|
6115
|
+
MemberUpdateSchema: () => MemberUpdateSchema,
|
|
6102
6116
|
PreferencesSchema: () => PreferencesSchema,
|
|
6103
6117
|
ReportViewerUpdateSchema: () => ReportViewerUpdateSchema,
|
|
6104
6118
|
TenantSchema: () => TenantSchema,
|
|
@@ -6219,6 +6233,10 @@ var ReportViewerUpdateSchema = external_exports.object({
|
|
|
6219
6233
|
userId: external_exports.string(),
|
|
6220
6234
|
action: external_exports.nativeEnum(Action)
|
|
6221
6235
|
});
|
|
6236
|
+
var MemberUpdateSchema = external_exports.object({
|
|
6237
|
+
userIds: external_exports.array(external_exports.string()),
|
|
6238
|
+
action: external_exports.nativeEnum(Action)
|
|
6239
|
+
});
|
|
6222
6240
|
var TenantUpdateSchema = TenantSchema.pick({
|
|
6223
6241
|
reportUrl: true,
|
|
6224
6242
|
preferences: true
|
|
@@ -6257,6 +6275,10 @@ var Endpoints10 = {
|
|
|
6257
6275
|
UpdateReportViewers: {
|
|
6258
6276
|
uri: "/tenants/:tenantId/report-viewers",
|
|
6259
6277
|
method: "PUT"
|
|
6278
|
+
},
|
|
6279
|
+
UpdateMembers: {
|
|
6280
|
+
uri: "/tenants/:tenantId/members",
|
|
6281
|
+
method: "PUT"
|
|
6260
6282
|
}
|
|
6261
6283
|
};
|
|
6262
6284
|
|
|
@@ -6450,6 +6472,180 @@ __export(special_offer_exports, {
|
|
|
6450
6472
|
UserOfferDetailsSchema: () => UserOfferDetailsSchema
|
|
6451
6473
|
});
|
|
6452
6474
|
|
|
6475
|
+
// src/model/rbac/index.ts
|
|
6476
|
+
var rbac_exports = {};
|
|
6477
|
+
__export(rbac_exports, {
|
|
6478
|
+
ActionCatalog: () => ActionCatalog,
|
|
6479
|
+
Actions: () => Actions
|
|
6480
|
+
});
|
|
6481
|
+
|
|
6482
|
+
// src/model/rbac/Actions.ts
|
|
6483
|
+
var Actions = {
|
|
6484
|
+
// — Projects (staff) —
|
|
6485
|
+
PROJECT_APPROVE: "project.approve",
|
|
6486
|
+
PROJECT_DENY: "project.deny",
|
|
6487
|
+
PROJECT_ASSIGN: "project.assign",
|
|
6488
|
+
PROJECT_ROLLBACK: "project.rollback",
|
|
6489
|
+
PROJECT_SCHEDULE: "project.schedule",
|
|
6490
|
+
PROJECT_UNSCHEDULE: "project.unschedule",
|
|
6491
|
+
PROJECT_GET_NEXT_IN_QUEUE: "project.get_next_in_queue",
|
|
6492
|
+
PROJECT_VIEW_ALL: "project.view_all",
|
|
6493
|
+
PROJECT_VIEW_HISTORY: "project.view_history",
|
|
6494
|
+
PROJECT_START: "project.start",
|
|
6495
|
+
PROJECT_SEND_TO_APPROVAL: "project.send_to_approval",
|
|
6496
|
+
PROJECT_VIEW_POOL: "project.view_pool",
|
|
6497
|
+
PROJECT_STREAM: "project.stream",
|
|
6498
|
+
// — Projects (customer self-service) —
|
|
6499
|
+
PROJECT_CREATE: "project.create",
|
|
6500
|
+
PROJECT_CANCEL: "project.cancel",
|
|
6501
|
+
PROJECT_REORDER: "project.reorder",
|
|
6502
|
+
PROJECT_REQUEST_REVIEW: "project.request_review",
|
|
6503
|
+
PROJECT_RECORD_INTERACTION: "project.record_interaction",
|
|
6504
|
+
PROJECT_CHECK_FREE_QUOTA: "project.check_free_quota",
|
|
6505
|
+
PROJECT_LIST_OWN: "project.list_own",
|
|
6506
|
+
PROJECT_VIEW_OWN: "project.view_own",
|
|
6507
|
+
// — Editors —
|
|
6508
|
+
EDITOR_LIST: "editor.list",
|
|
6509
|
+
EDITOR_GET: "editor.get",
|
|
6510
|
+
// — Goals —
|
|
6511
|
+
GOAL_VIEW_OWN: "goal.view_own",
|
|
6512
|
+
GOAL_VIEW_EDITOR: "goal.view_editor",
|
|
6513
|
+
// — Notes —
|
|
6514
|
+
NOTE_VIEW: "note.view",
|
|
6515
|
+
NOTE_CREATE: "note.create",
|
|
6516
|
+
NOTE_UPDATE: "note.update",
|
|
6517
|
+
NOTE_DELETE: "note.delete",
|
|
6518
|
+
// — Tenants —
|
|
6519
|
+
TENANT_CREATE: "tenant.create",
|
|
6520
|
+
TENANT_LIST: "tenant.list",
|
|
6521
|
+
TENANT_VIEW: "tenant.view",
|
|
6522
|
+
TENANT_UPDATE: "tenant.update",
|
|
6523
|
+
TENANT_VIEW_MEMBERS: "tenant.view_members",
|
|
6524
|
+
TENANT_UPDATE_MEMBERS: "tenant.update_members",
|
|
6525
|
+
TENANT_UPDATE_REPORT_VIEWERS: "tenant.update_report_viewers",
|
|
6526
|
+
TENANT_VIEW_REPORT: "tenant.view_report",
|
|
6527
|
+
TENANT_VIEW_MINE: "tenant.view_mine",
|
|
6528
|
+
// — Offers —
|
|
6529
|
+
OFFER_LIST: "offer.list",
|
|
6530
|
+
OFFER_CREATE: "offer.create",
|
|
6531
|
+
OFFER_UPDATE: "offer.update",
|
|
6532
|
+
OFFER_ENABLE: "offer.enable",
|
|
6533
|
+
OFFER_DISABLE: "offer.disable",
|
|
6534
|
+
OFFER_GET_MINE: "offer.get_mine",
|
|
6535
|
+
OFFER_CLAIM: "offer.claim",
|
|
6536
|
+
// — Subscriptions —
|
|
6537
|
+
SUBSCRIPTION_VIEW_USER: "subscription.view_user",
|
|
6538
|
+
SUBSCRIPTION_VIEW_SUMMARY: "subscription.view_summary",
|
|
6539
|
+
SUBSCRIPTION_LIST_PROMO_CODES: "subscription.list_promo_codes",
|
|
6540
|
+
SUBSCRIPTION_CHECKOUT: "subscription.checkout",
|
|
6541
|
+
SUBSCRIPTION_PORTAL: "subscription.portal",
|
|
6542
|
+
SUBSCRIPTION_VIEW_ACTIVE: "subscription.view_active",
|
|
6543
|
+
SUBSCRIPTION_LIST_PRODUCTS: "subscription.list_products",
|
|
6544
|
+
// — Scripts —
|
|
6545
|
+
SCRIPT_LIST: "script.list",
|
|
6546
|
+
SCRIPT_CREATE: "script.create",
|
|
6547
|
+
SCRIPT_UPDATE: "script.update",
|
|
6548
|
+
SCRIPT_DELETE: "script.delete",
|
|
6549
|
+
SCRIPT_GENERATE: "script.generate",
|
|
6550
|
+
// — Prompts —
|
|
6551
|
+
PROMPT_GET: "prompt.get",
|
|
6552
|
+
// — Email —
|
|
6553
|
+
EMAIL_SEND: "email.send",
|
|
6554
|
+
// — Users —
|
|
6555
|
+
USER_SEARCH: "user.search",
|
|
6556
|
+
USER_CREATE_PRIVILEGED: "user.create_privileged",
|
|
6557
|
+
USER_UPDATE: "user.update",
|
|
6558
|
+
USER_DELETE: "user.delete",
|
|
6559
|
+
USER_CHANGE_EMAIL: "user.change_email",
|
|
6560
|
+
USER_GET_TOKEN: "user.get_token",
|
|
6561
|
+
USER_CREATE_TOKEN: "user.create_token",
|
|
6562
|
+
// — RBAC administration —
|
|
6563
|
+
ROLE_MANAGE: "role.manage",
|
|
6564
|
+
USER_ASSIGN_ROLE: "user.assign_role"
|
|
6565
|
+
};
|
|
6566
|
+
var ActionCatalog = [
|
|
6567
|
+
// Projects
|
|
6568
|
+
{ key: Actions.PROJECT_APPROVE, label: "Approve project", group: "Projects" },
|
|
6569
|
+
{ key: Actions.PROJECT_DENY, label: "Deny project", group: "Projects" },
|
|
6570
|
+
{ key: Actions.PROJECT_ASSIGN, label: "Assign project", group: "Projects" },
|
|
6571
|
+
{ key: Actions.PROJECT_ROLLBACK, label: "Rollback project", group: "Projects" },
|
|
6572
|
+
{ key: Actions.PROJECT_SCHEDULE, label: "Schedule project", group: "Projects" },
|
|
6573
|
+
{ key: Actions.PROJECT_UNSCHEDULE, label: "Unschedule project", group: "Projects" },
|
|
6574
|
+
{ key: Actions.PROJECT_GET_NEXT_IN_QUEUE, label: "Get next project in queue", group: "Projects" },
|
|
6575
|
+
{ key: Actions.PROJECT_VIEW_ALL, label: "View all projects", group: "Projects" },
|
|
6576
|
+
{ key: Actions.PROJECT_VIEW_HISTORY, label: "View project history", group: "Projects" },
|
|
6577
|
+
{ key: Actions.PROJECT_START, label: "Start project (pull from pool)", group: "Projects" },
|
|
6578
|
+
{ key: Actions.PROJECT_SEND_TO_APPROVAL, label: "Send project to approval", group: "Projects" },
|
|
6579
|
+
{ key: Actions.PROJECT_VIEW_POOL, label: "View pool size", group: "Projects" },
|
|
6580
|
+
{ key: Actions.PROJECT_STREAM, label: "Stream projects (realtime)", group: "Projects" },
|
|
6581
|
+
{ key: Actions.PROJECT_CREATE, label: "Create project", group: "Projects" },
|
|
6582
|
+
{ key: Actions.PROJECT_CANCEL, label: "Cancel project", group: "Projects" },
|
|
6583
|
+
{ key: Actions.PROJECT_REORDER, label: "Reorder projects", group: "Projects" },
|
|
6584
|
+
{ key: Actions.PROJECT_REQUEST_REVIEW, label: "Request project review", group: "Projects" },
|
|
6585
|
+
{ key: Actions.PROJECT_RECORD_INTERACTION, label: "Record project interaction", group: "Projects" },
|
|
6586
|
+
{ key: Actions.PROJECT_CHECK_FREE_QUOTA, label: "Check free project quota", group: "Projects" },
|
|
6587
|
+
{ key: Actions.PROJECT_LIST_OWN, label: "List own projects", group: "Projects" },
|
|
6588
|
+
{ key: Actions.PROJECT_VIEW_OWN, label: "View own project", group: "Projects" },
|
|
6589
|
+
// Editors
|
|
6590
|
+
{ key: Actions.EDITOR_LIST, label: "List editors", group: "Editors" },
|
|
6591
|
+
{ key: Actions.EDITOR_GET, label: "View editor", group: "Editors" },
|
|
6592
|
+
// Goals
|
|
6593
|
+
{ key: Actions.GOAL_VIEW_OWN, label: "View own goals", group: "Goals" },
|
|
6594
|
+
{ key: Actions.GOAL_VIEW_EDITOR, label: "View editor goals", group: "Goals" },
|
|
6595
|
+
// Notes
|
|
6596
|
+
{ key: Actions.NOTE_VIEW, label: "View notes", group: "Notes" },
|
|
6597
|
+
{ key: Actions.NOTE_CREATE, label: "Create note", group: "Notes" },
|
|
6598
|
+
{ key: Actions.NOTE_UPDATE, label: "Update note", group: "Notes" },
|
|
6599
|
+
{ key: Actions.NOTE_DELETE, label: "Delete note", group: "Notes" },
|
|
6600
|
+
// Tenants
|
|
6601
|
+
{ key: Actions.TENANT_CREATE, label: "Create tenant", group: "Tenants" },
|
|
6602
|
+
{ key: Actions.TENANT_LIST, label: "List tenants", group: "Tenants" },
|
|
6603
|
+
{ key: Actions.TENANT_VIEW, label: "View tenant", group: "Tenants" },
|
|
6604
|
+
{ key: Actions.TENANT_UPDATE, label: "Update tenant", group: "Tenants" },
|
|
6605
|
+
{ key: Actions.TENANT_VIEW_MEMBERS, label: "View tenant members", group: "Tenants" },
|
|
6606
|
+
{ key: Actions.TENANT_UPDATE_MEMBERS, label: "Update tenant members", group: "Tenants" },
|
|
6607
|
+
{ key: Actions.TENANT_UPDATE_REPORT_VIEWERS, label: "Update tenant report viewers", group: "Tenants" },
|
|
6608
|
+
{ key: Actions.TENANT_VIEW_REPORT, label: "View tenant report", group: "Tenants" },
|
|
6609
|
+
{ key: Actions.TENANT_VIEW_MINE, label: "View my tenant", group: "Tenants" },
|
|
6610
|
+
// Offers
|
|
6611
|
+
{ key: Actions.OFFER_LIST, label: "List offers", group: "Offers" },
|
|
6612
|
+
{ key: Actions.OFFER_CREATE, label: "Create offer", group: "Offers" },
|
|
6613
|
+
{ key: Actions.OFFER_UPDATE, label: "Update offer", group: "Offers" },
|
|
6614
|
+
{ key: Actions.OFFER_ENABLE, label: "Enable offer", group: "Offers" },
|
|
6615
|
+
{ key: Actions.OFFER_DISABLE, label: "Disable offer", group: "Offers" },
|
|
6616
|
+
{ key: Actions.OFFER_GET_MINE, label: "View my offer", group: "Offers" },
|
|
6617
|
+
{ key: Actions.OFFER_CLAIM, label: "Claim offer", group: "Offers" },
|
|
6618
|
+
// Subscriptions
|
|
6619
|
+
{ key: Actions.SUBSCRIPTION_VIEW_USER, label: "View user subscription", group: "Subscriptions" },
|
|
6620
|
+
{ key: Actions.SUBSCRIPTION_VIEW_SUMMARY, label: "View subscription summary", group: "Subscriptions" },
|
|
6621
|
+
{ key: Actions.SUBSCRIPTION_LIST_PROMO_CODES, label: "List promo codes", group: "Subscriptions" },
|
|
6622
|
+
{ key: Actions.SUBSCRIPTION_CHECKOUT, label: "Checkout subscription", group: "Subscriptions" },
|
|
6623
|
+
{ key: Actions.SUBSCRIPTION_PORTAL, label: "Open subscription portal", group: "Subscriptions" },
|
|
6624
|
+
{ key: Actions.SUBSCRIPTION_VIEW_ACTIVE, label: "View active subscription", group: "Subscriptions" },
|
|
6625
|
+
{ key: Actions.SUBSCRIPTION_LIST_PRODUCTS, label: "List subscription products", group: "Subscriptions" },
|
|
6626
|
+
// Scripts
|
|
6627
|
+
{ key: Actions.SCRIPT_LIST, label: "List scripts", group: "Scripts" },
|
|
6628
|
+
{ key: Actions.SCRIPT_CREATE, label: "Create script", group: "Scripts" },
|
|
6629
|
+
{ key: Actions.SCRIPT_UPDATE, label: "Update script", group: "Scripts" },
|
|
6630
|
+
{ key: Actions.SCRIPT_DELETE, label: "Delete script", group: "Scripts" },
|
|
6631
|
+
{ key: Actions.SCRIPT_GENERATE, label: "Generate script", group: "Scripts" },
|
|
6632
|
+
// Prompts
|
|
6633
|
+
{ key: Actions.PROMPT_GET, label: "Get prompt", group: "Prompts" },
|
|
6634
|
+
// Email
|
|
6635
|
+
{ key: Actions.EMAIL_SEND, label: "Send email", group: "Email" },
|
|
6636
|
+
// Users
|
|
6637
|
+
{ key: Actions.USER_SEARCH, label: "Search users", group: "Users" },
|
|
6638
|
+
{ key: Actions.USER_CREATE_PRIVILEGED, label: "Create privileged user", group: "Users" },
|
|
6639
|
+
{ key: Actions.USER_UPDATE, label: "Update own profile", group: "Users" },
|
|
6640
|
+
{ key: Actions.USER_DELETE, label: "Delete own account", group: "Users" },
|
|
6641
|
+
{ key: Actions.USER_CHANGE_EMAIL, label: "Change own email", group: "Users" },
|
|
6642
|
+
{ key: Actions.USER_GET_TOKEN, label: "Get API token", group: "Users" },
|
|
6643
|
+
{ key: Actions.USER_CREATE_TOKEN, label: "Create API token", group: "Users" },
|
|
6644
|
+
// Administration
|
|
6645
|
+
{ key: Actions.ROLE_MANAGE, label: "Manage roles", group: "Administration" },
|
|
6646
|
+
{ key: Actions.USER_ASSIGN_ROLE, label: "Assign roles to users", group: "Administration" }
|
|
6647
|
+
];
|
|
6648
|
+
|
|
6453
6649
|
// src/index.ts
|
|
6454
6650
|
var index_default = ShredAPI;
|
|
6455
6651
|
//# sourceMappingURL=index.js.map
|