@mountaya/client 0.1.0 → 0.2.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +2 -2
  3. package/dist/admin/index.cjs +2876 -3502
  4. package/dist/admin/index.cjs.map +1 -1
  5. package/dist/admin/index.d.cts +731 -912
  6. package/dist/admin/index.d.ts +731 -912
  7. package/dist/admin/index.js +188 -285
  8. package/dist/admin/index.js.map +1 -1
  9. package/dist/browser.cjs +5913 -7993
  10. package/dist/browser.cjs.map +1 -1
  11. package/dist/browser.d.cts +42 -78
  12. package/dist/browser.d.ts +42 -78
  13. package/dist/browser.js +18 -49
  14. package/dist/browser.js.map +1 -1
  15. package/dist/chunk-CeEX7ayk.d.cts +75531 -0
  16. package/dist/chunk-CeEX7ayk.d.ts +75531 -0
  17. package/dist/chunk-Cg7Dtcb4.js +2987 -0
  18. package/dist/chunk-Cg7Dtcb4.js.map +1 -0
  19. package/dist/chunk-DJqUsgsy.d.ts +1463 -0
  20. package/dist/chunk-DNc8T5K1.js +241 -0
  21. package/dist/chunk-DNc8T5K1.js.map +1 -0
  22. package/dist/chunk-DTxzw3hu.d.cts +1463 -0
  23. package/dist/chunk-DmxQID5X.js +2289 -0
  24. package/dist/chunk-DmxQID5X.js.map +1 -0
  25. package/dist/chunk-DoZt_oIV.d.ts +3991 -0
  26. package/dist/chunk-DpJrqANO.js +11 -0
  27. package/dist/chunk-Dx8mPAdC.d.cts +3991 -0
  28. package/dist/chunk-X2ukY3ho.js +419 -0
  29. package/dist/chunk-X2ukY3ho.js.map +1 -0
  30. package/dist/events/index.cjs +1338 -1874
  31. package/dist/events/index.cjs.map +1 -1
  32. package/dist/events/index.d.cts +373 -382
  33. package/dist/events/index.d.ts +373 -382
  34. package/dist/events/index.js +523 -806
  35. package/dist/events/index.js.map +1 -1
  36. package/dist/index.cjs +5908 -7988
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +37 -69
  39. package/dist/index.d.ts +37 -69
  40. package/dist/index.js +17 -48
  41. package/dist/index.js.map +1 -1
  42. package/package.json +7 -8
  43. package/src/browser.ts +1 -0
  44. package/src/core/rules/clientHeader.ts +1 -1
  45. package/src/core/rules/errors.ts +1 -1
  46. package/src/core/rules/nullMasks.gen.ts +14 -2
  47. package/src/core/rules/version.gen.ts +1 -1
  48. package/src/events/index.ts +1 -5
  49. package/src/rest/adminResources.gen.ts +2 -0
  50. package/src/rest/dates.gen.ts +1 -1
  51. package/src/rest/resources.gen.ts +2 -0
  52. package/src/rest/schema.gen.ts +247 -60
  53. package/src/tiles/schema.gen.ts +1 -3
  54. package/dist/chunk-BM526BHG.js +0 -342
  55. package/dist/chunk-BM526BHG.js.map +0 -1
  56. package/dist/chunk-D2YEVTG7.js +0 -327
  57. package/dist/chunk-D2YEVTG7.js.map +0 -1
  58. package/dist/chunk-OHKVUREN.js +0 -3500
  59. package/dist/chunk-OHKVUREN.js.map +0 -1
  60. package/dist/chunk-TDTK2L5H.js +0 -3842
  61. package/dist/chunk-TDTK2L5H.js.map +0 -1
  62. package/dist/coreOperations.gen-BMYPoBbz.d.ts +0 -1760
  63. package/dist/coreOperations.gen-BxX5xRxw.d.cts +0 -1760
  64. package/dist/errors-B-GqAtQv.d.cts +0 -75960
  65. package/dist/errors-B-GqAtQv.d.ts +0 -75960
  66. package/dist/operations.gen-CvTyzKNF.d.cts +0 -3993
  67. package/dist/operations.gen-DUD406TV.d.ts +0 -3993
package/CHANGELOG.md CHANGED
@@ -14,6 +14,51 @@ every `@mountaya/*` package at one version.
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.2.0] - 2026-12-01
18
+
19
+ ### Minor Changes
20
+
21
+ - ffe3229: Contract v0.10.0. The admin unit's `SubscriptionDiscount` carries `covers_through`, the last day of
22
+ usage, in UTC, a repeating discount covers, and `PromotionCodePreview` carries
23
+ `duration_in_months` and `covers_through`, what a code would cover were the subscription opened
24
+ now. `covers_through` is required on `SubscriptionDiscount`, so code that builds one itself names it.
25
+ A repeating discount's `ends_at` is now the start of the day after `covers_through`.
26
+ - ffe3229: Contract v0.10.0. The admin unit's `OrganizationSubscription` carries `ended_at` and
27
+ `end_reason`, a `SubscriptionEndReason` (`requested`, `payment-failed` or `payment-disputed`):
28
+ when and why the subscription ended, both null while it has not. A subscription whose payments
29
+ still fail after every retry now ends `payment-failed`, with a final invoice for the requests made
30
+ since the last one, and ends before its `current_period_end_at`. Both are required, so code that
31
+ builds an `OrganizationSubscription` itself names them.
32
+ - 148e25b: Contract v0.10.0. The admin unit's `OrganizationCreateParams` requires `terms_accepted`, a boolean
33
+ that must be `true`: the user the session token names accepts the Terms of Service on the new
34
+ organization's behalf and confirms that it acts for business purposes, and Mountaya keeps a dated
35
+ record of it. `organizations.postOrganization({ body })` takes it from its caller, so pass `true`
36
+ only once that user has accepted; `false` is a `400` and makes nothing. The docs of
37
+ `WebhookEventActorType` and of the events listing's `actor_type` and `actor_user_id` say that a
38
+ change Mountaya's support makes as a person, at their request, reads as that person's.
39
+ - ffe3229: Contract v0.10.0. The admin unit's usage report names the SDK behind each figure: `UsageDataPoint`
40
+ and `UsageTilePoint` carry `client_name`, a `UsageClientName` (`sdk-typescript`, `sdk-swift`,
41
+ `sdk-kotlin`, `sdk-dart` or `unknown`), and `client_version`, the version of that SDK its requests
42
+ named in `X-Mountaya-Client`, `"older"` for every version below the ten highest its series recorded
43
+ in the window, or `null`. Both are required, so code that builds these points itself names them.
44
+ They are reported as the requests sent them and never change what counts. A report carries a figure
45
+ only on the days a combination recorded usage.
46
+
47
+ ### Patch Changes
48
+
49
+ - ffe3229: The billing docs describe the calendar-month billing period. Every organization's billing period
50
+ is now the calendar month in UTC, from the 1st to its last day, so a spent monthly allowance
51
+ renews on the 1st. The doc comments of `OrganizationSubscriptionSummary`,
52
+ `OrganizationBillingProvisionParams`, `BillingUnitKind` and `SubscriptionStatus`, of the billing
53
+ invoices and payment-method calls, and of the `Retry-After` header now say so. No type, method or
54
+ behaviour of the client changes.
55
+ - 36204ef: The published JavaScript is smaller on disk, by a tenth to a third: it carries no doc comments,
56
+ which the declarations hold. Every entry point publishes the same names and types, and weighs the
57
+ same in a bundle.
58
+ - Contract v0.10.0. The docs of `AgentMessageDeltaEvent` say that a turn the server retries may stream
59
+ only part of its text, or none: the `message` event carries it whole. The docs of
60
+ `OrganizationCreateParams.terms_accepted` give the Terms of Service's published address.
61
+
17
62
  ## [0.1.0]
18
63
 
19
64
  Initial public release: the package root, and the entry points `./admin`, `./browser`, `./events`.
package/README.md CHANGED
@@ -118,7 +118,7 @@ const [template] = spec.data.sources[0].tiles;
118
118
  The Map Studio API's map half arrives as `studio`, and the organization the map is rendered for
119
119
  is [the admin unit](#managing-an-organization)'s, imported apart: one edits a route, the other
120
120
  configures who may edit it. Which namespace and which unit an operation belongs to is declared in
121
- [the contract](https://entire.com/et/mountaya/schemas), so every language's client divides it the
121
+ [the contract](https://github.com/mountaya/schemas), so every language's client divides it the
122
122
  same way. Method names are the contract's `operationId` verbatim, and each method's doc comment
123
123
  names the publishable-key scope it needs, so a 403 tells you which scope to enable.
124
124
 
@@ -1221,7 +1221,7 @@ republished from), not what it is and not a second import path.
1221
1221
  | Declared under | Values | Types |
1222
1222
  | --- | --- | --- |
1223
1223
  | rules | `constructWebhookEvent`, `MountayaAdmin`, `MountayaWebhookSignatureError` | `ConstructWebhookEventOptions`, `WebhookEvent`, `WebhookSignatureFailure` |
1224
- | generated from the contract | `rest` | `Address`, `AiCredentialField`, `AiProvider`, `AiProviderCatalog`, `AiProviderConfig`, `AiProviderConfigCreateParams`, `AiProviderConfigEventObject`, `AiProviderConfigUpdateParams`, `AssignableOrganizationRole`, `BillingInfo`, `BillingInfoEventObject`, `BillingInfoField`, `BillingInfoTaxIdParams`, `BillingInfoUpdateParams`, `BillingInterval`, `BillingPricing`, `BillingProduct`, `BillingUnitKind`, `Capability`, `CollectionEventObject`, `CollectionItineraryEventObject`, `CollectionShareLinkEventObject`, `CollectionZoneEventObject`, `Invoice`, `InvoiceEventObject`, `InvoiceStatus`, `ItineraryEventObject`, `ItineraryOrigin`, `ItinerarySegmentEventObject`, `ItinerarySegmentGroupEventObject`, `ItineraryShareLinkEventObject`, `ItineraryWaypointEventObject`, `Membership`, `MeterDimension`, `NotificationPreference`, `NotificationPreferences`, `NotificationPreferencesUpdateParams`, `NotificationPreferenceUpdate`, `NotificationType`, `OrganizationBillingPaymentMethodParams`, `OrganizationBillingProvisionParams`, `OrganizationCreateParams`, `OrganizationEntitlementsEventObject`, `OrganizationEventObject`, `OrganizationInvitation`, `OrganizationInvitationCreateParams`, `OrganizationInvitationEventObject`, `OrganizationMember`, `OrganizationMemberDeletionReason`, `OrganizationMemberEventObject`, `OrganizationMemberUpdateParams`, `OrganizationSettingsEventObject`, `OrganizationSettingsPatchParams`, `OrganizationSubscription`, `OrganizationSubscriptionEventObject`, `OrganizationSubscriptionItem`, `OrganizationSubscriptionSummary`, `OrganizationUpdateParams`, `PaymentMethod`, `PaymentMethodCard`, `PaymentMethodEventObject`, `PaymentMethodSepaDebit`, `Preferences`, `PreferencesUpdateParams`, `PromotionCodePreview`, `PublishableKey`, `PublishableKeyCreateParams`, `PublishableKeyEventObject`, `PublishableKeyScope`, `PublishableKeyUpdateParams`, `ResponseMetadataPostOrganizationInvitation`, `SecretKeyEventObject`, `SessionCreateParams`, `SetupIntentSession`, `SubscriptionCollectionMethod`, `SubscriptionDiscount`, `SubscriptionStatus`, `TaxId`, `UsageDataPoint`, `UsageDataResourceType`, `UsageDataSurface`, `UsageMetric`, `UsageStatusClass`, `UsageTilePoint`, `UsageTileResourceType`, `UsageTileSurface`, `UserInvitation`, `WebhookAttemptOutcome`, `WebhookDelivery`, `WebhookDeliveryAttempt`, `WebhookDeliveryCreateParams`, `WebhookDeliveryOutcome`, `WebhookDeliveryRecipient`, `WebhookDeliveryTestParams`, `WebhookDeliveryTrigger`, `WebhookDeliveryTriggerKind`, `WebhookDeliveryWithAttempts`, `WebhookDestinationKind`, `WebhookEndpoint`, `WebhookEndpointCreateParams`, `WebhookEndpointDisabledReason`, `WebhookEndpointEventObject`, `WebhookEndpointStatus`, `WebhookEndpointUpdateParams`, `WebhookEndpointWithSecret`, `WebhookEventActor`, `WebhookEventActorType`, `WebhookEventCatalogEntry`, `WebhookEventData`, `WebhookEventObject`, `WebhookEventRelatedObject`, `WebhookEventRequest`, `WebhookEventType`, `WebhookEventWithDeliveries`, `WebhookFailureClass`, `WebhookFailureKind`, `WebhookHealth`, `WebhookHealthDestination`, `WebhookHealthFailure`, `WebhookHealthFigures`, `WebhookHealthGranularity`, `WebhookHealthPoint`, `WebhookHealthWindow`, `ZoneEventObject` |
1224
+ | generated from the contract | `rest` | `Address`, `AiCredentialField`, `AiProvider`, `AiProviderCatalog`, `AiProviderConfig`, `AiProviderConfigCreateParams`, `AiProviderConfigEventObject`, `AiProviderConfigUpdateParams`, `AssignableOrganizationRole`, `BillingInfo`, `BillingInfoEventObject`, `BillingInfoField`, `BillingInfoTaxIdParams`, `BillingInfoUpdateParams`, `BillingInterval`, `BillingPricing`, `BillingProduct`, `BillingUnitKind`, `Capability`, `CollectionEventObject`, `CollectionItineraryEventObject`, `CollectionShareLinkEventObject`, `CollectionZoneEventObject`, `Invoice`, `InvoiceEventObject`, `InvoiceStatus`, `ItineraryEventObject`, `ItineraryOrigin`, `ItinerarySegmentEventObject`, `ItinerarySegmentGroupEventObject`, `ItineraryShareLinkEventObject`, `ItineraryWaypointEventObject`, `Membership`, `MeterDimension`, `NotificationPreference`, `NotificationPreferences`, `NotificationPreferencesUpdateParams`, `NotificationPreferenceUpdate`, `NotificationType`, `OrganizationBillingPaymentMethodParams`, `OrganizationBillingProvisionParams`, `OrganizationCreateParams`, `OrganizationEntitlementsEventObject`, `OrganizationEventObject`, `OrganizationInvitation`, `OrganizationInvitationCreateParams`, `OrganizationInvitationEventObject`, `OrganizationMember`, `OrganizationMemberDeletionReason`, `OrganizationMemberEventObject`, `OrganizationMemberUpdateParams`, `OrganizationSettingsEventObject`, `OrganizationSettingsPatchParams`, `OrganizationSubscription`, `OrganizationSubscriptionEventObject`, `OrganizationSubscriptionItem`, `OrganizationSubscriptionSummary`, `OrganizationUpdateParams`, `PaymentMethod`, `PaymentMethodCard`, `PaymentMethodEventObject`, `PaymentMethodSepaDebit`, `Preferences`, `PreferencesUpdateParams`, `PromotionCodePreview`, `PublishableKey`, `PublishableKeyCreateParams`, `PublishableKeyEventObject`, `PublishableKeyScope`, `PublishableKeyUpdateParams`, `ResponseMetadataPostOrganizationInvitation`, `SecretKeyEventObject`, `SessionCreateParams`, `SetupIntentSession`, `SubscriptionCollectionMethod`, `SubscriptionDiscount`, `SubscriptionEndReason`, `SubscriptionStatus`, `TaxId`, `UsageClientName`, `UsageDataPoint`, `UsageDataResourceType`, `UsageDataSurface`, `UsageMetric`, `UsageStatusClass`, `UsageTilePoint`, `UsageTileResourceType`, `UsageTileSurface`, `UserInvitation`, `WebhookAttemptOutcome`, `WebhookDelivery`, `WebhookDeliveryAttempt`, `WebhookDeliveryCreateParams`, `WebhookDeliveryOutcome`, `WebhookDeliveryRecipient`, `WebhookDeliveryTestParams`, `WebhookDeliveryTrigger`, `WebhookDeliveryTriggerKind`, `WebhookDeliveryWithAttempts`, `WebhookDestinationKind`, `WebhookEndpoint`, `WebhookEndpointCreateParams`, `WebhookEndpointDisabledReason`, `WebhookEndpointEventObject`, `WebhookEndpointStatus`, `WebhookEndpointUpdateParams`, `WebhookEndpointWithSecret`, `WebhookEventActor`, `WebhookEventActorType`, `WebhookEventCatalogEntry`, `WebhookEventData`, `WebhookEventObject`, `WebhookEventRelatedObject`, `WebhookEventRequest`, `WebhookEventType`, `WebhookEventWithDeliveries`, `WebhookFailureClass`, `WebhookFailureKind`, `WebhookHealth`, `WebhookHealthDestination`, `WebhookHealthFailure`, `WebhookHealthFigures`, `WebhookHealthGranularity`, `WebhookHealthPoint`, `WebhookHealthWindow`, `ZoneEventObject` |
1225
1225
 
1226
1226
  #### `@mountaya/client/browser`
1227
1227