Skip to content

Commit

Permalink
fix hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Jan 30, 2025
1 parent 0f7df61 commit 670af9e
Show file tree
Hide file tree
Showing 14 changed files with 588 additions and 541 deletions.
9 changes: 6 additions & 3 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f83d894c-c934-499f-8a8d-e128395ae8ff
management:
docChecksum: d58a5f43d089b5b600889f6aa4ca9645
docChecksum: 1f34feb302cea102048b5efa2895d85b
docVersion: "1.0"
speakeasyVersion: 1.477.2
generationVersion: 2.497.8
releaseVersion: 0.2.0
configChecksum: 44e31c014f6b6f22c8eeee7884b74831
releaseVersion: 0.0.10
configChecksum: 7fa3b1adba526fe4d535e31d39d59e1f
repoURL: https://github.com/novuhq/novu-py.git
installationURL: https://github.com/novuhq/novu-py.git
published: true
Expand All @@ -21,6 +21,7 @@ features:
globalSecurity: 3.0.2
globalSecurityCallbacks: 1.0.0
globalServerURLs: 3.1.0
groups: 3.0.0
methodArguments: 1.0.2
nameOverrides: 3.0.1
nullables: 1.0.0
Expand All @@ -45,6 +46,7 @@ generatedFiles:
- docs/models/thread.md
- docs/models/utils/retryconfig.md
- docs/sdks/novu/README.md
- docs/sdks/support/README.md
- poetry.toml
- py.typed
- pylintrc
Expand All @@ -68,6 +70,7 @@ generatedFiles:
- src/novu_py/py.typed
- src/novu_py/sdk.py
- src/novu_py/sdkconfiguration.py
- src/novu_py/support.py
- src/novu_py/types/__init__.py
- src/novu_py/types/basemodel.py
- src/novu_py/utils/__init__.py
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
python:
version: 0.0.2
version: 0.0.10
additionalDependencies:
dev:
- pytest>=6.0.0
Expand Down
30 changes: 30 additions & 0 deletions .speakeasy/speakeasy-modifications-overlay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Speakeasy Modifications
version: 0.0.2
x-speakeasy-metadata:
after: ""
before: ""
type: speakeasy-modifications
actions:
- target: $["paths"]["/v1/support/create-thread"]["post"]
update:
x-speakeasy-group: support
x-speakeasy-name-override: createThread
x-speakeasy-metadata:
after: sdk.support.createThread()
before: sdk.<no_group>.SupportController_createThread()
created_at: 1738243738023
reviewed_at: 1738243790791
type: method-name
- target: $["paths"]["/v1/support/customer-details"]["post"]
update:
x-speakeasy-group: support
x-speakeasy-name-override: fetchUserOrganizations
x-speakeasy-metadata:
after: sdk.support.fetchUserOrganizations()
before: sdk.<no_group>.SupportController_fetchUserOrganizations()
created_at: 1738243738023
reviewed_at: 1738243790791
type: method-name
12 changes: 7 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@ speakeasyVersion: 1.477.2
sources:
novu-OAS:
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:5f0fe783b0f59a21bef78d733ff05c1a227a0ace81ab4bc726408e14180fb258
sourceBlobDigest: sha256:f5e2acfd7d7b13e4da05474b64a4f5e6172e04e1e3594842fa60a29aea8d3fcf
sourceRevisionDigest: sha256:4deb6573ba4e1fc526a4e7dc05253ee7138f4ee7b8aafdbdbcce00034f225c4c
sourceBlobDigest: sha256:fe3888a32f984f1ab3c1c7d180a8d9a100c4dd19a7ed2e0a167ddf77d2b622d3
tags:
- latest
- "1.0"
targets:
novu:
source: novu-OAS
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:5f0fe783b0f59a21bef78d733ff05c1a227a0ace81ab4bc726408e14180fb258
sourceBlobDigest: sha256:f5e2acfd7d7b13e4da05474b64a4f5e6172e04e1e3594842fa60a29aea8d3fcf
sourceRevisionDigest: sha256:4deb6573ba4e1fc526a4e7dc05253ee7138f4ee7b8aafdbdbcce00034f225c4c
sourceBlobDigest: sha256:fe3888a32f984f1ab3c1c7d180a8d9a100c4dd19a7ed2e0a167ddf77d2b622d3
codeSamplesNamespace: novu-oas-python-code-samples
codeSamplesRevisionDigest: sha256:279530c07557c0252364da9452ca7f27832c1c3ba536bede30c18c93461e1a49
codeSamplesRevisionDigest: sha256:eb86800532215cc27bc03fea10d9cd1c6ac64f4a984f648f5f87ac80e85dc7ac
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
novu-OAS:
inputs:
- location: https://api.novu.co/openapi.sdk.yaml
overlays:
- location: .speakeasy/speakeasy-modifications-overlay.yaml
registry:
location: registry.speakeasyapi.dev/novu/novu/novu-oas
targets:
Expand Down
2 changes: 2 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ sources:
novu-OAS:
inputs:
- location: https://api.novu.co/openapi.sdk.yaml
overlays:
- location: .speakeasy/speakeasy-modifications-overlay.yaml
registry:
location: registry.speakeasyapi.dev/novu/novu/novu-oas
targets:
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ with Novu(
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

Expand All @@ -121,7 +121,7 @@ async def main():
),
) as novu:

await novu.support_controller_fetch_user_organizations_async(plain_card_request_dto={
await novu.support.fetch_user_organizations_async(plain_card_request_dto={
"timestamp": "<value>",
})

Expand All @@ -137,10 +137,11 @@ asyncio.run(main())
<details open>
<summary>Available methods</summary>

### [Novu SDK](docs/sdks/novu/README.md)

* [support_controller_fetch_user_organizations](docs/sdks/novu/README.md#support_controller_fetch_user_organizations)
* [create](docs/sdks/novu/README.md#create)
### [support](docs/sdks/support/README.md)

* [fetch_user_organizations](docs/sdks/support/README.md#fetch_user_organizations)
* [create_thread](docs/sdks/support/README.md#create_thread)

</details>
<!-- End Available Resources and Operations [operations] -->
Expand All @@ -163,7 +164,7 @@ with Novu(
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
},
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
Expand All @@ -186,7 +187,7 @@ with Novu(
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

Expand All @@ -209,7 +210,7 @@ By default, an API error will raise a models.APIError exception, which has the f
| `.raw_response` | *httpx.Response* | The raw HTTP response |
| `.body` | *str* | The response content |

When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `support_controller_fetch_user_organizations_async` method may raise the following exceptions:
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `fetch_user_organizations_async` method may raise the following exceptions:

| Error Type | Status Code | Content Type |
| --------------- | ----------- | ------------ |
Expand All @@ -230,7 +231,7 @@ with Novu(

try:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

Expand Down Expand Up @@ -268,7 +269,7 @@ with Novu(
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

Expand All @@ -291,7 +292,7 @@ with Novu(
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

Expand Down Expand Up @@ -405,7 +406,7 @@ with Novu(
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

Expand Down
4 changes: 2 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with Novu(
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
novu.support.fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

Expand All @@ -35,7 +35,7 @@ async def main():
),
) as novu:

await novu.support_controller_fetch_user_organizations_async(plain_card_request_dto={
await novu.support.fetch_user_organizations_async(plain_card_request_dto={
"timestamp": "<value>",
})

Expand Down
77 changes: 0 additions & 77 deletions docs/sdks/novu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,3 @@ Novu Documentation
<https://docs.novu.co>

### Available Operations

* [support_controller_fetch_user_organizations](#support_controller_fetch_user_organizations)
* [create](#create)

## support_controller_fetch_user_organizations

### Example Usage

```python
import novu_py
from novu_py import Novu
import os

with Novu(
security=novu_py.Security(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
),
) as novu:

novu.support_controller_fetch_user_organizations(plain_card_request_dto={
"timestamp": "<value>",
})

# Use the SDK ...

```

### Parameters

| Parameter | Type | Required | Description |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `plain_card_request_dto` | [models.PlainCardRequestDto](../../models/plaincardrequestdto.md) | :heavy_check_mark: | N/A |
| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |

### Errors

| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| models.APIError | 4XX, 5XX | \*/\* |

## create

### Example Usage

```python
import novu_py
from novu_py import Novu
import os

with Novu(
security=novu_py.Security(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
),
) as novu:

novu.create(create_support_thread_dto={
"text": "<value>",
})

# Use the SDK ...

```

### Parameters

| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `create_support_thread_dto` | [models.CreateSupportThreadDto](../../models/createsupportthreaddto.md) | :heavy_check_mark: | N/A |
| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |

### Errors

| Error Type | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| models.APIError | 4XX, 5XX | \*/\* |
Loading

0 comments on commit 670af9e

Please sign in to comment.