@mymehq/sdk 4.5.0 → 4.7.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 +28 -1
- package/dist/index.js +34 -0
- 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
|
/**
|
|
@@ -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
|
@@ -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.7.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.7.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^22.0.0",
|