@fleetless/contracts 16.1.0-next.1 → 16.1.0-next.2

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/CHANGELOG.md CHANGED
@@ -9,6 +9,16 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ### Added
13
+
14
+ - **`billingAccount.current_price`** (`GET /api/billing`,
15
+ fleetless/fleetless#1175): what one period of the current plan costs the
16
+ organization, `{ net_cents }`, at the price it agreed. The catalogue price
17
+ and the agreed price differ once the catalogue changes, so a consumer shows
18
+ this as the price of a billed organization and never reads it off `PLANS`.
19
+ `null` when no agreed price is recorded for the current plan, cycle and
20
+ add-ons. The field is always present.
21
+
12
22
  ### Changed
13
23
 
14
24
  - **The plan catalogue** (fleetless/fleetless#1175). `PLANS` keeps its shape
@@ -17035,6 +17035,29 @@
17035
17035
  ],
17036
17036
  "description": "`null` while a cancel is pending or nothing else renews."
17037
17037
  },
17038
+ "current_price": {
17039
+ "anyOf": [
17040
+ {
17041
+ "type": "object",
17042
+ "properties": {
17043
+ "net_cents": {
17044
+ "type": "integer",
17045
+ "minimum": -9007199254740991,
17046
+ "maximum": 9007199254740991,
17047
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
17048
+ }
17049
+ },
17050
+ "required": [
17051
+ "net_cents"
17052
+ ],
17053
+ "additionalProperties": false
17054
+ },
17055
+ {
17056
+ "type": "null"
17057
+ }
17058
+ ],
17059
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
17060
+ },
17038
17061
  "scheduled": {
17039
17062
  "type": "object",
17040
17063
  "properties": {
@@ -17193,6 +17216,7 @@
17193
17216
  "period_starts_at",
17194
17217
  "period_ends_at",
17195
17218
  "next_charge",
17219
+ "current_price",
17196
17220
  "scheduled",
17197
17221
  "dunning"
17198
17222
  ],
@@ -18207,6 +18231,29 @@
18207
18231
  ],
18208
18232
  "description": "`null` while a cancel is pending or nothing else renews."
18209
18233
  },
18234
+ "current_price": {
18235
+ "anyOf": [
18236
+ {
18237
+ "type": "object",
18238
+ "properties": {
18239
+ "net_cents": {
18240
+ "type": "integer",
18241
+ "minimum": -9007199254740991,
18242
+ "maximum": 9007199254740991,
18243
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
18244
+ }
18245
+ },
18246
+ "required": [
18247
+ "net_cents"
18248
+ ],
18249
+ "additionalProperties": false
18250
+ },
18251
+ {
18252
+ "type": "null"
18253
+ }
18254
+ ],
18255
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
18256
+ },
18210
18257
  "scheduled": {
18211
18258
  "type": "object",
18212
18259
  "properties": {
@@ -18365,6 +18412,7 @@
18365
18412
  "period_starts_at",
18366
18413
  "period_ends_at",
18367
18414
  "next_charge",
18415
+ "current_price",
18368
18416
  "scheduled",
18369
18417
  "dunning"
18370
18418
  ],
@@ -23481,6 +23529,29 @@
23481
23529
  ],
23482
23530
  "description": "`null` while a cancel is pending or nothing else renews."
23483
23531
  },
23532
+ "current_price": {
23533
+ "anyOf": [
23534
+ {
23535
+ "type": "object",
23536
+ "properties": {
23537
+ "net_cents": {
23538
+ "type": "integer",
23539
+ "minimum": -9007199254740991,
23540
+ "maximum": 9007199254740991,
23541
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
23542
+ }
23543
+ },
23544
+ "required": [
23545
+ "net_cents"
23546
+ ],
23547
+ "additionalProperties": false
23548
+ },
23549
+ {
23550
+ "type": "null"
23551
+ }
23552
+ ],
23553
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
23554
+ },
23484
23555
  "scheduled": {
23485
23556
  "type": "object",
23486
23557
  "properties": {
@@ -23639,6 +23710,7 @@
23639
23710
  "period_starts_at",
23640
23711
  "period_ends_at",
23641
23712
  "next_charge",
23713
+ "current_price",
23642
23714
  "scheduled",
23643
23715
  "dunning"
23644
23716
  ],
@@ -51771,6 +51843,29 @@
51771
51843
  ],
51772
51844
  "description": "`null` while a cancel is pending or nothing else renews."
51773
51845
  },
51846
+ "current_price": {
51847
+ "anyOf": [
51848
+ {
51849
+ "type": "object",
51850
+ "properties": {
51851
+ "net_cents": {
51852
+ "type": "integer",
51853
+ "minimum": -9007199254740991,
51854
+ "maximum": 9007199254740991,
51855
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
51856
+ }
51857
+ },
51858
+ "required": [
51859
+ "net_cents"
51860
+ ],
51861
+ "additionalProperties": false
51862
+ },
51863
+ {
51864
+ "type": "null"
51865
+ }
51866
+ ],
51867
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
51868
+ },
51774
51869
  "scheduled": {
51775
51870
  "type": "object",
51776
51871
  "properties": {
@@ -51929,6 +52024,7 @@
51929
52024
  "period_starts_at",
51930
52025
  "period_ends_at",
51931
52026
  "next_charge",
52027
+ "current_price",
51932
52028
  "scheduled",
51933
52029
  "dunning"
51934
52030
  ],
@@ -52943,6 +53039,29 @@
52943
53039
  ],
52944
53040
  "description": "`null` while a cancel is pending or nothing else renews."
52945
53041
  },
53042
+ "current_price": {
53043
+ "anyOf": [
53044
+ {
53045
+ "type": "object",
53046
+ "properties": {
53047
+ "net_cents": {
53048
+ "type": "integer",
53049
+ "minimum": -9007199254740991,
53050
+ "maximum": 9007199254740991,
53051
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
53052
+ }
53053
+ },
53054
+ "required": [
53055
+ "net_cents"
53056
+ ],
53057
+ "additionalProperties": false
53058
+ },
53059
+ {
53060
+ "type": "null"
53061
+ }
53062
+ ],
53063
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
53064
+ },
52946
53065
  "scheduled": {
52947
53066
  "type": "object",
52948
53067
  "properties": {
@@ -53101,6 +53220,7 @@
53101
53220
  "period_starts_at",
53102
53221
  "period_ends_at",
53103
53222
  "next_charge",
53223
+ "current_price",
53104
53224
  "scheduled",
53105
53225
  "dunning"
53106
53226
  ],
@@ -737,6 +737,29 @@
737
737
  ],
738
738
  "description": "`null` while a cancel is pending or nothing else renews."
739
739
  },
740
+ "current_price": {
741
+ "anyOf": [
742
+ {
743
+ "type": "object",
744
+ "properties": {
745
+ "net_cents": {
746
+ "type": "integer",
747
+ "minimum": -9007199254740991,
748
+ "maximum": 9007199254740991,
749
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
750
+ }
751
+ },
752
+ "required": [
753
+ "net_cents"
754
+ ],
755
+ "additionalProperties": false
756
+ },
757
+ {
758
+ "type": "null"
759
+ }
760
+ ],
761
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
762
+ },
740
763
  "scheduled": {
741
764
  "type": "object",
742
765
  "properties": {
@@ -895,6 +918,7 @@
895
918
  "period_starts_at",
896
919
  "period_ends_at",
897
920
  "next_charge",
921
+ "current_price",
898
922
  "scheduled",
899
923
  "dunning"
900
924
  ],
@@ -1909,6 +1933,29 @@
1909
1933
  ],
1910
1934
  "description": "`null` while a cancel is pending or nothing else renews."
1911
1935
  },
1936
+ "current_price": {
1937
+ "anyOf": [
1938
+ {
1939
+ "type": "object",
1940
+ "properties": {
1941
+ "net_cents": {
1942
+ "type": "integer",
1943
+ "minimum": -9007199254740991,
1944
+ "maximum": 9007199254740991,
1945
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
1946
+ }
1947
+ },
1948
+ "required": [
1949
+ "net_cents"
1950
+ ],
1951
+ "additionalProperties": false
1952
+ },
1953
+ {
1954
+ "type": "null"
1955
+ }
1956
+ ],
1957
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
1958
+ },
1912
1959
  "scheduled": {
1913
1960
  "type": "object",
1914
1961
  "properties": {
@@ -2067,6 +2114,7 @@
2067
2114
  "period_starts_at",
2068
2115
  "period_ends_at",
2069
2116
  "next_charge",
2117
+ "current_price",
2070
2118
  "scheduled",
2071
2119
  "dunning"
2072
2120
  ],
@@ -357,6 +357,29 @@
357
357
  ],
358
358
  "description": "`null` while a cancel is pending or nothing else renews."
359
359
  },
360
+ "current_price": {
361
+ "anyOf": [
362
+ {
363
+ "type": "object",
364
+ "properties": {
365
+ "net_cents": {
366
+ "type": "integer",
367
+ "minimum": -9007199254740991,
368
+ "maximum": 9007199254740991,
369
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
370
+ }
371
+ },
372
+ "required": [
373
+ "net_cents"
374
+ ],
375
+ "additionalProperties": false
376
+ },
377
+ {
378
+ "type": "null"
379
+ }
380
+ ],
381
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
382
+ },
360
383
  "scheduled": {
361
384
  "type": "object",
362
385
  "properties": {
@@ -515,6 +538,7 @@
515
538
  "period_starts_at",
516
539
  "period_ends_at",
517
540
  "next_charge",
541
+ "current_price",
518
542
  "scheduled",
519
543
  "dunning"
520
544
  ],
@@ -989,6 +989,29 @@
989
989
  ],
990
990
  "description": "`null` while a cancel is pending or nothing else renews."
991
991
  },
992
+ "current_price": {
993
+ "anyOf": [
994
+ {
995
+ "type": "object",
996
+ "properties": {
997
+ "net_cents": {
998
+ "type": "integer",
999
+ "minimum": -9007199254740991,
1000
+ "maximum": 9007199254740991,
1001
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
1002
+ }
1003
+ },
1004
+ "required": [
1005
+ "net_cents"
1006
+ ],
1007
+ "additionalProperties": false
1008
+ },
1009
+ {
1010
+ "type": "null"
1011
+ }
1012
+ ],
1013
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
1014
+ },
992
1015
  "scheduled": {
993
1016
  "type": "object",
994
1017
  "properties": {
@@ -1147,6 +1170,7 @@
1147
1170
  "period_starts_at",
1148
1171
  "period_ends_at",
1149
1172
  "next_charge",
1173
+ "current_price",
1150
1174
  "scheduled",
1151
1175
  "dunning"
1152
1176
  ],
@@ -2161,6 +2185,29 @@
2161
2185
  ],
2162
2186
  "description": "`null` while a cancel is pending or nothing else renews."
2163
2187
  },
2188
+ "current_price": {
2189
+ "anyOf": [
2190
+ {
2191
+ "type": "object",
2192
+ "properties": {
2193
+ "net_cents": {
2194
+ "type": "integer",
2195
+ "minimum": -9007199254740991,
2196
+ "maximum": 9007199254740991,
2197
+ "description": "One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents."
2198
+ }
2199
+ },
2200
+ "required": [
2201
+ "net_cents"
2202
+ ],
2203
+ "additionalProperties": false
2204
+ },
2205
+ {
2206
+ "type": "null"
2207
+ }
2208
+ ],
2209
+ "description": "What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed price is recorded for the current plan, cycle and add-ons."
2210
+ },
2164
2211
  "scheduled": {
2165
2212
  "type": "object",
2166
2213
  "properties": {
@@ -2319,6 +2366,7 @@
2319
2366
  "period_starts_at",
2320
2367
  "period_ends_at",
2321
2368
  "next_charge",
2369
+ "current_price",
2322
2370
  "scheduled",
2323
2371
  "dunning"
2324
2372
  ],
package/dist/billing.d.ts CHANGED
@@ -9980,6 +9980,9 @@ export declare const billingAccount: z.ZodObject<{
9980
9980
  vat_cents: z.ZodNumber;
9981
9981
  gross_cents: z.ZodNumber;
9982
9982
  }, z.core.$strip>>;
9983
+ current_price: z.ZodNullable<z.ZodObject<{
9984
+ net_cents: z.ZodNumber;
9985
+ }, z.core.$strip>>;
9983
9986
  scheduled: z.ZodObject<{
9984
9987
  cycle: z.ZodNullable<z.ZodEnum<{
9985
9988
  monthly: "monthly";
@@ -10135,6 +10138,9 @@ export declare const billingView: z.ZodObject<{
10135
10138
  vat_cents: z.ZodNumber;
10136
10139
  gross_cents: z.ZodNumber;
10137
10140
  }, z.core.$strip>>;
10141
+ current_price: z.ZodNullable<z.ZodObject<{
10142
+ net_cents: z.ZodNumber;
10143
+ }, z.core.$strip>>;
10138
10144
  scheduled: z.ZodObject<{
10139
10145
  cycle: z.ZodNullable<z.ZodEnum<{
10140
10146
  monthly: "monthly";
@@ -10545,6 +10551,9 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
10545
10551
  vat_cents: z.ZodNumber;
10546
10552
  gross_cents: z.ZodNumber;
10547
10553
  }, z.core.$strip>>;
10554
+ current_price: z.ZodNullable<z.ZodObject<{
10555
+ net_cents: z.ZodNumber;
10556
+ }, z.core.$strip>>;
10548
10557
  scheduled: z.ZodObject<{
10549
10558
  cycle: z.ZodNullable<z.ZodEnum<{
10550
10559
  monthly: "monthly";
@@ -10732,6 +10741,9 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
10732
10741
  vat_cents: z.ZodNumber;
10733
10742
  gross_cents: z.ZodNumber;
10734
10743
  }, z.core.$strip>>;
10744
+ current_price: z.ZodNullable<z.ZodObject<{
10745
+ net_cents: z.ZodNumber;
10746
+ }, z.core.$strip>>;
10735
10747
  scheduled: z.ZodObject<{
10736
10748
  cycle: z.ZodNullable<z.ZodEnum<{
10737
10749
  monthly: "monthly";
@@ -11048,6 +11060,9 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
11048
11060
  vat_cents: z.ZodNumber;
11049
11061
  gross_cents: z.ZodNumber;
11050
11062
  }, z.core.$strip>>;
11063
+ current_price: z.ZodNullable<z.ZodObject<{
11064
+ net_cents: z.ZodNumber;
11065
+ }, z.core.$strip>>;
11051
11066
  scheduled: z.ZodObject<{
11052
11067
  cycle: z.ZodNullable<z.ZodEnum<{
11053
11068
  monthly: "monthly";
@@ -11235,6 +11250,9 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
11235
11250
  vat_cents: z.ZodNumber;
11236
11251
  gross_cents: z.ZodNumber;
11237
11252
  }, z.core.$strip>>;
11253
+ current_price: z.ZodNullable<z.ZodObject<{
11254
+ net_cents: z.ZodNumber;
11255
+ }, z.core.$strip>>;
11238
11256
  scheduled: z.ZodObject<{
11239
11257
  cycle: z.ZodNullable<z.ZodEnum<{
11240
11258
  monthly: "monthly";
package/dist/billing.js CHANGED
@@ -1003,6 +1003,15 @@ export const billingAccount = z.object({
1003
1003
  vat_cents: z.number().int().meta({ description: 'VAT on the next charge, in integer cents.' }),
1004
1004
  gross_cents: z.number().int().meta({ description: 'The next charge including VAT, in integer cents.' }),
1005
1005
  }).nullable().meta({ description: '`null` while a cancel is pending or nothing else renews.' }),
1006
+ current_price: z.object({
1007
+ net_cents: z.number().int().meta({
1008
+ description: 'One period of the current plan, cycle and add-ons at the agreed price, excluding VAT, in integer cents.',
1009
+ }),
1010
+ }).nullable().meta({
1011
+ description: 'What one period (`cycle`) of the current plan costs this organization: the price it agreed, which stays when the ' +
1012
+ 'catalogue changes. Show this, not the catalogue price, as the price of a billed organization. `null` when no agreed ' +
1013
+ 'price is recorded for the current plan, cycle and add-ons.',
1014
+ }),
1006
1015
  scheduled: z.object({
1007
1016
  cycle: billingCycle.nullable().meta({ description: "A cycle change queued for the period's end, or `null`." }),
1008
1017
  addons: orgAddons.nullable().meta({ description: "Add-on counts queued for the period's end, or `null`." }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "16.1.0-next.1",
3
+ "version": "16.1.0-next.2",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",