@crowdedkingdomstudios/crowdyjs 2.1.2 → 4.0.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/MIGRATION.md +26 -0
- package/README.md +155 -749
- package/dist/auth-state.d.ts +6 -16
- package/dist/auth-state.d.ts.map +1 -1
- package/dist/auth-state.js +9 -26
- package/dist/client.d.ts +14 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +24 -17
- package/dist/crowdy-client.d.ts +62 -16
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +70 -28
- package/dist/domains/apps.d.ts +48 -20
- package/dist/domains/apps.d.ts.map +1 -1
- package/dist/domains/apps.js +58 -35
- package/dist/domains/auth.d.ts +33 -22
- package/dist/domains/auth.d.ts.map +1 -1
- package/dist/domains/auth.js +51 -33
- package/dist/domains/serverStatus.d.ts +2 -1
- package/dist/domains/serverStatus.d.ts.map +1 -1
- package/dist/domains/serverStatus.js +5 -1
- package/dist/domains/udp.d.ts +28 -3
- package/dist/domains/udp.d.ts.map +1 -1
- package/dist/domains/udp.js +52 -1
- package/dist/domains/users.d.ts +19 -16
- package/dist/domains/users.d.ts.map +1 -1
- package/dist/domains/users.js +21 -39
- package/dist/errors.d.ts +42 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +42 -0
- package/dist/generated/graphql.d.ts +1473 -11
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +17 -8
- package/dist/index.d.ts +37 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -20
- package/dist/logger.d.ts +8 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +1 -0
- package/dist/realtime.d.ts +89 -0
- package/dist/realtime.d.ts.map +1 -0
- package/dist/realtime.js +273 -0
- package/dist/session.d.ts +27 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +61 -0
- package/dist/subscriptions.d.ts +1 -48
- package/dist/subscriptions.d.ts.map +1 -1
- package/dist/subscriptions.js +1 -192
- package/dist/types.d.ts +2 -31
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +5 -33
- package/dist/utils.d.ts +12 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +50 -0
- package/dist/world.d.ts +44 -0
- package/dist/world.d.ts.map +1 -0
- package/dist/world.js +105 -0
- package/package.json +12 -3
- package/dist/domains/appAccess.d.ts +0 -23
- package/dist/domains/appAccess.d.ts.map +0 -1
- package/dist/domains/appAccess.js +0 -42
- package/dist/domains/billing.d.ts +0 -17
- package/dist/domains/billing.d.ts.map +0 -1
- package/dist/domains/billing.js +0 -31
- package/dist/domains/organizations.d.ts +0 -33
- package/dist/domains/organizations.d.ts.map +0 -1
- package/dist/domains/organizations.js +0 -90
- package/dist/domains/payments.d.ts +0 -20
- package/dist/domains/payments.d.ts.map +0 -1
- package/dist/domains/payments.js +0 -28
- package/dist/domains/quotas.d.ts +0 -20
- package/dist/domains/quotas.d.ts.map +0 -1
- package/dist/domains/quotas.js +0 -34
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type WalletBalanceQuery, type WalletBalanceQueryVariables, type WalletTransactionsQuery, type WalletTransactionsQueryVariables, type AppBudgetQuery, type AppBudgetQueryVariables, type AppBudgetsQuery, type AppBudgetsQueryVariables, type SetAppBudgetMutation, type SetAppBudgetMutationVariables } from '../generated/graphql.js';
|
|
3
|
-
/**
|
|
4
|
-
* Billing & wallet operations: balances, transactions, app budgets. Exposed
|
|
5
|
-
* as `client.billing`. Wallet top-up flows go through `client.payments`
|
|
6
|
-
* (CheckoutPurpose=ORG_WALLET_TOPUP).
|
|
7
|
-
*/
|
|
8
|
-
export declare class BillingAPI {
|
|
9
|
-
private gql;
|
|
10
|
-
constructor(gql: GraphQLClient);
|
|
11
|
-
balance(orgId: WalletBalanceQueryVariables['orgId']): Promise<WalletBalanceQuery['walletBalance']>;
|
|
12
|
-
transactions(args: WalletTransactionsQueryVariables): Promise<WalletTransactionsQuery['walletTransactions']>;
|
|
13
|
-
appBudget(args: AppBudgetQueryVariables): Promise<AppBudgetQuery['appBudget']>;
|
|
14
|
-
appBudgets(orgId: AppBudgetsQueryVariables['orgId']): Promise<AppBudgetsQuery['appBudgets']>;
|
|
15
|
-
setAppBudget(args: SetAppBudgetMutationVariables): Promise<SetAppBudgetMutation['setAppBudget']>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=billing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/domains/billing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EAErC,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAE5B,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAE7B,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EACnC,MAAM,yBAAyB,CAAC;AAEjC;;;;GAIG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,OAAO,CACX,KAAK,EAAE,2BAA2B,CAAC,OAAO,CAAC,GAC1C,OAAO,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAKzC,YAAY,CAChB,IAAI,EAAE,gCAAgC,GACrC,OAAO,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;IAKnD,SAAS,CACb,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAKjC,UAAU,CACd,KAAK,EAAE,wBAAwB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAKnC,YAAY,CAChB,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;CAIjD"}
|
package/dist/domains/billing.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { WalletBalanceDocument, WalletTransactionsDocument, AppBudgetDocument, AppBudgetsDocument, SetAppBudgetDocument, } from '../generated/graphql.js';
|
|
2
|
-
/**
|
|
3
|
-
* Billing & wallet operations: balances, transactions, app budgets. Exposed
|
|
4
|
-
* as `client.billing`. Wallet top-up flows go through `client.payments`
|
|
5
|
-
* (CheckoutPurpose=ORG_WALLET_TOPUP).
|
|
6
|
-
*/
|
|
7
|
-
export class BillingAPI {
|
|
8
|
-
constructor(gql) {
|
|
9
|
-
this.gql = gql;
|
|
10
|
-
}
|
|
11
|
-
async balance(orgId) {
|
|
12
|
-
const data = await this.gql.request(WalletBalanceDocument, { orgId });
|
|
13
|
-
return data.walletBalance;
|
|
14
|
-
}
|
|
15
|
-
async transactions(args) {
|
|
16
|
-
const data = await this.gql.request(WalletTransactionsDocument, args);
|
|
17
|
-
return data.walletTransactions;
|
|
18
|
-
}
|
|
19
|
-
async appBudget(args) {
|
|
20
|
-
const data = await this.gql.request(AppBudgetDocument, args);
|
|
21
|
-
return data.appBudget;
|
|
22
|
-
}
|
|
23
|
-
async appBudgets(orgId) {
|
|
24
|
-
const data = await this.gql.request(AppBudgetsDocument, { orgId });
|
|
25
|
-
return data.appBudgets;
|
|
26
|
-
}
|
|
27
|
-
async setAppBudget(args) {
|
|
28
|
-
const data = await this.gql.request(SetAppBudgetDocument, args);
|
|
29
|
-
return data.setAppBudget;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type OrganizationQuery, type OrganizationQueryVariables, type OrganizationBySlugQuery, type OrganizationBySlugQueryVariables, type OrgMembersQuery, type OrgMembersQueryVariables, type MyOrganizationsQuery, type OrgPermissionsQuery, type OrgRolesQuery, type OrgRolesQueryVariables, type OrgTokensQuery, type OrgTokensQueryVariables, type CreateOrganizationMutation, type CreateOrganizationMutationVariables, type CreateOrgTokenMutation, type CreateOrgTokenMutationVariables, type UpdateOrgTokenMutation, type UpdateOrgTokenMutationVariables, type RevokeOrgTokenMutationVariables, type InviteOrgMemberMutation, type InviteOrgMemberMutationVariables, type RemoveOrgMemberMutationVariables, type UpdateOrgMemberRolesMutation, type UpdateOrgMemberRolesMutationVariables, type CreateOrgRoleMutation, type CreateOrgRoleMutationVariables, type UpdateOrgRoleMutation, type UpdateOrgRoleMutationVariables, type DeleteOrgRoleMutationVariables, type SetOrgStatusMutation, type SetOrgStatusMutationVariables } from '../generated/graphql.js';
|
|
3
|
-
/**
|
|
4
|
-
* Organization (multi-tenant studio) operations: lookup, members, roles,
|
|
5
|
-
* tokens. Exposed as `client.orgs`.
|
|
6
|
-
*/
|
|
7
|
-
export declare class OrganizationsAPI {
|
|
8
|
-
private gql;
|
|
9
|
-
constructor(gql: GraphQLClient);
|
|
10
|
-
byId(id: OrganizationQueryVariables['id']): Promise<OrganizationQuery['organization']>;
|
|
11
|
-
bySlug(slug: OrganizationBySlugQueryVariables['slug']): Promise<OrganizationBySlugQuery['organizationBySlug']>;
|
|
12
|
-
myOrganizations(): Promise<MyOrganizationsQuery['myOrganizations']>;
|
|
13
|
-
permissionsCatalog(): Promise<OrgPermissionsQuery['orgPermissions']>;
|
|
14
|
-
members(orgId: OrgMembersQueryVariables['orgId']): Promise<OrgMembersQuery['orgMembers']>;
|
|
15
|
-
roles(orgId: OrgRolesQueryVariables['orgId']): Promise<OrgRolesQuery['orgRoles']>;
|
|
16
|
-
createRole(input: CreateOrgRoleMutationVariables['input']): Promise<CreateOrgRoleMutation['createOrgRole']>;
|
|
17
|
-
updateRole(args: UpdateOrgRoleMutationVariables): Promise<UpdateOrgRoleMutation['updateOrgRole']>;
|
|
18
|
-
deleteRole(orgRoleId: DeleteOrgRoleMutationVariables['orgRoleId']): Promise<boolean>;
|
|
19
|
-
inviteMember(input: InviteOrgMemberMutationVariables['input']): Promise<InviteOrgMemberMutation['inviteOrgMember']>;
|
|
20
|
-
removeMember(args: RemoveOrgMemberMutationVariables): Promise<boolean>;
|
|
21
|
-
setMemberRoles(args: UpdateOrgMemberRolesMutationVariables): Promise<UpdateOrgMemberRolesMutation['updateOrgMemberRoles']>;
|
|
22
|
-
tokens(orgId: OrgTokensQueryVariables['orgId']): Promise<OrgTokensQuery['orgTokens']>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the plaintext token exactly once (on creation). Save it now;
|
|
25
|
-
* subsequent listings show metadata only via the `tokens()` query.
|
|
26
|
-
*/
|
|
27
|
-
createToken(input: CreateOrgTokenMutationVariables['input']): Promise<CreateOrgTokenMutation['createOrgToken']>;
|
|
28
|
-
updateToken(args: UpdateOrgTokenMutationVariables): Promise<UpdateOrgTokenMutation['updateOrgToken']>;
|
|
29
|
-
revokeToken(orgTokenId: RevokeOrgTokenMutationVariables['orgTokenId']): Promise<boolean>;
|
|
30
|
-
create(input: CreateOrganizationMutationVariables['input']): Promise<CreateOrganizationMutation['createOrganization']>;
|
|
31
|
-
setStatus(args: SetOrgStatusMutationVariables): Promise<SetOrgStatusMutation['setOrgStatus']>;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/domains/organizations.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { OrganizationDocument, OrganizationBySlugDocument, OrgMembersDocument, MyOrganizationsDocument, OrgPermissionsDocument, OrgRolesDocument, OrgTokensDocument, CreateOrganizationDocument, CreateOrgTokenDocument, UpdateOrgTokenDocument, RevokeOrgTokenDocument, InviteOrgMemberDocument, RemoveOrgMemberDocument, UpdateOrgMemberRolesDocument, CreateOrgRoleDocument, UpdateOrgRoleDocument, DeleteOrgRoleDocument, SetOrgStatusDocument, } from '../generated/graphql.js';
|
|
2
|
-
/**
|
|
3
|
-
* Organization (multi-tenant studio) operations: lookup, members, roles,
|
|
4
|
-
* tokens. Exposed as `client.orgs`.
|
|
5
|
-
*/
|
|
6
|
-
export class OrganizationsAPI {
|
|
7
|
-
constructor(gql) {
|
|
8
|
-
this.gql = gql;
|
|
9
|
-
}
|
|
10
|
-
// -- Discovery ---------------------------------------------------------
|
|
11
|
-
async byId(id) {
|
|
12
|
-
const data = await this.gql.request(OrganizationDocument, { id });
|
|
13
|
-
return data.organization;
|
|
14
|
-
}
|
|
15
|
-
async bySlug(slug) {
|
|
16
|
-
const data = await this.gql.request(OrganizationBySlugDocument, { slug });
|
|
17
|
-
return data.organizationBySlug;
|
|
18
|
-
}
|
|
19
|
-
async myOrganizations() {
|
|
20
|
-
const data = await this.gql.request(MyOrganizationsDocument, undefined);
|
|
21
|
-
return data.myOrganizations;
|
|
22
|
-
}
|
|
23
|
-
async permissionsCatalog() {
|
|
24
|
-
const data = await this.gql.request(OrgPermissionsDocument, undefined);
|
|
25
|
-
return data.orgPermissions;
|
|
26
|
-
}
|
|
27
|
-
// -- Members + Roles --------------------------------------------------
|
|
28
|
-
async members(orgId) {
|
|
29
|
-
const data = await this.gql.request(OrgMembersDocument, { orgId });
|
|
30
|
-
return data.orgMembers;
|
|
31
|
-
}
|
|
32
|
-
async roles(orgId) {
|
|
33
|
-
const data = await this.gql.request(OrgRolesDocument, { orgId });
|
|
34
|
-
return data.orgRoles;
|
|
35
|
-
}
|
|
36
|
-
async createRole(input) {
|
|
37
|
-
const data = await this.gql.request(CreateOrgRoleDocument, { input });
|
|
38
|
-
return data.createOrgRole;
|
|
39
|
-
}
|
|
40
|
-
async updateRole(args) {
|
|
41
|
-
const data = await this.gql.request(UpdateOrgRoleDocument, args);
|
|
42
|
-
return data.updateOrgRole;
|
|
43
|
-
}
|
|
44
|
-
async deleteRole(orgRoleId) {
|
|
45
|
-
const data = await this.gql.request(DeleteOrgRoleDocument, { orgRoleId });
|
|
46
|
-
return data.deleteOrgRole;
|
|
47
|
-
}
|
|
48
|
-
async inviteMember(input) {
|
|
49
|
-
const data = await this.gql.request(InviteOrgMemberDocument, { input });
|
|
50
|
-
return data.inviteOrgMember;
|
|
51
|
-
}
|
|
52
|
-
async removeMember(args) {
|
|
53
|
-
const data = await this.gql.request(RemoveOrgMemberDocument, args);
|
|
54
|
-
return data.removeOrgMember;
|
|
55
|
-
}
|
|
56
|
-
async setMemberRoles(args) {
|
|
57
|
-
const data = await this.gql.request(UpdateOrgMemberRolesDocument, args);
|
|
58
|
-
return data.updateOrgMemberRoles;
|
|
59
|
-
}
|
|
60
|
-
// -- Tokens -----------------------------------------------------------
|
|
61
|
-
async tokens(orgId) {
|
|
62
|
-
const data = await this.gql.request(OrgTokensDocument, { orgId });
|
|
63
|
-
return data.orgTokens;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Returns the plaintext token exactly once (on creation). Save it now;
|
|
67
|
-
* subsequent listings show metadata only via the `tokens()` query.
|
|
68
|
-
*/
|
|
69
|
-
async createToken(input) {
|
|
70
|
-
const data = await this.gql.request(CreateOrgTokenDocument, { input });
|
|
71
|
-
return data.createOrgToken;
|
|
72
|
-
}
|
|
73
|
-
async updateToken(args) {
|
|
74
|
-
const data = await this.gql.request(UpdateOrgTokenDocument, args);
|
|
75
|
-
return data.updateOrgToken;
|
|
76
|
-
}
|
|
77
|
-
async revokeToken(orgTokenId) {
|
|
78
|
-
const data = await this.gql.request(RevokeOrgTokenDocument, { orgTokenId });
|
|
79
|
-
return data.revokeOrgToken;
|
|
80
|
-
}
|
|
81
|
-
// -- Lifecycle --------------------------------------------------------
|
|
82
|
-
async create(input) {
|
|
83
|
-
const data = await this.gql.request(CreateOrganizationDocument, { input });
|
|
84
|
-
return data.createOrganization;
|
|
85
|
-
}
|
|
86
|
-
async setStatus(args) {
|
|
87
|
-
const data = await this.gql.request(SetOrgStatusDocument, args);
|
|
88
|
-
return data.setOrgStatus;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type CreateCheckoutMutation, type CreateCheckoutMutationVariables, type MyCheckoutsQuery, type MyCheckoutsQueryVariables, type CheckoutsQuery, type CheckoutsQueryVariables } from '../generated/graphql.js';
|
|
3
|
-
/**
|
|
4
|
-
* Provider-agnostic checkout creation + history. Exposed as
|
|
5
|
-
* `client.payments`.
|
|
6
|
-
*
|
|
7
|
-
* Every checkout (Stripe or PayPal) returns an `externalUrl` that the
|
|
8
|
-
* caller redirects the user to. The status only flips to COMPLETED when
|
|
9
|
-
* the matching webhook reaches the API; `myCheckouts()` reflects the
|
|
10
|
-
* current truth.
|
|
11
|
-
*/
|
|
12
|
-
export declare class PaymentsAPI {
|
|
13
|
-
private gql;
|
|
14
|
-
constructor(gql: GraphQLClient);
|
|
15
|
-
createCheckout(input: CreateCheckoutMutationVariables['input']): Promise<CreateCheckoutMutation['createCheckout']>;
|
|
16
|
-
myCheckouts(args?: MyCheckoutsQueryVariables): Promise<MyCheckoutsQuery['myCheckouts']>;
|
|
17
|
-
/** Super admin only - cross-tenant payments audit. */
|
|
18
|
-
checkouts(args?: CheckoutsQueryVariables): Promise<CheckoutsQuery['checkouts']>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=payments.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../src/domains/payments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EAEpC,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAE9B,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACV,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,cAAc,CAClB,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,GAC9C,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAK9C,WAAW,CACf,IAAI,GAAE,yBAA8B,GACnC,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAK3C,sDAAsD;IAChD,SAAS,CACb,IAAI,GAAE,uBAA4B,GACjC,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CAIxC"}
|
package/dist/domains/payments.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CreateCheckoutDocument, MyCheckoutsDocument, CheckoutsDocument, } from '../generated/graphql.js';
|
|
2
|
-
/**
|
|
3
|
-
* Provider-agnostic checkout creation + history. Exposed as
|
|
4
|
-
* `client.payments`.
|
|
5
|
-
*
|
|
6
|
-
* Every checkout (Stripe or PayPal) returns an `externalUrl` that the
|
|
7
|
-
* caller redirects the user to. The status only flips to COMPLETED when
|
|
8
|
-
* the matching webhook reaches the API; `myCheckouts()` reflects the
|
|
9
|
-
* current truth.
|
|
10
|
-
*/
|
|
11
|
-
export class PaymentsAPI {
|
|
12
|
-
constructor(gql) {
|
|
13
|
-
this.gql = gql;
|
|
14
|
-
}
|
|
15
|
-
async createCheckout(input) {
|
|
16
|
-
const data = await this.gql.request(CreateCheckoutDocument, { input });
|
|
17
|
-
return data.createCheckout;
|
|
18
|
-
}
|
|
19
|
-
async myCheckouts(args = {}) {
|
|
20
|
-
const data = await this.gql.request(MyCheckoutsDocument, args);
|
|
21
|
-
return data.myCheckouts;
|
|
22
|
-
}
|
|
23
|
-
/** Super admin only - cross-tenant payments audit. */
|
|
24
|
-
async checkouts(args = {}) {
|
|
25
|
-
const data = await this.gql.request(CheckoutsDocument, args);
|
|
26
|
-
return data.checkouts;
|
|
27
|
-
}
|
|
28
|
-
}
|
package/dist/domains/quotas.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type QuotasForOrgQuery, type QuotasForOrgQueryVariables, type QuotasForAppQuery, type QuotasForAppQueryVariables, type EffectiveQuotaQuery, type EffectiveQuotaQueryVariables, type SetQuotaMutation, type SetQuotaMutationVariables, type DeleteQuotaMutationVariables } from '../generated/graphql.js';
|
|
3
|
-
/**
|
|
4
|
-
* Service quota management. Exposed as `client.quotas`.
|
|
5
|
-
*/
|
|
6
|
-
export declare class QuotasAPI {
|
|
7
|
-
private gql;
|
|
8
|
-
constructor(gql: GraphQLClient);
|
|
9
|
-
byOrg(orgId: QuotasForOrgQueryVariables['orgId']): Promise<QuotasForOrgQuery['quotasForOrg']>;
|
|
10
|
-
byApp(appId: QuotasForAppQueryVariables['appId']): Promise<QuotasForAppQuery['quotasForApp']>;
|
|
11
|
-
/**
|
|
12
|
-
* Returns the most-specific quota that applies to (orgId, appId, tierId,
|
|
13
|
-
* metric). Walks tier -> app -> org -> free_tier_defaults. Returns null
|
|
14
|
-
* when nothing matches.
|
|
15
|
-
*/
|
|
16
|
-
effective(args: EffectiveQuotaQueryVariables): Promise<EffectiveQuotaQuery['effectiveQuota']>;
|
|
17
|
-
set(input: SetQuotaMutationVariables['input']): Promise<SetQuotaMutation['setQuota']>;
|
|
18
|
-
delete(quotaId: DeleteQuotaMutationVariables['quotaId']): Promise<boolean>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=quotas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quotas.d.ts","sourceRoot":"","sources":["../../src/domains/quotas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAE/B,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAE/B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAE9B,KAAK,4BAA4B,EAClC,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,qBAAa,SAAS;IACR,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,KAAK,CACT,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC,GACzC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAKvC,KAAK,CACT,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC,GACzC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAK7C;;;;OAIG;IACG,SAAS,CACb,IAAI,EAAE,4BAA4B,GACjC,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAK3C,GAAG,CACP,KAAK,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACxC,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAKlC,MAAM,CACV,OAAO,EAAE,4BAA4B,CAAC,SAAS,CAAC,GAC/C,OAAO,CAAC,OAAO,CAAC;CAIpB"}
|
package/dist/domains/quotas.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { QuotasForOrgDocument, QuotasForAppDocument, EffectiveQuotaDocument, SetQuotaDocument, DeleteQuotaDocument, } from '../generated/graphql.js';
|
|
2
|
-
/**
|
|
3
|
-
* Service quota management. Exposed as `client.quotas`.
|
|
4
|
-
*/
|
|
5
|
-
export class QuotasAPI {
|
|
6
|
-
constructor(gql) {
|
|
7
|
-
this.gql = gql;
|
|
8
|
-
}
|
|
9
|
-
async byOrg(orgId) {
|
|
10
|
-
const data = await this.gql.request(QuotasForOrgDocument, { orgId });
|
|
11
|
-
return data.quotasForOrg;
|
|
12
|
-
}
|
|
13
|
-
async byApp(appId) {
|
|
14
|
-
const data = await this.gql.request(QuotasForAppDocument, { appId });
|
|
15
|
-
return data.quotasForApp;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Returns the most-specific quota that applies to (orgId, appId, tierId,
|
|
19
|
-
* metric). Walks tier -> app -> org -> free_tier_defaults. Returns null
|
|
20
|
-
* when nothing matches.
|
|
21
|
-
*/
|
|
22
|
-
async effective(args) {
|
|
23
|
-
const data = await this.gql.request(EffectiveQuotaDocument, args);
|
|
24
|
-
return data.effectiveQuota;
|
|
25
|
-
}
|
|
26
|
-
async set(input) {
|
|
27
|
-
const data = await this.gql.request(SetQuotaDocument, { input });
|
|
28
|
-
return data.setQuota;
|
|
29
|
-
}
|
|
30
|
-
async delete(quotaId) {
|
|
31
|
-
const data = await this.gql.request(DeleteQuotaDocument, { quotaId });
|
|
32
|
-
return data.deleteQuota;
|
|
33
|
-
}
|
|
34
|
-
}
|