@squonk/account-server-client 2.1.0 → 2.1.1-rc.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/index.cjs CHANGED
@@ -16,6 +16,30 @@ var UnitProductPostBodyBodyFlavour = {
16
16
  SILVER: "SILVER",
17
17
  GOLD: "GOLD"
18
18
  };
19
+ var UnitPatchBodyBodyDefaultProductPrivacy = {
20
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
21
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
22
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
23
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
24
+ };
25
+ var OrganisationPatchBodyBodyDefaultProductPrivacy = {
26
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
27
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
28
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
29
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
30
+ };
31
+ var OrganisationUnitPostBodyBodyDefaultProductPrivacy = {
32
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
33
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
34
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
35
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
36
+ };
37
+ var OrganisationPostBodyBodyDefaultProductPrivacy = {
38
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
39
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
40
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
41
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
42
+ };
19
43
  var AssetPostBodyBodyScope = {
20
44
  USER: "USER",
21
45
  PRODUCT: "PRODUCT",
@@ -23,9 +47,21 @@ var AssetPostBodyBodyScope = {
23
47
  ORGANISATION: "ORGANISATION",
24
48
  GLOBAL: "GLOBAL"
25
49
  };
50
+ var UnitDetailDefaultProductPrivacy = {
51
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
52
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
53
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
54
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
55
+ };
26
56
  var MerchantDetailKind = {
27
57
  DATA_MANAGER: "DATA_MANAGER"
28
58
  };
59
+ var OrganisationDetailDefaultProductPrivacy = {
60
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
61
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
62
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
63
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
64
+ };
29
65
  var ProductTypeServiceKind = {
30
66
  DATA_MANAGER: "DATA_MANAGER"
31
67
  };
@@ -73,5 +109,11 @@ var ProductChargesGetResponseProductType = {
73
109
 
74
110
 
75
111
 
76
- exports.AXIOS_INSTANCE = _chunkTKLTUR4Rcjs.AXIOS_INSTANCE; exports.AssetDetailScope = AssetDetailScope; exports.AssetPostBodyBodyScope = AssetPostBodyBodyScope; exports.ChargeSummaryType = ChargeSummaryType; exports.MerchantDetailKind = MerchantDetailKind; exports.ProcessingChargesMerchantKind = ProcessingChargesMerchantKind; exports.ProductChargesGetResponseProductType = ProductChargesGetResponseProductType; exports.ProductDetailFlavour = ProductDetailFlavour; exports.ProductDetailType = ProductDetailType; exports.ProductTypeServiceKind = ProductTypeServiceKind; exports.UnitProductPostBodyBodyFlavour = UnitProductPostBodyBodyFlavour; exports.UnitProductPostBodyBodyType = UnitProductPostBodyBodyType; exports.customInstance = _chunkTKLTUR4Rcjs.customInstance; exports.setAuthToken = _chunkTKLTUR4Rcjs.setAuthToken; exports.setBaseUrl = _chunkTKLTUR4Rcjs.setBaseUrl;
112
+
113
+
114
+
115
+
116
+
117
+
118
+ exports.AXIOS_INSTANCE = _chunkTKLTUR4Rcjs.AXIOS_INSTANCE; exports.AssetDetailScope = AssetDetailScope; exports.AssetPostBodyBodyScope = AssetPostBodyBodyScope; exports.ChargeSummaryType = ChargeSummaryType; exports.MerchantDetailKind = MerchantDetailKind; exports.OrganisationDetailDefaultProductPrivacy = OrganisationDetailDefaultProductPrivacy; exports.OrganisationPatchBodyBodyDefaultProductPrivacy = OrganisationPatchBodyBodyDefaultProductPrivacy; exports.OrganisationPostBodyBodyDefaultProductPrivacy = OrganisationPostBodyBodyDefaultProductPrivacy; exports.OrganisationUnitPostBodyBodyDefaultProductPrivacy = OrganisationUnitPostBodyBodyDefaultProductPrivacy; exports.ProcessingChargesMerchantKind = ProcessingChargesMerchantKind; exports.ProductChargesGetResponseProductType = ProductChargesGetResponseProductType; exports.ProductDetailFlavour = ProductDetailFlavour; exports.ProductDetailType = ProductDetailType; exports.ProductTypeServiceKind = ProductTypeServiceKind; exports.UnitDetailDefaultProductPrivacy = UnitDetailDefaultProductPrivacy; exports.UnitPatchBodyBodyDefaultProductPrivacy = UnitPatchBodyBodyDefaultProductPrivacy; exports.UnitProductPostBodyBodyFlavour = UnitProductPostBodyBodyFlavour; exports.UnitProductPostBodyBodyType = UnitProductPostBodyBodyType; exports.customInstance = _chunkTKLTUR4Rcjs.customInstance; exports.setAuthToken = _chunkTKLTUR4Rcjs.setAuthToken; exports.setBaseUrl = _chunkTKLTUR4Rcjs.setBaseUrl;
77
119
  //# sourceMappingURL=index.cjs.map
package/index.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AAiKO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AASO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAkDO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA+DO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA2CO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAUO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAuCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA2EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n /** The name you want to give the Product */\n name?: string;\n};\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n};\n\nexport type UnitPatchBodyBody = {\n /** The new name for the Unit */\n name?: string;\n};\n\nexport type OrganisationPatchBodyBody = {\n /** The new name for the Organisational */\n name?: string;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n /** The name of the unit */\n name: string;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** The name of the asset. This must be unique within its scope. For example, only one asset can be called \"asset-1\" within a given Unit. Asset names must be valid RFC 1123 Label Names */\n name: string;\n scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface MerchantDetail {\n /** The hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProductType {\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport type ProductDmStorageDetailCoins = {\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProcessingCharges {\n charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: 'PROCESSING',\n STORAGE: 'STORAGE',\n} as const;\n\nexport interface ChargeSummary {\n /** The cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n created: string;\n /** The start of the charge period */\n from: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member?: boolean;\n created?: string;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"]}
1
+ {"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AAiKO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AASO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AA0BO,IAAM,yCAAyC;AAAA,EACpD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAoBO,IAAM,iDAAiD;AAAA,EAC5D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAkBO,IAAM,oDAAoD;AAAA,EAC/D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAuBO,IAAM,gDAAgD;AAAA,EAC3D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAeO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA+CO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA6BO,IAAM,0CAA0C;AAAA,EACrD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAyBO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAUO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAuCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA2EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type ProductPatchBodyBody = {\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n /** The name you want to give the Product */\n name?: string;\n};\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value\n */\nexport type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type UnitPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Unit */\n name?: string;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units\n */\nexport type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units */\n default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Organisational */\n name?: string;\n};\n\n/**\n * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value\n */\nexport type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationUnitPostBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;\n /** The name of the unit */\n name: string;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\n/**\n * The default product privacy setting for the Organisation\n */\nexport type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPostBodyBody = {\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** The name of the asset. This must be unique within its scope. For example, only one asset can be called \"asset-1\" within a given Unit. Asset names must be valid RFC 1123 Label Names */\n name: string;\n scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface MerchantDetail {\n /** The hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProductType {\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport type ProductDmStorageDetailCoins = {\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProcessingCharges {\n charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: 'PROCESSING',\n STORAGE: 'STORAGE',\n} as const;\n\nexport interface ChargeSummary {\n /** The cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n created: string;\n /** The start of the charge period */\n from: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member?: boolean;\n created?: string;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"]}
package/index.d.cts CHANGED
@@ -23,6 +23,24 @@ type AttachAssetParams = {
23
23
  */
24
24
  m_id?: QMIdParameter;
25
25
  };
26
+ type GetAssetParams = {
27
+ /**
28
+ * A User Identity
29
+ */
30
+ user_id?: QUserIdParameter;
31
+ /**
32
+ * A Product Identity
33
+ */
34
+ product_id?: QProductIdParameter;
35
+ /**
36
+ * A Unit Identity
37
+ */
38
+ unit_id?: QUnitIdParameter;
39
+ /**
40
+ * An Organisation Identity
41
+ */
42
+ org_id?: QOrgIdParameter;
43
+ };
26
44
  /**
27
45
  * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
28
46
  */
@@ -31,6 +49,20 @@ type QUntilParameter = string;
31
49
  * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
32
50
  */
33
51
  type QFromParameter = string;
52
+ type GetUnitChargesParams = {
53
+ /**
54
+ * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
55
+ */
56
+ from?: QFromParameter;
57
+ /**
58
+ * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
59
+ */
60
+ until?: QUntilParameter;
61
+ /**
62
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
63
+ */
64
+ pbp?: QPbpParameter;
65
+ };
34
66
  type GetOrganisationChargesParams = {
35
67
  /**
36
68
  * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
@@ -85,24 +117,6 @@ type QProductIdParameter = string;
85
117
  * A Unit Identity
86
118
  */
87
119
  type QUnitIdParameter = string;
88
- type GetAssetParams = {
89
- /**
90
- * A User Identity
91
- */
92
- user_id?: QUserIdParameter;
93
- /**
94
- * A Product Identity
95
- */
96
- product_id?: QProductIdParameter;
97
- /**
98
- * A Unit Identity
99
- */
100
- unit_id?: QUnitIdParameter;
101
- /**
102
- * An Organisation Identity
103
- */
104
- org_id?: QOrgIdParameter;
105
- };
106
120
  /**
107
121
  * A Merchant Identity
108
122
  */
@@ -115,20 +129,6 @@ type QOrgIdParameter = string;
115
129
  * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
116
130
  */
117
131
  type QPbpParameter = number;
118
- type GetUnitChargesParams = {
119
- /**
120
- * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
121
- */
122
- from?: QFromParameter;
123
- /**
124
- * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
125
- */
126
- until?: QUntilParameter;
127
- /**
128
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
129
- */
130
- pbp?: QPbpParameter;
131
- };
132
132
  type ProductPatchBodyBody = {
133
133
  /** The Product's built-in coin allowance. Product allowances cannot be reduced */
134
134
  allowance?: number;
@@ -171,17 +171,61 @@ type UnitProductPostBodyBody = {
171
171
  Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */
172
172
  type: UnitProductPostBodyBodyType;
173
173
  };
174
+ /**
175
+ * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.
176
+
177
+ Whether the privacy can be honoured will depend on the organisation's value
178
+ */
179
+ type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];
180
+ declare const UnitPatchBodyBodyDefaultProductPrivacy: {
181
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
182
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
183
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
184
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
185
+ };
174
186
  type UnitPatchBodyBody = {
187
+ /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.
188
+
189
+ Whether the privacy can be honoured will depend on the organisation's value */
190
+ default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;
175
191
  /** The new name for the Unit */
176
192
  name?: string;
177
193
  };
194
+ /**
195
+ * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.
196
+
197
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units
198
+ */
199
+ type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];
200
+ declare const OrganisationPatchBodyBodyDefaultProductPrivacy: {
201
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
202
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
203
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
204
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
205
+ };
178
206
  type OrganisationPatchBodyBody = {
207
+ /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.
208
+
209
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units */
210
+ default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;
179
211
  /** The new name for the Organisational */
180
212
  name?: string;
181
213
  };
214
+ /**
215
+ * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value
216
+ */
217
+ type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];
218
+ declare const OrganisationUnitPostBodyBodyDefaultProductPrivacy: {
219
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
220
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
221
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
222
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
223
+ };
182
224
  type OrganisationUnitPostBodyBody = {
183
225
  /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
184
226
  billing_day: number;
227
+ /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */
228
+ default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;
185
229
  /** The name of the unit */
186
230
  name: string;
187
231
  };
@@ -189,7 +233,19 @@ type PersonalUnitPutBodyBody = {
189
233
  /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
190
234
  billing_day: number;
191
235
  };
236
+ /**
237
+ * The default product privacy setting for the Organisation
238
+ */
239
+ type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];
240
+ declare const OrganisationPostBodyBodyDefaultProductPrivacy: {
241
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
242
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
243
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
244
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
245
+ };
192
246
  type OrganisationPostBodyBody = {
247
+ /** The default product privacy setting for the Organisation */
248
+ default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;
193
249
  /** The name of the organisation */
194
250
  name: string;
195
251
  /** The name of the organisation owner. A user ID */
@@ -237,12 +293,24 @@ interface UserAccountDetail {
237
293
  caller_has_admin_privilege: boolean;
238
294
  user: UserDetail;
239
295
  }
296
+ /**
297
+ * The Unit's default product privacy setting
298
+ */
299
+ type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];
300
+ declare const UnitDetailDefaultProductPrivacy: {
301
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
302
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
303
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
304
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
305
+ };
240
306
  interface UnitDetail {
241
307
  /** The Unit's billing day */
242
308
  billing_day: number;
243
309
  /** Whether the user making the API call is a member of the Unit */
244
310
  caller_is_member: boolean;
245
311
  created: string;
312
+ /** The Unit's default product privacy setting */
313
+ default_product_privacy: UnitDetailDefaultProductPrivacy;
246
314
  /** The Unit's unique identity */
247
315
  id: string;
248
316
  /** The Unit's name */
@@ -276,10 +344,22 @@ interface MerchantsGetResponse {
276
344
  */
277
345
  merchants: MerchantDetail[];
278
346
  }
347
+ /**
348
+ * The Organisation's default product privacy setting
349
+ */
350
+ type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];
351
+ declare const OrganisationDetailDefaultProductPrivacy: {
352
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
353
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
354
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
355
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
356
+ };
279
357
  interface OrganisationDetail {
280
358
  /** Whether the user making the API call is a member of the Unit */
281
359
  caller_is_member: boolean;
282
360
  created: string;
361
+ /** The Organisation's default product privacy setting */
362
+ default_product_privacy: OrganisationDetailDefaultProductPrivacy;
283
363
  /** The Organisation's unique ID */
284
364
  id: string;
285
365
  /** The Organisation's name */
@@ -699,4 +779,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
699
779
  declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
700
780
  type ErrorType<TError> = AxiosError<TError>;
701
781
 
702
- export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, type OrganisationGetDefaultResponse, type OrganisationGetResponse, type OrganisationPatchBodyBody, type OrganisationPostBodyBody, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, type UnitGetResponse, type UnitPatchBodyBody, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
782
+ export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
package/index.d.ts CHANGED
@@ -23,6 +23,24 @@ type AttachAssetParams = {
23
23
  */
24
24
  m_id?: QMIdParameter;
25
25
  };
26
+ type GetAssetParams = {
27
+ /**
28
+ * A User Identity
29
+ */
30
+ user_id?: QUserIdParameter;
31
+ /**
32
+ * A Product Identity
33
+ */
34
+ product_id?: QProductIdParameter;
35
+ /**
36
+ * A Unit Identity
37
+ */
38
+ unit_id?: QUnitIdParameter;
39
+ /**
40
+ * An Organisation Identity
41
+ */
42
+ org_id?: QOrgIdParameter;
43
+ };
26
44
  /**
27
45
  * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
28
46
  */
@@ -31,6 +49,20 @@ type QUntilParameter = string;
31
49
  * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
32
50
  */
33
51
  type QFromParameter = string;
52
+ type GetUnitChargesParams = {
53
+ /**
54
+ * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
55
+ */
56
+ from?: QFromParameter;
57
+ /**
58
+ * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
59
+ */
60
+ until?: QUntilParameter;
61
+ /**
62
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
63
+ */
64
+ pbp?: QPbpParameter;
65
+ };
34
66
  type GetOrganisationChargesParams = {
35
67
  /**
36
68
  * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
@@ -85,24 +117,6 @@ type QProductIdParameter = string;
85
117
  * A Unit Identity
86
118
  */
87
119
  type QUnitIdParameter = string;
88
- type GetAssetParams = {
89
- /**
90
- * A User Identity
91
- */
92
- user_id?: QUserIdParameter;
93
- /**
94
- * A Product Identity
95
- */
96
- product_id?: QProductIdParameter;
97
- /**
98
- * A Unit Identity
99
- */
100
- unit_id?: QUnitIdParameter;
101
- /**
102
- * An Organisation Identity
103
- */
104
- org_id?: QOrgIdParameter;
105
- };
106
120
  /**
107
121
  * A Merchant Identity
108
122
  */
@@ -115,20 +129,6 @@ type QOrgIdParameter = string;
115
129
  * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
116
130
  */
117
131
  type QPbpParameter = number;
118
- type GetUnitChargesParams = {
119
- /**
120
- * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
121
- */
122
- from?: QFromParameter;
123
- /**
124
- * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
125
- */
126
- until?: QUntilParameter;
127
- /**
128
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
129
- */
130
- pbp?: QPbpParameter;
131
- };
132
132
  type ProductPatchBodyBody = {
133
133
  /** The Product's built-in coin allowance. Product allowances cannot be reduced */
134
134
  allowance?: number;
@@ -171,17 +171,61 @@ type UnitProductPostBodyBody = {
171
171
  Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */
172
172
  type: UnitProductPostBodyBodyType;
173
173
  };
174
+ /**
175
+ * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.
176
+
177
+ Whether the privacy can be honoured will depend on the organisation's value
178
+ */
179
+ type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];
180
+ declare const UnitPatchBodyBodyDefaultProductPrivacy: {
181
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
182
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
183
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
184
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
185
+ };
174
186
  type UnitPatchBodyBody = {
187
+ /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.
188
+
189
+ Whether the privacy can be honoured will depend on the organisation's value */
190
+ default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;
175
191
  /** The new name for the Unit */
176
192
  name?: string;
177
193
  };
194
+ /**
195
+ * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.
196
+
197
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units
198
+ */
199
+ type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];
200
+ declare const OrganisationPatchBodyBodyDefaultProductPrivacy: {
201
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
202
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
203
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
204
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
205
+ };
178
206
  type OrganisationPatchBodyBody = {
207
+ /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.
208
+
209
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units */
210
+ default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;
179
211
  /** The new name for the Organisational */
180
212
  name?: string;
181
213
  };
214
+ /**
215
+ * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value
216
+ */
217
+ type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];
218
+ declare const OrganisationUnitPostBodyBodyDefaultProductPrivacy: {
219
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
220
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
221
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
222
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
223
+ };
182
224
  type OrganisationUnitPostBodyBody = {
183
225
  /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
184
226
  billing_day: number;
227
+ /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */
228
+ default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;
185
229
  /** The name of the unit */
186
230
  name: string;
187
231
  };
@@ -189,7 +233,19 @@ type PersonalUnitPutBodyBody = {
189
233
  /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
190
234
  billing_day: number;
191
235
  };
236
+ /**
237
+ * The default product privacy setting for the Organisation
238
+ */
239
+ type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];
240
+ declare const OrganisationPostBodyBodyDefaultProductPrivacy: {
241
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
242
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
243
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
244
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
245
+ };
192
246
  type OrganisationPostBodyBody = {
247
+ /** The default product privacy setting for the Organisation */
248
+ default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;
193
249
  /** The name of the organisation */
194
250
  name: string;
195
251
  /** The name of the organisation owner. A user ID */
@@ -237,12 +293,24 @@ interface UserAccountDetail {
237
293
  caller_has_admin_privilege: boolean;
238
294
  user: UserDetail;
239
295
  }
296
+ /**
297
+ * The Unit's default product privacy setting
298
+ */
299
+ type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];
300
+ declare const UnitDetailDefaultProductPrivacy: {
301
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
302
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
303
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
304
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
305
+ };
240
306
  interface UnitDetail {
241
307
  /** The Unit's billing day */
242
308
  billing_day: number;
243
309
  /** Whether the user making the API call is a member of the Unit */
244
310
  caller_is_member: boolean;
245
311
  created: string;
312
+ /** The Unit's default product privacy setting */
313
+ default_product_privacy: UnitDetailDefaultProductPrivacy;
246
314
  /** The Unit's unique identity */
247
315
  id: string;
248
316
  /** The Unit's name */
@@ -276,10 +344,22 @@ interface MerchantsGetResponse {
276
344
  */
277
345
  merchants: MerchantDetail[];
278
346
  }
347
+ /**
348
+ * The Organisation's default product privacy setting
349
+ */
350
+ type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];
351
+ declare const OrganisationDetailDefaultProductPrivacy: {
352
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
353
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
354
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
355
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
356
+ };
279
357
  interface OrganisationDetail {
280
358
  /** Whether the user making the API call is a member of the Unit */
281
359
  caller_is_member: boolean;
282
360
  created: string;
361
+ /** The Organisation's default product privacy setting */
362
+ default_product_privacy: OrganisationDetailDefaultProductPrivacy;
283
363
  /** The Organisation's unique ID */
284
364
  id: string;
285
365
  /** The Organisation's name */
@@ -699,4 +779,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
699
779
  declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
700
780
  type ErrorType<TError> = AxiosError<TError>;
701
781
 
702
- export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, type OrganisationGetDefaultResponse, type OrganisationGetResponse, type OrganisationPatchBodyBody, type OrganisationPostBodyBody, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, type UnitGetResponse, type UnitPatchBodyBody, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
782
+ export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
package/index.js CHANGED
@@ -16,6 +16,30 @@ var UnitProductPostBodyBodyFlavour = {
16
16
  SILVER: "SILVER",
17
17
  GOLD: "GOLD"
18
18
  };
19
+ var UnitPatchBodyBodyDefaultProductPrivacy = {
20
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
21
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
22
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
23
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
24
+ };
25
+ var OrganisationPatchBodyBodyDefaultProductPrivacy = {
26
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
27
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
28
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
29
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
30
+ };
31
+ var OrganisationUnitPostBodyBodyDefaultProductPrivacy = {
32
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
33
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
34
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
35
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
36
+ };
37
+ var OrganisationPostBodyBodyDefaultProductPrivacy = {
38
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
39
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
40
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
41
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
42
+ };
19
43
  var AssetPostBodyBodyScope = {
20
44
  USER: "USER",
21
45
  PRODUCT: "PRODUCT",
@@ -23,9 +47,21 @@ var AssetPostBodyBodyScope = {
23
47
  ORGANISATION: "ORGANISATION",
24
48
  GLOBAL: "GLOBAL"
25
49
  };
50
+ var UnitDetailDefaultProductPrivacy = {
51
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
52
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
53
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
54
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
55
+ };
26
56
  var MerchantDetailKind = {
27
57
  DATA_MANAGER: "DATA_MANAGER"
28
58
  };
59
+ var OrganisationDetailDefaultProductPrivacy = {
60
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
61
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
62
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
63
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
64
+ };
29
65
  var ProductTypeServiceKind = {
30
66
  DATA_MANAGER: "DATA_MANAGER"
31
67
  };
@@ -63,11 +99,17 @@ export {
63
99
  AssetPostBodyBodyScope,
64
100
  ChargeSummaryType,
65
101
  MerchantDetailKind,
102
+ OrganisationDetailDefaultProductPrivacy,
103
+ OrganisationPatchBodyBodyDefaultProductPrivacy,
104
+ OrganisationPostBodyBodyDefaultProductPrivacy,
105
+ OrganisationUnitPostBodyBodyDefaultProductPrivacy,
66
106
  ProcessingChargesMerchantKind,
67
107
  ProductChargesGetResponseProductType,
68
108
  ProductDetailFlavour,
69
109
  ProductDetailType,
70
110
  ProductTypeServiceKind,
111
+ UnitDetailDefaultProductPrivacy,
112
+ UnitPatchBodyBodyDefaultProductPrivacy,
71
113
  UnitProductPostBodyBodyFlavour,
72
114
  UnitProductPostBodyBodyType,
73
115
  customInstance,
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n /** The name you want to give the Product */\n name?: string;\n};\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n};\n\nexport type UnitPatchBodyBody = {\n /** The new name for the Unit */\n name?: string;\n};\n\nexport type OrganisationPatchBodyBody = {\n /** The new name for the Organisational */\n name?: string;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n /** The name of the unit */\n name: string;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** The name of the asset. This must be unique within its scope. For example, only one asset can be called \"asset-1\" within a given Unit. Asset names must be valid RFC 1123 Label Names */\n name: string;\n scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface MerchantDetail {\n /** The hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProductType {\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport type ProductDmStorageDetailCoins = {\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProcessingCharges {\n charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: 'PROCESSING',\n STORAGE: 'STORAGE',\n} as const;\n\nexport interface ChargeSummary {\n /** The cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n created: string;\n /** The start of the charge period */\n from: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member?: boolean;\n created?: string;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"],"mappings":";;;;;;;;AAiKO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AASO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAkDO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA+DO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA2CO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAUO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAuCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA2EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;","names":[]}
1
+ {"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type ProductPatchBodyBody = {\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n /** The name you want to give the Product */\n name?: string;\n};\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value\n */\nexport type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type UnitPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Unit */\n name?: string;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units\n */\nexport type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units */\n default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Organisational */\n name?: string;\n};\n\n/**\n * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value\n */\nexport type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationUnitPostBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;\n /** The name of the unit */\n name: string;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\n/**\n * The default product privacy setting for the Organisation\n */\nexport type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPostBodyBody = {\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** The name of the asset. This must be unique within its scope. For example, only one asset can be called \"asset-1\" within a given Unit. Asset names must be valid RFC 1123 Label Names */\n name: string;\n scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface MerchantDetail {\n /** The hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProductType {\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: 'EVALUATION',\n BRONZE: 'BRONZE',\n SILVER: 'SILVER',\n GOLD: 'GOLD',\n} as const;\n\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport type ProductDmStorageDetailCoins = {\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: 'DATA_MANAGER',\n} as const;\n\nexport interface ProcessingCharges {\n charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: 'PROCESSING',\n STORAGE: 'STORAGE',\n} as const;\n\nexport interface ChargeSummary {\n /** The cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n created: string;\n /** The start of the charge period */\n from: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member?: boolean;\n created?: string;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"],"mappings":";;;;;;;;AAiKO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AASO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AA0BO,IAAM,yCAAyC;AAAA,EACpD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAoBO,IAAM,iDAAiD;AAAA,EAC5D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAkBO,IAAM,oDAAoD;AAAA,EAC/D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAuBO,IAAM,gDAAgD;AAAA,EAC3D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAeO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA+CO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA6BO,IAAM,0CAA0C;AAAA,EACrD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAyBO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAUO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAuCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA2EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;","names":[]}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.0",
2
+ "version": "2.1.1-rc.2",
3
3
  "author": "Oliver Dudgeon",
4
4
  "name": "@squonk/account-server-client",
5
5
  "private": false,
@@ -22,6 +22,25 @@ export type AttachAssetParams = {
22
22
  m_id?: QMIdParameter;
23
23
  };
24
24
 
25
+ export type GetAssetParams = {
26
+ /**
27
+ * A User Identity
28
+ */
29
+ user_id?: QUserIdParameter;
30
+ /**
31
+ * A Product Identity
32
+ */
33
+ product_id?: QProductIdParameter;
34
+ /**
35
+ * A Unit Identity
36
+ */
37
+ unit_id?: QUnitIdParameter;
38
+ /**
39
+ * An Organisation Identity
40
+ */
41
+ org_id?: QOrgIdParameter;
42
+ };
43
+
25
44
  /**
26
45
  * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
27
46
  */
@@ -32,6 +51,21 @@ export type QUntilParameter = string;
32
51
  */
33
52
  export type QFromParameter = string;
34
53
 
54
+ export type GetUnitChargesParams = {
55
+ /**
56
+ * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
57
+ */
58
+ from?: QFromParameter;
59
+ /**
60
+ * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
61
+ */
62
+ until?: QUntilParameter;
63
+ /**
64
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
65
+ */
66
+ pbp?: QPbpParameter;
67
+ };
68
+
35
69
  export type GetOrganisationChargesParams = {
36
70
  /**
37
71
  * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
@@ -92,25 +126,6 @@ export type QProductIdParameter = string;
92
126
  */
93
127
  export type QUnitIdParameter = string;
94
128
 
95
- export type GetAssetParams = {
96
- /**
97
- * A User Identity
98
- */
99
- user_id?: QUserIdParameter;
100
- /**
101
- * A Product Identity
102
- */
103
- product_id?: QProductIdParameter;
104
- /**
105
- * A Unit Identity
106
- */
107
- unit_id?: QUnitIdParameter;
108
- /**
109
- * An Organisation Identity
110
- */
111
- org_id?: QOrgIdParameter;
112
- };
113
-
114
129
  /**
115
130
  * A Merchant Identity
116
131
  */
@@ -126,21 +141,6 @@ export type QOrgIdParameter = string;
126
141
  */
127
142
  export type QPbpParameter = number;
128
143
 
129
- export type GetUnitChargesParams = {
130
- /**
131
- * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
132
- */
133
- from?: QFromParameter;
134
- /**
135
- * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
136
- */
137
- until?: QUntilParameter;
138
- /**
139
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
140
- */
141
- pbp?: QPbpParameter;
142
- };
143
-
144
144
  export type ProductPatchBodyBody = {
145
145
  /** The Product's built-in coin allowance. Product allowances cannot be reduced */
146
146
  allowance?: number;
@@ -193,19 +193,75 @@ Project Tier subscriptions have built-in allowances and Limits so you must not p
193
193
  type: UnitProductPostBodyBodyType;
194
194
  };
195
195
 
196
+ /**
197
+ * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.
198
+
199
+ Whether the privacy can be honoured will depend on the organisation's value
200
+ */
201
+ export type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];
202
+
203
+
204
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
205
+ export const UnitPatchBodyBodyDefaultProductPrivacy = {
206
+ ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',
207
+ ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',
208
+ DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',
209
+ DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',
210
+ } as const;
211
+
196
212
  export type UnitPatchBodyBody = {
213
+ /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.
214
+
215
+ Whether the privacy can be honoured will depend on the organisation's value */
216
+ default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;
197
217
  /** The new name for the Unit */
198
218
  name?: string;
199
219
  };
200
220
 
221
+ /**
222
+ * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.
223
+
224
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units
225
+ */
226
+ export type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];
227
+
228
+
229
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
230
+ export const OrganisationPatchBodyBodyDefaultProductPrivacy = {
231
+ ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',
232
+ ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',
233
+ DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',
234
+ DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',
235
+ } as const;
236
+
201
237
  export type OrganisationPatchBodyBody = {
238
+ /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.
239
+
240
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units */
241
+ default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;
202
242
  /** The new name for the Organisational */
203
243
  name?: string;
204
244
  };
205
245
 
246
+ /**
247
+ * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value
248
+ */
249
+ export type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];
250
+
251
+
252
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
253
+ export const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {
254
+ ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',
255
+ ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',
256
+ DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',
257
+ DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',
258
+ } as const;
259
+
206
260
  export type OrganisationUnitPostBodyBody = {
207
261
  /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
208
262
  billing_day: number;
263
+ /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */
264
+ default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;
209
265
  /** The name of the unit */
210
266
  name: string;
211
267
  };
@@ -215,7 +271,23 @@ export type PersonalUnitPutBodyBody = {
215
271
  billing_day: number;
216
272
  };
217
273
 
274
+ /**
275
+ * The default product privacy setting for the Organisation
276
+ */
277
+ export type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];
278
+
279
+
280
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
281
+ export const OrganisationPostBodyBodyDefaultProductPrivacy = {
282
+ ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',
283
+ ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',
284
+ DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',
285
+ DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',
286
+ } as const;
287
+
218
288
  export type OrganisationPostBodyBody = {
289
+ /** The default product privacy setting for the Organisation */
290
+ default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;
219
291
  /** The name of the organisation */
220
292
  name: string;
221
293
  /** The name of the organisation owner. A user ID */
@@ -272,12 +344,28 @@ export interface UserAccountDetail {
272
344
  user: UserDetail;
273
345
  }
274
346
 
347
+ /**
348
+ * The Unit's default product privacy setting
349
+ */
350
+ export type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];
351
+
352
+
353
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
354
+ export const UnitDetailDefaultProductPrivacy = {
355
+ ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',
356
+ ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',
357
+ DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',
358
+ DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',
359
+ } as const;
360
+
275
361
  export interface UnitDetail {
276
362
  /** The Unit's billing day */
277
363
  billing_day: number;
278
364
  /** Whether the user making the API call is a member of the Unit */
279
365
  caller_is_member: boolean;
280
366
  created: string;
367
+ /** The Unit's default product privacy setting */
368
+ default_product_privacy: UnitDetailDefaultProductPrivacy;
281
369
  /** The Unit's unique identity */
282
370
  id: string;
283
371
  /** The Unit's name */
@@ -319,10 +407,26 @@ export interface MerchantsGetResponse {
319
407
  merchants: MerchantDetail[];
320
408
  }
321
409
 
410
+ /**
411
+ * The Organisation's default product privacy setting
412
+ */
413
+ export type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];
414
+
415
+
416
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
417
+ export const OrganisationDetailDefaultProductPrivacy = {
418
+ ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',
419
+ ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',
420
+ DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',
421
+ DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',
422
+ } as const;
423
+
322
424
  export interface OrganisationDetail {
323
425
  /** Whether the user making the API call is a member of the Unit */
324
426
  caller_is_member: boolean;
325
427
  created: string;
428
+ /** The Organisation's default product privacy setting */
429
+ default_product_privacy: OrganisationDetailDefaultProductPrivacy;
326
430
  /** The Organisation's unique ID */
327
431
  id: string;
328
432
  /** The Organisation's name */