@mymehq/sdk 4.6.0 → 4.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 +29 -2
- package/dist/index.js +35 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MergeStrategy, ConflictSnapshot, MergePolicy, ItemState, Tier, Item, CreateItemInput, PaginatedResult, ItemWithMetadata, Version, Edge, Metadata, SearchResult, CreateEdgeInput, EdgeTypeSchema, TypeSchema, CreateKeyInput, ApiKey, UpdateKeyInput, CreateWebhookInput, Webhook, UpdateWebhookInput, WebhookDelivery, ConnectionInstallResult, ConnectionUninstallResult, TenantConfig } from '@mymehq/shared';
|
|
1
|
+
import { MergeStrategy, ConflictSnapshot, MergePolicy, ItemState, Tier, Item, CreateItemInput, PaginatedResult, ItemWithMetadata, Version, Edge, Metadata, SearchResult, CreateEdgeInput, EdgeTypeSchema, TypeSchema, CreateKeyInput, ApiKey, UpdateKeyInput, CreateWebhookInput, Webhook, UpdateWebhookInput, WebhookDelivery, ConnectionInstallResult, ConnectionUninstallResult, TenantConfig, TenantQuota } from '@mymehq/shared';
|
|
2
2
|
export { ApiKey, ConflictSnapshot, CreateItemInput, CreateKeyInput, Item, ItemState, MergePolicy, MergeStrategy, Metadata, PaginatedResult, SearchResult, TypeSchema, UpdateKeyInput, Version } from '@mymehq/shared';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -580,7 +580,7 @@ declare class MymeClient {
|
|
|
580
580
|
label?: string;
|
|
581
581
|
}) => Promise<ConnectionInstallResult>;
|
|
582
582
|
/**
|
|
583
|
-
* Orchestrated uninstall of an `
|
|
583
|
+
* Orchestrated uninstall of an `integration`
|
|
584
584
|
* connection. Revokes runtime credentials, deletes upstream OAuth
|
|
585
585
|
* tokens, revokes active leased tokens, disables inbound webhook
|
|
586
586
|
* subscriptions, transitions the system.connection state to
|
|
@@ -603,6 +603,33 @@ declare class MymeClient {
|
|
|
603
603
|
/** Replaces the current tenant's config. Server validates that any
|
|
604
604
|
* type IDs in retention overrides resolve in the registry. */
|
|
605
605
|
setConfig: (config: TenantConfig) => Promise<TenantConfig>;
|
|
606
|
+
/** Per-tenant resource quotas (T-052). Empty / missing limits fall
|
|
607
|
+
* back to the instance defaults from env. Quotas are platform-
|
|
608
|
+
* admin-managed. */
|
|
609
|
+
quotas: {
|
|
610
|
+
/**
|
|
611
|
+
* Read the calling tenant's quota row. Resolves the tenant from
|
|
612
|
+
* the bearer's `tenant_id`; rejects with 400 when the credential
|
|
613
|
+
* is tenant-less (platform admin, single-tenant self-host
|
|
614
|
+
* bootstrap). Use `getById` instead in that case.
|
|
615
|
+
*
|
|
616
|
+
* Wave B Part 4 follow-on: ships alongside T-015's release tag.
|
|
617
|
+
* The route landed in Wave B Part 2 (`GET /tenants/me/quotas`)
|
|
618
|
+
* and was usable via raw HTTP until this method.
|
|
619
|
+
*/
|
|
620
|
+
getOwn: () => Promise<TenantQuota>;
|
|
621
|
+
/** Read a specific tenant's quota row (platform admin only). */
|
|
622
|
+
getById: (tenantId: string) => Promise<TenantQuota>;
|
|
623
|
+
/** Replace a tenant's quota row (platform admin only). Pass null
|
|
624
|
+
* on a field to clear it (revert to env default). */
|
|
625
|
+
set: (tenantId: string, input: {
|
|
626
|
+
items_limit?: number | null;
|
|
627
|
+
webhooks_limit?: number | null;
|
|
628
|
+
blobs_limit?: number | null;
|
|
629
|
+
storage_bytes_limit?: number | null;
|
|
630
|
+
rate_per_minute_limit?: number | null;
|
|
631
|
+
}) => Promise<TenantQuota>;
|
|
632
|
+
};
|
|
606
633
|
};
|
|
607
634
|
private throwRawError;
|
|
608
635
|
}
|
package/dist/index.js
CHANGED
|
@@ -916,7 +916,7 @@ var MymeClient = class {
|
|
|
916
916
|
);
|
|
917
917
|
},
|
|
918
918
|
/**
|
|
919
|
-
* Orchestrated uninstall of an `
|
|
919
|
+
* Orchestrated uninstall of an `integration`
|
|
920
920
|
* connection. Revokes runtime credentials, deletes upstream OAuth
|
|
921
921
|
* tokens, revokes active leased tokens, disables inbound webhook
|
|
922
922
|
* subscriptions, transitions the system.connection state to
|
|
@@ -955,6 +955,40 @@ var MymeClient = class {
|
|
|
955
955
|
"/tenants/current/config",
|
|
956
956
|
{ body: config }
|
|
957
957
|
);
|
|
958
|
+
},
|
|
959
|
+
/** Per-tenant resource quotas (T-052). Empty / missing limits fall
|
|
960
|
+
* back to the instance defaults from env. Quotas are platform-
|
|
961
|
+
* admin-managed. */
|
|
962
|
+
quotas: {
|
|
963
|
+
/**
|
|
964
|
+
* Read the calling tenant's quota row. Resolves the tenant from
|
|
965
|
+
* the bearer's `tenant_id`; rejects with 400 when the credential
|
|
966
|
+
* is tenant-less (platform admin, single-tenant self-host
|
|
967
|
+
* bootstrap). Use `getById` instead in that case.
|
|
968
|
+
*
|
|
969
|
+
* Wave B Part 4 follow-on: ships alongside T-015's release tag.
|
|
970
|
+
* The route landed in Wave B Part 2 (`GET /tenants/me/quotas`)
|
|
971
|
+
* and was usable via raw HTTP until this method.
|
|
972
|
+
*/
|
|
973
|
+
getOwn: async () => {
|
|
974
|
+
return this.transport.request("GET", "/tenants/me/quotas");
|
|
975
|
+
},
|
|
976
|
+
/** Read a specific tenant's quota row (platform admin only). */
|
|
977
|
+
getById: async (tenantId) => {
|
|
978
|
+
return this.transport.request(
|
|
979
|
+
"GET",
|
|
980
|
+
`/tenants/${encodeURIComponent(tenantId)}/quotas`
|
|
981
|
+
);
|
|
982
|
+
},
|
|
983
|
+
/** Replace a tenant's quota row (platform admin only). Pass null
|
|
984
|
+
* on a field to clear it (revert to env default). */
|
|
985
|
+
set: async (tenantId, input) => {
|
|
986
|
+
return this.transport.request(
|
|
987
|
+
"PUT",
|
|
988
|
+
`/tenants/${encodeURIComponent(tenantId)}/quotas`,
|
|
989
|
+
{ body: input }
|
|
990
|
+
);
|
|
991
|
+
}
|
|
958
992
|
}
|
|
959
993
|
};
|
|
960
994
|
// ---- Internal ----
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mymehq/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@mymehq/shared": "4.
|
|
23
|
+
"@mymehq/shared": "4.8.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^22.0.0",
|