| import "../common/properties.tsp"; |
|
|
| namespace Shared; |
|
|
| |
| |
| |
| |
| @pattern("^[0-7][0-9A-HJKMNP-TV-Z]{25}$") |
| @example("01G65Z755AFWAKHE12NY0CQ9FH") |
| @friendlyName("ULID") |
| @summary("ULID") |
| scalar ULID extends string; |
|
|
| |
| |
| |
| @pattern( |
| "^[a-z0-9]+(?:_[a-z0-9]+)*$", |
| "Must start with a lowercase letter or a number. Can contain lowercase letters, numbers, and underscores." |
| ) |
| @minLength(1) |
| @maxLength(64) |
| @friendlyName("ResourceKey") |
| @summary("Resource Key") |
| @example("resource_key") |
| scalar ResourceKey extends string; |
|
|
| |
| |
| |
| @friendlyName("ULIDOrResourceKey") |
| @summary("ULID ID or Resource Key") |
| union ULIDOrResourceKey { |
| id: ULID, |
| key: ResourceKey, |
| } |
|
|
| |
| |
| |
| |
| @maxLength(256) |
| @minLength(1) |
| @friendlyName("ExternalResourceKey") |
| @summary("External Resource Key") |
| @example("019ae40f-4258-7f15-9491-842f42a7d6ac") |
| scalar ExternalResourceKey extends string; |
|
|
| |
| |
| |
| @friendlyName("ULIDOrExternalResourceKey") |
| @summary("ULID ID or External Resource Key") |
| union ULIDOrExternalResourceKey { |
| id: ULID, |
| key: ExternalResourceKey, |
| } |
|
|
| |
| |
| |
| |
| @encode(DateTimeKnownEncoding.rfc3339) |
| @friendlyName("DateTime") |
| @summary("RFC3339 Date-Time") |
| @example(DateTime.fromISO("2023-01-01T01:01:01.001Z")) |
| scalar DateTime extends utcDateTime; |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| @encode(DurationKnownEncoding.ISO8601) |
| @pattern("^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$") |
| @friendlyName("ISO8601Duration") |
| @summary("ISO 8601 Duration") |
| @example("P1Y") |
| scalar ISO8601Duration extends string; |
|
|
| |
| |
| |
| |
| |
| @pattern("^[A-Z]{3}$") |
| @friendlyName("CurrencyCode") |
| @minLength(3) |
| @maxLength(3) |
| @example("USD") |
| scalar CurrencyCode extends string; |
|
|
| |
| |
| |
| |
| @pattern("^[A-Z]{2}$") |
| @friendlyName("CountryCode") |
| @minLength(2) |
| @maxLength(2) |
| @example("US") |
| scalar CountryCode extends string; |
|
|
| |
| |
| |
| @pattern("^\\-?[0-9]+(\\.[0-9]+)?$") |
| @friendlyName("Numeric") |
| scalar Numeric extends string; |
|
|
| |
| |
| |
| @friendlyName("CurrencyAmount") |
| model CurrencyAmount { |
| #suppress "@openmeter/api-spec-aip/doc-decorator" "shared model" |
| amount: Shared.Numeric; |
| #suppress "@openmeter/api-spec-aip/doc-decorator" "shared model" |
| currency: Shared.CurrencyCode; |
| } |
|
|
| |
| |
| |
| |
| @minLength(1) |
| @maxLength(32) |
| @friendlyName("BillingTaxIdentificationCode") |
| scalar TaxIdentificationCode extends string; |
|
|
| |
| |
| |
| @friendlyName("RecurringPeriod") |
| model RecurringPeriod { |
| |
| |
| |
| @summary("Anchor time") |
| @example(DateTime.fromISO("2023-01-01T01:01:01.001Z")) |
| anchor: DateTime; |
|
|
| |
| |
| |
| @summary("Interval in ISO 8601 duration format") |
| @example("P1M") |
| interval: ISO8601Duration; |
| } |
|
|
| |
| |
| |
| |
| |
| @friendlyName("ClosedPeriod") |
| model ClosedPeriod { |
| |
| |
| |
| |
| |
| @summary("Start") |
| @example(DateTime.fromISO("2023-01-01T01:01:01.001Z")) |
| from: DateTime; |
|
|
| |
| |
| |
| |
| |
| @summary("End") |
| @example(DateTime.fromISO("2023-01-01T01:01:01.001Z")) |
| to: DateTime; |
| } |
|
|