@arbidocs/sdk 0.4.107 → 0.4.109

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.
@@ -6269,6 +6269,67 @@ declare class Arbi {
6269
6269
  is_deployment_admin: boolean;
6270
6270
  }>;
6271
6271
  };
6272
+ readonly firm: {
6273
+ /** The firm's pooled monthly £ of AI usage (`has_pool` false where there is none). */
6274
+ pool: () => Promise<{
6275
+ has_pool: boolean;
6276
+ month?: string | null;
6277
+ resets_at?: string | null;
6278
+ licence_status?: string | null;
6279
+ expires_at?: string | null;
6280
+ premium_only: boolean;
6281
+ box_seats?: number | null;
6282
+ plus_seats?: number | null;
6283
+ ai_addons?: number | null;
6284
+ addon_gbp?: number | null;
6285
+ base_gbp?: number | null;
6286
+ auto_addons?: number | null;
6287
+ auto_addon_gbp?: number | null;
6288
+ auto_addon_price_pence?: number | null;
6289
+ auto_addon_spent_pence?: number | null;
6290
+ auto_addon_limit_pence?: number | null;
6291
+ total_gbp?: number | null;
6292
+ used_gbp?: number | null;
6293
+ remaining_gbp?: number | null;
6294
+ people_this_month?: number | null;
6295
+ report_computed_at?: string | null;
6296
+ subscription_status?: string | null;
6297
+ cancel_at_period_end?: boolean | null;
6298
+ period_end?: string | null;
6299
+ can_top_up: boolean;
6300
+ }>;
6301
+ /** Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the firm. Box admins only. */
6302
+ topUp: (aiAddons: number) => Promise<{
6303
+ pool: {
6304
+ has_pool: boolean;
6305
+ month?: string | null | undefined;
6306
+ resets_at?: string | null | undefined;
6307
+ licence_status?: string | null | undefined;
6308
+ expires_at?: string | null | undefined;
6309
+ premium_only: boolean;
6310
+ box_seats?: number | null | undefined;
6311
+ plus_seats?: number | null | undefined;
6312
+ ai_addons?: number | null | undefined;
6313
+ addon_gbp?: number | null | undefined;
6314
+ base_gbp?: number | null | undefined;
6315
+ auto_addons?: number | null | undefined;
6316
+ auto_addon_gbp?: number | null | undefined;
6317
+ auto_addon_price_pence?: number | null | undefined;
6318
+ auto_addon_spent_pence?: number | null | undefined;
6319
+ auto_addon_limit_pence?: number | null | undefined;
6320
+ total_gbp?: number | null | undefined;
6321
+ used_gbp?: number | null | undefined;
6322
+ remaining_gbp?: number | null | undefined;
6323
+ people_this_month?: number | null | undefined;
6324
+ report_computed_at?: string | null | undefined;
6325
+ subscription_status?: string | null | undefined;
6326
+ cancel_at_period_end?: boolean | null | undefined;
6327
+ period_end?: string | null | undefined;
6328
+ can_top_up: boolean;
6329
+ };
6330
+ invoice_url?: string | null | undefined;
6331
+ }>;
6332
+ };
6272
6333
  readonly profile: {
6273
6334
  /** Update the display profile; pass only what changes (`''` clears family name or picture). */
6274
6335
  update: (body: UpdateProfileRequest) => Promise<{
@@ -6269,6 +6269,67 @@ declare class Arbi {
6269
6269
  is_deployment_admin: boolean;
6270
6270
  }>;
6271
6271
  };
6272
+ readonly firm: {
6273
+ /** The firm's pooled monthly £ of AI usage (`has_pool` false where there is none). */
6274
+ pool: () => Promise<{
6275
+ has_pool: boolean;
6276
+ month?: string | null;
6277
+ resets_at?: string | null;
6278
+ licence_status?: string | null;
6279
+ expires_at?: string | null;
6280
+ premium_only: boolean;
6281
+ box_seats?: number | null;
6282
+ plus_seats?: number | null;
6283
+ ai_addons?: number | null;
6284
+ addon_gbp?: number | null;
6285
+ base_gbp?: number | null;
6286
+ auto_addons?: number | null;
6287
+ auto_addon_gbp?: number | null;
6288
+ auto_addon_price_pence?: number | null;
6289
+ auto_addon_spent_pence?: number | null;
6290
+ auto_addon_limit_pence?: number | null;
6291
+ total_gbp?: number | null;
6292
+ used_gbp?: number | null;
6293
+ remaining_gbp?: number | null;
6294
+ people_this_month?: number | null;
6295
+ report_computed_at?: string | null;
6296
+ subscription_status?: string | null;
6297
+ cancel_at_period_end?: boolean | null;
6298
+ period_end?: string | null;
6299
+ can_top_up: boolean;
6300
+ }>;
6301
+ /** Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the firm. Box admins only. */
6302
+ topUp: (aiAddons: number) => Promise<{
6303
+ pool: {
6304
+ has_pool: boolean;
6305
+ month?: string | null | undefined;
6306
+ resets_at?: string | null | undefined;
6307
+ licence_status?: string | null | undefined;
6308
+ expires_at?: string | null | undefined;
6309
+ premium_only: boolean;
6310
+ box_seats?: number | null | undefined;
6311
+ plus_seats?: number | null | undefined;
6312
+ ai_addons?: number | null | undefined;
6313
+ addon_gbp?: number | null | undefined;
6314
+ base_gbp?: number | null | undefined;
6315
+ auto_addons?: number | null | undefined;
6316
+ auto_addon_gbp?: number | null | undefined;
6317
+ auto_addon_price_pence?: number | null | undefined;
6318
+ auto_addon_spent_pence?: number | null | undefined;
6319
+ auto_addon_limit_pence?: number | null | undefined;
6320
+ total_gbp?: number | null | undefined;
6321
+ used_gbp?: number | null | undefined;
6322
+ remaining_gbp?: number | null | undefined;
6323
+ people_this_month?: number | null | undefined;
6324
+ report_computed_at?: string | null | undefined;
6325
+ subscription_status?: string | null | undefined;
6326
+ cancel_at_period_end?: boolean | null | undefined;
6327
+ period_end?: string | null | undefined;
6328
+ can_top_up: boolean;
6329
+ };
6330
+ invoice_url?: string | null | undefined;
6331
+ }>;
6332
+ };
6272
6333
  readonly profile: {
6273
6334
  /** Update the display profile; pass only what changes (`''` clears family name or picture). */
6274
6335
  update: (body: UpdateProfileRequest) => Promise<{
package/dist/browser.cjs CHANGED
@@ -6144,6 +6144,17 @@ async function updateProfile(arbi, body) {
6144
6144
  );
6145
6145
  }
6146
6146
 
6147
+ // src/operations/firm.ts
6148
+ async function getFirmPool(arbi) {
6149
+ return requireData(await arbi.fetch.GET("/v1/firm/pool"), "Failed to fetch the firm AI usage");
6150
+ }
6151
+ async function topUpFirmPool(arbi, aiAddons) {
6152
+ return requireData(
6153
+ await arbi.fetch.POST("/v1/firm/pool/topup", { body: { ai_addons: aiAddons } }),
6154
+ "Failed to add firm AI usage"
6155
+ );
6156
+ }
6157
+
6147
6158
  // src/operations/account.ts
6148
6159
  var account_exports = {};
6149
6160
  __export(account_exports, {
@@ -7724,6 +7735,13 @@ var Arbi = class {
7724
7735
  */
7725
7736
  me: () => getCurrentUser(this.requireClient())
7726
7737
  };
7738
+ // ── Firm ──────────────────────────────────────────────────────────────
7739
+ firm = {
7740
+ /** The firm's pooled monthly £ of AI usage (`has_pool` false where there is none). */
7741
+ pool: () => getFirmPool(this.requireClient()),
7742
+ /** Buy `aiAddons` renewing add-ons (+£10 of AI usage a month each) for the firm. Box admins only. */
7743
+ topUp: (aiAddons) => topUpFirmPool(this.requireClient(), aiAddons)
7744
+ };
7727
7745
  // ── Profile ───────────────────────────────────────────────────────────
7728
7746
  profile = {
7729
7747
  /** Update the display profile; pass only what changes (`''` clears family name or picture). */