@wix/auto_sdk_identity_oauth 1.0.10 → 1.0.11

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 (121) hide show
  1. package/build/cjs/{src/identity-oauth-v1-refresh-token-oauth.types.d.ts → identity-oauth-v1-refresh-token-oauth.universal-DIzKUWYi.d.ts} +53 -35
  2. package/build/cjs/index.d.ts +37 -1
  3. package/build/cjs/index.js +256 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +81 -1
  6. package/build/cjs/meta.js +179 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.d.ts → es/identity-oauth-v1-refresh-token-oauth.universal-DIzKUWYi.d.mts} +53 -35
  9. package/build/es/index.d.mts +37 -0
  10. package/build/es/index.mjs +233 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/es/meta.d.mts +81 -0
  13. package/build/es/meta.mjs +154 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/internal/{es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts → cjs/identity-oauth-v1-refresh-token-oauth.universal-DIzKUWYi.d.ts} +53 -35
  16. package/build/internal/cjs/index.d.ts +37 -1
  17. package/build/internal/cjs/index.js +256 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +81 -1
  20. package/build/internal/cjs/meta.js +179 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/{es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts → internal/es/identity-oauth-v1-refresh-token-oauth.universal-DIzKUWYi.d.mts} +53 -35
  23. package/build/internal/es/index.d.mts +37 -0
  24. package/build/internal/es/index.mjs +233 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/es/meta.d.mts +81 -0
  27. package/build/internal/es/meta.mjs +154 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +9 -8
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  34. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -10
  35. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  36. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  37. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -134
  38. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  39. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  40. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -66
  41. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  42. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  43. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -20
  44. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  45. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -17
  46. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  47. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -294
  48. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -143
  49. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
  50. package/build/es/index.d.ts +0 -1
  51. package/build/es/index.js +0 -2
  52. package/build/es/index.js.map +0 -1
  53. package/build/es/index.typings.d.ts +0 -1
  54. package/build/es/index.typings.js +0 -2
  55. package/build/es/index.typings.js.map +0 -1
  56. package/build/es/meta.d.ts +0 -1
  57. package/build/es/meta.js +0 -2
  58. package/build/es/meta.js.map +0 -1
  59. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  60. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -6
  61. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  62. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  63. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -129
  64. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  65. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  66. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -38
  67. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  68. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  69. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -14
  70. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  71. package/build/es/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -14
  72. package/build/es/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  73. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -294
  74. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -115
  75. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
  76. package/build/internal/cjs/index.typings.d.ts +0 -1
  77. package/build/internal/cjs/index.typings.js +0 -18
  78. package/build/internal/cjs/index.typings.js.map +0 -1
  79. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  80. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -10
  81. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  82. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  83. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -134
  84. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  85. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  86. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -66
  87. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  88. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  89. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -20
  90. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  91. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -17
  92. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  93. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -294
  94. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -143
  95. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
  96. package/build/internal/es/index.d.ts +0 -1
  97. package/build/internal/es/index.js +0 -2
  98. package/build/internal/es/index.js.map +0 -1
  99. package/build/internal/es/index.typings.d.ts +0 -1
  100. package/build/internal/es/index.typings.js +0 -2
  101. package/build/internal/es/index.typings.js.map +0 -1
  102. package/build/internal/es/meta.d.ts +0 -1
  103. package/build/internal/es/meta.js +0 -2
  104. package/build/internal/es/meta.js.map +0 -1
  105. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  106. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -6
  107. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  108. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  109. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -129
  110. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  111. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  112. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -38
  113. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  114. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  115. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -14
  116. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  117. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -14
  118. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  119. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -294
  120. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -115
  121. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
@@ -1,18 +1,182 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
15
9
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/identity-oauth-v1-refresh-token-oauth.meta.js"), exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // meta.ts
21
+ var meta_exports = {};
22
+ __export(meta_exports, {
23
+ token: () => token2,
24
+ tokenInfo: () => tokenInfo2
25
+ });
26
+ module.exports = __toCommonJS(meta_exports);
27
+
28
+ // src/identity-oauth-v1-refresh-token-oauth.http.ts
29
+ var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
30
+ var import_bytes2 = require("@wix/sdk-runtime/transformations/bytes");
31
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
32
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
33
+ function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
34
+ const domainToMappings = {
35
+ "manage._base_domain_": [
36
+ {
37
+ srcPath: "/oauth2",
38
+ destPath: "/v1/oauth"
39
+ }
40
+ ],
41
+ "www.wixapis.com": [
42
+ {
43
+ srcPath: "/oauth2",
44
+ destPath: "/v1/oauth"
45
+ },
46
+ {
47
+ srcPath: "/oauth2/token_info",
48
+ destPath: "/v1/token_info"
49
+ }
50
+ ],
51
+ "users._base_domain_": [
52
+ {
53
+ srcPath: "/v1/oauth/device/verify",
54
+ destPath: "/v1/oauth/device/verify"
55
+ },
56
+ {
57
+ srcPath: "/v1/oauth/manage/user-code",
58
+ destPath: "/v1/oauth/manage/user-code"
59
+ },
60
+ {
61
+ srcPath: "/v2/oauth/device/verify",
62
+ destPath: "/v2/oauth/device/verify"
63
+ },
64
+ {
65
+ srcPath: "/v1/oauth/authorize",
66
+ destPath: "/v1/oauth/authorize"
67
+ }
68
+ ],
69
+ _: [
70
+ {
71
+ srcPath: "/_api/oauth2",
72
+ destPath: "/v1/oauth"
73
+ }
74
+ ],
75
+ "platform.rise.ai": [
76
+ {
77
+ srcPath: "/oauth2",
78
+ destPath: "/v1/oauth"
79
+ }
80
+ ],
81
+ "api._api_base_domain_": [
82
+ {
83
+ srcPath: "/oauth2-ng",
84
+ destPath: ""
85
+ }
86
+ ]
87
+ };
88
+ return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
89
+ }
90
+ var PACKAGE_NAME = "@wix/auto_sdk_identity_oauth";
91
+ function token(payload) {
92
+ function __token({ host }) {
93
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
94
+ { transformFn: import_bytes.transformSDKBytesToRESTBytes, paths: [{ path: "body" }] }
95
+ ]);
96
+ const metadata = {
97
+ entityFqdn: "wix.identity.oauth.v1.refresh_token",
98
+ method: "POST",
99
+ methodFqn: "wix.identity.oauth2.v1.Oauth2Ng.Token",
100
+ packageName: PACKAGE_NAME,
101
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
102
+ protoPath: "/v1/oauth/token",
103
+ data: serializedData,
104
+ host
105
+ }),
106
+ data: serializedData,
107
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
108
+ {
109
+ transformFn: import_bytes2.transformRESTBytesToSDKBytes,
110
+ paths: [{ path: "body" }]
111
+ }
112
+ ])
113
+ };
114
+ return metadata;
115
+ }
116
+ return __token;
117
+ }
118
+ function tokenInfo(payload) {
119
+ function __tokenInfo({ host }) {
120
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
121
+ { transformFn: import_bytes.transformSDKBytesToRESTBytes, paths: [{ path: "body" }] }
122
+ ]);
123
+ const metadata = {
124
+ entityFqdn: "wix.identity.oauth.v1.refresh_token",
125
+ method: "POST",
126
+ methodFqn: "wix.identity.oauth2.v1.Oauth2Ng.TokenInfo",
127
+ packageName: PACKAGE_NAME,
128
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
129
+ protoPath: "/v1/oauth/token-info",
130
+ data: serializedData,
131
+ host
132
+ }),
133
+ data: serializedData
134
+ };
135
+ return metadata;
136
+ }
137
+ return __tokenInfo;
138
+ }
139
+
140
+ // src/identity-oauth-v1-refresh-token-oauth.meta.ts
141
+ function token2() {
142
+ const payload = {};
143
+ const getRequestOptions = token(payload);
144
+ const getUrl = (context) => {
145
+ const { url } = getRequestOptions(context);
146
+ return url;
147
+ };
148
+ return {
149
+ getUrl,
150
+ httpMethod: "POST",
151
+ path: "/v1/oauth/token",
152
+ pathParams: {},
153
+ __requestType: null,
154
+ __originalRequestType: null,
155
+ __responseType: null,
156
+ __originalResponseType: null
157
+ };
158
+ }
159
+ function tokenInfo2() {
160
+ const payload = {};
161
+ const getRequestOptions = tokenInfo(payload);
162
+ const getUrl = (context) => {
163
+ const { url } = getRequestOptions(context);
164
+ return url;
165
+ };
166
+ return {
167
+ getUrl,
168
+ httpMethod: "POST",
169
+ path: "/v1/oauth/token-info",
170
+ pathParams: {},
171
+ __requestType: null,
172
+ __originalRequestType: null,
173
+ __responseType: null,
174
+ __originalResponseType: null
175
+ };
176
+ }
177
+ // Annotate the CommonJS export names for ESM import in node:
178
+ 0 && (module.exports = {
179
+ token,
180
+ tokenInfo
181
+ });
18
182
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sFAAoE"}
1
+ {"version":3,"sources":["../../../meta.ts","../../../src/identity-oauth-v1-refresh-token-oauth.http.ts","../../../src/identity-oauth-v1-refresh-token-oauth.meta.ts"],"sourcesContent":["export * from './src/identity-oauth-v1-refresh-token-oauth.meta.js';\n","import { transformSDKBytesToRESTBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIdentityOauth2V1Oauth2NgUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/token_info',\n destPath: '/v1/token_info',\n },\n ],\n 'users._base_domain_': [\n {\n srcPath: '/v1/oauth/device/verify',\n destPath: '/v1/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/manage/user-code',\n destPath: '/v1/oauth/manage/user-code',\n },\n {\n srcPath: '/v2/oauth/device/verify',\n destPath: '/v2/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/authorize',\n destPath: '/v1/oauth/authorize',\n },\n ],\n _: [\n {\n srcPath: '/_api/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/oauth2-ng',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_oauth';\n\n/**\n * Creates an access token.\n *\n *\n * The endpoint accepts raw HTTP requests. You must pass the request's body\n * parameters formatted as bytes in the raw HTTP request's `body` field,\n * following this template:\n * `{\"grantType\": \"client_credentials\", \"client_id\": \"<APP_ID>\", \"client_secret\": \"<APP_SECRET_KEY>\", \"instance_id\": \"<INSTANCE_ID>\"}`.\n *\n * When the call succeeds, Wix returns `{\"statusCode\": 200}` and the created access\n * token in the `body` field of the raw HTTP response.\n *\n * In case the call fails, Wix returns the relevant `4XX` error code in the raw\n * HTTP response's `statusCode` field and details\n * about the error in `body`. Error details follow the\n * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).\n */\nexport function token(payload: object): RequestOptionsFactory<any> {\n function __token({ host }: any) {\n const serializedData = transformPaths(payload, [\n { transformFn: transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Token',\n packageName: PACKAGE_NAME,\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __token;\n}\n\n/** Token Introspection Endpoint. */\nexport function tokenInfo(payload: object): RequestOptionsFactory<any> {\n function __tokenInfo({ host }: any) {\n const serializedData = transformPaths(payload, [\n { transformFn: transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.TokenInfo',\n packageName: PACKAGE_NAME,\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token-info',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __tokenInfo;\n}\n","import * as ambassadorWixIdentityOauthV1RefreshToken from './identity-oauth-v1-refresh-token-oauth.http.js';\nimport * as ambassadorWixIdentityOauthV1RefreshTokenTypes from './identity-oauth-v1-refresh-token-oauth.types.js';\nimport * as ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes from './identity-oauth-v1-refresh-token-oauth.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function token(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.token(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/oauth/token',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function tokenInfo(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.TokenInfoResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.TokenInfoResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.tokenInfo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/oauth/token-info',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: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QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,UAAU,OAAO;AAE5D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["token","tokenInfo","import_bytes","payload","token","tokenInfo"]}
@@ -1,11 +1,11 @@
1
- export interface RefreshToken {
1
+ interface RefreshToken {
2
2
  token?: string;
3
3
  }
4
4
  /**
5
5
  * AuthorizeRequest is sent by the client to the authorization server to initiate
6
6
  * the authorization process.
7
7
  */
8
- export interface AuthorizeRequest {
8
+ interface AuthorizeRequest {
9
9
  /**
10
10
  * ID of the Wix OAuth app requesting authorization.
11
11
  * @format GUID
@@ -70,16 +70,16 @@ export interface AuthorizeRequest {
70
70
  */
71
71
  signInUrl?: string | null;
72
72
  }
73
- export interface RawHttpResponse {
73
+ interface RawHttpResponse {
74
74
  body?: Uint8Array;
75
75
  statusCode?: number | null;
76
76
  headers?: HeadersEntry[];
77
77
  }
78
- export interface HeadersEntry {
78
+ interface HeadersEntry {
79
79
  key?: string;
80
80
  value?: string;
81
81
  }
82
- export interface RawHttpRequest {
82
+ interface RawHttpRequest {
83
83
  body?: Uint8Array;
84
84
  pathParams?: PathParametersEntry[];
85
85
  queryParams?: QueryParametersEntry[];
@@ -88,15 +88,15 @@ export interface RawHttpRequest {
88
88
  rawPath?: string;
89
89
  rawQuery?: string;
90
90
  }
91
- export interface PathParametersEntry {
91
+ interface PathParametersEntry {
92
92
  key?: string;
93
93
  value?: string;
94
94
  }
95
- export interface QueryParametersEntry {
95
+ interface QueryParametersEntry {
96
96
  key?: string;
97
97
  value?: string;
98
98
  }
99
- export interface DeviceCodeRequest {
99
+ interface DeviceCodeRequest {
100
100
  /** The ID of the application that asks for authorization. */
101
101
  clientId?: string;
102
102
  /**
@@ -105,7 +105,7 @@ export interface DeviceCodeRequest {
105
105
  */
106
106
  scope?: string | null;
107
107
  }
108
- export interface DeviceCodeResponse {
108
+ interface DeviceCodeResponse {
109
109
  /** is the unique code for the device. When the user goes to the verification_uri in their browser-based device, this code will be bound to their session. */
110
110
  deviceCode?: string;
111
111
  /** contains the code that should be input at the verification_uri to authorize the device. */
@@ -117,13 +117,13 @@ export interface DeviceCodeResponse {
117
117
  /** indicates the interval (in seconds) at which the app should poll the token URL to request a token. clients MUST use 5 as the default */
118
118
  interval?: number | null;
119
119
  }
120
- export interface DeviceVerifyRequest {
120
+ interface DeviceVerifyRequest {
121
121
  /** User code representing a currently authorizing device. */
122
122
  userCode?: string;
123
123
  }
124
- export interface DeviceVerifyResponse {
124
+ interface DeviceVerifyResponse {
125
125
  }
126
- export interface DeviceVerifyV2Request {
126
+ interface DeviceVerifyV2Request {
127
127
  /**
128
128
  * User code representing a currently authorizing device.
129
129
  * @minLength 8
@@ -131,21 +131,21 @@ export interface DeviceVerifyV2Request {
131
131
  */
132
132
  userCode?: string;
133
133
  }
134
- export interface DeviceVerifyV2Response {
134
+ interface DeviceVerifyV2Response {
135
135
  }
136
- export interface InvalidateUserCodeRequest {
136
+ interface InvalidateUserCodeRequest {
137
137
  /** user code to invalidate. Only the authorizing identity is able to invalidate it. */
138
138
  userCode?: string;
139
139
  }
140
- export interface InvalidateUserCodeResponse {
140
+ interface InvalidateUserCodeResponse {
141
141
  }
142
- export interface RevokeRefreshTokenRequest {
142
+ interface RevokeRefreshTokenRequest {
143
143
  /** The refresh token itself. Anyone with the token itself is able to revoke it. */
144
144
  token?: string;
145
145
  }
146
- export interface RevokeRefreshTokenResponse {
146
+ interface RevokeRefreshTokenResponse {
147
147
  }
148
- export interface TokenInfoResponse {
148
+ interface TokenInfoResponse {
149
149
  active?: boolean;
150
150
  /** subject type. */
151
151
  subjectType?: SubjectTypeWithLiterals;
@@ -169,7 +169,7 @@ export interface TokenInfoResponse {
169
169
  */
170
170
  vendorProductId?: string | null;
171
171
  }
172
- export declare enum SubjectType {
172
+ declare enum SubjectType {
173
173
  /** unknown subject type */
174
174
  UNKNOWN = "UNKNOWN",
175
175
  /** user subject type */
@@ -182,16 +182,16 @@ export declare enum SubjectType {
182
182
  APP = "APP"
183
183
  }
184
184
  /** @enumType */
185
- export type SubjectTypeWithLiterals = SubjectType | 'UNKNOWN' | 'USER' | 'VISITOR' | 'MEMBER' | 'APP';
186
- export interface Empty {
185
+ type SubjectTypeWithLiterals = SubjectType | 'UNKNOWN' | 'USER' | 'VISITOR' | 'MEMBER' | 'APP';
186
+ interface Empty {
187
187
  }
188
- export interface DomainEvent extends DomainEventBodyOneOf {
188
+ interface DomainEvent extends DomainEventBodyOneOf {
189
189
  createdEvent?: EntityCreatedEvent;
190
190
  updatedEvent?: EntityUpdatedEvent;
191
191
  deletedEvent?: EntityDeletedEvent;
192
192
  actionEvent?: ActionEvent;
193
193
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
194
- id?: string;
194
+ _id?: string;
195
195
  /**
196
196
  * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
197
197
  * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
@@ -220,32 +220,50 @@ export interface DomainEvent extends DomainEventBodyOneOf {
220
220
  entityEventSequence?: string | null;
221
221
  }
222
222
  /** @oneof */
223
- export interface DomainEventBodyOneOf {
223
+ interface DomainEventBodyOneOf {
224
224
  createdEvent?: EntityCreatedEvent;
225
225
  updatedEvent?: EntityUpdatedEvent;
226
226
  deletedEvent?: EntityDeletedEvent;
227
227
  actionEvent?: ActionEvent;
228
228
  }
229
- export interface EntityCreatedEvent {
230
- entityAsJson?: string;
231
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
232
- restoreInfo?: RestoreInfo;
229
+ interface EntityCreatedEvent {
230
+ entity?: string;
233
231
  }
234
- export interface RestoreInfo {
232
+ interface RestoreInfo {
235
233
  deletedDate?: Date | null;
236
234
  }
237
- export interface EntityUpdatedEvent {
235
+ interface EntityUpdatedEvent {
238
236
  /**
239
237
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
240
238
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
241
239
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
242
240
  */
243
- currentEntityAsJson?: string;
241
+ currentEntity?: string;
244
242
  }
245
- export interface EntityDeletedEvent {
243
+ interface EntityDeletedEvent {
246
244
  /** Entity that was deleted. */
247
- deletedEntityAsJson?: string | null;
245
+ deletedEntity?: string | null;
248
246
  }
249
- export interface ActionEvent {
250
- bodyAsJson?: string;
247
+ interface ActionEvent {
248
+ body?: string;
251
249
  }
250
+ interface TokenOptions {
251
+ body?: Uint8Array;
252
+ pathParams?: PathParametersEntry[];
253
+ queryParams?: QueryParametersEntry[];
254
+ headers?: HeadersEntry[];
255
+ method?: string;
256
+ rawPath?: string;
257
+ rawQuery?: string;
258
+ }
259
+ interface TokenInfoOptions {
260
+ body?: Uint8Array;
261
+ pathParams?: PathParametersEntry[];
262
+ queryParams?: QueryParametersEntry[];
263
+ headers?: HeadersEntry[];
264
+ method?: string;
265
+ rawPath?: string;
266
+ rawQuery?: string;
267
+ }
268
+
269
+ export { type AuthorizeRequest as A, type DeviceCodeRequest as D, type Empty as E, type HeadersEntry as H, type InvalidateUserCodeRequest as I, type PathParametersEntry as P, type QueryParametersEntry as Q, type RawHttpResponse as R, SubjectType as S, type TokenOptions as T, type TokenInfoOptions as a, type TokenInfoResponse as b, type RefreshToken as c, type RawHttpRequest as d, type DeviceCodeResponse as e, type DeviceVerifyRequest as f, type DeviceVerifyResponse as g, type DeviceVerifyV2Request as h, type DeviceVerifyV2Response as i, type InvalidateUserCodeResponse as j, type RevokeRefreshTokenRequest as k, type RevokeRefreshTokenResponse as l, type DomainEvent as m, type DomainEventBodyOneOf as n, type EntityCreatedEvent as o, type RestoreInfo as p, type EntityUpdatedEvent as q, type EntityDeletedEvent as r, type ActionEvent as s };
@@ -0,0 +1,37 @@
1
+ import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { T as TokenOptions, R as RawHttpResponse, a as TokenInfoOptions, b as TokenInfoResponse } from './identity-oauth-v1-refresh-token-oauth.universal-DIzKUWYi.mjs';
3
+ export { s as ActionEvent, A as AuthorizeRequest, D as DeviceCodeRequest, e as DeviceCodeResponse, f as DeviceVerifyRequest, g as DeviceVerifyResponse, h as DeviceVerifyV2Request, i as DeviceVerifyV2Response, m as DomainEvent, n as DomainEventBodyOneOf, E as Empty, o as EntityCreatedEvent, r as EntityDeletedEvent, q as EntityUpdatedEvent, H as HeadersEntry, I as InvalidateUserCodeRequest, j as InvalidateUserCodeResponse, P as PathParametersEntry, Q as QueryParametersEntry, d as RawHttpRequest, c as RefreshToken, p as RestoreInfo, k as RevokeRefreshTokenRequest, l as RevokeRefreshTokenResponse, S as SubjectType } from './identity-oauth-v1-refresh-token-oauth.universal-DIzKUWYi.mjs';
4
+
5
+ declare function token$1(httpClient: HttpClient): TokenSignature;
6
+ interface TokenSignature {
7
+ /**
8
+ * Creates an access token.
9
+ *
10
+ *
11
+ * The endpoint accepts raw HTTP requests. You must pass the request's body
12
+ * parameters formatted as bytes in the raw HTTP request's `body` field,
13
+ * following this template:
14
+ * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
15
+ *
16
+ * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
17
+ * token in the `body` field of the raw HTTP response.
18
+ *
19
+ * In case the call fails, Wix returns the relevant `4XX` error code in the raw
20
+ * HTTP response's `statusCode` field and details
21
+ * about the error in `body`. Error details follow the
22
+ * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
23
+ */
24
+ (options?: TokenOptions | undefined): Promise<RawHttpResponse>;
25
+ }
26
+ declare function tokenInfo$1(httpClient: HttpClient): TokenInfoSignature;
27
+ interface TokenInfoSignature {
28
+ /**
29
+ * Token Introspection Endpoint.
30
+ */
31
+ (options?: TokenInfoOptions | undefined): Promise<TokenInfoResponse>;
32
+ }
33
+
34
+ declare const token: MaybeContext<BuildRESTFunction<typeof token$1> & typeof token$1>;
35
+ declare const tokenInfo: MaybeContext<BuildRESTFunction<typeof tokenInfo$1> & typeof tokenInfo$1>;
36
+
37
+ export { RawHttpResponse, TokenInfoOptions, TokenInfoResponse, TokenOptions, token, tokenInfo };