Skip to content

Commit

Permalink
SDK regeneration (#78)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored May 3, 2024
1 parent 0dba6f6 commit 323b6bf
Show file tree
Hide file tree
Showing 9 changed files with 725 additions and 122 deletions.
4 changes: 2 additions & 2 deletions core/idempotent_request_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type IdempotentRequestOptions struct {
*RequestOptions

IdempotencyKey *string
IdempotencyExpiry *int
IdempotencyExpiry *string
}

// NewIdempotentRequestOptions returns a new *IdempotentRequestOptions value.
Expand Down Expand Up @@ -51,7 +51,7 @@ func (i *IdempotencyKeyOption) applyIdempotentRequestOptions(opts *IdempotentReq

// IdempotencyExpiryOption implements the RequestOption interface.
type IdempotencyExpiryOption struct {
IdempotencyExpiry *int
IdempotencyExpiry *string
}

func (i *IdempotencyExpiryOption) applyIdempotentRequestOptions(opts *IdempotentRequestOptions) {
Expand Down
2 changes: 1 addition & 1 deletion core/request_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (r *RequestOptions) cloneHeader() http.Header {
headers := r.HTTPHeader.Clone()
headers.Set("X-Fern-Language", "Go")
headers.Set("X-Fern-SDK-Name", "github.com/trycourier/courier-go/v3")
headers.Set("X-Fern-SDK-Version", "v3.0.8")
headers.Set("X-Fern-SDK-Version", "v3.0.9")
return headers
}

Expand Down
10 changes: 8 additions & 2 deletions messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type GetMessageHistoryRequest struct {
type ListMessagesRequest struct {
// A boolean value that indicates whether archived messages should be included in the response.
Archived *bool `json:"-" url:"archived,omitempty"`
// A unique identifier that allows for fetching the next set of message statuses.
// A unique identifier that allows for fetching the next set of messages.
Cursor *string `json:"-" url:"cursor,omitempty"`
// A unique identifier representing the event that was used to send the event.
Event *string `json:"-" url:"event,omitempty"`
Expand All @@ -26,12 +26,18 @@ type ListMessagesRequest struct {
MessageId *string `json:"-" url:"messageId,omitempty"`
// A unique identifier representing the notification that was used to send the event.
Notification *string `json:"-" url:"notification,omitempty"`
// The key assocated to the provider you want to filter on. E.g., sendgrid, inbox, twilio, slack, msteams, etc. Allows multiple values to be set in query parameters.
Provider []*string `json:"-" url:"provider,omitempty"`
// A unique identifier representing the recipient associated with the requested profile.
Recipient *string `json:"-" url:"recipient,omitempty"`
// An indicator of the current status of the message. Multiple status values can be passed in.
// An indicator of the current status of the message. Allows multiple values to be set in query parameters.
Status []*string `json:"-" url:"status,omitempty"`
// A tag placed in the metadata.tags during a notification send. Allows multiple values to be set in query parameters.
Tag []*string `json:"-" url:"tag,omitempty"`
// A comma delimited list of 'tags'. Messages will be returned if they match any of the tags passed in.
Tags *string `json:"-" url:"tags,omitempty"`
// Messages sent with the context of a Tenant
TenantId *string `json:"-" url:"tenant_id,omitempty"`
// The enqueued datetime of a message to filter out messages received before.
EnqueuedAfter *string `json:"-" url:"enqueued_after,omitempty"`
// The unique identifier used to trace the requests
Expand Down
4 changes: 3 additions & 1 deletion option/idempotent_request_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ func WithIdempotencyKey(idempotencyKey *string) *core.IdempotencyKeyOption {
}

// WithIdempotencyExpiry sets the idempotencyExpiry request header.
func WithIdempotencyExpiry(idempotencyExpiry *int) *core.IdempotencyExpiryOption {
//
// The expiry can either be an ISO8601 datetime or a duration like "1 Day".
func WithIdempotencyExpiry(idempotencyExpiry *string) *core.IdempotencyExpiryOption {
return &core.IdempotencyExpiryOption{
IdempotencyExpiry: idempotencyExpiry,
}
Expand Down
6 changes: 2 additions & 4 deletions tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type TenantCreateOrReplaceParams struct {
// Defines the preferences used for the tenant when the user hasn't specified their own.
DefaultPreferences *DefaultPreferences `json:"default_preferences,omitempty" url:"default_preferences,omitempty"`
// Arbitrary properties accessible to a template.
Properties []TemplateProperty `json:"properties,omitempty" url:"properties,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty" url:"properties,omitempty"`
// A user profile object merged with user profile on send.
UserProfile map[string]interface{} `json:"user_profile,omitempty" url:"user_profile,omitempty"`
// Brand to be used for the account when one is not specified by the send call.
Expand Down Expand Up @@ -130,8 +130,6 @@ func (l *ListUsersForTenantResponse) String() string {
return fmt.Sprintf("%#v", l)
}

type TemplateProperty = interface{}

type Tenant struct {
// Id of the tenant.
Id string `json:"id" url:"id"`
Expand All @@ -142,7 +140,7 @@ type Tenant struct {
// Defines the preferences used for the account when the user hasn't specified their own.
DefaultPreferences *DefaultPreferences `json:"default_preferences,omitempty" url:"default_preferences,omitempty"`
// Arbitrary properties accessible to a template.
Properties *TemplateProperty `json:"properties,omitempty" url:"properties,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty" url:"properties,omitempty"`
// A user profile object merged with user profile on send.
UserProfile map[string]interface{} `json:"user_profile,omitempty" url:"user_profile,omitempty"`
// Brand to be used for the account when one is not specified by the send call.
Expand Down
Loading

0 comments on commit 323b6bf

Please sign in to comment.