Skip to content

Commit

Permalink
Merge pull request #46 from lifeomic/PW-785
Browse files Browse the repository at this point in the history
PW-785 add priceRange and iconUrl to wellness offering resource
  • Loading branch information
SchaeStewart authored Oct 7, 2022
2 parents 940a34e + 35d3f9d commit 9300f82
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 6 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ installed. Then run `make build`.

### Regenerating GQL Client

If you're picking up changes to GQL APIs, run `make generate`
If you're picking up changes to GQL APIs, run `make generate`.

If it's not downloading schema updates try running `make -B generate`

### Using a local provider build

Expand All @@ -37,3 +39,11 @@ LIFEOMIC_TOKEN=<auth-token> LIFEOMIC_ACCOUNT=<account-id> make acctest
[go-binaries]: https://go.dev/dl/
[tf-dev-overrides]: https://www.terraform.io/cli/config/config-file#development-overrides-for-provider-developers
[auth-token-guide]: https://phc.docs.lifeomic.com/user-guides/account-management/api-keys

#### Wellness Offering Acceptance Tests

(must be logged in to AWS)

```shell
LIFEOMIC_TOKEN=fake-token LIFEOMIC_ACCOUNT=fake-account TESTARGS="-run='TestAccMarketplaceWellnessOffering'" LIFEOMIC_USE_LAMBDA=1 make acctest
```
10 changes: 10 additions & 0 deletions docs/resources/marketplace_wellness_offering.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,23 @@ marketplace_wellness_offering manages Wellness Offering subsidies
### Optional

- `app_link` (String) Link to open the subsidy in-app
- `icon_url` (String) Link to an icon representing the subsidy
- `id` (String) An optional id for the Wellness Offering
- `is_test_module` (Boolean)
- `parent_module_id` (String)
- `price_range` (Object) Link to an icon representing the subsidy (see [below for nested schema](#nestedatt--price_range))

### Read-Only

- `is_approved` (Boolean)
- `version` (String)

<a id="nestedatt--price_range"></a>
### Nested Schema for `price_range`

Optional:

- `high` (Number)
- `low` (Number)


87 changes: 87 additions & 0 deletions internal/gqlclient/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions internal/gqlclient/marketplace.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ fragment WellnessOfferingSource on WellnessOffering {
approximateUnitCost
subsidyType
appLink
iconUrl
priceRange {
low
high
}
}

fragment WellnessOfferingModule on MarketplaceModule {
Expand Down
22 changes: 22 additions & 0 deletions internal/gqlclient/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,16 @@ type PreviewImageWithDescription {
url: String!
}

type PriceRange {
high: Int!
low: Int!
}

input PriceRangeInput {
high: Int!
low: Int!
}

input PriceSearchInput {
interval: PaymentInterval!
range: IntRange
Expand Down Expand Up @@ -2139,6 +2149,9 @@ type WellnessOffering {

"""The configuration schema for this offering, as a JSON blob."""
configurationSchema: String!

"""A URL for an icon representing the offering"""
iconUrl: String
id: String!

"""A URL of a marketing image for the offering."""
Expand All @@ -2147,6 +2160,9 @@ type WellnessOffering {
"""A link to more information about the offering."""
infoUrl: String!

"""A low and high value for the offering in integer USD pennies"""
priceRange: PriceRange

"""The name of the provider of this offering."""
provider: String!

Expand Down Expand Up @@ -2178,6 +2194,9 @@ input WellnessOfferingModuleSourceInfo {
"""The configuration schema for this offering, as a JSON blob."""
configurationSchema: String!

"""A URL for an icon representing the offering"""
iconUrl: String

"""A URL of a marketing image for the offering."""
imageUrl: String!

Expand All @@ -2190,6 +2209,9 @@ input WellnessOfferingModuleSourceInfo {
"""
installUrl: String!

"""A low and high value for the offering in integer USD pennies"""
priceRange: PriceRangeInput

"""The name of the provider of this offering."""
provider: String!

Expand Down
67 changes: 67 additions & 0 deletions internal/gqlclient/schemas/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5794,6 +5794,49 @@
],
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "PriceRange",
"description": null,
"fields": [
{
"name": "low",
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "high",
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "WellnessOffering",
Expand Down Expand Up @@ -5934,6 +5977,30 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "iconUrl",
"description": "A URL for an icon representing the offering",
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "priceRange",
"description": "A low and high value for the offering in integer USD pennies",
"args": [],
"type": {
"kind": "OBJECT",
"name": "PriceRange",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
Expand Down
Loading

0 comments on commit 9300f82

Please sign in to comment.