Skip to content

Commit

Permalink
fix: update public resources url
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Apr 10, 2024
1 parent fc7507a commit a10cf8e
Show file tree
Hide file tree
Showing 11 changed files with 2,279 additions and 45 deletions.
1 change: 1 addition & 0 deletions gen/resources copy.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"attributes": {
"fields": {
"status": {
"sortable": true,
"filterable": true
}
},
Expand Down
2,303 changes: 2,268 additions & 35 deletions gen/resources.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gen/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { resolve } from "node:path"


const RESOURCES_LOCAL_PATH = resolve('./gen/resources.json')
const RESOURCES_REMOTE_URL = 'https://provisioning.commercelayer.io/api/public/resources'
const RESOURCES_REMOTE_URL = 'https://provisioning.commercelayer.co/api/public/resources'


const downloadResources = async (url?: string): Promise<any> => {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/api_credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type RoleRel = ResourceRel & { type: RoleType }


export type ApiCredentialSort = Pick<ApiCredential, 'id' | 'mode'> & ResourceSort
// export type ApiCredentialFilter = Pick<ApiCredential, 'id' | 'mode'> & ResourceFilter
// export type ApiCredentialFilter = Pick<ApiCredential, 'id' | 'name' | 'kind' | 'confidential' | 'redirect_uri' | 'client_id' | 'scopes' | 'expires_in' | 'mode' | 'custom'> & ResourceFilter


interface ApiCredential extends Resource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/application_memberships.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type RoleRel = ResourceRel & { type: RoleType }


export type ApplicationMembershipSort = Pick<ApplicationMembership, 'id'> & ResourceSort
// export type ApplicationMembershipFilter = Pick<ApplicationMembership, 'id'> & ResourceFilter
// export type ApplicationMembershipFilter = Pick<ApplicationMembership, 'id' | 'filters'> & ResourceFilter


interface ApplicationMembership extends Resource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/memberships.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type ApplicationMembershipRel = ResourceRel & { type: ApplicationMembershipType


export type MembershipSort = Pick<Membership, 'id' | 'status'> & ResourceSort
// export type MembershipFilter = Pick<Membership, 'id' | 'status'> & ResourceFilter
// export type MembershipFilter = Pick<Membership, 'id' | 'user_email' | 'status' | 'owner'> & ResourceFilter


interface Membership extends Resource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type OrganizationRel = ResourceRel & { type: OrganizationType }


export type OrganizationSort = Pick<Organization, 'id'> & ResourceSort
// export type OrganizationFilter = Pick<Organization, 'id'> & ResourceFilter
// export type OrganizationFilter = Pick<Organization, 'id' | 'name' | 'slug' | 'domain' | 'support_phone' | 'support_email' | 'logo_url' | 'favicon_url' | 'primary_color' | 'contrast_color' | 'discount_disabled' | 'account_disabled' | 'acceptance_disabled' | 'max_concurrent_promotions' | 'max_concurrent_imports' | 'region'> & ResourceFilter


interface Organization extends Resource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type RoleRel = ResourceRel & { type: RoleType }


export type PermissionSort = Pick<Permission, 'id'> & ResourceSort
// export type PermissionFilter = Pick<Permission, 'id'> & ResourceFilter
// export type PermissionFilter = Pick<Permission, 'id' | 'can_create' | 'can_read' | 'can_update' | 'can_destroy' | 'subject' | 'restrictions'> & ResourceFilter


interface Permission extends Resource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type OrganizationRel = ResourceRel & { type: OrganizationType }


export type RoleSort = Pick<Role, 'id'> & ResourceSort
// export type RoleFilter = Pick<Role, 'id'> & ResourceFilter
// export type RoleFilter = Pick<Role, 'id' | 'name' | 'kind'> & ResourceFilter


interface Role extends Resource {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type UserType = 'user'
type UserRel = ResourceRel & { type: UserType }


export type UserSort = Pick<User, 'id'> & ResourceSort
// export type UserFilter = Pick<User, 'id'> & ResourceFilter
export type UserSort = Pick<User, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceSort
// export type UserFilter = Pick<User, 'id' | 'email' | 'first_name' | 'last_name' | 'time_zone'> & ResourceFilter


interface User extends Resource {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type VersionRel = ResourceRel & { type: VersionType }


export type VersionSort = Pick<Version, 'id'> & ResourceSort
// export type VersionFilter = Pick<Version, 'id'> & ResourceFilter
// export type VersionFilter = Pick<Version, 'id' | 'resource_type' | 'resource_id'> & ResourceFilter


interface Version extends Resource {
Expand Down

0 comments on commit a10cf8e

Please sign in to comment.