@nevermined-io/commons 0.5.11 → 0.5.14

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.
@@ -318,6 +318,7 @@ export declare enum OrganizationActivityEventType {
318
318
  INVITATION_EXPIRED = "invitation.expired",
319
319
  AGENT_CREATED = "agent.created",
320
320
  PLAN_CREATED = "plan.created",
321
+ PLAN_UPDATED = "plan.updated",
321
322
  PLAN_PURCHASED = "plan.purchased",
322
323
  CUSTOMER_ADDED = "customer.added",
323
324
  CUSTOMER_BLOCKED = "customer.blocked",
@@ -327,7 +328,10 @@ export declare enum OrganizationActivityEventType {
327
328
  SUBSCRIPTION_CANCELED = "subscription.canceled",
328
329
  SUBSCRIPTION_LAPSED = "subscription.lapsed",
329
330
  WEBHOOK_DELIVERED = "webhook.delivered",
330
- WEBHOOK_FAILED = "webhook.failed"
331
+ WEBHOOK_FAILED = "webhook.failed",
332
+ APIKEY_CREATED = "apikey.created",
333
+ APIKEY_REVOKED = "apikey.revoked",
334
+ CREDITS_REDEEMED = "credits.redeemed"
331
335
  }
332
336
  /**
333
337
  * Status of the last delivery attempt on a webhook subscription.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,oBAAY,SAAS;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC,UAAU,CAAA;CAC5B;AAED,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,CAAC,CAAA;IACR,KAAK,CAAC,EAAE,CA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,CAAA;IAClC,2BAA2B,CAAC,EAAE,MAAM,CAAA;CACrC;AAMD;;;;;;;;GAQG;AACH,oBAAY,6BAA6B;IAEvC,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IAEzC,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IAEjC,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IASzC,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,qBAAqB,0BAA0B;IAC/C,mBAAmB,wBAAwB;IAE3C,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IAEjC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IAEjC,gBAAgB,qBAAqB;CACtC;AAMD;;;GAGG;AACH,oBAAY,qCAAqC;IAC/C,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED;;;GAGG;AACH,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,QAAQ,cAAc;IACtB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd"}
@@ -253,6 +253,7 @@ export var UserProfileType = /*#__PURE__*/ function(UserProfileType) {
253
253
  // Resource lifecycle
254
254
  OrganizationActivityEventType["AGENT_CREATED"] = "agent.created";
255
255
  OrganizationActivityEventType["PLAN_CREATED"] = "plan.created";
256
+ OrganizationActivityEventType["PLAN_UPDATED"] = "plan.updated";
256
257
  OrganizationActivityEventType["PLAN_PURCHASED"] = "plan.purchased";
257
258
  // Customer lifecycle (Stage 4 wires the emit)
258
259
  OrganizationActivityEventType["CUSTOMER_ADDED"] = "customer.added";
@@ -273,6 +274,11 @@ export var UserProfileType = /*#__PURE__*/ function(UserProfileType) {
273
274
  // Webhook delivery (Stage 3b adds emit)
274
275
  OrganizationActivityEventType["WEBHOOK_DELIVERED"] = "webhook.delivered";
275
276
  OrganizationActivityEventType["WEBHOOK_FAILED"] = "webhook.failed";
277
+ // API key lifecycle (org-scoped keys only — keys tagged with an `org-` workspace)
278
+ OrganizationActivityEventType["APIKEY_CREATED"] = "apikey.created";
279
+ OrganizationActivityEventType["APIKEY_REVOKED"] = "apikey.revoked";
280
+ // Credit lifecycle (high-cardinality, per-burn — realtime consumers throttle per-socket)
281
+ OrganizationActivityEventType["CREDITS_REDEEMED"] = "credits.redeemed";
276
282
  return OrganizationActivityEventType;
277
283
  }({});
278
284
  // ---------------------------------------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/types/types.ts"],"sourcesContent":["import * as jose from 'jose'\n\nexport enum AuthRoles {\n Admin = 'admin',\n}\n\nexport interface AuthUser {\n userId: string\n address: string\n hash: string\n roles?: AuthRoles[]\n nvmApiKey?: jose.JWTPayload\n}\n\nexport interface Request<G> {\n hostname: string\n body?: G\n query?: G\n params?: G\n client: { localPort: number }\n protocol: string\n url: string\n user?: AuthUser\n}\n\nexport type DistinctPlans = {\n page: number\n totalPages: number\n totalResults: number\n results: any[]\n}\n\nexport enum PointsRulesCategory {\n wau = 'wau',\n supply = 'supply',\n purchases = 'purchases',\n demand = 'demand',\n curation = 'curation',\n network = 'network',\n other = 'other',\n}\n\nexport enum PointsRulesRecurrency {\n unlimitted = 'unlimitted',\n timeslimitted = 'timeslimitted',\n onlyonce = 'onlyonce',\n onceperitem = 'onceperitem',\n capday = 'capday',\n capweek = 'capweek',\n capmonth = 'capmonth',\n capyear = 'capyear',\n other = 'other',\n}\n\nexport enum PointsEventStatus {\n Pending = 'Pending',\n Processed = 'Processed',\n Failed = 'Failed',\n Skipped = 'Skipped',\n Other = 'Other',\n}\n\nexport enum NotificationType {\n SubscriptionReceived = 'SubscriptionReceived',\n SubscriptionPurchased = 'SubscriptionPurchased',\n AccountSetup = 'AccountSetup',\n EmailValidation = 'EmailValidation',\n Other = 'Other',\n}\n\nexport enum NotificationOriginator {\n Nevermined = 'Nevermined',\n Other = 'Other',\n}\n\nexport enum NotificationReadStatus {\n Pending = 'Pending',\n Read = 'Read',\n Deleted = 'Deleted',\n Other = 'Other',\n}\n\nexport enum NotificationDeliveryStatus {\n Pending = 'Pending',\n Sent = 'Sent',\n Failed = 'Failed',\n NotRequired = 'NotRequired',\n Skipped = 'Skipped',\n Other = 'Other',\n}\n\nexport enum EmailChallengeStatus {\n Pending = 'Pending',\n Validated = 'Validated',\n Failed = 'Failed',\n}\n\nexport enum PlanTransactionType {\n Purchase = 'Purchase',\n Mint = 'Mint',\n Burn = 'Burn',\n Transfer = 'Transfer',\n Error = 'Error',\n Other = 'Other',\n // Off-chain credits event log (nvm-monorepo#1276).\n CreditMint = 'CreditMint',\n CreditBurn = 'CreditBurn',\n CreditExpired = 'CreditExpired',\n CreditBackfill = 'CreditBackfill',\n CreditRefund = 'CreditRefund',\n}\n\nexport enum PlanTransactionPaymentType {\n Crypto = 'Crypto',\n Fiat = 'Fiat',\n}\n\n/**\n * Settlement-reconciliation state for a plan transaction.\n *\n * - `NotApplicable`: no external processor — crypto rows, or any row where\n * there is nothing to reconcile against.\n * - `Pending`: fiat charge created but the processor's real fee / net has\n * not yet been captured (Stripe typically settles T+2).\n * - `Settled`: the real processor fee is in `stripeFee` and `ownerMargin`\n * matches the merchant's bank credit.\n * - `Failed`: a reconciliation attempt could not resolve the row against\n * the processor (e.g. missing charge, transient API error after retries).\n */\nexport enum PlanTransactionReconciliationStatus {\n NotApplicable = 'NotApplicable',\n Pending = 'Pending',\n Settled = 'Settled',\n Failed = 'Failed',\n}\n\nexport enum CheckoutSessionType {\n embedded = 'embedded',\n redirect = 'redirect',\n}\n\nexport enum WidgetLayout {\n Horizontal = 'Horizontal',\n Vertical = 'Vertical',\n Reduced = 'Reduced',\n}\n\nexport enum StripeEventStatus {\n Pending = 'Pending',\n Done = 'Done',\n Error = 'Error',\n Ignored = 'Ignored',\n Other = 'Other',\n}\n\nexport enum ResultType {\n matrix = 'matrix',\n vector = 'vector',\n scalar = 'scalar',\n string = 'string',\n}\n\nexport enum ApiKeyTxType {\n NewPlan = 'NewPlan',\n NewAgent = 'NewAgent',\n EditPlan = 'EditPlan',\n EditAgent = 'EditAgent',\n Purchase = 'Purchase',\n Download = 'Download',\n AccessHit = 'AccessHit',\n Mint = 'Mint',\n Burn = 'Burn',\n AgentExecution = 'AgentExecution',\n Other = 'Other',\n}\n\nexport interface Metric {\n consumer: string\n did: string\n endpoint: string\n job: string\n namespace: string\n owner: string\n access_date: Date\n}\n\nexport interface AccessHistory {\n date: string\n owner: string\n consumer: string\n endpoint: string\n}\n\nexport interface LineItem {\n planId: string\n currency: string\n name: string\n price: number\n quantity: number\n description?: string\n imageUrl?: string\n}\n\nexport interface StripeLineItem {\n price_data: {\n currency: string\n product_data: {\n name: string\n description?: string\n images?: string[]\n metadata?: [string, string]\n }\n unit_amount_decimal: number\n }\n quantity: number\n}\n\nexport const DEFAULT_PAGE = 1\nexport const DEFAULT_OFFSET = 10_000\n\nexport interface PaginationOptions {\n page: number\n skip: number\n offset: number\n sortBy?: string\n sortOrder?: 'asc' | 'desc'\n}\n\nexport enum TaskLogLevel {\n debug = 'debug',\n info = 'info',\n warn = 'warn',\n error = 'error',\n}\n\nexport enum PaymentPlanTypes {\n expirable = 'expirable',\n credits = 'credits',\n}\n\nexport interface OrderResult {\n txHash: `0x${string}`\n planId: bigint\n planReceiver: `0x${string}`\n currency: string\n totalAmount: bigint\n numCredits: bigint\n paymentMethod: PlanTransactionPaymentType\n tokenAddress?: `0x${string}`\n}\n\nexport const NVM_USERID_HEADER = 'NVM-User-id'\nexport const NVM_COST_HEADER = 'NVMCreditsConsumed'\nexport const DEFAULT_COST_CREDITS = '1'\n\nexport enum OrganizationType {\n Premium = 'Premium',\n Enterprise = 'Enterprise',\n /**\n * An org whose paid subscription has lapsed past `currentPeriodEnd`.\n * The org still exists (rows aren't deleted) but no Premium feature\n * gates clear. Webhooks + lapse cron set this; new orgs are never\n * created in this state. Replaces the old `Free` value which was\n * misnamed — a paid-but-expired state was being shown as \"Free\"\n * which overlapped semantically with non-org personal accounts.\n */\n Lapsed = 'Lapsed',\n /**\n * Legacy bucket for orgs pre-dating tiers (pre-Phase 2). Inherits\n * Premium caps + features so existing orgs aren't unfairly blocked.\n * Not assigned by any new code path.\n */\n Other = 'Other',\n}\n\nexport enum OrganizationMemberRole {\n Admin = 'Admin',\n Member = 'Member',\n}\n\nexport enum OrganizationCustomerStatus {\n Active = 'active',\n Blocked = 'blocked',\n}\n\nexport enum OrganizationInvitationStatus {\n Pending = 'pending',\n Accepted = 'accepted',\n Revoked = 'revoked',\n Expired = 'expired',\n}\n\nexport enum OrganizationTierCurrency {\n USD = 'USD',\n EUR = 'EUR',\n USDC = 'USDC',\n EURC = 'EURC',\n}\n\nexport enum OrganizationTierInterval {\n Month = 'month',\n Year = 'year',\n OneShot = 'one_shot',\n}\n\nexport enum OrganizationTierSource {\n StripeSubscription = 'stripe_subscription',\n CryptoOneShot = 'crypto_one_shot',\n}\n\nexport enum OrganizationSubscriptionStatus {\n Active = 'active',\n PastDue = 'past_due',\n Canceled = 'canceled',\n Lapsed = 'lapsed',\n Trialing = 'trialing',\n}\n\nexport enum UserProfileType {\n Merchant = 'merchant',\n Consumer = 'consumer',\n Hybrid = 'hybrid',\n}\n\nexport interface Branding {\n // Theme name (e.g., 'default', 'gradient', 'dark', 'ocean', 'sunset', 'custom')\n themeName?: string\n\n // Company logo\n logo?: string\n\n // Left panel colors\n leftPanelHeadingTextColor?: string\n leftPanelBodyTextColor?: string\n leftPanelBackgroundColor1?: string\n leftPanelBackgroundColor2?: string\n leftPanelBackgroundImageUrl?: string // Alternative to background colors\n\n // Right card colors\n rightCardTextColor?: string\n rightCardButtonBackgroundColor?: string\n rightCardButtonTextColor?: string\n rightCardBackgroundColor1?: string\n rightCardBackgroundColor2?: string\n rightCardBackgroundImageUrl?: string // Alternative to background colors\n}\n\n// ---------------------------------------------------------------------------\n// Activity Feed — event vocabulary (Stage 3a)\n// ---------------------------------------------------------------------------\n\n/**\n * All event types that can be recorded in the organization activity feed.\n *\n * Stored as varchar strings in Postgres so new values can be added without\n * ALTER TYPE migrations (forward-compatible with Postgres enum limitations).\n *\n * Stage 3b (webhooks) will wire WEBHOOK_* emit calls.\n * Stage 4 (customers) will wire CUSTOMER_* emit calls.\n */\nexport enum OrganizationActivityEventType {\n // Membership lifecycle\n MEMBER_INVITED = 'member.invited',\n MEMBER_JOINED = 'member.joined',\n MEMBER_ROLE_CHANGED = 'member.role_changed',\n MEMBER_DEACTIVATED = 'member.deactivated',\n MEMBER_REACTIVATED = 'member.reactivated',\n MEMBER_REMOVED = 'member.removed',\n INVITATION_REVOKED = 'invitation.revoked',\n INVITATION_EXPIRED = 'invitation.expired',\n // Resource lifecycle\n AGENT_CREATED = 'agent.created',\n PLAN_CREATED = 'plan.created',\n PLAN_PURCHASED = 'plan.purchased',\n // Customer lifecycle (Stage 4 wires the emit)\n CUSTOMER_ADDED = 'customer.added',\n CUSTOMER_BLOCKED = 'customer.blocked',\n CUSTOMER_UNBLOCKED = 'customer.unblocked',\n // Subscription lifecycle — tier transitions on the org workspace itself.\n // UPGRADED fires on Stripe `invoice.payment_succeeded` that moves the org\n // up the ladder (Lapsed/none → Premium, Premium → Enterprise).\n // DOWNGRADED fires on the explicit Enterprise → Premium swap endpoint.\n // CANCELED fires when the user schedules cancel-at-period-end.\n // LAPSED fires when `currentPeriodEnd` elapses without renewal (on-read\n // enforcement in tierFor and the daily sweep cron both flow through\n // `markLapsed`, so a single emit there covers both paths).\n SUBSCRIPTION_UPGRADED = 'subscription.upgraded',\n SUBSCRIPTION_DOWNGRADED = 'subscription.downgraded',\n SUBSCRIPTION_CANCELED = 'subscription.canceled',\n SUBSCRIPTION_LAPSED = 'subscription.lapsed',\n // Webhook delivery (Stage 3b adds emit)\n WEBHOOK_DELIVERED = 'webhook.delivered',\n WEBHOOK_FAILED = 'webhook.failed',\n}\n\n// ---------------------------------------------------------------------------\n// Webhook subscription + delivery status enums (Stage 3b)\n// ---------------------------------------------------------------------------\n\n/**\n * Status of the last delivery attempt on a webhook subscription.\n * Stored as varchar on OrganizationWebhookSubscriptionEntity.\n */\nexport enum WebhookSubscriptionLastDeliveryStatus {\n Success = 'success',\n Failed = 'failed',\n Pending = 'pending',\n}\n\n/**\n * Lifecycle status of a single webhook delivery row.\n * Stored as varchar on OrganizationWebhookDeliveryEntity.\n */\nexport enum WebhookDeliveryStatus {\n Pending = 'pending',\n InFlight = 'in_flight',\n Delivered = 'delivered',\n Failed = 'failed',\n Dead = 'dead',\n}\n"],"names":["AuthRoles","PointsRulesCategory","PointsRulesRecurrency","PointsEventStatus","NotificationType","NotificationOriginator","NotificationReadStatus","NotificationDeliveryStatus","EmailChallengeStatus","PlanTransactionType","PlanTransactionPaymentType","PlanTransactionReconciliationStatus","CheckoutSessionType","WidgetLayout","StripeEventStatus","ResultType","ApiKeyTxType","DEFAULT_PAGE","DEFAULT_OFFSET","TaskLogLevel","PaymentPlanTypes","NVM_USERID_HEADER","NVM_COST_HEADER","DEFAULT_COST_CREDITS","OrganizationType","OrganizationMemberRole","OrganizationCustomerStatus","OrganizationInvitationStatus","OrganizationTierCurrency","OrganizationTierInterval","OrganizationTierSource","OrganizationSubscriptionStatus","UserProfileType","OrganizationActivityEventType","WebhookSubscriptionLastDeliveryStatus","WebhookDeliveryStatus"],"mappings":"AAEA,OAAO,IAAA,AAAKA,mCAAAA;;WAAAA;MAEX;AA4BD,OAAO,IAAA,AAAKC,6CAAAA;;;;;;;;WAAAA;MAQX;AAED,OAAO,IAAA,AAAKC,+CAAAA;;;;;;;;;;WAAAA;MAUX;AAED,OAAO,IAAA,AAAKC,2CAAAA;;;;;;WAAAA;MAMX;AAED,OAAO,IAAA,AAAKC,0CAAAA;;;;;;WAAAA;MAMX;AAED,OAAO,IA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;;;WAAAA;MAIX;AAED,OAAO,IAAA,AAAKC,gDAAAA;;;WAAAA;MAGX;AAED,OAAO,IAAA,AAAKC,wDAAAA;;;;;;WAAAA;MAMX;AAED,OAAO,IAAA,AAAKC,yCAAAA;;;;WAAAA;MAIX;AAyBD,8EAA8E;AAC9E,8CAA8C;AAC9C,8EAA8E;AAE9E;;;;;;;;CAQC,GACD,OAAO,IAAA,AAAKC,uDAAAA;IACV,uBAAuB;;;;;;;;;IASvB,qBAAqB;;;;IAIrB,8CAA8C;;;;IAI9C,yEAAyE;IACzE,0EAA0E;IAC1E,+DAA+D;IAC/D,uEAAuE;IACvE,+DAA+D;IAC/D,wEAAwE;IACxE,oEAAoE;IACpE,2DAA2D;;;;;IAK3D,wCAAwC;;;WA9B9BA;MAiCX;AAED,8EAA8E;AAC9E,0DAA0D;AAC1D,8EAA8E;AAE9E;;;CAGC,GACD,OAAO,IAAA,AAAKC,+DAAAA;;;;WAAAA;MAIX;AAED;;;CAGC,GACD,OAAO,IAAA,AAAKC,+CAAAA;;;;;;WAAAA;MAMX"}
1
+ {"version":3,"sources":["../../../src/lib/types/types.ts"],"sourcesContent":["import * as jose from 'jose'\n\nexport enum AuthRoles {\n Admin = 'admin',\n}\n\nexport interface AuthUser {\n userId: string\n address: string\n hash: string\n roles?: AuthRoles[]\n nvmApiKey?: jose.JWTPayload\n}\n\nexport interface Request<G> {\n hostname: string\n body?: G\n query?: G\n params?: G\n client: { localPort: number }\n protocol: string\n url: string\n user?: AuthUser\n}\n\nexport type DistinctPlans = {\n page: number\n totalPages: number\n totalResults: number\n results: any[]\n}\n\nexport enum PointsRulesCategory {\n wau = 'wau',\n supply = 'supply',\n purchases = 'purchases',\n demand = 'demand',\n curation = 'curation',\n network = 'network',\n other = 'other',\n}\n\nexport enum PointsRulesRecurrency {\n unlimitted = 'unlimitted',\n timeslimitted = 'timeslimitted',\n onlyonce = 'onlyonce',\n onceperitem = 'onceperitem',\n capday = 'capday',\n capweek = 'capweek',\n capmonth = 'capmonth',\n capyear = 'capyear',\n other = 'other',\n}\n\nexport enum PointsEventStatus {\n Pending = 'Pending',\n Processed = 'Processed',\n Failed = 'Failed',\n Skipped = 'Skipped',\n Other = 'Other',\n}\n\nexport enum NotificationType {\n SubscriptionReceived = 'SubscriptionReceived',\n SubscriptionPurchased = 'SubscriptionPurchased',\n AccountSetup = 'AccountSetup',\n EmailValidation = 'EmailValidation',\n Other = 'Other',\n}\n\nexport enum NotificationOriginator {\n Nevermined = 'Nevermined',\n Other = 'Other',\n}\n\nexport enum NotificationReadStatus {\n Pending = 'Pending',\n Read = 'Read',\n Deleted = 'Deleted',\n Other = 'Other',\n}\n\nexport enum NotificationDeliveryStatus {\n Pending = 'Pending',\n Sent = 'Sent',\n Failed = 'Failed',\n NotRequired = 'NotRequired',\n Skipped = 'Skipped',\n Other = 'Other',\n}\n\nexport enum EmailChallengeStatus {\n Pending = 'Pending',\n Validated = 'Validated',\n Failed = 'Failed',\n}\n\nexport enum PlanTransactionType {\n Purchase = 'Purchase',\n Mint = 'Mint',\n Burn = 'Burn',\n Transfer = 'Transfer',\n Error = 'Error',\n Other = 'Other',\n // Off-chain credits event log (nvm-monorepo#1276).\n CreditMint = 'CreditMint',\n CreditBurn = 'CreditBurn',\n CreditExpired = 'CreditExpired',\n CreditBackfill = 'CreditBackfill',\n CreditRefund = 'CreditRefund',\n}\n\nexport enum PlanTransactionPaymentType {\n Crypto = 'Crypto',\n Fiat = 'Fiat',\n}\n\n/**\n * Settlement-reconciliation state for a plan transaction.\n *\n * - `NotApplicable`: no external processor — crypto rows, or any row where\n * there is nothing to reconcile against.\n * - `Pending`: fiat charge created but the processor's real fee / net has\n * not yet been captured (Stripe typically settles T+2).\n * - `Settled`: the real processor fee is in `stripeFee` and `ownerMargin`\n * matches the merchant's bank credit.\n * - `Failed`: a reconciliation attempt could not resolve the row against\n * the processor (e.g. missing charge, transient API error after retries).\n */\nexport enum PlanTransactionReconciliationStatus {\n NotApplicable = 'NotApplicable',\n Pending = 'Pending',\n Settled = 'Settled',\n Failed = 'Failed',\n}\n\nexport enum CheckoutSessionType {\n embedded = 'embedded',\n redirect = 'redirect',\n}\n\nexport enum WidgetLayout {\n Horizontal = 'Horizontal',\n Vertical = 'Vertical',\n Reduced = 'Reduced',\n}\n\nexport enum StripeEventStatus {\n Pending = 'Pending',\n Done = 'Done',\n Error = 'Error',\n Ignored = 'Ignored',\n Other = 'Other',\n}\n\nexport enum ResultType {\n matrix = 'matrix',\n vector = 'vector',\n scalar = 'scalar',\n string = 'string',\n}\n\nexport enum ApiKeyTxType {\n NewPlan = 'NewPlan',\n NewAgent = 'NewAgent',\n EditPlan = 'EditPlan',\n EditAgent = 'EditAgent',\n Purchase = 'Purchase',\n Download = 'Download',\n AccessHit = 'AccessHit',\n Mint = 'Mint',\n Burn = 'Burn',\n AgentExecution = 'AgentExecution',\n Other = 'Other',\n}\n\nexport interface Metric {\n consumer: string\n did: string\n endpoint: string\n job: string\n namespace: string\n owner: string\n access_date: Date\n}\n\nexport interface AccessHistory {\n date: string\n owner: string\n consumer: string\n endpoint: string\n}\n\nexport interface LineItem {\n planId: string\n currency: string\n name: string\n price: number\n quantity: number\n description?: string\n imageUrl?: string\n}\n\nexport interface StripeLineItem {\n price_data: {\n currency: string\n product_data: {\n name: string\n description?: string\n images?: string[]\n metadata?: [string, string]\n }\n unit_amount_decimal: number\n }\n quantity: number\n}\n\nexport const DEFAULT_PAGE = 1\nexport const DEFAULT_OFFSET = 10_000\n\nexport interface PaginationOptions {\n page: number\n skip: number\n offset: number\n sortBy?: string\n sortOrder?: 'asc' | 'desc'\n}\n\nexport enum TaskLogLevel {\n debug = 'debug',\n info = 'info',\n warn = 'warn',\n error = 'error',\n}\n\nexport enum PaymentPlanTypes {\n expirable = 'expirable',\n credits = 'credits',\n}\n\nexport interface OrderResult {\n txHash: `0x${string}`\n planId: bigint\n planReceiver: `0x${string}`\n currency: string\n totalAmount: bigint\n numCredits: bigint\n paymentMethod: PlanTransactionPaymentType\n tokenAddress?: `0x${string}`\n}\n\nexport const NVM_USERID_HEADER = 'NVM-User-id'\nexport const NVM_COST_HEADER = 'NVMCreditsConsumed'\nexport const DEFAULT_COST_CREDITS = '1'\n\nexport enum OrganizationType {\n Premium = 'Premium',\n Enterprise = 'Enterprise',\n /**\n * An org whose paid subscription has lapsed past `currentPeriodEnd`.\n * The org still exists (rows aren't deleted) but no Premium feature\n * gates clear. Webhooks + lapse cron set this; new orgs are never\n * created in this state. Replaces the old `Free` value which was\n * misnamed — a paid-but-expired state was being shown as \"Free\"\n * which overlapped semantically with non-org personal accounts.\n */\n Lapsed = 'Lapsed',\n /**\n * Legacy bucket for orgs pre-dating tiers (pre-Phase 2). Inherits\n * Premium caps + features so existing orgs aren't unfairly blocked.\n * Not assigned by any new code path.\n */\n Other = 'Other',\n}\n\nexport enum OrganizationMemberRole {\n Admin = 'Admin',\n Member = 'Member',\n}\n\nexport enum OrganizationCustomerStatus {\n Active = 'active',\n Blocked = 'blocked',\n}\n\nexport enum OrganizationInvitationStatus {\n Pending = 'pending',\n Accepted = 'accepted',\n Revoked = 'revoked',\n Expired = 'expired',\n}\n\nexport enum OrganizationTierCurrency {\n USD = 'USD',\n EUR = 'EUR',\n USDC = 'USDC',\n EURC = 'EURC',\n}\n\nexport enum OrganizationTierInterval {\n Month = 'month',\n Year = 'year',\n OneShot = 'one_shot',\n}\n\nexport enum OrganizationTierSource {\n StripeSubscription = 'stripe_subscription',\n CryptoOneShot = 'crypto_one_shot',\n}\n\nexport enum OrganizationSubscriptionStatus {\n Active = 'active',\n PastDue = 'past_due',\n Canceled = 'canceled',\n Lapsed = 'lapsed',\n Trialing = 'trialing',\n}\n\nexport enum UserProfileType {\n Merchant = 'merchant',\n Consumer = 'consumer',\n Hybrid = 'hybrid',\n}\n\nexport interface Branding {\n // Theme name (e.g., 'default', 'gradient', 'dark', 'ocean', 'sunset', 'custom')\n themeName?: string\n\n // Company logo\n logo?: string\n\n // Left panel colors\n leftPanelHeadingTextColor?: string\n leftPanelBodyTextColor?: string\n leftPanelBackgroundColor1?: string\n leftPanelBackgroundColor2?: string\n leftPanelBackgroundImageUrl?: string // Alternative to background colors\n\n // Right card colors\n rightCardTextColor?: string\n rightCardButtonBackgroundColor?: string\n rightCardButtonTextColor?: string\n rightCardBackgroundColor1?: string\n rightCardBackgroundColor2?: string\n rightCardBackgroundImageUrl?: string // Alternative to background colors\n}\n\n// ---------------------------------------------------------------------------\n// Activity Feed — event vocabulary (Stage 3a)\n// ---------------------------------------------------------------------------\n\n/**\n * All event types that can be recorded in the organization activity feed.\n *\n * Stored as varchar strings in Postgres so new values can be added without\n * ALTER TYPE migrations (forward-compatible with Postgres enum limitations).\n *\n * Stage 3b (webhooks) will wire WEBHOOK_* emit calls.\n * Stage 4 (customers) will wire CUSTOMER_* emit calls.\n */\nexport enum OrganizationActivityEventType {\n // Membership lifecycle\n MEMBER_INVITED = 'member.invited',\n MEMBER_JOINED = 'member.joined',\n MEMBER_ROLE_CHANGED = 'member.role_changed',\n MEMBER_DEACTIVATED = 'member.deactivated',\n MEMBER_REACTIVATED = 'member.reactivated',\n MEMBER_REMOVED = 'member.removed',\n INVITATION_REVOKED = 'invitation.revoked',\n INVITATION_EXPIRED = 'invitation.expired',\n // Resource lifecycle\n AGENT_CREATED = 'agent.created',\n PLAN_CREATED = 'plan.created',\n PLAN_UPDATED = 'plan.updated',\n PLAN_PURCHASED = 'plan.purchased',\n // Customer lifecycle (Stage 4 wires the emit)\n CUSTOMER_ADDED = 'customer.added',\n CUSTOMER_BLOCKED = 'customer.blocked',\n CUSTOMER_UNBLOCKED = 'customer.unblocked',\n // Subscription lifecycle — tier transitions on the org workspace itself.\n // UPGRADED fires on Stripe `invoice.payment_succeeded` that moves the org\n // up the ladder (Lapsed/none → Premium, Premium → Enterprise).\n // DOWNGRADED fires on the explicit Enterprise → Premium swap endpoint.\n // CANCELED fires when the user schedules cancel-at-period-end.\n // LAPSED fires when `currentPeriodEnd` elapses without renewal (on-read\n // enforcement in tierFor and the daily sweep cron both flow through\n // `markLapsed`, so a single emit there covers both paths).\n SUBSCRIPTION_UPGRADED = 'subscription.upgraded',\n SUBSCRIPTION_DOWNGRADED = 'subscription.downgraded',\n SUBSCRIPTION_CANCELED = 'subscription.canceled',\n SUBSCRIPTION_LAPSED = 'subscription.lapsed',\n // Webhook delivery (Stage 3b adds emit)\n WEBHOOK_DELIVERED = 'webhook.delivered',\n WEBHOOK_FAILED = 'webhook.failed',\n // API key lifecycle (org-scoped keys only — keys tagged with an `org-` workspace)\n APIKEY_CREATED = 'apikey.created',\n APIKEY_REVOKED = 'apikey.revoked',\n // Credit lifecycle (high-cardinality, per-burn — realtime consumers throttle per-socket)\n CREDITS_REDEEMED = 'credits.redeemed',\n}\n\n// ---------------------------------------------------------------------------\n// Webhook subscription + delivery status enums (Stage 3b)\n// ---------------------------------------------------------------------------\n\n/**\n * Status of the last delivery attempt on a webhook subscription.\n * Stored as varchar on OrganizationWebhookSubscriptionEntity.\n */\nexport enum WebhookSubscriptionLastDeliveryStatus {\n Success = 'success',\n Failed = 'failed',\n Pending = 'pending',\n}\n\n/**\n * Lifecycle status of a single webhook delivery row.\n * Stored as varchar on OrganizationWebhookDeliveryEntity.\n */\nexport enum WebhookDeliveryStatus {\n Pending = 'pending',\n InFlight = 'in_flight',\n Delivered = 'delivered',\n Failed = 'failed',\n Dead = 'dead',\n}\n"],"names":["AuthRoles","PointsRulesCategory","PointsRulesRecurrency","PointsEventStatus","NotificationType","NotificationOriginator","NotificationReadStatus","NotificationDeliveryStatus","EmailChallengeStatus","PlanTransactionType","PlanTransactionPaymentType","PlanTransactionReconciliationStatus","CheckoutSessionType","WidgetLayout","StripeEventStatus","ResultType","ApiKeyTxType","DEFAULT_PAGE","DEFAULT_OFFSET","TaskLogLevel","PaymentPlanTypes","NVM_USERID_HEADER","NVM_COST_HEADER","DEFAULT_COST_CREDITS","OrganizationType","OrganizationMemberRole","OrganizationCustomerStatus","OrganizationInvitationStatus","OrganizationTierCurrency","OrganizationTierInterval","OrganizationTierSource","OrganizationSubscriptionStatus","UserProfileType","OrganizationActivityEventType","WebhookSubscriptionLastDeliveryStatus","WebhookDeliveryStatus"],"mappings":"AAEA,OAAO,IAAA,AAAKA,mCAAAA;;WAAAA;MAEX;AA4BD,OAAO,IAAA,AAAKC,6CAAAA;;;;;;;;WAAAA;MAQX;AAED,OAAO,IAAA,AAAKC,+CAAAA;;;;;;;;;;WAAAA;MAUX;AAED,OAAO,IAAA,AAAKC,2CAAAA;;;;;;WAAAA;MAMX;AAED,OAAO,IAAA,AAAKC,0CAAAA;;;;;;WAAAA;MAMX;AAED,OAAO,IAAA,AAAKC,gDAAAA;;;WAAAA;MAGX;AAED,OAAO,IAAA,AAAKC,gDAAAA;;;;;WAAAA;MAKX;AAED,OAAO,IAAA,AAAKC,oDAAAA;;;;;;;WAAAA;MAOX;AAED,OAAO,IAAA,AAAKC,8CAAAA;;;;WAAAA;MAIX;AAED,OAAO,IAAA,AAAKC,6CAAAA;;;;;;;IAOV,mDAAmD;;;;;;WAPzCA;MAaX;AAED,OAAO,IAAA,AAAKC,oDAAAA;;;WAAAA;MAGX;AAED;;;;;;;;;;;CAWC,GACD,OAAO,IAAA,AAAKC,6DAAAA;;;;;WAAAA;MAKX;AAED,OAAO,IAAA,AAAKC,6CAAAA;;;WAAAA;MAGX;AAED,OAAO,IAAA,AAAKC,sCAAAA;;;;WAAAA;MAIX;AAED,OAAO,IAAA,AAAKC,2CAAAA;;;;;;WAAAA;MAMX;AAED,OAAO,IAAA,AAAKC,oCAAAA;;;;;WAAAA;MAKX;AAED,OAAO,IAAA,AAAKC,sCAAAA;;;;;;;;;;;;WAAAA;MAYX;AA2CD,OAAO,MAAMC,eAAe,EAAC;AAC7B,OAAO,MAAMC,iBAAiB,OAAM;AAUpC,OAAO,IAAA,AAAKC,sCAAAA;;;;;WAAAA;MAKX;AAED,OAAO,IAAA,AAAKC,0CAAAA;;;WAAAA;MAGX;AAaD,OAAO,MAAMC,oBAAoB,cAAa;AAC9C,OAAO,MAAMC,kBAAkB,qBAAoB;AACnD,OAAO,MAAMC,uBAAuB,IAAG;AAEvC,OAAO,IAAA,AAAKC,0CAAAA;;;IAGV;;;;;;;GAOC;IAED;;;;GAIC;WAhBSA;MAkBX;AAED,OAAO,IAAA,AAAKC,gDAAAA;;;WAAAA;MAGX;AAED,OAAO,IAAA,AAAKC,oDAAAA;;;WAAAA;MAGX;AAED,OAAO,IAAA,AAAKC,sDAAAA;;;;;WAAAA;MAKX;AAED,OAAO,IAAA,AAAKC,kDAAAA;;;;;WAAAA;MAKX;AAED,OAAO,IAAA,AAAKC,kDAAAA;;;;WAAAA;MAIX;AAED,OAAO,IAAA,AAAKC,gDAAAA;;;WAAAA;MAGX;AAED,OAAO,IAAA,AAAKC,wDAAAA;;;;;;WAAAA;MAMX;AAED,OAAO,IAAA,AAAKC,yCAAAA;;;;WAAAA;MAIX;AAyBD,8EAA8E;AAC9E,8CAA8C;AAC9C,8EAA8E;AAE9E;;;;;;;;CAQC,GACD,OAAO,IAAA,AAAKC,uDAAAA;IACV,uBAAuB;;;;;;;;;IASvB,qBAAqB;;;;;IAKrB,8CAA8C;;;;IAI9C,yEAAyE;IACzE,0EAA0E;IAC1E,+DAA+D;IAC/D,uEAAuE;IACvE,+DAA+D;IAC/D,wEAAwE;IACxE,oEAAoE;IACpE,2DAA2D;;;;;IAK3D,wCAAwC;;;IAGxC,kFAAkF;;;IAGlF,yFAAyF;;WArC/EA;MAuCX;AAED,8EAA8E;AAC9E,0DAA0D;AAC1D,8EAA8E;AAE9E;;;CAGC,GACD,OAAO,IAAA,AAAKC,+DAAAA;;;;WAAAA;MAIX;AAED;;;CAGC,GACD,OAAO,IAAA,AAAKC,+CAAAA;;;;;;WAAAA;MAMX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nevermined-io/commons",
3
- "version": "0.5.11",
3
+ "version": "0.5.14",
4
4
  "type": "module",
5
5
  "main": "../dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -371,6 +371,7 @@ export enum OrganizationActivityEventType {
371
371
  // Resource lifecycle
372
372
  AGENT_CREATED = 'agent.created',
373
373
  PLAN_CREATED = 'plan.created',
374
+ PLAN_UPDATED = 'plan.updated',
374
375
  PLAN_PURCHASED = 'plan.purchased',
375
376
  // Customer lifecycle (Stage 4 wires the emit)
376
377
  CUSTOMER_ADDED = 'customer.added',
@@ -391,6 +392,11 @@ export enum OrganizationActivityEventType {
391
392
  // Webhook delivery (Stage 3b adds emit)
392
393
  WEBHOOK_DELIVERED = 'webhook.delivered',
393
394
  WEBHOOK_FAILED = 'webhook.failed',
395
+ // API key lifecycle (org-scoped keys only — keys tagged with an `org-` workspace)
396
+ APIKEY_CREATED = 'apikey.created',
397
+ APIKEY_REVOKED = 'apikey.revoked',
398
+ // Credit lifecycle (high-cardinality, per-burn — realtime consumers throttle per-socket)
399
+ CREDITS_REDEEMED = 'credits.redeemed',
394
400
  }
395
401
 
396
402
  // ---------------------------------------------------------------------------