@commercelayer/provisioning-sdk 3.0.0-beta.0 → 3.0.0-beta.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.
Files changed (146) hide show
  1. package/README.md +18 -9
  2. package/lib/{api-BY0jb79k.d.cts → api-C4jp_9vb.d.cts} +489 -480
  3. package/lib/{api-e4p3q-SB.d.ts → api-C_E9e1ea.d.ts} +489 -480
  4. package/lib/api.cjs +23 -23
  5. package/lib/api.d.cts +1 -1
  6. package/lib/api.d.ts +1 -1
  7. package/lib/api.js +13 -13
  8. package/lib/binding.cjs +3 -3
  9. package/lib/binding.d.cts +2 -2
  10. package/lib/binding.d.ts +2 -2
  11. package/lib/binding.js +2 -2
  12. package/lib/bundle.cjs +17 -17
  13. package/lib/bundle.d.cts +1 -1
  14. package/lib/bundle.d.ts +1 -1
  15. package/lib/bundle.js +15 -15
  16. package/lib/{chunk-63TTSE4U.cjs → chunk-3ILNEP2F.cjs} +26 -26
  17. package/lib/{chunk-63TTSE4U.cjs.map → chunk-3ILNEP2F.cjs.map} +1 -1
  18. package/lib/{chunk-C6AOOHOR.cjs → chunk-3NDVX4SE.cjs} +4 -4
  19. package/lib/{chunk-C6AOOHOR.cjs.map → chunk-3NDVX4SE.cjs.map} +1 -1
  20. package/lib/{chunk-DTD2FIJ3.js → chunk-3PJNJ7B6.js} +3 -3
  21. package/lib/{chunk-DTD2FIJ3.js.map → chunk-3PJNJ7B6.js.map} +1 -1
  22. package/lib/{chunk-ELYBYKRM.cjs → chunk-6FB54J7W.cjs} +4 -4
  23. package/lib/chunk-6FB54J7W.cjs.map +1 -0
  24. package/lib/{chunk-5KN7B3T2.cjs → chunk-6MXIGF2G.cjs} +10 -10
  25. package/lib/{chunk-5KN7B3T2.cjs.map → chunk-6MXIGF2G.cjs.map} +1 -1
  26. package/lib/{chunk-YYHZPR4Z.js → chunk-7YEOUGXO.js} +3 -3
  27. package/lib/{chunk-YYHZPR4Z.js.map → chunk-7YEOUGXO.js.map} +1 -1
  28. package/lib/{chunk-E2ERI2EX.js → chunk-CWXGTX7W.js} +4 -4
  29. package/lib/{chunk-E2ERI2EX.js.map → chunk-CWXGTX7W.js.map} +1 -1
  30. package/lib/{chunk-HAZ53WDW.cjs → chunk-DYMRH6LP.cjs} +4 -4
  31. package/lib/{chunk-HAZ53WDW.cjs.map → chunk-DYMRH6LP.cjs.map} +1 -1
  32. package/lib/{chunk-FWF7HBWB.js → chunk-ECGUWRRG.js} +3 -3
  33. package/lib/{chunk-FWF7HBWB.js.map → chunk-ECGUWRRG.js.map} +1 -1
  34. package/lib/{chunk-F2RLD5SN.cjs → chunk-EVDEBFHZ.cjs} +13 -8
  35. package/lib/chunk-EVDEBFHZ.cjs.map +1 -0
  36. package/lib/{chunk-BWDFMGX6.cjs → chunk-FMHTNUZ4.cjs} +4 -4
  37. package/lib/{chunk-BWDFMGX6.cjs.map → chunk-FMHTNUZ4.cjs.map} +1 -1
  38. package/lib/{chunk-HOL7SMFN.cjs → chunk-FRLV5YFL.cjs} +4 -4
  39. package/lib/{chunk-HOL7SMFN.cjs.map → chunk-FRLV5YFL.cjs.map} +1 -1
  40. package/lib/{chunk-UYATAIX7.js → chunk-G4JBHI2H.js} +3 -3
  41. package/lib/{chunk-UYATAIX7.js.map → chunk-G4JBHI2H.js.map} +1 -1
  42. package/lib/{chunk-4Z4U45XQ.js → chunk-GHXKZEH7.js} +8 -3
  43. package/lib/chunk-GHXKZEH7.js.map +1 -0
  44. package/lib/{chunk-35GNS3WW.js → chunk-I4LPOTDO.js} +3 -3
  45. package/lib/{chunk-35GNS3WW.js.map → chunk-I4LPOTDO.js.map} +1 -1
  46. package/lib/{chunk-VAL4CE5R.js → chunk-IRFPCJTG.js} +3 -3
  47. package/lib/{chunk-VAL4CE5R.js.map → chunk-IRFPCJTG.js.map} +1 -1
  48. package/lib/{chunk-3XLKYXM6.cjs → chunk-KO4FQ4V2.cjs} +4 -4
  49. package/lib/{chunk-3XLKYXM6.cjs.map → chunk-KO4FQ4V2.cjs.map} +1 -1
  50. package/lib/{chunk-U2CAAK2J.js → chunk-KT6LCJJQ.js} +3 -3
  51. package/lib/{chunk-U2CAAK2J.js.map → chunk-KT6LCJJQ.js.map} +1 -1
  52. package/lib/{chunk-FOU52N6P.js → chunk-LTIWXCVE.js} +3 -3
  53. package/lib/{chunk-FOU52N6P.js.map → chunk-LTIWXCVE.js.map} +1 -1
  54. package/lib/{chunk-W6XILXYS.cjs → chunk-MHV7FMLE.cjs} +4 -4
  55. package/lib/{chunk-W6XILXYS.cjs.map → chunk-MHV7FMLE.cjs.map} +1 -1
  56. package/lib/{chunk-Z4IAVXOO.cjs → chunk-NDKGLF4B.cjs} +4 -4
  57. package/lib/{chunk-Z4IAVXOO.cjs.map → chunk-NDKGLF4B.cjs.map} +1 -1
  58. package/lib/{chunk-CFU5DNH2.cjs → chunk-OROPOAHK.cjs} +4 -4
  59. package/lib/{chunk-CFU5DNH2.cjs.map → chunk-OROPOAHK.cjs.map} +1 -1
  60. package/lib/{chunk-UB3WPGDV.js → chunk-SQLX22US.js} +3 -3
  61. package/lib/chunk-SQLX22US.js.map +1 -0
  62. package/lib/{chunk-3ELZDTFF.js → chunk-STPXKF53.js} +4 -4
  63. package/lib/{chunk-3ELZDTFF.js.map → chunk-STPXKF53.js.map} +1 -1
  64. package/lib/{chunk-RDLVNJEW.js → chunk-T2U6MUX4.js} +3 -3
  65. package/lib/{chunk-RDLVNJEW.js.map → chunk-T2U6MUX4.js.map} +1 -1
  66. package/lib/{chunk-CLOSZJSZ.cjs → chunk-TXONK7R5.cjs} +4 -4
  67. package/lib/{chunk-CLOSZJSZ.cjs.map → chunk-TXONK7R5.cjs.map} +1 -1
  68. package/lib/{chunk-WRVLCJQZ.cjs → chunk-TY46WNR6.cjs} +8 -8
  69. package/lib/{chunk-WRVLCJQZ.cjs.map → chunk-TY46WNR6.cjs.map} +1 -1
  70. package/lib/{chunk-7OPCEEJV.cjs → chunk-UILXNOZE.cjs} +4 -4
  71. package/lib/{chunk-7OPCEEJV.cjs.map → chunk-UILXNOZE.cjs.map} +1 -1
  72. package/lib/{chunk-GES5UXTI.js → chunk-WMUY7Z2Q.js} +3 -3
  73. package/lib/{chunk-GES5UXTI.js.map → chunk-WMUY7Z2Q.js.map} +1 -1
  74. package/lib/{chunk-3FP4NVLD.cjs → chunk-XS6QLJHG.cjs} +3 -3
  75. package/lib/chunk-XS6QLJHG.cjs.map +1 -0
  76. package/lib/{chunk-6I5KGZAU.js → chunk-YUNEDDTL.js} +14 -14
  77. package/lib/{chunk-6I5KGZAU.js.map → chunk-YUNEDDTL.js.map} +1 -1
  78. package/lib/{chunk-QRZGS4TB.js → chunk-ZWZHZ4SU.js} +3 -3
  79. package/lib/chunk-ZWZHZ4SU.js.map +1 -0
  80. package/lib/commercelayer.cjs +10 -10
  81. package/lib/commercelayer.d.cts +1 -1
  82. package/lib/commercelayer.d.ts +1 -1
  83. package/lib/commercelayer.js +4 -4
  84. package/lib/enum.d.cts +1 -1
  85. package/lib/enum.d.ts +1 -1
  86. package/lib/index.cjs +22 -22
  87. package/lib/index.cjs.map +1 -1
  88. package/lib/index.d.cts +1 -1
  89. package/lib/index.d.ts +1 -1
  90. package/lib/index.js +17 -17
  91. package/lib/index.js.map +1 -1
  92. package/lib/model.d.cts +1 -1
  93. package/lib/model.d.ts +1 -1
  94. package/lib/resources/api_credentials.cjs +5 -5
  95. package/lib/resources/api_credentials.d.cts +2 -2
  96. package/lib/resources/api_credentials.d.ts +1 -1
  97. package/lib/resources/api_credentials.js +4 -4
  98. package/lib/resources/application_memberships.cjs +5 -5
  99. package/lib/resources/application_memberships.d.cts +2 -2
  100. package/lib/resources/application_memberships.d.ts +1 -1
  101. package/lib/resources/application_memberships.js +4 -4
  102. package/lib/resources/identity_providers.cjs +5 -5
  103. package/lib/resources/identity_providers.d.cts +2 -2
  104. package/lib/resources/identity_providers.d.ts +1 -1
  105. package/lib/resources/identity_providers.js +4 -4
  106. package/lib/resources/membership_profiles.cjs +5 -5
  107. package/lib/resources/membership_profiles.d.cts +2 -2
  108. package/lib/resources/membership_profiles.d.ts +1 -1
  109. package/lib/resources/membership_profiles.js +4 -4
  110. package/lib/resources/memberships.cjs +5 -5
  111. package/lib/resources/memberships.d.cts +2 -2
  112. package/lib/resources/memberships.d.ts +1 -1
  113. package/lib/resources/memberships.js +4 -4
  114. package/lib/resources/organizations.cjs +5 -5
  115. package/lib/resources/organizations.d.cts +2 -2
  116. package/lib/resources/organizations.d.ts +1 -1
  117. package/lib/resources/organizations.js +4 -4
  118. package/lib/resources/permissions.cjs +5 -5
  119. package/lib/resources/permissions.d.cts +2 -2
  120. package/lib/resources/permissions.d.ts +1 -1
  121. package/lib/resources/permissions.js +4 -4
  122. package/lib/resources/roles.cjs +5 -5
  123. package/lib/resources/roles.d.cts +2 -2
  124. package/lib/resources/roles.d.ts +1 -1
  125. package/lib/resources/roles.js +4 -4
  126. package/lib/resources/users.cjs +5 -5
  127. package/lib/resources/users.d.cts +2 -2
  128. package/lib/resources/users.d.ts +1 -1
  129. package/lib/resources/users.js +4 -4
  130. package/lib/resources/versions.cjs +5 -5
  131. package/lib/resources/versions.d.cts +2 -2
  132. package/lib/resources/versions.d.ts +1 -1
  133. package/lib/resources/versions.js +4 -4
  134. package/lib/static.cjs +6 -6
  135. package/lib/static.d.cts +1 -1
  136. package/lib/static.d.ts +1 -1
  137. package/lib/static.js +5 -5
  138. package/lib/version.cjs +4 -4
  139. package/lib/version.js +1 -1
  140. package/package.json +10 -11
  141. package/lib/chunk-3FP4NVLD.cjs.map +0 -1
  142. package/lib/chunk-4Z4U45XQ.js.map +0 -1
  143. package/lib/chunk-ELYBYKRM.cjs.map +0 -1
  144. package/lib/chunk-F2RLD5SN.cjs.map +0 -1
  145. package/lib/chunk-QRZGS4TB.js.map +0 -1
  146. package/lib/chunk-UB3WPGDV.js.map +0 -1
@@ -1,19 +1,5 @@
1
1
  import { TransferOwnershipDataType } from './actions.js';
2
2
 
3
- type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
4
- type FetchResponse = any;
5
- type FetchRequestOptions = RequestInit;
6
- declare class FetchError extends Error {
7
- #private;
8
- static NAME: string;
9
- static isFetchError: (error: any) => error is FetchError;
10
- constructor(status: number, statusText: string, body?: any, request?: FetchRequestOptions);
11
- get errors(): any[] | undefined;
12
- get status(): number;
13
- get statusText(): string;
14
- get request(): Partial<FetchRequestOptions> | undefined;
15
- }
16
-
17
3
  type InterceptorEventManager<S extends RequestInterceptor | ResponseInterceptor, F extends ErrorInterceptor | ResponseInterceptor> = {
18
4
  onSuccess?: S;
19
5
  onFailure?: F;
@@ -49,158 +35,215 @@ type RawResponseReader = {
49
35
  ok: boolean;
50
36
  };
51
37
 
38
+ type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
39
+ type FetchResponse = any;
40
+ type FetchRequestOptions = RequestInit;
41
+ declare class FetchError extends Error {
42
+ #private;
43
+ static NAME: string;
44
+ static isFetchError: (error: any) => error is FetchError;
45
+ constructor(status: number, statusText: string, body?: any, request?: FetchRequestOptions);
46
+ get errors(): any[] | undefined;
47
+ get status(): number;
48
+ get statusText(): string;
49
+ get request(): Partial<FetchRequestOptions> | undefined;
50
+ }
51
+
52
+ type RequestParams = Record<string, string | number | boolean>;
53
+ type RequestHeaders = Record<string, string>;
54
+ type RefreshToken = (expiredToken: string) => Promise<string>;
55
+ type RequestConfig = {
56
+ timeout?: number;
57
+ params?: RequestParams;
58
+ headers?: RequestHeaders;
59
+ userAgent?: string;
60
+ fetch?: Fetch;
61
+ refreshToken?: RefreshToken;
62
+ telemetry?: boolean;
63
+ };
64
+ type ApiConfig = {
65
+ organization?: string;
66
+ domain?: string;
67
+ accessToken: string;
68
+ apiVersion?: string;
69
+ };
70
+ type ApiClientInitConfig = ApiConfig & RequestConfig;
71
+ type ApiClientConfig = Partial<ApiClientInitConfig>;
72
+ type Method = 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH';
73
+ declare class ApiClient {
74
+ #private;
75
+ static create(options: ApiClientInitConfig): ApiClient;
76
+ private constructor();
77
+ get interceptors(): InterceptorManager;
78
+ get requestHeaders(): RequestHeaders;
79
+ config(config: ApiClientConfig): this;
80
+ userAgent(userAgent: string): this;
81
+ request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<FetchResponse>;
82
+ private customHeaders;
83
+ get currentAccessToken(): string;
84
+ get currentOrganization(): string;
85
+ /** The API version pinned via `apiVersion`, or `undefined` when requests are unversioned. */
86
+ get currentApiVersion(): string | undefined;
87
+ }
88
+
52
89
  type ObjectType = Record<string, any>;
53
90
  type CreateArrayWithLengthX<LENGTH extends number, ACC extends unknown[] = []> = ACC['length'] extends LENGTH ? ACC : CreateArrayWithLengthX<LENGTH, [...ACC, 1]>;
54
91
  type NumericNumberRange<START_ARR extends number[], END extends number, ACC extends number = never> = START_ARR['length'] extends END ? ACC | END : NumericNumberRange<[...START_ARR, 1], END, ACC | START_ARR['length']>;
55
92
  type PositiveNumberRange<MAX extends number> = NumericNumberRange<CreateArrayWithLengthX<1>, MAX>;
56
93
  type StringKey<T> = Extract<keyof T, string>;
57
94
 
58
- type QueryResType<T extends Resource> = T['type'];
59
- type QueryInclude = string[];
60
- type QueryResourceFields<R extends ResourceTypeLock> = keyof ResourceFields[R];
61
- type QueryArrayFields<R extends Resource> = Array<QueryResourceFields<QueryResType<R>>>;
62
- type QueryRecordFields = {
63
- [key in keyof ResourceFields]?: Array<QueryResourceFields<key>>;
95
+ type ResourceNull = {
96
+ id: null;
97
+ } & ResourceType;
98
+ type ResourceRel = ResourceId | ResourceNull;
99
+ type Metadata = ObjectType;
100
+ interface ResourceType {
101
+ readonly type: ResourceTypeLock;
102
+ }
103
+ interface ResourceId extends ResourceType {
104
+ readonly id: string;
105
+ }
106
+ interface ResourceBase {
107
+ reference?: string | null;
108
+ reference_origin?: string | null;
109
+ metadata?: Metadata;
110
+ }
111
+ interface Resource extends ResourceBase, ResourceId {
112
+ readonly created_at: string;
113
+ readonly updated_at: string;
114
+ }
115
+ interface ResourceCreate extends ResourceBase {
116
+ }
117
+ interface ResourceUpdate extends ResourceBase {
118
+ readonly id: string;
119
+ }
120
+ /**
121
+ * Update payload for a singleton resource, which carries no `id` because it is
122
+ * addressed at a singular path (`/user`, not `/users/{id}`). Distinct from
123
+ * `ResourceUpdate` purely to keep `id` off the caller's payload.
124
+ */
125
+ interface SingletonUpdate extends ResourceBase {
126
+ }
127
+ type PageCursor = {
128
+ readonly before?: string;
129
+ readonly after?: string;
64
130
  };
65
- type QueryFields<R extends Resource> = QueryArrayFields<R> | QueryRecordFields;
66
- interface QueryParamsRetrieve<R extends Resource = Resource> {
67
- include?: QueryInclude;
68
- fields?: QueryFields<R>;
131
+ type ListMeta = {
132
+ readonly pageCount: number;
133
+ readonly recordCount: number;
134
+ readonly recordCountEstimated: boolean;
135
+ readonly currentPage: number;
136
+ readonly recordsPerPage: number;
137
+ readonly cursor?: {
138
+ readonly prev?: PageCursor;
139
+ readonly next?: PageCursor;
140
+ };
141
+ };
142
+ declare class ListResponse<R extends Resource = Resource> extends Array<R> {
143
+ readonly meta: ListMeta;
144
+ constructor(meta: ListMeta, data: R[]);
145
+ first(): R | undefined;
146
+ last(): R | undefined;
147
+ get(index: number): R | undefined;
148
+ hasNextPage(): boolean;
149
+ hasPrevPage(): boolean;
150
+ getRecordCount(): number;
151
+ getRecordCountEstimated(): boolean;
152
+ getPageCount(): number;
153
+ get recordCount(): number;
154
+ get pageCount(): number;
69
155
  }
70
- type QuerySortType = 'asc' | 'desc';
71
- type QueryResourceSortable<R extends Resource> = ResourceSortFields[QueryResType<R>];
72
- type QueryResourceSortableFields<R extends Resource> = StringKey<QueryResourceSortable<R>>;
73
- type QueryArraySortable<R extends Resource> = Array<QueryResourceSortableFields<R> | `-${QueryResourceSortableFields<R>}`>;
74
- type QueryRecordSortable<R extends Resource> = Partial<Record<keyof QueryResourceSortable<R>, QuerySortType>>;
75
- type QuerySort<R extends Resource> = QueryArraySortable<R> | QueryRecordSortable<R>;
76
- type QueryFilter = Record<string, string | number | boolean | object | Array<string | number>>;
77
- type QueryPageNumber = number;
78
- type QueryPageSize = PositiveNumberRange<25>;
79
- type QueryPageCursor = string;
80
- interface QueryParamsList<R extends Resource = Resource> extends QueryParamsRetrieve<R> {
81
- sort?: QuerySort<R>;
82
- filters?: QueryFilter;
83
- pageNumber?: QueryPageNumber;
84
- pageSize?: QueryPageSize;
156
+
157
+ type ResourceSort = Pick<Resource, 'id' | 'reference' | 'reference_origin' | 'created_at' | 'updated_at'>;
158
+ type ResourceFilter = Pick<Resource, 'id' | 'reference' | 'reference_origin' | 'metadata' | 'created_at' | 'updated_at'>;
159
+ type ResourceAdapterConfig = {};
160
+ type ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig;
161
+ type ResourcesConfig = Partial<ResourcesInitConfig>;
162
+ declare class ResourceAdapter {
163
+ #private;
164
+ constructor(config: ResourcesInitConfig);
165
+ private localConfig;
166
+ config(config: ResourcesConfig): this;
167
+ get client(): Readonly<ApiClient>;
168
+ singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig, path?: string): Promise<R>;
169
+ retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
170
+ list<R extends Resource>(resource: ResourceType, params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>>;
171
+ create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
172
+ update<U extends ResourceUpdate | SingletonUpdate, R extends Resource>(resource: U & ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig,
85
173
  /**
86
- * Cursor for cursor-based pagination — returns the records after the given cursor.
87
- * Only cursor-paginated resources (e.g. `event_stores`) honor it; offset-paginated
88
- * resources ignore it. Emitted as the `page[after]` query parameter.
174
+ * Singular path override for singleton resources, e.g. `user` rather than
175
+ * `users/{id}`. Mirrors `singleton()` above. Core never needed it — both
176
+ * its singletons are retrieve-only — but the Provisioning API's `user` is
177
+ * updatable, and without this the request targets `/users/{id}` and 404s.
89
178
  */
90
- pageAfter?: QueryPageCursor;
179
+ path?: string): Promise<R>;
180
+ delete(resource: ResourceId, options?: ResourcesConfig): Promise<void>;
91
181
  /**
92
- * Cursor for cursor-based pagination — returns the records before the given cursor.
93
- * Only cursor-paginated resources honor it; offset-paginated resources ignore it.
94
- * Emitted as the `page[before]` query parameter.
182
+ * Calls a non-CRUD endpoint hosted at a sub-path of a resource, e.g.
183
+ * `POST memberships/:id/resend`. These endpoints are not described by the
184
+ * public resources schema, so they are declared in a target config and
185
+ * emitted from it.
95
186
  */
96
- pageBefore?: QueryPageCursor;
187
+ action(cmd: Extract<Method, 'POST' | 'PATCH'>, path: string, payload?: any, options?: ResourcesConfig): Promise<void>;
188
+ fetch<R extends Resource>(resource: string | ResourceType, path: string, params?: QueryParams<R>, options?: ResourcesConfig): Promise<R | ListResponse<R>>;
189
+ }
190
+ declare abstract class ApiResourceBase<R extends Resource> {
191
+ #private;
192
+ static readonly TYPE: ResourceTypeLock;
193
+ constructor(adapter?: ResourceAdapter);
194
+ protected get resources(): ResourceAdapter;
195
+ /**
196
+ * Returns a copy of this resource instance bound to a specific
197
+ * `ResourceAdapter`. Used by the bundle client so each client instance
198
+ * routes requests through its own adapter (its own access token) instead
199
+ * of the process-global static adapter. Resource classes are type-only
200
+ * exports, so we clone via `this.constructor` rather than referencing the
201
+ * class directly.
202
+ */
203
+ withAdapter(adapter: ResourceAdapter): this;
204
+ abstract relationship(id: string | ResourceId | null): ResourceRel;
205
+ protected relationshipOneToOne<RR extends ResourceRel>(id: string | ResourceId | null): RR;
206
+ protected relationshipOneToMany<RR extends ResourceRel>(...ids: string[]): RR[];
207
+ abstract type(): ResourceTypeLock;
208
+ protected path(): string;
209
+ update(resource: ResourceUpdate, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
210
+ }
211
+ declare abstract class ApiResource<R extends Resource> extends ApiResourceBase<R> {
212
+ retrieve(id: string | ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
213
+ list(params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>>;
214
+ count(filter?: QueryFilter | QueryParamsList<R>, options?: ResourcesConfig): Promise<number>;
215
+ }
216
+ declare abstract class ApiSingleton<R extends Resource> extends ApiResourceBase<R> {
217
+ retrieve(params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
97
218
  }
98
- type QueryParams<R extends Resource = Resource> = QueryParamsRetrieve<R> | QueryParamsList<R>;
99
219
 
100
- type MembershipProfileType = 'membership_profiles';
101
- type MembershipProfileRel$2 = ResourceRel & {
102
- type: MembershipProfileType;
103
- };
104
- type OrganizationRel$5 = ResourceRel & {
105
- type: OrganizationType;
106
- };
107
- type ApplicationMembershipRel$2 = ResourceRel & {
108
- type: ApplicationMembershipType;
220
+ type VersionType = 'versions';
221
+ type VersionRel = ResourceRel & {
222
+ type: VersionType;
109
223
  };
110
- type MembershipProfileSort = Pick<MembershipProfile, 'id' | 'name'> & ResourceSort;
224
+ type VersionSort = Pick<Version, 'id'> & ResourceSort;
111
225
  /**
112
- * The Membership profile object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/membership_profiles endpoint.
226
+ * The Version object is returned as part of the response body of each successful list or retrieve API call to the /api/versions endpoint.
113
227
  *
114
- * @link https://docs.commercelayer.io/provisioning-api-reference/membership_profiles/object
228
+ * @link https://docs.commercelayer.io/provisioning-api-reference/versions/object
115
229
  */
116
- interface MembershipProfile extends Resource {
117
- readonly type: MembershipProfileType;
230
+ interface Version extends Resource {
231
+ readonly type: VersionType;
118
232
  /**
119
- * The membership profile name.
120
- * @example ```"Marketing group"```
233
+ * The type of the versioned resource.
234
+ * @example ```"roles"```
121
235
  */
122
- name: string;
236
+ resource_type?: string | null;
123
237
  /**
124
- * Reflects the organization's access scope, either test_access or all_access.
125
- * @example ```true```
238
+ * The versioned resource ID.
239
+ * @example ```"PzdJhdLdYV"```
126
240
  */
127
- test_enabled?: boolean | null;
241
+ resource_id?: string | null;
128
242
  /**
129
- * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.
130
- * @example ```"live_access"```
243
+ * The event which generates the version.
244
+ * @example ```"update"```
131
245
  */
132
- access_scope: 'live_access' | 'test_access' | 'all_access';
133
- organization?: Organization | null;
134
- application_memberships?: ApplicationMembership[] | null;
135
- }
136
- interface MembershipProfileCreate extends ResourceCreate {
137
- /**
138
- * The membership profile name.
139
- * @example ```"Marketing group"```
140
- */
141
- name: string;
142
- /**
143
- * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.
144
- * @example ```"live_access"```
145
- */
146
- access_scope: 'live_access' | 'test_access' | 'all_access';
147
- organization: OrganizationRel$5;
148
- application_memberships?: ApplicationMembershipRel$2[] | null;
149
- }
150
- interface MembershipProfileUpdate extends ResourceUpdate {
151
- /**
152
- * The membership profile name.
153
- * @example ```"Marketing group"```
154
- */
155
- name?: string | null;
156
- /**
157
- * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.
158
- * @example ```"live_access"```
159
- */
160
- access_scope?: 'live_access' | 'test_access' | 'all_access' | null;
161
- application_memberships?: ApplicationMembershipRel$2[] | null;
162
- }
163
- declare class MembershipProfiles extends ApiResource<MembershipProfile> {
164
- static readonly TYPE: MembershipProfileType;
165
- create(resource: MembershipProfileCreate, params?: QueryParamsRetrieve<MembershipProfile>, options?: ResourcesConfig): Promise<MembershipProfile>;
166
- update(resource: MembershipProfileUpdate, params?: QueryParamsRetrieve<MembershipProfile>, options?: ResourcesConfig): Promise<MembershipProfile>;
167
- delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
168
- organization(membershipProfileId: string | MembershipProfile, params?: QueryParamsRetrieve<Organization>, options?: ResourcesConfig): Promise<Organization>;
169
- application_memberships(membershipProfileId: string | MembershipProfile, params?: QueryParamsList<ApplicationMembership>, options?: ResourcesConfig): Promise<ListResponse<ApplicationMembership>>;
170
- isMembershipProfile(resource: any): resource is MembershipProfile;
171
- relationship(id: string | ResourceId | null): MembershipProfileRel$2;
172
- relationshipToMany(...ids: string[]): MembershipProfileRel$2[];
173
- type(): MembershipProfileType;
174
- }
175
- declare const instance$9: MembershipProfiles;
176
-
177
- type VersionType = 'versions';
178
- type VersionRel = ResourceRel & {
179
- type: VersionType;
180
- };
181
- type VersionSort = Pick<Version, 'id'> & ResourceSort;
182
- /**
183
- * The Version object is returned as part of the response body of each successful list or retrieve API call to the /api/versions endpoint.
184
- *
185
- * @link https://docs.commercelayer.io/provisioning-api-reference/versions/object
186
- */
187
- interface Version extends Resource {
188
- readonly type: VersionType;
189
- /**
190
- * The type of the versioned resource.
191
- * @example ```"roles"```
192
- */
193
- resource_type?: string | null;
194
- /**
195
- * The versioned resource ID.
196
- * @example ```"PzdJhdLdYV"```
197
- */
198
- resource_id?: string | null;
199
- /**
200
- * The event which generates the version.
201
- * @example ```"update"```
202
- */
203
- event?: string | null;
246
+ event?: string | null;
204
247
  /**
205
248
  * The object changes payload.
206
249
  * @example ```{"name":["previous","new"]}```
@@ -219,7 +262,7 @@ declare class Versions extends ApiResource<Version> {
219
262
  relationshipToMany(...ids: string[]): VersionRel[];
220
263
  type(): VersionType;
221
264
  }
222
- declare const instance$8: Versions;
265
+ declare const instance$9: Versions;
223
266
 
224
267
  type PermissionType = 'permissions';
225
268
  type PermissionRel = ResourceRel & {
@@ -318,13 +361,13 @@ declare class Permissions extends ApiResource<Permission> {
318
361
  relationshipToMany(...ids: string[]): PermissionRel[];
319
362
  type(): PermissionType;
320
363
  }
321
- declare const instance$7: Permissions;
364
+ declare const instance$8: Permissions;
322
365
 
323
366
  type RoleType = 'roles';
324
367
  type RoleRel$3 = ResourceRel & {
325
368
  type: RoleType;
326
369
  };
327
- type OrganizationRel$4 = ResourceRel & {
370
+ type OrganizationRel$5 = ResourceRel & {
328
371
  type: OrganizationType;
329
372
  };
330
373
  type RoleSort = Pick<Role, 'id' | 'name'> & ResourceSort;
@@ -357,7 +400,7 @@ interface RoleCreate extends ResourceCreate {
357
400
  * @example ```"Custom role"```
358
401
  */
359
402
  name: string;
360
- organization: OrganizationRel$4;
403
+ organization: OrganizationRel$5;
361
404
  }
362
405
  interface RoleUpdate extends ResourceUpdate {
363
406
  /**
@@ -386,98 +429,22 @@ declare class Roles extends ApiResource<Role> {
386
429
  relationshipToMany(...ids: string[]): RoleRel$3[];
387
430
  type(): RoleType;
388
431
  }
389
- declare const instance$6: Roles;
432
+ declare const instance$7: Roles;
390
433
 
391
- type ApplicationMembershipType = 'application_memberships';
392
- type ApplicationMembershipRel$1 = ResourceRel & {
393
- type: ApplicationMembershipType;
394
- };
395
- type ApiCredentialRel$1 = ResourceRel & {
396
- type: ApiCredentialType;
397
- };
434
+ type MembershipType = 'memberships';
398
435
  type MembershipRel$1 = ResourceRel & {
399
436
  type: MembershipType;
400
437
  };
401
- type MembershipProfileRel$1 = ResourceRel & {
402
- type: MembershipProfileType;
403
- };
404
- type OrganizationRel$3 = ResourceRel & {
438
+ type OrganizationRel$4 = ResourceRel & {
405
439
  type: OrganizationType;
406
440
  };
407
441
  type RoleRel$2 = ResourceRel & {
408
442
  type: RoleType;
409
443
  };
410
- type ApplicationMembershipSort = Pick<ApplicationMembership, 'id'> & ResourceSort;
411
- /**
412
- * The Application membership object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/application_memberships endpoint.
413
- *
414
- * @link https://docs.commercelayer.io/provisioning-api-reference/application_memberships/object
415
- */
416
- interface ApplicationMembership extends Resource {
417
- readonly type: ApplicationMembershipType;
418
- /**
419
- * Set of key-value pairs that contains restrictions and scopes of the application membership.
420
- * @example ```{"market_id_in":[202,203]}```
421
- */
422
- filters?: Record<string, any> | null;
423
- api_credential?: ApiCredential | null;
424
- membership?: Membership | null;
425
- membership_profile?: MembershipProfile | null;
426
- organization?: Organization | null;
427
- role?: Role | null;
428
- }
429
- interface ApplicationMembershipCreate extends ResourceCreate {
430
- /**
431
- * Set of key-value pairs that contains restrictions and scopes of the application membership.
432
- * @example ```{"market_id_in":[202,203]}```
433
- */
434
- filters?: Record<string, any> | null;
435
- api_credential: ApiCredentialRel$1;
436
- membership?: MembershipRel$1 | null;
437
- membership_profile?: MembershipProfileRel$1 | null;
438
- organization: OrganizationRel$3;
439
- role: RoleRel$2;
440
- }
441
- interface ApplicationMembershipUpdate extends ResourceUpdate {
442
- /**
443
- * Set of key-value pairs that contains restrictions and scopes of the application membership.
444
- * @example ```{"market_id_in":[202,203]}```
445
- */
446
- filters?: Record<string, any> | null;
447
- membership_profile?: MembershipProfileRel$1 | null;
448
- role?: RoleRel$2 | null;
449
- }
450
- declare class ApplicationMemberships extends ApiResource<ApplicationMembership> {
451
- static readonly TYPE: ApplicationMembershipType;
452
- create(resource: ApplicationMembershipCreate, params?: QueryParamsRetrieve<ApplicationMembership>, options?: ResourcesConfig): Promise<ApplicationMembership>;
453
- update(resource: ApplicationMembershipUpdate, params?: QueryParamsRetrieve<ApplicationMembership>, options?: ResourcesConfig): Promise<ApplicationMembership>;
454
- delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
455
- api_credential(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<ApiCredential>, options?: ResourcesConfig): Promise<ApiCredential>;
456
- membership(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<Membership>, options?: ResourcesConfig): Promise<Membership>;
457
- membership_profile(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<MembershipProfile>, options?: ResourcesConfig): Promise<MembershipProfile>;
458
- organization(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<Organization>, options?: ResourcesConfig): Promise<Organization>;
459
- role(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<Role>, options?: ResourcesConfig): Promise<Role>;
460
- isApplicationMembership(resource: any): resource is ApplicationMembership;
461
- relationship(id: string | ResourceId | null): ApplicationMembershipRel$1;
462
- relationshipToMany(...ids: string[]): ApplicationMembershipRel$1[];
463
- type(): ApplicationMembershipType;
464
- }
465
- declare const instance$5: ApplicationMemberships;
466
-
467
- type MembershipType = 'memberships';
468
- type MembershipRel = ResourceRel & {
469
- type: MembershipType;
470
- };
471
- type OrganizationRel$2 = ResourceRel & {
472
- type: OrganizationType;
473
- };
474
- type RoleRel$1 = ResourceRel & {
475
- type: RoleType;
476
- };
477
- type ApplicationMembershipRel = ResourceRel & {
444
+ type ApplicationMembershipRel$2 = ResourceRel & {
478
445
  type: ApplicationMembershipType;
479
446
  };
480
- type MembershipProfileRel = ResourceRel & {
447
+ type MembershipProfileRel$2 = ResourceRel & {
481
448
  type: MembershipProfileType;
482
449
  };
483
450
  type MembershipSort = Pick<Membership, 'id' | 'status'> & ResourceSort;
@@ -540,10 +507,10 @@ interface MembershipCreate extends ResourceCreate {
540
507
  * @example ```"live_access"```
541
508
  */
542
509
  access_scope?: 'live_access' | 'test_access' | 'all_access' | null;
543
- organization: OrganizationRel$2;
544
- role: RoleRel$1;
545
- application_memberships?: ApplicationMembershipRel[] | null;
546
- membership_profile?: MembershipProfileRel | null;
510
+ organization: OrganizationRel$4;
511
+ role: RoleRel$2;
512
+ application_memberships?: ApplicationMembershipRel$2[] | null;
513
+ membership_profile?: MembershipProfileRel$2 | null;
547
514
  }
548
515
  interface MembershipUpdate extends ResourceUpdate {
549
516
  /**
@@ -551,9 +518,9 @@ interface MembershipUpdate extends ResourceUpdate {
551
518
  * @example ```"live_access"```
552
519
  */
553
520
  access_scope?: 'live_access' | 'test_access' | 'all_access' | null;
554
- role?: RoleRel$1 | null;
555
- application_memberships?: ApplicationMembershipRel[] | null;
556
- membership_profile?: MembershipProfileRel | null;
521
+ role?: RoleRel$2 | null;
522
+ application_memberships?: ApplicationMembershipRel$2[] | null;
523
+ membership_profile?: MembershipProfileRel$2 | null;
557
524
  }
558
525
  declare class Memberships extends ApiResource<Membership> {
559
526
  static readonly TYPE: MembershipType;
@@ -567,14 +534,14 @@ declare class Memberships extends ApiResource<Membership> {
567
534
  versions(membershipId: string | Membership, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
568
535
  resend(membershipId: string | Membership, options?: ResourcesConfig): Promise<void>;
569
536
  isMembership(resource: any): resource is Membership;
570
- relationship(id: string | ResourceId | null): MembershipRel;
571
- relationshipToMany(...ids: string[]): MembershipRel[];
537
+ relationship(id: string | ResourceId | null): MembershipRel$1;
538
+ relationshipToMany(...ids: string[]): MembershipRel$1[];
572
539
  type(): MembershipType;
573
540
  }
574
- declare const instance$4: Memberships;
541
+ declare const instance$6: Memberships;
575
542
 
576
543
  type OrganizationType = 'organizations';
577
- type OrganizationRel$1 = ResourceRel & {
544
+ type OrganizationRel$3 = ResourceRel & {
578
545
  type: OrganizationType;
579
546
  };
580
547
  type OrganizationSort = Pick<Organization, 'id' | 'name' | 'slug' | 'domain'> & ResourceSort;
@@ -1007,146 +974,164 @@ declare class Organizations extends ApiResource<Organization> {
1007
974
  api_credentials(organizationId: string | Organization, params?: QueryParamsList<ApiCredential>, options?: ResourcesConfig): Promise<ListResponse<ApiCredential>>;
1008
975
  transfer_ownership(organizationId: string | Organization, payload: TransferOwnershipDataType, options?: ResourcesConfig): Promise<void>;
1009
976
  isOrganization(resource: any): resource is Organization;
1010
- relationship(id: string | ResourceId | null): OrganizationRel$1;
1011
- relationshipToMany(...ids: string[]): OrganizationRel$1[];
977
+ relationship(id: string | ResourceId | null): OrganizationRel$3;
978
+ relationshipToMany(...ids: string[]): OrganizationRel$3[];
1012
979
  type(): OrganizationType;
1013
980
  }
1014
- declare const instance$3: Organizations;
981
+ declare const instance$5: Organizations;
1015
982
 
1016
- type ApiCredentialType = 'api_credentials';
1017
- type ApiCredentialRel = ResourceRel & {
1018
- type: ApiCredentialType;
983
+ type MembershipProfileType = 'membership_profiles';
984
+ type MembershipProfileRel$1 = ResourceRel & {
985
+ type: MembershipProfileType;
1019
986
  };
1020
- type OrganizationRel = ResourceRel & {
987
+ type OrganizationRel$2 = ResourceRel & {
1021
988
  type: OrganizationType;
1022
989
  };
1023
- type RoleRel = ResourceRel & {
1024
- type: RoleType;
990
+ type ApplicationMembershipRel$1 = ResourceRel & {
991
+ type: ApplicationMembershipType;
1025
992
  };
1026
- type ApiCredentialSort = Pick<ApiCredential, 'id' | 'name' | 'mode'> & ResourceSort;
993
+ type MembershipProfileSort = Pick<MembershipProfile, 'id' | 'name'> & ResourceSort;
1027
994
  /**
1028
- * The Api credential object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/api_credentials endpoint.
995
+ * The Membership profile object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/membership_profiles endpoint.
1029
996
  *
1030
- * @link https://docs.commercelayer.io/provisioning-api-reference/api_credentials/object
997
+ * @link https://docs.commercelayer.io/provisioning-api-reference/membership_profiles/object
1031
998
  */
1032
- interface ApiCredential extends Resource {
1033
- readonly type: ApiCredentialType;
999
+ interface MembershipProfile extends Resource {
1000
+ readonly type: MembershipProfileType;
1034
1001
  /**
1035
- * The API credential internal name.
1036
- * @example ```"My app"```
1002
+ * The membership profile name.
1003
+ * @example ```"Marketing group"```
1037
1004
  */
1038
1005
  name: string;
1039
1006
  /**
1040
- * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).
1041
- * @example ```"sales_channel"```
1042
- */
1043
- kind: string;
1044
- /**
1045
- * Indicates if the API credential it's confidential.
1007
+ * Reflects the organization's access scope, either test_access or all_access.
1046
1008
  * @example ```true```
1047
1009
  */
1048
- confidential?: boolean | null;
1049
- /**
1050
- * The API credential redirect URI.
1051
- * @example ```"https://bluebrand.com/img/logo.svg"```
1052
- */
1053
- redirect_uri?: string | null;
1054
- /**
1055
- * The API credential unique ID.
1056
- * @example ```"xxxx-yyyy-zzzz"```
1057
- */
1058
- client_id?: string | null;
1059
- /**
1060
- * The API credential unique secret.
1061
- * @example ```"xxxx-yyyy-zzzz"```
1062
- */
1063
- client_secret?: string | null;
1064
- /**
1065
- * The API credential scopes.
1066
- * @example ```"market:all market:9 market:122 market:6 stock_location:6 stock_location:33"```
1067
- */
1068
- scopes?: string | null;
1069
- /**
1070
- * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
1071
- * @example ```7200```
1072
- */
1073
- expires_in?: number | null;
1074
- /**
1075
- * Indicates the environment the resource belongs to (one of `test` or `live`).
1076
- * @example ```"test"```
1077
- */
1078
- mode?: string | null;
1010
+ test_enabled?: boolean | null;
1079
1011
  /**
1080
- * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).
1012
+ * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.
1013
+ * @example ```"live_access"```
1081
1014
  */
1082
- custom?: boolean | null;
1015
+ access_scope: 'live_access' | 'test_access' | 'all_access';
1083
1016
  organization?: Organization | null;
1084
- role?: Role | null;
1017
+ application_memberships?: ApplicationMembership[] | null;
1085
1018
  }
1086
- interface ApiCredentialCreate extends ResourceCreate {
1019
+ interface MembershipProfileCreate extends ResourceCreate {
1087
1020
  /**
1088
- * The API credential internal name.
1089
- * @example ```"My app"```
1021
+ * The membership profile name.
1022
+ * @example ```"Marketing group"```
1090
1023
  */
1091
1024
  name: string;
1092
1025
  /**
1093
- * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).
1094
- * @example ```"sales_channel"```
1095
- */
1096
- kind: string;
1097
- /**
1098
- * The API credential redirect URI.
1099
- * @example ```"https://bluebrand.com/img/logo.svg"```
1026
+ * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.
1027
+ * @example ```"live_access"```
1100
1028
  */
1101
- redirect_uri?: string | null;
1029
+ access_scope: 'live_access' | 'test_access' | 'all_access';
1030
+ organization: OrganizationRel$2;
1031
+ application_memberships?: ApplicationMembershipRel$1[] | null;
1032
+ }
1033
+ interface MembershipProfileUpdate extends ResourceUpdate {
1102
1034
  /**
1103
- * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
1104
- * @example ```7200```
1035
+ * The membership profile name.
1036
+ * @example ```"Marketing group"```
1105
1037
  */
1106
- expires_in?: number | null;
1038
+ name?: string | null;
1107
1039
  /**
1108
- * Indicates the environment the resource belongs to (one of `test` or `live`).
1109
- * @example ```"test"```
1040
+ * The access scope for applications. One of `live_access` (default), `test_access`, `all_access`.
1041
+ * @example ```"live_access"```
1110
1042
  */
1111
- mode?: string | null;
1112
- /**
1113
- * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).
1114
- */
1115
- custom?: boolean | null;
1116
- organization: OrganizationRel;
1117
- role?: RoleRel | null;
1043
+ access_scope?: 'live_access' | 'test_access' | 'all_access' | null;
1044
+ application_memberships?: ApplicationMembershipRel$1[] | null;
1118
1045
  }
1119
- interface ApiCredentialUpdate extends ResourceUpdate {
1046
+ declare class MembershipProfiles extends ApiResource<MembershipProfile> {
1047
+ static readonly TYPE: MembershipProfileType;
1048
+ create(resource: MembershipProfileCreate, params?: QueryParamsRetrieve<MembershipProfile>, options?: ResourcesConfig): Promise<MembershipProfile>;
1049
+ update(resource: MembershipProfileUpdate, params?: QueryParamsRetrieve<MembershipProfile>, options?: ResourcesConfig): Promise<MembershipProfile>;
1050
+ delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
1051
+ organization(membershipProfileId: string | MembershipProfile, params?: QueryParamsRetrieve<Organization>, options?: ResourcesConfig): Promise<Organization>;
1052
+ application_memberships(membershipProfileId: string | MembershipProfile, params?: QueryParamsList<ApplicationMembership>, options?: ResourcesConfig): Promise<ListResponse<ApplicationMembership>>;
1053
+ isMembershipProfile(resource: any): resource is MembershipProfile;
1054
+ relationship(id: string | ResourceId | null): MembershipProfileRel$1;
1055
+ relationshipToMany(...ids: string[]): MembershipProfileRel$1[];
1056
+ type(): MembershipProfileType;
1057
+ }
1058
+ declare const instance$4: MembershipProfiles;
1059
+
1060
+ type ApplicationMembershipType = 'application_memberships';
1061
+ type ApplicationMembershipRel = ResourceRel & {
1062
+ type: ApplicationMembershipType;
1063
+ };
1064
+ type ApiCredentialRel$1 = ResourceRel & {
1065
+ type: ApiCredentialType;
1066
+ };
1067
+ type MembershipRel = ResourceRel & {
1068
+ type: MembershipType;
1069
+ };
1070
+ type MembershipProfileRel = ResourceRel & {
1071
+ type: MembershipProfileType;
1072
+ };
1073
+ type OrganizationRel$1 = ResourceRel & {
1074
+ type: OrganizationType;
1075
+ };
1076
+ type RoleRel$1 = ResourceRel & {
1077
+ type: RoleType;
1078
+ };
1079
+ type ApplicationMembershipSort = Pick<ApplicationMembership, 'id'> & ResourceSort;
1080
+ /**
1081
+ * The Application membership object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/application_memberships endpoint.
1082
+ *
1083
+ * @link https://docs.commercelayer.io/provisioning-api-reference/application_memberships/object
1084
+ */
1085
+ interface ApplicationMembership extends Resource {
1086
+ readonly type: ApplicationMembershipType;
1120
1087
  /**
1121
- * The API credential internal name.
1122
- * @example ```"My app"```
1088
+ * Set of key-value pairs that contains restrictions and scopes of the application membership.
1089
+ * @example ```{"market_id_in":[202,203]}```
1123
1090
  */
1124
- name?: string | null;
1091
+ filters?: Record<string, any> | null;
1092
+ api_credential?: ApiCredential | null;
1093
+ membership?: Membership | null;
1094
+ membership_profile?: MembershipProfile | null;
1095
+ organization?: Organization | null;
1096
+ role?: Role | null;
1097
+ }
1098
+ interface ApplicationMembershipCreate extends ResourceCreate {
1125
1099
  /**
1126
- * The API credential redirect URI.
1127
- * @example ```"https://bluebrand.com/img/logo.svg"```
1100
+ * Set of key-value pairs that contains restrictions and scopes of the application membership.
1101
+ * @example ```{"market_id_in":[202,203]}```
1128
1102
  */
1129
- redirect_uri?: string | null;
1103
+ filters?: Record<string, any> | null;
1104
+ api_credential: ApiCredentialRel$1;
1105
+ membership?: MembershipRel | null;
1106
+ membership_profile?: MembershipProfileRel | null;
1107
+ organization: OrganizationRel$1;
1108
+ role: RoleRel$1;
1109
+ }
1110
+ interface ApplicationMembershipUpdate extends ResourceUpdate {
1130
1111
  /**
1131
- * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
1132
- * @example ```7200```
1112
+ * Set of key-value pairs that contains restrictions and scopes of the application membership.
1113
+ * @example ```{"market_id_in":[202,203]}```
1133
1114
  */
1134
- expires_in?: number | null;
1135
- role?: RoleRel | null;
1115
+ filters?: Record<string, any> | null;
1116
+ membership_profile?: MembershipProfileRel | null;
1117
+ role?: RoleRel$1 | null;
1136
1118
  }
1137
- declare class ApiCredentials extends ApiResource<ApiCredential> {
1138
- static readonly TYPE: ApiCredentialType;
1139
- create(resource: ApiCredentialCreate, params?: QueryParamsRetrieve<ApiCredential>, options?: ResourcesConfig): Promise<ApiCredential>;
1140
- update(resource: ApiCredentialUpdate, params?: QueryParamsRetrieve<ApiCredential>, options?: ResourcesConfig): Promise<ApiCredential>;
1119
+ declare class ApplicationMemberships extends ApiResource<ApplicationMembership> {
1120
+ static readonly TYPE: ApplicationMembershipType;
1121
+ create(resource: ApplicationMembershipCreate, params?: QueryParamsRetrieve<ApplicationMembership>, options?: ResourcesConfig): Promise<ApplicationMembership>;
1122
+ update(resource: ApplicationMembershipUpdate, params?: QueryParamsRetrieve<ApplicationMembership>, options?: ResourcesConfig): Promise<ApplicationMembership>;
1141
1123
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
1142
- organization(apiCredentialId: string | ApiCredential, params?: QueryParamsRetrieve<Organization>, options?: ResourcesConfig): Promise<Organization>;
1143
- role(apiCredentialId: string | ApiCredential, params?: QueryParamsRetrieve<Role>, options?: ResourcesConfig): Promise<Role>;
1144
- isApiCredential(resource: any): resource is ApiCredential;
1145
- relationship(id: string | ResourceId | null): ApiCredentialRel;
1146
- relationshipToMany(...ids: string[]): ApiCredentialRel[];
1147
- type(): ApiCredentialType;
1124
+ api_credential(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<ApiCredential>, options?: ResourcesConfig): Promise<ApiCredential>;
1125
+ membership(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<Membership>, options?: ResourcesConfig): Promise<Membership>;
1126
+ membership_profile(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<MembershipProfile>, options?: ResourcesConfig): Promise<MembershipProfile>;
1127
+ organization(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<Organization>, options?: ResourcesConfig): Promise<Organization>;
1128
+ role(applicationMembershipId: string | ApplicationMembership, params?: QueryParamsRetrieve<Role>, options?: ResourcesConfig): Promise<Role>;
1129
+ isApplicationMembership(resource: any): resource is ApplicationMembership;
1130
+ relationship(id: string | ResourceId | null): ApplicationMembershipRel;
1131
+ relationshipToMany(...ids: string[]): ApplicationMembershipRel[];
1132
+ type(): ApplicationMembershipType;
1148
1133
  }
1149
- declare const instance$2: ApiCredentials;
1134
+ declare const instance$3: ApplicationMemberships;
1150
1135
 
1151
1136
  type UserType = 'users';
1152
1137
  type UserRel = ResourceRel & {
@@ -1186,7 +1171,7 @@ interface User extends Resource {
1186
1171
  */
1187
1172
  otp_required_for_login?: boolean | null;
1188
1173
  }
1189
- interface UserUpdate extends ResourceUpdate {
1174
+ interface UserUpdate extends SingletonUpdate {
1190
1175
  /**
1191
1176
  * The user email.
1192
1177
  * @example ```"user@commercelayer.io"```
@@ -1217,7 +1202,7 @@ declare class Users extends ApiSingleton<User> {
1217
1202
  type(): UserType;
1218
1203
  path(): string;
1219
1204
  }
1220
- declare const instance$1: Users;
1205
+ declare const instance$2: Users;
1221
1206
 
1222
1207
  type IdentityProviderType = 'identity_providers';
1223
1208
  type IdentityProviderRel = ResourceRel & {
@@ -1420,7 +1405,7 @@ declare class IdentityProviders extends ApiResource<IdentityProvider> {
1420
1405
  relationshipToMany(...ids: string[]): IdentityProviderRel[];
1421
1406
  type(): IdentityProviderType;
1422
1407
  }
1423
- declare const instance: IdentityProviders;
1408
+ declare const instance$1: IdentityProviders;
1424
1409
 
1425
1410
  declare const apiResources: readonly ["api_credentials", "application_memberships", "identity_providers", "memberships", "membership_profiles", "organizations", "permissions", "roles", "users", "versions"];
1426
1411
  type ResourceTypeLock = (typeof apiResources)[number];
@@ -1480,157 +1465,181 @@ type ResourceSortFields = {
1480
1465
  versions: VersionSort;
1481
1466
  };
1482
1467
 
1483
- type RequestParams = Record<string, string | number | boolean>;
1484
- type RequestHeaders = Record<string, string>;
1485
- type RefreshToken = (expiredToken: string) => Promise<string>;
1486
- type RequestConfig = {
1487
- timeout?: number;
1488
- params?: RequestParams;
1489
- headers?: RequestHeaders;
1490
- userAgent?: string;
1491
- fetch?: Fetch;
1492
- refreshToken?: RefreshToken;
1493
- telemetry?: boolean;
1494
- };
1495
- type ApiConfig = {
1496
- organization?: string;
1497
- domain?: string;
1498
- accessToken: string;
1499
- apiVersion?: string;
1468
+ type QueryResType<T extends Resource> = T['type'];
1469
+ type QueryInclude = string[];
1470
+ type QueryResourceFields<R extends ResourceTypeLock> = keyof ResourceFields[R];
1471
+ type QueryArrayFields<R extends Resource> = Array<QueryResourceFields<QueryResType<R>>>;
1472
+ type QueryRecordFields = {
1473
+ [key in keyof ResourceFields]?: Array<QueryResourceFields<key>>;
1500
1474
  };
1501
- type ApiClientInitConfig = ApiConfig & RequestConfig;
1502
- type ApiClientConfig = Partial<ApiClientInitConfig>;
1503
- type Method = 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH';
1504
- declare class ApiClient {
1505
- #private;
1506
- static create(options: ApiClientInitConfig): ApiClient;
1507
- private constructor();
1508
- get interceptors(): InterceptorManager;
1509
- get requestHeaders(): RequestHeaders;
1510
- config(config: ApiClientConfig): this;
1511
- userAgent(userAgent: string): this;
1512
- request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<FetchResponse>;
1513
- private customHeaders;
1514
- get currentAccessToken(): string;
1515
- get currentOrganization(): string;
1516
- /** The API version pinned via `apiVersion`, or `undefined` when requests are unversioned. */
1517
- get currentApiVersion(): string | undefined;
1518
- }
1519
-
1520
- type ResourceNull = {
1521
- id: null;
1522
- } & ResourceType;
1523
- type ResourceRel = ResourceId | ResourceNull;
1524
- type Metadata = ObjectType;
1525
- interface ResourceType {
1526
- readonly type: ResourceTypeLock;
1527
- }
1528
- interface ResourceId extends ResourceType {
1529
- readonly id: string;
1530
- }
1531
- interface ResourceBase {
1532
- reference?: string | null;
1533
- reference_origin?: string | null;
1534
- metadata?: Metadata;
1535
- }
1536
- interface Resource extends ResourceBase, ResourceId {
1537
- readonly created_at: string;
1538
- readonly updated_at: string;
1539
- }
1540
- interface ResourceCreate extends ResourceBase {
1475
+ type QueryFields<R extends Resource> = QueryArrayFields<R> | QueryRecordFields;
1476
+ interface QueryParamsRetrieve<R extends Resource = Resource> {
1477
+ include?: QueryInclude;
1478
+ fields?: QueryFields<R>;
1541
1479
  }
1542
- interface ResourceUpdate extends ResourceBase {
1543
- readonly id: string;
1480
+ type QuerySortType = 'asc' | 'desc';
1481
+ type QueryResourceSortable<R extends Resource> = ResourceSortFields[QueryResType<R>];
1482
+ type QueryResourceSortableFields<R extends Resource> = StringKey<QueryResourceSortable<R>>;
1483
+ type QueryArraySortable<R extends Resource> = Array<QueryResourceSortableFields<R> | `-${QueryResourceSortableFields<R>}`>;
1484
+ type QueryRecordSortable<R extends Resource> = Partial<Record<keyof QueryResourceSortable<R>, QuerySortType>>;
1485
+ type QuerySort<R extends Resource> = QueryArraySortable<R> | QueryRecordSortable<R>;
1486
+ type QueryFilter = Record<string, string | number | boolean | object | Array<string | number>>;
1487
+ type QueryPageNumber = number;
1488
+ type QueryPageSize = PositiveNumberRange<25>;
1489
+ type QueryPageCursor = string;
1490
+ interface QueryParamsList<R extends Resource = Resource> extends QueryParamsRetrieve<R> {
1491
+ sort?: QuerySort<R>;
1492
+ filters?: QueryFilter;
1493
+ pageNumber?: QueryPageNumber;
1494
+ pageSize?: QueryPageSize;
1495
+ /**
1496
+ * Cursor for cursor-based pagination — returns the records after the given cursor.
1497
+ * Only cursor-paginated resources (e.g. `event_stores`) honor it; offset-paginated
1498
+ * resources ignore it. Emitted as the `page[after]` query parameter.
1499
+ */
1500
+ pageAfter?: QueryPageCursor;
1501
+ /**
1502
+ * Cursor for cursor-based pagination — returns the records before the given cursor.
1503
+ * Only cursor-paginated resources honor it; offset-paginated resources ignore it.
1504
+ * Emitted as the `page[before]` query parameter.
1505
+ */
1506
+ pageBefore?: QueryPageCursor;
1544
1507
  }
1545
- type PageCursor = {
1546
- readonly before?: string;
1547
- readonly after?: string;
1508
+ type QueryParams<R extends Resource = Resource> = QueryParamsRetrieve<R> | QueryParamsList<R>;
1509
+
1510
+ type ApiCredentialType = 'api_credentials';
1511
+ type ApiCredentialRel = ResourceRel & {
1512
+ type: ApiCredentialType;
1548
1513
  };
1549
- type ListMeta = {
1550
- readonly pageCount: number;
1551
- readonly recordCount: number;
1552
- readonly currentPage: number;
1553
- readonly recordsPerPage: number;
1554
- readonly cursor?: {
1555
- readonly prev?: PageCursor;
1556
- readonly next?: PageCursor;
1557
- };
1514
+ type OrganizationRel = ResourceRel & {
1515
+ type: OrganizationType;
1558
1516
  };
1559
- declare class ListResponse<R extends Resource = Resource> extends Array<R> {
1560
- readonly meta: ListMeta;
1561
- constructor(meta: ListMeta, data: R[]);
1562
- first(): R | undefined;
1563
- last(): R | undefined;
1564
- get(index: number): R | undefined;
1565
- hasNextPage(): boolean;
1566
- hasPrevPage(): boolean;
1567
- getRecordCount(): number;
1568
- getPageCount(): number;
1569
- get recordCount(): number;
1570
- get pageCount(): number;
1571
- }
1572
-
1573
- type ResourceSort = Pick<Resource, 'id' | 'reference' | 'reference_origin' | 'created_at' | 'updated_at'>;
1574
- type ResourceFilter = Pick<Resource, 'id' | 'reference' | 'reference_origin' | 'metadata' | 'created_at' | 'updated_at'>;
1575
- type ResourceAdapterConfig = {};
1576
- type ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig;
1577
- type ResourcesConfig = Partial<ResourcesInitConfig>;
1578
- declare class ResourceAdapter {
1579
- #private;
1580
- constructor(config: ResourcesInitConfig);
1581
- private localConfig;
1582
- config(config: ResourcesConfig): this;
1583
- get client(): Readonly<ApiClient>;
1584
- singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig, path?: string): Promise<R>;
1585
- retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
1586
- list<R extends Resource>(resource: ResourceType, params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>>;
1587
- create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
1588
- update<U extends ResourceUpdate, R extends Resource>(resource: U & ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig,
1517
+ type RoleRel = ResourceRel & {
1518
+ type: RoleType;
1519
+ };
1520
+ type ApiCredentialSort = Pick<ApiCredential, 'id' | 'name' | 'mode'> & ResourceSort;
1521
+ /**
1522
+ * The Api credential object is returned as part of the response body of each successful list, retrieve, create, update or delete API call to the /api/api_credentials endpoint.
1523
+ *
1524
+ * @link https://docs.commercelayer.io/provisioning-api-reference/api_credentials/object
1525
+ */
1526
+ interface ApiCredential extends Resource {
1527
+ readonly type: ApiCredentialType;
1589
1528
  /**
1590
- * Singular path override for singleton resources, e.g. `user` rather than
1591
- * `users/{id}`. Mirrors `singleton()` above. Core never needed it — both
1592
- * its singletons are retrieve-only — but the Provisioning API's `user` is
1593
- * updatable, and without this the request targets `/users/{id}` and 404s.
1529
+ * The API credential internal name.
1530
+ * @example ```"My app"```
1594
1531
  */
1595
- path?: string): Promise<R>;
1596
- delete(resource: ResourceId, options?: ResourcesConfig): Promise<void>;
1532
+ name: string;
1597
1533
  /**
1598
- * Calls a non-CRUD endpoint hosted at a sub-path of a resource, e.g.
1599
- * `POST memberships/:id/resend`. These endpoints are not described by the
1600
- * public resources schema, so they are declared in a target config and
1601
- * emitted from it.
1534
+ * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).
1535
+ * @example ```"sales_channel"```
1602
1536
  */
1603
- action(cmd: Extract<Method, 'POST' | 'PATCH'>, path: string, payload?: any, options?: ResourcesConfig): Promise<void>;
1604
- fetch<R extends Resource>(resource: string | ResourceType, path: string, params?: QueryParams<R>, options?: ResourcesConfig): Promise<R | ListResponse<R>>;
1537
+ kind: string;
1538
+ /**
1539
+ * Indicates if the API credential it's confidential.
1540
+ * @example ```true```
1541
+ */
1542
+ confidential?: boolean | null;
1543
+ /**
1544
+ * The API credential redirect URI.
1545
+ * @example ```"https://bluebrand.com/img/logo.svg"```
1546
+ */
1547
+ redirect_uri?: string | null;
1548
+ /**
1549
+ * The API credential unique ID.
1550
+ * @example ```"xxxx-yyyy-zzzz"```
1551
+ */
1552
+ client_id?: string | null;
1553
+ /**
1554
+ * The API credential unique secret.
1555
+ * @example ```"xxxx-yyyy-zzzz"```
1556
+ */
1557
+ client_secret?: string | null;
1558
+ /**
1559
+ * The API credential scopes.
1560
+ * @example ```"market:all market:9 market:122 market:6 stock_location:6 stock_location:33"```
1561
+ */
1562
+ scopes?: string | null;
1563
+ /**
1564
+ * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
1565
+ * @example ```7200```
1566
+ */
1567
+ expires_in?: number | null;
1568
+ /**
1569
+ * Indicates the environment the resource belongs to (one of `test` or `live`).
1570
+ * @example ```"test"```
1571
+ */
1572
+ mode?: string | null;
1573
+ /**
1574
+ * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).
1575
+ */
1576
+ custom?: boolean | null;
1577
+ organization?: Organization | null;
1578
+ role?: Role | null;
1605
1579
  }
1606
- declare abstract class ApiResourceBase<R extends Resource> {
1607
- #private;
1608
- static readonly TYPE: ResourceTypeLock;
1609
- constructor(adapter?: ResourceAdapter);
1610
- protected get resources(): ResourceAdapter;
1580
+ interface ApiCredentialCreate extends ResourceCreate {
1611
1581
  /**
1612
- * Returns a copy of this resource instance bound to a specific
1613
- * `ResourceAdapter`. Used by the bundle client so each client instance
1614
- * routes requests through its own adapter (its own access token) instead
1615
- * of the process-global static adapter. Resource classes are type-only
1616
- * exports, so we clone via `this.constructor` rather than referencing the
1617
- * class directly.
1582
+ * The API credential internal name.
1583
+ * @example ```"My app"```
1618
1584
  */
1619
- withAdapter(adapter: ResourceAdapter): this;
1620
- abstract relationship(id: string | ResourceId | null): ResourceRel;
1621
- protected relationshipOneToOne<RR extends ResourceRel>(id: string | ResourceId | null): RR;
1622
- protected relationshipOneToMany<RR extends ResourceRel>(...ids: string[]): RR[];
1623
- abstract type(): ResourceTypeLock;
1624
- protected path(): string;
1625
- update(resource: ResourceUpdate, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
1585
+ name: string;
1586
+ /**
1587
+ * The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).
1588
+ * @example ```"sales_channel"```
1589
+ */
1590
+ kind: string;
1591
+ /**
1592
+ * The API credential redirect URI.
1593
+ * @example ```"https://bluebrand.com/img/logo.svg"```
1594
+ */
1595
+ redirect_uri?: string | null;
1596
+ /**
1597
+ * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
1598
+ * @example ```7200```
1599
+ */
1600
+ expires_in?: number | null;
1601
+ /**
1602
+ * Indicates the environment the resource belongs to (one of `test` or `live`).
1603
+ * @example ```"test"```
1604
+ */
1605
+ mode?: string | null;
1606
+ /**
1607
+ * Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).
1608
+ */
1609
+ custom?: boolean | null;
1610
+ organization: OrganizationRel;
1611
+ role?: RoleRel | null;
1626
1612
  }
1627
- declare abstract class ApiResource<R extends Resource> extends ApiResourceBase<R> {
1628
- retrieve(id: string | ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
1629
- list(params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>>;
1630
- count(filter?: QueryFilter | QueryParamsList<R>, options?: ResourcesConfig): Promise<number>;
1613
+ interface ApiCredentialUpdate extends ResourceUpdate {
1614
+ /**
1615
+ * The API credential internal name.
1616
+ * @example ```"My app"```
1617
+ */
1618
+ name?: string | null;
1619
+ /**
1620
+ * The API credential redirect URI.
1621
+ * @example ```"https://bluebrand.com/img/logo.svg"```
1622
+ */
1623
+ redirect_uri?: string | null;
1624
+ /**
1625
+ * The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
1626
+ * @example ```7200```
1627
+ */
1628
+ expires_in?: number | null;
1629
+ role?: RoleRel | null;
1631
1630
  }
1632
- declare abstract class ApiSingleton<R extends Resource> extends ApiResourceBase<R> {
1633
- retrieve(params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
1631
+ declare class ApiCredentials extends ApiResource<ApiCredential> {
1632
+ static readonly TYPE: ApiCredentialType;
1633
+ create(resource: ApiCredentialCreate, params?: QueryParamsRetrieve<ApiCredential>, options?: ResourcesConfig): Promise<ApiCredential>;
1634
+ update(resource: ApiCredentialUpdate, params?: QueryParamsRetrieve<ApiCredential>, options?: ResourcesConfig): Promise<ApiCredential>;
1635
+ delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
1636
+ organization(apiCredentialId: string | ApiCredential, params?: QueryParamsRetrieve<Organization>, options?: ResourcesConfig): Promise<Organization>;
1637
+ role(apiCredentialId: string | ApiCredential, params?: QueryParamsRetrieve<Role>, options?: ResourcesConfig): Promise<Role>;
1638
+ isApiCredential(resource: any): resource is ApiCredential;
1639
+ relationship(id: string | ResourceId | null): ApiCredentialRel;
1640
+ relationshipToMany(...ids: string[]): ApiCredentialRel[];
1641
+ type(): ApiCredentialType;
1634
1642
  }
1643
+ declare const instance: ApiCredentials;
1635
1644
 
1636
- export { type QueryPageSize as $, type ApiCredential as A, type MembershipSort as B, type CreatableResource as C, type DeletableResource as D, type ErrorObj as E, type MembershipUpdate as F, Memberships as G, type HeadersObj as H, type IdentityProvider as I, type Metadata as J, type OrganizationCreate as K, type ListMeta as L, type Membership as M, type OrganizationSort as N, type Organization as O, type OrganizationUpdate as P, Organizations as Q, type Permission as R, type PermissionCreate as S, type PermissionSort as T, type PermissionUpdate as U, Permissions as V, type QueryFields as W, type QueryFilter as X, type QueryInclude as Y, type QueryPageCursor as Z, type QueryPageNumber as _, type ApiCredentialCreate as a, instance as a$, type QueryParams as a0, type QueryParamsList as a1, type QueryParamsRetrieve as a2, type QuerySort as a3, type RequestObj as a4, type Resource as a5, type ResourceCreate as a6, type ResourceFields as a7, type ResourceFilter as a8, type ResourceId as a9, singletonList as aA, getResources as aB, ResourceAdapter as aC, type RequestInterceptor as aD, type ErrorInterceptor as aE, type ResponseInterceptor as aF, type InterceptorType as aG, type RawResponseReader as aH, type MembershipProfileType as aI, instance$9 as aJ, type VersionType as aK, instance$8 as aL, type PermissionType as aM, instance$7 as aN, type RoleType as aO, instance$6 as aP, type ApplicationMembershipType as aQ, instance$5 as aR, type MembershipType as aS, instance$4 as aT, type OrganizationType as aU, instance$3 as aV, type ApiCredentialType as aW, instance$2 as aX, type UserType as aY, instance$1 as aZ, type IdentityProviderType as a_, type ResourceRel as aa, type ResourceSort as ab, type ResourceSortFields as ac, type ResourceType as ad, type ResourceTypeLock as ae, type ResourceUpdate as af, type ResourcesConfig as ag, type ResourcesInitConfig as ah, type ResponseObj as ai, type RetrievableResource as aj, type RetrievableResourceType as ak, type Role as al, type RoleCreate as am, type RoleSort as an, type RoleUpdate as ao, Roles as ap, type UpdatableResource as aq, type UpdatableResourceType as ar, type User as as, type UserSort as at, type UserUpdate as au, Users as av, type Version as aw, type VersionSort as ax, Versions as ay, resourceList as az, type ApiCredentialSort as b, creatableResources as b0, deletableResources as b1, getSingletons as b2, isCreatable as b3, isDeletable as b4, isSingleton as b5, isUpdatable as b6, updatableResources as b7, type ApiCredentialUpdate as c, ApiCredentials as d, ApiResource as e, ApiSingleton as f, type ApplicationMembership as g, type ApplicationMembershipCreate as h, type ApplicationMembershipSort as i, type ApplicationMembershipUpdate as j, ApplicationMemberships as k, type CreatableResourceType as l, type DeletableResourceType as m, type IdentityProviderCreate as n, type IdentityProviderSort as o, type IdentityProviderUpdate as p, IdentityProviders as q, ListResponse as r, type ListableResource as s, type ListableResourceType as t, type MembershipCreate as u, type MembershipProfile as v, type MembershipProfileCreate as w, type MembershipProfileSort as x, type MembershipProfileUpdate as y, MembershipProfiles as z };
1645
+ export { type QueryFilter as $, type ApiCredential as A, type MembershipProfileSort as B, type CreatableResource as C, type DeletableResource as D, type ErrorObj as E, type MembershipProfileUpdate as F, MembershipProfiles as G, type HeadersObj as H, type IdentityProvider as I, type MembershipSort as J, type MembershipUpdate as K, type ListMeta as L, type Membership as M, Memberships as N, type Metadata as O, type Organization as P, type OrganizationCreate as Q, type ResourceFields as R, type OrganizationSort as S, type OrganizationUpdate as T, Organizations as U, type Permission as V, type PermissionCreate as W, type PermissionSort as X, type PermissionUpdate as Y, Permissions as Z, type QueryFields as _, type ResourceSortFields as a, creatableResources as a$, type QueryInclude as a0, type QueryPageCursor as a1, type QueryPageNumber as a2, type QueryPageSize as a3, type QueryParams as a4, type QueryParamsList as a5, type QueryParamsRetrieve as a6, type QuerySort as a7, type RequestObj as a8, type Resource as a9, Versions as aA, resourceList as aB, singletonList as aC, ResourceAdapter as aD, type RequestInterceptor as aE, type ErrorInterceptor as aF, type ResponseInterceptor as aG, type InterceptorType as aH, type RawResponseReader as aI, type VersionType as aJ, instance$9 as aK, type PermissionType as aL, instance$8 as aM, type RoleType as aN, instance$7 as aO, type MembershipType as aP, instance$6 as aQ, type OrganizationType as aR, instance$5 as aS, type MembershipProfileType as aT, instance$4 as aU, type ApplicationMembershipType as aV, instance$3 as aW, type UserType as aX, instance$2 as aY, type IdentityProviderType as aZ, instance$1 as a_, type ResourceCreate as aa, type ResourceFilter as ab, type ResourceId as ac, type ResourceRel as ad, type ResourceSort as ae, type ResourceType as af, type ResourceUpdate as ag, type ResourcesConfig as ah, type ResourcesInitConfig as ai, type ResponseObj as aj, type RetrievableResource as ak, type RetrievableResourceType as al, type Role as am, type RoleCreate as an, type RoleSort as ao, type RoleUpdate as ap, Roles as aq, type SingletonUpdate as ar, type UpdatableResource as as, type UpdatableResourceType as at, type User as au, type UserSort as av, type UserUpdate as aw, Users as ax, type Version as ay, type VersionSort as az, type ResourceTypeLock as b, deletableResources as b0, getSingletons as b1, isCreatable as b2, isDeletable as b3, isSingleton as b4, isUpdatable as b5, updatableResources as b6, type ApiCredentialType as b7, instance as b8, type ApiCredentialCreate as c, type ApiCredentialSort as d, type ApiCredentialUpdate as e, ApiCredentials as f, getResources as g, ApiResource as h, ApiSingleton as i, type ApplicationMembership as j, type ApplicationMembershipCreate as k, type ApplicationMembershipSort as l, type ApplicationMembershipUpdate as m, ApplicationMemberships as n, type CreatableResourceType as o, type DeletableResourceType as p, type IdentityProviderCreate as q, type IdentityProviderSort as r, type IdentityProviderUpdate as s, IdentityProviders as t, ListResponse as u, type ListableResource as v, type ListableResourceType as w, type MembershipCreate as x, type MembershipProfile as y, type MembershipProfileCreate as z };